chunk-vendors.js 4.8 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822116823116824116825116826116827116828116829116830116831116832116833116834116835116836116837116838116839116840116841116842116843116844116845116846116847116848116849116850116851116852116853116854116855116856116857116858116859116860116861116862116863116864116865116866116867116868116869116870116871116872116873116874116875116876116877116878116879116880116881116882116883116884116885116886116887116888116889116890116891116892116893116894116895116896116897116898116899116900116901116902116903116904116905116906116907116908116909116910116911116912116913116914116915116916116917116918116919116920116921116922116923116924116925116926116927116928116929116930116931116932116933116934116935116936116937116938116939116940116941116942116943116944116945116946116947116948116949116950116951116952116953116954116955116956116957116958116959116960116961116962116963116964116965116966116967116968116969116970116971116972116973116974116975116976116977116978116979116980116981116982116983116984116985116986116987116988116989116990116991116992116993116994116995116996116997116998116999117000117001117002117003117004117005117006117007117008117009117010117011117012117013117014117015117016117017117018117019117020117021117022117023117024117025117026117027117028117029117030117031117032117033117034117035117036117037117038117039117040117041117042117043117044117045117046117047117048117049117050117051117052117053117054117055117056117057117058117059117060117061117062117063117064117065117066117067117068117069117070117071117072117073117074117075117076117077117078117079117080117081117082117083117084117085117086117087117088117089117090117091117092117093117094117095117096117097117098117099117100117101117102117103117104117105117106117107117108117109117110117111117112117113117114117115117116117117117118117119117120117121117122117123117124117125117126117127117128117129117130117131117132117133117134117135117136117137117138117139117140117141117142117143117144117145117146117147117148117149117150117151117152117153117154117155117156117157117158117159117160117161117162117163117164117165117166117167117168117169117170117171117172117173117174117175117176117177117178117179117180117181117182117183117184117185117186117187117188117189117190117191117192117193117194117195117196117197117198117199117200117201117202117203117204117205117206117207117208117209117210117211117212117213117214117215117216117217117218117219117220117221117222117223117224117225117226117227117228117229117230117231117232117233117234117235117236117237117238117239117240117241117242117243117244117245117246117247117248117249117250117251117252117253117254117255117256117257117258117259117260117261117262117263117264117265117266117267117268117269117270117271117272117273117274117275117276117277117278117279117280117281117282117283117284117285117286117287117288117289117290117291117292117293117294117295117296117297117298117299117300117301117302117303117304117305117306117307117308117309117310117311117312117313117314117315117316117317117318117319117320117321117322117323117324117325117326117327117328117329117330117331117332117333117334117335117336117337117338117339117340117341117342117343117344117345117346117347117348117349117350117351117352117353117354117355117356117357117358117359117360117361117362117363117364117365117366117367117368117369117370117371117372117373117374117375117376117377117378117379117380117381117382117383117384117385117386117387117388117389117390117391117392117393117394117395117396117397117398117399117400117401117402117403117404117405117406117407117408117409117410117411117412117413117414117415117416117417117418117419117420117421117422117423117424117425117426117427117428117429117430117431117432117433117434117435117436117437117438117439117440117441117442117443117444117445117446117447117448117449117450117451117452117453117454117455117456117457117458117459117460117461117462117463117464117465117466117467117468117469117470117471117472117473117474117475117476117477117478117479117480117481117482117483117484117485117486117487117488117489117490117491117492117493117494117495117496117497117498117499117500117501117502117503117504117505117506117507117508117509117510117511117512117513117514117515117516117517117518117519117520117521117522117523117524117525117526117527117528117529117530117531117532117533117534117535117536117537117538117539117540117541117542117543117544117545117546117547117548117549117550117551117552117553117554117555117556117557117558117559117560117561117562117563117564117565117566117567117568117569117570117571117572117573117574117575117576117577117578117579117580117581117582117583117584117585117586117587117588117589117590117591117592117593117594117595117596117597117598117599117600117601117602117603117604117605117606117607117608117609117610117611117612117613117614117615117616117617117618117619117620117621117622117623117624117625117626117627117628117629117630117631117632117633117634117635117636117637117638117639117640117641117642117643117644117645117646117647117648117649117650117651117652117653117654117655117656117657117658117659117660117661117662117663117664117665117666117667117668117669117670117671117672117673117674117675117676117677117678117679117680117681117682117683117684117685117686117687117688117689117690117691117692117693117694117695117696117697117698117699117700117701117702117703117704117705117706117707117708117709117710117711117712117713117714117715117716117717117718117719117720117721117722117723117724117725117726117727117728117729117730117731117732117733117734117735117736117737117738117739117740117741117742117743117744117745117746117747117748117749117750117751117752117753117754117755117756117757117758117759117760117761117762117763117764117765117766117767117768117769117770117771117772117773117774117775117776117777117778117779117780117781117782117783117784117785117786117787117788117789117790117791117792117793117794117795117796117797117798117799117800117801117802117803117804117805117806117807117808117809117810117811117812117813117814117815117816117817117818117819117820117821117822117823117824117825117826117827117828117829117830117831117832117833117834117835117836117837117838117839117840117841117842117843117844117845117846117847117848117849117850117851117852117853117854117855117856117857117858117859117860117861117862117863117864117865117866117867117868117869117870117871117872117873117874117875117876117877117878117879117880117881117882117883117884117885117886117887117888117889117890117891117892117893117894117895117896117897117898117899117900117901117902117903117904117905117906117907117908117909117910117911117912117913117914117915117916117917117918117919117920117921117922117923117924117925117926117927117928117929117930117931117932117933117934117935117936117937117938117939117940117941117942117943117944117945117946117947117948117949117950117951117952117953117954117955117956117957117958117959117960117961117962117963117964117965117966117967117968117969117970117971117972117973117974117975117976117977117978117979117980117981117982117983117984117985117986117987117988117989117990117991117992117993117994117995117996117997117998117999118000118001118002118003118004118005118006118007118008118009118010118011118012118013118014118015118016118017118018118019118020118021118022118023118024118025118026118027118028118029118030118031118032118033118034118035118036118037118038118039118040118041118042118043118044118045118046118047118048118049118050118051118052118053118054118055118056118057118058118059118060118061118062118063118064118065118066118067118068118069118070118071118072118073118074118075118076118077118078118079118080118081118082118083118084118085118086118087118088118089118090118091118092118093118094118095118096118097118098118099118100118101118102118103118104118105118106118107118108118109118110118111118112118113118114118115118116118117118118118119118120118121118122118123118124118125118126118127118128118129118130118131118132118133118134118135118136118137118138118139118140118141118142118143118144118145118146118147118148118149118150118151118152118153118154118155118156118157118158118159118160118161118162118163118164118165118166118167118168118169118170118171118172118173118174118175118176118177118178118179118180118181118182118183118184118185118186118187118188118189118190118191118192118193118194118195118196118197118198118199118200118201118202118203118204118205118206118207118208118209118210118211118212118213118214118215118216118217118218118219118220118221118222118223118224118225118226118227118228118229118230118231118232118233118234118235118236118237118238118239118240118241118242118243118244118245118246118247118248118249118250118251118252118253118254118255118256118257118258118259118260118261118262118263118264118265118266118267118268118269118270118271118272118273118274118275118276118277118278118279118280118281118282118283118284118285118286118287118288118289118290118291118292118293118294118295118296118297118298118299118300118301118302118303118304118305118306118307118308118309118310118311118312118313118314118315118316118317118318118319118320118321118322118323118324118325118326118327118328118329118330118331118332118333118334118335118336118337118338118339118340118341118342118343118344118345118346118347118348118349118350118351118352118353118354118355118356118357118358118359118360118361118362118363118364118365118366118367118368118369118370118371118372118373118374118375118376118377118378118379118380118381118382118383118384118385118386118387118388118389118390118391118392118393118394118395118396118397118398118399118400118401118402118403118404118405118406118407118408118409118410118411118412118413118414118415118416118417118418118419118420118421118422118423118424118425118426118427118428118429118430118431118432118433118434118435118436118437118438118439118440118441118442118443118444118445118446118447118448118449118450118451118452118453118454118455118456118457118458118459118460118461118462118463118464118465118466118467118468118469118470118471118472118473118474118475118476118477118478118479118480118481118482118483118484118485118486118487118488118489118490118491118492118493118494118495118496118497118498118499118500118501118502118503118504118505118506118507118508118509118510118511118512118513118514118515118516118517118518118519118520118521118522118523118524118525118526118527118528118529118530118531118532118533118534118535118536118537118538118539118540118541118542118543118544118545118546118547118548118549118550118551118552118553118554118555118556118557118558118559118560118561118562118563118564118565118566118567118568118569118570118571118572118573118574118575118576118577118578118579118580118581118582118583118584118585118586118587118588118589118590118591118592118593118594118595118596118597118598118599118600118601118602118603118604118605118606118607118608118609118610118611118612118613118614118615118616118617118618118619118620118621118622118623118624118625118626118627118628118629118630118631118632118633118634118635118636118637118638118639118640118641118642118643118644118645118646118647118648118649118650118651118652118653118654118655118656118657118658118659118660118661118662118663118664118665118666118667118668118669118670118671118672118673118674118675118676118677118678118679118680118681118682118683118684118685118686118687118688118689118690118691118692118693118694118695118696118697118698118699118700118701118702118703118704118705118706118707118708118709118710118711118712118713118714118715118716118717118718118719118720118721118722118723118724118725118726118727118728118729118730118731118732118733118734118735118736118737118738118739118740118741118742118743118744118745118746118747118748118749118750118751118752118753118754118755118756118757118758118759118760118761118762118763118764118765118766118767118768118769118770118771118772118773118774118775118776118777118778118779118780118781118782118783118784118785118786118787118788118789118790118791118792118793118794118795118796118797118798118799118800118801118802118803118804118805118806118807118808118809118810118811118812118813118814118815118816118817118818118819118820118821118822118823118824118825118826118827118828118829118830118831118832118833118834118835118836118837118838118839118840118841118842118843118844118845118846118847118848118849118850118851118852118853118854118855118856118857118858118859118860118861118862118863118864118865118866118867118868118869118870118871118872118873118874118875118876118877118878118879118880118881118882118883118884118885118886118887118888118889118890118891118892118893118894118895118896118897118898118899118900118901118902118903118904118905118906118907118908118909118910118911118912118913118914118915118916118917118918118919118920118921118922118923118924118925118926118927118928118929118930118931118932118933118934118935118936118937118938118939118940118941118942118943118944118945118946118947118948118949118950118951118952118953118954118955118956118957118958118959118960118961118962118963118964118965118966118967118968118969118970118971118972118973118974118975118976118977118978118979118980118981118982118983118984118985118986118987118988118989118990118991118992118993118994118995118996118997118998118999119000119001119002119003119004119005119006119007119008119009119010119011119012119013119014119015119016119017119018119019119020119021119022119023119024119025119026119027119028119029119030119031119032119033119034119035119036119037119038119039119040119041119042119043119044119045119046119047119048119049119050119051119052119053119054119055119056119057119058119059119060119061119062119063119064119065119066119067119068119069119070119071119072119073119074119075119076119077119078119079119080119081119082119083119084119085119086119087119088119089119090119091119092119093119094119095119096119097119098119099119100119101119102119103119104119105119106119107119108119109119110119111119112119113119114119115119116119117119118119119119120119121119122119123119124119125119126119127119128119129119130119131119132119133119134119135119136119137119138119139119140119141119142119143119144119145119146119147119148119149119150119151119152119153119154119155119156119157119158119159119160119161119162119163119164119165119166119167119168119169119170119171119172119173119174119175119176119177119178119179119180119181119182119183119184119185119186119187119188119189119190119191119192119193119194119195119196119197119198119199119200119201119202119203119204119205119206119207119208119209119210119211119212119213119214119215119216119217119218119219119220119221119222119223119224119225119226119227119228119229119230119231119232119233119234119235119236119237119238119239119240119241119242119243119244119245119246119247119248119249119250119251119252119253119254119255119256119257119258119259119260119261119262119263119264119265119266119267119268119269119270119271119272119273119274119275119276119277119278119279119280119281119282119283119284119285119286119287119288119289119290119291119292119293119294119295119296119297119298119299119300119301119302119303119304119305119306119307119308119309119310119311119312119313119314119315119316119317119318119319119320119321119322119323119324119325119326119327119328119329119330119331119332119333119334119335119336119337119338119339119340119341119342119343119344119345119346119347119348119349119350119351119352119353119354119355119356119357119358119359119360119361119362119363119364119365119366119367119368119369119370119371119372119373119374119375119376119377119378119379119380119381119382119383119384119385119386119387119388119389119390119391119392119393119394119395119396119397119398119399119400119401119402119403119404119405119406119407119408119409119410119411119412119413119414119415119416119417119418119419119420119421119422119423119424119425119426119427119428119429119430119431119432119433119434119435119436119437119438119439119440119441119442119443119444119445119446119447119448119449119450119451119452119453119454119455119456119457119458119459119460119461119462119463119464119465119466119467119468119469119470119471119472119473119474119475119476119477119478119479119480119481119482119483119484119485119486119487119488119489119490119491119492119493119494119495119496119497119498119499119500119501119502119503119504119505119506119507119508119509119510119511119512119513119514119515119516119517119518119519119520119521119522119523119524119525119526119527119528119529119530119531119532119533119534119535119536119537119538119539119540119541119542119543119544119545119546119547119548119549119550119551119552119553119554119555119556119557119558119559119560119561119562119563119564119565119566119567119568119569119570119571119572119573119574119575119576119577119578119579119580119581119582119583119584119585119586119587119588119589119590119591119592119593119594119595119596119597119598119599119600119601119602119603119604119605119606119607119608119609119610119611119612119613119614119615119616119617119618119619119620119621119622119623119624119625119626119627119628119629119630119631119632119633119634119635119636119637119638119639119640119641119642119643119644119645119646119647119648119649119650119651119652119653119654119655119656119657119658119659119660119661119662119663119664119665119666119667119668119669119670119671119672119673119674119675119676119677119678119679119680119681119682119683119684119685119686119687119688119689119690119691119692119693119694119695119696119697119698119699119700119701119702119703119704119705119706119707119708119709119710119711119712119713119714119715119716119717119718119719119720119721119722119723119724119725119726119727119728119729119730119731119732119733119734119735119736119737119738119739119740119741119742119743119744119745119746119747119748119749119750119751119752119753119754119755119756119757119758119759119760119761119762119763119764119765119766119767119768119769119770119771119772119773119774119775119776119777119778119779119780119781119782119783119784119785119786119787119788119789119790119791119792119793119794119795119796119797119798119799119800119801119802119803119804119805119806119807119808119809119810119811119812119813119814119815119816119817119818119819119820119821119822119823119824119825119826119827119828119829119830119831119832119833119834119835119836119837119838119839119840119841119842119843119844119845119846119847119848119849119850119851119852119853119854119855119856119857119858119859119860119861119862119863119864119865119866119867119868119869119870119871119872119873119874119875119876119877119878119879119880119881119882119883119884119885119886119887119888119889119890119891119892119893119894119895119896119897119898119899119900119901119902119903119904119905119906119907119908119909119910119911119912119913119914119915119916119917119918119919119920119921119922119923119924119925119926119927119928119929119930119931119932119933119934119935119936119937119938119939119940119941119942119943119944119945119946119947119948119949119950119951119952119953119954119955119956119957119958119959119960119961119962119963119964119965119966119967119968119969119970119971119972119973119974119975119976119977119978119979119980119981119982119983119984119985119986119987119988119989119990119991119992119993119994119995119996119997119998119999120000120001120002120003120004120005120006120007120008120009120010120011120012120013120014120015120016120017120018120019120020120021120022120023120024120025120026120027120028120029120030120031120032120033120034120035120036120037120038120039120040120041120042120043120044120045120046120047120048120049120050120051120052120053120054120055120056120057120058120059120060120061120062120063120064120065120066120067120068120069120070120071120072120073120074120075120076120077120078120079120080120081120082120083120084120085120086120087120088120089120090120091120092120093120094120095120096120097120098120099120100120101120102120103120104120105120106120107120108120109120110120111120112120113120114120115120116120117120118120119120120120121120122120123120124120125120126120127120128120129120130120131120132120133120134120135120136120137120138120139120140120141120142120143120144120145120146120147120148120149120150120151120152120153120154120155120156120157120158120159120160120161120162120163120164120165120166120167120168120169120170120171120172120173120174120175120176120177120178120179120180120181120182120183120184120185120186120187120188120189120190120191120192120193120194120195120196120197120198120199120200120201120202120203120204120205120206120207120208120209120210120211120212120213120214120215120216120217120218120219120220120221120222120223120224120225120226120227120228120229120230120231120232120233120234120235120236120237120238120239120240120241120242120243120244120245120246120247120248120249120250120251120252120253120254120255120256120257120258120259120260120261120262120263120264120265120266120267120268120269120270120271120272120273120274120275120276120277120278120279120280120281120282120283120284120285120286120287120288120289120290120291120292120293120294120295120296120297120298120299120300120301120302120303120304120305120306120307120308120309120310120311120312120313120314120315120316120317120318120319120320120321120322120323120324120325120326120327120328120329120330120331120332120333120334120335120336120337120338120339120340120341120342120343120344120345120346120347120348120349120350120351120352120353120354120355120356120357120358120359120360120361120362120363120364120365120366120367120368120369120370120371120372120373120374120375120376120377120378120379120380120381120382120383120384120385120386120387120388120389120390120391120392120393120394120395120396120397120398120399120400120401120402120403120404120405120406120407120408120409120410120411120412120413120414120415120416120417120418120419120420120421120422120423120424120425120426120427120428120429120430120431120432120433120434120435120436120437120438120439120440120441120442120443120444120445120446120447120448120449120450120451120452120453120454120455120456120457120458120459120460120461120462120463120464120465120466120467120468120469120470120471120472120473120474120475120476120477120478120479120480120481120482120483120484120485120486120487120488120489120490120491120492120493120494120495120496120497120498120499120500120501120502120503120504120505120506120507120508120509120510120511120512120513120514120515120516120517120518120519120520120521120522120523120524120525120526120527120528120529120530120531120532120533120534120535120536120537120538120539120540120541120542120543120544120545120546120547120548120549120550120551120552120553120554120555120556120557120558120559120560120561120562120563120564120565120566120567120568120569120570120571120572120573120574120575120576120577120578120579120580120581120582120583120584120585120586120587120588120589120590120591120592120593120594120595120596120597120598120599120600120601120602120603120604120605120606120607120608120609120610120611120612120613120614120615120616120617120618120619120620120621120622120623120624120625120626120627120628120629120630120631120632120633120634120635120636120637120638120639120640120641120642120643120644120645120646120647120648120649120650120651120652120653120654120655120656120657120658120659120660120661120662120663120664120665120666120667120668120669120670120671120672120673120674120675120676120677120678120679120680120681120682120683120684120685120686120687120688120689120690120691120692120693120694120695120696120697120698120699120700120701120702120703120704120705120706120707120708120709120710120711120712120713120714120715120716120717120718120719120720120721120722120723120724120725120726120727120728120729120730120731120732120733120734120735120736120737120738120739120740120741120742120743120744120745120746120747120748120749120750120751120752120753120754120755120756120757120758120759120760120761120762120763120764120765120766120767120768120769120770120771120772120773120774120775120776120777120778120779120780120781120782120783120784120785120786120787120788120789120790120791120792120793120794120795120796120797120798120799120800120801120802120803120804120805120806120807120808120809120810120811120812120813120814120815120816120817120818120819120820120821120822120823120824120825120826120827120828120829120830120831120832120833120834120835120836120837120838120839120840120841120842120843120844120845120846120847120848120849120850120851120852120853120854120855120856120857120858120859120860120861120862120863120864120865120866120867120868120869120870120871120872120873120874120875120876120877120878120879120880120881120882120883120884120885120886120887120888120889120890120891120892120893120894120895120896120897120898120899120900120901120902120903120904120905120906120907120908120909120910120911120912120913120914120915120916120917120918120919120920120921120922120923120924120925120926120927120928120929120930120931120932120933120934120935120936120937120938120939120940120941120942120943120944120945120946120947120948120949120950120951120952120953120954120955120956120957120958120959120960120961120962120963120964120965120966120967120968120969120970120971120972120973120974120975120976120977120978120979120980120981120982120983120984120985120986120987120988120989120990120991120992120993120994120995120996120997120998120999121000121001121002121003121004121005121006121007121008121009121010121011121012121013121014121015121016121017121018121019121020121021121022121023121024121025121026121027121028121029121030121031121032121033121034121035121036121037121038121039121040121041121042121043121044121045121046121047121048121049121050121051121052121053121054121055121056121057121058121059121060121061121062121063121064121065121066121067121068121069121070121071121072121073121074121075121076121077121078121079121080121081121082121083121084121085121086121087121088121089121090121091121092121093121094121095121096121097121098121099121100121101121102121103121104121105121106121107121108121109121110121111121112121113121114121115121116121117121118121119121120121121121122121123121124121125121126121127121128121129121130121131121132121133121134121135121136121137121138121139121140121141121142121143121144121145121146121147121148121149121150121151121152121153121154121155121156121157121158121159121160121161121162121163121164121165121166121167121168121169121170121171121172121173121174121175121176121177121178121179121180121181121182121183121184121185121186121187121188121189121190121191121192121193121194121195121196121197121198121199121200121201121202121203121204121205121206121207121208121209121210121211121212121213121214121215121216121217121218121219121220121221121222121223121224121225121226121227121228121229121230121231121232121233121234121235121236121237121238121239121240121241121242121243121244121245121246121247121248121249121250121251121252121253121254121255121256121257121258121259121260121261121262121263121264121265121266121267121268121269121270121271121272121273121274121275121276121277121278121279121280121281121282121283121284121285121286121287121288121289121290121291121292121293121294121295121296121297121298121299121300121301121302121303121304121305121306121307121308121309121310121311121312121313121314121315121316121317121318121319121320121321121322121323121324121325121326121327121328121329121330121331121332121333121334121335121336121337121338121339121340121341121342121343121344121345121346121347121348121349121350121351121352121353121354121355121356121357121358121359121360121361121362121363121364121365121366121367121368121369121370121371121372121373121374121375121376121377121378121379121380121381121382121383121384121385121386121387121388121389121390121391121392121393121394121395121396121397121398121399121400121401121402121403121404121405121406121407121408121409121410121411121412121413121414121415121416121417121418121419121420121421121422121423121424121425121426121427121428121429121430121431121432121433121434121435121436121437121438121439121440121441121442121443121444121445121446121447121448121449121450121451121452121453121454121455121456121457121458121459121460121461121462121463121464121465121466121467121468121469121470121471121472121473121474121475121476121477121478121479121480121481121482121483121484121485121486121487121488121489121490121491121492121493121494121495121496121497121498121499121500121501121502121503121504121505121506121507121508121509121510121511121512121513121514121515121516121517121518121519121520121521121522121523121524121525121526121527121528121529121530121531121532121533121534121535121536121537121538121539121540121541121542121543121544121545121546121547121548121549121550121551121552121553121554121555121556121557121558121559121560121561121562121563121564121565121566121567121568121569121570121571121572121573121574121575121576121577121578121579121580121581121582121583121584121585121586121587121588121589121590121591121592121593121594121595121596121597121598121599121600121601121602121603121604121605121606121607121608121609121610121611121612121613121614121615121616121617121618121619121620121621121622121623121624121625121626121627121628121629121630121631121632121633121634121635121636121637121638121639121640121641121642121643121644121645121646121647121648121649121650121651121652121653121654121655121656121657121658121659121660121661121662121663121664121665121666121667121668121669121670121671121672121673121674121675121676121677121678121679121680121681121682121683121684121685121686121687121688121689121690121691121692121693121694121695121696121697121698121699121700121701121702121703121704121705121706121707121708121709121710121711121712121713121714121715121716121717121718121719121720121721121722121723121724121725121726121727121728121729121730121731121732121733121734121735121736121737121738121739121740121741121742121743121744121745121746121747121748121749121750121751121752121753121754121755121756121757121758121759121760121761121762121763121764121765121766121767121768121769121770121771121772121773121774121775121776121777121778121779121780121781121782121783121784121785121786121787121788121789121790121791121792121793121794121795121796121797121798121799121800121801121802121803121804121805121806121807121808121809121810121811121812121813121814121815121816121817121818121819121820121821121822121823121824121825121826121827121828121829121830121831121832121833121834121835121836121837121838121839121840121841121842121843121844121845121846121847121848121849121850121851121852121853121854121855121856121857121858121859121860121861121862121863121864121865121866121867121868121869121870121871121872121873121874121875121876121877121878121879121880121881121882121883121884121885121886121887121888121889121890121891121892121893121894121895121896121897121898121899121900121901121902121903121904121905121906121907121908121909121910121911121912121913121914121915121916121917121918121919121920121921121922121923121924121925121926121927121928121929121930121931121932121933121934121935121936121937121938121939121940121941121942121943121944121945121946121947121948121949121950121951121952121953121954121955121956121957121958121959121960121961121962121963121964121965121966121967121968121969121970121971121972121973121974121975121976121977121978121979121980121981121982121983121984121985121986121987121988121989121990121991121992121993121994121995121996121997121998121999122000122001122002122003122004122005122006122007122008122009122010122011122012122013122014122015122016122017122018122019122020122021122022122023122024122025122026122027122028122029122030122031122032122033122034122035122036122037122038122039122040122041122042122043122044122045122046122047122048122049122050122051122052122053122054122055122056122057122058122059122060122061122062122063122064122065122066122067122068122069122070122071122072122073122074122075122076122077122078122079122080122081122082122083122084122085122086122087122088122089122090122091122092122093122094122095122096122097122098122099122100122101122102122103122104122105122106122107122108122109122110122111122112122113122114122115122116122117122118122119122120122121122122122123122124122125122126122127122128122129122130122131122132122133122134122135122136122137122138122139122140122141122142122143122144122145122146122147122148122149122150122151122152122153122154122155122156122157122158122159122160122161122162122163122164122165122166122167122168122169122170122171122172122173122174122175122176122177122178122179122180122181122182122183122184122185122186122187122188122189122190122191122192122193122194122195122196122197122198122199122200122201122202122203122204122205122206122207122208122209122210122211122212122213122214122215122216122217122218122219122220122221122222122223122224122225122226122227122228122229122230122231122232122233122234122235122236122237122238122239122240122241122242122243122244122245122246122247122248122249122250122251122252122253122254122255122256122257122258122259122260122261122262122263122264122265122266122267122268122269122270122271122272122273122274122275122276122277122278122279122280122281122282122283122284122285122286122287122288122289122290122291122292122293122294122295122296122297122298122299122300122301122302122303122304122305122306122307122308122309122310122311122312122313122314122315122316122317122318122319122320122321122322122323122324122325122326122327122328122329122330122331122332122333122334122335122336122337122338122339122340122341122342122343122344122345122346122347122348122349122350122351122352122353122354122355122356122357122358122359122360122361122362122363122364122365122366122367122368122369122370122371122372122373122374122375122376122377122378122379122380122381122382122383122384122385122386122387122388122389122390122391122392122393122394122395122396122397122398122399122400122401122402122403122404122405122406122407122408122409122410122411122412122413122414122415122416122417122418122419122420122421122422122423122424122425122426122427122428122429122430122431122432122433122434122435122436122437122438122439122440122441122442122443122444122445122446122447122448122449122450122451122452122453122454122455122456122457122458122459122460122461122462122463122464122465122466122467122468122469122470122471122472122473122474122475122476122477122478122479122480122481122482122483122484122485122486122487122488122489122490122491122492122493122494122495122496122497122498122499122500122501122502122503122504122505122506122507122508122509122510122511122512122513122514122515122516122517122518122519122520122521122522122523122524122525122526122527122528122529122530122531122532122533122534122535122536122537122538122539122540122541122542122543122544122545122546122547122548122549122550122551122552122553122554122555122556122557122558122559122560122561122562122563122564122565122566122567122568122569122570122571122572122573122574122575122576122577122578122579122580122581122582122583122584122585122586122587122588122589122590122591122592122593122594122595122596122597122598122599122600122601122602122603122604122605122606122607122608122609122610122611122612122613122614122615122616122617122618122619122620122621122622122623122624122625122626122627122628122629122630122631122632122633122634122635122636122637122638122639122640122641122642122643122644122645122646122647122648122649122650122651122652122653122654122655122656122657122658122659122660122661122662122663122664122665122666122667122668122669122670122671122672122673122674122675122676122677122678122679122680122681122682122683122684122685122686122687122688122689122690122691122692122693122694122695122696122697122698122699122700122701122702122703122704122705122706122707122708122709122710122711122712122713122714122715122716122717122718122719122720122721122722122723122724122725122726122727122728122729122730122731122732122733122734122735122736122737122738122739122740122741122742122743122744122745122746122747122748122749122750122751122752122753122754122755122756122757122758122759122760122761122762122763122764122765122766122767122768122769122770122771122772122773122774122775122776122777122778122779122780122781122782122783122784122785122786122787122788122789122790122791122792122793122794122795122796122797122798122799122800122801122802122803122804122805122806122807122808122809122810122811122812122813122814122815122816122817122818122819122820122821122822122823122824122825122826122827122828122829122830122831122832122833122834122835122836122837122838122839122840122841122842122843122844122845122846122847122848122849122850122851122852122853122854122855122856122857122858122859122860122861122862122863122864122865122866122867122868122869122870122871122872122873122874122875122876122877122878122879122880122881122882122883122884122885122886122887122888122889122890122891122892122893122894122895122896122897122898122899122900122901122902122903122904122905122906122907122908122909122910122911122912122913122914122915122916122917122918122919122920122921122922122923122924122925122926122927122928122929122930122931122932122933122934122935122936122937122938122939122940122941122942122943122944122945122946122947122948122949122950122951122952122953122954122955122956122957122958122959122960122961122962122963122964122965122966122967122968122969122970122971122972122973122974122975122976122977122978122979122980122981122982122983122984122985122986122987122988122989122990122991122992122993122994122995122996122997122998122999123000123001123002123003123004123005123006123007123008123009123010123011123012123013123014123015123016123017123018123019123020123021123022123023123024123025123026123027123028123029123030123031123032123033123034123035123036123037123038123039123040123041123042123043123044123045123046123047123048123049123050123051123052123053123054123055123056123057123058123059123060123061123062123063123064123065123066123067123068123069123070123071123072123073123074123075123076123077123078123079123080123081123082123083123084123085123086123087123088123089123090123091123092123093123094123095123096123097123098123099123100123101123102123103123104123105123106123107123108123109123110123111123112123113123114123115123116123117123118123119123120123121123122123123123124123125123126123127123128123129123130123131123132123133123134123135123136123137123138123139123140123141123142123143123144123145123146123147123148123149123150123151123152123153123154123155123156123157123158123159123160123161123162123163123164123165123166123167123168123169123170123171123172123173123174123175123176123177123178123179123180123181123182123183123184123185123186123187123188123189123190123191123192123193123194123195123196123197123198123199123200123201123202123203123204123205123206123207123208123209123210123211123212123213123214123215123216123217123218123219123220123221123222123223123224123225123226123227123228123229123230123231123232123233123234123235123236123237123238123239123240123241123242123243123244123245123246123247123248123249123250123251123252123253123254123255123256123257123258123259123260123261123262123263123264123265123266123267123268123269123270123271123272123273123274123275123276123277123278123279123280123281123282123283123284123285123286123287123288123289123290123291123292123293123294123295123296123297123298123299123300123301123302123303123304123305123306123307123308123309123310123311123312123313123314123315123316123317123318123319123320123321123322123323123324123325123326123327123328123329123330123331123332123333123334123335123336123337123338123339123340123341123342123343123344123345123346123347123348123349123350123351123352123353123354123355123356123357123358123359123360123361123362123363123364123365123366123367123368123369123370123371123372123373123374123375123376123377123378123379123380123381123382123383123384123385123386123387123388123389123390123391123392123393123394123395123396123397123398123399123400123401123402123403123404123405123406123407123408123409123410123411123412123413123414123415123416123417123418123419123420123421123422123423123424123425123426123427123428123429123430123431123432123433123434123435123436123437123438123439123440123441123442123443123444123445123446123447123448123449123450123451123452123453123454123455123456123457123458123459123460123461123462123463123464123465123466123467123468123469123470123471123472123473123474123475123476123477123478123479123480123481123482123483123484123485123486123487123488123489123490123491123492123493123494123495123496123497123498123499123500123501123502123503123504123505123506123507123508123509123510123511123512123513123514123515123516123517123518123519123520123521123522123523123524123525123526123527123528123529123530123531123532123533123534123535123536123537123538123539123540123541123542123543123544123545123546123547123548123549123550123551123552123553123554123555123556123557123558123559123560123561123562123563123564123565123566123567123568123569123570123571123572123573123574123575123576123577123578123579123580123581123582123583123584123585123586123587123588123589123590123591123592123593123594123595123596123597123598123599123600123601123602123603123604123605123606123607123608123609123610123611123612123613123614123615123616123617123618123619123620123621123622123623123624123625123626123627123628123629123630123631123632123633123634123635123636123637123638123639123640123641123642123643123644123645123646123647123648123649123650123651123652123653123654123655123656123657123658123659123660123661123662123663123664123665123666123667123668123669123670123671123672123673123674123675123676123677123678123679123680123681123682123683123684123685123686123687123688123689123690123691123692123693123694123695123696123697123698123699123700123701123702123703123704123705123706123707123708123709123710123711123712123713123714123715123716123717123718123719123720123721123722123723123724123725123726123727123728123729123730123731123732123733123734123735123736123737123738123739123740123741123742123743123744123745123746123747123748123749123750123751123752123753123754123755123756123757123758123759123760123761123762123763123764123765123766123767123768123769123770123771123772123773123774123775123776123777123778123779123780123781123782123783123784123785123786123787123788123789123790123791123792123793123794123795123796123797123798123799123800123801123802123803123804123805123806123807123808123809123810123811123812123813123814123815123816123817123818123819123820123821123822123823123824123825123826123827123828123829123830123831123832123833123834123835123836123837123838123839123840123841123842123843123844123845123846123847123848123849123850123851123852123853123854123855123856123857123858123859123860123861123862123863123864123865123866123867123868123869123870123871123872123873123874123875123876123877123878123879123880123881123882123883123884123885123886123887123888123889123890123891123892123893123894123895123896123897123898123899123900123901123902123903123904123905123906123907123908123909123910123911123912123913123914123915123916123917123918123919123920123921123922123923123924123925123926123927123928123929123930123931123932123933123934123935123936123937123938123939123940123941123942123943123944123945123946123947123948123949123950123951123952123953123954123955123956123957123958123959123960123961123962123963123964123965123966123967123968123969123970123971123972123973123974123975123976123977123978123979123980123981123982123983123984123985123986123987123988123989123990123991123992123993123994123995123996123997123998123999124000124001124002124003124004124005124006124007124008124009124010124011124012124013124014124015124016124017124018124019124020124021124022124023124024124025124026124027124028124029124030124031124032124033124034124035124036124037124038124039124040124041124042124043124044124045124046124047124048124049124050124051124052124053124054124055124056124057124058124059124060124061124062124063124064124065124066124067124068124069124070124071124072124073124074124075124076124077124078124079124080124081124082124083124084124085124086124087124088124089124090124091124092124093124094124095124096124097124098124099124100124101124102124103124104124105124106124107124108124109124110124111124112124113124114124115124116124117124118124119124120124121124122124123124124124125124126124127124128124129124130124131124132124133124134124135124136124137124138124139124140124141124142124143124144124145124146124147124148124149124150124151124152124153124154124155124156124157124158124159124160124161124162124163124164124165124166124167124168124169124170124171124172124173124174124175124176124177124178124179124180124181124182124183124184124185124186124187124188124189124190124191124192124193124194124195124196124197124198124199124200124201124202124203124204124205124206124207124208124209124210124211124212124213124214124215124216124217124218124219124220124221124222124223124224124225124226124227124228124229124230124231124232124233124234124235124236124237124238124239124240124241124242124243124244124245124246124247124248124249124250124251124252124253124254124255124256124257124258124259124260124261124262124263124264124265124266124267124268124269124270124271124272124273124274124275124276124277124278124279124280124281124282124283124284124285124286124287124288124289124290124291124292124293124294124295124296124297124298124299124300124301124302124303124304124305124306124307124308124309124310124311124312124313124314124315124316124317124318124319124320124321124322124323124324124325124326124327124328124329124330124331124332124333124334124335124336124337124338124339124340124341124342124343124344124345124346124347124348124349124350124351124352124353124354124355124356124357124358124359124360124361124362124363124364124365124366124367124368124369124370124371124372124373124374124375124376124377124378124379124380124381124382124383124384124385124386124387124388124389124390124391124392124393124394124395124396124397124398124399124400124401124402124403124404124405124406124407124408124409124410124411124412124413124414124415124416124417124418124419124420124421124422124423124424124425124426124427124428124429124430124431124432124433124434124435124436124437124438124439124440124441124442124443124444124445124446124447124448124449124450124451124452124453124454124455124456124457124458124459124460124461124462124463124464124465124466124467124468124469124470124471124472124473124474124475124476124477124478124479124480124481124482124483124484124485124486124487124488124489124490124491124492124493124494124495124496124497124498124499124500124501124502124503124504124505124506124507124508124509124510124511124512124513124514124515124516124517124518124519124520124521124522124523124524124525124526124527124528124529124530124531124532124533124534124535124536124537124538124539124540124541124542124543124544124545124546124547124548124549124550124551124552124553124554124555124556124557124558124559124560124561124562124563124564124565124566124567124568124569124570124571124572124573124574124575124576124577124578124579124580124581124582124583124584124585124586124587124588124589124590124591124592124593124594124595124596124597124598124599124600124601124602124603124604124605124606124607124608124609124610124611124612124613124614124615124616124617124618124619124620124621124622124623124624124625124626124627124628124629124630124631124632124633124634124635124636124637124638124639124640124641124642124643124644124645124646124647124648124649124650124651124652124653124654124655124656124657124658124659124660124661124662124663124664124665124666124667124668124669124670124671124672124673124674124675124676124677124678124679124680124681124682124683124684124685124686124687124688124689124690124691124692124693124694124695124696124697124698124699124700124701124702124703124704124705124706124707124708124709124710124711124712124713124714124715124716124717124718124719124720124721124722124723124724124725124726124727124728124729124730124731124732124733124734124735124736124737124738124739124740124741124742124743124744124745124746124747124748124749124750124751124752124753124754124755124756124757124758124759124760124761124762124763124764124765124766124767124768124769124770124771124772124773124774124775124776124777124778124779124780124781124782124783124784124785124786124787124788124789124790124791124792124793124794124795124796124797124798124799124800124801124802124803124804124805124806124807124808124809124810124811124812124813124814124815124816124817124818124819124820124821124822124823124824124825124826124827124828124829124830124831124832124833124834124835124836124837124838124839124840124841124842124843124844124845124846124847124848124849124850124851124852124853124854124855124856124857124858124859124860124861124862124863124864124865124866124867124868124869124870124871124872124873124874124875124876124877124878124879124880124881124882124883124884124885124886124887124888124889124890124891124892124893124894124895124896124897124898124899124900124901124902124903124904124905124906124907124908124909124910124911124912124913124914124915124916124917124918124919124920124921124922124923124924124925124926124927124928124929124930124931124932124933124934124935124936124937124938124939124940124941124942124943124944124945124946124947124948124949124950124951124952124953124954124955124956124957124958124959124960124961124962124963124964124965124966124967124968124969124970124971124972124973124974124975124976124977124978124979124980124981124982124983124984124985124986124987124988124989124990124991124992124993124994124995124996124997124998124999125000125001125002125003125004125005125006125007125008125009125010125011125012125013125014125015125016125017125018125019125020125021125022125023125024125025125026125027125028125029125030125031125032125033125034125035125036125037125038125039125040125041125042125043125044125045125046125047125048125049125050125051125052125053125054125055125056125057125058125059125060125061125062125063125064125065125066125067125068125069125070125071125072125073125074125075125076125077125078125079125080125081125082125083125084125085125086125087125088125089125090125091125092125093125094125095125096125097125098125099125100125101125102125103125104125105125106125107125108125109125110125111125112125113125114125115125116125117125118125119125120125121125122125123125124125125125126125127125128125129125130125131125132125133125134125135125136125137125138125139125140125141125142125143125144125145125146125147125148125149125150125151125152125153125154125155125156125157125158125159125160125161125162125163125164125165125166125167125168125169125170125171125172125173125174125175125176125177125178125179125180125181125182125183125184125185125186125187125188125189125190125191125192125193125194125195125196125197125198125199125200125201125202125203125204125205125206125207125208125209125210125211125212125213125214125215125216125217125218125219125220125221125222125223125224125225125226125227125228125229125230125231125232125233125234125235125236125237125238125239125240125241125242125243125244125245125246125247125248125249125250125251125252125253125254125255125256125257125258125259125260125261125262125263125264125265125266125267125268125269125270125271125272125273125274125275125276125277125278125279125280125281125282125283125284125285125286125287125288125289125290125291125292125293125294125295125296125297125298125299125300125301125302125303125304125305125306125307125308125309125310125311125312125313125314125315125316125317125318125319125320125321125322125323125324125325125326125327125328125329125330125331125332125333125334125335125336125337125338125339125340125341125342125343125344125345125346125347125348125349125350125351125352125353125354125355125356125357125358125359125360125361125362125363125364125365125366125367125368125369125370125371125372125373125374125375125376125377125378125379125380125381125382125383125384125385125386125387125388125389125390125391125392125393125394125395125396125397125398125399125400125401125402125403125404125405125406125407125408125409125410125411125412125413125414125415125416125417125418125419125420125421125422125423125424125425125426125427125428125429125430125431125432125433125434125435125436125437125438125439125440125441125442125443125444125445125446125447125448125449125450125451125452125453125454125455125456125457125458125459125460125461125462125463125464125465125466125467125468125469125470125471125472125473125474125475125476125477125478125479125480125481125482125483125484125485125486125487125488125489125490125491125492125493125494125495125496125497125498125499125500125501125502125503125504125505125506125507125508125509125510125511125512125513125514125515125516125517125518125519125520125521125522125523125524125525125526125527125528125529125530125531125532125533125534125535125536125537125538125539125540125541125542125543125544125545125546125547125548125549125550125551125552125553125554125555125556125557125558125559125560125561125562125563125564125565125566125567125568125569125570125571125572125573125574125575125576125577125578125579125580125581125582125583125584125585125586125587125588125589125590125591125592125593125594125595125596125597125598125599125600125601125602125603125604125605125606125607125608125609125610125611125612125613125614125615125616125617125618125619125620125621125622125623125624125625125626125627125628125629125630125631125632125633125634125635125636125637125638125639125640125641125642125643125644125645125646125647125648125649125650125651125652125653125654125655125656125657125658125659125660125661125662125663125664125665125666125667125668125669125670125671125672125673125674125675125676125677125678125679125680125681125682125683125684125685125686125687125688125689125690125691125692125693125694125695125696125697125698125699125700125701125702125703125704125705125706125707125708125709125710125711125712125713125714125715125716125717125718125719125720125721125722125723125724125725125726125727125728125729125730125731125732125733125734125735125736125737125738125739125740125741125742125743125744125745125746125747125748125749125750125751125752125753125754125755125756125757125758125759125760125761125762125763125764125765125766125767125768125769125770125771125772125773125774125775125776125777125778125779125780125781125782125783125784125785125786125787125788125789125790125791125792125793125794125795125796125797125798125799125800125801125802125803125804125805125806125807125808125809125810125811125812125813125814125815125816125817125818125819125820125821125822125823125824125825125826125827125828125829125830125831125832125833125834125835125836125837125838125839125840125841125842125843125844125845125846125847125848125849125850125851125852125853125854125855125856125857125858125859125860125861125862125863125864125865125866125867125868125869125870125871125872125873125874125875125876125877125878125879125880125881125882125883125884125885125886125887125888125889125890125891125892125893125894125895125896125897125898125899125900125901125902125903125904125905125906125907125908125909125910125911125912125913125914125915125916125917125918125919125920125921125922125923125924125925125926125927125928125929125930125931125932125933125934125935125936125937125938125939125940125941125942125943125944125945125946125947125948125949125950125951125952125953125954125955125956125957125958125959125960125961125962125963125964125965125966125967125968125969125970125971125972125973125974125975125976125977125978125979125980125981125982125983125984125985125986125987125988125989125990125991125992125993125994125995125996125997125998125999126000126001126002126003126004126005126006126007126008126009126010126011126012126013126014126015126016126017126018126019126020126021126022126023126024126025126026126027126028126029126030126031126032126033126034126035126036126037126038126039126040126041126042126043126044126045126046126047126048126049126050126051126052126053126054126055126056126057126058126059126060126061126062126063126064126065126066126067126068126069126070126071126072126073126074126075126076126077126078126079126080126081126082126083126084126085126086126087126088126089126090126091126092126093126094126095126096126097126098126099126100126101126102126103126104126105126106126107126108126109126110126111126112126113126114126115126116126117126118126119126120126121126122126123126124126125126126126127126128126129126130126131126132126133126134126135126136126137126138126139126140126141126142126143126144126145126146126147126148126149126150126151126152126153126154126155126156126157126158126159126160126161126162126163126164126165126166126167126168126169126170126171126172126173126174126175126176126177126178126179126180126181126182126183126184126185126186126187126188126189126190126191126192126193126194126195126196126197126198126199126200126201126202126203126204126205126206126207126208126209126210126211126212126213126214126215126216126217126218126219126220126221126222126223126224126225126226126227126228126229126230126231126232126233126234126235126236126237126238126239126240126241126242126243126244126245126246126247126248126249126250126251126252126253126254126255126256126257126258126259126260126261126262126263126264126265126266126267126268126269126270126271126272126273126274126275126276126277126278126279126280126281126282126283126284126285126286126287126288126289126290126291126292126293126294126295126296126297126298126299126300126301126302126303126304126305126306126307126308126309126310126311126312126313126314126315126316126317126318126319126320126321126322126323126324126325126326126327126328126329126330126331126332126333126334126335126336126337126338126339126340126341126342126343126344126345126346126347126348126349126350126351126352126353126354126355126356126357126358126359126360126361126362126363126364126365126366126367126368126369126370126371126372126373126374126375126376126377126378126379126380126381126382126383126384126385126386126387126388126389126390126391126392126393126394126395126396126397126398126399126400126401126402126403126404126405126406126407126408126409126410126411126412126413126414126415126416126417126418126419126420126421126422126423126424126425126426126427126428126429126430126431126432126433126434126435126436126437126438126439126440126441126442126443126444126445126446126447126448126449126450126451126452126453126454126455126456126457126458126459126460126461126462126463126464126465126466126467126468126469126470126471126472126473126474126475126476126477126478126479126480126481126482126483126484126485126486126487126488126489126490126491126492126493126494126495126496126497126498126499126500126501126502126503126504126505126506126507126508126509126510126511126512126513126514126515126516126517126518126519126520126521126522126523126524126525126526126527126528126529126530126531126532126533126534126535126536126537126538126539126540126541126542126543126544126545126546126547126548126549126550126551126552126553126554126555126556126557126558126559126560126561126562126563126564126565126566126567126568126569126570126571126572126573126574126575126576126577126578126579126580126581126582126583126584126585126586126587126588126589126590126591126592126593126594126595126596126597126598126599126600126601126602126603126604126605126606126607126608126609126610126611126612126613126614126615126616126617126618126619126620126621126622126623126624126625126626126627126628126629126630126631126632126633126634126635126636126637126638126639126640126641126642126643126644126645126646126647126648126649126650126651126652126653126654126655126656126657126658126659126660126661126662126663126664126665126666126667126668126669126670126671126672126673126674126675126676126677126678126679126680126681126682126683126684126685126686126687126688126689126690126691126692126693126694126695126696126697126698126699126700126701126702126703126704126705126706126707126708126709126710126711126712126713126714126715126716126717126718126719126720126721126722126723126724126725126726126727126728126729126730126731126732126733126734126735126736126737126738126739126740126741126742126743126744126745126746126747126748126749126750126751126752126753126754126755126756126757126758126759126760126761126762126763126764126765126766126767126768126769126770126771126772126773126774126775126776126777126778126779126780126781126782126783126784126785126786126787126788126789126790126791126792126793126794126795126796126797126798126799126800126801126802126803126804126805126806126807126808126809126810126811126812126813126814126815126816126817126818126819126820126821126822126823126824126825126826126827126828126829126830126831126832126833126834126835126836126837126838126839126840126841126842126843126844126845126846126847126848126849126850126851126852126853126854126855126856126857126858126859126860126861126862126863126864126865126866126867126868126869126870126871126872126873126874126875126876126877126878126879126880126881126882126883126884126885126886126887126888126889126890126891126892126893126894126895126896126897126898126899126900126901126902126903126904126905126906126907126908126909126910126911126912126913126914126915126916126917126918126919126920126921126922126923126924126925126926126927126928126929126930126931126932126933126934126935126936126937126938126939126940126941126942126943126944126945126946126947126948126949126950126951126952126953126954126955126956126957126958126959126960126961126962126963126964126965126966126967126968126969126970126971126972126973126974126975126976126977126978126979126980126981126982126983126984126985126986126987126988126989126990126991126992126993126994126995126996126997126998126999127000127001127002127003127004127005127006127007127008127009127010127011127012127013127014127015127016127017127018127019127020127021127022127023127024127025127026127027127028127029127030127031127032127033127034127035127036127037127038127039127040127041127042127043127044127045127046127047127048127049127050127051127052127053127054127055127056127057127058127059127060127061127062127063127064127065127066127067127068127069127070127071127072127073127074127075127076127077127078127079127080127081127082127083127084127085127086127087127088127089127090127091127092127093127094127095127096127097127098127099127100127101127102127103127104127105127106127107127108127109127110127111127112127113127114127115127116127117127118127119127120127121127122127123127124127125127126127127127128127129127130127131127132127133127134127135127136127137127138127139127140127141127142127143127144127145127146127147127148127149127150127151127152127153127154127155127156127157127158127159127160127161127162127163127164127165127166127167127168127169127170127171127172127173127174127175127176127177127178127179127180127181127182127183127184127185127186127187127188127189127190127191127192127193127194127195127196127197127198127199127200127201127202127203127204127205127206127207127208127209127210127211127212127213127214127215127216127217127218127219127220127221127222127223127224127225127226127227127228127229127230127231127232127233127234127235127236127237127238127239127240127241127242127243127244127245127246127247127248127249127250127251127252127253127254127255127256127257127258127259127260127261127262127263127264127265127266127267127268127269127270127271127272127273127274127275127276127277127278127279127280127281127282127283127284127285127286127287127288127289127290127291127292127293127294127295127296127297127298127299127300127301127302127303127304127305127306127307127308127309127310127311127312127313127314127315127316127317127318127319127320127321127322127323127324127325127326127327127328127329127330127331127332127333127334127335127336127337127338127339127340127341127342127343127344127345127346127347127348127349127350127351127352127353127354127355127356127357127358127359127360127361127362127363127364127365127366127367127368127369127370127371127372127373127374127375127376127377127378127379127380127381127382127383127384127385127386127387127388127389127390127391127392127393127394127395127396127397127398127399127400127401127402127403127404127405127406127407127408127409127410127411127412127413127414127415127416127417127418127419127420127421127422127423127424127425127426127427127428127429127430127431127432127433127434127435127436127437127438127439127440127441127442127443127444127445127446127447127448127449127450127451127452127453127454127455127456127457127458127459127460127461127462127463127464127465127466127467127468127469127470127471127472127473127474127475127476127477127478127479127480127481127482127483127484127485127486127487127488127489127490127491127492127493127494127495127496127497127498127499127500127501127502127503127504127505127506127507127508127509127510127511127512127513127514127515127516127517127518127519127520127521127522127523127524127525127526127527127528127529127530127531127532127533127534127535127536127537127538127539127540127541127542127543127544127545127546127547127548127549127550127551127552127553127554127555127556127557127558127559127560127561127562127563127564127565127566127567127568127569127570127571127572127573127574127575127576127577127578127579127580127581127582127583127584127585127586127587127588127589127590127591127592127593127594127595127596127597127598127599127600127601127602127603127604127605127606127607127608127609127610127611127612127613127614127615127616127617127618127619127620127621127622127623127624127625127626127627127628127629127630127631127632127633127634127635127636127637127638127639127640127641127642127643127644127645127646127647127648127649127650127651127652127653127654127655127656127657127658127659127660127661127662127663127664127665127666127667127668127669127670127671127672127673127674127675127676127677127678127679127680127681127682127683127684127685127686127687127688127689127690127691127692127693127694127695127696127697127698127699127700127701127702127703127704127705127706127707127708127709127710127711127712127713127714127715127716127717127718127719127720127721127722127723127724127725127726127727127728127729127730127731127732127733127734127735127736127737127738127739127740127741127742127743127744127745127746127747127748127749127750127751127752127753127754127755127756127757127758127759127760127761127762127763127764127765127766127767127768127769127770127771127772127773127774127775127776127777127778127779127780127781127782127783127784127785127786127787127788127789127790127791127792127793127794127795127796127797127798127799127800127801127802127803127804127805127806127807127808127809127810127811127812127813127814127815127816127817127818127819127820127821127822127823127824127825127826127827127828127829127830127831127832127833127834127835127836127837127838127839127840127841127842127843127844127845127846127847127848127849127850127851127852127853127854127855127856127857127858127859127860127861127862127863127864127865127866127867127868127869127870127871127872127873127874127875127876127877127878127879127880127881127882127883127884127885127886127887127888127889127890127891127892127893127894127895127896127897127898127899127900127901127902127903127904127905127906127907127908127909127910127911127912127913127914127915127916127917127918127919127920127921127922127923127924127925127926127927127928127929127930127931127932127933127934127935127936127937127938127939127940127941127942127943127944127945127946127947127948127949127950127951127952127953127954127955127956127957127958127959127960127961127962127963127964127965127966127967127968127969127970127971127972127973127974127975127976127977127978127979127980127981127982127983127984127985127986127987127988127989127990127991127992127993127994127995127996127997127998127999128000128001128002128003128004128005128006128007128008128009128010128011128012128013128014128015128016128017128018128019128020128021128022128023128024128025128026128027128028128029128030128031128032128033128034128035128036128037128038128039128040128041128042128043128044128045128046128047128048128049128050128051128052128053128054128055128056128057128058128059128060128061128062128063128064128065128066128067128068128069128070128071128072128073128074128075128076128077128078128079128080128081128082128083128084128085128086128087128088128089128090128091128092128093128094128095128096128097128098128099128100128101128102128103128104128105128106128107128108128109128110128111128112128113128114128115128116128117128118128119128120128121128122128123128124128125128126128127128128128129128130128131128132128133128134128135128136128137128138128139128140128141128142128143128144128145128146128147128148128149128150128151128152128153128154128155128156128157128158128159128160128161128162128163128164128165128166128167128168128169128170128171128172128173128174128175128176128177128178128179128180128181128182128183128184128185128186128187128188128189128190128191128192128193128194128195128196128197128198128199128200128201128202128203128204128205128206128207128208128209128210128211128212128213128214128215128216128217128218128219128220128221128222128223128224128225128226128227128228128229128230128231128232128233128234128235128236128237128238128239128240128241128242128243128244128245128246128247128248128249128250128251128252128253128254128255128256128257128258128259128260128261128262128263128264128265128266128267128268128269128270128271128272128273128274128275128276128277128278128279128280128281128282128283128284128285128286128287128288128289128290128291128292128293128294128295128296128297128298128299128300128301128302128303128304128305128306128307128308128309128310128311128312128313128314128315128316128317128318128319128320128321128322128323128324128325128326128327128328128329128330128331128332128333128334128335128336128337128338128339128340128341128342128343128344128345128346128347128348128349128350128351128352128353128354128355128356128357128358128359128360128361128362128363128364128365128366128367128368128369128370128371128372128373128374128375128376128377128378128379128380128381128382128383128384128385128386128387128388128389128390128391128392128393128394128395128396128397128398128399128400128401128402128403128404128405128406128407128408128409128410128411128412128413128414128415128416128417128418128419128420128421128422128423128424128425128426128427128428128429128430128431128432128433128434128435128436128437128438128439128440128441128442128443128444128445128446128447128448128449128450128451128452128453128454128455128456128457128458128459128460128461128462128463128464128465128466128467128468128469128470128471128472128473128474128475128476128477128478128479128480128481128482128483128484128485128486128487128488128489128490128491128492128493128494128495128496128497128498128499128500128501128502128503128504128505128506128507128508128509128510128511128512128513128514128515128516128517128518128519128520128521128522128523128524128525128526128527128528128529128530128531128532128533128534128535128536128537128538128539128540128541128542128543128544128545128546128547128548128549128550128551128552128553128554128555128556128557128558128559128560128561128562128563128564128565128566128567128568128569128570128571128572128573128574128575128576128577128578128579128580128581128582128583128584128585128586128587128588128589128590128591128592128593128594128595128596128597128598128599128600128601128602128603128604128605128606128607128608128609128610128611128612128613128614128615128616128617128618128619128620128621128622128623128624128625128626128627128628128629128630128631128632128633128634128635128636128637128638128639128640128641128642128643128644128645128646128647128648128649128650128651128652128653128654128655128656128657128658128659128660128661128662128663128664128665128666128667128668128669128670128671128672128673128674128675128676128677128678128679128680128681128682128683128684128685128686128687128688128689128690128691128692128693128694128695128696128697128698128699128700128701128702128703128704128705128706128707128708128709128710128711128712128713128714128715128716128717128718128719128720128721128722128723128724128725128726128727128728128729128730128731128732128733128734128735128736128737128738128739128740128741128742128743128744128745128746128747128748128749128750128751128752128753128754128755128756128757128758128759128760128761128762128763128764128765128766128767128768128769128770128771128772128773128774128775128776128777128778128779128780128781128782128783128784128785128786128787128788128789128790128791128792128793128794128795128796128797128798128799128800128801128802128803128804128805128806128807128808128809128810128811128812128813128814128815128816128817128818128819128820128821128822128823128824128825128826128827128828128829128830128831128832128833128834128835128836128837128838128839128840128841128842128843128844128845128846128847128848128849128850128851128852128853128854128855128856128857128858128859128860128861128862128863128864128865128866128867128868128869128870128871128872128873128874128875128876128877128878128879128880128881128882128883128884128885128886128887128888128889128890128891128892128893128894128895128896128897128898128899128900128901128902128903128904128905128906128907128908128909128910128911128912128913128914128915128916128917128918128919128920128921128922128923128924128925128926128927128928128929128930128931128932128933128934128935128936128937128938128939128940128941128942128943128944128945128946128947128948128949128950128951128952128953128954128955128956128957128958128959128960128961128962128963128964128965128966128967128968128969128970128971128972128973128974128975128976128977128978128979128980128981128982128983128984128985128986128987128988128989128990128991128992128993128994128995128996128997128998128999129000129001129002129003129004129005129006129007129008129009129010129011129012129013129014129015129016129017129018129019129020129021129022129023129024129025129026129027129028129029129030129031129032129033129034129035129036129037129038129039129040129041129042129043129044129045129046129047129048129049129050129051129052129053129054129055129056129057129058129059129060129061129062129063129064129065129066129067129068129069129070129071129072129073129074129075129076129077129078129079129080129081129082129083129084129085129086129087129088129089129090129091129092129093129094129095129096129097129098129099129100129101129102129103129104129105129106129107129108129109129110129111129112129113129114129115129116129117129118129119129120129121129122129123129124129125129126129127129128129129129130129131129132129133129134129135129136129137129138129139129140129141129142129143129144129145129146129147129148129149129150129151129152129153129154129155129156129157129158129159129160129161129162129163129164129165129166129167129168129169129170129171129172129173129174129175129176129177129178129179129180129181129182129183129184129185129186129187129188129189129190129191129192129193129194129195129196129197129198129199129200129201129202129203129204129205129206129207129208129209129210129211129212129213129214129215129216129217129218129219129220129221129222129223129224129225129226129227129228129229129230129231129232129233129234129235129236129237129238129239129240129241129242129243129244129245129246129247129248129249129250129251129252129253129254129255129256129257129258129259129260129261129262129263129264129265129266129267129268129269129270129271129272129273129274129275129276129277129278129279129280129281129282129283129284129285129286129287129288129289129290129291129292129293129294129295129296129297129298129299129300129301129302129303129304129305129306129307129308129309129310129311129312129313129314129315129316129317129318129319129320129321129322129323129324129325129326129327129328129329129330129331129332129333129334129335129336129337129338129339129340129341129342129343129344129345129346129347129348129349129350129351129352129353129354129355129356129357129358129359129360129361129362129363129364129365129366129367129368129369129370129371129372129373129374129375129376129377129378129379129380129381129382129383129384129385129386129387129388129389129390129391129392129393129394129395129396129397129398129399129400129401129402129403129404129405129406129407129408129409129410129411129412129413129414129415129416129417129418129419129420129421129422129423129424129425129426129427129428129429129430129431129432129433129434129435129436129437129438129439129440129441129442129443129444129445129446129447129448129449129450129451129452129453129454129455129456129457129458129459129460129461129462129463129464129465129466129467129468129469129470129471129472129473129474129475129476129477129478129479129480129481129482129483129484129485129486129487129488129489129490129491129492129493129494129495129496129497129498129499129500129501129502129503129504129505129506129507129508129509129510129511129512129513129514129515129516129517129518129519129520129521129522129523129524129525129526129527129528129529129530129531129532129533129534129535129536129537129538129539129540129541129542129543129544129545129546129547129548129549129550129551129552129553129554129555129556129557129558129559129560129561129562129563129564129565129566129567129568129569129570129571129572129573129574129575129576129577129578129579129580129581129582129583129584129585129586129587129588129589129590129591129592129593129594129595129596129597129598129599129600129601129602129603129604129605129606129607129608129609129610129611129612129613129614129615129616129617129618129619129620129621129622129623129624129625129626129627129628129629129630129631129632129633129634129635129636129637129638129639129640129641129642129643129644129645129646129647129648129649129650129651129652129653129654129655129656129657129658129659129660129661129662129663129664129665129666129667129668129669129670129671129672129673129674129675129676129677129678129679129680129681129682129683129684129685129686129687129688129689129690129691129692129693129694129695129696129697129698129699129700129701129702129703129704129705129706129707129708129709129710129711129712129713129714129715129716129717129718129719129720129721129722129723129724129725129726129727129728129729129730129731129732129733129734129735129736129737129738129739129740129741129742129743129744129745129746129747129748129749129750129751129752129753129754129755129756129757129758129759129760129761129762129763129764129765129766129767129768129769129770129771129772129773129774129775129776129777129778129779129780129781129782129783129784129785129786129787129788129789129790129791129792129793129794129795129796129797129798129799129800129801129802129803129804129805129806129807129808129809129810129811129812129813129814129815129816129817129818129819129820129821129822129823129824129825129826129827129828129829129830129831129832129833129834129835129836129837129838129839129840129841129842129843129844129845129846129847129848129849129850129851129852129853129854129855129856129857129858129859129860129861129862129863129864129865129866129867129868129869129870129871129872129873129874129875129876129877129878129879129880129881129882129883129884129885129886129887129888129889129890129891129892129893129894129895129896129897129898129899129900129901129902129903129904129905129906129907129908129909129910129911129912129913129914129915129916129917129918129919129920129921129922129923129924129925129926129927129928129929129930129931129932129933129934129935129936129937129938129939129940129941129942129943129944129945129946129947129948129949129950129951129952129953129954129955129956129957129958129959129960129961129962129963129964129965129966129967129968129969129970129971129972129973129974129975129976129977129978129979129980129981129982129983129984129985129986129987129988129989129990129991129992129993129994129995129996129997129998129999130000130001130002130003130004130005130006130007130008130009130010130011130012130013130014130015130016130017130018130019130020130021130022130023130024130025130026130027130028130029130030130031130032130033130034130035130036130037130038130039130040130041130042130043130044130045130046130047130048130049130050130051130052130053130054130055130056130057130058130059130060130061130062130063130064130065130066130067130068130069130070130071130072130073130074130075130076130077130078130079130080130081130082130083130084130085130086130087130088130089130090130091130092130093130094130095130096130097130098130099130100130101130102130103130104130105130106130107130108130109130110130111130112130113130114130115130116130117130118130119130120130121130122130123130124130125130126130127130128130129130130130131130132130133130134130135130136130137130138130139130140130141130142130143130144130145130146130147130148130149130150130151130152130153130154130155130156130157130158130159130160130161130162130163130164130165130166130167130168130169130170130171130172130173130174130175130176130177130178130179130180130181130182130183130184130185130186130187130188130189130190130191130192130193130194130195130196130197130198130199130200130201130202130203130204130205130206130207130208130209130210130211130212130213130214130215130216130217130218130219130220130221130222130223130224130225130226130227130228130229130230130231130232130233130234130235130236130237130238130239130240130241130242130243130244130245130246130247130248130249130250130251130252130253130254130255130256130257130258130259130260130261130262130263130264130265130266130267130268130269130270130271130272130273130274130275130276130277130278130279130280130281130282130283130284130285130286130287130288130289130290130291130292130293130294130295130296130297130298130299130300130301130302130303130304130305130306130307130308130309130310130311130312130313130314130315130316130317130318130319130320130321130322130323130324130325130326130327130328130329130330130331130332130333130334130335130336130337130338130339130340130341130342130343130344130345130346130347130348130349130350130351130352130353130354130355130356130357130358130359130360130361130362130363130364130365130366130367130368130369130370130371130372130373130374130375130376130377130378130379130380130381130382130383130384130385130386130387130388130389130390130391130392130393130394130395130396130397130398130399130400130401130402130403130404130405130406130407130408130409130410130411130412130413130414130415130416130417130418130419130420130421130422130423130424130425130426130427130428130429130430130431130432130433130434130435130436130437130438130439130440130441130442130443130444130445130446130447130448130449130450130451130452130453130454130455130456130457130458130459130460130461130462130463130464130465130466130467130468130469130470130471130472130473130474130475130476130477130478130479130480130481130482130483130484130485130486130487130488130489130490130491130492130493130494130495130496130497130498130499130500130501130502130503130504130505130506130507130508130509130510130511130512130513130514130515130516130517130518130519130520130521130522130523130524130525130526130527130528130529130530130531130532130533130534130535130536130537130538130539130540130541130542130543130544130545130546130547130548130549130550130551130552130553130554130555130556130557130558130559130560130561130562130563130564130565130566130567130568130569130570130571130572130573130574130575130576130577130578130579130580130581130582130583130584130585130586130587130588130589130590130591130592130593130594130595130596130597130598130599130600130601130602130603130604130605130606130607130608130609130610130611130612130613130614130615130616130617130618130619130620130621130622130623130624130625130626130627130628130629130630130631130632130633130634130635130636130637130638130639130640130641130642130643130644130645130646130647130648130649130650130651130652130653130654130655130656130657130658130659130660130661130662130663130664130665130666130667130668130669130670130671130672130673130674130675130676130677130678130679130680130681130682130683130684130685130686130687130688130689130690130691130692130693130694130695130696130697130698130699130700130701130702130703130704130705130706130707130708130709130710130711130712130713130714130715130716130717130718130719130720130721130722130723130724130725130726130727130728130729130730130731130732130733130734130735130736130737130738130739130740130741130742130743130744130745130746130747130748130749130750130751130752130753130754130755130756130757130758130759130760130761130762130763130764130765130766130767130768130769130770130771130772130773130774130775130776130777130778130779130780130781130782130783130784130785130786130787130788130789130790130791130792130793130794130795130796130797130798130799130800130801130802130803130804130805130806130807130808130809130810130811130812130813130814130815130816130817130818130819130820130821130822130823130824130825130826130827130828130829130830130831130832130833130834130835130836130837130838130839130840130841130842130843130844130845130846130847130848130849130850130851130852130853130854130855130856130857130858130859130860130861130862130863130864130865130866130867130868130869130870130871130872130873130874130875130876130877130878130879130880130881130882130883130884130885130886130887130888130889130890130891130892130893130894130895130896130897130898130899130900130901130902130903130904130905130906130907130908130909130910130911130912130913130914130915130916130917130918130919130920130921130922130923130924130925130926130927130928130929130930130931130932130933130934130935130936130937130938130939130940130941130942130943130944130945130946130947130948130949130950130951130952130953130954130955130956130957130958130959130960130961130962130963130964130965130966130967130968130969130970130971130972130973130974130975130976130977130978130979130980130981130982130983130984130985130986130987130988130989130990130991130992130993130994130995130996130997130998130999131000131001131002131003131004131005131006131007131008131009131010131011131012131013131014131015131016131017131018131019131020131021131022131023131024131025131026131027131028131029131030131031131032131033131034131035131036131037131038131039131040131041131042131043131044131045131046131047131048131049131050131051131052131053131054131055131056131057131058131059131060131061131062131063131064131065131066131067131068131069131070131071131072131073131074131075131076131077131078131079131080131081131082131083131084131085131086131087131088131089131090131091131092131093131094131095131096131097131098131099131100131101131102131103131104131105131106131107131108131109131110131111131112131113131114131115131116131117131118131119131120131121131122131123131124131125131126131127131128131129131130131131131132131133131134131135131136131137131138131139131140131141131142131143131144131145131146131147131148131149131150131151131152131153131154131155131156131157131158131159131160131161131162131163131164131165131166131167131168131169131170131171131172131173131174131175131176131177131178131179131180131181131182131183131184131185131186131187131188131189131190131191131192131193131194131195131196131197131198131199131200131201131202131203131204131205131206131207131208131209131210131211131212131213131214131215131216131217131218131219131220131221131222131223131224131225131226131227131228131229131230131231131232131233131234131235131236131237131238131239131240131241131242131243131244131245131246131247131248131249131250131251131252131253131254131255131256131257131258131259131260131261131262131263131264131265131266131267131268131269131270131271131272131273131274131275131276131277131278131279131280131281131282131283131284131285131286131287131288131289131290131291131292131293131294131295131296131297131298131299131300131301131302131303131304131305131306131307131308131309131310131311131312131313131314131315131316131317131318131319131320131321131322131323131324131325131326131327131328131329131330131331131332131333131334131335131336131337131338131339131340131341131342131343131344131345131346131347131348131349131350131351131352131353131354131355131356131357131358131359131360131361131362131363131364131365131366131367131368131369131370131371131372131373131374131375131376131377131378131379131380131381131382131383131384131385131386131387131388131389131390131391131392131393131394131395131396131397131398131399131400131401131402131403131404131405131406131407131408131409131410131411131412131413131414131415131416131417131418131419131420131421131422131423131424131425131426131427131428131429131430131431131432131433131434131435131436131437131438131439131440131441131442131443131444131445131446131447131448131449131450131451131452131453131454131455131456131457131458131459131460131461131462131463131464131465131466131467131468131469131470131471131472131473131474131475131476131477131478131479131480131481131482131483131484131485131486131487131488131489131490131491131492131493131494131495131496131497131498131499131500131501131502131503131504131505131506131507131508131509131510131511131512131513131514131515131516131517131518131519131520131521131522131523131524131525131526131527131528131529131530131531131532131533131534131535131536131537131538131539131540131541131542131543131544131545131546131547131548131549131550131551131552131553131554131555131556131557131558131559131560131561131562131563131564131565131566131567131568131569131570131571131572131573131574131575131576131577131578131579131580131581131582131583131584131585131586131587131588131589131590131591131592131593131594131595131596131597131598131599131600131601131602131603131604131605131606131607131608131609131610131611131612131613131614131615131616131617131618131619131620131621131622131623131624131625131626131627131628131629131630131631131632131633131634131635131636131637131638131639131640131641131642131643131644131645131646131647131648131649131650131651131652131653131654131655131656131657131658131659131660131661131662131663131664131665131666131667131668131669131670131671131672131673131674131675131676131677131678131679131680131681131682131683131684131685131686131687131688131689131690131691131692131693131694131695131696131697131698131699131700131701131702131703131704131705131706131707131708131709131710131711131712131713131714131715131716131717131718131719131720131721131722131723131724131725131726131727131728131729131730131731131732131733131734131735131736131737131738131739131740131741131742131743131744131745131746131747131748131749131750131751131752131753131754131755131756131757131758131759131760131761131762131763131764131765131766131767131768131769131770131771131772131773131774131775131776131777131778131779131780131781131782131783131784131785131786131787131788131789131790131791131792131793131794131795131796131797131798131799131800131801131802131803131804131805131806131807131808131809131810131811131812131813131814131815131816131817131818131819131820131821131822131823131824131825131826131827131828131829131830131831131832131833131834131835131836131837131838131839131840131841131842131843131844131845131846131847131848131849131850131851131852131853131854131855131856131857131858131859131860131861131862131863131864131865131866131867131868131869131870131871131872131873131874131875131876131877131878131879131880131881131882131883131884131885131886131887131888131889131890131891131892131893131894131895131896131897131898131899131900131901131902131903131904131905131906131907131908131909131910131911131912131913131914131915131916131917131918131919131920131921131922131923131924131925131926131927131928131929131930131931131932131933131934131935131936131937131938131939131940131941131942131943131944131945131946131947131948131949131950131951131952131953131954131955131956131957131958131959131960131961131962131963131964131965131966131967131968131969131970131971131972131973131974131975131976131977131978131979131980131981131982131983131984131985131986131987131988131989131990131991131992131993131994131995131996131997131998131999132000132001132002132003132004132005132006132007132008132009132010132011132012132013132014132015132016132017132018132019132020132021132022132023132024132025132026132027132028132029132030132031132032132033132034132035132036132037132038132039132040132041132042132043132044132045132046132047132048132049132050132051132052132053132054132055132056132057132058132059132060132061132062132063132064132065132066132067132068132069132070132071132072132073132074132075132076132077132078132079132080132081132082132083132084132085132086132087132088132089132090132091132092132093132094132095132096132097132098132099132100132101132102132103132104132105132106132107132108132109132110132111132112132113132114132115132116132117132118132119132120132121132122132123132124132125132126132127132128132129132130132131132132132133132134132135132136132137132138132139132140132141132142132143132144132145132146132147132148132149132150132151132152132153132154132155132156132157132158132159132160132161132162132163132164132165132166132167132168132169132170132171132172132173132174132175132176132177132178132179132180132181132182132183132184132185132186132187132188132189132190132191132192132193132194132195132196132197132198132199132200132201132202132203132204132205132206132207132208132209132210132211132212132213132214132215132216132217132218132219132220132221132222132223132224132225132226132227132228132229132230132231132232132233132234132235132236132237132238132239132240132241132242132243132244132245132246132247132248132249132250132251132252132253132254132255132256132257132258132259132260132261132262132263132264132265132266132267132268132269132270132271132272132273132274132275132276132277132278132279132280132281132282132283132284132285132286132287132288132289132290132291132292132293132294132295132296132297132298132299132300132301132302132303132304132305132306132307132308132309132310132311132312132313132314132315132316132317132318132319132320132321132322132323132324132325132326132327132328132329132330132331132332132333132334132335132336132337132338132339132340132341132342132343132344132345132346132347132348132349132350132351132352132353132354132355132356132357132358132359132360132361132362132363132364132365132366132367132368132369132370132371132372132373132374132375132376132377132378132379132380132381132382132383132384132385132386132387132388132389132390132391132392132393132394132395132396132397132398132399132400132401132402132403132404132405132406132407132408132409132410132411132412132413132414132415132416132417132418132419132420132421132422132423132424132425132426132427132428132429132430132431132432132433132434132435132436132437132438132439132440132441132442132443132444132445132446132447132448132449132450132451132452132453132454132455132456132457132458132459132460132461132462132463132464132465132466132467132468132469132470132471132472132473132474132475132476132477132478132479132480132481132482132483132484132485132486132487132488132489132490132491132492132493132494132495132496132497132498132499132500132501132502132503132504132505132506132507132508132509132510132511132512132513132514132515132516132517132518132519132520132521132522132523132524132525132526132527132528132529132530132531132532132533132534132535132536132537132538132539132540132541132542132543132544132545132546132547132548132549132550132551132552132553132554132555132556132557132558132559132560132561132562132563132564132565132566132567132568132569132570132571132572132573132574132575132576132577132578132579132580132581132582132583132584132585132586132587132588132589132590132591132592132593132594132595132596132597132598132599132600132601132602132603132604132605132606132607132608132609132610132611132612132613132614132615132616132617132618132619132620132621132622132623132624132625132626132627132628132629132630132631132632132633132634132635132636132637132638132639132640132641132642132643132644132645132646132647132648132649132650132651132652132653132654132655132656132657132658132659132660132661132662132663132664132665132666132667132668132669132670132671132672132673132674132675132676132677132678132679132680132681132682132683132684132685132686132687132688132689132690132691132692132693132694132695132696132697132698132699132700132701132702132703132704132705132706132707132708132709132710132711132712132713132714132715132716132717132718132719132720132721132722132723132724132725132726132727132728132729132730132731132732132733132734132735132736132737132738132739132740132741132742132743132744132745132746132747132748132749132750132751132752132753132754132755132756132757132758132759132760132761132762132763132764132765132766132767132768132769132770132771132772132773132774132775132776132777132778132779132780132781132782132783132784132785132786132787132788132789132790132791132792132793132794132795132796132797132798132799132800132801132802132803132804132805132806132807132808132809132810132811132812132813132814132815132816132817132818132819132820132821132822132823132824132825132826132827132828132829132830132831132832132833132834132835132836132837132838132839132840132841132842132843132844132845132846132847132848132849132850132851132852132853132854132855132856132857132858132859132860132861132862132863132864132865132866132867132868132869132870132871132872132873132874132875132876132877132878132879132880132881132882132883132884132885132886132887132888132889132890132891132892132893132894132895132896132897132898132899132900132901132902132903132904132905132906132907132908132909132910132911132912132913132914132915132916132917132918132919132920132921132922132923132924132925132926132927132928132929132930132931132932132933132934132935132936132937132938132939132940132941132942132943132944132945132946132947132948132949132950132951132952132953132954132955132956132957132958132959132960132961132962132963132964132965132966132967132968132969132970132971132972132973132974132975132976132977132978132979132980132981132982132983132984132985132986132987132988132989132990132991132992132993132994132995132996132997132998132999133000133001133002133003133004133005133006133007133008133009133010133011133012133013133014133015133016133017133018133019133020133021133022133023133024133025133026133027133028133029133030133031133032133033133034133035133036133037133038133039133040133041133042133043133044133045133046133047133048133049133050133051133052133053133054133055133056133057133058133059133060133061133062133063133064133065133066133067133068133069133070133071133072133073133074133075133076133077133078133079133080133081133082133083133084133085133086133087133088133089133090133091133092133093133094133095133096133097133098133099133100133101133102133103133104133105133106133107133108133109133110133111133112133113133114133115133116133117133118133119133120133121133122133123133124133125133126133127133128133129133130133131133132133133133134133135133136133137133138133139133140133141133142133143133144133145133146133147133148133149133150133151133152133153133154133155133156133157133158133159133160133161133162133163133164133165133166133167133168133169133170133171133172133173133174133175133176133177133178133179133180133181133182133183133184133185133186133187133188133189133190133191133192133193133194133195133196133197133198133199133200133201133202133203133204133205133206133207133208133209133210133211133212133213133214133215133216133217133218133219133220133221133222133223133224133225133226133227133228133229133230133231133232133233133234133235133236133237133238133239133240133241133242133243133244133245133246133247133248133249133250133251133252133253133254133255133256133257133258133259133260133261133262133263133264133265133266133267133268133269133270133271133272133273133274133275133276133277133278133279133280133281133282133283133284133285133286133287133288133289133290133291133292133293133294133295133296133297133298133299133300133301133302133303133304133305133306133307133308133309133310133311133312133313133314133315133316133317133318133319133320133321133322133323133324133325133326133327133328133329133330133331133332133333133334133335133336133337133338133339133340133341133342133343133344133345133346133347133348133349133350133351133352133353133354133355133356133357133358133359133360133361133362133363133364133365133366133367133368133369133370133371133372133373133374133375133376133377133378133379133380133381133382133383133384133385133386133387133388133389133390133391133392133393133394133395133396133397133398133399133400133401133402133403133404133405133406133407133408133409133410133411133412133413133414133415133416133417133418133419133420133421133422133423133424133425133426133427133428133429133430133431133432133433133434133435133436133437133438133439133440133441133442133443133444133445133446133447133448133449133450133451133452133453133454133455133456133457133458133459133460133461133462133463133464133465133466133467133468133469133470133471133472133473133474133475133476133477133478133479133480133481133482133483133484133485133486133487133488133489133490133491133492133493133494133495133496133497133498133499133500133501133502133503133504133505133506133507133508133509133510133511133512133513133514133515133516133517133518133519133520133521133522133523133524133525133526133527133528133529133530133531133532133533133534133535133536133537133538133539133540133541133542133543133544133545133546133547133548133549133550133551133552133553133554133555133556133557133558133559133560133561133562133563133564133565133566133567133568133569133570133571133572133573133574133575133576133577133578133579133580133581133582133583133584133585133586133587133588133589133590133591133592133593133594133595133596133597133598133599133600133601133602133603133604133605133606133607133608133609133610133611133612133613133614133615133616133617133618133619133620133621133622133623133624133625133626133627133628133629133630133631133632133633133634133635133636133637133638133639133640133641133642133643133644133645133646133647133648133649133650133651133652133653133654133655133656133657133658133659133660133661133662133663133664133665133666133667133668133669133670133671133672133673133674133675133676133677133678133679133680133681133682133683133684133685133686133687133688133689133690133691133692133693133694133695133696133697133698133699133700133701133702133703133704133705133706133707133708133709133710133711133712133713133714133715133716133717133718133719133720133721133722133723133724133725133726133727133728133729133730133731133732133733133734133735133736133737133738133739133740133741133742133743133744133745133746133747133748133749133750133751133752133753133754133755133756133757133758133759133760133761133762133763133764133765133766133767133768133769133770133771133772133773133774133775133776133777133778133779133780133781133782133783133784133785133786133787133788133789133790133791133792133793133794133795133796133797133798133799133800133801133802133803133804133805133806133807133808133809133810133811133812133813133814133815133816133817133818133819133820133821133822133823133824133825133826133827133828133829133830133831133832133833133834133835133836133837133838133839133840133841133842133843133844133845133846133847133848133849133850133851133852133853133854133855133856133857133858133859133860133861133862133863133864133865133866133867133868133869133870133871133872133873133874133875133876133877133878133879133880133881133882133883133884133885133886133887133888133889133890133891133892133893133894133895133896133897133898133899133900133901133902133903133904133905133906133907133908133909133910133911133912133913133914133915133916133917133918133919133920133921133922133923133924133925133926133927133928133929133930133931133932133933133934133935133936133937133938133939133940133941133942133943133944133945133946133947133948133949133950133951133952133953133954133955133956133957133958133959133960133961133962133963133964133965133966133967133968133969133970133971133972133973133974133975133976133977133978133979133980133981133982133983133984133985133986133987133988133989133990133991133992133993133994133995133996133997133998133999134000134001134002134003134004134005134006134007134008134009134010134011134012134013134014134015134016134017134018134019134020134021134022134023134024134025134026134027134028134029134030134031134032134033134034134035134036134037134038134039134040134041134042134043134044134045134046134047134048134049134050134051134052134053134054134055134056134057134058134059134060134061134062134063134064134065134066134067134068134069134070134071134072134073134074134075134076134077134078134079134080134081134082134083134084134085134086134087134088134089134090134091134092134093134094134095134096134097134098134099134100134101134102134103134104134105134106134107134108134109134110134111134112134113134114134115134116134117134118134119134120134121134122134123134124134125134126134127134128134129134130134131134132134133134134134135134136134137134138134139134140134141134142134143134144134145134146134147134148134149134150134151134152134153134154134155134156134157134158134159134160134161134162134163134164134165134166134167134168134169134170134171134172134173134174134175134176134177134178134179134180134181134182134183134184134185134186134187134188134189134190134191134192134193134194134195134196134197134198134199134200134201134202134203134204134205134206134207134208134209134210134211134212134213134214134215134216134217134218134219134220134221134222134223134224134225134226134227134228134229134230134231134232134233134234134235134236134237134238134239134240134241134242134243134244134245134246134247134248134249134250134251134252134253134254134255134256134257134258134259134260134261134262134263134264134265134266134267134268134269134270134271134272134273134274134275134276134277134278134279134280134281134282134283134284134285134286134287134288134289134290134291134292134293134294134295134296134297134298134299134300134301134302134303134304134305134306134307134308134309134310134311134312134313134314134315134316134317134318134319134320134321134322134323134324134325134326134327134328134329134330134331134332134333134334134335134336134337134338134339134340134341134342134343134344134345134346134347134348134349134350134351134352134353134354134355134356134357134358134359134360134361134362134363134364134365134366134367134368134369134370134371134372134373134374134375134376134377134378134379134380134381134382134383134384134385134386134387134388134389134390134391134392134393134394134395134396134397134398134399134400134401134402134403134404134405134406134407134408134409134410134411134412134413134414134415134416134417134418134419134420134421134422134423134424134425134426134427134428134429134430134431134432134433134434134435134436134437134438134439134440134441134442134443134444134445134446134447134448134449134450134451134452134453134454134455134456134457134458134459134460134461134462134463134464134465134466134467134468134469134470134471134472134473134474134475134476134477134478134479134480134481134482134483134484134485134486134487134488134489134490134491134492134493134494134495134496134497134498134499134500134501134502134503134504134505134506134507134508134509134510134511134512134513134514134515134516134517134518134519134520134521134522134523134524134525134526134527134528134529134530134531134532134533134534134535134536134537134538134539134540134541134542134543134544134545134546134547134548134549134550134551134552134553134554134555134556134557134558134559134560134561134562134563134564134565134566134567134568134569134570134571134572134573134574134575134576134577134578134579134580134581134582134583134584134585134586134587134588134589134590134591134592134593134594134595134596134597134598134599134600134601134602134603134604134605134606134607134608134609134610134611134612134613134614134615134616134617134618134619134620134621134622134623134624134625134626134627134628134629134630134631134632134633134634134635134636134637134638134639134640134641134642134643134644134645134646134647134648134649134650134651134652134653134654134655134656134657134658134659134660134661134662134663134664134665134666134667134668134669134670134671134672134673134674134675134676134677134678134679134680134681134682134683134684134685134686134687134688134689134690134691134692134693134694134695134696134697134698134699134700134701134702134703134704134705134706134707134708134709134710134711134712134713134714134715134716134717134718134719134720134721134722134723134724134725134726134727134728134729134730134731134732134733134734134735134736134737134738134739134740134741134742134743134744134745134746134747134748134749134750134751134752134753134754134755134756134757134758134759134760134761134762134763134764134765134766134767134768134769134770134771134772134773134774134775134776134777134778134779134780134781134782134783134784134785134786134787134788134789134790134791134792134793134794134795134796134797134798134799134800134801134802134803134804134805134806134807134808134809134810134811134812134813134814134815134816134817134818134819134820134821134822134823134824134825134826134827134828134829134830134831134832134833134834134835134836134837134838134839134840134841134842134843134844134845134846134847134848134849134850134851134852134853134854134855134856134857134858134859134860134861134862134863134864134865134866134867134868134869134870134871134872134873134874134875134876134877134878134879134880134881134882134883134884134885134886134887134888134889134890134891134892134893134894134895134896134897134898134899134900134901134902134903134904134905134906134907134908134909134910134911134912134913134914134915134916134917134918134919134920134921134922134923134924134925134926134927134928134929134930134931134932134933134934134935134936134937134938134939134940134941134942134943134944134945134946134947134948134949134950134951134952134953134954134955134956134957134958134959134960134961134962134963134964134965134966134967134968134969134970134971134972134973134974134975134976134977134978134979134980134981134982134983134984134985134986134987134988134989134990134991134992134993134994134995134996134997134998134999135000135001135002135003135004135005135006135007135008135009135010135011135012135013135014135015135016135017135018135019135020135021135022135023135024135025135026135027135028135029135030135031135032135033135034135035135036135037135038135039135040135041135042135043135044135045135046135047135048135049135050135051135052135053135054135055135056135057135058135059135060135061135062135063135064135065135066135067135068135069135070135071135072135073135074135075135076135077135078135079135080135081135082135083135084135085135086135087135088135089135090135091135092135093135094135095135096135097135098135099135100135101135102135103135104135105135106135107135108135109135110135111135112135113135114135115135116135117135118135119135120135121135122135123135124135125135126135127135128135129135130135131135132135133135134135135135136135137135138135139135140135141135142135143135144135145135146135147135148135149135150135151135152135153135154135155135156135157135158135159135160135161135162135163135164135165135166135167135168135169135170135171135172135173135174135175135176135177135178135179135180135181135182135183135184135185135186135187135188135189135190135191135192135193135194135195135196135197135198135199135200135201135202135203135204135205135206135207135208135209135210135211135212135213135214135215135216135217135218135219135220135221135222135223135224135225135226135227135228135229135230135231135232135233135234135235135236135237135238135239135240135241135242135243135244135245135246135247135248135249135250135251135252135253135254135255135256135257135258135259135260135261135262135263135264135265135266135267135268135269135270135271135272135273135274135275135276135277135278135279135280135281135282135283135284135285135286135287135288135289135290135291135292135293135294135295135296135297135298135299135300135301135302135303135304135305135306135307135308135309135310135311135312135313135314135315135316135317135318135319135320135321135322135323135324135325135326135327135328135329135330135331135332135333135334135335135336135337135338135339135340135341135342135343135344135345135346135347135348135349135350135351135352135353135354135355135356135357135358135359135360135361135362135363135364135365135366135367135368135369135370135371135372135373135374135375135376135377135378135379135380135381135382135383135384135385135386135387135388135389135390135391135392135393135394135395135396135397135398135399135400135401135402135403135404135405135406135407135408135409135410135411135412135413135414135415135416135417135418135419135420135421135422135423135424135425135426135427135428135429135430135431135432135433135434135435135436135437135438135439135440135441135442135443135444135445135446135447135448135449135450135451135452135453135454135455135456135457135458135459135460135461135462135463135464135465135466135467135468135469135470135471135472135473135474135475135476135477135478135479135480135481135482135483135484135485135486135487135488135489135490135491135492135493135494135495135496135497135498135499135500135501135502135503135504135505135506135507135508135509135510135511135512135513135514135515135516135517135518135519135520135521135522135523135524135525135526135527135528135529135530135531135532135533135534135535135536135537135538135539135540135541135542135543135544135545135546135547135548135549135550135551135552135553135554135555135556135557135558135559135560135561135562135563135564135565135566135567135568135569135570135571135572135573135574135575135576135577135578135579135580135581135582135583135584135585135586135587135588135589135590135591135592135593135594135595135596135597135598135599135600135601135602135603135604135605135606135607135608135609135610135611135612135613135614135615135616135617135618135619135620135621135622135623135624135625135626135627135628135629135630135631135632135633135634135635135636135637135638135639135640135641135642135643135644135645135646135647135648135649135650135651135652135653135654135655135656135657135658135659135660135661135662135663135664135665135666135667135668135669135670135671135672135673135674135675135676135677135678135679135680135681135682135683135684135685135686135687135688135689135690135691135692135693135694135695135696135697135698135699135700135701135702135703135704135705135706135707135708135709135710135711135712135713135714135715135716135717135718135719135720135721135722135723135724135725135726135727135728135729135730135731135732135733135734135735135736135737135738135739135740135741135742135743135744135745135746135747135748135749135750135751135752135753135754135755135756135757135758135759135760135761135762135763135764135765135766135767135768135769135770135771135772135773135774135775135776135777135778135779135780135781135782135783135784135785135786135787135788135789135790135791135792135793135794135795135796135797135798135799135800135801135802135803135804135805135806135807135808135809135810135811135812135813135814135815135816135817135818135819135820135821135822135823135824135825135826135827135828135829135830135831135832135833135834135835135836135837135838135839135840135841135842135843135844135845135846135847135848135849135850135851135852135853135854135855135856135857135858135859135860135861135862135863135864135865135866135867135868135869135870135871135872135873135874135875135876135877135878135879135880135881135882135883135884135885135886135887135888135889135890135891135892135893135894135895135896135897135898135899135900135901135902135903135904135905135906135907135908135909135910135911135912135913135914135915135916135917135918135919135920135921135922135923135924135925135926135927135928135929135930135931135932135933135934135935135936135937135938135939135940135941135942135943135944135945135946135947135948135949135950135951135952135953135954135955135956135957135958135959135960135961135962135963135964135965135966135967135968135969135970135971135972135973135974135975135976135977135978135979135980135981135982135983135984135985135986135987135988135989135990135991135992135993135994135995135996135997135998135999136000136001136002136003136004136005136006136007136008136009136010136011136012136013136014136015136016136017136018136019136020136021136022136023136024136025136026136027136028136029136030136031136032136033136034136035136036136037136038136039136040136041136042136043136044136045136046136047136048136049136050136051136052136053136054136055136056136057136058136059136060136061136062136063136064136065136066136067136068136069136070136071136072136073136074136075136076136077136078136079136080136081136082136083136084136085136086136087136088136089136090136091136092136093136094136095136096136097136098136099136100136101136102136103136104136105136106136107136108136109136110136111136112136113136114136115136116136117136118136119136120136121136122136123136124136125136126136127136128136129136130136131136132136133136134136135136136136137136138136139136140136141136142136143136144136145136146136147136148136149136150136151136152136153136154136155136156136157136158136159136160136161136162136163136164136165136166136167136168136169136170136171136172136173136174136175136176136177136178136179136180136181136182136183136184136185136186136187136188136189136190136191136192136193136194136195136196136197136198136199136200136201136202136203136204136205136206136207136208136209136210136211136212136213136214136215136216136217136218136219136220136221136222136223136224136225136226136227136228136229136230136231136232136233136234136235136236136237136238136239136240136241136242136243136244136245136246136247136248136249136250136251136252136253136254136255136256136257136258136259136260136261136262136263136264136265136266136267136268136269136270136271136272136273136274136275136276136277136278136279136280136281136282136283136284136285136286136287136288136289136290136291136292136293136294136295136296136297136298136299136300136301136302136303136304136305136306136307136308136309136310136311136312136313136314136315136316136317136318136319136320136321136322136323136324136325136326136327136328136329136330136331136332136333136334136335136336136337136338136339136340136341136342136343136344136345136346136347136348136349136350136351136352136353136354136355136356136357136358136359136360136361136362136363136364136365136366136367136368136369136370136371136372136373136374136375136376136377136378136379136380136381136382136383136384136385136386136387136388136389136390136391136392136393136394136395136396136397136398136399136400136401136402136403136404136405136406136407136408136409136410136411136412136413136414136415136416136417136418136419136420136421136422136423136424136425136426136427136428136429136430136431136432136433136434136435136436136437136438136439136440136441136442136443136444136445136446136447136448136449136450136451136452136453136454136455136456136457136458136459136460136461136462136463136464136465136466136467136468136469136470136471136472136473136474136475136476136477136478136479136480136481136482136483136484136485136486136487136488136489136490136491136492136493136494136495136496136497136498136499136500136501136502136503136504136505136506136507136508136509136510136511136512136513136514136515136516136517136518136519136520136521136522136523136524136525136526136527136528136529136530136531136532136533136534136535136536136537136538136539136540136541136542136543136544136545136546136547136548136549136550136551136552136553136554136555136556136557136558136559136560136561136562136563136564136565136566136567136568136569136570136571136572136573136574136575136576136577136578136579136580136581136582136583136584136585136586136587136588136589136590136591136592136593136594136595136596136597136598136599136600136601136602136603136604136605136606136607136608136609136610136611136612136613136614136615136616136617136618136619136620136621136622136623136624136625136626136627136628136629136630136631136632136633136634136635136636136637136638136639136640136641136642136643136644136645136646136647136648136649136650136651136652136653136654136655136656136657136658136659136660136661136662136663136664136665136666136667136668136669136670136671136672136673136674136675136676136677136678136679136680136681136682136683136684136685136686136687136688136689136690136691136692136693136694136695136696136697136698136699136700136701136702136703136704136705136706136707136708136709136710136711136712136713136714136715136716136717136718136719136720136721136722136723136724136725136726136727136728136729136730136731136732136733136734136735136736136737136738136739136740136741136742136743136744136745136746136747136748136749136750136751136752136753136754136755136756136757136758136759136760136761136762136763136764136765136766136767136768136769136770136771136772136773136774136775136776136777136778136779136780136781136782136783136784136785136786136787136788136789136790136791136792136793136794136795136796136797136798136799136800136801136802136803136804136805136806136807136808136809136810136811136812136813136814136815136816136817136818136819136820136821136822136823136824136825136826136827136828136829136830136831136832136833136834136835136836136837136838136839136840136841136842136843136844136845136846136847136848136849136850136851136852136853136854136855136856136857136858136859136860136861136862136863136864136865136866136867136868136869136870136871136872136873136874136875136876136877136878136879136880136881136882136883136884136885136886136887136888136889136890136891136892136893136894136895136896136897136898136899136900136901136902136903136904136905136906136907136908136909136910136911136912136913136914136915136916136917136918136919136920136921136922136923136924136925136926136927136928136929136930136931136932136933136934136935136936136937136938136939136940136941136942136943136944136945136946136947136948136949136950136951136952136953136954136955136956136957136958136959136960136961136962136963136964136965136966136967136968136969136970136971136972136973136974136975136976136977136978136979136980136981136982136983136984136985136986136987136988136989136990136991136992136993136994136995136996136997136998136999137000137001137002137003137004137005137006137007137008137009137010137011137012137013137014137015137016137017137018137019137020137021137022137023137024137025137026137027137028137029137030137031137032137033137034137035137036137037137038137039137040137041137042137043137044137045137046137047137048137049137050137051137052137053137054137055137056137057137058137059137060137061137062137063137064137065137066137067137068137069137070137071137072137073137074137075137076137077137078137079137080137081137082137083137084137085137086137087137088137089137090137091137092137093137094137095137096137097137098137099137100137101137102137103137104137105137106137107137108137109137110137111137112137113137114137115137116137117137118137119137120137121137122137123137124137125137126137127137128137129137130137131137132137133137134137135137136137137137138137139137140137141137142137143137144137145137146137147137148137149137150137151137152137153137154137155137156137157137158137159137160137161137162137163137164137165137166137167137168137169137170137171137172137173137174137175137176137177137178137179137180137181137182137183137184137185137186137187137188137189137190137191137192137193137194137195137196137197137198137199137200137201137202137203137204137205137206137207137208137209137210137211137212137213137214137215137216137217137218137219137220137221137222137223137224137225137226137227137228137229137230137231137232137233137234137235137236137237137238137239137240137241137242137243137244137245137246137247137248137249137250137251137252137253137254137255137256137257137258137259137260137261137262137263137264137265137266137267137268137269137270137271137272137273137274137275137276137277137278137279137280137281137282137283137284137285137286137287137288137289137290137291137292137293137294137295137296137297137298137299137300137301137302137303137304137305137306137307137308137309137310137311137312137313137314137315137316137317137318137319137320137321137322137323137324137325137326137327137328137329137330137331137332137333137334137335137336137337137338137339137340137341137342137343137344137345137346137347137348137349137350137351137352137353137354137355137356137357137358137359137360137361137362137363137364137365137366137367137368137369137370137371137372137373137374137375137376137377137378137379137380137381137382137383137384137385137386137387137388137389137390137391137392137393137394137395137396137397137398137399137400137401137402137403137404137405137406137407137408137409137410137411137412137413137414137415137416137417137418137419137420137421137422137423137424137425137426137427137428137429137430137431137432137433137434137435137436137437137438137439137440137441137442137443137444137445137446137447137448137449137450137451137452137453137454137455137456137457137458137459137460137461137462137463137464137465137466137467137468137469137470137471137472137473137474137475137476137477137478137479137480137481137482137483137484137485137486137487137488137489137490137491137492137493137494137495137496137497137498137499137500137501137502137503137504137505137506137507137508137509137510137511137512137513137514137515137516137517137518137519137520137521137522137523137524137525137526137527137528137529137530137531137532137533137534137535137536137537137538137539137540137541137542137543137544137545137546137547137548137549137550137551137552137553137554137555137556137557137558137559137560137561137562137563137564137565137566137567137568137569137570137571137572137573137574137575137576137577137578137579137580137581137582137583137584137585137586137587137588137589137590137591137592137593137594137595137596137597137598137599137600137601137602137603137604137605137606137607137608137609137610137611137612137613137614137615137616137617137618137619137620137621137622137623137624137625137626137627137628137629137630137631137632137633137634137635137636137637137638137639137640137641137642137643137644137645137646137647137648137649137650137651137652137653137654137655137656137657137658137659137660137661137662137663137664137665137666137667137668137669137670137671137672137673137674137675137676137677137678137679137680137681137682137683137684137685137686137687137688137689137690137691137692137693137694137695137696137697137698137699137700137701137702137703137704137705137706137707137708137709137710137711137712137713137714137715137716137717137718137719137720137721137722137723137724137725137726137727137728137729137730137731137732137733137734137735137736137737137738137739137740137741137742137743137744137745137746137747137748137749137750137751137752137753137754137755137756137757137758137759137760137761137762137763137764137765137766137767137768137769137770137771137772137773137774137775137776137777137778137779137780137781137782137783137784137785137786137787137788137789137790137791137792137793137794137795137796137797137798137799137800137801137802137803137804137805137806137807137808137809137810137811137812137813137814137815137816137817137818137819137820137821137822137823137824137825137826137827137828137829137830137831137832137833137834137835137836137837137838137839137840137841137842137843137844137845137846137847137848137849137850137851137852137853137854137855137856137857137858137859137860137861137862137863137864137865137866137867137868137869137870137871137872137873137874137875137876137877137878137879137880137881137882137883137884137885137886137887137888137889137890137891137892137893137894137895137896137897137898137899137900137901137902137903137904137905137906137907137908137909137910137911137912137913137914137915137916137917137918137919137920137921137922137923137924137925137926137927137928137929137930137931137932137933137934137935137936137937137938137939137940137941137942137943137944137945137946137947137948137949137950137951137952137953137954137955137956137957137958137959137960137961137962137963137964137965137966137967137968137969137970137971137972137973137974137975137976137977137978137979137980137981137982137983137984137985137986137987137988137989137990137991137992137993137994137995137996137997137998137999138000138001138002138003138004138005138006138007138008138009138010138011138012138013138014138015138016138017138018138019138020138021138022138023138024138025138026138027138028138029138030138031138032138033138034138035138036138037138038138039138040138041138042138043138044138045138046138047138048138049138050138051138052138053138054138055138056138057138058138059138060138061138062138063138064138065138066138067138068138069138070138071138072138073138074138075138076138077138078138079138080138081138082138083138084138085138086138087138088138089138090138091138092138093138094138095138096138097138098138099138100138101138102138103138104138105138106138107138108138109138110138111138112138113138114138115138116138117138118138119138120138121138122138123138124138125138126138127138128138129138130138131138132138133138134138135138136138137138138138139138140138141138142138143138144138145138146138147138148138149138150138151138152138153138154138155138156138157138158138159138160138161138162138163138164138165138166138167138168138169138170138171138172138173138174138175138176138177138178138179138180138181138182138183138184138185138186138187138188138189138190138191138192138193138194138195138196138197138198138199138200138201138202138203138204138205138206138207138208138209138210138211138212138213138214138215138216138217138218138219138220138221138222138223138224138225138226138227138228138229138230138231138232138233138234138235138236138237138238138239138240138241138242138243138244138245138246138247138248138249138250138251138252138253138254138255138256138257138258138259138260138261138262138263138264138265138266138267138268138269138270138271138272138273138274138275138276138277138278138279138280138281138282138283138284138285138286138287138288138289138290138291138292138293138294138295138296138297138298138299138300138301138302138303138304138305138306138307138308138309138310138311138312138313138314138315138316138317138318138319138320138321138322138323138324138325138326138327138328138329138330138331138332138333138334138335138336138337138338138339138340138341138342138343138344138345138346138347138348138349138350138351138352138353138354138355138356138357138358138359138360138361138362138363138364138365138366138367138368138369138370138371138372138373138374138375138376138377138378138379138380138381138382138383138384138385138386138387138388138389138390138391138392138393138394138395138396138397138398138399138400138401138402138403138404138405138406138407138408138409138410138411138412138413138414138415138416138417138418138419138420138421138422138423138424138425138426138427138428138429138430138431138432138433138434138435138436138437138438138439138440138441138442138443138444138445138446138447138448138449138450138451138452138453138454138455138456138457138458138459138460138461138462138463138464138465138466138467138468138469138470138471138472138473138474138475138476138477138478138479138480138481138482138483138484138485138486138487138488138489138490138491138492138493138494138495138496138497138498138499138500138501138502138503138504138505138506138507138508138509138510138511138512138513138514138515138516138517138518138519138520138521138522138523138524138525138526138527138528138529138530138531138532138533138534138535138536138537138538138539138540138541138542138543138544138545138546138547138548138549138550138551138552138553138554138555138556138557138558138559138560138561138562138563138564138565138566138567138568138569138570138571138572138573138574138575138576138577138578138579138580138581138582138583138584138585138586138587138588138589138590138591138592138593138594138595138596138597138598138599138600138601138602138603138604138605138606138607138608138609138610138611138612138613138614138615138616138617138618138619138620138621138622138623138624138625138626138627138628138629138630138631138632138633138634138635138636138637138638138639138640138641138642138643138644138645138646138647138648138649138650138651138652138653138654138655138656138657138658138659138660138661138662138663138664138665138666138667138668138669138670138671138672138673138674138675138676138677138678138679138680138681138682138683138684138685138686138687138688138689138690138691138692138693138694138695138696138697138698138699138700138701138702138703138704138705138706138707138708138709138710138711138712138713138714138715138716138717138718138719138720138721138722138723138724138725138726138727138728138729138730138731138732138733138734138735138736138737138738138739138740138741138742138743138744138745138746138747138748138749138750138751138752138753138754138755138756138757138758138759138760138761138762138763138764138765138766138767138768138769138770138771138772138773138774138775138776138777138778138779138780138781138782138783138784138785138786138787138788138789138790138791138792138793138794138795138796138797138798138799138800138801138802138803138804138805138806138807138808138809138810138811138812138813138814138815138816138817138818138819138820138821138822138823138824138825138826138827138828138829138830138831138832138833138834138835138836138837138838138839138840138841138842138843138844138845138846138847138848138849138850138851138852138853138854138855138856138857138858138859138860138861138862138863138864138865138866138867138868138869138870138871138872138873138874138875138876138877138878138879138880138881138882138883138884138885138886138887138888138889138890138891138892138893138894138895138896138897138898138899138900138901138902138903138904138905138906138907138908138909138910138911138912138913138914138915138916138917138918138919138920138921138922138923138924138925138926138927138928138929138930138931138932138933138934138935138936138937138938138939138940138941138942138943138944138945138946138947138948138949138950138951138952138953138954138955138956138957138958138959138960138961138962138963138964138965138966138967138968138969138970138971138972138973138974138975138976138977138978138979138980138981138982138983138984138985138986138987138988138989138990138991138992138993138994138995138996138997138998138999139000139001139002139003139004139005139006139007139008139009139010139011139012139013139014139015139016139017139018139019139020139021139022139023139024139025139026139027139028139029139030139031139032139033139034139035139036139037139038139039139040139041139042139043139044139045139046139047139048139049139050139051139052139053139054139055139056139057139058139059139060139061139062139063139064139065139066139067139068139069139070139071139072139073139074139075139076139077139078139079139080139081139082139083139084139085139086139087139088139089139090139091139092139093139094139095139096139097139098139099139100139101139102139103139104139105139106139107139108139109139110139111139112139113139114139115139116139117139118139119139120139121139122139123139124139125139126139127139128139129139130139131139132139133139134139135139136139137139138139139139140139141139142139143139144139145139146139147139148139149139150139151139152139153139154139155139156139157139158139159139160139161139162139163139164139165139166139167139168139169139170139171139172139173139174139175139176139177139178139179139180139181139182139183139184139185139186139187139188139189139190139191139192139193139194139195139196139197139198139199139200139201139202139203139204139205139206139207139208139209139210139211139212139213139214139215139216139217139218139219139220139221139222139223139224139225139226139227139228139229139230139231139232139233139234139235139236139237139238139239139240139241139242139243139244139245139246139247139248139249139250139251139252139253139254139255139256139257139258139259139260139261139262139263139264139265139266139267139268139269139270139271139272139273139274139275139276139277139278139279139280139281139282139283139284139285139286139287139288139289139290139291139292139293139294139295139296139297139298139299139300139301139302139303139304139305139306139307139308139309139310139311139312139313139314139315139316139317139318139319139320139321139322139323139324139325139326139327139328139329139330139331139332139333139334139335139336139337139338139339139340139341139342139343139344139345139346139347139348139349139350139351139352139353139354139355139356139357139358139359139360139361139362139363139364139365139366139367139368139369139370139371139372139373139374139375139376139377139378139379139380139381139382139383139384139385139386139387139388139389139390139391139392139393139394139395139396139397139398139399139400139401139402139403139404139405139406139407139408139409139410139411139412139413139414139415139416139417139418139419139420139421139422139423139424139425139426139427139428139429139430139431139432139433139434139435139436139437139438139439139440139441139442139443139444139445139446139447139448139449139450139451139452139453139454139455139456139457139458139459139460139461139462139463139464139465139466139467139468139469139470139471139472139473139474139475139476139477139478139479139480139481139482139483139484139485139486139487139488139489139490139491139492139493139494139495139496139497139498139499139500139501139502139503139504139505139506139507139508139509139510139511139512139513139514139515139516139517139518139519139520139521139522139523139524139525139526139527139528139529139530139531139532139533139534139535139536139537139538139539139540139541139542139543139544139545139546139547139548139549139550139551139552139553139554139555139556139557139558139559139560139561139562139563139564139565139566139567139568139569139570139571139572139573139574139575139576139577139578139579139580139581139582139583139584139585139586139587139588139589139590139591139592139593139594139595139596139597139598139599139600139601139602139603139604139605139606139607139608139609139610139611139612139613139614139615139616139617139618139619139620139621139622139623139624139625139626139627139628139629139630139631139632139633139634139635139636139637139638139639139640139641139642139643139644139645139646139647139648139649139650139651139652139653139654139655139656139657139658139659139660139661139662139663139664139665139666139667139668139669139670139671139672139673139674139675139676139677139678139679139680139681139682139683139684139685139686139687139688139689139690139691139692139693139694139695139696139697139698139699139700139701139702139703139704139705139706139707139708139709139710139711139712139713139714139715139716139717139718139719139720139721139722139723139724139725139726139727139728139729139730139731139732139733139734139735139736139737139738139739139740139741139742139743139744139745139746139747139748139749139750139751139752139753139754139755139756139757139758139759139760139761139762139763139764139765139766139767139768139769139770139771139772139773139774139775139776139777139778139779139780139781139782139783139784139785139786139787139788139789139790139791139792139793139794139795139796139797139798139799139800139801139802139803139804139805139806139807139808139809139810139811139812139813139814139815139816139817139818139819139820139821139822139823139824139825139826139827139828139829139830139831139832139833139834139835139836139837139838139839139840139841139842139843139844139845139846139847139848139849139850139851139852139853139854139855139856139857139858139859139860139861139862139863139864139865139866139867139868139869139870139871139872139873139874139875139876139877139878139879139880139881139882139883139884139885139886139887139888139889139890139891139892139893139894139895139896139897139898139899139900139901139902139903139904139905139906139907139908139909139910139911139912139913139914139915139916139917139918139919139920139921139922139923139924139925139926139927139928139929139930139931139932139933139934139935139936139937139938139939139940139941139942139943139944139945139946139947139948139949139950139951139952139953139954139955139956139957139958139959139960139961139962139963139964139965139966139967139968139969139970139971139972139973139974139975139976139977139978139979139980139981139982139983139984139985139986139987139988139989139990139991139992139993139994139995139996139997139998139999140000140001140002140003140004140005140006140007140008140009140010140011140012140013140014140015140016140017140018140019140020140021140022140023140024140025140026140027140028140029140030140031140032140033140034140035140036140037140038140039140040140041140042140043140044140045140046140047140048140049140050140051140052140053140054140055140056140057140058140059140060140061140062140063140064140065140066140067140068140069140070140071140072140073140074140075140076140077140078140079140080140081140082140083140084140085140086140087140088140089140090140091140092140093140094140095140096140097140098140099140100140101140102140103140104140105140106140107140108140109140110140111140112140113140114140115140116140117140118140119140120140121140122140123140124140125140126140127140128140129140130140131140132140133140134140135140136140137140138140139140140140141140142140143140144140145140146140147140148140149140150140151140152140153140154140155140156140157140158140159140160140161140162140163140164140165140166140167140168140169140170140171140172140173140174140175140176140177140178140179140180140181140182140183140184140185140186140187140188140189140190140191140192140193140194140195140196140197140198140199140200140201140202140203140204140205140206140207140208140209140210140211140212140213140214140215140216140217140218140219140220140221140222140223140224140225140226140227140228140229140230140231140232140233140234140235140236140237140238140239140240140241140242140243140244140245140246140247140248140249140250140251140252140253140254140255140256140257140258140259140260140261140262140263140264140265140266140267140268140269140270140271140272140273140274140275140276140277140278140279140280140281140282140283140284140285140286140287140288140289140290140291140292140293140294140295140296140297140298140299140300140301140302140303140304140305140306140307140308140309140310140311140312140313140314140315140316140317140318140319140320140321140322140323140324140325140326140327140328140329140330140331140332140333140334140335140336140337140338140339140340140341140342140343140344140345140346140347140348140349140350140351140352140353140354140355140356140357140358140359140360140361140362140363140364140365140366140367140368140369140370140371140372140373140374140375140376140377140378140379140380140381140382140383140384140385140386140387140388140389140390140391140392140393140394140395140396140397140398140399140400140401140402140403140404140405140406140407140408140409140410140411140412140413140414140415140416140417140418140419140420140421140422140423140424140425140426140427140428140429140430140431140432140433140434140435140436140437140438140439140440140441140442140443140444140445140446140447140448140449140450140451140452140453140454140455140456140457140458140459140460140461140462140463140464140465140466140467140468140469140470140471140472140473140474140475140476140477140478140479140480140481140482140483140484140485140486140487140488140489140490140491140492140493140494140495140496140497140498140499140500140501140502140503140504140505140506140507140508140509140510140511140512140513140514140515140516140517140518140519140520140521140522140523140524140525140526140527140528140529140530140531140532140533140534140535140536140537140538140539140540140541140542140543140544140545140546140547140548140549140550140551140552140553140554140555140556140557140558140559140560140561140562140563140564140565140566140567140568140569140570140571140572140573140574140575140576140577140578140579140580140581140582140583140584140585140586140587140588140589140590140591140592140593140594140595140596140597140598140599140600140601140602140603140604140605140606140607140608140609140610140611140612140613140614140615140616140617140618140619140620140621140622140623140624140625140626140627140628140629140630140631140632140633140634140635140636140637140638140639140640140641140642140643140644140645140646140647140648140649140650140651140652140653140654140655140656140657140658140659140660140661140662140663140664140665140666140667140668140669140670140671140672140673140674140675140676140677140678140679140680140681140682140683140684140685140686140687140688140689140690140691140692140693140694140695140696140697140698140699140700140701140702140703140704140705140706140707140708140709140710140711140712140713140714140715140716140717140718140719140720140721140722140723140724140725140726140727140728140729140730140731140732140733140734140735140736140737140738140739140740140741140742140743140744140745140746140747140748140749140750140751140752140753140754140755140756140757140758140759140760140761140762140763140764140765140766140767140768140769140770140771140772140773140774140775140776140777140778140779140780140781140782140783140784140785140786140787140788140789140790140791140792140793140794140795140796140797140798140799140800140801140802140803140804140805140806140807140808140809140810140811140812140813140814140815140816140817140818140819140820140821140822140823140824140825140826140827140828140829140830140831140832140833140834140835140836140837140838140839140840140841140842140843140844140845140846140847140848140849140850140851140852140853140854140855140856140857140858140859140860140861140862140863140864140865140866140867140868140869140870140871140872140873140874140875140876140877140878140879140880140881140882140883140884140885140886140887140888140889140890140891140892140893140894140895140896140897140898140899140900140901140902140903140904140905140906140907140908140909140910140911140912140913140914140915140916140917140918140919140920140921140922140923140924140925140926140927140928140929140930140931140932140933140934140935140936140937140938140939140940140941140942140943140944140945140946140947140948140949140950140951140952140953140954140955140956140957140958140959140960140961140962140963140964140965140966140967140968140969140970140971140972140973140974140975140976140977140978140979140980140981140982140983140984140985140986140987140988140989140990140991140992140993140994140995140996140997140998140999141000141001141002141003141004141005141006141007141008141009141010141011141012141013141014141015141016141017141018141019141020141021141022141023141024141025141026141027141028141029141030141031141032141033141034141035141036141037141038141039141040141041141042141043141044141045141046141047141048141049141050141051141052141053141054141055141056141057141058141059141060141061141062141063141064141065141066141067141068141069141070141071141072141073141074141075141076141077141078141079141080141081141082141083141084141085141086141087141088141089141090141091141092141093141094141095141096141097141098141099141100141101141102141103141104141105141106141107141108141109141110141111141112141113141114141115141116141117141118141119141120141121141122141123141124141125141126141127141128141129141130141131141132141133141134141135141136141137141138141139141140141141141142141143141144141145141146141147141148141149141150141151141152141153141154141155141156141157141158141159141160141161141162141163141164141165141166141167141168141169141170141171141172141173141174141175141176141177141178141179141180141181141182141183141184141185141186141187141188141189141190141191141192141193141194141195141196141197141198141199141200141201141202141203141204141205141206141207141208141209141210141211141212141213141214141215141216141217141218141219141220141221141222141223141224141225141226141227141228141229141230141231141232141233141234141235141236141237141238141239141240141241141242141243141244141245141246141247141248141249141250141251141252141253141254141255141256141257141258141259141260141261141262141263141264141265141266141267141268141269141270141271141272141273141274141275141276141277141278141279141280141281141282141283141284141285141286141287141288141289141290141291141292141293141294141295141296141297141298141299141300141301141302141303141304141305141306141307141308141309141310141311141312141313141314141315141316141317141318141319141320141321141322141323141324141325141326141327141328141329141330141331141332141333141334141335141336141337141338141339141340141341141342141343141344141345141346141347141348141349141350141351141352141353141354141355141356141357141358141359141360141361141362141363141364141365141366141367141368141369141370141371141372141373141374141375141376141377141378141379141380141381141382141383141384141385141386141387141388141389141390141391141392141393141394141395141396141397141398141399141400141401141402141403141404141405141406141407141408141409141410141411141412141413141414141415141416141417141418141419141420141421141422141423141424141425141426141427141428141429141430141431141432141433141434141435141436141437141438141439141440141441141442141443141444141445141446141447141448141449141450141451141452141453141454141455141456141457141458141459141460141461141462141463141464141465141466141467141468141469141470141471141472141473141474141475141476141477141478141479141480141481141482141483141484141485141486141487141488141489141490141491141492141493141494141495141496141497141498141499141500141501141502141503141504141505141506141507141508141509141510141511141512141513141514141515141516141517141518141519141520141521141522141523141524141525141526141527141528141529141530141531141532141533141534141535141536141537141538141539141540141541141542141543141544141545141546141547141548141549141550141551141552141553141554141555141556141557141558141559141560141561141562141563141564141565141566141567141568141569141570141571141572141573141574141575141576141577141578141579141580141581141582141583141584141585141586141587141588141589141590141591141592141593141594141595141596141597141598141599141600141601141602141603141604141605141606141607141608141609141610141611141612141613141614141615141616141617141618141619141620141621141622141623141624141625141626141627141628141629141630141631141632141633141634141635141636141637141638141639141640141641141642141643141644141645141646141647141648141649141650141651141652141653141654141655141656141657141658141659141660141661141662141663141664141665141666141667141668141669141670141671141672141673141674141675141676141677141678141679141680141681141682141683141684141685141686141687141688141689141690141691141692141693141694141695141696141697141698141699141700141701141702141703141704141705141706141707141708141709141710141711141712141713141714141715141716141717141718141719141720141721141722141723141724141725141726141727141728141729141730141731141732141733141734141735141736141737141738141739141740141741141742141743141744141745141746141747141748141749141750141751141752141753141754141755141756141757141758141759141760141761141762141763141764141765141766141767141768141769141770141771141772141773141774141775141776141777141778141779141780141781141782141783141784141785141786141787141788141789141790141791141792141793141794141795141796141797141798141799141800141801141802141803141804141805141806141807141808141809141810141811141812141813141814141815141816141817141818141819141820141821141822141823141824141825141826141827141828141829141830141831141832141833141834141835141836141837141838141839141840141841141842141843141844141845141846141847141848141849141850141851141852141853141854141855141856141857141858141859141860141861141862141863141864141865141866141867141868141869141870141871141872141873141874141875141876141877141878141879141880141881141882141883141884141885141886141887141888141889141890141891141892141893141894141895141896141897141898141899141900141901141902141903141904141905141906141907141908141909141910141911141912141913141914141915141916141917141918141919141920141921141922141923141924141925141926141927141928141929141930141931141932141933141934141935141936141937141938141939141940141941141942141943141944141945141946141947141948141949141950141951141952141953141954141955141956141957141958141959141960141961141962141963141964141965141966141967141968141969141970141971141972141973141974141975141976141977141978141979141980141981141982141983141984141985141986141987141988141989141990141991141992141993141994141995141996141997141998141999142000142001142002142003142004142005142006142007142008142009142010142011142012142013142014142015142016142017142018142019142020142021142022142023142024142025142026142027142028142029142030142031142032142033142034142035142036142037142038142039142040142041142042142043142044142045142046142047142048142049142050142051142052142053142054142055142056142057142058142059142060142061142062142063142064142065142066142067142068142069142070142071142072142073142074142075142076142077142078142079142080142081142082142083142084142085142086142087142088142089142090142091142092142093142094142095142096142097142098142099142100142101142102142103142104142105142106142107142108142109142110142111142112142113142114142115142116142117142118142119142120142121142122142123142124142125142126142127142128142129142130142131142132142133142134142135142136142137142138142139142140142141142142142143142144142145142146142147142148142149142150142151142152142153142154142155142156142157142158142159142160142161142162142163142164142165142166142167142168142169142170142171142172142173142174142175142176142177142178142179142180142181142182142183142184142185142186142187142188142189142190142191142192142193142194142195142196142197142198142199142200142201142202142203142204142205142206142207142208142209142210142211142212142213142214142215142216142217142218142219142220142221142222142223142224142225142226142227142228142229142230142231142232142233142234142235142236142237142238142239142240142241142242142243142244142245142246142247142248142249142250142251142252142253142254142255142256142257142258142259142260142261142262142263142264142265142266142267142268142269142270142271142272142273142274142275142276142277142278142279142280142281142282142283142284142285142286142287142288142289142290142291142292142293142294142295142296142297142298142299142300142301142302142303142304142305142306142307142308142309142310142311142312142313142314142315142316142317142318142319142320142321142322142323142324142325142326142327142328142329142330142331142332142333142334142335142336142337142338142339142340142341142342142343142344142345142346142347142348142349142350142351142352142353142354142355142356142357142358142359142360142361142362142363142364142365142366142367142368142369142370142371142372142373142374142375142376142377142378142379142380142381142382142383142384142385142386142387142388142389142390142391142392142393142394142395142396142397142398142399142400142401142402142403142404142405142406142407142408142409142410142411142412142413142414142415142416142417142418142419142420142421142422142423142424142425142426142427142428142429142430142431142432142433142434142435142436142437142438142439142440142441142442142443142444142445142446142447142448142449142450142451142452142453142454142455142456142457142458142459142460142461142462142463142464142465142466142467142468142469142470142471142472142473142474142475142476142477142478142479142480142481142482142483142484142485142486142487142488142489142490142491142492142493142494142495142496142497142498142499142500142501142502142503142504142505142506142507142508142509142510142511142512142513142514142515142516142517142518142519142520142521142522142523142524142525142526142527142528142529142530142531142532142533142534142535142536142537142538142539142540142541142542142543142544142545142546142547142548142549142550142551142552142553142554142555142556142557142558142559142560142561142562142563142564142565142566142567142568142569142570142571142572142573142574142575142576142577142578142579142580142581142582142583142584142585142586142587142588142589142590142591142592142593142594142595142596142597142598142599142600142601142602142603142604142605142606142607142608142609142610142611142612142613142614142615142616142617142618142619142620142621142622142623142624142625142626142627142628142629142630142631142632142633142634142635142636142637142638142639142640142641142642142643142644142645142646142647142648142649142650142651142652142653142654142655142656142657142658142659142660142661142662142663142664142665142666142667142668142669142670142671142672142673142674142675142676142677142678142679142680142681142682142683142684142685142686142687142688142689142690142691142692142693142694142695142696142697142698142699142700142701142702142703142704142705142706142707142708142709142710142711142712142713142714142715142716142717142718142719142720142721142722142723142724142725142726142727142728142729142730142731142732142733142734142735142736142737142738142739142740142741142742142743142744142745142746142747142748142749142750142751142752142753142754142755142756142757142758142759142760142761142762142763142764142765142766142767142768142769142770142771142772142773142774142775142776142777142778142779142780142781142782142783142784142785142786142787142788142789142790142791142792142793142794142795142796142797142798142799142800142801142802142803142804142805142806142807142808142809142810142811142812142813142814142815142816142817142818142819142820142821142822142823142824142825142826142827142828142829142830142831142832142833142834142835142836142837142838142839142840142841142842142843142844142845142846142847142848142849142850142851142852142853142854142855142856142857142858142859142860142861142862142863142864142865142866142867142868142869142870142871142872142873142874142875142876142877142878142879142880142881142882142883142884142885142886142887142888142889142890142891142892142893142894142895142896142897142898142899142900142901142902142903142904142905142906142907142908142909142910142911142912142913142914142915142916142917142918142919142920142921142922142923142924142925142926142927142928142929142930142931142932142933142934142935142936142937142938142939142940142941142942142943142944142945142946142947142948142949142950142951142952142953142954142955142956142957142958142959142960142961142962142963142964142965142966142967142968142969142970142971142972142973142974142975142976142977142978142979142980142981142982142983142984142985142986142987142988142989142990142991142992142993142994142995142996142997142998142999143000143001143002143003143004143005143006143007143008143009143010143011143012143013143014143015143016143017143018143019143020143021143022143023143024143025143026143027143028143029143030143031143032143033143034143035143036143037143038143039143040143041143042143043143044143045143046143047143048143049143050143051143052143053143054143055143056143057143058143059143060143061143062143063143064143065143066143067143068143069143070143071143072143073143074143075143076143077143078143079143080143081143082143083143084143085143086143087143088143089143090143091143092143093143094143095143096143097143098143099143100143101143102143103143104143105143106143107143108143109143110143111143112143113143114143115143116143117143118143119143120143121143122143123143124143125143126143127143128143129143130143131143132143133143134143135143136143137143138143139143140143141143142143143143144143145143146143147143148143149143150143151143152143153143154143155143156143157143158143159143160143161143162143163143164143165143166143167143168143169143170143171143172143173143174143175143176143177143178143179143180143181143182143183143184143185143186143187143188143189143190143191143192143193143194143195143196143197143198143199143200143201143202143203143204143205143206143207143208143209143210143211143212143213143214143215143216143217143218143219143220143221143222143223143224143225143226143227143228143229143230143231143232143233143234143235143236143237143238143239143240143241143242143243143244143245143246143247143248143249143250143251143252143253143254143255143256143257143258143259143260143261143262143263143264143265143266143267143268143269143270143271143272143273143274143275143276143277143278143279143280143281143282143283143284143285143286143287143288143289143290143291143292143293143294143295143296143297143298143299143300143301143302143303143304143305143306143307143308143309143310143311143312143313143314143315143316143317143318143319143320143321143322143323143324143325143326143327143328143329143330143331143332143333143334143335143336143337143338143339143340143341143342143343143344143345143346143347143348143349143350143351143352143353143354143355143356143357143358143359143360143361143362143363143364143365143366143367143368143369143370143371143372143373143374143375143376143377143378143379143380143381143382143383143384143385143386143387143388143389143390143391143392143393143394143395143396143397143398143399143400143401143402143403143404143405143406143407143408143409143410143411143412143413143414143415143416143417143418143419143420143421143422143423143424143425143426143427143428143429143430143431143432143433143434143435143436143437143438143439143440143441143442143443143444143445143446143447143448143449143450143451143452143453143454143455143456143457143458143459143460143461143462143463143464143465143466143467143468143469143470143471143472143473143474143475143476143477143478143479143480143481143482143483143484143485143486143487143488143489143490143491143492143493143494143495143496143497143498143499143500143501143502143503143504143505143506143507143508143509143510143511143512143513143514143515143516143517143518143519143520143521143522143523143524143525143526143527143528143529143530143531143532143533143534143535143536143537143538143539143540143541143542143543143544143545143546143547143548143549143550143551143552143553143554143555143556143557143558143559143560143561143562143563143564143565143566143567143568143569143570143571143572143573143574143575143576143577143578143579143580143581143582143583143584143585143586143587143588143589143590143591143592143593143594143595143596143597143598143599143600143601143602143603143604143605143606143607143608143609143610143611143612143613143614143615143616143617143618143619143620143621143622143623143624143625143626143627143628143629143630143631143632143633143634143635143636143637143638143639143640143641143642143643143644143645143646143647143648143649143650143651143652143653143654143655143656143657143658143659143660143661143662143663143664143665143666143667143668143669143670143671143672143673143674143675143676143677143678143679143680143681143682143683143684143685143686143687143688143689143690143691143692143693143694143695143696143697143698143699143700143701143702143703143704143705143706143707143708143709143710143711143712143713143714143715143716143717143718143719143720143721143722143723143724143725143726143727143728143729143730143731143732143733143734143735143736143737143738143739143740143741143742143743143744143745143746143747143748143749143750143751143752143753143754143755143756143757143758143759143760143761143762143763143764143765143766143767143768143769143770143771143772143773143774143775143776143777143778143779143780143781143782143783143784143785143786143787143788143789143790143791143792143793143794143795143796143797143798143799143800143801143802143803143804143805143806143807143808143809143810143811143812143813143814143815143816143817143818143819143820143821143822143823143824143825143826143827143828143829143830143831143832143833143834143835143836143837143838143839143840143841143842143843143844143845143846143847143848143849143850143851143852143853143854143855143856143857143858143859143860143861143862143863143864143865143866143867143868143869143870143871143872143873143874143875143876143877143878143879143880143881143882143883143884143885143886143887143888143889143890143891143892143893143894143895143896143897143898143899143900143901143902143903143904143905143906143907143908143909143910143911143912143913143914143915143916143917143918143919143920143921143922143923143924143925143926143927143928143929143930143931143932143933143934143935143936143937143938143939143940143941143942143943143944143945143946143947143948143949143950143951143952143953143954143955143956143957143958143959143960143961143962143963143964143965143966143967143968143969143970143971143972143973143974143975143976143977143978143979143980143981143982143983143984143985143986143987143988143989143990143991143992143993143994143995143996143997143998143999144000144001144002144003144004144005144006144007144008144009144010144011144012144013144014144015144016144017144018144019144020144021144022144023144024144025144026144027144028144029144030144031144032144033144034144035144036144037144038144039144040144041144042144043144044144045144046144047144048144049144050144051144052144053144054144055144056144057144058144059144060144061144062144063144064144065144066144067144068144069144070144071144072144073144074144075144076144077144078144079144080144081144082144083144084144085144086144087144088144089144090144091144092144093144094144095144096144097144098144099144100144101144102144103144104144105144106144107144108144109144110144111144112144113144114144115144116144117144118144119144120144121144122144123144124144125144126144127144128144129144130144131144132144133144134144135144136144137144138144139144140144141144142144143144144144145144146144147144148144149144150144151144152144153144154144155144156144157144158144159144160144161144162144163144164144165144166144167144168144169144170144171144172144173144174144175144176144177144178144179144180144181144182144183144184144185144186144187144188144189144190144191144192144193144194144195144196144197144198144199144200144201144202144203144204144205144206144207144208144209144210144211144212144213144214144215144216144217144218144219144220144221144222144223144224144225144226144227144228144229144230144231144232144233144234144235144236144237144238144239144240144241144242144243144244144245144246144247144248144249144250144251144252144253144254144255144256144257144258144259144260144261144262144263144264144265144266144267144268144269144270144271144272144273144274144275144276144277144278144279144280144281144282144283144284144285144286144287144288144289144290144291144292144293144294144295144296144297144298144299144300144301144302144303144304144305144306144307144308144309144310144311144312144313144314144315144316144317144318144319144320144321144322144323144324144325144326144327144328144329144330144331144332144333144334144335144336144337144338144339144340144341144342144343144344144345144346144347144348144349144350144351144352144353144354144355144356144357144358144359144360144361144362144363144364144365144366144367144368144369144370144371144372144373144374144375144376144377144378144379144380144381144382144383144384144385144386144387144388144389144390144391144392144393144394144395144396144397144398144399144400144401144402144403144404144405144406144407144408144409144410144411144412144413144414144415144416144417144418144419144420144421144422144423144424144425144426144427144428144429144430144431144432144433144434144435144436144437144438144439144440144441144442144443144444144445144446144447144448144449144450144451144452144453144454144455144456144457144458144459144460144461144462144463144464144465144466144467144468144469144470144471144472144473144474144475144476144477144478144479144480144481144482144483144484144485144486144487144488144489144490144491144492144493144494144495144496144497144498144499144500144501144502144503144504144505144506144507144508144509144510144511144512144513144514144515144516144517144518144519144520144521144522144523144524144525144526144527144528144529144530144531144532144533144534144535144536144537144538144539144540144541144542144543144544144545144546144547144548144549144550144551144552144553144554144555144556144557144558144559144560144561144562144563144564144565144566144567144568144569144570144571144572144573144574144575144576144577144578144579144580144581144582144583144584144585144586144587144588144589144590144591144592144593144594144595144596144597144598144599144600144601144602144603144604144605144606144607144608144609144610144611144612144613144614144615144616144617144618144619144620144621144622144623144624144625144626144627144628144629144630144631144632144633144634144635144636144637144638144639144640144641144642144643144644144645144646144647144648144649144650144651144652144653144654144655144656144657144658144659144660144661144662144663144664144665144666144667144668144669144670144671144672144673144674144675144676144677144678144679144680144681144682144683144684144685144686144687144688144689144690144691144692144693144694144695144696144697144698144699144700144701144702144703144704144705144706144707144708144709144710144711144712144713144714144715144716144717144718144719144720144721144722144723144724144725144726144727144728144729144730144731144732144733144734144735144736144737144738144739144740144741144742144743144744144745144746144747144748144749144750144751144752144753144754144755144756144757144758144759144760144761144762144763144764144765144766144767144768144769144770144771144772144773144774144775144776144777144778144779144780144781144782144783144784144785144786144787144788144789144790144791144792144793144794144795144796144797144798144799144800144801144802144803144804144805144806144807144808144809144810144811144812144813144814144815144816144817144818144819144820144821144822144823144824144825144826144827144828144829144830144831144832144833144834144835144836144837144838144839144840144841144842144843144844144845144846144847144848144849144850144851144852144853144854144855144856144857144858144859144860144861144862144863144864144865144866144867144868144869144870144871144872144873144874144875144876144877144878144879144880144881144882144883144884144885144886144887144888144889144890144891144892144893144894144895144896144897144898144899144900144901144902144903144904144905144906144907144908144909144910144911144912144913144914144915144916144917144918144919144920144921144922144923144924144925144926144927144928144929144930144931144932144933144934144935144936144937144938144939144940144941144942144943144944144945144946144947144948144949144950144951144952144953144954144955144956144957144958144959144960144961144962144963144964144965144966144967144968144969144970144971144972144973144974144975144976144977144978144979144980144981144982144983144984144985144986144987144988144989144990144991144992144993144994144995144996144997144998144999145000145001145002145003145004145005145006145007145008145009145010145011145012145013145014145015145016145017145018145019145020145021145022145023145024145025145026145027145028145029145030145031145032145033145034145035145036145037145038145039145040145041145042145043145044145045145046145047145048145049145050145051145052145053145054145055145056145057145058145059145060145061145062145063145064145065145066145067145068145069145070145071145072145073145074145075145076145077145078145079145080145081145082145083145084145085145086145087145088145089145090145091145092145093145094145095145096145097145098145099145100145101145102145103145104145105145106145107145108145109145110145111145112145113145114145115145116145117145118145119145120145121145122145123145124145125145126145127145128145129145130145131145132145133145134145135145136145137145138145139145140145141145142145143145144145145145146145147145148145149145150145151145152145153145154145155145156145157145158145159145160145161145162145163145164145165145166145167145168145169145170145171145172145173145174145175145176145177145178145179145180145181145182145183145184145185145186145187145188145189145190145191145192145193145194145195145196145197145198145199145200145201145202145203145204145205145206145207145208145209145210145211145212145213145214145215145216145217145218145219145220145221145222145223145224145225145226145227145228145229145230145231145232145233145234145235145236145237145238145239145240145241145242145243145244145245145246145247145248145249145250145251145252145253145254145255145256145257145258145259145260145261145262145263145264145265145266145267145268145269145270145271145272145273145274145275145276145277145278145279145280145281145282145283145284145285145286145287145288145289145290145291145292145293145294145295145296145297145298145299145300145301145302145303145304145305145306145307145308145309145310145311145312145313145314145315145316145317145318145319145320145321145322145323145324145325145326145327145328145329145330145331145332145333145334145335145336145337145338145339145340145341145342145343145344145345145346145347145348145349145350145351145352145353145354145355145356145357145358145359145360145361145362145363145364145365145366145367145368145369145370145371145372145373145374145375145376145377145378145379145380145381145382145383145384145385145386145387145388145389145390145391145392145393145394145395145396145397145398145399145400145401145402145403145404145405145406145407145408145409145410145411145412145413145414145415145416145417145418145419145420145421145422145423145424145425145426145427145428145429145430145431145432145433145434145435145436145437145438145439145440145441145442145443145444145445145446145447145448145449145450145451145452145453145454145455145456145457145458145459145460145461145462145463145464145465145466145467145468145469145470145471145472145473145474145475145476145477145478145479145480145481145482145483145484145485145486145487145488145489145490145491145492145493145494145495145496145497145498145499145500145501145502145503145504145505145506145507145508145509145510145511145512145513145514145515145516145517145518145519145520145521145522145523145524145525145526145527145528145529145530145531145532145533145534145535145536145537145538145539145540145541145542145543145544145545145546145547145548145549145550145551145552145553145554145555145556145557145558145559145560145561145562145563145564145565145566145567145568145569145570145571145572145573145574145575145576145577145578145579145580145581145582145583145584145585145586145587145588145589145590145591145592145593145594145595145596145597145598145599145600145601145602145603145604145605145606145607145608145609145610145611145612145613145614145615145616145617145618145619145620145621145622145623145624145625145626145627145628145629145630145631145632145633145634145635145636145637145638145639145640145641145642145643145644145645145646145647145648145649145650145651145652145653145654145655145656145657145658145659145660145661145662145663145664145665145666145667145668145669145670145671145672145673145674145675145676145677145678145679145680145681145682145683145684145685145686145687145688145689145690145691145692145693145694145695145696145697145698145699145700145701145702145703145704145705145706145707145708145709145710145711145712145713145714145715145716145717145718145719145720145721145722145723145724145725145726145727145728145729145730145731145732145733145734145735145736145737145738145739145740145741145742145743145744145745145746145747145748145749145750145751145752145753145754145755145756145757145758145759145760145761145762145763145764145765145766145767145768145769145770145771145772145773145774145775145776145777145778145779145780145781145782145783145784145785145786145787145788145789145790145791145792145793145794145795145796145797145798145799145800145801145802145803145804145805145806145807145808145809145810145811145812145813145814145815145816145817145818145819145820145821145822145823145824145825145826145827145828145829145830145831145832145833145834145835145836145837145838145839145840145841145842145843145844145845145846145847145848145849145850145851145852145853145854145855145856145857145858145859145860145861145862145863145864145865145866145867145868145869145870145871145872145873145874145875145876145877145878145879145880145881145882145883145884145885145886145887145888145889145890145891145892145893145894145895145896145897145898145899145900145901145902145903145904145905145906145907145908145909145910145911145912145913145914145915145916145917145918145919145920145921145922145923145924145925145926145927145928145929145930145931145932145933145934145935145936145937145938145939145940145941145942145943145944145945145946145947145948145949145950145951145952145953145954145955145956145957145958145959145960145961145962145963145964145965145966145967145968145969145970145971145972145973145974145975145976145977145978145979145980145981145982145983145984145985145986145987145988145989145990145991145992145993145994145995145996145997145998145999146000146001146002146003146004146005146006146007146008146009146010146011146012146013146014146015146016146017146018146019146020146021146022146023146024146025146026146027146028146029146030146031146032146033146034146035146036146037146038146039146040146041146042146043146044146045146046146047146048146049146050146051146052146053146054146055146056146057146058146059146060146061146062146063146064146065146066146067146068146069146070146071146072146073146074146075146076146077146078146079146080146081146082146083146084146085146086146087146088146089146090146091146092146093146094146095146096146097146098146099146100146101146102146103146104146105146106146107146108146109146110146111146112146113146114146115146116146117146118146119146120146121146122146123146124146125146126146127146128146129146130146131146132146133146134146135146136146137146138146139146140146141146142146143146144146145146146146147146148146149146150146151146152146153146154146155146156146157146158146159146160146161146162146163146164146165146166146167146168146169146170146171146172146173146174146175146176146177146178146179146180146181146182146183146184146185146186146187146188146189146190146191146192146193146194146195146196146197146198146199146200146201146202146203146204146205146206146207146208146209146210146211146212146213146214146215146216146217146218146219146220146221146222146223146224146225146226146227146228146229146230146231146232146233146234146235146236146237146238146239146240146241146242146243146244146245146246146247146248146249146250146251146252146253146254146255146256146257146258146259146260146261146262146263146264146265146266146267146268146269146270146271146272146273146274146275146276146277146278146279146280146281146282146283146284146285146286146287146288146289146290146291146292146293146294146295146296146297146298146299146300146301146302146303146304146305146306146307146308146309146310146311146312146313146314146315146316146317146318146319146320146321146322146323146324146325146326146327146328146329146330146331146332146333146334146335146336146337146338146339146340146341146342146343146344146345146346146347146348146349146350146351146352146353146354146355146356146357146358146359146360146361146362146363146364146365146366146367146368146369146370146371146372146373146374146375146376146377146378146379146380146381146382146383146384146385146386146387146388146389146390146391146392146393146394146395146396146397146398146399146400146401146402146403146404146405146406146407146408146409146410146411146412146413146414146415146416146417146418146419146420146421146422146423146424146425146426146427146428146429146430146431146432146433146434146435146436146437146438146439146440146441146442146443146444146445146446146447146448146449146450146451146452146453146454146455146456146457146458146459146460146461146462146463146464146465146466146467146468146469146470146471146472146473146474146475146476146477146478146479146480146481146482146483146484146485146486146487146488146489146490146491146492146493146494146495146496146497146498146499146500146501146502146503146504146505146506146507146508146509146510146511146512146513146514146515146516146517146518146519146520146521146522146523146524146525146526146527146528146529146530146531146532146533146534146535146536146537146538146539146540146541146542146543146544146545146546146547146548146549146550146551146552146553146554146555146556146557146558146559146560146561146562146563146564146565146566146567146568146569146570146571146572146573146574146575146576146577146578146579146580146581146582146583146584146585146586146587146588146589146590146591146592146593146594146595146596146597146598146599146600146601146602146603146604146605146606146607146608146609146610146611146612146613146614146615146616146617146618146619146620146621146622146623146624146625146626146627146628146629146630146631146632146633146634146635146636146637146638146639146640146641146642146643146644146645146646146647146648146649146650146651146652146653146654146655146656146657146658146659146660146661146662146663146664146665146666146667146668146669146670146671146672146673146674146675146676146677146678146679146680146681146682146683146684146685146686146687146688146689146690146691146692146693146694146695146696146697146698146699146700146701146702146703146704146705146706146707146708146709146710146711146712146713146714146715146716146717146718146719146720146721146722146723146724146725146726146727146728146729146730146731146732146733146734146735146736146737146738146739146740146741146742146743146744146745146746146747146748146749146750146751146752146753146754146755146756146757146758146759146760146761146762146763146764146765146766146767146768146769146770146771146772146773146774146775146776146777146778146779146780146781146782146783146784146785146786146787146788146789146790146791146792146793146794146795146796146797146798146799146800146801146802146803146804146805146806146807146808146809146810146811146812146813146814146815146816146817146818146819146820146821146822146823146824146825146826146827146828146829146830146831146832146833146834146835146836146837146838146839146840146841146842146843146844146845146846146847146848146849146850146851146852146853146854146855146856146857146858146859146860146861146862146863146864146865146866146867146868146869146870146871146872146873146874146875146876146877146878146879146880146881146882146883146884146885146886146887146888146889146890146891146892146893146894146895146896146897146898146899146900146901146902146903146904146905146906146907146908146909146910146911146912146913146914146915146916146917146918146919146920146921146922146923146924146925146926146927146928146929146930146931146932146933146934146935146936146937146938146939146940146941146942146943146944146945146946146947146948146949146950146951146952146953146954146955146956146957146958146959146960146961146962146963146964146965146966146967146968146969146970146971146972146973146974146975146976146977146978146979146980146981146982146983146984146985146986146987146988146989146990146991146992146993146994146995146996146997146998146999147000147001147002147003147004147005147006147007147008147009147010147011147012147013147014147015147016147017147018147019147020147021147022147023147024147025147026147027147028147029147030147031147032147033147034147035147036147037147038147039147040147041147042147043147044147045147046147047147048147049147050147051147052147053147054147055147056147057147058147059147060147061147062147063147064147065147066147067147068147069147070147071147072147073147074147075147076147077147078147079147080147081147082147083147084147085147086147087147088147089147090147091147092147093147094147095147096147097147098147099147100147101147102147103147104147105147106147107147108147109147110147111147112147113147114147115147116147117147118147119147120147121147122147123147124147125147126147127147128147129147130147131147132147133147134147135147136147137147138147139147140147141147142147143147144147145147146147147147148147149147150147151147152147153147154147155147156147157147158147159147160147161147162147163147164147165147166147167147168147169147170147171147172147173147174147175147176147177147178147179147180147181147182147183147184147185147186147187147188147189147190147191147192147193147194147195147196147197147198147199147200147201147202147203147204147205147206147207147208147209147210147211147212147213147214147215147216147217147218147219147220147221147222147223147224147225147226147227147228147229147230147231147232147233147234147235147236147237147238147239147240147241147242147243147244147245147246147247147248147249147250147251147252147253147254147255147256147257147258147259147260147261147262147263147264147265147266147267147268147269147270147271147272147273147274147275147276147277147278147279147280147281147282147283147284147285147286147287147288147289147290147291147292147293147294147295147296147297147298147299147300147301147302147303147304147305147306147307147308147309147310147311147312147313147314147315147316147317147318147319147320147321147322147323147324147325147326147327147328147329147330147331147332147333147334147335147336147337147338147339147340147341147342147343147344147345147346147347147348147349147350147351147352147353147354147355147356147357147358147359147360147361147362147363147364147365147366147367147368147369147370147371147372147373147374147375147376147377147378147379147380147381147382147383147384147385147386147387147388147389147390147391147392147393147394147395147396147397147398147399147400147401147402147403147404147405147406147407147408147409147410147411147412147413147414147415147416147417147418147419147420147421147422147423147424147425147426147427147428147429147430147431147432147433147434147435147436147437147438147439147440147441147442147443147444147445147446147447147448147449147450147451147452147453147454147455147456147457147458147459147460147461147462147463147464147465147466147467147468147469147470147471147472147473147474147475147476147477147478147479147480147481147482147483147484147485147486147487147488147489147490147491147492147493147494147495147496147497147498147499147500147501147502147503147504147505147506147507147508147509147510147511147512147513147514147515147516147517147518147519147520147521147522147523147524147525147526147527147528147529147530147531147532147533147534147535147536147537147538147539147540147541147542147543147544147545147546147547147548147549147550147551147552147553147554147555147556147557147558147559147560147561147562147563147564147565147566147567147568147569147570147571147572147573147574147575147576147577147578147579147580147581147582147583147584147585147586147587147588147589147590147591147592147593147594147595147596147597147598147599147600147601147602147603147604147605147606147607147608147609147610147611147612147613147614147615147616147617147618147619147620147621147622147623147624147625147626147627147628147629147630147631147632147633147634147635147636147637147638147639147640147641147642147643147644147645147646147647147648147649147650147651147652147653147654147655147656147657147658147659147660147661147662147663147664147665147666147667147668147669147670147671147672147673147674147675147676147677147678147679147680147681147682147683147684147685147686147687147688147689147690147691147692147693147694147695147696147697147698147699147700147701147702147703147704147705147706147707147708147709147710147711147712147713147714147715147716147717147718147719147720147721147722147723147724147725147726147727147728147729147730147731147732147733147734147735147736147737147738147739147740147741147742147743147744147745147746147747147748147749147750147751147752147753147754147755147756147757147758147759147760147761147762147763147764147765147766147767147768147769147770147771147772147773147774147775147776147777147778147779147780147781147782147783147784147785147786147787147788147789147790147791147792147793147794147795147796147797147798147799147800147801147802147803147804147805147806147807147808147809147810147811147812147813147814147815147816147817147818147819147820147821147822147823147824147825147826147827147828147829147830147831147832147833147834147835147836147837147838147839147840147841147842147843147844147845147846147847147848147849147850147851147852147853147854147855147856147857147858147859147860147861147862147863147864147865147866147867147868147869147870147871147872147873147874147875147876147877147878147879147880147881147882147883147884147885147886147887147888147889147890147891147892147893147894147895147896147897147898147899147900147901147902147903147904147905147906147907147908147909147910147911147912147913147914147915147916147917147918147919147920147921147922147923147924147925147926147927147928147929147930147931147932147933147934147935147936147937147938147939147940147941147942147943147944147945147946147947147948147949147950147951147952147953147954147955147956147957147958147959147960147961147962147963147964147965147966147967147968147969147970147971147972147973147974147975147976147977147978147979147980147981147982147983147984147985147986147987147988147989147990147991147992147993147994147995147996147997147998147999148000148001148002148003148004148005148006148007148008148009148010148011148012148013148014148015148016148017148018148019148020148021148022148023148024148025148026148027148028148029148030148031148032148033148034148035148036148037148038148039148040148041148042148043148044148045148046148047148048148049148050148051148052148053148054148055148056148057148058148059148060148061148062148063148064148065148066148067148068148069148070148071148072148073148074148075148076148077148078148079148080148081148082148083148084148085148086148087148088148089148090148091148092148093148094148095148096148097148098148099148100148101148102148103148104148105148106148107148108148109148110148111148112148113148114148115148116148117148118148119148120148121148122148123148124148125148126148127148128148129148130148131148132148133148134148135148136148137148138148139148140148141148142148143148144148145148146148147148148148149148150148151148152148153148154148155148156148157148158148159148160148161148162148163148164148165148166148167148168148169148170148171148172148173148174148175148176148177148178148179148180148181148182148183148184148185148186148187148188148189148190148191148192148193148194148195148196148197148198148199148200148201148202148203148204148205148206148207148208148209148210148211148212148213148214148215148216148217148218148219148220148221148222148223148224148225148226148227148228148229148230148231148232148233148234148235148236148237148238148239148240148241148242148243148244148245148246148247148248148249148250148251148252148253148254148255148256148257148258148259148260148261148262148263148264148265148266148267148268148269148270148271148272148273148274148275148276148277148278148279148280148281148282148283148284148285148286148287148288148289148290148291148292148293148294148295148296148297148298148299148300148301148302148303148304148305148306148307148308148309148310148311148312148313148314148315148316148317148318148319148320148321148322148323148324148325148326148327148328148329148330148331148332148333148334148335148336148337148338148339148340148341148342148343148344148345148346148347148348148349148350148351148352148353148354148355148356148357148358148359148360148361148362148363148364148365148366148367148368148369148370148371148372148373148374148375148376148377148378148379148380148381148382148383148384148385148386148387148388148389148390148391148392148393148394148395148396148397148398148399148400148401148402148403148404148405148406148407148408148409148410148411148412148413148414148415148416148417148418148419148420148421148422148423148424148425148426148427148428148429148430148431148432148433148434148435148436148437148438148439148440148441148442148443148444148445148446148447148448148449148450148451148452148453148454148455148456148457148458148459148460148461148462148463148464148465148466148467148468148469148470148471148472148473148474148475148476148477148478148479148480148481148482148483148484148485148486148487148488148489148490148491148492148493148494148495148496148497148498148499148500148501148502148503148504148505148506148507148508148509148510148511148512148513148514148515148516148517148518148519148520148521148522148523148524148525148526148527148528148529148530148531148532148533148534148535148536148537148538148539148540148541148542148543148544148545148546148547148548148549148550148551148552148553148554148555148556148557148558148559148560148561148562148563148564148565148566148567148568148569148570148571148572148573148574148575148576148577148578148579148580148581148582148583148584148585148586148587148588148589148590148591148592148593148594148595148596148597148598148599148600148601148602148603148604148605148606148607148608148609148610148611148612148613148614148615148616148617148618148619148620148621148622148623148624148625148626148627148628148629148630148631148632148633148634148635148636148637148638148639148640148641148642148643148644148645148646148647148648148649148650148651148652148653148654148655148656148657148658148659148660148661148662148663148664148665148666148667148668148669148670148671148672148673148674148675148676148677148678148679148680148681148682148683148684148685148686148687148688148689148690148691148692148693148694148695148696148697148698148699148700148701148702148703148704148705148706148707148708148709148710148711148712148713148714148715148716148717148718148719148720148721148722148723148724148725148726148727148728148729148730148731148732148733148734148735148736148737148738148739148740148741148742148743148744148745148746148747148748148749148750148751148752148753148754148755148756148757148758148759148760148761148762148763148764148765148766148767148768148769148770148771148772148773148774148775148776148777148778148779148780148781148782148783148784148785148786148787148788148789148790148791148792148793148794148795148796148797148798148799148800148801148802148803148804148805148806148807148808148809148810148811148812148813148814148815148816148817148818148819148820148821148822148823148824148825148826148827148828148829148830148831148832148833148834148835148836148837148838148839148840148841148842148843148844148845148846148847148848148849148850148851148852148853148854148855148856148857148858148859148860148861148862148863148864148865148866148867148868148869148870148871148872148873148874148875148876148877148878148879148880148881148882148883148884148885148886148887148888148889148890148891148892148893148894148895148896148897148898148899148900148901148902148903148904148905148906148907148908148909148910148911148912148913148914148915148916148917148918148919148920148921148922148923148924148925148926148927148928148929148930148931148932148933148934148935148936148937148938148939148940148941148942148943148944148945148946148947148948148949148950148951148952148953148954148955148956148957148958148959148960148961148962148963148964148965148966148967148968148969148970148971148972148973148974148975148976148977148978148979148980148981148982148983148984148985148986148987148988148989148990148991148992148993148994148995148996148997148998148999149000149001149002149003149004149005149006149007149008149009149010149011149012149013149014149015149016149017149018149019149020149021149022149023149024149025149026149027149028149029149030149031149032149033149034149035149036149037149038149039149040149041149042149043149044149045149046149047149048149049149050149051149052149053149054149055149056149057149058149059149060149061149062149063149064149065149066149067149068149069149070149071149072149073149074149075149076149077149078149079149080149081149082149083149084149085149086149087149088149089149090149091149092149093149094149095149096149097149098149099149100149101149102149103149104149105149106149107149108149109149110149111149112149113149114149115149116149117149118149119149120149121149122149123149124149125149126149127149128149129149130149131149132149133149134149135149136149137149138149139149140149141149142149143149144149145149146149147149148149149149150149151149152149153149154149155149156149157149158149159149160149161149162149163149164149165149166149167149168149169149170149171149172149173149174149175149176149177149178149179149180149181149182149183149184149185149186149187149188149189149190149191149192149193149194149195149196149197149198149199149200149201149202149203149204149205149206149207149208149209149210149211149212149213149214149215149216149217149218149219149220149221149222149223149224149225149226149227149228149229149230149231149232149233149234149235
  1. (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-vendors"],{
  2. /***/ "./node_modules/_@babel_runtime@7.19.0@@babel/runtime/helpers/esm/interopRequireWildcard.js":
  3. /*!**************************************************************************************************!*\
  4. !*** ./node_modules/_@babel_runtime@7.19.0@@babel/runtime/helpers/esm/interopRequireWildcard.js ***!
  5. \**************************************************************************************************/
  6. /*! exports provided: default */
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _interopRequireWildcard; });
  11. /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/_@babel_runtime@7.19.0@@babel/runtime/helpers/esm/typeof.js");
  12. function _getRequireWildcardCache(nodeInterop) {
  13. if (typeof WeakMap !== "function") return null;
  14. var cacheBabelInterop = new WeakMap();
  15. var cacheNodeInterop = new WeakMap();
  16. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  17. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  18. })(nodeInterop);
  19. }
  20. function _interopRequireWildcard(obj, nodeInterop) {
  21. if (!nodeInterop && obj && obj.__esModule) {
  22. return obj;
  23. }
  24. if (obj === null || Object(_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(obj) !== "object" && typeof obj !== "function") {
  25. return {
  26. "default": obj
  27. };
  28. }
  29. var cache = _getRequireWildcardCache(nodeInterop);
  30. if (cache && cache.has(obj)) {
  31. return cache.get(obj);
  32. }
  33. var newObj = {};
  34. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  35. for (var key in obj) {
  36. if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  37. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  38. if (desc && (desc.get || desc.set)) {
  39. Object.defineProperty(newObj, key, desc);
  40. } else {
  41. newObj[key] = obj[key];
  42. }
  43. }
  44. }
  45. newObj["default"] = obj;
  46. if (cache) {
  47. cache.set(obj, newObj);
  48. }
  49. return newObj;
  50. }
  51. /***/ }),
  52. /***/ "./node_modules/_@babel_runtime@7.19.0@@babel/runtime/helpers/esm/typeof.js":
  53. /*!**********************************************************************************!*\
  54. !*** ./node_modules/_@babel_runtime@7.19.0@@babel/runtime/helpers/esm/typeof.js ***!
  55. \**********************************************************************************/
  56. /*! exports provided: default */
  57. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  58. "use strict";
  59. __webpack_require__.r(__webpack_exports__);
  60. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _typeof; });
  61. function _typeof(obj) {
  62. "@babel/helpers - typeof";
  63. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  64. return typeof obj;
  65. } : function (obj) {
  66. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  67. }, _typeof(obj);
  68. }
  69. /***/ }),
  70. /***/ "./node_modules/_@packy-tang_vue-tinymce@1.1.2@@packy-tang/vue-tinymce/dist/vue-tinymce.esm.js":
  71. /*!*****************************************************************************************************!*\
  72. !*** ./node_modules/_@packy-tang_vue-tinymce@1.1.2@@packy-tang/vue-tinymce/dist/vue-tinymce.esm.js ***!
  73. \*****************************************************************************************************/
  74. /*! exports provided: default, VueTinymce */
  75. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  76. "use strict";
  77. __webpack_require__.r(__webpack_exports__);
  78. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VueTinymce", function() { return e; });
  79. const t=["INIT","INPUT","CHANGED"];var e={name:"VueTinymce",model:{prop:"content",event:"change"},props:{content:{type:[String,Object],default:""},setup:{type:Function,default:function(){}},disabled:{type:Boolean,default:!1},setting:{type:Object,default:function(){return{}}},debug:Boolean},render(t){return"undefined"==typeof tinymce?t("div","tinymce is undefined"):t("div",{attrs:{id:this.id}})},data:()=>({id:"vue-tinymce-"+Date.now()+Math.floor(1e3*Math.random()),editor:null,status:0,bookmark:null}),watch:{content(t,e){if(this.changedLog({type:"propsChanged"},this.status,`${t} | ${e}`,"--"),1!==this.status&&e!==t&&this.editor&&this.editor.initialized)return null===t?this.resetContent(""):void this.setContent(t)},disabled(t){this.editor.setMode(t?"readonly":"design")}},created(){if(this.changedLog=this.debug?(console.warn("`@packy-tang/vue-tinymce`进入debug模式"),(e,n,o,i)=>console.log("来自:%s | 状态:%s \n %s \n %s",e.type,t[n],o,i)):()=>!1,"undefined"==typeof tinymce)throw new Error("tinymce undefined")},beforeMount(){const t=Object.assign({},this.setting,{selector:"#"+this.id,setup:t=>{this.setup(t),t.on("init",(()=>{this.setContent(this.content,t),t.on("keyup input",(t=>{this.status=1})),t.on("SetContent",(e=>{this.changedLog(e,this.status,t.getContent(),"--")})),t.on("Blur",(e=>{this.status=0,this.changedLog(e,this.status,t.getContent(),"--")})),t.on("input keyup Change Undo Redo ExecCommand NodeChange",(e=>{this.onChanged(e,t)}))}))}});this.editor=tinymce.createEditor(t.selector,t)},mounted(){this.editor.targetElm=this.$el,this.editor.render()},updated(){this.editor.render()},beforeDestroy:function(){this.editor.remove()},methods:{setContent(t,e){e||(e=this.editor),e.setContent(t),e.selection.moveToBookmark(this.bookmark)},resetContent(t,e){if(e||(e=this.editor),e.resetContent)return e.resetContent(t);e.setContent(t),e.setDirty(!1),e.undoManager.clear()},onChanged(t,e){e||(e=this.editor),"change"===t.type&&(this.bookmark=t.level.bookmark);const n=e.getContent();this.changedLog(t,this.status,n,"--"),this.$emit("change",n)}}};var n=new class{constructor(){const{prefix:t}={prefix:""};this.prefix=t}install(t,n={}){const o=n.prefix||this.prefix,i={VueTinymce:e};Object.keys(i).forEach((e=>{const n=i[e];t.component(o+n.name,n)}))}};/* harmony default export */ __webpack_exports__["default"] = (n);
  80. //# sourceMappingURL=vue-tinymce.esm.js.map
  81. /***/ }),
  82. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/index.js":
  83. /*!*************************************************************************!*\
  84. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/index.js ***!
  85. \*************************************************************************/
  86. /*! exports provided: default */
  87. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  88. "use strict";
  89. __webpack_require__.r(__webpack_exports__);
  90. /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/extends.js");
  91. /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
  92. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/typeof */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js");
  93. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
  94. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  95. /* harmony import */ var _validator___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./validator/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/index.js");
  96. /* harmony import */ var _messages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./messages */ "./node_modules/_async-validator@1.8.5@async-validator/es/messages.js");
  97. /**
  98. * Encapsulates a validation schema.
  99. *
  100. * @param descriptor An object declaring validation rules
  101. * for this schema.
  102. */
  103. function Schema(descriptor) {
  104. this.rules = null;
  105. this._messages = _messages__WEBPACK_IMPORTED_MODULE_4__["messages"];
  106. this.define(descriptor);
  107. }
  108. Schema.prototype = {
  109. messages: function messages(_messages) {
  110. if (_messages) {
  111. this._messages = Object(_util__WEBPACK_IMPORTED_MODULE_2__["deepMerge"])(Object(_messages__WEBPACK_IMPORTED_MODULE_4__["newMessages"])(), _messages);
  112. }
  113. return this._messages;
  114. },
  115. define: function define(rules) {
  116. if (!rules) {
  117. throw new Error('Cannot configure a schema with no rules');
  118. }
  119. if ((typeof rules === 'undefined' ? 'undefined' : babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(rules)) !== 'object' || Array.isArray(rules)) {
  120. throw new Error('Rules must be an object');
  121. }
  122. this.rules = {};
  123. var z = void 0;
  124. var item = void 0;
  125. for (z in rules) {
  126. if (rules.hasOwnProperty(z)) {
  127. item = rules[z];
  128. this.rules[z] = Array.isArray(item) ? item : [item];
  129. }
  130. }
  131. },
  132. validate: function validate(source_) {
  133. var _this = this;
  134. var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  135. var oc = arguments[2];
  136. var source = source_;
  137. var options = o;
  138. var callback = oc;
  139. if (typeof options === 'function') {
  140. callback = options;
  141. options = {};
  142. }
  143. if (!this.rules || Object.keys(this.rules).length === 0) {
  144. if (callback) {
  145. callback();
  146. }
  147. return;
  148. }
  149. function complete(results) {
  150. var i = void 0;
  151. var field = void 0;
  152. var errors = [];
  153. var fields = {};
  154. function add(e) {
  155. if (Array.isArray(e)) {
  156. errors = errors.concat.apply(errors, e);
  157. } else {
  158. errors.push(e);
  159. }
  160. }
  161. for (i = 0; i < results.length; i++) {
  162. add(results[i]);
  163. }
  164. if (!errors.length) {
  165. errors = null;
  166. fields = null;
  167. } else {
  168. for (i = 0; i < errors.length; i++) {
  169. field = errors[i].field;
  170. fields[field] = fields[field] || [];
  171. fields[field].push(errors[i]);
  172. }
  173. }
  174. callback(errors, fields);
  175. }
  176. if (options.messages) {
  177. var messages = this.messages();
  178. if (messages === _messages__WEBPACK_IMPORTED_MODULE_4__["messages"]) {
  179. messages = Object(_messages__WEBPACK_IMPORTED_MODULE_4__["newMessages"])();
  180. }
  181. Object(_util__WEBPACK_IMPORTED_MODULE_2__["deepMerge"])(messages, options.messages);
  182. options.messages = messages;
  183. } else {
  184. options.messages = this.messages();
  185. }
  186. var arr = void 0;
  187. var value = void 0;
  188. var series = {};
  189. var keys = options.keys || Object.keys(this.rules);
  190. keys.forEach(function (z) {
  191. arr = _this.rules[z];
  192. value = source[z];
  193. arr.forEach(function (r) {
  194. var rule = r;
  195. if (typeof rule.transform === 'function') {
  196. if (source === source_) {
  197. source = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, source);
  198. }
  199. value = source[z] = rule.transform(value);
  200. }
  201. if (typeof rule === 'function') {
  202. rule = {
  203. validator: rule
  204. };
  205. } else {
  206. rule = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rule);
  207. }
  208. rule.validator = _this.getValidationMethod(rule);
  209. rule.field = z;
  210. rule.fullField = rule.fullField || z;
  211. rule.type = _this.getType(rule);
  212. if (!rule.validator) {
  213. return;
  214. }
  215. series[z] = series[z] || [];
  216. series[z].push({
  217. rule: rule,
  218. value: value,
  219. source: source,
  220. field: z
  221. });
  222. });
  223. });
  224. var errorFields = {};
  225. Object(_util__WEBPACK_IMPORTED_MODULE_2__["asyncMap"])(series, options, function (data, doIt) {
  226. var rule = data.rule;
  227. var deep = (rule.type === 'object' || rule.type === 'array') && (babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(rule.fields) === 'object' || babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(rule.defaultField) === 'object');
  228. deep = deep && (rule.required || !rule.required && data.value);
  229. rule.field = data.field;
  230. function addFullfield(key, schema) {
  231. return babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, schema, {
  232. fullField: rule.fullField + '.' + key
  233. });
  234. }
  235. function cb() {
  236. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  237. var errors = e;
  238. if (!Array.isArray(errors)) {
  239. errors = [errors];
  240. }
  241. if (errors.length) {
  242. Object(_util__WEBPACK_IMPORTED_MODULE_2__["warning"])('async-validator:', errors);
  243. }
  244. if (errors.length && rule.message) {
  245. errors = [].concat(rule.message);
  246. }
  247. errors = errors.map(Object(_util__WEBPACK_IMPORTED_MODULE_2__["complementError"])(rule));
  248. if (options.first && errors.length) {
  249. errorFields[rule.field] = 1;
  250. return doIt(errors);
  251. }
  252. if (!deep) {
  253. doIt(errors);
  254. } else {
  255. // if rule is required but the target object
  256. // does not exist fail at the rule level and don't
  257. // go deeper
  258. if (rule.required && !data.value) {
  259. if (rule.message) {
  260. errors = [].concat(rule.message).map(Object(_util__WEBPACK_IMPORTED_MODULE_2__["complementError"])(rule));
  261. } else if (options.error) {
  262. errors = [options.error(rule, Object(_util__WEBPACK_IMPORTED_MODULE_2__["format"])(options.messages.required, rule.field))];
  263. } else {
  264. errors = [];
  265. }
  266. return doIt(errors);
  267. }
  268. var fieldsSchema = {};
  269. if (rule.defaultField) {
  270. for (var k in data.value) {
  271. if (data.value.hasOwnProperty(k)) {
  272. fieldsSchema[k] = rule.defaultField;
  273. }
  274. }
  275. }
  276. fieldsSchema = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, fieldsSchema, data.rule.fields);
  277. for (var f in fieldsSchema) {
  278. if (fieldsSchema.hasOwnProperty(f)) {
  279. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  280. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  281. }
  282. }
  283. var schema = new Schema(fieldsSchema);
  284. schema.messages(options.messages);
  285. if (data.rule.options) {
  286. data.rule.options.messages = options.messages;
  287. data.rule.options.error = options.error;
  288. }
  289. schema.validate(data.value, data.rule.options || options, function (errs) {
  290. doIt(errs && errs.length ? errors.concat(errs) : errs);
  291. });
  292. }
  293. }
  294. var res = rule.validator(rule, data.value, cb, data.source, options);
  295. if (res && res.then) {
  296. res.then(function () {
  297. return cb();
  298. }, function (e) {
  299. return cb(e);
  300. });
  301. }
  302. }, function (results) {
  303. complete(results);
  304. });
  305. },
  306. getType: function getType(rule) {
  307. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  308. rule.type = 'pattern';
  309. }
  310. if (typeof rule.validator !== 'function' && rule.type && !_validator___WEBPACK_IMPORTED_MODULE_3__["default"].hasOwnProperty(rule.type)) {
  311. throw new Error(Object(_util__WEBPACK_IMPORTED_MODULE_2__["format"])('Unknown rule type %s', rule.type));
  312. }
  313. return rule.type || 'string';
  314. },
  315. getValidationMethod: function getValidationMethod(rule) {
  316. if (typeof rule.validator === 'function') {
  317. return rule.validator;
  318. }
  319. var keys = Object.keys(rule);
  320. var messageIndex = keys.indexOf('message');
  321. if (messageIndex !== -1) {
  322. keys.splice(messageIndex, 1);
  323. }
  324. if (keys.length === 1 && keys[0] === 'required') {
  325. return _validator___WEBPACK_IMPORTED_MODULE_3__["default"].required;
  326. }
  327. return _validator___WEBPACK_IMPORTED_MODULE_3__["default"][this.getType(rule)] || false;
  328. }
  329. };
  330. Schema.register = function register(type, validator) {
  331. if (typeof validator !== 'function') {
  332. throw new Error('Cannot register a validator by type, validator is not a function');
  333. }
  334. _validator___WEBPACK_IMPORTED_MODULE_3__["default"][type] = validator;
  335. };
  336. Schema.messages = _messages__WEBPACK_IMPORTED_MODULE_4__["messages"];
  337. /* harmony default export */ __webpack_exports__["default"] = (Schema);
  338. /***/ }),
  339. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/messages.js":
  340. /*!****************************************************************************!*\
  341. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/messages.js ***!
  342. \****************************************************************************/
  343. /*! exports provided: newMessages, messages */
  344. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  345. "use strict";
  346. __webpack_require__.r(__webpack_exports__);
  347. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newMessages", function() { return newMessages; });
  348. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "messages", function() { return messages; });
  349. function newMessages() {
  350. return {
  351. 'default': 'Validation error on field %s',
  352. required: '%s is required',
  353. 'enum': '%s must be one of %s',
  354. whitespace: '%s cannot be empty',
  355. date: {
  356. format: '%s date %s is invalid for format %s',
  357. parse: '%s date could not be parsed, %s is invalid ',
  358. invalid: '%s date %s is invalid'
  359. },
  360. types: {
  361. string: '%s is not a %s',
  362. method: '%s is not a %s (function)',
  363. array: '%s is not an %s',
  364. object: '%s is not an %s',
  365. number: '%s is not a %s',
  366. date: '%s is not a %s',
  367. boolean: '%s is not a %s',
  368. integer: '%s is not an %s',
  369. float: '%s is not a %s',
  370. regexp: '%s is not a valid %s',
  371. email: '%s is not a valid %s',
  372. url: '%s is not a valid %s',
  373. hex: '%s is not a valid %s'
  374. },
  375. string: {
  376. len: '%s must be exactly %s characters',
  377. min: '%s must be at least %s characters',
  378. max: '%s cannot be longer than %s characters',
  379. range: '%s must be between %s and %s characters'
  380. },
  381. number: {
  382. len: '%s must equal %s',
  383. min: '%s cannot be less than %s',
  384. max: '%s cannot be greater than %s',
  385. range: '%s must be between %s and %s'
  386. },
  387. array: {
  388. len: '%s must be exactly %s in length',
  389. min: '%s cannot be less than %s in length',
  390. max: '%s cannot be greater than %s in length',
  391. range: '%s must be between %s and %s in length'
  392. },
  393. pattern: {
  394. mismatch: '%s value %s does not match pattern %s'
  395. },
  396. clone: function clone() {
  397. var cloned = JSON.parse(JSON.stringify(this));
  398. cloned.clone = this.clone;
  399. return cloned;
  400. }
  401. };
  402. }
  403. var messages = newMessages();
  404. /***/ }),
  405. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/enum.js":
  406. /*!*****************************************************************************!*\
  407. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/rule/enum.js ***!
  408. \*****************************************************************************/
  409. /*! exports provided: default */
  410. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  411. "use strict";
  412. __webpack_require__.r(__webpack_exports__);
  413. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  414. var ENUM = 'enum';
  415. /**
  416. * Rule for validating a value exists in an enumerable list.
  417. *
  418. * @param rule The validation rule.
  419. * @param value The value of the field on the source object.
  420. * @param source The source object being validated.
  421. * @param errors An array of errors that this rule may add
  422. * validation errors to.
  423. * @param options The validation options.
  424. * @param options.messages The validation messages.
  425. */
  426. function enumerable(rule, value, source, errors, options) {
  427. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  428. if (rule[ENUM].indexOf(value) === -1) {
  429. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  430. }
  431. }
  432. /* harmony default export */ __webpack_exports__["default"] = (enumerable);
  433. /***/ }),
  434. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js":
  435. /*!******************************************************************************!*\
  436. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js ***!
  437. \******************************************************************************/
  438. /*! exports provided: default */
  439. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  440. "use strict";
  441. __webpack_require__.r(__webpack_exports__);
  442. /* harmony import */ var _required__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./required */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/required.js");
  443. /* harmony import */ var _whitespace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./whitespace */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/whitespace.js");
  444. /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./type */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/type.js");
  445. /* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./range */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/range.js");
  446. /* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./enum */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/enum.js");
  447. /* harmony import */ var _pattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pattern */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/pattern.js");
  448. /* harmony default export */ __webpack_exports__["default"] = ({
  449. required: _required__WEBPACK_IMPORTED_MODULE_0__["default"],
  450. whitespace: _whitespace__WEBPACK_IMPORTED_MODULE_1__["default"],
  451. type: _type__WEBPACK_IMPORTED_MODULE_2__["default"],
  452. range: _range__WEBPACK_IMPORTED_MODULE_3__["default"],
  453. 'enum': _enum__WEBPACK_IMPORTED_MODULE_4__["default"],
  454. pattern: _pattern__WEBPACK_IMPORTED_MODULE_5__["default"]
  455. });
  456. /***/ }),
  457. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/pattern.js":
  458. /*!********************************************************************************!*\
  459. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/rule/pattern.js ***!
  460. \********************************************************************************/
  461. /*! exports provided: default */
  462. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  463. "use strict";
  464. __webpack_require__.r(__webpack_exports__);
  465. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  466. /**
  467. * Rule for validating a regular expression pattern.
  468. *
  469. * @param rule The validation rule.
  470. * @param value The value of the field on the source object.
  471. * @param source The source object being validated.
  472. * @param errors An array of errors that this rule may add
  473. * validation errors to.
  474. * @param options The validation options.
  475. * @param options.messages The validation messages.
  476. */
  477. function pattern(rule, value, source, errors, options) {
  478. if (rule.pattern) {
  479. if (rule.pattern instanceof RegExp) {
  480. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  481. // flag is accidentally set to `true`, which in a validation scenario
  482. // is not necessary and the result might be misleading
  483. rule.pattern.lastIndex = 0;
  484. if (!rule.pattern.test(value)) {
  485. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  486. }
  487. } else if (typeof rule.pattern === 'string') {
  488. var _pattern = new RegExp(rule.pattern);
  489. if (!_pattern.test(value)) {
  490. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  491. }
  492. }
  493. }
  494. }
  495. /* harmony default export */ __webpack_exports__["default"] = (pattern);
  496. /***/ }),
  497. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/range.js":
  498. /*!******************************************************************************!*\
  499. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/rule/range.js ***!
  500. \******************************************************************************/
  501. /*! exports provided: default */
  502. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  503. "use strict";
  504. __webpack_require__.r(__webpack_exports__);
  505. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  506. /**
  507. * Rule for validating minimum and maximum allowed values.
  508. *
  509. * @param rule The validation rule.
  510. * @param value The value of the field on the source object.
  511. * @param source The source object being validated.
  512. * @param errors An array of errors that this rule may add
  513. * validation errors to.
  514. * @param options The validation options.
  515. * @param options.messages The validation messages.
  516. */
  517. function range(rule, value, source, errors, options) {
  518. var len = typeof rule.len === 'number';
  519. var min = typeof rule.min === 'number';
  520. var max = typeof rule.max === 'number';
  521. // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  522. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  523. var val = value;
  524. var key = null;
  525. var num = typeof value === 'number';
  526. var str = typeof value === 'string';
  527. var arr = Array.isArray(value);
  528. if (num) {
  529. key = 'number';
  530. } else if (str) {
  531. key = 'string';
  532. } else if (arr) {
  533. key = 'array';
  534. }
  535. // if the value is not of a supported type for range validation
  536. // the validation rule rule should use the
  537. // type property to also test for a particular type
  538. if (!key) {
  539. return false;
  540. }
  541. if (arr) {
  542. val = value.length;
  543. }
  544. if (str) {
  545. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  546. val = value.replace(spRegexp, '_').length;
  547. }
  548. if (len) {
  549. if (val !== rule.len) {
  550. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages[key].len, rule.fullField, rule.len));
  551. }
  552. } else if (min && !max && val < rule.min) {
  553. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages[key].min, rule.fullField, rule.min));
  554. } else if (max && !min && val > rule.max) {
  555. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages[key].max, rule.fullField, rule.max));
  556. } else if (min && max && (val < rule.min || val > rule.max)) {
  557. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages[key].range, rule.fullField, rule.min, rule.max));
  558. }
  559. }
  560. /* harmony default export */ __webpack_exports__["default"] = (range);
  561. /***/ }),
  562. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/required.js":
  563. /*!*********************************************************************************!*\
  564. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/rule/required.js ***!
  565. \*********************************************************************************/
  566. /*! exports provided: default */
  567. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  568. "use strict";
  569. __webpack_require__.r(__webpack_exports__);
  570. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  571. /**
  572. * Rule for validating required fields.
  573. *
  574. * @param rule The validation rule.
  575. * @param value The value of the field on the source object.
  576. * @param source The source object being validated.
  577. * @param errors An array of errors that this rule may add
  578. * validation errors to.
  579. * @param options The validation options.
  580. * @param options.messages The validation messages.
  581. */
  582. function required(rule, value, source, errors, options, type) {
  583. if (rule.required && (!source.hasOwnProperty(rule.field) || _util__WEBPACK_IMPORTED_MODULE_0__["isEmptyValue"](value, type || rule.type))) {
  584. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages.required, rule.fullField));
  585. }
  586. }
  587. /* harmony default export */ __webpack_exports__["default"] = (required);
  588. /***/ }),
  589. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/type.js":
  590. /*!*****************************************************************************!*\
  591. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/rule/type.js ***!
  592. \*****************************************************************************/
  593. /*! exports provided: default */
  594. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  595. "use strict";
  596. __webpack_require__.r(__webpack_exports__);
  597. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/typeof */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js");
  598. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
  599. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  600. /* harmony import */ var _required__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./required */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/required.js");
  601. /* eslint max-len:0 */
  602. var pattern = {
  603. // http://emailregex.com/
  604. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  605. url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'),
  606. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  607. };
  608. var types = {
  609. integer: function integer(value) {
  610. return types.number(value) && parseInt(value, 10) === value;
  611. },
  612. float: function float(value) {
  613. return types.number(value) && !types.integer(value);
  614. },
  615. array: function array(value) {
  616. return Array.isArray(value);
  617. },
  618. regexp: function regexp(value) {
  619. if (value instanceof RegExp) {
  620. return true;
  621. }
  622. try {
  623. return !!new RegExp(value);
  624. } catch (e) {
  625. return false;
  626. }
  627. },
  628. date: function date(value) {
  629. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  630. },
  631. number: function number(value) {
  632. if (isNaN(value)) {
  633. return false;
  634. }
  635. return typeof value === 'number';
  636. },
  637. object: function object(value) {
  638. return (typeof value === 'undefined' ? 'undefined' : babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(value)) === 'object' && !types.array(value);
  639. },
  640. method: function method(value) {
  641. return typeof value === 'function';
  642. },
  643. email: function email(value) {
  644. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  645. },
  646. url: function url(value) {
  647. return typeof value === 'string' && !!value.match(pattern.url);
  648. },
  649. hex: function hex(value) {
  650. return typeof value === 'string' && !!value.match(pattern.hex);
  651. }
  652. };
  653. /**
  654. * Rule for validating the type of a value.
  655. *
  656. * @param rule The validation rule.
  657. * @param value The value of the field on the source object.
  658. * @param source The source object being validated.
  659. * @param errors An array of errors that this rule may add
  660. * validation errors to.
  661. * @param options The validation options.
  662. * @param options.messages The validation messages.
  663. */
  664. function type(rule, value, source, errors, options) {
  665. if (rule.required && value === undefined) {
  666. Object(_required__WEBPACK_IMPORTED_MODULE_2__["default"])(rule, value, source, errors, options);
  667. return;
  668. }
  669. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  670. var ruleType = rule.type;
  671. if (custom.indexOf(ruleType) > -1) {
  672. if (!types[ruleType](value)) {
  673. errors.push(_util__WEBPACK_IMPORTED_MODULE_1__["format"](options.messages.types[ruleType], rule.fullField, rule.type));
  674. }
  675. // straight typeof check
  676. } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(value)) !== rule.type) {
  677. errors.push(_util__WEBPACK_IMPORTED_MODULE_1__["format"](options.messages.types[ruleType], rule.fullField, rule.type));
  678. }
  679. }
  680. /* harmony default export */ __webpack_exports__["default"] = (type);
  681. /***/ }),
  682. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/whitespace.js":
  683. /*!***********************************************************************************!*\
  684. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/rule/whitespace.js ***!
  685. \***********************************************************************************/
  686. /*! exports provided: default */
  687. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  688. "use strict";
  689. __webpack_require__.r(__webpack_exports__);
  690. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  691. /**
  692. * Rule for validating whitespace.
  693. *
  694. * @param rule The validation rule.
  695. * @param value The value of the field on the source object.
  696. * @param source The source object being validated.
  697. * @param errors An array of errors that this rule may add
  698. * validation errors to.
  699. * @param options The validation options.
  700. * @param options.messages The validation messages.
  701. */
  702. function whitespace(rule, value, source, errors, options) {
  703. if (/^\s+$/.test(value) || value === '') {
  704. errors.push(_util__WEBPACK_IMPORTED_MODULE_0__["format"](options.messages.whitespace, rule.fullField));
  705. }
  706. }
  707. /* harmony default export */ __webpack_exports__["default"] = (whitespace);
  708. /***/ }),
  709. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js":
  710. /*!************************************************************************!*\
  711. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/util.js ***!
  712. \************************************************************************/
  713. /*! exports provided: warning, format, isEmptyValue, isEmptyObject, asyncMap, complementError, deepMerge */
  714. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  715. "use strict";
  716. __webpack_require__.r(__webpack_exports__);
  717. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warning", function() { return warning; });
  718. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; });
  719. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmptyValue", function() { return isEmptyValue; });
  720. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmptyObject", function() { return isEmptyObject; });
  721. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asyncMap", function() { return asyncMap; });
  722. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "complementError", function() { return complementError; });
  723. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepMerge", function() { return deepMerge; });
  724. /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/extends.js");
  725. /* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
  726. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/typeof */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js");
  727. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
  728. var formatRegExp = /%[sdj%]/g;
  729. var warning = function warning() {};
  730. // don't print warning message when in production env or node runtime
  731. if ( true && typeof window !== 'undefined' && typeof document !== 'undefined') {
  732. warning = function warning(type, errors) {
  733. if (typeof console !== 'undefined' && console.warn) {
  734. if (errors.every(function (e) {
  735. return typeof e === 'string';
  736. })) {
  737. console.warn(type, errors);
  738. }
  739. }
  740. };
  741. }
  742. function format() {
  743. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  744. args[_key] = arguments[_key];
  745. }
  746. var i = 1;
  747. var f = args[0];
  748. var len = args.length;
  749. if (typeof f === 'function') {
  750. return f.apply(null, args.slice(1));
  751. }
  752. if (typeof f === 'string') {
  753. var str = String(f).replace(formatRegExp, function (x) {
  754. if (x === '%%') {
  755. return '%';
  756. }
  757. if (i >= len) {
  758. return x;
  759. }
  760. switch (x) {
  761. case '%s':
  762. return String(args[i++]);
  763. case '%d':
  764. return Number(args[i++]);
  765. case '%j':
  766. try {
  767. return JSON.stringify(args[i++]);
  768. } catch (_) {
  769. return '[Circular]';
  770. }
  771. break;
  772. default:
  773. return x;
  774. }
  775. });
  776. for (var arg = args[i]; i < len; arg = args[++i]) {
  777. str += ' ' + arg;
  778. }
  779. return str;
  780. }
  781. return f;
  782. }
  783. function isNativeStringType(type) {
  784. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  785. }
  786. function isEmptyValue(value, type) {
  787. if (value === undefined || value === null) {
  788. return true;
  789. }
  790. if (type === 'array' && Array.isArray(value) && !value.length) {
  791. return true;
  792. }
  793. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  794. return true;
  795. }
  796. return false;
  797. }
  798. function isEmptyObject(obj) {
  799. return Object.keys(obj).length === 0;
  800. }
  801. function asyncParallelArray(arr, func, callback) {
  802. var results = [];
  803. var total = 0;
  804. var arrLength = arr.length;
  805. function count(errors) {
  806. results.push.apply(results, errors);
  807. total++;
  808. if (total === arrLength) {
  809. callback(results);
  810. }
  811. }
  812. arr.forEach(function (a) {
  813. func(a, count);
  814. });
  815. }
  816. function asyncSerialArray(arr, func, callback) {
  817. var index = 0;
  818. var arrLength = arr.length;
  819. function next(errors) {
  820. if (errors && errors.length) {
  821. callback(errors);
  822. return;
  823. }
  824. var original = index;
  825. index = index + 1;
  826. if (original < arrLength) {
  827. func(arr[original], next);
  828. } else {
  829. callback([]);
  830. }
  831. }
  832. next([]);
  833. }
  834. function flattenObjArr(objArr) {
  835. var ret = [];
  836. Object.keys(objArr).forEach(function (k) {
  837. ret.push.apply(ret, objArr[k]);
  838. });
  839. return ret;
  840. }
  841. function asyncMap(objArr, option, func, callback) {
  842. if (option.first) {
  843. var flattenArr = flattenObjArr(objArr);
  844. return asyncSerialArray(flattenArr, func, callback);
  845. }
  846. var firstFields = option.firstFields || [];
  847. if (firstFields === true) {
  848. firstFields = Object.keys(objArr);
  849. }
  850. var objArrKeys = Object.keys(objArr);
  851. var objArrLength = objArrKeys.length;
  852. var total = 0;
  853. var results = [];
  854. var next = function next(errors) {
  855. results.push.apply(results, errors);
  856. total++;
  857. if (total === objArrLength) {
  858. callback(results);
  859. }
  860. };
  861. objArrKeys.forEach(function (key) {
  862. var arr = objArr[key];
  863. if (firstFields.indexOf(key) !== -1) {
  864. asyncSerialArray(arr, func, next);
  865. } else {
  866. asyncParallelArray(arr, func, next);
  867. }
  868. });
  869. }
  870. function complementError(rule) {
  871. return function (oe) {
  872. if (oe && oe.message) {
  873. oe.field = oe.field || rule.fullField;
  874. return oe;
  875. }
  876. return {
  877. message: oe,
  878. field: oe.field || rule.fullField
  879. };
  880. };
  881. }
  882. function deepMerge(target, source) {
  883. if (source) {
  884. for (var s in source) {
  885. if (source.hasOwnProperty(s)) {
  886. var value = source[s];
  887. if ((typeof value === 'undefined' ? 'undefined' : babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(value)) === 'object' && babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(target[s]) === 'object') {
  888. target[s] = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, target[s], value);
  889. } else {
  890. target[s] = value;
  891. }
  892. }
  893. }
  894. }
  895. return target;
  896. }
  897. /***/ }),
  898. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/array.js":
  899. /*!***********************************************************************************!*\
  900. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/array.js ***!
  901. \***********************************************************************************/
  902. /*! exports provided: default */
  903. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  904. "use strict";
  905. __webpack_require__.r(__webpack_exports__);
  906. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  907. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  908. /**
  909. * Validates an array.
  910. *
  911. * @param rule The validation rule.
  912. * @param value The value of the field on the source object.
  913. * @param callback The callback function.
  914. * @param source The source object being validated.
  915. * @param options The validation options.
  916. * @param options.messages The validation messages.
  917. */
  918. function array(rule, value, callback, source, options) {
  919. var errors = [];
  920. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  921. if (validate) {
  922. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, 'array') && !rule.required) {
  923. return callback();
  924. }
  925. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options, 'array');
  926. if (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, 'array')) {
  927. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  928. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].range(rule, value, source, errors, options);
  929. }
  930. }
  931. callback(errors);
  932. }
  933. /* harmony default export */ __webpack_exports__["default"] = (array);
  934. /***/ }),
  935. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/boolean.js":
  936. /*!*************************************************************************************!*\
  937. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/boolean.js ***!
  938. \*************************************************************************************/
  939. /*! exports provided: default */
  940. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  941. "use strict";
  942. __webpack_require__.r(__webpack_exports__);
  943. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  944. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  945. /**
  946. * Validates a boolean.
  947. *
  948. * @param rule The validation rule.
  949. * @param value The value of the field on the source object.
  950. * @param callback The callback function.
  951. * @param source The source object being validated.
  952. * @param options The validation options.
  953. * @param options.messages The validation messages.
  954. */
  955. function boolean(rule, value, callback, source, options) {
  956. var errors = [];
  957. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  958. if (validate) {
  959. if (Object(_util__WEBPACK_IMPORTED_MODULE_0__["isEmptyValue"])(value) && !rule.required) {
  960. return callback();
  961. }
  962. _rule___WEBPACK_IMPORTED_MODULE_1__["default"].required(rule, value, source, errors, options);
  963. if (value !== undefined) {
  964. _rule___WEBPACK_IMPORTED_MODULE_1__["default"].type(rule, value, source, errors, options);
  965. }
  966. }
  967. callback(errors);
  968. }
  969. /* harmony default export */ __webpack_exports__["default"] = (boolean);
  970. /***/ }),
  971. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/date.js":
  972. /*!**********************************************************************************!*\
  973. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/date.js ***!
  974. \**********************************************************************************/
  975. /*! exports provided: default */
  976. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  977. "use strict";
  978. __webpack_require__.r(__webpack_exports__);
  979. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  980. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  981. function date(rule, value, callback, source, options) {
  982. // console.log('integer rule called %j', rule);
  983. var errors = [];
  984. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  985. // console.log('validate on %s value', value);
  986. if (validate) {
  987. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  988. return callback();
  989. }
  990. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  991. if (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value)) {
  992. var dateObject = void 0;
  993. if (typeof value === 'number') {
  994. dateObject = new Date(value);
  995. } else {
  996. dateObject = value;
  997. }
  998. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, dateObject, source, errors, options);
  999. if (dateObject) {
  1000. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].range(rule, dateObject.getTime(), source, errors, options);
  1001. }
  1002. }
  1003. }
  1004. callback(errors);
  1005. }
  1006. /* harmony default export */ __webpack_exports__["default"] = (date);
  1007. /***/ }),
  1008. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/enum.js":
  1009. /*!**********************************************************************************!*\
  1010. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/enum.js ***!
  1011. \**********************************************************************************/
  1012. /*! exports provided: default */
  1013. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1014. "use strict";
  1015. __webpack_require__.r(__webpack_exports__);
  1016. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1017. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1018. var ENUM = 'enum';
  1019. /**
  1020. * Validates an enumerable list.
  1021. *
  1022. * @param rule The validation rule.
  1023. * @param value The value of the field on the source object.
  1024. * @param callback The callback function.
  1025. * @param source The source object being validated.
  1026. * @param options The validation options.
  1027. * @param options.messages The validation messages.
  1028. */
  1029. function enumerable(rule, value, callback, source, options) {
  1030. var errors = [];
  1031. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1032. if (validate) {
  1033. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  1034. return callback();
  1035. }
  1036. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1037. if (value) {
  1038. _rule___WEBPACK_IMPORTED_MODULE_0__["default"][ENUM](rule, value, source, errors, options);
  1039. }
  1040. }
  1041. callback(errors);
  1042. }
  1043. /* harmony default export */ __webpack_exports__["default"] = (enumerable);
  1044. /***/ }),
  1045. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/float.js":
  1046. /*!***********************************************************************************!*\
  1047. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/float.js ***!
  1048. \***********************************************************************************/
  1049. /*! exports provided: default */
  1050. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1051. "use strict";
  1052. __webpack_require__.r(__webpack_exports__);
  1053. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1054. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1055. /**
  1056. * Validates a number is a floating point number.
  1057. *
  1058. * @param rule The validation rule.
  1059. * @param value The value of the field on the source object.
  1060. * @param callback The callback function.
  1061. * @param source The source object being validated.
  1062. * @param options The validation options.
  1063. * @param options.messages The validation messages.
  1064. */
  1065. function floatFn(rule, value, callback, source, options) {
  1066. var errors = [];
  1067. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1068. if (validate) {
  1069. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  1070. return callback();
  1071. }
  1072. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1073. if (value !== undefined) {
  1074. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1075. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].range(rule, value, source, errors, options);
  1076. }
  1077. }
  1078. callback(errors);
  1079. }
  1080. /* harmony default export */ __webpack_exports__["default"] = (floatFn);
  1081. /***/ }),
  1082. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/index.js":
  1083. /*!***********************************************************************************!*\
  1084. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/index.js ***!
  1085. \***********************************************************************************/
  1086. /*! exports provided: default */
  1087. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1088. "use strict";
  1089. __webpack_require__.r(__webpack_exports__);
  1090. /* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./string */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/string.js");
  1091. /* harmony import */ var _method__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./method */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/method.js");
  1092. /* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/number.js");
  1093. /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./boolean */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/boolean.js");
  1094. /* harmony import */ var _regexp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./regexp */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/regexp.js");
  1095. /* harmony import */ var _integer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./integer */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/integer.js");
  1096. /* harmony import */ var _float__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./float */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/float.js");
  1097. /* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./array */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/array.js");
  1098. /* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./object */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/object.js");
  1099. /* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./enum */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/enum.js");
  1100. /* harmony import */ var _pattern__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./pattern */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/pattern.js");
  1101. /* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./date */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/date.js");
  1102. /* harmony import */ var _required__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./required */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/required.js");
  1103. /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./type */ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/type.js");
  1104. /* harmony default export */ __webpack_exports__["default"] = ({
  1105. string: _string__WEBPACK_IMPORTED_MODULE_0__["default"],
  1106. method: _method__WEBPACK_IMPORTED_MODULE_1__["default"],
  1107. number: _number__WEBPACK_IMPORTED_MODULE_2__["default"],
  1108. boolean: _boolean__WEBPACK_IMPORTED_MODULE_3__["default"],
  1109. regexp: _regexp__WEBPACK_IMPORTED_MODULE_4__["default"],
  1110. integer: _integer__WEBPACK_IMPORTED_MODULE_5__["default"],
  1111. float: _float__WEBPACK_IMPORTED_MODULE_6__["default"],
  1112. array: _array__WEBPACK_IMPORTED_MODULE_7__["default"],
  1113. object: _object__WEBPACK_IMPORTED_MODULE_8__["default"],
  1114. 'enum': _enum__WEBPACK_IMPORTED_MODULE_9__["default"],
  1115. pattern: _pattern__WEBPACK_IMPORTED_MODULE_10__["default"],
  1116. date: _date__WEBPACK_IMPORTED_MODULE_11__["default"],
  1117. url: _type__WEBPACK_IMPORTED_MODULE_13__["default"],
  1118. hex: _type__WEBPACK_IMPORTED_MODULE_13__["default"],
  1119. email: _type__WEBPACK_IMPORTED_MODULE_13__["default"],
  1120. required: _required__WEBPACK_IMPORTED_MODULE_12__["default"]
  1121. });
  1122. /***/ }),
  1123. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/integer.js":
  1124. /*!*************************************************************************************!*\
  1125. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/integer.js ***!
  1126. \*************************************************************************************/
  1127. /*! exports provided: default */
  1128. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1129. "use strict";
  1130. __webpack_require__.r(__webpack_exports__);
  1131. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1132. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1133. /**
  1134. * Validates a number is an integer.
  1135. *
  1136. * @param rule The validation rule.
  1137. * @param value The value of the field on the source object.
  1138. * @param callback The callback function.
  1139. * @param source The source object being validated.
  1140. * @param options The validation options.
  1141. * @param options.messages The validation messages.
  1142. */
  1143. function integer(rule, value, callback, source, options) {
  1144. var errors = [];
  1145. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1146. if (validate) {
  1147. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  1148. return callback();
  1149. }
  1150. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1151. if (value !== undefined) {
  1152. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1153. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].range(rule, value, source, errors, options);
  1154. }
  1155. }
  1156. callback(errors);
  1157. }
  1158. /* harmony default export */ __webpack_exports__["default"] = (integer);
  1159. /***/ }),
  1160. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/method.js":
  1161. /*!************************************************************************************!*\
  1162. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/method.js ***!
  1163. \************************************************************************************/
  1164. /*! exports provided: default */
  1165. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1166. "use strict";
  1167. __webpack_require__.r(__webpack_exports__);
  1168. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1169. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1170. /**
  1171. * Validates a function.
  1172. *
  1173. * @param rule The validation rule.
  1174. * @param value The value of the field on the source object.
  1175. * @param callback The callback function.
  1176. * @param source The source object being validated.
  1177. * @param options The validation options.
  1178. * @param options.messages The validation messages.
  1179. */
  1180. function method(rule, value, callback, source, options) {
  1181. var errors = [];
  1182. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1183. if (validate) {
  1184. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  1185. return callback();
  1186. }
  1187. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1188. if (value !== undefined) {
  1189. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1190. }
  1191. }
  1192. callback(errors);
  1193. }
  1194. /* harmony default export */ __webpack_exports__["default"] = (method);
  1195. /***/ }),
  1196. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/number.js":
  1197. /*!************************************************************************************!*\
  1198. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/number.js ***!
  1199. \************************************************************************************/
  1200. /*! exports provided: default */
  1201. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1202. "use strict";
  1203. __webpack_require__.r(__webpack_exports__);
  1204. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1205. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1206. /**
  1207. * Validates a number.
  1208. *
  1209. * @param rule The validation rule.
  1210. * @param value The value of the field on the source object.
  1211. * @param callback The callback function.
  1212. * @param source The source object being validated.
  1213. * @param options The validation options.
  1214. * @param options.messages The validation messages.
  1215. */
  1216. function number(rule, value, callback, source, options) {
  1217. var errors = [];
  1218. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1219. if (validate) {
  1220. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  1221. return callback();
  1222. }
  1223. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1224. if (value !== undefined) {
  1225. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1226. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].range(rule, value, source, errors, options);
  1227. }
  1228. }
  1229. callback(errors);
  1230. }
  1231. /* harmony default export */ __webpack_exports__["default"] = (number);
  1232. /***/ }),
  1233. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/object.js":
  1234. /*!************************************************************************************!*\
  1235. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/object.js ***!
  1236. \************************************************************************************/
  1237. /*! exports provided: default */
  1238. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1239. "use strict";
  1240. __webpack_require__.r(__webpack_exports__);
  1241. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1242. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1243. /**
  1244. * Validates an object.
  1245. *
  1246. * @param rule The validation rule.
  1247. * @param value The value of the field on the source object.
  1248. * @param callback The callback function.
  1249. * @param source The source object being validated.
  1250. * @param options The validation options.
  1251. * @param options.messages The validation messages.
  1252. */
  1253. function object(rule, value, callback, source, options) {
  1254. var errors = [];
  1255. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1256. if (validate) {
  1257. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  1258. return callback();
  1259. }
  1260. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1261. if (value !== undefined) {
  1262. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1263. }
  1264. }
  1265. callback(errors);
  1266. }
  1267. /* harmony default export */ __webpack_exports__["default"] = (object);
  1268. /***/ }),
  1269. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/pattern.js":
  1270. /*!*************************************************************************************!*\
  1271. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/pattern.js ***!
  1272. \*************************************************************************************/
  1273. /*! exports provided: default */
  1274. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1275. "use strict";
  1276. __webpack_require__.r(__webpack_exports__);
  1277. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1278. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1279. /**
  1280. * Validates a regular expression pattern.
  1281. *
  1282. * Performs validation when a rule only contains
  1283. * a pattern property but is not declared as a string type.
  1284. *
  1285. * @param rule The validation rule.
  1286. * @param value The value of the field on the source object.
  1287. * @param callback The callback function.
  1288. * @param source The source object being validated.
  1289. * @param options The validation options.
  1290. * @param options.messages The validation messages.
  1291. */
  1292. function pattern(rule, value, callback, source, options) {
  1293. var errors = [];
  1294. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1295. if (validate) {
  1296. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, 'string') && !rule.required) {
  1297. return callback();
  1298. }
  1299. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1300. if (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, 'string')) {
  1301. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].pattern(rule, value, source, errors, options);
  1302. }
  1303. }
  1304. callback(errors);
  1305. }
  1306. /* harmony default export */ __webpack_exports__["default"] = (pattern);
  1307. /***/ }),
  1308. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/regexp.js":
  1309. /*!************************************************************************************!*\
  1310. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/regexp.js ***!
  1311. \************************************************************************************/
  1312. /*! exports provided: default */
  1313. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1314. "use strict";
  1315. __webpack_require__.r(__webpack_exports__);
  1316. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1317. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1318. /**
  1319. * Validates the regular expression type.
  1320. *
  1321. * @param rule The validation rule.
  1322. * @param value The value of the field on the source object.
  1323. * @param callback The callback function.
  1324. * @param source The source object being validated.
  1325. * @param options The validation options.
  1326. * @param options.messages The validation messages.
  1327. */
  1328. function regexp(rule, value, callback, source, options) {
  1329. var errors = [];
  1330. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1331. if (validate) {
  1332. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value) && !rule.required) {
  1333. return callback();
  1334. }
  1335. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options);
  1336. if (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value)) {
  1337. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1338. }
  1339. }
  1340. callback(errors);
  1341. }
  1342. /* harmony default export */ __webpack_exports__["default"] = (regexp);
  1343. /***/ }),
  1344. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/required.js":
  1345. /*!**************************************************************************************!*\
  1346. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/required.js ***!
  1347. \**************************************************************************************/
  1348. /*! exports provided: default */
  1349. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1350. "use strict";
  1351. __webpack_require__.r(__webpack_exports__);
  1352. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/typeof */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js");
  1353. /* harmony import */ var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
  1354. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1355. function required(rule, value, callback, source, options) {
  1356. var errors = [];
  1357. var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(value);
  1358. _rule___WEBPACK_IMPORTED_MODULE_1__["default"].required(rule, value, source, errors, options, type);
  1359. callback(errors);
  1360. }
  1361. /* harmony default export */ __webpack_exports__["default"] = (required);
  1362. /***/ }),
  1363. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/string.js":
  1364. /*!************************************************************************************!*\
  1365. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/string.js ***!
  1366. \************************************************************************************/
  1367. /*! exports provided: default */
  1368. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1369. "use strict";
  1370. __webpack_require__.r(__webpack_exports__);
  1371. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1372. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1373. /**
  1374. * Performs validation for string types.
  1375. *
  1376. * @param rule The validation rule.
  1377. * @param value The value of the field on the source object.
  1378. * @param callback The callback function.
  1379. * @param source The source object being validated.
  1380. * @param options The validation options.
  1381. * @param options.messages The validation messages.
  1382. */
  1383. function string(rule, value, callback, source, options) {
  1384. var errors = [];
  1385. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1386. if (validate) {
  1387. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, 'string') && !rule.required) {
  1388. return callback();
  1389. }
  1390. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options, 'string');
  1391. if (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, 'string')) {
  1392. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1393. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].range(rule, value, source, errors, options);
  1394. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].pattern(rule, value, source, errors, options);
  1395. if (rule.whitespace === true) {
  1396. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].whitespace(rule, value, source, errors, options);
  1397. }
  1398. }
  1399. }
  1400. callback(errors);
  1401. }
  1402. /* harmony default export */ __webpack_exports__["default"] = (string);
  1403. /***/ }),
  1404. /***/ "./node_modules/_async-validator@1.8.5@async-validator/es/validator/type.js":
  1405. /*!**********************************************************************************!*\
  1406. !*** ./node_modules/_async-validator@1.8.5@async-validator/es/validator/type.js ***!
  1407. \**********************************************************************************/
  1408. /*! exports provided: default */
  1409. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1410. "use strict";
  1411. __webpack_require__.r(__webpack_exports__);
  1412. /* harmony import */ var _rule___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rule/ */ "./node_modules/_async-validator@1.8.5@async-validator/es/rule/index.js");
  1413. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ "./node_modules/_async-validator@1.8.5@async-validator/es/util.js");
  1414. function type(rule, value, callback, source, options) {
  1415. var ruleType = rule.type;
  1416. var errors = [];
  1417. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  1418. if (validate) {
  1419. if (Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, ruleType) && !rule.required) {
  1420. return callback();
  1421. }
  1422. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].required(rule, value, source, errors, options, ruleType);
  1423. if (!Object(_util__WEBPACK_IMPORTED_MODULE_1__["isEmptyValue"])(value, ruleType)) {
  1424. _rule___WEBPACK_IMPORTED_MODULE_0__["default"].type(rule, value, source, errors, options);
  1425. }
  1426. }
  1427. callback(errors);
  1428. }
  1429. /* harmony default export */ __webpack_exports__["default"] = (type);
  1430. /***/ }),
  1431. /***/ "./node_modules/_axios@0.21.4@axios/index.js":
  1432. /*!***************************************************!*\
  1433. !*** ./node_modules/_axios@0.21.4@axios/index.js ***!
  1434. \***************************************************/
  1435. /*! no static exports found */
  1436. /***/ (function(module, exports, __webpack_require__) {
  1437. module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/_axios@0.21.4@axios/lib/axios.js");
  1438. /***/ }),
  1439. /***/ "./node_modules/_axios@0.21.4@axios/lib/adapters/xhr.js":
  1440. /*!**************************************************************!*\
  1441. !*** ./node_modules/_axios@0.21.4@axios/lib/adapters/xhr.js ***!
  1442. \**************************************************************/
  1443. /*! no static exports found */
  1444. /***/ (function(module, exports, __webpack_require__) {
  1445. "use strict";
  1446. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  1447. var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/_axios@0.21.4@axios/lib/core/settle.js");
  1448. var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/_axios@0.21.4@axios/lib/helpers/cookies.js");
  1449. var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/_axios@0.21.4@axios/lib/helpers/buildURL.js");
  1450. var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./node_modules/_axios@0.21.4@axios/lib/core/buildFullPath.js");
  1451. var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/_axios@0.21.4@axios/lib/helpers/parseHeaders.js");
  1452. var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/_axios@0.21.4@axios/lib/helpers/isURLSameOrigin.js");
  1453. var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/_axios@0.21.4@axios/lib/core/createError.js");
  1454. module.exports = function xhrAdapter(config) {
  1455. return new Promise(function dispatchXhrRequest(resolve, reject) {
  1456. var requestData = config.data;
  1457. var requestHeaders = config.headers;
  1458. var responseType = config.responseType;
  1459. if (utils.isFormData(requestData)) {
  1460. delete requestHeaders['Content-Type']; // Let the browser set it
  1461. }
  1462. var request = new XMLHttpRequest();
  1463. // HTTP basic authentication
  1464. if (config.auth) {
  1465. var username = config.auth.username || '';
  1466. var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
  1467. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  1468. }
  1469. var fullPath = buildFullPath(config.baseURL, config.url);
  1470. request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
  1471. // Set the request timeout in MS
  1472. request.timeout = config.timeout;
  1473. function onloadend() {
  1474. if (!request) {
  1475. return;
  1476. }
  1477. // Prepare the response
  1478. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  1479. var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
  1480. request.responseText : request.response;
  1481. var response = {
  1482. data: responseData,
  1483. status: request.status,
  1484. statusText: request.statusText,
  1485. headers: responseHeaders,
  1486. config: config,
  1487. request: request
  1488. };
  1489. settle(resolve, reject, response);
  1490. // Clean up request
  1491. request = null;
  1492. }
  1493. if ('onloadend' in request) {
  1494. // Use onloadend if available
  1495. request.onloadend = onloadend;
  1496. } else {
  1497. // Listen for ready state to emulate onloadend
  1498. request.onreadystatechange = function handleLoad() {
  1499. if (!request || request.readyState !== 4) {
  1500. return;
  1501. }
  1502. // The request errored out and we didn't get a response, this will be
  1503. // handled by onerror instead
  1504. // With one exception: request that using file: protocol, most browsers
  1505. // will return status as 0 even though it's a successful request
  1506. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  1507. return;
  1508. }
  1509. // readystate handler is calling before onerror or ontimeout handlers,
  1510. // so we should call onloadend on the next 'tick'
  1511. setTimeout(onloadend);
  1512. };
  1513. }
  1514. // Handle browser request cancellation (as opposed to a manual cancellation)
  1515. request.onabort = function handleAbort() {
  1516. if (!request) {
  1517. return;
  1518. }
  1519. reject(createError('Request aborted', config, 'ECONNABORTED', request));
  1520. // Clean up request
  1521. request = null;
  1522. };
  1523. // Handle low level network errors
  1524. request.onerror = function handleError() {
  1525. // Real errors are hidden from us by the browser
  1526. // onerror should only fire if it's a network error
  1527. reject(createError('Network Error', config, null, request));
  1528. // Clean up request
  1529. request = null;
  1530. };
  1531. // Handle timeout
  1532. request.ontimeout = function handleTimeout() {
  1533. var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
  1534. if (config.timeoutErrorMessage) {
  1535. timeoutErrorMessage = config.timeoutErrorMessage;
  1536. }
  1537. reject(createError(
  1538. timeoutErrorMessage,
  1539. config,
  1540. config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
  1541. request));
  1542. // Clean up request
  1543. request = null;
  1544. };
  1545. // Add xsrf header
  1546. // This is only done if running in a standard browser environment.
  1547. // Specifically not if we're in a web worker, or react-native.
  1548. if (utils.isStandardBrowserEnv()) {
  1549. // Add xsrf header
  1550. var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
  1551. cookies.read(config.xsrfCookieName) :
  1552. undefined;
  1553. if (xsrfValue) {
  1554. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  1555. }
  1556. }
  1557. // Add headers to the request
  1558. if ('setRequestHeader' in request) {
  1559. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  1560. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  1561. // Remove Content-Type if data is undefined
  1562. delete requestHeaders[key];
  1563. } else {
  1564. // Otherwise add header to the request
  1565. request.setRequestHeader(key, val);
  1566. }
  1567. });
  1568. }
  1569. // Add withCredentials to request if needed
  1570. if (!utils.isUndefined(config.withCredentials)) {
  1571. request.withCredentials = !!config.withCredentials;
  1572. }
  1573. // Add responseType to request if needed
  1574. if (responseType && responseType !== 'json') {
  1575. request.responseType = config.responseType;
  1576. }
  1577. // Handle progress if needed
  1578. if (typeof config.onDownloadProgress === 'function') {
  1579. request.addEventListener('progress', config.onDownloadProgress);
  1580. }
  1581. // Not all browsers support upload events
  1582. if (typeof config.onUploadProgress === 'function' && request.upload) {
  1583. request.upload.addEventListener('progress', config.onUploadProgress);
  1584. }
  1585. if (config.cancelToken) {
  1586. // Handle cancellation
  1587. config.cancelToken.promise.then(function onCanceled(cancel) {
  1588. if (!request) {
  1589. return;
  1590. }
  1591. request.abort();
  1592. reject(cancel);
  1593. // Clean up request
  1594. request = null;
  1595. });
  1596. }
  1597. if (!requestData) {
  1598. requestData = null;
  1599. }
  1600. // Send the request
  1601. request.send(requestData);
  1602. });
  1603. };
  1604. /***/ }),
  1605. /***/ "./node_modules/_axios@0.21.4@axios/lib/axios.js":
  1606. /*!*******************************************************!*\
  1607. !*** ./node_modules/_axios@0.21.4@axios/lib/axios.js ***!
  1608. \*******************************************************/
  1609. /*! no static exports found */
  1610. /***/ (function(module, exports, __webpack_require__) {
  1611. "use strict";
  1612. var utils = __webpack_require__(/*! ./utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  1613. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/_axios@0.21.4@axios/lib/helpers/bind.js");
  1614. var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/_axios@0.21.4@axios/lib/core/Axios.js");
  1615. var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/_axios@0.21.4@axios/lib/core/mergeConfig.js");
  1616. var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/_axios@0.21.4@axios/lib/defaults.js");
  1617. /**
  1618. * Create an instance of Axios
  1619. *
  1620. * @param {Object} defaultConfig The default config for the instance
  1621. * @return {Axios} A new instance of Axios
  1622. */
  1623. function createInstance(defaultConfig) {
  1624. var context = new Axios(defaultConfig);
  1625. var instance = bind(Axios.prototype.request, context);
  1626. // Copy axios.prototype to instance
  1627. utils.extend(instance, Axios.prototype, context);
  1628. // Copy context to instance
  1629. utils.extend(instance, context);
  1630. return instance;
  1631. }
  1632. // Create the default instance to be exported
  1633. var axios = createInstance(defaults);
  1634. // Expose Axios class to allow class inheritance
  1635. axios.Axios = Axios;
  1636. // Factory for creating new instances
  1637. axios.create = function create(instanceConfig) {
  1638. return createInstance(mergeConfig(axios.defaults, instanceConfig));
  1639. };
  1640. // Expose Cancel & CancelToken
  1641. axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/_axios@0.21.4@axios/lib/cancel/Cancel.js");
  1642. axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/_axios@0.21.4@axios/lib/cancel/CancelToken.js");
  1643. axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/_axios@0.21.4@axios/lib/cancel/isCancel.js");
  1644. // Expose all/spread
  1645. axios.all = function all(promises) {
  1646. return Promise.all(promises);
  1647. };
  1648. axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/_axios@0.21.4@axios/lib/helpers/spread.js");
  1649. // Expose isAxiosError
  1650. axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_modules/_axios@0.21.4@axios/lib/helpers/isAxiosError.js");
  1651. module.exports = axios;
  1652. // Allow use of default import syntax in TypeScript
  1653. module.exports.default = axios;
  1654. /***/ }),
  1655. /***/ "./node_modules/_axios@0.21.4@axios/lib/cancel/Cancel.js":
  1656. /*!***************************************************************!*\
  1657. !*** ./node_modules/_axios@0.21.4@axios/lib/cancel/Cancel.js ***!
  1658. \***************************************************************/
  1659. /*! no static exports found */
  1660. /***/ (function(module, exports, __webpack_require__) {
  1661. "use strict";
  1662. /**
  1663. * A `Cancel` is an object that is thrown when an operation is canceled.
  1664. *
  1665. * @class
  1666. * @param {string=} message The message.
  1667. */
  1668. function Cancel(message) {
  1669. this.message = message;
  1670. }
  1671. Cancel.prototype.toString = function toString() {
  1672. return 'Cancel' + (this.message ? ': ' + this.message : '');
  1673. };
  1674. Cancel.prototype.__CANCEL__ = true;
  1675. module.exports = Cancel;
  1676. /***/ }),
  1677. /***/ "./node_modules/_axios@0.21.4@axios/lib/cancel/CancelToken.js":
  1678. /*!********************************************************************!*\
  1679. !*** ./node_modules/_axios@0.21.4@axios/lib/cancel/CancelToken.js ***!
  1680. \********************************************************************/
  1681. /*! no static exports found */
  1682. /***/ (function(module, exports, __webpack_require__) {
  1683. "use strict";
  1684. var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/_axios@0.21.4@axios/lib/cancel/Cancel.js");
  1685. /**
  1686. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  1687. *
  1688. * @class
  1689. * @param {Function} executor The executor function.
  1690. */
  1691. function CancelToken(executor) {
  1692. if (typeof executor !== 'function') {
  1693. throw new TypeError('executor must be a function.');
  1694. }
  1695. var resolvePromise;
  1696. this.promise = new Promise(function promiseExecutor(resolve) {
  1697. resolvePromise = resolve;
  1698. });
  1699. var token = this;
  1700. executor(function cancel(message) {
  1701. if (token.reason) {
  1702. // Cancellation has already been requested
  1703. return;
  1704. }
  1705. token.reason = new Cancel(message);
  1706. resolvePromise(token.reason);
  1707. });
  1708. }
  1709. /**
  1710. * Throws a `Cancel` if cancellation has been requested.
  1711. */
  1712. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  1713. if (this.reason) {
  1714. throw this.reason;
  1715. }
  1716. };
  1717. /**
  1718. * Returns an object that contains a new `CancelToken` and a function that, when called,
  1719. * cancels the `CancelToken`.
  1720. */
  1721. CancelToken.source = function source() {
  1722. var cancel;
  1723. var token = new CancelToken(function executor(c) {
  1724. cancel = c;
  1725. });
  1726. return {
  1727. token: token,
  1728. cancel: cancel
  1729. };
  1730. };
  1731. module.exports = CancelToken;
  1732. /***/ }),
  1733. /***/ "./node_modules/_axios@0.21.4@axios/lib/cancel/isCancel.js":
  1734. /*!*****************************************************************!*\
  1735. !*** ./node_modules/_axios@0.21.4@axios/lib/cancel/isCancel.js ***!
  1736. \*****************************************************************/
  1737. /*! no static exports found */
  1738. /***/ (function(module, exports, __webpack_require__) {
  1739. "use strict";
  1740. module.exports = function isCancel(value) {
  1741. return !!(value && value.__CANCEL__);
  1742. };
  1743. /***/ }),
  1744. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/Axios.js":
  1745. /*!************************************************************!*\
  1746. !*** ./node_modules/_axios@0.21.4@axios/lib/core/Axios.js ***!
  1747. \************************************************************/
  1748. /*! no static exports found */
  1749. /***/ (function(module, exports, __webpack_require__) {
  1750. "use strict";
  1751. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  1752. var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/_axios@0.21.4@axios/lib/helpers/buildURL.js");
  1753. var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/_axios@0.21.4@axios/lib/core/InterceptorManager.js");
  1754. var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/_axios@0.21.4@axios/lib/core/dispatchRequest.js");
  1755. var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/_axios@0.21.4@axios/lib/core/mergeConfig.js");
  1756. var validator = __webpack_require__(/*! ../helpers/validator */ "./node_modules/_axios@0.21.4@axios/lib/helpers/validator.js");
  1757. var validators = validator.validators;
  1758. /**
  1759. * Create a new instance of Axios
  1760. *
  1761. * @param {Object} instanceConfig The default config for the instance
  1762. */
  1763. function Axios(instanceConfig) {
  1764. this.defaults = instanceConfig;
  1765. this.interceptors = {
  1766. request: new InterceptorManager(),
  1767. response: new InterceptorManager()
  1768. };
  1769. }
  1770. /**
  1771. * Dispatch a request
  1772. *
  1773. * @param {Object} config The config specific for this request (merged with this.defaults)
  1774. */
  1775. Axios.prototype.request = function request(config) {
  1776. /*eslint no-param-reassign:0*/
  1777. // Allow for axios('example/url'[, config]) a la fetch API
  1778. if (typeof config === 'string') {
  1779. config = arguments[1] || {};
  1780. config.url = arguments[0];
  1781. } else {
  1782. config = config || {};
  1783. }
  1784. config = mergeConfig(this.defaults, config);
  1785. // Set config.method
  1786. if (config.method) {
  1787. config.method = config.method.toLowerCase();
  1788. } else if (this.defaults.method) {
  1789. config.method = this.defaults.method.toLowerCase();
  1790. } else {
  1791. config.method = 'get';
  1792. }
  1793. var transitional = config.transitional;
  1794. if (transitional !== undefined) {
  1795. validator.assertOptions(transitional, {
  1796. silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
  1797. forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
  1798. clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
  1799. }, false);
  1800. }
  1801. // filter out skipped interceptors
  1802. var requestInterceptorChain = [];
  1803. var synchronousRequestInterceptors = true;
  1804. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  1805. if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
  1806. return;
  1807. }
  1808. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  1809. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  1810. });
  1811. var responseInterceptorChain = [];
  1812. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  1813. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  1814. });
  1815. var promise;
  1816. if (!synchronousRequestInterceptors) {
  1817. var chain = [dispatchRequest, undefined];
  1818. Array.prototype.unshift.apply(chain, requestInterceptorChain);
  1819. chain = chain.concat(responseInterceptorChain);
  1820. promise = Promise.resolve(config);
  1821. while (chain.length) {
  1822. promise = promise.then(chain.shift(), chain.shift());
  1823. }
  1824. return promise;
  1825. }
  1826. var newConfig = config;
  1827. while (requestInterceptorChain.length) {
  1828. var onFulfilled = requestInterceptorChain.shift();
  1829. var onRejected = requestInterceptorChain.shift();
  1830. try {
  1831. newConfig = onFulfilled(newConfig);
  1832. } catch (error) {
  1833. onRejected(error);
  1834. break;
  1835. }
  1836. }
  1837. try {
  1838. promise = dispatchRequest(newConfig);
  1839. } catch (error) {
  1840. return Promise.reject(error);
  1841. }
  1842. while (responseInterceptorChain.length) {
  1843. promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
  1844. }
  1845. return promise;
  1846. };
  1847. Axios.prototype.getUri = function getUri(config) {
  1848. config = mergeConfig(this.defaults, config);
  1849. return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
  1850. };
  1851. // Provide aliases for supported request methods
  1852. utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  1853. /*eslint func-names:0*/
  1854. Axios.prototype[method] = function(url, config) {
  1855. return this.request(mergeConfig(config || {}, {
  1856. method: method,
  1857. url: url,
  1858. data: (config || {}).data
  1859. }));
  1860. };
  1861. });
  1862. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  1863. /*eslint func-names:0*/
  1864. Axios.prototype[method] = function(url, data, config) {
  1865. return this.request(mergeConfig(config || {}, {
  1866. method: method,
  1867. url: url,
  1868. data: data
  1869. }));
  1870. };
  1871. });
  1872. module.exports = Axios;
  1873. /***/ }),
  1874. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/InterceptorManager.js":
  1875. /*!*************************************************************************!*\
  1876. !*** ./node_modules/_axios@0.21.4@axios/lib/core/InterceptorManager.js ***!
  1877. \*************************************************************************/
  1878. /*! no static exports found */
  1879. /***/ (function(module, exports, __webpack_require__) {
  1880. "use strict";
  1881. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  1882. function InterceptorManager() {
  1883. this.handlers = [];
  1884. }
  1885. /**
  1886. * Add a new interceptor to the stack
  1887. *
  1888. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  1889. * @param {Function} rejected The function to handle `reject` for a `Promise`
  1890. *
  1891. * @return {Number} An ID used to remove interceptor later
  1892. */
  1893. InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
  1894. this.handlers.push({
  1895. fulfilled: fulfilled,
  1896. rejected: rejected,
  1897. synchronous: options ? options.synchronous : false,
  1898. runWhen: options ? options.runWhen : null
  1899. });
  1900. return this.handlers.length - 1;
  1901. };
  1902. /**
  1903. * Remove an interceptor from the stack
  1904. *
  1905. * @param {Number} id The ID that was returned by `use`
  1906. */
  1907. InterceptorManager.prototype.eject = function eject(id) {
  1908. if (this.handlers[id]) {
  1909. this.handlers[id] = null;
  1910. }
  1911. };
  1912. /**
  1913. * Iterate over all the registered interceptors
  1914. *
  1915. * This method is particularly useful for skipping over any
  1916. * interceptors that may have become `null` calling `eject`.
  1917. *
  1918. * @param {Function} fn The function to call for each interceptor
  1919. */
  1920. InterceptorManager.prototype.forEach = function forEach(fn) {
  1921. utils.forEach(this.handlers, function forEachHandler(h) {
  1922. if (h !== null) {
  1923. fn(h);
  1924. }
  1925. });
  1926. };
  1927. module.exports = InterceptorManager;
  1928. /***/ }),
  1929. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/buildFullPath.js":
  1930. /*!********************************************************************!*\
  1931. !*** ./node_modules/_axios@0.21.4@axios/lib/core/buildFullPath.js ***!
  1932. \********************************************************************/
  1933. /*! no static exports found */
  1934. /***/ (function(module, exports, __webpack_require__) {
  1935. "use strict";
  1936. var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./node_modules/_axios@0.21.4@axios/lib/helpers/isAbsoluteURL.js");
  1937. var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./node_modules/_axios@0.21.4@axios/lib/helpers/combineURLs.js");
  1938. /**
  1939. * Creates a new URL by combining the baseURL with the requestedURL,
  1940. * only when the requestedURL is not already an absolute URL.
  1941. * If the requestURL is absolute, this function returns the requestedURL untouched.
  1942. *
  1943. * @param {string} baseURL The base URL
  1944. * @param {string} requestedURL Absolute or relative URL to combine
  1945. * @returns {string} The combined full path
  1946. */
  1947. module.exports = function buildFullPath(baseURL, requestedURL) {
  1948. if (baseURL && !isAbsoluteURL(requestedURL)) {
  1949. return combineURLs(baseURL, requestedURL);
  1950. }
  1951. return requestedURL;
  1952. };
  1953. /***/ }),
  1954. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/createError.js":
  1955. /*!******************************************************************!*\
  1956. !*** ./node_modules/_axios@0.21.4@axios/lib/core/createError.js ***!
  1957. \******************************************************************/
  1958. /*! no static exports found */
  1959. /***/ (function(module, exports, __webpack_require__) {
  1960. "use strict";
  1961. var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/_axios@0.21.4@axios/lib/core/enhanceError.js");
  1962. /**
  1963. * Create an Error with the specified message, config, error code, request and response.
  1964. *
  1965. * @param {string} message The error message.
  1966. * @param {Object} config The config.
  1967. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  1968. * @param {Object} [request] The request.
  1969. * @param {Object} [response] The response.
  1970. * @returns {Error} The created error.
  1971. */
  1972. module.exports = function createError(message, config, code, request, response) {
  1973. var error = new Error(message);
  1974. return enhanceError(error, config, code, request, response);
  1975. };
  1976. /***/ }),
  1977. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/dispatchRequest.js":
  1978. /*!**********************************************************************!*\
  1979. !*** ./node_modules/_axios@0.21.4@axios/lib/core/dispatchRequest.js ***!
  1980. \**********************************************************************/
  1981. /*! no static exports found */
  1982. /***/ (function(module, exports, __webpack_require__) {
  1983. "use strict";
  1984. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  1985. var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/_axios@0.21.4@axios/lib/core/transformData.js");
  1986. var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/_axios@0.21.4@axios/lib/cancel/isCancel.js");
  1987. var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/_axios@0.21.4@axios/lib/defaults.js");
  1988. /**
  1989. * Throws a `Cancel` if cancellation has been requested.
  1990. */
  1991. function throwIfCancellationRequested(config) {
  1992. if (config.cancelToken) {
  1993. config.cancelToken.throwIfRequested();
  1994. }
  1995. }
  1996. /**
  1997. * Dispatch a request to the server using the configured adapter.
  1998. *
  1999. * @param {object} config The config that is to be used for the request
  2000. * @returns {Promise} The Promise to be fulfilled
  2001. */
  2002. module.exports = function dispatchRequest(config) {
  2003. throwIfCancellationRequested(config);
  2004. // Ensure headers exist
  2005. config.headers = config.headers || {};
  2006. // Transform request data
  2007. config.data = transformData.call(
  2008. config,
  2009. config.data,
  2010. config.headers,
  2011. config.transformRequest
  2012. );
  2013. // Flatten headers
  2014. config.headers = utils.merge(
  2015. config.headers.common || {},
  2016. config.headers[config.method] || {},
  2017. config.headers
  2018. );
  2019. utils.forEach(
  2020. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  2021. function cleanHeaderConfig(method) {
  2022. delete config.headers[method];
  2023. }
  2024. );
  2025. var adapter = config.adapter || defaults.adapter;
  2026. return adapter(config).then(function onAdapterResolution(response) {
  2027. throwIfCancellationRequested(config);
  2028. // Transform response data
  2029. response.data = transformData.call(
  2030. config,
  2031. response.data,
  2032. response.headers,
  2033. config.transformResponse
  2034. );
  2035. return response;
  2036. }, function onAdapterRejection(reason) {
  2037. if (!isCancel(reason)) {
  2038. throwIfCancellationRequested(config);
  2039. // Transform response data
  2040. if (reason && reason.response) {
  2041. reason.response.data = transformData.call(
  2042. config,
  2043. reason.response.data,
  2044. reason.response.headers,
  2045. config.transformResponse
  2046. );
  2047. }
  2048. }
  2049. return Promise.reject(reason);
  2050. });
  2051. };
  2052. /***/ }),
  2053. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/enhanceError.js":
  2054. /*!*******************************************************************!*\
  2055. !*** ./node_modules/_axios@0.21.4@axios/lib/core/enhanceError.js ***!
  2056. \*******************************************************************/
  2057. /*! no static exports found */
  2058. /***/ (function(module, exports, __webpack_require__) {
  2059. "use strict";
  2060. /**
  2061. * Update an Error with the specified config, error code, and response.
  2062. *
  2063. * @param {Error} error The error to update.
  2064. * @param {Object} config The config.
  2065. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  2066. * @param {Object} [request] The request.
  2067. * @param {Object} [response] The response.
  2068. * @returns {Error} The error.
  2069. */
  2070. module.exports = function enhanceError(error, config, code, request, response) {
  2071. error.config = config;
  2072. if (code) {
  2073. error.code = code;
  2074. }
  2075. error.request = request;
  2076. error.response = response;
  2077. error.isAxiosError = true;
  2078. error.toJSON = function toJSON() {
  2079. return {
  2080. // Standard
  2081. message: this.message,
  2082. name: this.name,
  2083. // Microsoft
  2084. description: this.description,
  2085. number: this.number,
  2086. // Mozilla
  2087. fileName: this.fileName,
  2088. lineNumber: this.lineNumber,
  2089. columnNumber: this.columnNumber,
  2090. stack: this.stack,
  2091. // Axios
  2092. config: this.config,
  2093. code: this.code
  2094. };
  2095. };
  2096. return error;
  2097. };
  2098. /***/ }),
  2099. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/mergeConfig.js":
  2100. /*!******************************************************************!*\
  2101. !*** ./node_modules/_axios@0.21.4@axios/lib/core/mergeConfig.js ***!
  2102. \******************************************************************/
  2103. /*! no static exports found */
  2104. /***/ (function(module, exports, __webpack_require__) {
  2105. "use strict";
  2106. var utils = __webpack_require__(/*! ../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2107. /**
  2108. * Config-specific merge-function which creates a new config-object
  2109. * by merging two configuration objects together.
  2110. *
  2111. * @param {Object} config1
  2112. * @param {Object} config2
  2113. * @returns {Object} New object resulting from merging config2 to config1
  2114. */
  2115. module.exports = function mergeConfig(config1, config2) {
  2116. // eslint-disable-next-line no-param-reassign
  2117. config2 = config2 || {};
  2118. var config = {};
  2119. var valueFromConfig2Keys = ['url', 'method', 'data'];
  2120. var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
  2121. var defaultToConfig2Keys = [
  2122. 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
  2123. 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
  2124. 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
  2125. 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
  2126. 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
  2127. ];
  2128. var directMergeKeys = ['validateStatus'];
  2129. function getMergedValue(target, source) {
  2130. if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
  2131. return utils.merge(target, source);
  2132. } else if (utils.isPlainObject(source)) {
  2133. return utils.merge({}, source);
  2134. } else if (utils.isArray(source)) {
  2135. return source.slice();
  2136. }
  2137. return source;
  2138. }
  2139. function mergeDeepProperties(prop) {
  2140. if (!utils.isUndefined(config2[prop])) {
  2141. config[prop] = getMergedValue(config1[prop], config2[prop]);
  2142. } else if (!utils.isUndefined(config1[prop])) {
  2143. config[prop] = getMergedValue(undefined, config1[prop]);
  2144. }
  2145. }
  2146. utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
  2147. if (!utils.isUndefined(config2[prop])) {
  2148. config[prop] = getMergedValue(undefined, config2[prop]);
  2149. }
  2150. });
  2151. utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
  2152. utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
  2153. if (!utils.isUndefined(config2[prop])) {
  2154. config[prop] = getMergedValue(undefined, config2[prop]);
  2155. } else if (!utils.isUndefined(config1[prop])) {
  2156. config[prop] = getMergedValue(undefined, config1[prop]);
  2157. }
  2158. });
  2159. utils.forEach(directMergeKeys, function merge(prop) {
  2160. if (prop in config2) {
  2161. config[prop] = getMergedValue(config1[prop], config2[prop]);
  2162. } else if (prop in config1) {
  2163. config[prop] = getMergedValue(undefined, config1[prop]);
  2164. }
  2165. });
  2166. var axiosKeys = valueFromConfig2Keys
  2167. .concat(mergeDeepPropertiesKeys)
  2168. .concat(defaultToConfig2Keys)
  2169. .concat(directMergeKeys);
  2170. var otherKeys = Object
  2171. .keys(config1)
  2172. .concat(Object.keys(config2))
  2173. .filter(function filterAxiosKeys(key) {
  2174. return axiosKeys.indexOf(key) === -1;
  2175. });
  2176. utils.forEach(otherKeys, mergeDeepProperties);
  2177. return config;
  2178. };
  2179. /***/ }),
  2180. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/settle.js":
  2181. /*!*************************************************************!*\
  2182. !*** ./node_modules/_axios@0.21.4@axios/lib/core/settle.js ***!
  2183. \*************************************************************/
  2184. /*! no static exports found */
  2185. /***/ (function(module, exports, __webpack_require__) {
  2186. "use strict";
  2187. var createError = __webpack_require__(/*! ./createError */ "./node_modules/_axios@0.21.4@axios/lib/core/createError.js");
  2188. /**
  2189. * Resolve or reject a Promise based on response status.
  2190. *
  2191. * @param {Function} resolve A function that resolves the promise.
  2192. * @param {Function} reject A function that rejects the promise.
  2193. * @param {object} response The response.
  2194. */
  2195. module.exports = function settle(resolve, reject, response) {
  2196. var validateStatus = response.config.validateStatus;
  2197. if (!response.status || !validateStatus || validateStatus(response.status)) {
  2198. resolve(response);
  2199. } else {
  2200. reject(createError(
  2201. 'Request failed with status code ' + response.status,
  2202. response.config,
  2203. null,
  2204. response.request,
  2205. response
  2206. ));
  2207. }
  2208. };
  2209. /***/ }),
  2210. /***/ "./node_modules/_axios@0.21.4@axios/lib/core/transformData.js":
  2211. /*!********************************************************************!*\
  2212. !*** ./node_modules/_axios@0.21.4@axios/lib/core/transformData.js ***!
  2213. \********************************************************************/
  2214. /*! no static exports found */
  2215. /***/ (function(module, exports, __webpack_require__) {
  2216. "use strict";
  2217. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2218. var defaults = __webpack_require__(/*! ./../defaults */ "./node_modules/_axios@0.21.4@axios/lib/defaults.js");
  2219. /**
  2220. * Transform the data for a request or a response
  2221. *
  2222. * @param {Object|String} data The data to be transformed
  2223. * @param {Array} headers The headers for the request or response
  2224. * @param {Array|Function} fns A single function or Array of functions
  2225. * @returns {*} The resulting transformed data
  2226. */
  2227. module.exports = function transformData(data, headers, fns) {
  2228. var context = this || defaults;
  2229. /*eslint no-param-reassign:0*/
  2230. utils.forEach(fns, function transform(fn) {
  2231. data = fn.call(context, data, headers);
  2232. });
  2233. return data;
  2234. };
  2235. /***/ }),
  2236. /***/ "./node_modules/_axios@0.21.4@axios/lib/defaults.js":
  2237. /*!**********************************************************!*\
  2238. !*** ./node_modules/_axios@0.21.4@axios/lib/defaults.js ***!
  2239. \**********************************************************/
  2240. /*! no static exports found */
  2241. /***/ (function(module, exports, __webpack_require__) {
  2242. "use strict";
  2243. /* WEBPACK VAR INJECTION */(function(process) {
  2244. var utils = __webpack_require__(/*! ./utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2245. var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/_axios@0.21.4@axios/lib/helpers/normalizeHeaderName.js");
  2246. var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "./node_modules/_axios@0.21.4@axios/lib/core/enhanceError.js");
  2247. var DEFAULT_CONTENT_TYPE = {
  2248. 'Content-Type': 'application/x-www-form-urlencoded'
  2249. };
  2250. function setContentTypeIfUnset(headers, value) {
  2251. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  2252. headers['Content-Type'] = value;
  2253. }
  2254. }
  2255. function getDefaultAdapter() {
  2256. var adapter;
  2257. if (typeof XMLHttpRequest !== 'undefined') {
  2258. // For browsers use XHR adapter
  2259. adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/_axios@0.21.4@axios/lib/adapters/xhr.js");
  2260. } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
  2261. // For node use HTTP adapter
  2262. adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/_axios@0.21.4@axios/lib/adapters/xhr.js");
  2263. }
  2264. return adapter;
  2265. }
  2266. function stringifySafely(rawValue, parser, encoder) {
  2267. if (utils.isString(rawValue)) {
  2268. try {
  2269. (parser || JSON.parse)(rawValue);
  2270. return utils.trim(rawValue);
  2271. } catch (e) {
  2272. if (e.name !== 'SyntaxError') {
  2273. throw e;
  2274. }
  2275. }
  2276. }
  2277. return (encoder || JSON.stringify)(rawValue);
  2278. }
  2279. var defaults = {
  2280. transitional: {
  2281. silentJSONParsing: true,
  2282. forcedJSONParsing: true,
  2283. clarifyTimeoutError: false
  2284. },
  2285. adapter: getDefaultAdapter(),
  2286. transformRequest: [function transformRequest(data, headers) {
  2287. normalizeHeaderName(headers, 'Accept');
  2288. normalizeHeaderName(headers, 'Content-Type');
  2289. if (utils.isFormData(data) ||
  2290. utils.isArrayBuffer(data) ||
  2291. utils.isBuffer(data) ||
  2292. utils.isStream(data) ||
  2293. utils.isFile(data) ||
  2294. utils.isBlob(data)
  2295. ) {
  2296. return data;
  2297. }
  2298. if (utils.isArrayBufferView(data)) {
  2299. return data.buffer;
  2300. }
  2301. if (utils.isURLSearchParams(data)) {
  2302. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  2303. return data.toString();
  2304. }
  2305. if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
  2306. setContentTypeIfUnset(headers, 'application/json');
  2307. return stringifySafely(data);
  2308. }
  2309. return data;
  2310. }],
  2311. transformResponse: [function transformResponse(data) {
  2312. var transitional = this.transitional;
  2313. var silentJSONParsing = transitional && transitional.silentJSONParsing;
  2314. var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  2315. var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
  2316. if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
  2317. try {
  2318. return JSON.parse(data);
  2319. } catch (e) {
  2320. if (strictJSONParsing) {
  2321. if (e.name === 'SyntaxError') {
  2322. throw enhanceError(e, this, 'E_JSON_PARSE');
  2323. }
  2324. throw e;
  2325. }
  2326. }
  2327. }
  2328. return data;
  2329. }],
  2330. /**
  2331. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  2332. * timeout is not created.
  2333. */
  2334. timeout: 0,
  2335. xsrfCookieName: 'XSRF-TOKEN',
  2336. xsrfHeaderName: 'X-XSRF-TOKEN',
  2337. maxContentLength: -1,
  2338. maxBodyLength: -1,
  2339. validateStatus: function validateStatus(status) {
  2340. return status >= 200 && status < 300;
  2341. }
  2342. };
  2343. defaults.headers = {
  2344. common: {
  2345. 'Accept': 'application/json, text/plain, */*'
  2346. }
  2347. };
  2348. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  2349. defaults.headers[method] = {};
  2350. });
  2351. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  2352. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  2353. });
  2354. module.exports = defaults;
  2355. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../_node-libs-browser@2.2.1@node-libs-browser/mock/process.js */ "./node_modules/_node-libs-browser@2.2.1@node-libs-browser/mock/process.js")))
  2356. /***/ }),
  2357. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/bind.js":
  2358. /*!**************************************************************!*\
  2359. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/bind.js ***!
  2360. \**************************************************************/
  2361. /*! no static exports found */
  2362. /***/ (function(module, exports, __webpack_require__) {
  2363. "use strict";
  2364. module.exports = function bind(fn, thisArg) {
  2365. return function wrap() {
  2366. var args = new Array(arguments.length);
  2367. for (var i = 0; i < args.length; i++) {
  2368. args[i] = arguments[i];
  2369. }
  2370. return fn.apply(thisArg, args);
  2371. };
  2372. };
  2373. /***/ }),
  2374. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/buildURL.js":
  2375. /*!******************************************************************!*\
  2376. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/buildURL.js ***!
  2377. \******************************************************************/
  2378. /*! no static exports found */
  2379. /***/ (function(module, exports, __webpack_require__) {
  2380. "use strict";
  2381. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2382. function encode(val) {
  2383. return encodeURIComponent(val).
  2384. replace(/%3A/gi, ':').
  2385. replace(/%24/g, '$').
  2386. replace(/%2C/gi, ',').
  2387. replace(/%20/g, '+').
  2388. replace(/%5B/gi, '[').
  2389. replace(/%5D/gi, ']');
  2390. }
  2391. /**
  2392. * Build a URL by appending params to the end
  2393. *
  2394. * @param {string} url The base of the url (e.g., http://www.google.com)
  2395. * @param {object} [params] The params to be appended
  2396. * @returns {string} The formatted url
  2397. */
  2398. module.exports = function buildURL(url, params, paramsSerializer) {
  2399. /*eslint no-param-reassign:0*/
  2400. if (!params) {
  2401. return url;
  2402. }
  2403. var serializedParams;
  2404. if (paramsSerializer) {
  2405. serializedParams = paramsSerializer(params);
  2406. } else if (utils.isURLSearchParams(params)) {
  2407. serializedParams = params.toString();
  2408. } else {
  2409. var parts = [];
  2410. utils.forEach(params, function serialize(val, key) {
  2411. if (val === null || typeof val === 'undefined') {
  2412. return;
  2413. }
  2414. if (utils.isArray(val)) {
  2415. key = key + '[]';
  2416. } else {
  2417. val = [val];
  2418. }
  2419. utils.forEach(val, function parseValue(v) {
  2420. if (utils.isDate(v)) {
  2421. v = v.toISOString();
  2422. } else if (utils.isObject(v)) {
  2423. v = JSON.stringify(v);
  2424. }
  2425. parts.push(encode(key) + '=' + encode(v));
  2426. });
  2427. });
  2428. serializedParams = parts.join('&');
  2429. }
  2430. if (serializedParams) {
  2431. var hashmarkIndex = url.indexOf('#');
  2432. if (hashmarkIndex !== -1) {
  2433. url = url.slice(0, hashmarkIndex);
  2434. }
  2435. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  2436. }
  2437. return url;
  2438. };
  2439. /***/ }),
  2440. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/combineURLs.js":
  2441. /*!*********************************************************************!*\
  2442. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/combineURLs.js ***!
  2443. \*********************************************************************/
  2444. /*! no static exports found */
  2445. /***/ (function(module, exports, __webpack_require__) {
  2446. "use strict";
  2447. /**
  2448. * Creates a new URL by combining the specified URLs
  2449. *
  2450. * @param {string} baseURL The base URL
  2451. * @param {string} relativeURL The relative URL
  2452. * @returns {string} The combined URL
  2453. */
  2454. module.exports = function combineURLs(baseURL, relativeURL) {
  2455. return relativeURL
  2456. ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
  2457. : baseURL;
  2458. };
  2459. /***/ }),
  2460. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/cookies.js":
  2461. /*!*****************************************************************!*\
  2462. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/cookies.js ***!
  2463. \*****************************************************************/
  2464. /*! no static exports found */
  2465. /***/ (function(module, exports, __webpack_require__) {
  2466. "use strict";
  2467. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2468. module.exports = (
  2469. utils.isStandardBrowserEnv() ?
  2470. // Standard browser envs support document.cookie
  2471. (function standardBrowserEnv() {
  2472. return {
  2473. write: function write(name, value, expires, path, domain, secure) {
  2474. var cookie = [];
  2475. cookie.push(name + '=' + encodeURIComponent(value));
  2476. if (utils.isNumber(expires)) {
  2477. cookie.push('expires=' + new Date(expires).toGMTString());
  2478. }
  2479. if (utils.isString(path)) {
  2480. cookie.push('path=' + path);
  2481. }
  2482. if (utils.isString(domain)) {
  2483. cookie.push('domain=' + domain);
  2484. }
  2485. if (secure === true) {
  2486. cookie.push('secure');
  2487. }
  2488. document.cookie = cookie.join('; ');
  2489. },
  2490. read: function read(name) {
  2491. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  2492. return (match ? decodeURIComponent(match[3]) : null);
  2493. },
  2494. remove: function remove(name) {
  2495. this.write(name, '', Date.now() - 86400000);
  2496. }
  2497. };
  2498. })() :
  2499. // Non standard browser env (web workers, react-native) lack needed support.
  2500. (function nonStandardBrowserEnv() {
  2501. return {
  2502. write: function write() {},
  2503. read: function read() { return null; },
  2504. remove: function remove() {}
  2505. };
  2506. })()
  2507. );
  2508. /***/ }),
  2509. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/isAbsoluteURL.js":
  2510. /*!***********************************************************************!*\
  2511. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/isAbsoluteURL.js ***!
  2512. \***********************************************************************/
  2513. /*! no static exports found */
  2514. /***/ (function(module, exports, __webpack_require__) {
  2515. "use strict";
  2516. /**
  2517. * Determines whether the specified URL is absolute
  2518. *
  2519. * @param {string} url The URL to test
  2520. * @returns {boolean} True if the specified URL is absolute, otherwise false
  2521. */
  2522. module.exports = function isAbsoluteURL(url) {
  2523. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  2524. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  2525. // by any combination of letters, digits, plus, period, or hyphen.
  2526. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  2527. };
  2528. /***/ }),
  2529. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/isAxiosError.js":
  2530. /*!**********************************************************************!*\
  2531. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/isAxiosError.js ***!
  2532. \**********************************************************************/
  2533. /*! no static exports found */
  2534. /***/ (function(module, exports, __webpack_require__) {
  2535. "use strict";
  2536. /**
  2537. * Determines whether the payload is an error thrown by Axios
  2538. *
  2539. * @param {*} payload The value to test
  2540. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  2541. */
  2542. module.exports = function isAxiosError(payload) {
  2543. return (typeof payload === 'object') && (payload.isAxiosError === true);
  2544. };
  2545. /***/ }),
  2546. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/isURLSameOrigin.js":
  2547. /*!*************************************************************************!*\
  2548. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/isURLSameOrigin.js ***!
  2549. \*************************************************************************/
  2550. /*! no static exports found */
  2551. /***/ (function(module, exports, __webpack_require__) {
  2552. "use strict";
  2553. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2554. module.exports = (
  2555. utils.isStandardBrowserEnv() ?
  2556. // Standard browser envs have full support of the APIs needed to test
  2557. // whether the request URL is of the same origin as current location.
  2558. (function standardBrowserEnv() {
  2559. var msie = /(msie|trident)/i.test(navigator.userAgent);
  2560. var urlParsingNode = document.createElement('a');
  2561. var originURL;
  2562. /**
  2563. * Parse a URL to discover it's components
  2564. *
  2565. * @param {String} url The URL to be parsed
  2566. * @returns {Object}
  2567. */
  2568. function resolveURL(url) {
  2569. var href = url;
  2570. if (msie) {
  2571. // IE needs attribute set twice to normalize properties
  2572. urlParsingNode.setAttribute('href', href);
  2573. href = urlParsingNode.href;
  2574. }
  2575. urlParsingNode.setAttribute('href', href);
  2576. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  2577. return {
  2578. href: urlParsingNode.href,
  2579. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  2580. host: urlParsingNode.host,
  2581. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  2582. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  2583. hostname: urlParsingNode.hostname,
  2584. port: urlParsingNode.port,
  2585. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  2586. urlParsingNode.pathname :
  2587. '/' + urlParsingNode.pathname
  2588. };
  2589. }
  2590. originURL = resolveURL(window.location.href);
  2591. /**
  2592. * Determine if a URL shares the same origin as the current location
  2593. *
  2594. * @param {String} requestURL The URL to test
  2595. * @returns {boolean} True if URL shares the same origin, otherwise false
  2596. */
  2597. return function isURLSameOrigin(requestURL) {
  2598. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  2599. return (parsed.protocol === originURL.protocol &&
  2600. parsed.host === originURL.host);
  2601. };
  2602. })() :
  2603. // Non standard browser envs (web workers, react-native) lack needed support.
  2604. (function nonStandardBrowserEnv() {
  2605. return function isURLSameOrigin() {
  2606. return true;
  2607. };
  2608. })()
  2609. );
  2610. /***/ }),
  2611. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/normalizeHeaderName.js":
  2612. /*!*****************************************************************************!*\
  2613. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/normalizeHeaderName.js ***!
  2614. \*****************************************************************************/
  2615. /*! no static exports found */
  2616. /***/ (function(module, exports, __webpack_require__) {
  2617. "use strict";
  2618. var utils = __webpack_require__(/*! ../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2619. module.exports = function normalizeHeaderName(headers, normalizedName) {
  2620. utils.forEach(headers, function processHeader(value, name) {
  2621. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  2622. headers[normalizedName] = value;
  2623. delete headers[name];
  2624. }
  2625. });
  2626. };
  2627. /***/ }),
  2628. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/parseHeaders.js":
  2629. /*!**********************************************************************!*\
  2630. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/parseHeaders.js ***!
  2631. \**********************************************************************/
  2632. /*! no static exports found */
  2633. /***/ (function(module, exports, __webpack_require__) {
  2634. "use strict";
  2635. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/_axios@0.21.4@axios/lib/utils.js");
  2636. // Headers whose duplicates are ignored by node
  2637. // c.f. https://nodejs.org/api/http.html#http_message_headers
  2638. var ignoreDuplicateOf = [
  2639. 'age', 'authorization', 'content-length', 'content-type', 'etag',
  2640. 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  2641. 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  2642. 'referer', 'retry-after', 'user-agent'
  2643. ];
  2644. /**
  2645. * Parse headers into an object
  2646. *
  2647. * ```
  2648. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  2649. * Content-Type: application/json
  2650. * Connection: keep-alive
  2651. * Transfer-Encoding: chunked
  2652. * ```
  2653. *
  2654. * @param {String} headers Headers needing to be parsed
  2655. * @returns {Object} Headers parsed into an object
  2656. */
  2657. module.exports = function parseHeaders(headers) {
  2658. var parsed = {};
  2659. var key;
  2660. var val;
  2661. var i;
  2662. if (!headers) { return parsed; }
  2663. utils.forEach(headers.split('\n'), function parser(line) {
  2664. i = line.indexOf(':');
  2665. key = utils.trim(line.substr(0, i)).toLowerCase();
  2666. val = utils.trim(line.substr(i + 1));
  2667. if (key) {
  2668. if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
  2669. return;
  2670. }
  2671. if (key === 'set-cookie') {
  2672. parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
  2673. } else {
  2674. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  2675. }
  2676. }
  2677. });
  2678. return parsed;
  2679. };
  2680. /***/ }),
  2681. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/spread.js":
  2682. /*!****************************************************************!*\
  2683. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/spread.js ***!
  2684. \****************************************************************/
  2685. /*! no static exports found */
  2686. /***/ (function(module, exports, __webpack_require__) {
  2687. "use strict";
  2688. /**
  2689. * Syntactic sugar for invoking a function and expanding an array for arguments.
  2690. *
  2691. * Common use case would be to use `Function.prototype.apply`.
  2692. *
  2693. * ```js
  2694. * function f(x, y, z) {}
  2695. * var args = [1, 2, 3];
  2696. * f.apply(null, args);
  2697. * ```
  2698. *
  2699. * With `spread` this example can be re-written.
  2700. *
  2701. * ```js
  2702. * spread(function(x, y, z) {})([1, 2, 3]);
  2703. * ```
  2704. *
  2705. * @param {Function} callback
  2706. * @returns {Function}
  2707. */
  2708. module.exports = function spread(callback) {
  2709. return function wrap(arr) {
  2710. return callback.apply(null, arr);
  2711. };
  2712. };
  2713. /***/ }),
  2714. /***/ "./node_modules/_axios@0.21.4@axios/lib/helpers/validator.js":
  2715. /*!*******************************************************************!*\
  2716. !*** ./node_modules/_axios@0.21.4@axios/lib/helpers/validator.js ***!
  2717. \*******************************************************************/
  2718. /*! no static exports found */
  2719. /***/ (function(module, exports, __webpack_require__) {
  2720. "use strict";
  2721. var pkg = __webpack_require__(/*! ./../../package.json */ "./node_modules/_axios@0.21.4@axios/package.json");
  2722. var validators = {};
  2723. // eslint-disable-next-line func-names
  2724. ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
  2725. validators[type] = function validator(thing) {
  2726. return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  2727. };
  2728. });
  2729. var deprecatedWarnings = {};
  2730. var currentVerArr = pkg.version.split('.');
  2731. /**
  2732. * Compare package versions
  2733. * @param {string} version
  2734. * @param {string?} thanVersion
  2735. * @returns {boolean}
  2736. */
  2737. function isOlderVersion(version, thanVersion) {
  2738. var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
  2739. var destVer = version.split('.');
  2740. for (var i = 0; i < 3; i++) {
  2741. if (pkgVersionArr[i] > destVer[i]) {
  2742. return true;
  2743. } else if (pkgVersionArr[i] < destVer[i]) {
  2744. return false;
  2745. }
  2746. }
  2747. return false;
  2748. }
  2749. /**
  2750. * Transitional option validator
  2751. * @param {function|boolean?} validator
  2752. * @param {string?} version
  2753. * @param {string} message
  2754. * @returns {function}
  2755. */
  2756. validators.transitional = function transitional(validator, version, message) {
  2757. var isDeprecated = version && isOlderVersion(version);
  2758. function formatMessage(opt, desc) {
  2759. return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
  2760. }
  2761. // eslint-disable-next-line func-names
  2762. return function(value, opt, opts) {
  2763. if (validator === false) {
  2764. throw new Error(formatMessage(opt, ' has been removed in ' + version));
  2765. }
  2766. if (isDeprecated && !deprecatedWarnings[opt]) {
  2767. deprecatedWarnings[opt] = true;
  2768. // eslint-disable-next-line no-console
  2769. console.warn(
  2770. formatMessage(
  2771. opt,
  2772. ' has been deprecated since v' + version + ' and will be removed in the near future'
  2773. )
  2774. );
  2775. }
  2776. return validator ? validator(value, opt, opts) : true;
  2777. };
  2778. };
  2779. /**
  2780. * Assert object's properties type
  2781. * @param {object} options
  2782. * @param {object} schema
  2783. * @param {boolean?} allowUnknown
  2784. */
  2785. function assertOptions(options, schema, allowUnknown) {
  2786. if (typeof options !== 'object') {
  2787. throw new TypeError('options must be an object');
  2788. }
  2789. var keys = Object.keys(options);
  2790. var i = keys.length;
  2791. while (i-- > 0) {
  2792. var opt = keys[i];
  2793. var validator = schema[opt];
  2794. if (validator) {
  2795. var value = options[opt];
  2796. var result = value === undefined || validator(value, opt, options);
  2797. if (result !== true) {
  2798. throw new TypeError('option ' + opt + ' must be ' + result);
  2799. }
  2800. continue;
  2801. }
  2802. if (allowUnknown !== true) {
  2803. throw Error('Unknown option ' + opt);
  2804. }
  2805. }
  2806. }
  2807. module.exports = {
  2808. isOlderVersion: isOlderVersion,
  2809. assertOptions: assertOptions,
  2810. validators: validators
  2811. };
  2812. /***/ }),
  2813. /***/ "./node_modules/_axios@0.21.4@axios/lib/utils.js":
  2814. /*!*******************************************************!*\
  2815. !*** ./node_modules/_axios@0.21.4@axios/lib/utils.js ***!
  2816. \*******************************************************/
  2817. /*! no static exports found */
  2818. /***/ (function(module, exports, __webpack_require__) {
  2819. "use strict";
  2820. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/_axios@0.21.4@axios/lib/helpers/bind.js");
  2821. // utils is a library of generic helper functions non-specific to axios
  2822. var toString = Object.prototype.toString;
  2823. /**
  2824. * Determine if a value is an Array
  2825. *
  2826. * @param {Object} val The value to test
  2827. * @returns {boolean} True if value is an Array, otherwise false
  2828. */
  2829. function isArray(val) {
  2830. return toString.call(val) === '[object Array]';
  2831. }
  2832. /**
  2833. * Determine if a value is undefined
  2834. *
  2835. * @param {Object} val The value to test
  2836. * @returns {boolean} True if the value is undefined, otherwise false
  2837. */
  2838. function isUndefined(val) {
  2839. return typeof val === 'undefined';
  2840. }
  2841. /**
  2842. * Determine if a value is a Buffer
  2843. *
  2844. * @param {Object} val The value to test
  2845. * @returns {boolean} True if value is a Buffer, otherwise false
  2846. */
  2847. function isBuffer(val) {
  2848. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
  2849. && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
  2850. }
  2851. /**
  2852. * Determine if a value is an ArrayBuffer
  2853. *
  2854. * @param {Object} val The value to test
  2855. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  2856. */
  2857. function isArrayBuffer(val) {
  2858. return toString.call(val) === '[object ArrayBuffer]';
  2859. }
  2860. /**
  2861. * Determine if a value is a FormData
  2862. *
  2863. * @param {Object} val The value to test
  2864. * @returns {boolean} True if value is an FormData, otherwise false
  2865. */
  2866. function isFormData(val) {
  2867. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  2868. }
  2869. /**
  2870. * Determine if a value is a view on an ArrayBuffer
  2871. *
  2872. * @param {Object} val The value to test
  2873. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  2874. */
  2875. function isArrayBufferView(val) {
  2876. var result;
  2877. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  2878. result = ArrayBuffer.isView(val);
  2879. } else {
  2880. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  2881. }
  2882. return result;
  2883. }
  2884. /**
  2885. * Determine if a value is a String
  2886. *
  2887. * @param {Object} val The value to test
  2888. * @returns {boolean} True if value is a String, otherwise false
  2889. */
  2890. function isString(val) {
  2891. return typeof val === 'string';
  2892. }
  2893. /**
  2894. * Determine if a value is a Number
  2895. *
  2896. * @param {Object} val The value to test
  2897. * @returns {boolean} True if value is a Number, otherwise false
  2898. */
  2899. function isNumber(val) {
  2900. return typeof val === 'number';
  2901. }
  2902. /**
  2903. * Determine if a value is an Object
  2904. *
  2905. * @param {Object} val The value to test
  2906. * @returns {boolean} True if value is an Object, otherwise false
  2907. */
  2908. function isObject(val) {
  2909. return val !== null && typeof val === 'object';
  2910. }
  2911. /**
  2912. * Determine if a value is a plain Object
  2913. *
  2914. * @param {Object} val The value to test
  2915. * @return {boolean} True if value is a plain Object, otherwise false
  2916. */
  2917. function isPlainObject(val) {
  2918. if (toString.call(val) !== '[object Object]') {
  2919. return false;
  2920. }
  2921. var prototype = Object.getPrototypeOf(val);
  2922. return prototype === null || prototype === Object.prototype;
  2923. }
  2924. /**
  2925. * Determine if a value is a Date
  2926. *
  2927. * @param {Object} val The value to test
  2928. * @returns {boolean} True if value is a Date, otherwise false
  2929. */
  2930. function isDate(val) {
  2931. return toString.call(val) === '[object Date]';
  2932. }
  2933. /**
  2934. * Determine if a value is a File
  2935. *
  2936. * @param {Object} val The value to test
  2937. * @returns {boolean} True if value is a File, otherwise false
  2938. */
  2939. function isFile(val) {
  2940. return toString.call(val) === '[object File]';
  2941. }
  2942. /**
  2943. * Determine if a value is a Blob
  2944. *
  2945. * @param {Object} val The value to test
  2946. * @returns {boolean} True if value is a Blob, otherwise false
  2947. */
  2948. function isBlob(val) {
  2949. return toString.call(val) === '[object Blob]';
  2950. }
  2951. /**
  2952. * Determine if a value is a Function
  2953. *
  2954. * @param {Object} val The value to test
  2955. * @returns {boolean} True if value is a Function, otherwise false
  2956. */
  2957. function isFunction(val) {
  2958. return toString.call(val) === '[object Function]';
  2959. }
  2960. /**
  2961. * Determine if a value is a Stream
  2962. *
  2963. * @param {Object} val The value to test
  2964. * @returns {boolean} True if value is a Stream, otherwise false
  2965. */
  2966. function isStream(val) {
  2967. return isObject(val) && isFunction(val.pipe);
  2968. }
  2969. /**
  2970. * Determine if a value is a URLSearchParams object
  2971. *
  2972. * @param {Object} val The value to test
  2973. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  2974. */
  2975. function isURLSearchParams(val) {
  2976. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  2977. }
  2978. /**
  2979. * Trim excess whitespace off the beginning and end of a string
  2980. *
  2981. * @param {String} str The String to trim
  2982. * @returns {String} The String freed of excess whitespace
  2983. */
  2984. function trim(str) {
  2985. return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
  2986. }
  2987. /**
  2988. * Determine if we're running in a standard browser environment
  2989. *
  2990. * This allows axios to run in a web worker, and react-native.
  2991. * Both environments support XMLHttpRequest, but not fully standard globals.
  2992. *
  2993. * web workers:
  2994. * typeof window -> undefined
  2995. * typeof document -> undefined
  2996. *
  2997. * react-native:
  2998. * navigator.product -> 'ReactNative'
  2999. * nativescript
  3000. * navigator.product -> 'NativeScript' or 'NS'
  3001. */
  3002. function isStandardBrowserEnv() {
  3003. if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
  3004. navigator.product === 'NativeScript' ||
  3005. navigator.product === 'NS')) {
  3006. return false;
  3007. }
  3008. return (
  3009. typeof window !== 'undefined' &&
  3010. typeof document !== 'undefined'
  3011. );
  3012. }
  3013. /**
  3014. * Iterate over an Array or an Object invoking a function for each item.
  3015. *
  3016. * If `obj` is an Array callback will be called passing
  3017. * the value, index, and complete array for each item.
  3018. *
  3019. * If 'obj' is an Object callback will be called passing
  3020. * the value, key, and complete object for each property.
  3021. *
  3022. * @param {Object|Array} obj The object to iterate
  3023. * @param {Function} fn The callback to invoke for each item
  3024. */
  3025. function forEach(obj, fn) {
  3026. // Don't bother if no value provided
  3027. if (obj === null || typeof obj === 'undefined') {
  3028. return;
  3029. }
  3030. // Force an array if not already something iterable
  3031. if (typeof obj !== 'object') {
  3032. /*eslint no-param-reassign:0*/
  3033. obj = [obj];
  3034. }
  3035. if (isArray(obj)) {
  3036. // Iterate over array values
  3037. for (var i = 0, l = obj.length; i < l; i++) {
  3038. fn.call(null, obj[i], i, obj);
  3039. }
  3040. } else {
  3041. // Iterate over object keys
  3042. for (var key in obj) {
  3043. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  3044. fn.call(null, obj[key], key, obj);
  3045. }
  3046. }
  3047. }
  3048. }
  3049. /**
  3050. * Accepts varargs expecting each argument to be an object, then
  3051. * immutably merges the properties of each object and returns result.
  3052. *
  3053. * When multiple objects contain the same key the later object in
  3054. * the arguments list will take precedence.
  3055. *
  3056. * Example:
  3057. *
  3058. * ```js
  3059. * var result = merge({foo: 123}, {foo: 456});
  3060. * console.log(result.foo); // outputs 456
  3061. * ```
  3062. *
  3063. * @param {Object} obj1 Object to merge
  3064. * @returns {Object} Result of all merge properties
  3065. */
  3066. function merge(/* obj1, obj2, obj3, ... */) {
  3067. var result = {};
  3068. function assignValue(val, key) {
  3069. if (isPlainObject(result[key]) && isPlainObject(val)) {
  3070. result[key] = merge(result[key], val);
  3071. } else if (isPlainObject(val)) {
  3072. result[key] = merge({}, val);
  3073. } else if (isArray(val)) {
  3074. result[key] = val.slice();
  3075. } else {
  3076. result[key] = val;
  3077. }
  3078. }
  3079. for (var i = 0, l = arguments.length; i < l; i++) {
  3080. forEach(arguments[i], assignValue);
  3081. }
  3082. return result;
  3083. }
  3084. /**
  3085. * Extends object a by mutably adding to it the properties of object b.
  3086. *
  3087. * @param {Object} a The object to be extended
  3088. * @param {Object} b The object to copy properties from
  3089. * @param {Object} thisArg The object to bind function to
  3090. * @return {Object} The resulting value of object a
  3091. */
  3092. function extend(a, b, thisArg) {
  3093. forEach(b, function assignValue(val, key) {
  3094. if (thisArg && typeof val === 'function') {
  3095. a[key] = bind(val, thisArg);
  3096. } else {
  3097. a[key] = val;
  3098. }
  3099. });
  3100. return a;
  3101. }
  3102. /**
  3103. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  3104. *
  3105. * @param {string} content with BOM
  3106. * @return {string} content value without BOM
  3107. */
  3108. function stripBOM(content) {
  3109. if (content.charCodeAt(0) === 0xFEFF) {
  3110. content = content.slice(1);
  3111. }
  3112. return content;
  3113. }
  3114. module.exports = {
  3115. isArray: isArray,
  3116. isArrayBuffer: isArrayBuffer,
  3117. isBuffer: isBuffer,
  3118. isFormData: isFormData,
  3119. isArrayBufferView: isArrayBufferView,
  3120. isString: isString,
  3121. isNumber: isNumber,
  3122. isObject: isObject,
  3123. isPlainObject: isPlainObject,
  3124. isUndefined: isUndefined,
  3125. isDate: isDate,
  3126. isFile: isFile,
  3127. isBlob: isBlob,
  3128. isFunction: isFunction,
  3129. isStream: isStream,
  3130. isURLSearchParams: isURLSearchParams,
  3131. isStandardBrowserEnv: isStandardBrowserEnv,
  3132. forEach: forEach,
  3133. merge: merge,
  3134. extend: extend,
  3135. trim: trim,
  3136. stripBOM: stripBOM
  3137. };
  3138. /***/ }),
  3139. /***/ "./node_modules/_axios@0.21.4@axios/package.json":
  3140. /*!*******************************************************!*\
  3141. !*** ./node_modules/_axios@0.21.4@axios/package.json ***!
  3142. \*******************************************************/
  3143. /*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, __npminstall_done, _from, _resolved, default */
  3144. /***/ (function(module) {
  3145. module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.21.4\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://axios-http.com\",\"devDependencies\":{\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.3.0\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^23.0.0\",\"grunt-karma\":\"^4.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^4.0.2\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^6.3.2\",\"karma-chrome-launcher\":\"^3.1.0\",\"karma-firefox-launcher\":\"^2.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^4.3.6\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.8\",\"karma-webpack\":\"^4.0.2\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^8.2.1\",\"sinon\":\"^4.5.0\",\"terser-webpack-plugin\":\"^4.2.3\",\"typescript\":\"^4.0.5\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^4.44.2\",\"webpack-dev-server\":\"^3.11.0\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"jsdelivr\":\"dist/axios.min.js\",\"unpkg\":\"dist/axios.min.js\",\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"^1.14.0\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}],\"__npminstall_done\":true,\"_from\":\"axios@0.21.4\",\"_resolved\":\"https://registry.npmmirror.com/axios/-/axios-0.21.4.tgz\"}");
  3146. /***/ }),
  3147. /***/ "./node_modules/_babel-helper-vue-jsx-merge-props@2.0.3@babel-helper-vue-jsx-merge-props/index.js":
  3148. /*!********************************************************************************************************!*\
  3149. !*** ./node_modules/_babel-helper-vue-jsx-merge-props@2.0.3@babel-helper-vue-jsx-merge-props/index.js ***!
  3150. \********************************************************************************************************/
  3151. /*! no static exports found */
  3152. /***/ (function(module, exports) {
  3153. var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/
  3154. module.exports = function mergeJSXProps (objs) {
  3155. return objs.reduce(function (a, b) {
  3156. var aa, bb, key, nestedKey, temp
  3157. for (key in b) {
  3158. aa = a[key]
  3159. bb = b[key]
  3160. if (aa && nestRE.test(key)) {
  3161. // normalize class
  3162. if (key === 'class') {
  3163. if (typeof aa === 'string') {
  3164. temp = aa
  3165. a[key] = aa = {}
  3166. aa[temp] = true
  3167. }
  3168. if (typeof bb === 'string') {
  3169. temp = bb
  3170. b[key] = bb = {}
  3171. bb[temp] = true
  3172. }
  3173. }
  3174. if (key === 'on' || key === 'nativeOn' || key === 'hook') {
  3175. // merge functions
  3176. for (nestedKey in bb) {
  3177. aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])
  3178. }
  3179. } else if (Array.isArray(aa)) {
  3180. a[key] = aa.concat(bb)
  3181. } else if (Array.isArray(bb)) {
  3182. a[key] = [aa].concat(bb)
  3183. } else {
  3184. for (nestedKey in bb) {
  3185. aa[nestedKey] = bb[nestedKey]
  3186. }
  3187. }
  3188. } else {
  3189. a[key] = b[key]
  3190. }
  3191. }
  3192. return a
  3193. }, {})
  3194. }
  3195. function mergeFn (a, b) {
  3196. return function () {
  3197. a && a.apply(this, arguments)
  3198. b && b.apply(this, arguments)
  3199. }
  3200. }
  3201. /***/ }),
  3202. /***/ "./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/object/assign.js":
  3203. /*!***********************************************************************************!*\
  3204. !*** ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/object/assign.js ***!
  3205. \***********************************************************************************/
  3206. /*! no static exports found */
  3207. /***/ (function(module, exports, __webpack_require__) {
  3208. module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/assign */ "./node_modules/_core-js@2.6.12@core-js/library/fn/object/assign.js"), __esModule: true };
  3209. /***/ }),
  3210. /***/ "./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol.js":
  3211. /*!****************************************************************************!*\
  3212. !*** ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol.js ***!
  3213. \****************************************************************************/
  3214. /*! no static exports found */
  3215. /***/ (function(module, exports, __webpack_require__) {
  3216. module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol */ "./node_modules/_core-js@2.6.12@core-js/library/fn/symbol/index.js"), __esModule: true };
  3217. /***/ }),
  3218. /***/ "./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol/iterator.js":
  3219. /*!*************************************************************************************!*\
  3220. !*** ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol/iterator.js ***!
  3221. \*************************************************************************************/
  3222. /*! no static exports found */
  3223. /***/ (function(module, exports, __webpack_require__) {
  3224. module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol/iterator */ "./node_modules/_core-js@2.6.12@core-js/library/fn/symbol/iterator.js"), __esModule: true };
  3225. /***/ }),
  3226. /***/ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/extends.js":
  3227. /*!*****************************************************************************!*\
  3228. !*** ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/extends.js ***!
  3229. \*****************************************************************************/
  3230. /*! no static exports found */
  3231. /***/ (function(module, exports, __webpack_require__) {
  3232. "use strict";
  3233. exports.__esModule = true;
  3234. var _assign = __webpack_require__(/*! ../core-js/object/assign */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/object/assign.js");
  3235. var _assign2 = _interopRequireDefault(_assign);
  3236. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3237. exports.default = _assign2.default || function (target) {
  3238. for (var i = 1; i < arguments.length; i++) {
  3239. var source = arguments[i];
  3240. for (var key in source) {
  3241. if (Object.prototype.hasOwnProperty.call(source, key)) {
  3242. target[key] = source[key];
  3243. }
  3244. }
  3245. }
  3246. return target;
  3247. };
  3248. /***/ }),
  3249. /***/ "./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js":
  3250. /*!****************************************************************************!*\
  3251. !*** ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js ***!
  3252. \****************************************************************************/
  3253. /*! no static exports found */
  3254. /***/ (function(module, exports, __webpack_require__) {
  3255. "use strict";
  3256. exports.__esModule = true;
  3257. var _iterator = __webpack_require__(/*! ../core-js/symbol/iterator */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol/iterator.js");
  3258. var _iterator2 = _interopRequireDefault(_iterator);
  3259. var _symbol = __webpack_require__(/*! ../core-js/symbol */ "./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol.js");
  3260. var _symbol2 = _interopRequireDefault(_symbol);
  3261. var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
  3262. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3263. exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
  3264. return typeof obj === "undefined" ? "undefined" : _typeof(obj);
  3265. } : function (obj) {
  3266. return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
  3267. };
  3268. /***/ }),
  3269. /***/ "./node_modules/_base64-js@1.5.1@base64-js/index.js":
  3270. /*!**********************************************************!*\
  3271. !*** ./node_modules/_base64-js@1.5.1@base64-js/index.js ***!
  3272. \**********************************************************/
  3273. /*! no static exports found */
  3274. /***/ (function(module, exports, __webpack_require__) {
  3275. "use strict";
  3276. exports.byteLength = byteLength
  3277. exports.toByteArray = toByteArray
  3278. exports.fromByteArray = fromByteArray
  3279. var lookup = []
  3280. var revLookup = []
  3281. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  3282. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  3283. for (var i = 0, len = code.length; i < len; ++i) {
  3284. lookup[i] = code[i]
  3285. revLookup[code.charCodeAt(i)] = i
  3286. }
  3287. // Support decoding URL-safe base64 strings, as Node.js does.
  3288. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  3289. revLookup['-'.charCodeAt(0)] = 62
  3290. revLookup['_'.charCodeAt(0)] = 63
  3291. function getLens (b64) {
  3292. var len = b64.length
  3293. if (len % 4 > 0) {
  3294. throw new Error('Invalid string. Length must be a multiple of 4')
  3295. }
  3296. // Trim off extra bytes after placeholder bytes are found
  3297. // See: https://github.com/beatgammit/base64-js/issues/42
  3298. var validLen = b64.indexOf('=')
  3299. if (validLen === -1) validLen = len
  3300. var placeHoldersLen = validLen === len
  3301. ? 0
  3302. : 4 - (validLen % 4)
  3303. return [validLen, placeHoldersLen]
  3304. }
  3305. // base64 is 4/3 + up to two characters of the original data
  3306. function byteLength (b64) {
  3307. var lens = getLens(b64)
  3308. var validLen = lens[0]
  3309. var placeHoldersLen = lens[1]
  3310. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  3311. }
  3312. function _byteLength (b64, validLen, placeHoldersLen) {
  3313. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  3314. }
  3315. function toByteArray (b64) {
  3316. var tmp
  3317. var lens = getLens(b64)
  3318. var validLen = lens[0]
  3319. var placeHoldersLen = lens[1]
  3320. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  3321. var curByte = 0
  3322. // if there are placeholders, only get up to the last complete 4 chars
  3323. var len = placeHoldersLen > 0
  3324. ? validLen - 4
  3325. : validLen
  3326. var i
  3327. for (i = 0; i < len; i += 4) {
  3328. tmp =
  3329. (revLookup[b64.charCodeAt(i)] << 18) |
  3330. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  3331. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  3332. revLookup[b64.charCodeAt(i + 3)]
  3333. arr[curByte++] = (tmp >> 16) & 0xFF
  3334. arr[curByte++] = (tmp >> 8) & 0xFF
  3335. arr[curByte++] = tmp & 0xFF
  3336. }
  3337. if (placeHoldersLen === 2) {
  3338. tmp =
  3339. (revLookup[b64.charCodeAt(i)] << 2) |
  3340. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  3341. arr[curByte++] = tmp & 0xFF
  3342. }
  3343. if (placeHoldersLen === 1) {
  3344. tmp =
  3345. (revLookup[b64.charCodeAt(i)] << 10) |
  3346. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  3347. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  3348. arr[curByte++] = (tmp >> 8) & 0xFF
  3349. arr[curByte++] = tmp & 0xFF
  3350. }
  3351. return arr
  3352. }
  3353. function tripletToBase64 (num) {
  3354. return lookup[num >> 18 & 0x3F] +
  3355. lookup[num >> 12 & 0x3F] +
  3356. lookup[num >> 6 & 0x3F] +
  3357. lookup[num & 0x3F]
  3358. }
  3359. function encodeChunk (uint8, start, end) {
  3360. var tmp
  3361. var output = []
  3362. for (var i = start; i < end; i += 3) {
  3363. tmp =
  3364. ((uint8[i] << 16) & 0xFF0000) +
  3365. ((uint8[i + 1] << 8) & 0xFF00) +
  3366. (uint8[i + 2] & 0xFF)
  3367. output.push(tripletToBase64(tmp))
  3368. }
  3369. return output.join('')
  3370. }
  3371. function fromByteArray (uint8) {
  3372. var tmp
  3373. var len = uint8.length
  3374. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  3375. var parts = []
  3376. var maxChunkLength = 16383 // must be multiple of 3
  3377. // go through the array every three bytes, we'll deal with trailing stuff later
  3378. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  3379. parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
  3380. }
  3381. // pad the end with zeros, but make sure to not forget the extra bytes
  3382. if (extraBytes === 1) {
  3383. tmp = uint8[len - 1]
  3384. parts.push(
  3385. lookup[tmp >> 2] +
  3386. lookup[(tmp << 4) & 0x3F] +
  3387. '=='
  3388. )
  3389. } else if (extraBytes === 2) {
  3390. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  3391. parts.push(
  3392. lookup[tmp >> 10] +
  3393. lookup[(tmp >> 4) & 0x3F] +
  3394. lookup[(tmp << 2) & 0x3F] +
  3395. '='
  3396. )
  3397. }
  3398. return parts.join('')
  3399. }
  3400. /***/ }),
  3401. /***/ "./node_modules/_buffer@4.9.2@buffer/index.js":
  3402. /*!****************************************************!*\
  3403. !*** ./node_modules/_buffer@4.9.2@buffer/index.js ***!
  3404. \****************************************************/
  3405. /*! no static exports found */
  3406. /***/ (function(module, exports, __webpack_require__) {
  3407. "use strict";
  3408. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3409. * The buffer module from node.js, for the browser.
  3410. *
  3411. * @author Feross Aboukhadijeh <http://feross.org>
  3412. * @license MIT
  3413. */
  3414. /* eslint-disable no-proto */
  3415. var base64 = __webpack_require__(/*! base64-js */ "./node_modules/_base64-js@1.5.1@base64-js/index.js")
  3416. var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/_ieee754@1.2.1@ieee754/index.js")
  3417. var isArray = __webpack_require__(/*! isarray */ "./node_modules/_isarray@1.0.0@isarray/index.js")
  3418. exports.Buffer = Buffer
  3419. exports.SlowBuffer = SlowBuffer
  3420. exports.INSPECT_MAX_BYTES = 50
  3421. /**
  3422. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  3423. * === true Use Uint8Array implementation (fastest)
  3424. * === false Use Object implementation (most compatible, even IE6)
  3425. *
  3426. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  3427. * Opera 11.6+, iOS 4.2+.
  3428. *
  3429. * Due to various browser bugs, sometimes the Object implementation will be used even
  3430. * when the browser supports typed arrays.
  3431. *
  3432. * Note:
  3433. *
  3434. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  3435. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  3436. *
  3437. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  3438. *
  3439. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  3440. * incorrect length in some situations.
  3441. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  3442. * get the Object implementation, which is slower but behaves correctly.
  3443. */
  3444. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  3445. ? global.TYPED_ARRAY_SUPPORT
  3446. : typedArraySupport()
  3447. /*
  3448. * Export kMaxLength after typed array support is determined.
  3449. */
  3450. exports.kMaxLength = kMaxLength()
  3451. function typedArraySupport () {
  3452. try {
  3453. var arr = new Uint8Array(1)
  3454. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  3455. return arr.foo() === 42 && // typed array instances can be augmented
  3456. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  3457. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  3458. } catch (e) {
  3459. return false
  3460. }
  3461. }
  3462. function kMaxLength () {
  3463. return Buffer.TYPED_ARRAY_SUPPORT
  3464. ? 0x7fffffff
  3465. : 0x3fffffff
  3466. }
  3467. function createBuffer (that, length) {
  3468. if (kMaxLength() < length) {
  3469. throw new RangeError('Invalid typed array length')
  3470. }
  3471. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3472. // Return an augmented `Uint8Array` instance, for best performance
  3473. that = new Uint8Array(length)
  3474. that.__proto__ = Buffer.prototype
  3475. } else {
  3476. // Fallback: Return an object instance of the Buffer class
  3477. if (that === null) {
  3478. that = new Buffer(length)
  3479. }
  3480. that.length = length
  3481. }
  3482. return that
  3483. }
  3484. /**
  3485. * The Buffer constructor returns instances of `Uint8Array` that have their
  3486. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  3487. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  3488. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  3489. * returns a single octet.
  3490. *
  3491. * The `Uint8Array` prototype remains unmodified.
  3492. */
  3493. function Buffer (arg, encodingOrOffset, length) {
  3494. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  3495. return new Buffer(arg, encodingOrOffset, length)
  3496. }
  3497. // Common case.
  3498. if (typeof arg === 'number') {
  3499. if (typeof encodingOrOffset === 'string') {
  3500. throw new Error(
  3501. 'If encoding is specified then the first argument must be a string'
  3502. )
  3503. }
  3504. return allocUnsafe(this, arg)
  3505. }
  3506. return from(this, arg, encodingOrOffset, length)
  3507. }
  3508. Buffer.poolSize = 8192 // not used by this implementation
  3509. // TODO: Legacy, not needed anymore. Remove in next major version.
  3510. Buffer._augment = function (arr) {
  3511. arr.__proto__ = Buffer.prototype
  3512. return arr
  3513. }
  3514. function from (that, value, encodingOrOffset, length) {
  3515. if (typeof value === 'number') {
  3516. throw new TypeError('"value" argument must not be a number')
  3517. }
  3518. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  3519. return fromArrayBuffer(that, value, encodingOrOffset, length)
  3520. }
  3521. if (typeof value === 'string') {
  3522. return fromString(that, value, encodingOrOffset)
  3523. }
  3524. return fromObject(that, value)
  3525. }
  3526. /**
  3527. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  3528. * if value is a number.
  3529. * Buffer.from(str[, encoding])
  3530. * Buffer.from(array)
  3531. * Buffer.from(buffer)
  3532. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  3533. **/
  3534. Buffer.from = function (value, encodingOrOffset, length) {
  3535. return from(null, value, encodingOrOffset, length)
  3536. }
  3537. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3538. Buffer.prototype.__proto__ = Uint8Array.prototype
  3539. Buffer.__proto__ = Uint8Array
  3540. if (typeof Symbol !== 'undefined' && Symbol.species &&
  3541. Buffer[Symbol.species] === Buffer) {
  3542. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  3543. Object.defineProperty(Buffer, Symbol.species, {
  3544. value: null,
  3545. configurable: true
  3546. })
  3547. }
  3548. }
  3549. function assertSize (size) {
  3550. if (typeof size !== 'number') {
  3551. throw new TypeError('"size" argument must be a number')
  3552. } else if (size < 0) {
  3553. throw new RangeError('"size" argument must not be negative')
  3554. }
  3555. }
  3556. function alloc (that, size, fill, encoding) {
  3557. assertSize(size)
  3558. if (size <= 0) {
  3559. return createBuffer(that, size)
  3560. }
  3561. if (fill !== undefined) {
  3562. // Only pay attention to encoding if it's a string. This
  3563. // prevents accidentally sending in a number that would
  3564. // be interpretted as a start offset.
  3565. return typeof encoding === 'string'
  3566. ? createBuffer(that, size).fill(fill, encoding)
  3567. : createBuffer(that, size).fill(fill)
  3568. }
  3569. return createBuffer(that, size)
  3570. }
  3571. /**
  3572. * Creates a new filled Buffer instance.
  3573. * alloc(size[, fill[, encoding]])
  3574. **/
  3575. Buffer.alloc = function (size, fill, encoding) {
  3576. return alloc(null, size, fill, encoding)
  3577. }
  3578. function allocUnsafe (that, size) {
  3579. assertSize(size)
  3580. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  3581. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  3582. for (var i = 0; i < size; ++i) {
  3583. that[i] = 0
  3584. }
  3585. }
  3586. return that
  3587. }
  3588. /**
  3589. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  3590. * */
  3591. Buffer.allocUnsafe = function (size) {
  3592. return allocUnsafe(null, size)
  3593. }
  3594. /**
  3595. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  3596. */
  3597. Buffer.allocUnsafeSlow = function (size) {
  3598. return allocUnsafe(null, size)
  3599. }
  3600. function fromString (that, string, encoding) {
  3601. if (typeof encoding !== 'string' || encoding === '') {
  3602. encoding = 'utf8'
  3603. }
  3604. if (!Buffer.isEncoding(encoding)) {
  3605. throw new TypeError('"encoding" must be a valid string encoding')
  3606. }
  3607. var length = byteLength(string, encoding) | 0
  3608. that = createBuffer(that, length)
  3609. var actual = that.write(string, encoding)
  3610. if (actual !== length) {
  3611. // Writing a hex string, for example, that contains invalid characters will
  3612. // cause everything after the first invalid character to be ignored. (e.g.
  3613. // 'abxxcd' will be treated as 'ab')
  3614. that = that.slice(0, actual)
  3615. }
  3616. return that
  3617. }
  3618. function fromArrayLike (that, array) {
  3619. var length = array.length < 0 ? 0 : checked(array.length) | 0
  3620. that = createBuffer(that, length)
  3621. for (var i = 0; i < length; i += 1) {
  3622. that[i] = array[i] & 255
  3623. }
  3624. return that
  3625. }
  3626. function fromArrayBuffer (that, array, byteOffset, length) {
  3627. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  3628. if (byteOffset < 0 || array.byteLength < byteOffset) {
  3629. throw new RangeError('\'offset\' is out of bounds')
  3630. }
  3631. if (array.byteLength < byteOffset + (length || 0)) {
  3632. throw new RangeError('\'length\' is out of bounds')
  3633. }
  3634. if (byteOffset === undefined && length === undefined) {
  3635. array = new Uint8Array(array)
  3636. } else if (length === undefined) {
  3637. array = new Uint8Array(array, byteOffset)
  3638. } else {
  3639. array = new Uint8Array(array, byteOffset, length)
  3640. }
  3641. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3642. // Return an augmented `Uint8Array` instance, for best performance
  3643. that = array
  3644. that.__proto__ = Buffer.prototype
  3645. } else {
  3646. // Fallback: Return an object instance of the Buffer class
  3647. that = fromArrayLike(that, array)
  3648. }
  3649. return that
  3650. }
  3651. function fromObject (that, obj) {
  3652. if (Buffer.isBuffer(obj)) {
  3653. var len = checked(obj.length) | 0
  3654. that = createBuffer(that, len)
  3655. if (that.length === 0) {
  3656. return that
  3657. }
  3658. obj.copy(that, 0, 0, len)
  3659. return that
  3660. }
  3661. if (obj) {
  3662. if ((typeof ArrayBuffer !== 'undefined' &&
  3663. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  3664. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  3665. return createBuffer(that, 0)
  3666. }
  3667. return fromArrayLike(that, obj)
  3668. }
  3669. if (obj.type === 'Buffer' && isArray(obj.data)) {
  3670. return fromArrayLike(that, obj.data)
  3671. }
  3672. }
  3673. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  3674. }
  3675. function checked (length) {
  3676. // Note: cannot use `length < kMaxLength()` here because that fails when
  3677. // length is NaN (which is otherwise coerced to zero.)
  3678. if (length >= kMaxLength()) {
  3679. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  3680. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  3681. }
  3682. return length | 0
  3683. }
  3684. function SlowBuffer (length) {
  3685. if (+length != length) { // eslint-disable-line eqeqeq
  3686. length = 0
  3687. }
  3688. return Buffer.alloc(+length)
  3689. }
  3690. Buffer.isBuffer = function isBuffer (b) {
  3691. return !!(b != null && b._isBuffer)
  3692. }
  3693. Buffer.compare = function compare (a, b) {
  3694. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  3695. throw new TypeError('Arguments must be Buffers')
  3696. }
  3697. if (a === b) return 0
  3698. var x = a.length
  3699. var y = b.length
  3700. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  3701. if (a[i] !== b[i]) {
  3702. x = a[i]
  3703. y = b[i]
  3704. break
  3705. }
  3706. }
  3707. if (x < y) return -1
  3708. if (y < x) return 1
  3709. return 0
  3710. }
  3711. Buffer.isEncoding = function isEncoding (encoding) {
  3712. switch (String(encoding).toLowerCase()) {
  3713. case 'hex':
  3714. case 'utf8':
  3715. case 'utf-8':
  3716. case 'ascii':
  3717. case 'latin1':
  3718. case 'binary':
  3719. case 'base64':
  3720. case 'ucs2':
  3721. case 'ucs-2':
  3722. case 'utf16le':
  3723. case 'utf-16le':
  3724. return true
  3725. default:
  3726. return false
  3727. }
  3728. }
  3729. Buffer.concat = function concat (list, length) {
  3730. if (!isArray(list)) {
  3731. throw new TypeError('"list" argument must be an Array of Buffers')
  3732. }
  3733. if (list.length === 0) {
  3734. return Buffer.alloc(0)
  3735. }
  3736. var i
  3737. if (length === undefined) {
  3738. length = 0
  3739. for (i = 0; i < list.length; ++i) {
  3740. length += list[i].length
  3741. }
  3742. }
  3743. var buffer = Buffer.allocUnsafe(length)
  3744. var pos = 0
  3745. for (i = 0; i < list.length; ++i) {
  3746. var buf = list[i]
  3747. if (!Buffer.isBuffer(buf)) {
  3748. throw new TypeError('"list" argument must be an Array of Buffers')
  3749. }
  3750. buf.copy(buffer, pos)
  3751. pos += buf.length
  3752. }
  3753. return buffer
  3754. }
  3755. function byteLength (string, encoding) {
  3756. if (Buffer.isBuffer(string)) {
  3757. return string.length
  3758. }
  3759. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  3760. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  3761. return string.byteLength
  3762. }
  3763. if (typeof string !== 'string') {
  3764. string = '' + string
  3765. }
  3766. var len = string.length
  3767. if (len === 0) return 0
  3768. // Use a for loop to avoid recursion
  3769. var loweredCase = false
  3770. for (;;) {
  3771. switch (encoding) {
  3772. case 'ascii':
  3773. case 'latin1':
  3774. case 'binary':
  3775. return len
  3776. case 'utf8':
  3777. case 'utf-8':
  3778. case undefined:
  3779. return utf8ToBytes(string).length
  3780. case 'ucs2':
  3781. case 'ucs-2':
  3782. case 'utf16le':
  3783. case 'utf-16le':
  3784. return len * 2
  3785. case 'hex':
  3786. return len >>> 1
  3787. case 'base64':
  3788. return base64ToBytes(string).length
  3789. default:
  3790. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  3791. encoding = ('' + encoding).toLowerCase()
  3792. loweredCase = true
  3793. }
  3794. }
  3795. }
  3796. Buffer.byteLength = byteLength
  3797. function slowToString (encoding, start, end) {
  3798. var loweredCase = false
  3799. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  3800. // property of a typed array.
  3801. // This behaves neither like String nor Uint8Array in that we set start/end
  3802. // to their upper/lower bounds if the value passed is out of range.
  3803. // undefined is handled specially as per ECMA-262 6th Edition,
  3804. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  3805. if (start === undefined || start < 0) {
  3806. start = 0
  3807. }
  3808. // Return early if start > this.length. Done here to prevent potential uint32
  3809. // coercion fail below.
  3810. if (start > this.length) {
  3811. return ''
  3812. }
  3813. if (end === undefined || end > this.length) {
  3814. end = this.length
  3815. }
  3816. if (end <= 0) {
  3817. return ''
  3818. }
  3819. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  3820. end >>>= 0
  3821. start >>>= 0
  3822. if (end <= start) {
  3823. return ''
  3824. }
  3825. if (!encoding) encoding = 'utf8'
  3826. while (true) {
  3827. switch (encoding) {
  3828. case 'hex':
  3829. return hexSlice(this, start, end)
  3830. case 'utf8':
  3831. case 'utf-8':
  3832. return utf8Slice(this, start, end)
  3833. case 'ascii':
  3834. return asciiSlice(this, start, end)
  3835. case 'latin1':
  3836. case 'binary':
  3837. return latin1Slice(this, start, end)
  3838. case 'base64':
  3839. return base64Slice(this, start, end)
  3840. case 'ucs2':
  3841. case 'ucs-2':
  3842. case 'utf16le':
  3843. case 'utf-16le':
  3844. return utf16leSlice(this, start, end)
  3845. default:
  3846. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  3847. encoding = (encoding + '').toLowerCase()
  3848. loweredCase = true
  3849. }
  3850. }
  3851. }
  3852. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  3853. // Buffer instances.
  3854. Buffer.prototype._isBuffer = true
  3855. function swap (b, n, m) {
  3856. var i = b[n]
  3857. b[n] = b[m]
  3858. b[m] = i
  3859. }
  3860. Buffer.prototype.swap16 = function swap16 () {
  3861. var len = this.length
  3862. if (len % 2 !== 0) {
  3863. throw new RangeError('Buffer size must be a multiple of 16-bits')
  3864. }
  3865. for (var i = 0; i < len; i += 2) {
  3866. swap(this, i, i + 1)
  3867. }
  3868. return this
  3869. }
  3870. Buffer.prototype.swap32 = function swap32 () {
  3871. var len = this.length
  3872. if (len % 4 !== 0) {
  3873. throw new RangeError('Buffer size must be a multiple of 32-bits')
  3874. }
  3875. for (var i = 0; i < len; i += 4) {
  3876. swap(this, i, i + 3)
  3877. swap(this, i + 1, i + 2)
  3878. }
  3879. return this
  3880. }
  3881. Buffer.prototype.swap64 = function swap64 () {
  3882. var len = this.length
  3883. if (len % 8 !== 0) {
  3884. throw new RangeError('Buffer size must be a multiple of 64-bits')
  3885. }
  3886. for (var i = 0; i < len; i += 8) {
  3887. swap(this, i, i + 7)
  3888. swap(this, i + 1, i + 6)
  3889. swap(this, i + 2, i + 5)
  3890. swap(this, i + 3, i + 4)
  3891. }
  3892. return this
  3893. }
  3894. Buffer.prototype.toString = function toString () {
  3895. var length = this.length | 0
  3896. if (length === 0) return ''
  3897. if (arguments.length === 0) return utf8Slice(this, 0, length)
  3898. return slowToString.apply(this, arguments)
  3899. }
  3900. Buffer.prototype.equals = function equals (b) {
  3901. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  3902. if (this === b) return true
  3903. return Buffer.compare(this, b) === 0
  3904. }
  3905. Buffer.prototype.inspect = function inspect () {
  3906. var str = ''
  3907. var max = exports.INSPECT_MAX_BYTES
  3908. if (this.length > 0) {
  3909. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  3910. if (this.length > max) str += ' ... '
  3911. }
  3912. return '<Buffer ' + str + '>'
  3913. }
  3914. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  3915. if (!Buffer.isBuffer(target)) {
  3916. throw new TypeError('Argument must be a Buffer')
  3917. }
  3918. if (start === undefined) {
  3919. start = 0
  3920. }
  3921. if (end === undefined) {
  3922. end = target ? target.length : 0
  3923. }
  3924. if (thisStart === undefined) {
  3925. thisStart = 0
  3926. }
  3927. if (thisEnd === undefined) {
  3928. thisEnd = this.length
  3929. }
  3930. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  3931. throw new RangeError('out of range index')
  3932. }
  3933. if (thisStart >= thisEnd && start >= end) {
  3934. return 0
  3935. }
  3936. if (thisStart >= thisEnd) {
  3937. return -1
  3938. }
  3939. if (start >= end) {
  3940. return 1
  3941. }
  3942. start >>>= 0
  3943. end >>>= 0
  3944. thisStart >>>= 0
  3945. thisEnd >>>= 0
  3946. if (this === target) return 0
  3947. var x = thisEnd - thisStart
  3948. var y = end - start
  3949. var len = Math.min(x, y)
  3950. var thisCopy = this.slice(thisStart, thisEnd)
  3951. var targetCopy = target.slice(start, end)
  3952. for (var i = 0; i < len; ++i) {
  3953. if (thisCopy[i] !== targetCopy[i]) {
  3954. x = thisCopy[i]
  3955. y = targetCopy[i]
  3956. break
  3957. }
  3958. }
  3959. if (x < y) return -1
  3960. if (y < x) return 1
  3961. return 0
  3962. }
  3963. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  3964. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  3965. //
  3966. // Arguments:
  3967. // - buffer - a Buffer to search
  3968. // - val - a string, Buffer, or number
  3969. // - byteOffset - an index into `buffer`; will be clamped to an int32
  3970. // - encoding - an optional encoding, relevant is val is a string
  3971. // - dir - true for indexOf, false for lastIndexOf
  3972. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  3973. // Empty buffer means no match
  3974. if (buffer.length === 0) return -1
  3975. // Normalize byteOffset
  3976. if (typeof byteOffset === 'string') {
  3977. encoding = byteOffset
  3978. byteOffset = 0
  3979. } else if (byteOffset > 0x7fffffff) {
  3980. byteOffset = 0x7fffffff
  3981. } else if (byteOffset < -0x80000000) {
  3982. byteOffset = -0x80000000
  3983. }
  3984. byteOffset = +byteOffset // Coerce to Number.
  3985. if (isNaN(byteOffset)) {
  3986. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  3987. byteOffset = dir ? 0 : (buffer.length - 1)
  3988. }
  3989. // Normalize byteOffset: negative offsets start from the end of the buffer
  3990. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  3991. if (byteOffset >= buffer.length) {
  3992. if (dir) return -1
  3993. else byteOffset = buffer.length - 1
  3994. } else if (byteOffset < 0) {
  3995. if (dir) byteOffset = 0
  3996. else return -1
  3997. }
  3998. // Normalize val
  3999. if (typeof val === 'string') {
  4000. val = Buffer.from(val, encoding)
  4001. }
  4002. // Finally, search either indexOf (if dir is true) or lastIndexOf
  4003. if (Buffer.isBuffer(val)) {
  4004. // Special case: looking for empty string/buffer always fails
  4005. if (val.length === 0) {
  4006. return -1
  4007. }
  4008. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  4009. } else if (typeof val === 'number') {
  4010. val = val & 0xFF // Search for a byte value [0-255]
  4011. if (Buffer.TYPED_ARRAY_SUPPORT &&
  4012. typeof Uint8Array.prototype.indexOf === 'function') {
  4013. if (dir) {
  4014. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  4015. } else {
  4016. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  4017. }
  4018. }
  4019. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  4020. }
  4021. throw new TypeError('val must be string, number or Buffer')
  4022. }
  4023. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  4024. var indexSize = 1
  4025. var arrLength = arr.length
  4026. var valLength = val.length
  4027. if (encoding !== undefined) {
  4028. encoding = String(encoding).toLowerCase()
  4029. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  4030. encoding === 'utf16le' || encoding === 'utf-16le') {
  4031. if (arr.length < 2 || val.length < 2) {
  4032. return -1
  4033. }
  4034. indexSize = 2
  4035. arrLength /= 2
  4036. valLength /= 2
  4037. byteOffset /= 2
  4038. }
  4039. }
  4040. function read (buf, i) {
  4041. if (indexSize === 1) {
  4042. return buf[i]
  4043. } else {
  4044. return buf.readUInt16BE(i * indexSize)
  4045. }
  4046. }
  4047. var i
  4048. if (dir) {
  4049. var foundIndex = -1
  4050. for (i = byteOffset; i < arrLength; i++) {
  4051. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  4052. if (foundIndex === -1) foundIndex = i
  4053. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  4054. } else {
  4055. if (foundIndex !== -1) i -= i - foundIndex
  4056. foundIndex = -1
  4057. }
  4058. }
  4059. } else {
  4060. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  4061. for (i = byteOffset; i >= 0; i--) {
  4062. var found = true
  4063. for (var j = 0; j < valLength; j++) {
  4064. if (read(arr, i + j) !== read(val, j)) {
  4065. found = false
  4066. break
  4067. }
  4068. }
  4069. if (found) return i
  4070. }
  4071. }
  4072. return -1
  4073. }
  4074. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  4075. return this.indexOf(val, byteOffset, encoding) !== -1
  4076. }
  4077. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  4078. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  4079. }
  4080. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  4081. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  4082. }
  4083. function hexWrite (buf, string, offset, length) {
  4084. offset = Number(offset) || 0
  4085. var remaining = buf.length - offset
  4086. if (!length) {
  4087. length = remaining
  4088. } else {
  4089. length = Number(length)
  4090. if (length > remaining) {
  4091. length = remaining
  4092. }
  4093. }
  4094. // must be an even number of digits
  4095. var strLen = string.length
  4096. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  4097. if (length > strLen / 2) {
  4098. length = strLen / 2
  4099. }
  4100. for (var i = 0; i < length; ++i) {
  4101. var parsed = parseInt(string.substr(i * 2, 2), 16)
  4102. if (isNaN(parsed)) return i
  4103. buf[offset + i] = parsed
  4104. }
  4105. return i
  4106. }
  4107. function utf8Write (buf, string, offset, length) {
  4108. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  4109. }
  4110. function asciiWrite (buf, string, offset, length) {
  4111. return blitBuffer(asciiToBytes(string), buf, offset, length)
  4112. }
  4113. function latin1Write (buf, string, offset, length) {
  4114. return asciiWrite(buf, string, offset, length)
  4115. }
  4116. function base64Write (buf, string, offset, length) {
  4117. return blitBuffer(base64ToBytes(string), buf, offset, length)
  4118. }
  4119. function ucs2Write (buf, string, offset, length) {
  4120. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  4121. }
  4122. Buffer.prototype.write = function write (string, offset, length, encoding) {
  4123. // Buffer#write(string)
  4124. if (offset === undefined) {
  4125. encoding = 'utf8'
  4126. length = this.length
  4127. offset = 0
  4128. // Buffer#write(string, encoding)
  4129. } else if (length === undefined && typeof offset === 'string') {
  4130. encoding = offset
  4131. length = this.length
  4132. offset = 0
  4133. // Buffer#write(string, offset[, length][, encoding])
  4134. } else if (isFinite(offset)) {
  4135. offset = offset | 0
  4136. if (isFinite(length)) {
  4137. length = length | 0
  4138. if (encoding === undefined) encoding = 'utf8'
  4139. } else {
  4140. encoding = length
  4141. length = undefined
  4142. }
  4143. // legacy write(string, encoding, offset, length) - remove in v0.13
  4144. } else {
  4145. throw new Error(
  4146. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  4147. )
  4148. }
  4149. var remaining = this.length - offset
  4150. if (length === undefined || length > remaining) length = remaining
  4151. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  4152. throw new RangeError('Attempt to write outside buffer bounds')
  4153. }
  4154. if (!encoding) encoding = 'utf8'
  4155. var loweredCase = false
  4156. for (;;) {
  4157. switch (encoding) {
  4158. case 'hex':
  4159. return hexWrite(this, string, offset, length)
  4160. case 'utf8':
  4161. case 'utf-8':
  4162. return utf8Write(this, string, offset, length)
  4163. case 'ascii':
  4164. return asciiWrite(this, string, offset, length)
  4165. case 'latin1':
  4166. case 'binary':
  4167. return latin1Write(this, string, offset, length)
  4168. case 'base64':
  4169. // Warning: maxLength not taken into account in base64Write
  4170. return base64Write(this, string, offset, length)
  4171. case 'ucs2':
  4172. case 'ucs-2':
  4173. case 'utf16le':
  4174. case 'utf-16le':
  4175. return ucs2Write(this, string, offset, length)
  4176. default:
  4177. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  4178. encoding = ('' + encoding).toLowerCase()
  4179. loweredCase = true
  4180. }
  4181. }
  4182. }
  4183. Buffer.prototype.toJSON = function toJSON () {
  4184. return {
  4185. type: 'Buffer',
  4186. data: Array.prototype.slice.call(this._arr || this, 0)
  4187. }
  4188. }
  4189. function base64Slice (buf, start, end) {
  4190. if (start === 0 && end === buf.length) {
  4191. return base64.fromByteArray(buf)
  4192. } else {
  4193. return base64.fromByteArray(buf.slice(start, end))
  4194. }
  4195. }
  4196. function utf8Slice (buf, start, end) {
  4197. end = Math.min(buf.length, end)
  4198. var res = []
  4199. var i = start
  4200. while (i < end) {
  4201. var firstByte = buf[i]
  4202. var codePoint = null
  4203. var bytesPerSequence = (firstByte > 0xEF) ? 4
  4204. : (firstByte > 0xDF) ? 3
  4205. : (firstByte > 0xBF) ? 2
  4206. : 1
  4207. if (i + bytesPerSequence <= end) {
  4208. var secondByte, thirdByte, fourthByte, tempCodePoint
  4209. switch (bytesPerSequence) {
  4210. case 1:
  4211. if (firstByte < 0x80) {
  4212. codePoint = firstByte
  4213. }
  4214. break
  4215. case 2:
  4216. secondByte = buf[i + 1]
  4217. if ((secondByte & 0xC0) === 0x80) {
  4218. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  4219. if (tempCodePoint > 0x7F) {
  4220. codePoint = tempCodePoint
  4221. }
  4222. }
  4223. break
  4224. case 3:
  4225. secondByte = buf[i + 1]
  4226. thirdByte = buf[i + 2]
  4227. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  4228. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  4229. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  4230. codePoint = tempCodePoint
  4231. }
  4232. }
  4233. break
  4234. case 4:
  4235. secondByte = buf[i + 1]
  4236. thirdByte = buf[i + 2]
  4237. fourthByte = buf[i + 3]
  4238. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  4239. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  4240. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  4241. codePoint = tempCodePoint
  4242. }
  4243. }
  4244. }
  4245. }
  4246. if (codePoint === null) {
  4247. // we did not generate a valid codePoint so insert a
  4248. // replacement char (U+FFFD) and advance only 1 byte
  4249. codePoint = 0xFFFD
  4250. bytesPerSequence = 1
  4251. } else if (codePoint > 0xFFFF) {
  4252. // encode to utf16 (surrogate pair dance)
  4253. codePoint -= 0x10000
  4254. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  4255. codePoint = 0xDC00 | codePoint & 0x3FF
  4256. }
  4257. res.push(codePoint)
  4258. i += bytesPerSequence
  4259. }
  4260. return decodeCodePointsArray(res)
  4261. }
  4262. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  4263. // the lowest limit is Chrome, with 0x10000 args.
  4264. // We go 1 magnitude less, for safety
  4265. var MAX_ARGUMENTS_LENGTH = 0x1000
  4266. function decodeCodePointsArray (codePoints) {
  4267. var len = codePoints.length
  4268. if (len <= MAX_ARGUMENTS_LENGTH) {
  4269. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  4270. }
  4271. // Decode in chunks to avoid "call stack size exceeded".
  4272. var res = ''
  4273. var i = 0
  4274. while (i < len) {
  4275. res += String.fromCharCode.apply(
  4276. String,
  4277. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  4278. )
  4279. }
  4280. return res
  4281. }
  4282. function asciiSlice (buf, start, end) {
  4283. var ret = ''
  4284. end = Math.min(buf.length, end)
  4285. for (var i = start; i < end; ++i) {
  4286. ret += String.fromCharCode(buf[i] & 0x7F)
  4287. }
  4288. return ret
  4289. }
  4290. function latin1Slice (buf, start, end) {
  4291. var ret = ''
  4292. end = Math.min(buf.length, end)
  4293. for (var i = start; i < end; ++i) {
  4294. ret += String.fromCharCode(buf[i])
  4295. }
  4296. return ret
  4297. }
  4298. function hexSlice (buf, start, end) {
  4299. var len = buf.length
  4300. if (!start || start < 0) start = 0
  4301. if (!end || end < 0 || end > len) end = len
  4302. var out = ''
  4303. for (var i = start; i < end; ++i) {
  4304. out += toHex(buf[i])
  4305. }
  4306. return out
  4307. }
  4308. function utf16leSlice (buf, start, end) {
  4309. var bytes = buf.slice(start, end)
  4310. var res = ''
  4311. for (var i = 0; i < bytes.length; i += 2) {
  4312. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  4313. }
  4314. return res
  4315. }
  4316. Buffer.prototype.slice = function slice (start, end) {
  4317. var len = this.length
  4318. start = ~~start
  4319. end = end === undefined ? len : ~~end
  4320. if (start < 0) {
  4321. start += len
  4322. if (start < 0) start = 0
  4323. } else if (start > len) {
  4324. start = len
  4325. }
  4326. if (end < 0) {
  4327. end += len
  4328. if (end < 0) end = 0
  4329. } else if (end > len) {
  4330. end = len
  4331. }
  4332. if (end < start) end = start
  4333. var newBuf
  4334. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4335. newBuf = this.subarray(start, end)
  4336. newBuf.__proto__ = Buffer.prototype
  4337. } else {
  4338. var sliceLen = end - start
  4339. newBuf = new Buffer(sliceLen, undefined)
  4340. for (var i = 0; i < sliceLen; ++i) {
  4341. newBuf[i] = this[i + start]
  4342. }
  4343. }
  4344. return newBuf
  4345. }
  4346. /*
  4347. * Need to make sure that buffer isn't trying to write out of bounds.
  4348. */
  4349. function checkOffset (offset, ext, length) {
  4350. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  4351. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  4352. }
  4353. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  4354. offset = offset | 0
  4355. byteLength = byteLength | 0
  4356. if (!noAssert) checkOffset(offset, byteLength, this.length)
  4357. var val = this[offset]
  4358. var mul = 1
  4359. var i = 0
  4360. while (++i < byteLength && (mul *= 0x100)) {
  4361. val += this[offset + i] * mul
  4362. }
  4363. return val
  4364. }
  4365. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  4366. offset = offset | 0
  4367. byteLength = byteLength | 0
  4368. if (!noAssert) {
  4369. checkOffset(offset, byteLength, this.length)
  4370. }
  4371. var val = this[offset + --byteLength]
  4372. var mul = 1
  4373. while (byteLength > 0 && (mul *= 0x100)) {
  4374. val += this[offset + --byteLength] * mul
  4375. }
  4376. return val
  4377. }
  4378. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  4379. if (!noAssert) checkOffset(offset, 1, this.length)
  4380. return this[offset]
  4381. }
  4382. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  4383. if (!noAssert) checkOffset(offset, 2, this.length)
  4384. return this[offset] | (this[offset + 1] << 8)
  4385. }
  4386. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  4387. if (!noAssert) checkOffset(offset, 2, this.length)
  4388. return (this[offset] << 8) | this[offset + 1]
  4389. }
  4390. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  4391. if (!noAssert) checkOffset(offset, 4, this.length)
  4392. return ((this[offset]) |
  4393. (this[offset + 1] << 8) |
  4394. (this[offset + 2] << 16)) +
  4395. (this[offset + 3] * 0x1000000)
  4396. }
  4397. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  4398. if (!noAssert) checkOffset(offset, 4, this.length)
  4399. return (this[offset] * 0x1000000) +
  4400. ((this[offset + 1] << 16) |
  4401. (this[offset + 2] << 8) |
  4402. this[offset + 3])
  4403. }
  4404. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  4405. offset = offset | 0
  4406. byteLength = byteLength | 0
  4407. if (!noAssert) checkOffset(offset, byteLength, this.length)
  4408. var val = this[offset]
  4409. var mul = 1
  4410. var i = 0
  4411. while (++i < byteLength && (mul *= 0x100)) {
  4412. val += this[offset + i] * mul
  4413. }
  4414. mul *= 0x80
  4415. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  4416. return val
  4417. }
  4418. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  4419. offset = offset | 0
  4420. byteLength = byteLength | 0
  4421. if (!noAssert) checkOffset(offset, byteLength, this.length)
  4422. var i = byteLength
  4423. var mul = 1
  4424. var val = this[offset + --i]
  4425. while (i > 0 && (mul *= 0x100)) {
  4426. val += this[offset + --i] * mul
  4427. }
  4428. mul *= 0x80
  4429. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  4430. return val
  4431. }
  4432. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  4433. if (!noAssert) checkOffset(offset, 1, this.length)
  4434. if (!(this[offset] & 0x80)) return (this[offset])
  4435. return ((0xff - this[offset] + 1) * -1)
  4436. }
  4437. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  4438. if (!noAssert) checkOffset(offset, 2, this.length)
  4439. var val = this[offset] | (this[offset + 1] << 8)
  4440. return (val & 0x8000) ? val | 0xFFFF0000 : val
  4441. }
  4442. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  4443. if (!noAssert) checkOffset(offset, 2, this.length)
  4444. var val = this[offset + 1] | (this[offset] << 8)
  4445. return (val & 0x8000) ? val | 0xFFFF0000 : val
  4446. }
  4447. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  4448. if (!noAssert) checkOffset(offset, 4, this.length)
  4449. return (this[offset]) |
  4450. (this[offset + 1] << 8) |
  4451. (this[offset + 2] << 16) |
  4452. (this[offset + 3] << 24)
  4453. }
  4454. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  4455. if (!noAssert) checkOffset(offset, 4, this.length)
  4456. return (this[offset] << 24) |
  4457. (this[offset + 1] << 16) |
  4458. (this[offset + 2] << 8) |
  4459. (this[offset + 3])
  4460. }
  4461. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  4462. if (!noAssert) checkOffset(offset, 4, this.length)
  4463. return ieee754.read(this, offset, true, 23, 4)
  4464. }
  4465. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  4466. if (!noAssert) checkOffset(offset, 4, this.length)
  4467. return ieee754.read(this, offset, false, 23, 4)
  4468. }
  4469. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  4470. if (!noAssert) checkOffset(offset, 8, this.length)
  4471. return ieee754.read(this, offset, true, 52, 8)
  4472. }
  4473. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  4474. if (!noAssert) checkOffset(offset, 8, this.length)
  4475. return ieee754.read(this, offset, false, 52, 8)
  4476. }
  4477. function checkInt (buf, value, offset, ext, max, min) {
  4478. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  4479. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  4480. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  4481. }
  4482. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  4483. value = +value
  4484. offset = offset | 0
  4485. byteLength = byteLength | 0
  4486. if (!noAssert) {
  4487. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  4488. checkInt(this, value, offset, byteLength, maxBytes, 0)
  4489. }
  4490. var mul = 1
  4491. var i = 0
  4492. this[offset] = value & 0xFF
  4493. while (++i < byteLength && (mul *= 0x100)) {
  4494. this[offset + i] = (value / mul) & 0xFF
  4495. }
  4496. return offset + byteLength
  4497. }
  4498. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  4499. value = +value
  4500. offset = offset | 0
  4501. byteLength = byteLength | 0
  4502. if (!noAssert) {
  4503. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  4504. checkInt(this, value, offset, byteLength, maxBytes, 0)
  4505. }
  4506. var i = byteLength - 1
  4507. var mul = 1
  4508. this[offset + i] = value & 0xFF
  4509. while (--i >= 0 && (mul *= 0x100)) {
  4510. this[offset + i] = (value / mul) & 0xFF
  4511. }
  4512. return offset + byteLength
  4513. }
  4514. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  4515. value = +value
  4516. offset = offset | 0
  4517. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  4518. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  4519. this[offset] = (value & 0xff)
  4520. return offset + 1
  4521. }
  4522. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  4523. if (value < 0) value = 0xffff + value + 1
  4524. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  4525. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  4526. (littleEndian ? i : 1 - i) * 8
  4527. }
  4528. }
  4529. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  4530. value = +value
  4531. offset = offset | 0
  4532. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  4533. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4534. this[offset] = (value & 0xff)
  4535. this[offset + 1] = (value >>> 8)
  4536. } else {
  4537. objectWriteUInt16(this, value, offset, true)
  4538. }
  4539. return offset + 2
  4540. }
  4541. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  4542. value = +value
  4543. offset = offset | 0
  4544. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  4545. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4546. this[offset] = (value >>> 8)
  4547. this[offset + 1] = (value & 0xff)
  4548. } else {
  4549. objectWriteUInt16(this, value, offset, false)
  4550. }
  4551. return offset + 2
  4552. }
  4553. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  4554. if (value < 0) value = 0xffffffff + value + 1
  4555. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  4556. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  4557. }
  4558. }
  4559. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  4560. value = +value
  4561. offset = offset | 0
  4562. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  4563. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4564. this[offset + 3] = (value >>> 24)
  4565. this[offset + 2] = (value >>> 16)
  4566. this[offset + 1] = (value >>> 8)
  4567. this[offset] = (value & 0xff)
  4568. } else {
  4569. objectWriteUInt32(this, value, offset, true)
  4570. }
  4571. return offset + 4
  4572. }
  4573. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  4574. value = +value
  4575. offset = offset | 0
  4576. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  4577. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4578. this[offset] = (value >>> 24)
  4579. this[offset + 1] = (value >>> 16)
  4580. this[offset + 2] = (value >>> 8)
  4581. this[offset + 3] = (value & 0xff)
  4582. } else {
  4583. objectWriteUInt32(this, value, offset, false)
  4584. }
  4585. return offset + 4
  4586. }
  4587. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  4588. value = +value
  4589. offset = offset | 0
  4590. if (!noAssert) {
  4591. var limit = Math.pow(2, 8 * byteLength - 1)
  4592. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  4593. }
  4594. var i = 0
  4595. var mul = 1
  4596. var sub = 0
  4597. this[offset] = value & 0xFF
  4598. while (++i < byteLength && (mul *= 0x100)) {
  4599. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  4600. sub = 1
  4601. }
  4602. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  4603. }
  4604. return offset + byteLength
  4605. }
  4606. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  4607. value = +value
  4608. offset = offset | 0
  4609. if (!noAssert) {
  4610. var limit = Math.pow(2, 8 * byteLength - 1)
  4611. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  4612. }
  4613. var i = byteLength - 1
  4614. var mul = 1
  4615. var sub = 0
  4616. this[offset + i] = value & 0xFF
  4617. while (--i >= 0 && (mul *= 0x100)) {
  4618. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  4619. sub = 1
  4620. }
  4621. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  4622. }
  4623. return offset + byteLength
  4624. }
  4625. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  4626. value = +value
  4627. offset = offset | 0
  4628. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  4629. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  4630. if (value < 0) value = 0xff + value + 1
  4631. this[offset] = (value & 0xff)
  4632. return offset + 1
  4633. }
  4634. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  4635. value = +value
  4636. offset = offset | 0
  4637. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  4638. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4639. this[offset] = (value & 0xff)
  4640. this[offset + 1] = (value >>> 8)
  4641. } else {
  4642. objectWriteUInt16(this, value, offset, true)
  4643. }
  4644. return offset + 2
  4645. }
  4646. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  4647. value = +value
  4648. offset = offset | 0
  4649. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  4650. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4651. this[offset] = (value >>> 8)
  4652. this[offset + 1] = (value & 0xff)
  4653. } else {
  4654. objectWriteUInt16(this, value, offset, false)
  4655. }
  4656. return offset + 2
  4657. }
  4658. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  4659. value = +value
  4660. offset = offset | 0
  4661. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  4662. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4663. this[offset] = (value & 0xff)
  4664. this[offset + 1] = (value >>> 8)
  4665. this[offset + 2] = (value >>> 16)
  4666. this[offset + 3] = (value >>> 24)
  4667. } else {
  4668. objectWriteUInt32(this, value, offset, true)
  4669. }
  4670. return offset + 4
  4671. }
  4672. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  4673. value = +value
  4674. offset = offset | 0
  4675. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  4676. if (value < 0) value = 0xffffffff + value + 1
  4677. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4678. this[offset] = (value >>> 24)
  4679. this[offset + 1] = (value >>> 16)
  4680. this[offset + 2] = (value >>> 8)
  4681. this[offset + 3] = (value & 0xff)
  4682. } else {
  4683. objectWriteUInt32(this, value, offset, false)
  4684. }
  4685. return offset + 4
  4686. }
  4687. function checkIEEE754 (buf, value, offset, ext, max, min) {
  4688. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  4689. if (offset < 0) throw new RangeError('Index out of range')
  4690. }
  4691. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  4692. if (!noAssert) {
  4693. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  4694. }
  4695. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  4696. return offset + 4
  4697. }
  4698. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  4699. return writeFloat(this, value, offset, true, noAssert)
  4700. }
  4701. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  4702. return writeFloat(this, value, offset, false, noAssert)
  4703. }
  4704. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  4705. if (!noAssert) {
  4706. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  4707. }
  4708. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  4709. return offset + 8
  4710. }
  4711. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  4712. return writeDouble(this, value, offset, true, noAssert)
  4713. }
  4714. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  4715. return writeDouble(this, value, offset, false, noAssert)
  4716. }
  4717. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  4718. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  4719. if (!start) start = 0
  4720. if (!end && end !== 0) end = this.length
  4721. if (targetStart >= target.length) targetStart = target.length
  4722. if (!targetStart) targetStart = 0
  4723. if (end > 0 && end < start) end = start
  4724. // Copy 0 bytes; we're done
  4725. if (end === start) return 0
  4726. if (target.length === 0 || this.length === 0) return 0
  4727. // Fatal error conditions
  4728. if (targetStart < 0) {
  4729. throw new RangeError('targetStart out of bounds')
  4730. }
  4731. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  4732. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  4733. // Are we oob?
  4734. if (end > this.length) end = this.length
  4735. if (target.length - targetStart < end - start) {
  4736. end = target.length - targetStart + start
  4737. }
  4738. var len = end - start
  4739. var i
  4740. if (this === target && start < targetStart && targetStart < end) {
  4741. // descending copy from end
  4742. for (i = len - 1; i >= 0; --i) {
  4743. target[i + targetStart] = this[i + start]
  4744. }
  4745. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  4746. // ascending copy from start
  4747. for (i = 0; i < len; ++i) {
  4748. target[i + targetStart] = this[i + start]
  4749. }
  4750. } else {
  4751. Uint8Array.prototype.set.call(
  4752. target,
  4753. this.subarray(start, start + len),
  4754. targetStart
  4755. )
  4756. }
  4757. return len
  4758. }
  4759. // Usage:
  4760. // buffer.fill(number[, offset[, end]])
  4761. // buffer.fill(buffer[, offset[, end]])
  4762. // buffer.fill(string[, offset[, end]][, encoding])
  4763. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  4764. // Handle string cases:
  4765. if (typeof val === 'string') {
  4766. if (typeof start === 'string') {
  4767. encoding = start
  4768. start = 0
  4769. end = this.length
  4770. } else if (typeof end === 'string') {
  4771. encoding = end
  4772. end = this.length
  4773. }
  4774. if (val.length === 1) {
  4775. var code = val.charCodeAt(0)
  4776. if (code < 256) {
  4777. val = code
  4778. }
  4779. }
  4780. if (encoding !== undefined && typeof encoding !== 'string') {
  4781. throw new TypeError('encoding must be a string')
  4782. }
  4783. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  4784. throw new TypeError('Unknown encoding: ' + encoding)
  4785. }
  4786. } else if (typeof val === 'number') {
  4787. val = val & 255
  4788. }
  4789. // Invalid ranges are not set to a default, so can range check early.
  4790. if (start < 0 || this.length < start || this.length < end) {
  4791. throw new RangeError('Out of range index')
  4792. }
  4793. if (end <= start) {
  4794. return this
  4795. }
  4796. start = start >>> 0
  4797. end = end === undefined ? this.length : end >>> 0
  4798. if (!val) val = 0
  4799. var i
  4800. if (typeof val === 'number') {
  4801. for (i = start; i < end; ++i) {
  4802. this[i] = val
  4803. }
  4804. } else {
  4805. var bytes = Buffer.isBuffer(val)
  4806. ? val
  4807. : utf8ToBytes(new Buffer(val, encoding).toString())
  4808. var len = bytes.length
  4809. for (i = 0; i < end - start; ++i) {
  4810. this[i + start] = bytes[i % len]
  4811. }
  4812. }
  4813. return this
  4814. }
  4815. // HELPER FUNCTIONS
  4816. // ================
  4817. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  4818. function base64clean (str) {
  4819. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  4820. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  4821. // Node converts strings with length < 2 to ''
  4822. if (str.length < 2) return ''
  4823. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  4824. while (str.length % 4 !== 0) {
  4825. str = str + '='
  4826. }
  4827. return str
  4828. }
  4829. function stringtrim (str) {
  4830. if (str.trim) return str.trim()
  4831. return str.replace(/^\s+|\s+$/g, '')
  4832. }
  4833. function toHex (n) {
  4834. if (n < 16) return '0' + n.toString(16)
  4835. return n.toString(16)
  4836. }
  4837. function utf8ToBytes (string, units) {
  4838. units = units || Infinity
  4839. var codePoint
  4840. var length = string.length
  4841. var leadSurrogate = null
  4842. var bytes = []
  4843. for (var i = 0; i < length; ++i) {
  4844. codePoint = string.charCodeAt(i)
  4845. // is surrogate component
  4846. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  4847. // last char was a lead
  4848. if (!leadSurrogate) {
  4849. // no lead yet
  4850. if (codePoint > 0xDBFF) {
  4851. // unexpected trail
  4852. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4853. continue
  4854. } else if (i + 1 === length) {
  4855. // unpaired lead
  4856. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4857. continue
  4858. }
  4859. // valid lead
  4860. leadSurrogate = codePoint
  4861. continue
  4862. }
  4863. // 2 leads in a row
  4864. if (codePoint < 0xDC00) {
  4865. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4866. leadSurrogate = codePoint
  4867. continue
  4868. }
  4869. // valid surrogate pair
  4870. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  4871. } else if (leadSurrogate) {
  4872. // valid bmp char, but last char was a lead
  4873. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4874. }
  4875. leadSurrogate = null
  4876. // encode utf8
  4877. if (codePoint < 0x80) {
  4878. if ((units -= 1) < 0) break
  4879. bytes.push(codePoint)
  4880. } else if (codePoint < 0x800) {
  4881. if ((units -= 2) < 0) break
  4882. bytes.push(
  4883. codePoint >> 0x6 | 0xC0,
  4884. codePoint & 0x3F | 0x80
  4885. )
  4886. } else if (codePoint < 0x10000) {
  4887. if ((units -= 3) < 0) break
  4888. bytes.push(
  4889. codePoint >> 0xC | 0xE0,
  4890. codePoint >> 0x6 & 0x3F | 0x80,
  4891. codePoint & 0x3F | 0x80
  4892. )
  4893. } else if (codePoint < 0x110000) {
  4894. if ((units -= 4) < 0) break
  4895. bytes.push(
  4896. codePoint >> 0x12 | 0xF0,
  4897. codePoint >> 0xC & 0x3F | 0x80,
  4898. codePoint >> 0x6 & 0x3F | 0x80,
  4899. codePoint & 0x3F | 0x80
  4900. )
  4901. } else {
  4902. throw new Error('Invalid code point')
  4903. }
  4904. }
  4905. return bytes
  4906. }
  4907. function asciiToBytes (str) {
  4908. var byteArray = []
  4909. for (var i = 0; i < str.length; ++i) {
  4910. // Node's code seems to be doing this and not & 0x7F..
  4911. byteArray.push(str.charCodeAt(i) & 0xFF)
  4912. }
  4913. return byteArray
  4914. }
  4915. function utf16leToBytes (str, units) {
  4916. var c, hi, lo
  4917. var byteArray = []
  4918. for (var i = 0; i < str.length; ++i) {
  4919. if ((units -= 2) < 0) break
  4920. c = str.charCodeAt(i)
  4921. hi = c >> 8
  4922. lo = c % 256
  4923. byteArray.push(lo)
  4924. byteArray.push(hi)
  4925. }
  4926. return byteArray
  4927. }
  4928. function base64ToBytes (str) {
  4929. return base64.toByteArray(base64clean(str))
  4930. }
  4931. function blitBuffer (src, dst, offset, length) {
  4932. for (var i = 0; i < length; ++i) {
  4933. if ((i + offset >= dst.length) || (i >= src.length)) break
  4934. dst[i + offset] = src[i]
  4935. }
  4936. return i
  4937. }
  4938. function isnan (val) {
  4939. return val !== val // eslint-disable-line no-self-compare
  4940. }
  4941. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  4942. /***/ }),
  4943. /***/ "./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_babel-loader@8.2.5@babel-loader/lib/index.js!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=script&lang=js&":
  4944. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  4945. !*** ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!./node_modules/_babel-loader@8.2.5@babel-loader/lib!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=script&lang=js& ***!
  4946. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  4947. /*! exports provided: default */
  4948. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4949. "use strict";
  4950. __webpack_require__.r(__webpack_exports__);
  4951. //
  4952. //
  4953. //
  4954. //
  4955. //
  4956. /* harmony default export */ __webpack_exports__["default"] = ({
  4957. props: {
  4958. width: {
  4959. type: Number,
  4960. default: 800
  4961. },
  4962. height: {
  4963. type: Number,
  4964. default: 300
  4965. },
  4966. lineWidth: {
  4967. type: Number,
  4968. default: 4
  4969. },
  4970. lineColor: {
  4971. type: String,
  4972. default: '#000000'
  4973. },
  4974. bgColor: {
  4975. type: String,
  4976. default: ''
  4977. },
  4978. isCrop: {
  4979. type: Boolean,
  4980. default: false
  4981. },
  4982. isClearBgColor: {
  4983. type: Boolean,
  4984. default: true
  4985. },
  4986. format: {
  4987. type: String,
  4988. default: 'image/png'
  4989. },
  4990. quality: {
  4991. type: Number,
  4992. default: 1
  4993. }
  4994. },
  4995. data() {
  4996. return {
  4997. hasDrew: false,
  4998. resultImg: '',
  4999. points: [],
  5000. canvasTxt: null,
  5001. startX: 0,
  5002. startY: 0,
  5003. isDrawing: false,
  5004. sratio: 1
  5005. };
  5006. },
  5007. computed: {
  5008. ratio() {
  5009. return this.height / this.width;
  5010. },
  5011. stageInfo() {
  5012. return this.$refs.canvas.getBoundingClientRect();
  5013. },
  5014. myBg() {
  5015. return this.bgColor ? this.bgColor : 'rgba(255, 255, 255, 0)';
  5016. }
  5017. },
  5018. watch: {
  5019. 'myBg': function (newVal) {
  5020. this.$refs.canvas.style.background = newVal;
  5021. }
  5022. },
  5023. beforeMount() {
  5024. window.addEventListener('resize', this.$_resizeHandler);
  5025. },
  5026. beforeDestroy() {
  5027. window.removeEventListener('resize', this.$_resizeHandler);
  5028. },
  5029. mounted() {
  5030. const canvas = this.$refs.canvas;
  5031. canvas.height = this.height;
  5032. canvas.width = this.width;
  5033. canvas.style.background = this.myBg;
  5034. this.$_resizeHandler(); // 在画板以外松开鼠标后冻结画笔
  5035. document.onmouseup = () => {
  5036. this.isDrawing = false;
  5037. };
  5038. },
  5039. methods: {
  5040. $_resizeHandler() {
  5041. const canvas = this.$refs.canvas;
  5042. canvas.style.width = this.width + "px";
  5043. const realw = parseFloat(window.getComputedStyle(canvas).width);
  5044. canvas.style.height = this.ratio * realw + "px";
  5045. this.canvasTxt = canvas.getContext('2d');
  5046. this.canvasTxt.scale(1 * this.sratio, 1 * this.sratio);
  5047. this.sratio = realw / this.width;
  5048. this.canvasTxt.scale(1 / this.sratio, 1 / this.sratio);
  5049. },
  5050. // pc
  5051. mouseDown(e) {
  5052. e = e || event;
  5053. e.preventDefault();
  5054. this.isDrawing = true;
  5055. this.hasDrew = true;
  5056. let obj = {
  5057. x: e.offsetX,
  5058. y: e.offsetY
  5059. };
  5060. this.drawStart(obj);
  5061. },
  5062. mouseMove(e) {
  5063. e = e || event;
  5064. e.preventDefault();
  5065. if (this.isDrawing) {
  5066. let obj = {
  5067. x: e.offsetX,
  5068. y: e.offsetY
  5069. };
  5070. this.drawMove(obj);
  5071. }
  5072. },
  5073. mouseUp(e) {
  5074. e = e || event;
  5075. e.preventDefault();
  5076. let obj = {
  5077. x: e.offsetX,
  5078. y: e.offsetY
  5079. };
  5080. this.drawEnd(obj);
  5081. this.isDrawing = false;
  5082. },
  5083. // mobile
  5084. touchStart(e) {
  5085. e = e || event;
  5086. e.preventDefault();
  5087. this.hasDrew = true;
  5088. if (e.touches.length === 1) {
  5089. let obj = {
  5090. x: e.targetTouches[0].clientX - this.$refs.canvas.getBoundingClientRect().left,
  5091. y: e.targetTouches[0].clientY - this.$refs.canvas.getBoundingClientRect().top
  5092. };
  5093. this.drawStart(obj);
  5094. }
  5095. },
  5096. touchMove(e) {
  5097. e = e || event;
  5098. e.preventDefault();
  5099. if (e.touches.length === 1) {
  5100. let obj = {
  5101. x: e.targetTouches[0].clientX - this.$refs.canvas.getBoundingClientRect().left,
  5102. y: e.targetTouches[0].clientY - this.$refs.canvas.getBoundingClientRect().top
  5103. };
  5104. this.drawMove(obj);
  5105. }
  5106. },
  5107. touchEnd(e) {
  5108. e = e || event;
  5109. e.preventDefault();
  5110. if (e.touches.length === 1) {
  5111. let obj = {
  5112. x: e.targetTouches[0].clientX - this.$refs.canvas.getBoundingClientRect().left,
  5113. y: e.targetTouches[0].clientY - this.$refs.canvas.getBoundingClientRect().top
  5114. };
  5115. this.drawEnd(obj);
  5116. }
  5117. },
  5118. // 绘制
  5119. drawStart(obj) {
  5120. this.startX = obj.x;
  5121. this.startY = obj.y;
  5122. this.canvasTxt.beginPath();
  5123. this.canvasTxt.moveTo(this.startX, this.startY);
  5124. this.canvasTxt.lineTo(obj.x, obj.y);
  5125. this.canvasTxt.lineCap = 'round';
  5126. this.canvasTxt.lineJoin = 'round';
  5127. this.canvasTxt.lineWidth = this.lineWidth * this.sratio;
  5128. this.canvasTxt.stroke();
  5129. this.canvasTxt.closePath();
  5130. this.points.push(obj);
  5131. },
  5132. drawMove(obj) {
  5133. this.canvasTxt.beginPath();
  5134. this.canvasTxt.moveTo(this.startX, this.startY);
  5135. this.canvasTxt.lineTo(obj.x, obj.y);
  5136. this.canvasTxt.strokeStyle = this.lineColor;
  5137. this.canvasTxt.lineWidth = this.lineWidth * this.sratio;
  5138. this.canvasTxt.lineCap = 'round';
  5139. this.canvasTxt.lineJoin = 'round';
  5140. this.canvasTxt.stroke();
  5141. this.canvasTxt.closePath();
  5142. this.startY = obj.y;
  5143. this.startX = obj.x;
  5144. this.points.push(obj);
  5145. },
  5146. drawEnd(obj) {
  5147. this.canvasTxt.beginPath();
  5148. this.canvasTxt.moveTo(this.startX, this.startY);
  5149. this.canvasTxt.lineTo(obj.x, obj.y);
  5150. this.canvasTxt.lineCap = 'round';
  5151. this.canvasTxt.lineJoin = 'round';
  5152. this.canvasTxt.stroke();
  5153. this.canvasTxt.closePath();
  5154. this.points.push(obj);
  5155. this.points.push({
  5156. x: -1,
  5157. y: -1
  5158. });
  5159. },
  5160. // 操作
  5161. generate(options) {
  5162. let imgFormat = options && options.format ? options.format : this.format;
  5163. let imgQuality = options && options.quality ? options.quality : this.quality;
  5164. const pm = new Promise((resolve, reject) => {
  5165. if (!this.hasDrew) {
  5166. reject(`Warning: Not Signned!`);
  5167. return;
  5168. }
  5169. var resImgData = this.canvasTxt.getImageData(0, 0, this.$refs.canvas.width, this.$refs.canvas.height);
  5170. this.canvasTxt.globalCompositeOperation = "destination-over";
  5171. this.canvasTxt.fillStyle = this.myBg;
  5172. this.canvasTxt.fillRect(0, 0, this.$refs.canvas.width, this.$refs.canvas.height);
  5173. this.resultImg = this.$refs.canvas.toDataURL(imgFormat, imgQuality);
  5174. var resultImg = this.resultImg;
  5175. this.canvasTxt.clearRect(0, 0, this.$refs.canvas.width, this.$refs.canvas.height);
  5176. this.canvasTxt.putImageData(resImgData, 0, 0);
  5177. this.canvasTxt.globalCompositeOperation = "source-over";
  5178. if (this.isCrop) {
  5179. const crop_area = this.getCropArea(resImgData.data);
  5180. var crop_canvas = document.createElement('canvas');
  5181. const crop_ctx = crop_canvas.getContext('2d');
  5182. crop_canvas.width = crop_area[2] - crop_area[0];
  5183. crop_canvas.height = crop_area[3] - crop_area[1];
  5184. const crop_imgData = this.canvasTxt.getImageData(...crop_area);
  5185. crop_ctx.globalCompositeOperation = "destination-over";
  5186. crop_ctx.putImageData(crop_imgData, 0, 0);
  5187. crop_ctx.fillStyle = this.myBg;
  5188. crop_ctx.fillRect(0, 0, crop_canvas.width, crop_canvas.height);
  5189. resultImg = crop_canvas.toDataURL(imgFormat, imgQuality);
  5190. crop_canvas = null;
  5191. }
  5192. resolve(resultImg);
  5193. });
  5194. return pm;
  5195. },
  5196. reset() {
  5197. this.canvasTxt.clearRect(0, 0, this.$refs.canvas.width, this.$refs.canvas.height);
  5198. if (this.isClearBgColor) {
  5199. this.$emit('update:bgColor', '');
  5200. this.$refs.canvas.style.background = 'rgba(255, 255, 255, 0)';
  5201. }
  5202. this.points = [];
  5203. this.hasDrew = false;
  5204. this.resultImg = '';
  5205. },
  5206. getCropArea(imgData) {
  5207. var topX = this.$refs.canvas.width;
  5208. var btmX = 0;
  5209. var topY = this.$refs.canvas.height;
  5210. var btnY = 0;
  5211. for (var i = 0; i < this.$refs.canvas.width; i++) {
  5212. for (var j = 0; j < this.$refs.canvas.height; j++) {
  5213. var pos = (i + this.$refs.canvas.width * j) * 4;
  5214. if (imgData[pos] > 0 || imgData[pos + 1] > 0 || imgData[pos + 2] || imgData[pos + 3] > 0) {
  5215. btnY = Math.max(j, btnY);
  5216. btmX = Math.max(i, btmX);
  5217. topY = Math.min(j, topY);
  5218. topX = Math.min(i, topX);
  5219. }
  5220. }
  5221. }
  5222. topX++;
  5223. btmX++;
  5224. topY++;
  5225. btnY++;
  5226. const data = [topX, topY, btmX, btnY];
  5227. return data;
  5228. }
  5229. }
  5230. });
  5231. /***/ }),
  5232. /***/ "./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"6e6053f2-vue-loader-template\"}!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/templateLoader.js?!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=template&id=056888e0&scoped=true&":
  5233. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  5234. !*** ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6e6053f2-vue-loader-template"}!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=template&id=056888e0&scoped=true& ***!
  5235. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  5236. /*! exports provided: render, staticRenderFns */
  5237. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5238. "use strict";
  5239. __webpack_require__.r(__webpack_exports__);
  5240. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
  5241. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
  5242. var render = function () {
  5243. var _vm = this
  5244. var _h = _vm.$createElement
  5245. var _c = _vm._self._c || _h
  5246. return _c("canvas", {
  5247. ref: "canvas",
  5248. on: {
  5249. mousedown: _vm.mouseDown,
  5250. mousemove: _vm.mouseMove,
  5251. mouseup: _vm.mouseUp,
  5252. touchstart: _vm.touchStart,
  5253. touchmove: _vm.touchMove,
  5254. touchend: _vm.touchEnd,
  5255. },
  5256. })
  5257. }
  5258. var staticRenderFns = []
  5259. render._withStripped = true
  5260. /***/ }),
  5261. /***/ "./node_modules/_call-bind@1.0.2@call-bind/callBound.js":
  5262. /*!**************************************************************!*\
  5263. !*** ./node_modules/_call-bind@1.0.2@call-bind/callBound.js ***!
  5264. \**************************************************************/
  5265. /*! no static exports found */
  5266. /***/ (function(module, exports, __webpack_require__) {
  5267. "use strict";
  5268. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/_get-intrinsic@1.1.2@get-intrinsic/index.js");
  5269. var callBind = __webpack_require__(/*! ./ */ "./node_modules/_call-bind@1.0.2@call-bind/index.js");
  5270. var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
  5271. module.exports = function callBoundIntrinsic(name, allowMissing) {
  5272. var intrinsic = GetIntrinsic(name, !!allowMissing);
  5273. if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
  5274. return callBind(intrinsic);
  5275. }
  5276. return intrinsic;
  5277. };
  5278. /***/ }),
  5279. /***/ "./node_modules/_call-bind@1.0.2@call-bind/index.js":
  5280. /*!**********************************************************!*\
  5281. !*** ./node_modules/_call-bind@1.0.2@call-bind/index.js ***!
  5282. \**********************************************************/
  5283. /*! no static exports found */
  5284. /***/ (function(module, exports, __webpack_require__) {
  5285. "use strict";
  5286. var bind = __webpack_require__(/*! function-bind */ "./node_modules/_function-bind@1.1.1@function-bind/index.js");
  5287. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/_get-intrinsic@1.1.2@get-intrinsic/index.js");
  5288. var $apply = GetIntrinsic('%Function.prototype.apply%');
  5289. var $call = GetIntrinsic('%Function.prototype.call%');
  5290. var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
  5291. var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
  5292. var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
  5293. var $max = GetIntrinsic('%Math.max%');
  5294. if ($defineProperty) {
  5295. try {
  5296. $defineProperty({}, 'a', { value: 1 });
  5297. } catch (e) {
  5298. // IE 8 has a broken defineProperty
  5299. $defineProperty = null;
  5300. }
  5301. }
  5302. module.exports = function callBind(originalFunction) {
  5303. var func = $reflectApply(bind, $call, arguments);
  5304. if ($gOPD && $defineProperty) {
  5305. var desc = $gOPD(func, 'length');
  5306. if (desc.configurable) {
  5307. // original length, plus the receiver, minus any additional arguments (after the receiver)
  5308. $defineProperty(
  5309. func,
  5310. 'length',
  5311. { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
  5312. );
  5313. }
  5314. }
  5315. return func;
  5316. };
  5317. var applyBind = function applyBind() {
  5318. return $reflectApply(bind, $apply, arguments);
  5319. };
  5320. if ($defineProperty) {
  5321. $defineProperty(module.exports, 'apply', { value: applyBind });
  5322. } else {
  5323. module.exports.apply = applyBind;
  5324. }
  5325. /***/ }),
  5326. /***/ "./node_modules/_core-js@2.6.12@core-js/library/fn/object/assign.js":
  5327. /*!**************************************************************************!*\
  5328. !*** ./node_modules/_core-js@2.6.12@core-js/library/fn/object/assign.js ***!
  5329. \**************************************************************************/
  5330. /*! no static exports found */
  5331. /***/ (function(module, exports, __webpack_require__) {
  5332. __webpack_require__(/*! ../../modules/es6.object.assign */ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.object.assign.js");
  5333. module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_core.js").Object.assign;
  5334. /***/ }),
  5335. /***/ "./node_modules/_core-js@2.6.12@core-js/library/fn/symbol/index.js":
  5336. /*!*************************************************************************!*\
  5337. !*** ./node_modules/_core-js@2.6.12@core-js/library/fn/symbol/index.js ***!
  5338. \*************************************************************************/
  5339. /*! no static exports found */
  5340. /***/ (function(module, exports, __webpack_require__) {
  5341. __webpack_require__(/*! ../../modules/es6.symbol */ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.symbol.js");
  5342. __webpack_require__(/*! ../../modules/es6.object.to-string */ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.object.to-string.js");
  5343. __webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ "./node_modules/_core-js@2.6.12@core-js/library/modules/es7.symbol.async-iterator.js");
  5344. __webpack_require__(/*! ../../modules/es7.symbol.observable */ "./node_modules/_core-js@2.6.12@core-js/library/modules/es7.symbol.observable.js");
  5345. module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_core.js").Symbol;
  5346. /***/ }),
  5347. /***/ "./node_modules/_core-js@2.6.12@core-js/library/fn/symbol/iterator.js":
  5348. /*!****************************************************************************!*\
  5349. !*** ./node_modules/_core-js@2.6.12@core-js/library/fn/symbol/iterator.js ***!
  5350. \****************************************************************************/
  5351. /*! no static exports found */
  5352. /***/ (function(module, exports, __webpack_require__) {
  5353. __webpack_require__(/*! ../../modules/es6.string.iterator */ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.string.iterator.js");
  5354. __webpack_require__(/*! ../../modules/web.dom.iterable */ "./node_modules/_core-js@2.6.12@core-js/library/modules/web.dom.iterable.js");
  5355. module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-ext.js").f('iterator');
  5356. /***/ }),
  5357. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_a-function.js":
  5358. /*!*****************************************************************************!*\
  5359. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_a-function.js ***!
  5360. \*****************************************************************************/
  5361. /*! no static exports found */
  5362. /***/ (function(module, exports) {
  5363. module.exports = function (it) {
  5364. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  5365. return it;
  5366. };
  5367. /***/ }),
  5368. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_add-to-unscopables.js":
  5369. /*!*************************************************************************************!*\
  5370. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_add-to-unscopables.js ***!
  5371. \*************************************************************************************/
  5372. /*! no static exports found */
  5373. /***/ (function(module, exports) {
  5374. module.exports = function () { /* empty */ };
  5375. /***/ }),
  5376. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_an-object.js":
  5377. /*!****************************************************************************!*\
  5378. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_an-object.js ***!
  5379. \****************************************************************************/
  5380. /*! no static exports found */
  5381. /***/ (function(module, exports, __webpack_require__) {
  5382. var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-object.js");
  5383. module.exports = function (it) {
  5384. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  5385. return it;
  5386. };
  5387. /***/ }),
  5388. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_array-includes.js":
  5389. /*!*********************************************************************************!*\
  5390. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_array-includes.js ***!
  5391. \*********************************************************************************/
  5392. /*! no static exports found */
  5393. /***/ (function(module, exports, __webpack_require__) {
  5394. // false -> Array#indexOf
  5395. // true -> Array#includes
  5396. var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js");
  5397. var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-length.js");
  5398. var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-absolute-index.js");
  5399. module.exports = function (IS_INCLUDES) {
  5400. return function ($this, el, fromIndex) {
  5401. var O = toIObject($this);
  5402. var length = toLength(O.length);
  5403. var index = toAbsoluteIndex(fromIndex, length);
  5404. var value;
  5405. // Array#includes uses SameValueZero equality algorithm
  5406. // eslint-disable-next-line no-self-compare
  5407. if (IS_INCLUDES && el != el) while (length > index) {
  5408. value = O[index++];
  5409. // eslint-disable-next-line no-self-compare
  5410. if (value != value) return true;
  5411. // Array#indexOf ignores holes, Array#includes - not
  5412. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  5413. if (O[index] === el) return IS_INCLUDES || index || 0;
  5414. } return !IS_INCLUDES && -1;
  5415. };
  5416. };
  5417. /***/ }),
  5418. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_cof.js":
  5419. /*!**********************************************************************!*\
  5420. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_cof.js ***!
  5421. \**********************************************************************/
  5422. /*! no static exports found */
  5423. /***/ (function(module, exports) {
  5424. var toString = {}.toString;
  5425. module.exports = function (it) {
  5426. return toString.call(it).slice(8, -1);
  5427. };
  5428. /***/ }),
  5429. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_core.js":
  5430. /*!***********************************************************************!*\
  5431. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_core.js ***!
  5432. \***********************************************************************/
  5433. /*! no static exports found */
  5434. /***/ (function(module, exports) {
  5435. var core = module.exports = { version: '2.6.12' };
  5436. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  5437. /***/ }),
  5438. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_ctx.js":
  5439. /*!**********************************************************************!*\
  5440. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_ctx.js ***!
  5441. \**********************************************************************/
  5442. /*! no static exports found */
  5443. /***/ (function(module, exports, __webpack_require__) {
  5444. // optional / simple context binding
  5445. var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_a-function.js");
  5446. module.exports = function (fn, that, length) {
  5447. aFunction(fn);
  5448. if (that === undefined) return fn;
  5449. switch (length) {
  5450. case 1: return function (a) {
  5451. return fn.call(that, a);
  5452. };
  5453. case 2: return function (a, b) {
  5454. return fn.call(that, a, b);
  5455. };
  5456. case 3: return function (a, b, c) {
  5457. return fn.call(that, a, b, c);
  5458. };
  5459. }
  5460. return function (/* ...args */) {
  5461. return fn.apply(that, arguments);
  5462. };
  5463. };
  5464. /***/ }),
  5465. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_defined.js":
  5466. /*!**************************************************************************!*\
  5467. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_defined.js ***!
  5468. \**************************************************************************/
  5469. /*! no static exports found */
  5470. /***/ (function(module, exports) {
  5471. // 7.2.1 RequireObjectCoercible(argument)
  5472. module.exports = function (it) {
  5473. if (it == undefined) throw TypeError("Can't call method on " + it);
  5474. return it;
  5475. };
  5476. /***/ }),
  5477. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js":
  5478. /*!******************************************************************************!*\
  5479. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js ***!
  5480. \******************************************************************************/
  5481. /*! no static exports found */
  5482. /***/ (function(module, exports, __webpack_require__) {
  5483. // Thank's IE8 for his funny defineProperty
  5484. module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_fails.js")(function () {
  5485. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  5486. });
  5487. /***/ }),
  5488. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_dom-create.js":
  5489. /*!*****************************************************************************!*\
  5490. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_dom-create.js ***!
  5491. \*****************************************************************************/
  5492. /*! no static exports found */
  5493. /***/ (function(module, exports, __webpack_require__) {
  5494. var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-object.js");
  5495. var document = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js").document;
  5496. // typeof document.createElement is 'object' in old IE
  5497. var is = isObject(document) && isObject(document.createElement);
  5498. module.exports = function (it) {
  5499. return is ? document.createElement(it) : {};
  5500. };
  5501. /***/ }),
  5502. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-bug-keys.js":
  5503. /*!********************************************************************************!*\
  5504. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-bug-keys.js ***!
  5505. \********************************************************************************/
  5506. /*! no static exports found */
  5507. /***/ (function(module, exports) {
  5508. // IE 8- don't enum bug keys
  5509. module.exports = (
  5510. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  5511. ).split(',');
  5512. /***/ }),
  5513. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-keys.js":
  5514. /*!****************************************************************************!*\
  5515. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-keys.js ***!
  5516. \****************************************************************************/
  5517. /*! no static exports found */
  5518. /***/ (function(module, exports, __webpack_require__) {
  5519. // all enumerable object keys, includes symbols
  5520. var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys.js");
  5521. var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gops.js");
  5522. var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-pie.js");
  5523. module.exports = function (it) {
  5524. var result = getKeys(it);
  5525. var getSymbols = gOPS.f;
  5526. if (getSymbols) {
  5527. var symbols = getSymbols(it);
  5528. var isEnum = pIE.f;
  5529. var i = 0;
  5530. var key;
  5531. while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  5532. } return result;
  5533. };
  5534. /***/ }),
  5535. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_export.js":
  5536. /*!*************************************************************************!*\
  5537. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_export.js ***!
  5538. \*************************************************************************/
  5539. /*! no static exports found */
  5540. /***/ (function(module, exports, __webpack_require__) {
  5541. var global = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js");
  5542. var core = __webpack_require__(/*! ./_core */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_core.js");
  5543. var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_ctx.js");
  5544. var hide = __webpack_require__(/*! ./_hide */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js");
  5545. var has = __webpack_require__(/*! ./_has */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js");
  5546. var PROTOTYPE = 'prototype';
  5547. var $export = function (type, name, source) {
  5548. var IS_FORCED = type & $export.F;
  5549. var IS_GLOBAL = type & $export.G;
  5550. var IS_STATIC = type & $export.S;
  5551. var IS_PROTO = type & $export.P;
  5552. var IS_BIND = type & $export.B;
  5553. var IS_WRAP = type & $export.W;
  5554. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  5555. var expProto = exports[PROTOTYPE];
  5556. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  5557. var key, own, out;
  5558. if (IS_GLOBAL) source = name;
  5559. for (key in source) {
  5560. // contains in native
  5561. own = !IS_FORCED && target && target[key] !== undefined;
  5562. if (own && has(exports, key)) continue;
  5563. // export native or passed
  5564. out = own ? target[key] : source[key];
  5565. // prevent global pollution for namespaces
  5566. exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
  5567. // bind timers to global for call from export context
  5568. : IS_BIND && own ? ctx(out, global)
  5569. // wrap global constructors for prevent change them in library
  5570. : IS_WRAP && target[key] == out ? (function (C) {
  5571. var F = function (a, b, c) {
  5572. if (this instanceof C) {
  5573. switch (arguments.length) {
  5574. case 0: return new C();
  5575. case 1: return new C(a);
  5576. case 2: return new C(a, b);
  5577. } return new C(a, b, c);
  5578. } return C.apply(this, arguments);
  5579. };
  5580. F[PROTOTYPE] = C[PROTOTYPE];
  5581. return F;
  5582. // make static versions for prototype methods
  5583. })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  5584. // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
  5585. if (IS_PROTO) {
  5586. (exports.virtual || (exports.virtual = {}))[key] = out;
  5587. // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
  5588. if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
  5589. }
  5590. }
  5591. };
  5592. // type bitmap
  5593. $export.F = 1; // forced
  5594. $export.G = 2; // global
  5595. $export.S = 4; // static
  5596. $export.P = 8; // proto
  5597. $export.B = 16; // bind
  5598. $export.W = 32; // wrap
  5599. $export.U = 64; // safe
  5600. $export.R = 128; // real proto method for `library`
  5601. module.exports = $export;
  5602. /***/ }),
  5603. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_fails.js":
  5604. /*!************************************************************************!*\
  5605. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_fails.js ***!
  5606. \************************************************************************/
  5607. /*! no static exports found */
  5608. /***/ (function(module, exports) {
  5609. module.exports = function (exec) {
  5610. try {
  5611. return !!exec();
  5612. } catch (e) {
  5613. return true;
  5614. }
  5615. };
  5616. /***/ }),
  5617. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js":
  5618. /*!*************************************************************************!*\
  5619. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js ***!
  5620. \*************************************************************************/
  5621. /*! no static exports found */
  5622. /***/ (function(module, exports) {
  5623. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  5624. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  5625. ? window : typeof self != 'undefined' && self.Math == Math ? self
  5626. // eslint-disable-next-line no-new-func
  5627. : Function('return this')();
  5628. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  5629. /***/ }),
  5630. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js":
  5631. /*!**********************************************************************!*\
  5632. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js ***!
  5633. \**********************************************************************/
  5634. /*! no static exports found */
  5635. /***/ (function(module, exports) {
  5636. var hasOwnProperty = {}.hasOwnProperty;
  5637. module.exports = function (it, key) {
  5638. return hasOwnProperty.call(it, key);
  5639. };
  5640. /***/ }),
  5641. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js":
  5642. /*!***********************************************************************!*\
  5643. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js ***!
  5644. \***********************************************************************/
  5645. /*! no static exports found */
  5646. /***/ (function(module, exports, __webpack_require__) {
  5647. var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js");
  5648. var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_property-desc.js");
  5649. module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js") ? function (object, key, value) {
  5650. return dP.f(object, key, createDesc(1, value));
  5651. } : function (object, key, value) {
  5652. object[key] = value;
  5653. return object;
  5654. };
  5655. /***/ }),
  5656. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_html.js":
  5657. /*!***********************************************************************!*\
  5658. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_html.js ***!
  5659. \***********************************************************************/
  5660. /*! no static exports found */
  5661. /***/ (function(module, exports, __webpack_require__) {
  5662. var document = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js").document;
  5663. module.exports = document && document.documentElement;
  5664. /***/ }),
  5665. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_ie8-dom-define.js":
  5666. /*!*********************************************************************************!*\
  5667. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_ie8-dom-define.js ***!
  5668. \*********************************************************************************/
  5669. /*! no static exports found */
  5670. /***/ (function(module, exports, __webpack_require__) {
  5671. module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_fails.js")(function () {
  5672. return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
  5673. });
  5674. /***/ }),
  5675. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iobject.js":
  5676. /*!**************************************************************************!*\
  5677. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_iobject.js ***!
  5678. \**************************************************************************/
  5679. /*! no static exports found */
  5680. /***/ (function(module, exports, __webpack_require__) {
  5681. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  5682. var cof = __webpack_require__(/*! ./_cof */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_cof.js");
  5683. // eslint-disable-next-line no-prototype-builtins
  5684. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  5685. return cof(it) == 'String' ? it.split('') : Object(it);
  5686. };
  5687. /***/ }),
  5688. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-array.js":
  5689. /*!***************************************************************************!*\
  5690. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_is-array.js ***!
  5691. \***************************************************************************/
  5692. /*! no static exports found */
  5693. /***/ (function(module, exports, __webpack_require__) {
  5694. // 7.2.2 IsArray(argument)
  5695. var cof = __webpack_require__(/*! ./_cof */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_cof.js");
  5696. module.exports = Array.isArray || function isArray(arg) {
  5697. return cof(arg) == 'Array';
  5698. };
  5699. /***/ }),
  5700. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-object.js":
  5701. /*!****************************************************************************!*\
  5702. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_is-object.js ***!
  5703. \****************************************************************************/
  5704. /*! no static exports found */
  5705. /***/ (function(module, exports) {
  5706. module.exports = function (it) {
  5707. return typeof it === 'object' ? it !== null : typeof it === 'function';
  5708. };
  5709. /***/ }),
  5710. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-create.js":
  5711. /*!******************************************************************************!*\
  5712. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-create.js ***!
  5713. \******************************************************************************/
  5714. /*! no static exports found */
  5715. /***/ (function(module, exports, __webpack_require__) {
  5716. "use strict";
  5717. var create = __webpack_require__(/*! ./_object-create */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-create.js");
  5718. var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_property-desc.js");
  5719. var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_set-to-string-tag.js");
  5720. var IteratorPrototype = {};
  5721. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  5722. __webpack_require__(/*! ./_hide */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js")('iterator'), function () { return this; });
  5723. module.exports = function (Constructor, NAME, next) {
  5724. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  5725. setToStringTag(Constructor, NAME + ' Iterator');
  5726. };
  5727. /***/ }),
  5728. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-define.js":
  5729. /*!******************************************************************************!*\
  5730. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-define.js ***!
  5731. \******************************************************************************/
  5732. /*! no static exports found */
  5733. /***/ (function(module, exports, __webpack_require__) {
  5734. "use strict";
  5735. var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_library.js");
  5736. var $export = __webpack_require__(/*! ./_export */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_export.js");
  5737. var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_redefine.js");
  5738. var hide = __webpack_require__(/*! ./_hide */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js");
  5739. var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iterators.js");
  5740. var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-create.js");
  5741. var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_set-to-string-tag.js");
  5742. var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gpo.js");
  5743. var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js")('iterator');
  5744. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  5745. var FF_ITERATOR = '@@iterator';
  5746. var KEYS = 'keys';
  5747. var VALUES = 'values';
  5748. var returnThis = function () { return this; };
  5749. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  5750. $iterCreate(Constructor, NAME, next);
  5751. var getMethod = function (kind) {
  5752. if (!BUGGY && kind in proto) return proto[kind];
  5753. switch (kind) {
  5754. case KEYS: return function keys() { return new Constructor(this, kind); };
  5755. case VALUES: return function values() { return new Constructor(this, kind); };
  5756. } return function entries() { return new Constructor(this, kind); };
  5757. };
  5758. var TAG = NAME + ' Iterator';
  5759. var DEF_VALUES = DEFAULT == VALUES;
  5760. var VALUES_BUG = false;
  5761. var proto = Base.prototype;
  5762. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  5763. var $default = $native || getMethod(DEFAULT);
  5764. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  5765. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  5766. var methods, key, IteratorPrototype;
  5767. // Fix native
  5768. if ($anyNative) {
  5769. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  5770. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  5771. // Set @@toStringTag to native iterators
  5772. setToStringTag(IteratorPrototype, TAG, true);
  5773. // fix for some old engines
  5774. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  5775. }
  5776. }
  5777. // fix Array#{values, @@iterator}.name in V8 / FF
  5778. if (DEF_VALUES && $native && $native.name !== VALUES) {
  5779. VALUES_BUG = true;
  5780. $default = function values() { return $native.call(this); };
  5781. }
  5782. // Define iterator
  5783. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  5784. hide(proto, ITERATOR, $default);
  5785. }
  5786. // Plug for library
  5787. Iterators[NAME] = $default;
  5788. Iterators[TAG] = returnThis;
  5789. if (DEFAULT) {
  5790. methods = {
  5791. values: DEF_VALUES ? $default : getMethod(VALUES),
  5792. keys: IS_SET ? $default : getMethod(KEYS),
  5793. entries: $entries
  5794. };
  5795. if (FORCED) for (key in methods) {
  5796. if (!(key in proto)) redefine(proto, key, methods[key]);
  5797. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  5798. }
  5799. return methods;
  5800. };
  5801. /***/ }),
  5802. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-step.js":
  5803. /*!****************************************************************************!*\
  5804. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-step.js ***!
  5805. \****************************************************************************/
  5806. /*! no static exports found */
  5807. /***/ (function(module, exports) {
  5808. module.exports = function (done, value) {
  5809. return { value: value, done: !!done };
  5810. };
  5811. /***/ }),
  5812. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iterators.js":
  5813. /*!****************************************************************************!*\
  5814. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_iterators.js ***!
  5815. \****************************************************************************/
  5816. /*! no static exports found */
  5817. /***/ (function(module, exports) {
  5818. module.exports = {};
  5819. /***/ }),
  5820. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_library.js":
  5821. /*!**************************************************************************!*\
  5822. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_library.js ***!
  5823. \**************************************************************************/
  5824. /*! no static exports found */
  5825. /***/ (function(module, exports) {
  5826. module.exports = true;
  5827. /***/ }),
  5828. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_meta.js":
  5829. /*!***********************************************************************!*\
  5830. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_meta.js ***!
  5831. \***********************************************************************/
  5832. /*! no static exports found */
  5833. /***/ (function(module, exports, __webpack_require__) {
  5834. var META = __webpack_require__(/*! ./_uid */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_uid.js")('meta');
  5835. var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-object.js");
  5836. var has = __webpack_require__(/*! ./_has */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js");
  5837. var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js").f;
  5838. var id = 0;
  5839. var isExtensible = Object.isExtensible || function () {
  5840. return true;
  5841. };
  5842. var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_fails.js")(function () {
  5843. return isExtensible(Object.preventExtensions({}));
  5844. });
  5845. var setMeta = function (it) {
  5846. setDesc(it, META, { value: {
  5847. i: 'O' + ++id, // object ID
  5848. w: {} // weak collections IDs
  5849. } });
  5850. };
  5851. var fastKey = function (it, create) {
  5852. // return primitive with prefix
  5853. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  5854. if (!has(it, META)) {
  5855. // can't set metadata to uncaught frozen object
  5856. if (!isExtensible(it)) return 'F';
  5857. // not necessary to add metadata
  5858. if (!create) return 'E';
  5859. // add missing metadata
  5860. setMeta(it);
  5861. // return object ID
  5862. } return it[META].i;
  5863. };
  5864. var getWeak = function (it, create) {
  5865. if (!has(it, META)) {
  5866. // can't set metadata to uncaught frozen object
  5867. if (!isExtensible(it)) return true;
  5868. // not necessary to add metadata
  5869. if (!create) return false;
  5870. // add missing metadata
  5871. setMeta(it);
  5872. // return hash weak collections IDs
  5873. } return it[META].w;
  5874. };
  5875. // add metadata on freeze-family methods calling
  5876. var onFreeze = function (it) {
  5877. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  5878. return it;
  5879. };
  5880. var meta = module.exports = {
  5881. KEY: META,
  5882. NEED: false,
  5883. fastKey: fastKey,
  5884. getWeak: getWeak,
  5885. onFreeze: onFreeze
  5886. };
  5887. /***/ }),
  5888. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-assign.js":
  5889. /*!********************************************************************************!*\
  5890. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-assign.js ***!
  5891. \********************************************************************************/
  5892. /*! no static exports found */
  5893. /***/ (function(module, exports, __webpack_require__) {
  5894. "use strict";
  5895. // 19.1.2.1 Object.assign(target, source, ...)
  5896. var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js");
  5897. var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys.js");
  5898. var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gops.js");
  5899. var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-pie.js");
  5900. var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-object.js");
  5901. var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iobject.js");
  5902. var $assign = Object.assign;
  5903. // should work with symbols and should have deterministic property order (V8 bug)
  5904. module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_fails.js")(function () {
  5905. var A = {};
  5906. var B = {};
  5907. // eslint-disable-next-line no-undef
  5908. var S = Symbol();
  5909. var K = 'abcdefghijklmnopqrst';
  5910. A[S] = 7;
  5911. K.split('').forEach(function (k) { B[k] = k; });
  5912. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  5913. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  5914. var T = toObject(target);
  5915. var aLen = arguments.length;
  5916. var index = 1;
  5917. var getSymbols = gOPS.f;
  5918. var isEnum = pIE.f;
  5919. while (aLen > index) {
  5920. var S = IObject(arguments[index++]);
  5921. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  5922. var length = keys.length;
  5923. var j = 0;
  5924. var key;
  5925. while (length > j) {
  5926. key = keys[j++];
  5927. if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
  5928. }
  5929. } return T;
  5930. } : $assign;
  5931. /***/ }),
  5932. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-create.js":
  5933. /*!********************************************************************************!*\
  5934. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-create.js ***!
  5935. \********************************************************************************/
  5936. /*! no static exports found */
  5937. /***/ (function(module, exports, __webpack_require__) {
  5938. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  5939. var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_an-object.js");
  5940. var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dps.js");
  5941. var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-bug-keys.js");
  5942. var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared-key.js")('IE_PROTO');
  5943. var Empty = function () { /* empty */ };
  5944. var PROTOTYPE = 'prototype';
  5945. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  5946. var createDict = function () {
  5947. // Thrash, waste and sodomy: IE GC bug
  5948. var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_dom-create.js")('iframe');
  5949. var i = enumBugKeys.length;
  5950. var lt = '<';
  5951. var gt = '>';
  5952. var iframeDocument;
  5953. iframe.style.display = 'none';
  5954. __webpack_require__(/*! ./_html */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_html.js").appendChild(iframe);
  5955. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  5956. // createDict = iframe.contentWindow.Object;
  5957. // html.removeChild(iframe);
  5958. iframeDocument = iframe.contentWindow.document;
  5959. iframeDocument.open();
  5960. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  5961. iframeDocument.close();
  5962. createDict = iframeDocument.F;
  5963. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  5964. return createDict();
  5965. };
  5966. module.exports = Object.create || function create(O, Properties) {
  5967. var result;
  5968. if (O !== null) {
  5969. Empty[PROTOTYPE] = anObject(O);
  5970. result = new Empty();
  5971. Empty[PROTOTYPE] = null;
  5972. // add "__proto__" for Object.getPrototypeOf polyfill
  5973. result[IE_PROTO] = O;
  5974. } else result = createDict();
  5975. return Properties === undefined ? result : dPs(result, Properties);
  5976. };
  5977. /***/ }),
  5978. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js":
  5979. /*!****************************************************************************!*\
  5980. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js ***!
  5981. \****************************************************************************/
  5982. /*! no static exports found */
  5983. /***/ (function(module, exports, __webpack_require__) {
  5984. var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_an-object.js");
  5985. var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_ie8-dom-define.js");
  5986. var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-primitive.js");
  5987. var dP = Object.defineProperty;
  5988. exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  5989. anObject(O);
  5990. P = toPrimitive(P, true);
  5991. anObject(Attributes);
  5992. if (IE8_DOM_DEFINE) try {
  5993. return dP(O, P, Attributes);
  5994. } catch (e) { /* empty */ }
  5995. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  5996. if ('value' in Attributes) O[P] = Attributes.value;
  5997. return O;
  5998. };
  5999. /***/ }),
  6000. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dps.js":
  6001. /*!*****************************************************************************!*\
  6002. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dps.js ***!
  6003. \*****************************************************************************/
  6004. /*! no static exports found */
  6005. /***/ (function(module, exports, __webpack_require__) {
  6006. var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js");
  6007. var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_an-object.js");
  6008. var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys.js");
  6009. module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
  6010. anObject(O);
  6011. var keys = getKeys(Properties);
  6012. var length = keys.length;
  6013. var i = 0;
  6014. var P;
  6015. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  6016. return O;
  6017. };
  6018. /***/ }),
  6019. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopd.js":
  6020. /*!******************************************************************************!*\
  6021. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopd.js ***!
  6022. \******************************************************************************/
  6023. /*! no static exports found */
  6024. /***/ (function(module, exports, __webpack_require__) {
  6025. var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-pie.js");
  6026. var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_property-desc.js");
  6027. var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js");
  6028. var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-primitive.js");
  6029. var has = __webpack_require__(/*! ./_has */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js");
  6030. var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_ie8-dom-define.js");
  6031. var gOPD = Object.getOwnPropertyDescriptor;
  6032. exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) {
  6033. O = toIObject(O);
  6034. P = toPrimitive(P, true);
  6035. if (IE8_DOM_DEFINE) try {
  6036. return gOPD(O, P);
  6037. } catch (e) { /* empty */ }
  6038. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  6039. };
  6040. /***/ }),
  6041. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopn-ext.js":
  6042. /*!**********************************************************************************!*\
  6043. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopn-ext.js ***!
  6044. \**********************************************************************************/
  6045. /*! no static exports found */
  6046. /***/ (function(module, exports, __webpack_require__) {
  6047. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  6048. var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js");
  6049. var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopn.js").f;
  6050. var toString = {}.toString;
  6051. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  6052. ? Object.getOwnPropertyNames(window) : [];
  6053. var getWindowNames = function (it) {
  6054. try {
  6055. return gOPN(it);
  6056. } catch (e) {
  6057. return windowNames.slice();
  6058. }
  6059. };
  6060. module.exports.f = function getOwnPropertyNames(it) {
  6061. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  6062. };
  6063. /***/ }),
  6064. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopn.js":
  6065. /*!******************************************************************************!*\
  6066. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopn.js ***!
  6067. \******************************************************************************/
  6068. /*! no static exports found */
  6069. /***/ (function(module, exports, __webpack_require__) {
  6070. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  6071. var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys-internal.js");
  6072. var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-bug-keys.js").concat('length', 'prototype');
  6073. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  6074. return $keys(O, hiddenKeys);
  6075. };
  6076. /***/ }),
  6077. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gops.js":
  6078. /*!******************************************************************************!*\
  6079. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gops.js ***!
  6080. \******************************************************************************/
  6081. /*! no static exports found */
  6082. /***/ (function(module, exports) {
  6083. exports.f = Object.getOwnPropertySymbols;
  6084. /***/ }),
  6085. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gpo.js":
  6086. /*!*****************************************************************************!*\
  6087. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gpo.js ***!
  6088. \*****************************************************************************/
  6089. /*! no static exports found */
  6090. /***/ (function(module, exports, __webpack_require__) {
  6091. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  6092. var has = __webpack_require__(/*! ./_has */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js");
  6093. var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-object.js");
  6094. var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared-key.js")('IE_PROTO');
  6095. var ObjectProto = Object.prototype;
  6096. module.exports = Object.getPrototypeOf || function (O) {
  6097. O = toObject(O);
  6098. if (has(O, IE_PROTO)) return O[IE_PROTO];
  6099. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  6100. return O.constructor.prototype;
  6101. } return O instanceof Object ? ObjectProto : null;
  6102. };
  6103. /***/ }),
  6104. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys-internal.js":
  6105. /*!***************************************************************************************!*\
  6106. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys-internal.js ***!
  6107. \***************************************************************************************/
  6108. /*! no static exports found */
  6109. /***/ (function(module, exports, __webpack_require__) {
  6110. var has = __webpack_require__(/*! ./_has */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js");
  6111. var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js");
  6112. var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_array-includes.js")(false);
  6113. var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared-key.js")('IE_PROTO');
  6114. module.exports = function (object, names) {
  6115. var O = toIObject(object);
  6116. var i = 0;
  6117. var result = [];
  6118. var key;
  6119. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  6120. // Don't enum bug & hidden keys
  6121. while (names.length > i) if (has(O, key = names[i++])) {
  6122. ~arrayIndexOf(result, key) || result.push(key);
  6123. }
  6124. return result;
  6125. };
  6126. /***/ }),
  6127. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys.js":
  6128. /*!******************************************************************************!*\
  6129. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys.js ***!
  6130. \******************************************************************************/
  6131. /*! no static exports found */
  6132. /***/ (function(module, exports, __webpack_require__) {
  6133. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  6134. var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys-internal.js");
  6135. var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-bug-keys.js");
  6136. module.exports = Object.keys || function keys(O) {
  6137. return $keys(O, enumBugKeys);
  6138. };
  6139. /***/ }),
  6140. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-pie.js":
  6141. /*!*****************************************************************************!*\
  6142. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_object-pie.js ***!
  6143. \*****************************************************************************/
  6144. /*! no static exports found */
  6145. /***/ (function(module, exports) {
  6146. exports.f = {}.propertyIsEnumerable;
  6147. /***/ }),
  6148. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_property-desc.js":
  6149. /*!********************************************************************************!*\
  6150. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_property-desc.js ***!
  6151. \********************************************************************************/
  6152. /*! no static exports found */
  6153. /***/ (function(module, exports) {
  6154. module.exports = function (bitmap, value) {
  6155. return {
  6156. enumerable: !(bitmap & 1),
  6157. configurable: !(bitmap & 2),
  6158. writable: !(bitmap & 4),
  6159. value: value
  6160. };
  6161. };
  6162. /***/ }),
  6163. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_redefine.js":
  6164. /*!***************************************************************************!*\
  6165. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_redefine.js ***!
  6166. \***************************************************************************/
  6167. /*! no static exports found */
  6168. /***/ (function(module, exports, __webpack_require__) {
  6169. module.exports = __webpack_require__(/*! ./_hide */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js");
  6170. /***/ }),
  6171. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_set-to-string-tag.js":
  6172. /*!************************************************************************************!*\
  6173. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_set-to-string-tag.js ***!
  6174. \************************************************************************************/
  6175. /*! no static exports found */
  6176. /***/ (function(module, exports, __webpack_require__) {
  6177. var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js").f;
  6178. var has = __webpack_require__(/*! ./_has */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js");
  6179. var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js")('toStringTag');
  6180. module.exports = function (it, tag, stat) {
  6181. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  6182. };
  6183. /***/ }),
  6184. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared-key.js":
  6185. /*!*****************************************************************************!*\
  6186. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_shared-key.js ***!
  6187. \*****************************************************************************/
  6188. /*! no static exports found */
  6189. /***/ (function(module, exports, __webpack_require__) {
  6190. var shared = __webpack_require__(/*! ./_shared */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared.js")('keys');
  6191. var uid = __webpack_require__(/*! ./_uid */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_uid.js");
  6192. module.exports = function (key) {
  6193. return shared[key] || (shared[key] = uid(key));
  6194. };
  6195. /***/ }),
  6196. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared.js":
  6197. /*!*************************************************************************!*\
  6198. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_shared.js ***!
  6199. \*************************************************************************/
  6200. /*! no static exports found */
  6201. /***/ (function(module, exports, __webpack_require__) {
  6202. var core = __webpack_require__(/*! ./_core */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_core.js");
  6203. var global = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js");
  6204. var SHARED = '__core-js_shared__';
  6205. var store = global[SHARED] || (global[SHARED] = {});
  6206. (module.exports = function (key, value) {
  6207. return store[key] || (store[key] = value !== undefined ? value : {});
  6208. })('versions', []).push({
  6209. version: core.version,
  6210. mode: __webpack_require__(/*! ./_library */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_library.js") ? 'pure' : 'global',
  6211. copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
  6212. });
  6213. /***/ }),
  6214. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_string-at.js":
  6215. /*!****************************************************************************!*\
  6216. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_string-at.js ***!
  6217. \****************************************************************************/
  6218. /*! no static exports found */
  6219. /***/ (function(module, exports, __webpack_require__) {
  6220. var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-integer.js");
  6221. var defined = __webpack_require__(/*! ./_defined */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_defined.js");
  6222. // true -> String#at
  6223. // false -> String#codePointAt
  6224. module.exports = function (TO_STRING) {
  6225. return function (that, pos) {
  6226. var s = String(defined(that));
  6227. var i = toInteger(pos);
  6228. var l = s.length;
  6229. var a, b;
  6230. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  6231. a = s.charCodeAt(i);
  6232. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  6233. ? TO_STRING ? s.charAt(i) : a
  6234. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  6235. };
  6236. };
  6237. /***/ }),
  6238. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-absolute-index.js":
  6239. /*!************************************************************************************!*\
  6240. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_to-absolute-index.js ***!
  6241. \************************************************************************************/
  6242. /*! no static exports found */
  6243. /***/ (function(module, exports, __webpack_require__) {
  6244. var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-integer.js");
  6245. var max = Math.max;
  6246. var min = Math.min;
  6247. module.exports = function (index, length) {
  6248. index = toInteger(index);
  6249. return index < 0 ? max(index + length, 0) : min(index, length);
  6250. };
  6251. /***/ }),
  6252. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-integer.js":
  6253. /*!*****************************************************************************!*\
  6254. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_to-integer.js ***!
  6255. \*****************************************************************************/
  6256. /*! no static exports found */
  6257. /***/ (function(module, exports) {
  6258. // 7.1.4 ToInteger
  6259. var ceil = Math.ceil;
  6260. var floor = Math.floor;
  6261. module.exports = function (it) {
  6262. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  6263. };
  6264. /***/ }),
  6265. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js":
  6266. /*!*****************************************************************************!*\
  6267. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js ***!
  6268. \*****************************************************************************/
  6269. /*! no static exports found */
  6270. /***/ (function(module, exports, __webpack_require__) {
  6271. // to indexed object, toObject with fallback for non-array-like ES3 strings
  6272. var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iobject.js");
  6273. var defined = __webpack_require__(/*! ./_defined */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_defined.js");
  6274. module.exports = function (it) {
  6275. return IObject(defined(it));
  6276. };
  6277. /***/ }),
  6278. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-length.js":
  6279. /*!****************************************************************************!*\
  6280. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_to-length.js ***!
  6281. \****************************************************************************/
  6282. /*! no static exports found */
  6283. /***/ (function(module, exports, __webpack_require__) {
  6284. // 7.1.15 ToLength
  6285. var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-integer.js");
  6286. var min = Math.min;
  6287. module.exports = function (it) {
  6288. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  6289. };
  6290. /***/ }),
  6291. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-object.js":
  6292. /*!****************************************************************************!*\
  6293. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_to-object.js ***!
  6294. \****************************************************************************/
  6295. /*! no static exports found */
  6296. /***/ (function(module, exports, __webpack_require__) {
  6297. // 7.1.13 ToObject(argument)
  6298. var defined = __webpack_require__(/*! ./_defined */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_defined.js");
  6299. module.exports = function (it) {
  6300. return Object(defined(it));
  6301. };
  6302. /***/ }),
  6303. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-primitive.js":
  6304. /*!*******************************************************************************!*\
  6305. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_to-primitive.js ***!
  6306. \*******************************************************************************/
  6307. /*! no static exports found */
  6308. /***/ (function(module, exports, __webpack_require__) {
  6309. // 7.1.1 ToPrimitive(input [, PreferredType])
  6310. var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-object.js");
  6311. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  6312. // and the second argument - flag - preferred type is a string
  6313. module.exports = function (it, S) {
  6314. if (!isObject(it)) return it;
  6315. var fn, val;
  6316. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  6317. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  6318. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  6319. throw TypeError("Can't convert object to primitive value");
  6320. };
  6321. /***/ }),
  6322. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_uid.js":
  6323. /*!**********************************************************************!*\
  6324. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_uid.js ***!
  6325. \**********************************************************************/
  6326. /*! no static exports found */
  6327. /***/ (function(module, exports) {
  6328. var id = 0;
  6329. var px = Math.random();
  6330. module.exports = function (key) {
  6331. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  6332. };
  6333. /***/ }),
  6334. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-define.js":
  6335. /*!*****************************************************************************!*\
  6336. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-define.js ***!
  6337. \*****************************************************************************/
  6338. /*! no static exports found */
  6339. /***/ (function(module, exports, __webpack_require__) {
  6340. var global = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js");
  6341. var core = __webpack_require__(/*! ./_core */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_core.js");
  6342. var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_library.js");
  6343. var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-ext.js");
  6344. var defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js").f;
  6345. module.exports = function (name) {
  6346. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  6347. if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
  6348. };
  6349. /***/ }),
  6350. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-ext.js":
  6351. /*!**************************************************************************!*\
  6352. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-ext.js ***!
  6353. \**************************************************************************/
  6354. /*! no static exports found */
  6355. /***/ (function(module, exports, __webpack_require__) {
  6356. exports.f = __webpack_require__(/*! ./_wks */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js");
  6357. /***/ }),
  6358. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js":
  6359. /*!**********************************************************************!*\
  6360. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js ***!
  6361. \**********************************************************************/
  6362. /*! no static exports found */
  6363. /***/ (function(module, exports, __webpack_require__) {
  6364. var store = __webpack_require__(/*! ./_shared */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared.js")('wks');
  6365. var uid = __webpack_require__(/*! ./_uid */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_uid.js");
  6366. var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js").Symbol;
  6367. var USE_SYMBOL = typeof Symbol == 'function';
  6368. var $exports = module.exports = function (name) {
  6369. return store[name] || (store[name] =
  6370. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  6371. };
  6372. $exports.store = store;
  6373. /***/ }),
  6374. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.array.iterator.js":
  6375. /*!************************************************************************************!*\
  6376. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/es6.array.iterator.js ***!
  6377. \************************************************************************************/
  6378. /*! no static exports found */
  6379. /***/ (function(module, exports, __webpack_require__) {
  6380. "use strict";
  6381. var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_add-to-unscopables.js");
  6382. var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-step.js");
  6383. var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iterators.js");
  6384. var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js");
  6385. // 22.1.3.4 Array.prototype.entries()
  6386. // 22.1.3.13 Array.prototype.keys()
  6387. // 22.1.3.29 Array.prototype.values()
  6388. // 22.1.3.30 Array.prototype[@@iterator]()
  6389. module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) {
  6390. this._t = toIObject(iterated); // target
  6391. this._i = 0; // next index
  6392. this._k = kind; // kind
  6393. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  6394. }, function () {
  6395. var O = this._t;
  6396. var kind = this._k;
  6397. var index = this._i++;
  6398. if (!O || index >= O.length) {
  6399. this._t = undefined;
  6400. return step(1);
  6401. }
  6402. if (kind == 'keys') return step(0, index);
  6403. if (kind == 'values') return step(0, O[index]);
  6404. return step(0, [index, O[index]]);
  6405. }, 'values');
  6406. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  6407. Iterators.Arguments = Iterators.Array;
  6408. addToUnscopables('keys');
  6409. addToUnscopables('values');
  6410. addToUnscopables('entries');
  6411. /***/ }),
  6412. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.object.assign.js":
  6413. /*!***********************************************************************************!*\
  6414. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/es6.object.assign.js ***!
  6415. \***********************************************************************************/
  6416. /*! no static exports found */
  6417. /***/ (function(module, exports, __webpack_require__) {
  6418. // 19.1.3.1 Object.assign(target, source)
  6419. var $export = __webpack_require__(/*! ./_export */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_export.js");
  6420. $export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-assign.js") });
  6421. /***/ }),
  6422. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.object.to-string.js":
  6423. /*!**************************************************************************************!*\
  6424. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/es6.object.to-string.js ***!
  6425. \**************************************************************************************/
  6426. /*! no static exports found */
  6427. /***/ (function(module, exports) {
  6428. /***/ }),
  6429. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.string.iterator.js":
  6430. /*!*************************************************************************************!*\
  6431. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/es6.string.iterator.js ***!
  6432. \*************************************************************************************/
  6433. /*! no static exports found */
  6434. /***/ (function(module, exports, __webpack_require__) {
  6435. "use strict";
  6436. var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_string-at.js")(true);
  6437. // 21.1.3.27 String.prototype[@@iterator]()
  6438. __webpack_require__(/*! ./_iter-define */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iter-define.js")(String, 'String', function (iterated) {
  6439. this._t = String(iterated); // target
  6440. this._i = 0; // next index
  6441. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  6442. }, function () {
  6443. var O = this._t;
  6444. var index = this._i;
  6445. var point;
  6446. if (index >= O.length) return { value: undefined, done: true };
  6447. point = $at(O, index);
  6448. this._i += point.length;
  6449. return { value: point, done: false };
  6450. });
  6451. /***/ }),
  6452. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.symbol.js":
  6453. /*!****************************************************************************!*\
  6454. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/es6.symbol.js ***!
  6455. \****************************************************************************/
  6456. /*! no static exports found */
  6457. /***/ (function(module, exports, __webpack_require__) {
  6458. "use strict";
  6459. // ECMAScript 6 symbols shim
  6460. var global = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js");
  6461. var has = __webpack_require__(/*! ./_has */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_has.js");
  6462. var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_descriptors.js");
  6463. var $export = __webpack_require__(/*! ./_export */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_export.js");
  6464. var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_redefine.js");
  6465. var META = __webpack_require__(/*! ./_meta */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_meta.js").KEY;
  6466. var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_fails.js");
  6467. var shared = __webpack_require__(/*! ./_shared */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_shared.js");
  6468. var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_set-to-string-tag.js");
  6469. var uid = __webpack_require__(/*! ./_uid */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_uid.js");
  6470. var wks = __webpack_require__(/*! ./_wks */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js");
  6471. var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-ext.js");
  6472. var wksDefine = __webpack_require__(/*! ./_wks-define */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-define.js");
  6473. var enumKeys = __webpack_require__(/*! ./_enum-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_enum-keys.js");
  6474. var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-array.js");
  6475. var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_an-object.js");
  6476. var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_is-object.js");
  6477. var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-object.js");
  6478. var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-iobject.js");
  6479. var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_to-primitive.js");
  6480. var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_property-desc.js");
  6481. var _create = __webpack_require__(/*! ./_object-create */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-create.js");
  6482. var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopn-ext.js");
  6483. var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopd.js");
  6484. var $GOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gops.js");
  6485. var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-dp.js");
  6486. var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-keys.js");
  6487. var gOPD = $GOPD.f;
  6488. var dP = $DP.f;
  6489. var gOPN = gOPNExt.f;
  6490. var $Symbol = global.Symbol;
  6491. var $JSON = global.JSON;
  6492. var _stringify = $JSON && $JSON.stringify;
  6493. var PROTOTYPE = 'prototype';
  6494. var HIDDEN = wks('_hidden');
  6495. var TO_PRIMITIVE = wks('toPrimitive');
  6496. var isEnum = {}.propertyIsEnumerable;
  6497. var SymbolRegistry = shared('symbol-registry');
  6498. var AllSymbols = shared('symbols');
  6499. var OPSymbols = shared('op-symbols');
  6500. var ObjectProto = Object[PROTOTYPE];
  6501. var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
  6502. var QObject = global.QObject;
  6503. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  6504. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  6505. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  6506. var setSymbolDesc = DESCRIPTORS && $fails(function () {
  6507. return _create(dP({}, 'a', {
  6508. get: function () { return dP(this, 'a', { value: 7 }).a; }
  6509. })).a != 7;
  6510. }) ? function (it, key, D) {
  6511. var protoDesc = gOPD(ObjectProto, key);
  6512. if (protoDesc) delete ObjectProto[key];
  6513. dP(it, key, D);
  6514. if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
  6515. } : dP;
  6516. var wrap = function (tag) {
  6517. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  6518. sym._k = tag;
  6519. return sym;
  6520. };
  6521. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  6522. return typeof it == 'symbol';
  6523. } : function (it) {
  6524. return it instanceof $Symbol;
  6525. };
  6526. var $defineProperty = function defineProperty(it, key, D) {
  6527. if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  6528. anObject(it);
  6529. key = toPrimitive(key, true);
  6530. anObject(D);
  6531. if (has(AllSymbols, key)) {
  6532. if (!D.enumerable) {
  6533. if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
  6534. it[HIDDEN][key] = true;
  6535. } else {
  6536. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  6537. D = _create(D, { enumerable: createDesc(0, false) });
  6538. } return setSymbolDesc(it, key, D);
  6539. } return dP(it, key, D);
  6540. };
  6541. var $defineProperties = function defineProperties(it, P) {
  6542. anObject(it);
  6543. var keys = enumKeys(P = toIObject(P));
  6544. var i = 0;
  6545. var l = keys.length;
  6546. var key;
  6547. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  6548. return it;
  6549. };
  6550. var $create = function create(it, P) {
  6551. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  6552. };
  6553. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  6554. var E = isEnum.call(this, key = toPrimitive(key, true));
  6555. if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  6556. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  6557. };
  6558. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  6559. it = toIObject(it);
  6560. key = toPrimitive(key, true);
  6561. if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  6562. var D = gOPD(it, key);
  6563. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  6564. return D;
  6565. };
  6566. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  6567. var names = gOPN(toIObject(it));
  6568. var result = [];
  6569. var i = 0;
  6570. var key;
  6571. while (names.length > i) {
  6572. if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  6573. } return result;
  6574. };
  6575. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  6576. var IS_OP = it === ObjectProto;
  6577. var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  6578. var result = [];
  6579. var i = 0;
  6580. var key;
  6581. while (names.length > i) {
  6582. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  6583. } return result;
  6584. };
  6585. // 19.4.1.1 Symbol([description])
  6586. if (!USE_NATIVE) {
  6587. $Symbol = function Symbol() {
  6588. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
  6589. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  6590. var $set = function (value) {
  6591. if (this === ObjectProto) $set.call(OPSymbols, value);
  6592. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  6593. setSymbolDesc(this, tag, createDesc(1, value));
  6594. };
  6595. if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
  6596. return wrap(tag);
  6597. };
  6598. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  6599. return this._k;
  6600. });
  6601. $GOPD.f = $getOwnPropertyDescriptor;
  6602. $DP.f = $defineProperty;
  6603. __webpack_require__(/*! ./_object-gopn */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames;
  6604. __webpack_require__(/*! ./_object-pie */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_object-pie.js").f = $propertyIsEnumerable;
  6605. $GOPS.f = $getOwnPropertySymbols;
  6606. if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_library.js")) {
  6607. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  6608. }
  6609. wksExt.f = function (name) {
  6610. return wrap(wks(name));
  6611. };
  6612. }
  6613. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
  6614. for (var es6Symbols = (
  6615. // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  6616. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
  6617. ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
  6618. for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
  6619. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  6620. // 19.4.2.1 Symbol.for(key)
  6621. 'for': function (key) {
  6622. return has(SymbolRegistry, key += '')
  6623. ? SymbolRegistry[key]
  6624. : SymbolRegistry[key] = $Symbol(key);
  6625. },
  6626. // 19.4.2.5 Symbol.keyFor(sym)
  6627. keyFor: function keyFor(sym) {
  6628. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
  6629. for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  6630. },
  6631. useSetter: function () { setter = true; },
  6632. useSimple: function () { setter = false; }
  6633. });
  6634. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  6635. // 19.1.2.2 Object.create(O [, Properties])
  6636. create: $create,
  6637. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  6638. defineProperty: $defineProperty,
  6639. // 19.1.2.3 Object.defineProperties(O, Properties)
  6640. defineProperties: $defineProperties,
  6641. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  6642. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  6643. // 19.1.2.7 Object.getOwnPropertyNames(O)
  6644. getOwnPropertyNames: $getOwnPropertyNames,
  6645. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  6646. getOwnPropertySymbols: $getOwnPropertySymbols
  6647. });
  6648. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  6649. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  6650. var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
  6651. $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
  6652. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  6653. return $GOPS.f(toObject(it));
  6654. }
  6655. });
  6656. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  6657. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  6658. var S = $Symbol();
  6659. // MS Edge converts symbol values to JSON as {}
  6660. // WebKit converts symbol values to JSON as null
  6661. // V8 throws on boxed symbols
  6662. return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
  6663. })), 'JSON', {
  6664. stringify: function stringify(it) {
  6665. var args = [it];
  6666. var i = 1;
  6667. var replacer, $replacer;
  6668. while (arguments.length > i) args.push(arguments[i++]);
  6669. $replacer = replacer = args[1];
  6670. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  6671. if (!isArray(replacer)) replacer = function (key, value) {
  6672. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  6673. if (!isSymbol(value)) return value;
  6674. };
  6675. args[1] = replacer;
  6676. return _stringify.apply($JSON, args);
  6677. }
  6678. });
  6679. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  6680. $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  6681. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  6682. setToStringTag($Symbol, 'Symbol');
  6683. // 20.2.1.9 Math[@@toStringTag]
  6684. setToStringTag(Math, 'Math', true);
  6685. // 24.3.3 JSON[@@toStringTag]
  6686. setToStringTag(global.JSON, 'JSON', true);
  6687. /***/ }),
  6688. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/es7.symbol.async-iterator.js":
  6689. /*!*******************************************************************************************!*\
  6690. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/es7.symbol.async-iterator.js ***!
  6691. \*******************************************************************************************/
  6692. /*! no static exports found */
  6693. /***/ (function(module, exports, __webpack_require__) {
  6694. __webpack_require__(/*! ./_wks-define */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-define.js")('asyncIterator');
  6695. /***/ }),
  6696. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/es7.symbol.observable.js":
  6697. /*!***************************************************************************************!*\
  6698. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/es7.symbol.observable.js ***!
  6699. \***************************************************************************************/
  6700. /*! no static exports found */
  6701. /***/ (function(module, exports, __webpack_require__) {
  6702. __webpack_require__(/*! ./_wks-define */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks-define.js")('observable');
  6703. /***/ }),
  6704. /***/ "./node_modules/_core-js@2.6.12@core-js/library/modules/web.dom.iterable.js":
  6705. /*!**********************************************************************************!*\
  6706. !*** ./node_modules/_core-js@2.6.12@core-js/library/modules/web.dom.iterable.js ***!
  6707. \**********************************************************************************/
  6708. /*! no static exports found */
  6709. /***/ (function(module, exports, __webpack_require__) {
  6710. __webpack_require__(/*! ./es6.array.iterator */ "./node_modules/_core-js@2.6.12@core-js/library/modules/es6.array.iterator.js");
  6711. var global = __webpack_require__(/*! ./_global */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_global.js");
  6712. var hide = __webpack_require__(/*! ./_hide */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_hide.js");
  6713. var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_iterators.js");
  6714. var TO_STRING_TAG = __webpack_require__(/*! ./_wks */ "./node_modules/_core-js@2.6.12@core-js/library/modules/_wks.js")('toStringTag');
  6715. var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
  6716. 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
  6717. 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
  6718. 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
  6719. 'TextTrackList,TouchList').split(',');
  6720. for (var i = 0; i < DOMIterables.length; i++) {
  6721. var NAME = DOMIterables[i];
  6722. var Collection = global[NAME];
  6723. var proto = Collection && Collection.prototype;
  6724. if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  6725. Iterators[NAME] = Iterators.Array;
  6726. }
  6727. /***/ }),
  6728. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/a-callable.js":
  6729. /*!**********************************************************************!*\
  6730. !*** ./node_modules/_core-js@3.25.0@core-js/internals/a-callable.js ***!
  6731. \**********************************************************************/
  6732. /*! no static exports found */
  6733. /***/ (function(module, exports, __webpack_require__) {
  6734. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  6735. var tryToString = __webpack_require__(/*! ../internals/try-to-string */ "./node_modules/_core-js@3.25.0@core-js/internals/try-to-string.js");
  6736. var $TypeError = TypeError;
  6737. // `Assert: IsCallable(argument) is true`
  6738. module.exports = function (argument) {
  6739. if (isCallable(argument)) return argument;
  6740. throw $TypeError(tryToString(argument) + ' is not a function');
  6741. };
  6742. /***/ }),
  6743. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/a-possible-prototype.js":
  6744. /*!********************************************************************************!*\
  6745. !*** ./node_modules/_core-js@3.25.0@core-js/internals/a-possible-prototype.js ***!
  6746. \********************************************************************************/
  6747. /*! no static exports found */
  6748. /***/ (function(module, exports, __webpack_require__) {
  6749. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  6750. var $String = String;
  6751. var $TypeError = TypeError;
  6752. module.exports = function (argument) {
  6753. if (typeof argument == 'object' || isCallable(argument)) return argument;
  6754. throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
  6755. };
  6756. /***/ }),
  6757. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/an-instance.js":
  6758. /*!***********************************************************************!*\
  6759. !*** ./node_modules/_core-js@3.25.0@core-js/internals/an-instance.js ***!
  6760. \***********************************************************************/
  6761. /*! no static exports found */
  6762. /***/ (function(module, exports, __webpack_require__) {
  6763. var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-is-prototype-of.js");
  6764. var $TypeError = TypeError;
  6765. module.exports = function (it, Prototype) {
  6766. if (isPrototypeOf(Prototype, it)) return it;
  6767. throw $TypeError('Incorrect invocation');
  6768. };
  6769. /***/ }),
  6770. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/an-object.js":
  6771. /*!*********************************************************************!*\
  6772. !*** ./node_modules/_core-js@3.25.0@core-js/internals/an-object.js ***!
  6773. \*********************************************************************/
  6774. /*! no static exports found */
  6775. /***/ (function(module, exports, __webpack_require__) {
  6776. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  6777. var $String = String;
  6778. var $TypeError = TypeError;
  6779. // `Assert: Type(argument) is Object`
  6780. module.exports = function (argument) {
  6781. if (isObject(argument)) return argument;
  6782. throw $TypeError($String(argument) + ' is not an object');
  6783. };
  6784. /***/ }),
  6785. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-basic-detection.js":
  6786. /*!****************************************************************************************!*\
  6787. !*** ./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-basic-detection.js ***!
  6788. \****************************************************************************************/
  6789. /*! no static exports found */
  6790. /***/ (function(module, exports) {
  6791. // eslint-disable-next-line es-x/no-typed-arrays -- safe
  6792. module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
  6793. /***/ }),
  6794. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-view-core.js":
  6795. /*!**********************************************************************************!*\
  6796. !*** ./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-view-core.js ***!
  6797. \**********************************************************************************/
  6798. /*! no static exports found */
  6799. /***/ (function(module, exports, __webpack_require__) {
  6800. "use strict";
  6801. var NATIVE_ARRAY_BUFFER = __webpack_require__(/*! ../internals/array-buffer-basic-detection */ "./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-basic-detection.js");
  6802. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  6803. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  6804. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  6805. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  6806. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  6807. var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/_core-js@3.25.0@core-js/internals/classof.js");
  6808. var tryToString = __webpack_require__(/*! ../internals/try-to-string */ "./node_modules/_core-js@3.25.0@core-js/internals/try-to-string.js");
  6809. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/_core-js@3.25.0@core-js/internals/create-non-enumerable-property.js");
  6810. var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/define-built-in.js");
  6811. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js").f;
  6812. var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-is-prototype-of.js");
  6813. var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-prototype-of.js");
  6814. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-set-prototype-of.js");
  6815. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/_core-js@3.25.0@core-js/internals/well-known-symbol.js");
  6816. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/_core-js@3.25.0@core-js/internals/uid.js");
  6817. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/_core-js@3.25.0@core-js/internals/internal-state.js");
  6818. var enforceInternalState = InternalStateModule.enforce;
  6819. var getInternalState = InternalStateModule.get;
  6820. var Int8Array = global.Int8Array;
  6821. var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
  6822. var Uint8ClampedArray = global.Uint8ClampedArray;
  6823. var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
  6824. var TypedArray = Int8Array && getPrototypeOf(Int8Array);
  6825. var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
  6826. var ObjectPrototype = Object.prototype;
  6827. var TypeError = global.TypeError;
  6828. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  6829. var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
  6830. var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
  6831. // Fixing native typed arrays in Opera Presto crashes the browser, see #595
  6832. var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
  6833. var TYPED_ARRAY_TAG_REQUIRED = false;
  6834. var NAME, Constructor, Prototype;
  6835. var TypedArrayConstructorsList = {
  6836. Int8Array: 1,
  6837. Uint8Array: 1,
  6838. Uint8ClampedArray: 1,
  6839. Int16Array: 2,
  6840. Uint16Array: 2,
  6841. Int32Array: 4,
  6842. Uint32Array: 4,
  6843. Float32Array: 4,
  6844. Float64Array: 8
  6845. };
  6846. var BigIntArrayConstructorsList = {
  6847. BigInt64Array: 8,
  6848. BigUint64Array: 8
  6849. };
  6850. var isView = function isView(it) {
  6851. if (!isObject(it)) return false;
  6852. var klass = classof(it);
  6853. return klass === 'DataView'
  6854. || hasOwn(TypedArrayConstructorsList, klass)
  6855. || hasOwn(BigIntArrayConstructorsList, klass);
  6856. };
  6857. var getTypedArrayConstructor = function (it) {
  6858. var proto = getPrototypeOf(it);
  6859. if (!isObject(proto)) return;
  6860. var state = getInternalState(proto);
  6861. return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
  6862. };
  6863. var isTypedArray = function (it) {
  6864. if (!isObject(it)) return false;
  6865. var klass = classof(it);
  6866. return hasOwn(TypedArrayConstructorsList, klass)
  6867. || hasOwn(BigIntArrayConstructorsList, klass);
  6868. };
  6869. var aTypedArray = function (it) {
  6870. if (isTypedArray(it)) return it;
  6871. throw TypeError('Target is not a typed array');
  6872. };
  6873. var aTypedArrayConstructor = function (C) {
  6874. if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
  6875. throw TypeError(tryToString(C) + ' is not a typed array constructor');
  6876. };
  6877. var exportTypedArrayMethod = function (KEY, property, forced, options) {
  6878. if (!DESCRIPTORS) return;
  6879. if (forced) for (var ARRAY in TypedArrayConstructorsList) {
  6880. var TypedArrayConstructor = global[ARRAY];
  6881. if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
  6882. delete TypedArrayConstructor.prototype[KEY];
  6883. } catch (error) {
  6884. // old WebKit bug - some methods are non-configurable
  6885. try {
  6886. TypedArrayConstructor.prototype[KEY] = property;
  6887. } catch (error2) { /* empty */ }
  6888. }
  6889. }
  6890. if (!TypedArrayPrototype[KEY] || forced) {
  6891. defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
  6892. : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
  6893. }
  6894. };
  6895. var exportTypedArrayStaticMethod = function (KEY, property, forced) {
  6896. var ARRAY, TypedArrayConstructor;
  6897. if (!DESCRIPTORS) return;
  6898. if (setPrototypeOf) {
  6899. if (forced) for (ARRAY in TypedArrayConstructorsList) {
  6900. TypedArrayConstructor = global[ARRAY];
  6901. if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
  6902. delete TypedArrayConstructor[KEY];
  6903. } catch (error) { /* empty */ }
  6904. }
  6905. if (!TypedArray[KEY] || forced) {
  6906. // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
  6907. try {
  6908. return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
  6909. } catch (error) { /* empty */ }
  6910. } else return;
  6911. }
  6912. for (ARRAY in TypedArrayConstructorsList) {
  6913. TypedArrayConstructor = global[ARRAY];
  6914. if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
  6915. defineBuiltIn(TypedArrayConstructor, KEY, property);
  6916. }
  6917. }
  6918. };
  6919. for (NAME in TypedArrayConstructorsList) {
  6920. Constructor = global[NAME];
  6921. Prototype = Constructor && Constructor.prototype;
  6922. if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
  6923. else NATIVE_ARRAY_BUFFER_VIEWS = false;
  6924. }
  6925. for (NAME in BigIntArrayConstructorsList) {
  6926. Constructor = global[NAME];
  6927. Prototype = Constructor && Constructor.prototype;
  6928. if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
  6929. }
  6930. // WebKit bug - typed arrays constructors prototype is Object.prototype
  6931. if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
  6932. // eslint-disable-next-line no-shadow -- safe
  6933. TypedArray = function TypedArray() {
  6934. throw TypeError('Incorrect invocation');
  6935. };
  6936. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  6937. if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
  6938. }
  6939. }
  6940. if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
  6941. TypedArrayPrototype = TypedArray.prototype;
  6942. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  6943. if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
  6944. }
  6945. }
  6946. // WebKit bug - one more object in Uint8ClampedArray prototype chain
  6947. if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
  6948. setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
  6949. }
  6950. if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
  6951. TYPED_ARRAY_TAG_REQUIRED = true;
  6952. defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
  6953. return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
  6954. } });
  6955. for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
  6956. createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
  6957. }
  6958. }
  6959. module.exports = {
  6960. NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
  6961. TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
  6962. aTypedArray: aTypedArray,
  6963. aTypedArrayConstructor: aTypedArrayConstructor,
  6964. exportTypedArrayMethod: exportTypedArrayMethod,
  6965. exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
  6966. getTypedArrayConstructor: getTypedArrayConstructor,
  6967. isView: isView,
  6968. isTypedArray: isTypedArray,
  6969. TypedArray: TypedArray,
  6970. TypedArrayPrototype: TypedArrayPrototype
  6971. };
  6972. /***/ }),
  6973. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/array-includes.js":
  6974. /*!**************************************************************************!*\
  6975. !*** ./node_modules/_core-js@3.25.0@core-js/internals/array-includes.js ***!
  6976. \**************************************************************************/
  6977. /*! no static exports found */
  6978. /***/ (function(module, exports, __webpack_require__) {
  6979. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/_core-js@3.25.0@core-js/internals/to-indexed-object.js");
  6980. var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/_core-js@3.25.0@core-js/internals/to-absolute-index.js");
  6981. var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ "./node_modules/_core-js@3.25.0@core-js/internals/length-of-array-like.js");
  6982. // `Array.prototype.{ indexOf, includes }` methods implementation
  6983. var createMethod = function (IS_INCLUDES) {
  6984. return function ($this, el, fromIndex) {
  6985. var O = toIndexedObject($this);
  6986. var length = lengthOfArrayLike(O);
  6987. var index = toAbsoluteIndex(fromIndex, length);
  6988. var value;
  6989. // Array#includes uses SameValueZero equality algorithm
  6990. // eslint-disable-next-line no-self-compare -- NaN check
  6991. if (IS_INCLUDES && el != el) while (length > index) {
  6992. value = O[index++];
  6993. // eslint-disable-next-line no-self-compare -- NaN check
  6994. if (value != value) return true;
  6995. // Array#indexOf ignores holes, Array#includes - not
  6996. } else for (;length > index; index++) {
  6997. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  6998. } return !IS_INCLUDES && -1;
  6999. };
  7000. };
  7001. module.exports = {
  7002. // `Array.prototype.includes` method
  7003. // https://tc39.es/ecma262/#sec-array.prototype.includes
  7004. includes: createMethod(true),
  7005. // `Array.prototype.indexOf` method
  7006. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  7007. indexOf: createMethod(false)
  7008. };
  7009. /***/ }),
  7010. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/array-iteration-from-last.js":
  7011. /*!*************************************************************************************!*\
  7012. !*** ./node_modules/_core-js@3.25.0@core-js/internals/array-iteration-from-last.js ***!
  7013. \*************************************************************************************/
  7014. /*! no static exports found */
  7015. /***/ (function(module, exports, __webpack_require__) {
  7016. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/_core-js@3.25.0@core-js/internals/function-bind-context.js");
  7017. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/_core-js@3.25.0@core-js/internals/indexed-object.js");
  7018. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/_core-js@3.25.0@core-js/internals/to-object.js");
  7019. var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ "./node_modules/_core-js@3.25.0@core-js/internals/length-of-array-like.js");
  7020. // `Array.prototype.{ findLast, findLastIndex }` methods implementation
  7021. var createMethod = function (TYPE) {
  7022. var IS_FIND_LAST_INDEX = TYPE == 1;
  7023. return function ($this, callbackfn, that) {
  7024. var O = toObject($this);
  7025. var self = IndexedObject(O);
  7026. var boundFunction = bind(callbackfn, that);
  7027. var index = lengthOfArrayLike(self);
  7028. var value, result;
  7029. while (index-- > 0) {
  7030. value = self[index];
  7031. result = boundFunction(value, index, O);
  7032. if (result) switch (TYPE) {
  7033. case 0: return value; // findLast
  7034. case 1: return index; // findLastIndex
  7035. }
  7036. }
  7037. return IS_FIND_LAST_INDEX ? -1 : undefined;
  7038. };
  7039. };
  7040. module.exports = {
  7041. // `Array.prototype.findLast` method
  7042. // https://github.com/tc39/proposal-array-find-from-last
  7043. findLast: createMethod(0),
  7044. // `Array.prototype.findLastIndex` method
  7045. // https://github.com/tc39/proposal-array-find-from-last
  7046. findLastIndex: createMethod(1)
  7047. };
  7048. /***/ }),
  7049. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/classof-raw.js":
  7050. /*!***********************************************************************!*\
  7051. !*** ./node_modules/_core-js@3.25.0@core-js/internals/classof-raw.js ***!
  7052. \***********************************************************************/
  7053. /*! no static exports found */
  7054. /***/ (function(module, exports, __webpack_require__) {
  7055. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  7056. var toString = uncurryThis({}.toString);
  7057. var stringSlice = uncurryThis(''.slice);
  7058. module.exports = function (it) {
  7059. return stringSlice(toString(it), 8, -1);
  7060. };
  7061. /***/ }),
  7062. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/classof.js":
  7063. /*!*******************************************************************!*\
  7064. !*** ./node_modules/_core-js@3.25.0@core-js/internals/classof.js ***!
  7065. \*******************************************************************/
  7066. /*! no static exports found */
  7067. /***/ (function(module, exports, __webpack_require__) {
  7068. var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/_core-js@3.25.0@core-js/internals/to-string-tag-support.js");
  7069. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7070. var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/_core-js@3.25.0@core-js/internals/classof-raw.js");
  7071. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/_core-js@3.25.0@core-js/internals/well-known-symbol.js");
  7072. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  7073. var $Object = Object;
  7074. // ES3 wrong here
  7075. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  7076. // fallback for IE11 Script Access Denied error
  7077. var tryGet = function (it, key) {
  7078. try {
  7079. return it[key];
  7080. } catch (error) { /* empty */ }
  7081. };
  7082. // getting tag from ES6+ `Object.prototype.toString`
  7083. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  7084. var O, tag, result;
  7085. return it === undefined ? 'Undefined' : it === null ? 'Null'
  7086. // @@toStringTag case
  7087. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  7088. // builtinTag case
  7089. : CORRECT_ARGUMENTS ? classofRaw(O)
  7090. // ES3 arguments fallback
  7091. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  7092. };
  7093. /***/ }),
  7094. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/copy-constructor-properties.js":
  7095. /*!***************************************************************************************!*\
  7096. !*** ./node_modules/_core-js@3.25.0@core-js/internals/copy-constructor-properties.js ***!
  7097. \***************************************************************************************/
  7098. /*! no static exports found */
  7099. /***/ (function(module, exports, __webpack_require__) {
  7100. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  7101. var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/_core-js@3.25.0@core-js/internals/own-keys.js");
  7102. var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-descriptor.js");
  7103. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js");
  7104. module.exports = function (target, source, exceptions) {
  7105. var keys = ownKeys(source);
  7106. var defineProperty = definePropertyModule.f;
  7107. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  7108. for (var i = 0; i < keys.length; i++) {
  7109. var key = keys[i];
  7110. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  7111. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  7112. }
  7113. }
  7114. };
  7115. /***/ }),
  7116. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/correct-prototype-getter.js":
  7117. /*!************************************************************************************!*\
  7118. !*** ./node_modules/_core-js@3.25.0@core-js/internals/correct-prototype-getter.js ***!
  7119. \************************************************************************************/
  7120. /*! no static exports found */
  7121. /***/ (function(module, exports, __webpack_require__) {
  7122. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7123. module.exports = !fails(function () {
  7124. function F() { /* empty */ }
  7125. F.prototype.constructor = null;
  7126. // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
  7127. return Object.getPrototypeOf(new F()) !== F.prototype;
  7128. });
  7129. /***/ }),
  7130. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/create-non-enumerable-property.js":
  7131. /*!******************************************************************************************!*\
  7132. !*** ./node_modules/_core-js@3.25.0@core-js/internals/create-non-enumerable-property.js ***!
  7133. \******************************************************************************************/
  7134. /*! no static exports found */
  7135. /***/ (function(module, exports, __webpack_require__) {
  7136. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  7137. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js");
  7138. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/_core-js@3.25.0@core-js/internals/create-property-descriptor.js");
  7139. module.exports = DESCRIPTORS ? function (object, key, value) {
  7140. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  7141. } : function (object, key, value) {
  7142. object[key] = value;
  7143. return object;
  7144. };
  7145. /***/ }),
  7146. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/create-property-descriptor.js":
  7147. /*!**************************************************************************************!*\
  7148. !*** ./node_modules/_core-js@3.25.0@core-js/internals/create-property-descriptor.js ***!
  7149. \**************************************************************************************/
  7150. /*! no static exports found */
  7151. /***/ (function(module, exports) {
  7152. module.exports = function (bitmap, value) {
  7153. return {
  7154. enumerable: !(bitmap & 1),
  7155. configurable: !(bitmap & 2),
  7156. writable: !(bitmap & 4),
  7157. value: value
  7158. };
  7159. };
  7160. /***/ }),
  7161. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/define-built-in.js":
  7162. /*!***************************************************************************!*\
  7163. !*** ./node_modules/_core-js@3.25.0@core-js/internals/define-built-in.js ***!
  7164. \***************************************************************************/
  7165. /*! no static exports found */
  7166. /***/ (function(module, exports, __webpack_require__) {
  7167. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7168. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js");
  7169. var makeBuiltIn = __webpack_require__(/*! ../internals/make-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/make-built-in.js");
  7170. var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ "./node_modules/_core-js@3.25.0@core-js/internals/define-global-property.js");
  7171. module.exports = function (O, key, value, options) {
  7172. if (!options) options = {};
  7173. var simple = options.enumerable;
  7174. var name = options.name !== undefined ? options.name : key;
  7175. if (isCallable(value)) makeBuiltIn(value, name, options);
  7176. if (options.global) {
  7177. if (simple) O[key] = value;
  7178. else defineGlobalProperty(key, value);
  7179. } else {
  7180. try {
  7181. if (!options.unsafe) delete O[key];
  7182. else if (O[key]) simple = true;
  7183. } catch (error) { /* empty */ }
  7184. if (simple) O[key] = value;
  7185. else definePropertyModule.f(O, key, {
  7186. value: value,
  7187. enumerable: false,
  7188. configurable: !options.nonConfigurable,
  7189. writable: !options.nonWritable
  7190. });
  7191. } return O;
  7192. };
  7193. /***/ }),
  7194. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/define-global-property.js":
  7195. /*!**********************************************************************************!*\
  7196. !*** ./node_modules/_core-js@3.25.0@core-js/internals/define-global-property.js ***!
  7197. \**********************************************************************************/
  7198. /*! no static exports found */
  7199. /***/ (function(module, exports, __webpack_require__) {
  7200. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  7201. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  7202. var defineProperty = Object.defineProperty;
  7203. module.exports = function (key, value) {
  7204. try {
  7205. defineProperty(global, key, { value: value, configurable: true, writable: true });
  7206. } catch (error) {
  7207. global[key] = value;
  7208. } return value;
  7209. };
  7210. /***/ }),
  7211. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js":
  7212. /*!***********************************************************************!*\
  7213. !*** ./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js ***!
  7214. \***********************************************************************/
  7215. /*! no static exports found */
  7216. /***/ (function(module, exports, __webpack_require__) {
  7217. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7218. // Detect IE8's incomplete defineProperty implementation
  7219. module.exports = !fails(function () {
  7220. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  7221. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  7222. });
  7223. /***/ }),
  7224. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/document-create-element.js":
  7225. /*!***********************************************************************************!*\
  7226. !*** ./node_modules/_core-js@3.25.0@core-js/internals/document-create-element.js ***!
  7227. \***********************************************************************************/
  7228. /*! no static exports found */
  7229. /***/ (function(module, exports, __webpack_require__) {
  7230. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  7231. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  7232. var document = global.document;
  7233. // typeof document.createElement is 'object' in old IE
  7234. var EXISTS = isObject(document) && isObject(document.createElement);
  7235. module.exports = function (it) {
  7236. return EXISTS ? document.createElement(it) : {};
  7237. };
  7238. /***/ }),
  7239. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/dom-exception-constants.js":
  7240. /*!***********************************************************************************!*\
  7241. !*** ./node_modules/_core-js@3.25.0@core-js/internals/dom-exception-constants.js ***!
  7242. \***********************************************************************************/
  7243. /*! no static exports found */
  7244. /***/ (function(module, exports) {
  7245. module.exports = {
  7246. IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
  7247. DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
  7248. HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
  7249. WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
  7250. InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
  7251. NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
  7252. NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
  7253. NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
  7254. NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
  7255. InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
  7256. InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
  7257. SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
  7258. InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
  7259. NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
  7260. InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
  7261. ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
  7262. TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
  7263. SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
  7264. NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
  7265. AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
  7266. URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
  7267. QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
  7268. TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
  7269. InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
  7270. DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
  7271. };
  7272. /***/ }),
  7273. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/engine-user-agent.js":
  7274. /*!*****************************************************************************!*\
  7275. !*** ./node_modules/_core-js@3.25.0@core-js/internals/engine-user-agent.js ***!
  7276. \*****************************************************************************/
  7277. /*! no static exports found */
  7278. /***/ (function(module, exports, __webpack_require__) {
  7279. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/get-built-in.js");
  7280. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  7281. /***/ }),
  7282. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/engine-v8-version.js":
  7283. /*!*****************************************************************************!*\
  7284. !*** ./node_modules/_core-js@3.25.0@core-js/internals/engine-v8-version.js ***!
  7285. \*****************************************************************************/
  7286. /*! no static exports found */
  7287. /***/ (function(module, exports, __webpack_require__) {
  7288. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  7289. var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/_core-js@3.25.0@core-js/internals/engine-user-agent.js");
  7290. var process = global.process;
  7291. var Deno = global.Deno;
  7292. var versions = process && process.versions || Deno && Deno.version;
  7293. var v8 = versions && versions.v8;
  7294. var match, version;
  7295. if (v8) {
  7296. match = v8.split('.');
  7297. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  7298. // but their correct versions are not interesting for us
  7299. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  7300. }
  7301. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  7302. // so check `userAgent` even if `.v8` exists, but 0
  7303. if (!version && userAgent) {
  7304. match = userAgent.match(/Edge\/(\d+)/);
  7305. if (!match || match[1] >= 74) {
  7306. match = userAgent.match(/Chrome\/(\d+)/);
  7307. if (match) version = +match[1];
  7308. }
  7309. }
  7310. module.exports = version;
  7311. /***/ }),
  7312. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/enum-bug-keys.js":
  7313. /*!*************************************************************************!*\
  7314. !*** ./node_modules/_core-js@3.25.0@core-js/internals/enum-bug-keys.js ***!
  7315. \*************************************************************************/
  7316. /*! no static exports found */
  7317. /***/ (function(module, exports) {
  7318. // IE8- don't enum bug keys
  7319. module.exports = [
  7320. 'constructor',
  7321. 'hasOwnProperty',
  7322. 'isPrototypeOf',
  7323. 'propertyIsEnumerable',
  7324. 'toLocaleString',
  7325. 'toString',
  7326. 'valueOf'
  7327. ];
  7328. /***/ }),
  7329. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/error-stack-clear.js":
  7330. /*!*****************************************************************************!*\
  7331. !*** ./node_modules/_core-js@3.25.0@core-js/internals/error-stack-clear.js ***!
  7332. \*****************************************************************************/
  7333. /*! no static exports found */
  7334. /***/ (function(module, exports, __webpack_require__) {
  7335. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  7336. var $Error = Error;
  7337. var replace = uncurryThis(''.replace);
  7338. var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
  7339. var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
  7340. var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
  7341. module.exports = function (stack, dropEntries) {
  7342. if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
  7343. while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  7344. } return stack;
  7345. };
  7346. /***/ }),
  7347. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/error-stack-installable.js":
  7348. /*!***********************************************************************************!*\
  7349. !*** ./node_modules/_core-js@3.25.0@core-js/internals/error-stack-installable.js ***!
  7350. \***********************************************************************************/
  7351. /*! no static exports found */
  7352. /***/ (function(module, exports, __webpack_require__) {
  7353. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7354. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/_core-js@3.25.0@core-js/internals/create-property-descriptor.js");
  7355. module.exports = !fails(function () {
  7356. var error = Error('a');
  7357. if (!('stack' in error)) return true;
  7358. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  7359. Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  7360. return error.stack !== 7;
  7361. });
  7362. /***/ }),
  7363. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/export.js":
  7364. /*!******************************************************************!*\
  7365. !*** ./node_modules/_core-js@3.25.0@core-js/internals/export.js ***!
  7366. \******************************************************************/
  7367. /*! no static exports found */
  7368. /***/ (function(module, exports, __webpack_require__) {
  7369. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  7370. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-descriptor.js").f;
  7371. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/_core-js@3.25.0@core-js/internals/create-non-enumerable-property.js");
  7372. var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/define-built-in.js");
  7373. var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ "./node_modules/_core-js@3.25.0@core-js/internals/define-global-property.js");
  7374. var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/_core-js@3.25.0@core-js/internals/copy-constructor-properties.js");
  7375. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/_core-js@3.25.0@core-js/internals/is-forced.js");
  7376. /*
  7377. options.target - name of the target object
  7378. options.global - target is the global object
  7379. options.stat - export as static methods of target
  7380. options.proto - export as prototype methods of target
  7381. options.real - real prototype method for the `pure` version
  7382. options.forced - export even if the native feature is available
  7383. options.bind - bind methods to the target, required for the `pure` version
  7384. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  7385. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  7386. options.sham - add a flag to not completely full polyfills
  7387. options.enumerable - export as enumerable property
  7388. options.dontCallGetSet - prevent calling a getter on target
  7389. options.name - the .name of the function if it does not match the key
  7390. */
  7391. module.exports = function (options, source) {
  7392. var TARGET = options.target;
  7393. var GLOBAL = options.global;
  7394. var STATIC = options.stat;
  7395. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  7396. if (GLOBAL) {
  7397. target = global;
  7398. } else if (STATIC) {
  7399. target = global[TARGET] || defineGlobalProperty(TARGET, {});
  7400. } else {
  7401. target = (global[TARGET] || {}).prototype;
  7402. }
  7403. if (target) for (key in source) {
  7404. sourceProperty = source[key];
  7405. if (options.dontCallGetSet) {
  7406. descriptor = getOwnPropertyDescriptor(target, key);
  7407. targetProperty = descriptor && descriptor.value;
  7408. } else targetProperty = target[key];
  7409. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  7410. // contained in target
  7411. if (!FORCED && targetProperty !== undefined) {
  7412. if (typeof sourceProperty == typeof targetProperty) continue;
  7413. copyConstructorProperties(sourceProperty, targetProperty);
  7414. }
  7415. // add a flag to not completely full polyfills
  7416. if (options.sham || (targetProperty && targetProperty.sham)) {
  7417. createNonEnumerableProperty(sourceProperty, 'sham', true);
  7418. }
  7419. defineBuiltIn(target, key, sourceProperty, options);
  7420. }
  7421. };
  7422. /***/ }),
  7423. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js":
  7424. /*!*****************************************************************!*\
  7425. !*** ./node_modules/_core-js@3.25.0@core-js/internals/fails.js ***!
  7426. \*****************************************************************/
  7427. /*! no static exports found */
  7428. /***/ (function(module, exports) {
  7429. module.exports = function (exec) {
  7430. try {
  7431. return !!exec();
  7432. } catch (error) {
  7433. return true;
  7434. }
  7435. };
  7436. /***/ }),
  7437. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/function-apply.js":
  7438. /*!**************************************************************************!*\
  7439. !*** ./node_modules/_core-js@3.25.0@core-js/internals/function-apply.js ***!
  7440. \**************************************************************************/
  7441. /*! no static exports found */
  7442. /***/ (function(module, exports, __webpack_require__) {
  7443. var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ "./node_modules/_core-js@3.25.0@core-js/internals/function-bind-native.js");
  7444. var FunctionPrototype = Function.prototype;
  7445. var apply = FunctionPrototype.apply;
  7446. var call = FunctionPrototype.call;
  7447. // eslint-disable-next-line es-x/no-reflect -- safe
  7448. module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  7449. return call.apply(apply, arguments);
  7450. });
  7451. /***/ }),
  7452. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/function-bind-context.js":
  7453. /*!*********************************************************************************!*\
  7454. !*** ./node_modules/_core-js@3.25.0@core-js/internals/function-bind-context.js ***!
  7455. \*********************************************************************************/
  7456. /*! no static exports found */
  7457. /***/ (function(module, exports, __webpack_require__) {
  7458. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  7459. var aCallable = __webpack_require__(/*! ../internals/a-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/a-callable.js");
  7460. var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ "./node_modules/_core-js@3.25.0@core-js/internals/function-bind-native.js");
  7461. var bind = uncurryThis(uncurryThis.bind);
  7462. // optional / simple context binding
  7463. module.exports = function (fn, that) {
  7464. aCallable(fn);
  7465. return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
  7466. return fn.apply(that, arguments);
  7467. };
  7468. };
  7469. /***/ }),
  7470. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/function-bind-native.js":
  7471. /*!********************************************************************************!*\
  7472. !*** ./node_modules/_core-js@3.25.0@core-js/internals/function-bind-native.js ***!
  7473. \********************************************************************************/
  7474. /*! no static exports found */
  7475. /***/ (function(module, exports, __webpack_require__) {
  7476. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7477. module.exports = !fails(function () {
  7478. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  7479. var test = (function () { /* empty */ }).bind();
  7480. // eslint-disable-next-line no-prototype-builtins -- safe
  7481. return typeof test != 'function' || test.hasOwnProperty('prototype');
  7482. });
  7483. /***/ }),
  7484. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/function-call.js":
  7485. /*!*************************************************************************!*\
  7486. !*** ./node_modules/_core-js@3.25.0@core-js/internals/function-call.js ***!
  7487. \*************************************************************************/
  7488. /*! no static exports found */
  7489. /***/ (function(module, exports, __webpack_require__) {
  7490. var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ "./node_modules/_core-js@3.25.0@core-js/internals/function-bind-native.js");
  7491. var call = Function.prototype.call;
  7492. module.exports = NATIVE_BIND ? call.bind(call) : function () {
  7493. return call.apply(call, arguments);
  7494. };
  7495. /***/ }),
  7496. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/function-name.js":
  7497. /*!*************************************************************************!*\
  7498. !*** ./node_modules/_core-js@3.25.0@core-js/internals/function-name.js ***!
  7499. \*************************************************************************/
  7500. /*! no static exports found */
  7501. /***/ (function(module, exports, __webpack_require__) {
  7502. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  7503. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  7504. var FunctionPrototype = Function.prototype;
  7505. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  7506. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  7507. var EXISTS = hasOwn(FunctionPrototype, 'name');
  7508. // additional protection from minified / mangled / dropped function names
  7509. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  7510. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  7511. module.exports = {
  7512. EXISTS: EXISTS,
  7513. PROPER: PROPER,
  7514. CONFIGURABLE: CONFIGURABLE
  7515. };
  7516. /***/ }),
  7517. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js":
  7518. /*!*********************************************************************************!*\
  7519. !*** ./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js ***!
  7520. \*********************************************************************************/
  7521. /*! no static exports found */
  7522. /***/ (function(module, exports, __webpack_require__) {
  7523. var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ "./node_modules/_core-js@3.25.0@core-js/internals/function-bind-native.js");
  7524. var FunctionPrototype = Function.prototype;
  7525. var bind = FunctionPrototype.bind;
  7526. var call = FunctionPrototype.call;
  7527. var uncurryThis = NATIVE_BIND && bind.bind(call, call);
  7528. module.exports = NATIVE_BIND ? function (fn) {
  7529. return fn && uncurryThis(fn);
  7530. } : function (fn) {
  7531. return fn && function () {
  7532. return call.apply(fn, arguments);
  7533. };
  7534. };
  7535. /***/ }),
  7536. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/get-built-in.js":
  7537. /*!************************************************************************!*\
  7538. !*** ./node_modules/_core-js@3.25.0@core-js/internals/get-built-in.js ***!
  7539. \************************************************************************/
  7540. /*! no static exports found */
  7541. /***/ (function(module, exports, __webpack_require__) {
  7542. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  7543. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7544. var aFunction = function (argument) {
  7545. return isCallable(argument) ? argument : undefined;
  7546. };
  7547. module.exports = function (namespace, method) {
  7548. return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
  7549. };
  7550. /***/ }),
  7551. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/get-method.js":
  7552. /*!**********************************************************************!*\
  7553. !*** ./node_modules/_core-js@3.25.0@core-js/internals/get-method.js ***!
  7554. \**********************************************************************/
  7555. /*! no static exports found */
  7556. /***/ (function(module, exports, __webpack_require__) {
  7557. var aCallable = __webpack_require__(/*! ../internals/a-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/a-callable.js");
  7558. var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ "./node_modules/_core-js@3.25.0@core-js/internals/is-null-or-undefined.js");
  7559. // `GetMethod` abstract operation
  7560. // https://tc39.es/ecma262/#sec-getmethod
  7561. module.exports = function (V, P) {
  7562. var func = V[P];
  7563. return isNullOrUndefined(func) ? undefined : aCallable(func);
  7564. };
  7565. /***/ }),
  7566. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/global.js":
  7567. /*!******************************************************************!*\
  7568. !*** ./node_modules/_core-js@3.25.0@core-js/internals/global.js ***!
  7569. \******************************************************************/
  7570. /*! no static exports found */
  7571. /***/ (function(module, exports, __webpack_require__) {
  7572. /* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
  7573. return it && it.Math == Math && it;
  7574. };
  7575. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  7576. module.exports =
  7577. // eslint-disable-next-line es-x/no-global-this -- safe
  7578. check(typeof globalThis == 'object' && globalThis) ||
  7579. check(typeof window == 'object' && window) ||
  7580. // eslint-disable-next-line no-restricted-globals -- safe
  7581. check(typeof self == 'object' && self) ||
  7582. check(typeof global == 'object' && global) ||
  7583. // eslint-disable-next-line no-new-func -- fallback
  7584. (function () { return this; })() || Function('return this')();
  7585. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  7586. /***/ }),
  7587. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js":
  7588. /*!****************************************************************************!*\
  7589. !*** ./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js ***!
  7590. \****************************************************************************/
  7591. /*! no static exports found */
  7592. /***/ (function(module, exports, __webpack_require__) {
  7593. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  7594. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/_core-js@3.25.0@core-js/internals/to-object.js");
  7595. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  7596. // `HasOwnProperty` abstract operation
  7597. // https://tc39.es/ecma262/#sec-hasownproperty
  7598. // eslint-disable-next-line es-x/no-object-hasown -- safe
  7599. module.exports = Object.hasOwn || function hasOwn(it, key) {
  7600. return hasOwnProperty(toObject(it), key);
  7601. };
  7602. /***/ }),
  7603. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/hidden-keys.js":
  7604. /*!***********************************************************************!*\
  7605. !*** ./node_modules/_core-js@3.25.0@core-js/internals/hidden-keys.js ***!
  7606. \***********************************************************************/
  7607. /*! no static exports found */
  7608. /***/ (function(module, exports) {
  7609. module.exports = {};
  7610. /***/ }),
  7611. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/ie8-dom-define.js":
  7612. /*!**************************************************************************!*\
  7613. !*** ./node_modules/_core-js@3.25.0@core-js/internals/ie8-dom-define.js ***!
  7614. \**************************************************************************/
  7615. /*! no static exports found */
  7616. /***/ (function(module, exports, __webpack_require__) {
  7617. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  7618. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7619. var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/_core-js@3.25.0@core-js/internals/document-create-element.js");
  7620. // Thanks to IE8 for its funny defineProperty
  7621. module.exports = !DESCRIPTORS && !fails(function () {
  7622. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  7623. return Object.defineProperty(createElement('div'), 'a', {
  7624. get: function () { return 7; }
  7625. }).a != 7;
  7626. });
  7627. /***/ }),
  7628. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/indexed-object.js":
  7629. /*!**************************************************************************!*\
  7630. !*** ./node_modules/_core-js@3.25.0@core-js/internals/indexed-object.js ***!
  7631. \**************************************************************************/
  7632. /*! no static exports found */
  7633. /***/ (function(module, exports, __webpack_require__) {
  7634. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  7635. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7636. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/_core-js@3.25.0@core-js/internals/classof-raw.js");
  7637. var $Object = Object;
  7638. var split = uncurryThis(''.split);
  7639. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  7640. module.exports = fails(function () {
  7641. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  7642. // eslint-disable-next-line no-prototype-builtins -- safe
  7643. return !$Object('z').propertyIsEnumerable(0);
  7644. }) ? function (it) {
  7645. return classof(it) == 'String' ? split(it, '') : $Object(it);
  7646. } : $Object;
  7647. /***/ }),
  7648. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/inherit-if-required.js":
  7649. /*!*******************************************************************************!*\
  7650. !*** ./node_modules/_core-js@3.25.0@core-js/internals/inherit-if-required.js ***!
  7651. \*******************************************************************************/
  7652. /*! no static exports found */
  7653. /***/ (function(module, exports, __webpack_require__) {
  7654. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7655. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  7656. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-set-prototype-of.js");
  7657. // makes subclassing work correct for wrapped built-ins
  7658. module.exports = function ($this, dummy, Wrapper) {
  7659. var NewTarget, NewTargetPrototype;
  7660. if (
  7661. // it can work only with native `setPrototypeOf`
  7662. setPrototypeOf &&
  7663. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  7664. isCallable(NewTarget = dummy.constructor) &&
  7665. NewTarget !== Wrapper &&
  7666. isObject(NewTargetPrototype = NewTarget.prototype) &&
  7667. NewTargetPrototype !== Wrapper.prototype
  7668. ) setPrototypeOf($this, NewTargetPrototype);
  7669. return $this;
  7670. };
  7671. /***/ }),
  7672. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/inspect-source.js":
  7673. /*!**************************************************************************!*\
  7674. !*** ./node_modules/_core-js@3.25.0@core-js/internals/inspect-source.js ***!
  7675. \**************************************************************************/
  7676. /*! no static exports found */
  7677. /***/ (function(module, exports, __webpack_require__) {
  7678. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  7679. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7680. var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/_core-js@3.25.0@core-js/internals/shared-store.js");
  7681. var functionToString = uncurryThis(Function.toString);
  7682. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  7683. if (!isCallable(store.inspectSource)) {
  7684. store.inspectSource = function (it) {
  7685. return functionToString(it);
  7686. };
  7687. }
  7688. module.exports = store.inspectSource;
  7689. /***/ }),
  7690. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/install-error-cause.js":
  7691. /*!*******************************************************************************!*\
  7692. !*** ./node_modules/_core-js@3.25.0@core-js/internals/install-error-cause.js ***!
  7693. \*******************************************************************************/
  7694. /*! no static exports found */
  7695. /***/ (function(module, exports, __webpack_require__) {
  7696. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  7697. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/_core-js@3.25.0@core-js/internals/create-non-enumerable-property.js");
  7698. // `InstallErrorCause` abstract operation
  7699. // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
  7700. module.exports = function (O, options) {
  7701. if (isObject(options) && 'cause' in options) {
  7702. createNonEnumerableProperty(O, 'cause', options.cause);
  7703. }
  7704. };
  7705. /***/ }),
  7706. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/internal-state.js":
  7707. /*!**************************************************************************!*\
  7708. !*** ./node_modules/_core-js@3.25.0@core-js/internals/internal-state.js ***!
  7709. \**************************************************************************/
  7710. /*! no static exports found */
  7711. /***/ (function(module, exports, __webpack_require__) {
  7712. var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ "./node_modules/_core-js@3.25.0@core-js/internals/weak-map-basic-detection.js");
  7713. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  7714. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  7715. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  7716. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/_core-js@3.25.0@core-js/internals/create-non-enumerable-property.js");
  7717. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  7718. var shared = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/_core-js@3.25.0@core-js/internals/shared-store.js");
  7719. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/_core-js@3.25.0@core-js/internals/shared-key.js");
  7720. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/_core-js@3.25.0@core-js/internals/hidden-keys.js");
  7721. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  7722. var TypeError = global.TypeError;
  7723. var WeakMap = global.WeakMap;
  7724. var set, get, has;
  7725. var enforce = function (it) {
  7726. return has(it) ? get(it) : set(it, {});
  7727. };
  7728. var getterFor = function (TYPE) {
  7729. return function (it) {
  7730. var state;
  7731. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  7732. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  7733. } return state;
  7734. };
  7735. };
  7736. if (NATIVE_WEAK_MAP || shared.state) {
  7737. var store = shared.state || (shared.state = new WeakMap());
  7738. var wmget = uncurryThis(store.get);
  7739. var wmhas = uncurryThis(store.has);
  7740. var wmset = uncurryThis(store.set);
  7741. set = function (it, metadata) {
  7742. if (wmhas(store, it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);
  7743. metadata.facade = it;
  7744. wmset(store, it, metadata);
  7745. return metadata;
  7746. };
  7747. get = function (it) {
  7748. return wmget(store, it) || {};
  7749. };
  7750. has = function (it) {
  7751. return wmhas(store, it);
  7752. };
  7753. } else {
  7754. var STATE = sharedKey('state');
  7755. hiddenKeys[STATE] = true;
  7756. set = function (it, metadata) {
  7757. if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED);
  7758. metadata.facade = it;
  7759. createNonEnumerableProperty(it, STATE, metadata);
  7760. return metadata;
  7761. };
  7762. get = function (it) {
  7763. return hasOwn(it, STATE) ? it[STATE] : {};
  7764. };
  7765. has = function (it) {
  7766. return hasOwn(it, STATE);
  7767. };
  7768. }
  7769. module.exports = {
  7770. set: set,
  7771. get: get,
  7772. has: has,
  7773. enforce: enforce,
  7774. getterFor: getterFor
  7775. };
  7776. /***/ }),
  7777. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js":
  7778. /*!***********************************************************************!*\
  7779. !*** ./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js ***!
  7780. \***********************************************************************/
  7781. /*! no static exports found */
  7782. /***/ (function(module, exports) {
  7783. // `IsCallable` abstract operation
  7784. // https://tc39.es/ecma262/#sec-iscallable
  7785. module.exports = function (argument) {
  7786. return typeof argument == 'function';
  7787. };
  7788. /***/ }),
  7789. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/is-forced.js":
  7790. /*!*********************************************************************!*\
  7791. !*** ./node_modules/_core-js@3.25.0@core-js/internals/is-forced.js ***!
  7792. \*********************************************************************/
  7793. /*! no static exports found */
  7794. /***/ (function(module, exports, __webpack_require__) {
  7795. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7796. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7797. var replacement = /#|\.prototype\./;
  7798. var isForced = function (feature, detection) {
  7799. var value = data[normalize(feature)];
  7800. return value == POLYFILL ? true
  7801. : value == NATIVE ? false
  7802. : isCallable(detection) ? fails(detection)
  7803. : !!detection;
  7804. };
  7805. var normalize = isForced.normalize = function (string) {
  7806. return String(string).replace(replacement, '.').toLowerCase();
  7807. };
  7808. var data = isForced.data = {};
  7809. var NATIVE = isForced.NATIVE = 'N';
  7810. var POLYFILL = isForced.POLYFILL = 'P';
  7811. module.exports = isForced;
  7812. /***/ }),
  7813. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/is-null-or-undefined.js":
  7814. /*!********************************************************************************!*\
  7815. !*** ./node_modules/_core-js@3.25.0@core-js/internals/is-null-or-undefined.js ***!
  7816. \********************************************************************************/
  7817. /*! no static exports found */
  7818. /***/ (function(module, exports) {
  7819. // we can't use just `it == null` since of `document.all` special case
  7820. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  7821. module.exports = function (it) {
  7822. return it === null || it === undefined;
  7823. };
  7824. /***/ }),
  7825. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js":
  7826. /*!*********************************************************************!*\
  7827. !*** ./node_modules/_core-js@3.25.0@core-js/internals/is-object.js ***!
  7828. \*********************************************************************/
  7829. /*! no static exports found */
  7830. /***/ (function(module, exports, __webpack_require__) {
  7831. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7832. var documentAll = typeof document == 'object' && document.all;
  7833. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  7834. var SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined;
  7835. module.exports = SPECIAL_DOCUMENT_ALL ? function (it) {
  7836. return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;
  7837. } : function (it) {
  7838. return typeof it == 'object' ? it !== null : isCallable(it);
  7839. };
  7840. /***/ }),
  7841. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/is-pure.js":
  7842. /*!*******************************************************************!*\
  7843. !*** ./node_modules/_core-js@3.25.0@core-js/internals/is-pure.js ***!
  7844. \*******************************************************************/
  7845. /*! no static exports found */
  7846. /***/ (function(module, exports) {
  7847. module.exports = false;
  7848. /***/ }),
  7849. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/is-symbol.js":
  7850. /*!*********************************************************************!*\
  7851. !*** ./node_modules/_core-js@3.25.0@core-js/internals/is-symbol.js ***!
  7852. \*********************************************************************/
  7853. /*! no static exports found */
  7854. /***/ (function(module, exports, __webpack_require__) {
  7855. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/get-built-in.js");
  7856. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7857. var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-is-prototype-of.js");
  7858. var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/_core-js@3.25.0@core-js/internals/use-symbol-as-uid.js");
  7859. var $Object = Object;
  7860. module.exports = USE_SYMBOL_AS_UID ? function (it) {
  7861. return typeof it == 'symbol';
  7862. } : function (it) {
  7863. var $Symbol = getBuiltIn('Symbol');
  7864. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  7865. };
  7866. /***/ }),
  7867. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/length-of-array-like.js":
  7868. /*!********************************************************************************!*\
  7869. !*** ./node_modules/_core-js@3.25.0@core-js/internals/length-of-array-like.js ***!
  7870. \********************************************************************************/
  7871. /*! no static exports found */
  7872. /***/ (function(module, exports, __webpack_require__) {
  7873. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/_core-js@3.25.0@core-js/internals/to-length.js");
  7874. // `LengthOfArrayLike` abstract operation
  7875. // https://tc39.es/ecma262/#sec-lengthofarraylike
  7876. module.exports = function (obj) {
  7877. return toLength(obj.length);
  7878. };
  7879. /***/ }),
  7880. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/make-built-in.js":
  7881. /*!*************************************************************************!*\
  7882. !*** ./node_modules/_core-js@3.25.0@core-js/internals/make-built-in.js ***!
  7883. \*************************************************************************/
  7884. /*! no static exports found */
  7885. /***/ (function(module, exports, __webpack_require__) {
  7886. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  7887. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  7888. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  7889. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  7890. var CONFIGURABLE_FUNCTION_NAME = __webpack_require__(/*! ../internals/function-name */ "./node_modules/_core-js@3.25.0@core-js/internals/function-name.js").CONFIGURABLE;
  7891. var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/_core-js@3.25.0@core-js/internals/inspect-source.js");
  7892. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/_core-js@3.25.0@core-js/internals/internal-state.js");
  7893. var enforceInternalState = InternalStateModule.enforce;
  7894. var getInternalState = InternalStateModule.get;
  7895. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  7896. var defineProperty = Object.defineProperty;
  7897. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  7898. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  7899. });
  7900. var TEMPLATE = String(String).split('String');
  7901. var makeBuiltIn = module.exports = function (value, name, options) {
  7902. if (String(name).slice(0, 7) === 'Symbol(') {
  7903. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  7904. }
  7905. if (options && options.getter) name = 'get ' + name;
  7906. if (options && options.setter) name = 'set ' + name;
  7907. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  7908. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  7909. else value.name = name;
  7910. }
  7911. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  7912. defineProperty(value, 'length', { value: options.arity });
  7913. }
  7914. try {
  7915. if (options && hasOwn(options, 'constructor') && options.constructor) {
  7916. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  7917. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  7918. } else if (value.prototype) value.prototype = undefined;
  7919. } catch (error) { /* empty */ }
  7920. var state = enforceInternalState(value);
  7921. if (!hasOwn(state, 'source')) {
  7922. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  7923. } return value;
  7924. };
  7925. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  7926. // eslint-disable-next-line no-extend-native -- required
  7927. Function.prototype.toString = makeBuiltIn(function toString() {
  7928. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  7929. }, 'toString');
  7930. /***/ }),
  7931. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/math-trunc.js":
  7932. /*!**********************************************************************!*\
  7933. !*** ./node_modules/_core-js@3.25.0@core-js/internals/math-trunc.js ***!
  7934. \**********************************************************************/
  7935. /*! no static exports found */
  7936. /***/ (function(module, exports) {
  7937. var ceil = Math.ceil;
  7938. var floor = Math.floor;
  7939. // `Math.trunc` method
  7940. // https://tc39.es/ecma262/#sec-math.trunc
  7941. // eslint-disable-next-line es-x/no-math-trunc -- safe
  7942. module.exports = Math.trunc || function trunc(x) {
  7943. var n = +x;
  7944. return (n > 0 ? floor : ceil)(n);
  7945. };
  7946. /***/ }),
  7947. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/normalize-string-argument.js":
  7948. /*!*************************************************************************************!*\
  7949. !*** ./node_modules/_core-js@3.25.0@core-js/internals/normalize-string-argument.js ***!
  7950. \*************************************************************************************/
  7951. /*! no static exports found */
  7952. /***/ (function(module, exports, __webpack_require__) {
  7953. var toString = __webpack_require__(/*! ../internals/to-string */ "./node_modules/_core-js@3.25.0@core-js/internals/to-string.js");
  7954. module.exports = function (argument, $default) {
  7955. return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
  7956. };
  7957. /***/ }),
  7958. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js":
  7959. /*!**********************************************************************************!*\
  7960. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js ***!
  7961. \**********************************************************************************/
  7962. /*! no static exports found */
  7963. /***/ (function(module, exports, __webpack_require__) {
  7964. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  7965. var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/_core-js@3.25.0@core-js/internals/ie8-dom-define.js");
  7966. var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ "./node_modules/_core-js@3.25.0@core-js/internals/v8-prototype-define-bug.js");
  7967. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/_core-js@3.25.0@core-js/internals/an-object.js");
  7968. var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ "./node_modules/_core-js@3.25.0@core-js/internals/to-property-key.js");
  7969. var $TypeError = TypeError;
  7970. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  7971. var $defineProperty = Object.defineProperty;
  7972. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  7973. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  7974. var ENUMERABLE = 'enumerable';
  7975. var CONFIGURABLE = 'configurable';
  7976. var WRITABLE = 'writable';
  7977. // `Object.defineProperty` method
  7978. // https://tc39.es/ecma262/#sec-object.defineproperty
  7979. exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  7980. anObject(O);
  7981. P = toPropertyKey(P);
  7982. anObject(Attributes);
  7983. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  7984. var current = $getOwnPropertyDescriptor(O, P);
  7985. if (current && current[WRITABLE]) {
  7986. O[P] = Attributes.value;
  7987. Attributes = {
  7988. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  7989. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  7990. writable: false
  7991. };
  7992. }
  7993. } return $defineProperty(O, P, Attributes);
  7994. } : $defineProperty : function defineProperty(O, P, Attributes) {
  7995. anObject(O);
  7996. P = toPropertyKey(P);
  7997. anObject(Attributes);
  7998. if (IE8_DOM_DEFINE) try {
  7999. return $defineProperty(O, P, Attributes);
  8000. } catch (error) { /* empty */ }
  8001. if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
  8002. if ('value' in Attributes) O[P] = Attributes.value;
  8003. return O;
  8004. };
  8005. /***/ }),
  8006. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-descriptor.js":
  8007. /*!**********************************************************************************************!*\
  8008. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-descriptor.js ***!
  8009. \**********************************************************************************************/
  8010. /*! no static exports found */
  8011. /***/ (function(module, exports, __webpack_require__) {
  8012. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  8013. var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/_core-js@3.25.0@core-js/internals/function-call.js");
  8014. var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/_core-js@3.25.0@core-js/internals/object-property-is-enumerable.js");
  8015. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/_core-js@3.25.0@core-js/internals/create-property-descriptor.js");
  8016. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/_core-js@3.25.0@core-js/internals/to-indexed-object.js");
  8017. var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ "./node_modules/_core-js@3.25.0@core-js/internals/to-property-key.js");
  8018. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  8019. var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/_core-js@3.25.0@core-js/internals/ie8-dom-define.js");
  8020. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  8021. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  8022. // `Object.getOwnPropertyDescriptor` method
  8023. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  8024. exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  8025. O = toIndexedObject(O);
  8026. P = toPropertyKey(P);
  8027. if (IE8_DOM_DEFINE) try {
  8028. return $getOwnPropertyDescriptor(O, P);
  8029. } catch (error) { /* empty */ }
  8030. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  8031. };
  8032. /***/ }),
  8033. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-names.js":
  8034. /*!*****************************************************************************************!*\
  8035. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-names.js ***!
  8036. \*****************************************************************************************/
  8037. /*! no static exports found */
  8038. /***/ (function(module, exports, __webpack_require__) {
  8039. var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/_core-js@3.25.0@core-js/internals/object-keys-internal.js");
  8040. var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/_core-js@3.25.0@core-js/internals/enum-bug-keys.js");
  8041. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  8042. // `Object.getOwnPropertyNames` method
  8043. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  8044. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  8045. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  8046. return internalObjectKeys(O, hiddenKeys);
  8047. };
  8048. /***/ }),
  8049. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-symbols.js":
  8050. /*!*******************************************************************************************!*\
  8051. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-symbols.js ***!
  8052. \*******************************************************************************************/
  8053. /*! no static exports found */
  8054. /***/ (function(module, exports) {
  8055. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  8056. exports.f = Object.getOwnPropertySymbols;
  8057. /***/ }),
  8058. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-prototype-of.js":
  8059. /*!***********************************************************************************!*\
  8060. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-get-prototype-of.js ***!
  8061. \***********************************************************************************/
  8062. /*! no static exports found */
  8063. /***/ (function(module, exports, __webpack_require__) {
  8064. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  8065. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  8066. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/_core-js@3.25.0@core-js/internals/to-object.js");
  8067. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/_core-js@3.25.0@core-js/internals/shared-key.js");
  8068. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/_core-js@3.25.0@core-js/internals/correct-prototype-getter.js");
  8069. var IE_PROTO = sharedKey('IE_PROTO');
  8070. var $Object = Object;
  8071. var ObjectPrototype = $Object.prototype;
  8072. // `Object.getPrototypeOf` method
  8073. // https://tc39.es/ecma262/#sec-object.getprototypeof
  8074. // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
  8075. module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  8076. var object = toObject(O);
  8077. if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
  8078. var constructor = object.constructor;
  8079. if (isCallable(constructor) && object instanceof constructor) {
  8080. return constructor.prototype;
  8081. } return object instanceof $Object ? ObjectPrototype : null;
  8082. };
  8083. /***/ }),
  8084. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-is-prototype-of.js":
  8085. /*!**********************************************************************************!*\
  8086. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-is-prototype-of.js ***!
  8087. \**********************************************************************************/
  8088. /*! no static exports found */
  8089. /***/ (function(module, exports, __webpack_require__) {
  8090. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  8091. module.exports = uncurryThis({}.isPrototypeOf);
  8092. /***/ }),
  8093. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-keys-internal.js":
  8094. /*!********************************************************************************!*\
  8095. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-keys-internal.js ***!
  8096. \********************************************************************************/
  8097. /*! no static exports found */
  8098. /***/ (function(module, exports, __webpack_require__) {
  8099. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  8100. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  8101. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/_core-js@3.25.0@core-js/internals/to-indexed-object.js");
  8102. var indexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/_core-js@3.25.0@core-js/internals/array-includes.js").indexOf;
  8103. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/_core-js@3.25.0@core-js/internals/hidden-keys.js");
  8104. var push = uncurryThis([].push);
  8105. module.exports = function (object, names) {
  8106. var O = toIndexedObject(object);
  8107. var i = 0;
  8108. var result = [];
  8109. var key;
  8110. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  8111. // Don't enum bug & hidden keys
  8112. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  8113. ~indexOf(result, key) || push(result, key);
  8114. }
  8115. return result;
  8116. };
  8117. /***/ }),
  8118. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-property-is-enumerable.js":
  8119. /*!*****************************************************************************************!*\
  8120. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-property-is-enumerable.js ***!
  8121. \*****************************************************************************************/
  8122. /*! no static exports found */
  8123. /***/ (function(module, exports, __webpack_require__) {
  8124. "use strict";
  8125. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  8126. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  8127. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  8128. // Nashorn ~ JDK8 bug
  8129. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  8130. // `Object.prototype.propertyIsEnumerable` method implementation
  8131. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  8132. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  8133. var descriptor = getOwnPropertyDescriptor(this, V);
  8134. return !!descriptor && descriptor.enumerable;
  8135. } : $propertyIsEnumerable;
  8136. /***/ }),
  8137. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/object-set-prototype-of.js":
  8138. /*!***********************************************************************************!*\
  8139. !*** ./node_modules/_core-js@3.25.0@core-js/internals/object-set-prototype-of.js ***!
  8140. \***********************************************************************************/
  8141. /*! no static exports found */
  8142. /***/ (function(module, exports, __webpack_require__) {
  8143. /* eslint-disable no-proto -- safe */
  8144. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  8145. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/_core-js@3.25.0@core-js/internals/an-object.js");
  8146. var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "./node_modules/_core-js@3.25.0@core-js/internals/a-possible-prototype.js");
  8147. // `Object.setPrototypeOf` method
  8148. // https://tc39.es/ecma262/#sec-object.setprototypeof
  8149. // Works with __proto__ only. Old v8 can't work with null proto objects.
  8150. // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
  8151. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  8152. var CORRECT_SETTER = false;
  8153. var test = {};
  8154. var setter;
  8155. try {
  8156. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  8157. setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  8158. setter(test, []);
  8159. CORRECT_SETTER = test instanceof Array;
  8160. } catch (error) { /* empty */ }
  8161. return function setPrototypeOf(O, proto) {
  8162. anObject(O);
  8163. aPossiblePrototype(proto);
  8164. if (CORRECT_SETTER) setter(O, proto);
  8165. else O.__proto__ = proto;
  8166. return O;
  8167. };
  8168. }() : undefined);
  8169. /***/ }),
  8170. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/ordinary-to-primitive.js":
  8171. /*!*********************************************************************************!*\
  8172. !*** ./node_modules/_core-js@3.25.0@core-js/internals/ordinary-to-primitive.js ***!
  8173. \*********************************************************************************/
  8174. /*! no static exports found */
  8175. /***/ (function(module, exports, __webpack_require__) {
  8176. var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/_core-js@3.25.0@core-js/internals/function-call.js");
  8177. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  8178. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  8179. var $TypeError = TypeError;
  8180. // `OrdinaryToPrimitive` abstract operation
  8181. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  8182. module.exports = function (input, pref) {
  8183. var fn, val;
  8184. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  8185. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  8186. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  8187. throw $TypeError("Can't convert object to primitive value");
  8188. };
  8189. /***/ }),
  8190. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/own-keys.js":
  8191. /*!********************************************************************!*\
  8192. !*** ./node_modules/_core-js@3.25.0@core-js/internals/own-keys.js ***!
  8193. \********************************************************************/
  8194. /*! no static exports found */
  8195. /***/ (function(module, exports, __webpack_require__) {
  8196. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/get-built-in.js");
  8197. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  8198. var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-names.js");
  8199. var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/_core-js@3.25.0@core-js/internals/object-get-own-property-symbols.js");
  8200. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/_core-js@3.25.0@core-js/internals/an-object.js");
  8201. var concat = uncurryThis([].concat);
  8202. // all object keys, includes non-enumerable and symbols
  8203. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  8204. var keys = getOwnPropertyNamesModule.f(anObject(it));
  8205. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  8206. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  8207. };
  8208. /***/ }),
  8209. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/proxy-accessor.js":
  8210. /*!**************************************************************************!*\
  8211. !*** ./node_modules/_core-js@3.25.0@core-js/internals/proxy-accessor.js ***!
  8212. \**************************************************************************/
  8213. /*! no static exports found */
  8214. /***/ (function(module, exports, __webpack_require__) {
  8215. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js").f;
  8216. module.exports = function (Target, Source, key) {
  8217. key in Target || defineProperty(Target, key, {
  8218. configurable: true,
  8219. get: function () { return Source[key]; },
  8220. set: function (it) { Source[key] = it; }
  8221. });
  8222. };
  8223. /***/ }),
  8224. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/require-object-coercible.js":
  8225. /*!************************************************************************************!*\
  8226. !*** ./node_modules/_core-js@3.25.0@core-js/internals/require-object-coercible.js ***!
  8227. \************************************************************************************/
  8228. /*! no static exports found */
  8229. /***/ (function(module, exports, __webpack_require__) {
  8230. var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ "./node_modules/_core-js@3.25.0@core-js/internals/is-null-or-undefined.js");
  8231. var $TypeError = TypeError;
  8232. // `RequireObjectCoercible` abstract operation
  8233. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  8234. module.exports = function (it) {
  8235. if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it);
  8236. return it;
  8237. };
  8238. /***/ }),
  8239. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/shared-key.js":
  8240. /*!**********************************************************************!*\
  8241. !*** ./node_modules/_core-js@3.25.0@core-js/internals/shared-key.js ***!
  8242. \**********************************************************************/
  8243. /*! no static exports found */
  8244. /***/ (function(module, exports, __webpack_require__) {
  8245. var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/_core-js@3.25.0@core-js/internals/shared.js");
  8246. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/_core-js@3.25.0@core-js/internals/uid.js");
  8247. var keys = shared('keys');
  8248. module.exports = function (key) {
  8249. return keys[key] || (keys[key] = uid(key));
  8250. };
  8251. /***/ }),
  8252. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/shared-store.js":
  8253. /*!************************************************************************!*\
  8254. !*** ./node_modules/_core-js@3.25.0@core-js/internals/shared-store.js ***!
  8255. \************************************************************************/
  8256. /*! no static exports found */
  8257. /***/ (function(module, exports, __webpack_require__) {
  8258. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  8259. var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ "./node_modules/_core-js@3.25.0@core-js/internals/define-global-property.js");
  8260. var SHARED = '__core-js_shared__';
  8261. var store = global[SHARED] || defineGlobalProperty(SHARED, {});
  8262. module.exports = store;
  8263. /***/ }),
  8264. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/shared.js":
  8265. /*!******************************************************************!*\
  8266. !*** ./node_modules/_core-js@3.25.0@core-js/internals/shared.js ***!
  8267. \******************************************************************/
  8268. /*! no static exports found */
  8269. /***/ (function(module, exports, __webpack_require__) {
  8270. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/_core-js@3.25.0@core-js/internals/is-pure.js");
  8271. var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/_core-js@3.25.0@core-js/internals/shared-store.js");
  8272. (module.exports = function (key, value) {
  8273. return store[key] || (store[key] = value !== undefined ? value : {});
  8274. })('versions', []).push({
  8275. version: '3.25.0',
  8276. mode: IS_PURE ? 'pure' : 'global',
  8277. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  8278. license: 'https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE',
  8279. source: 'https://github.com/zloirock/core-js'
  8280. });
  8281. /***/ }),
  8282. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/symbol-constructor-detection.js":
  8283. /*!****************************************************************************************!*\
  8284. !*** ./node_modules/_core-js@3.25.0@core-js/internals/symbol-constructor-detection.js ***!
  8285. \****************************************************************************************/
  8286. /*! no static exports found */
  8287. /***/ (function(module, exports, __webpack_require__) {
  8288. /* eslint-disable es-x/no-symbol -- required for testing */
  8289. var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/_core-js@3.25.0@core-js/internals/engine-v8-version.js");
  8290. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  8291. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  8292. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  8293. var symbol = Symbol();
  8294. // Chrome 38 Symbol has incorrect toString conversion
  8295. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  8296. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  8297. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  8298. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  8299. });
  8300. /***/ }),
  8301. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-absolute-index.js":
  8302. /*!*****************************************************************************!*\
  8303. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-absolute-index.js ***!
  8304. \*****************************************************************************/
  8305. /*! no static exports found */
  8306. /***/ (function(module, exports, __webpack_require__) {
  8307. var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ "./node_modules/_core-js@3.25.0@core-js/internals/to-integer-or-infinity.js");
  8308. var max = Math.max;
  8309. var min = Math.min;
  8310. // Helper for a popular repeating case of the spec:
  8311. // Let integer be ? ToInteger(index).
  8312. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  8313. module.exports = function (index, length) {
  8314. var integer = toIntegerOrInfinity(index);
  8315. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  8316. };
  8317. /***/ }),
  8318. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-indexed-object.js":
  8319. /*!*****************************************************************************!*\
  8320. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-indexed-object.js ***!
  8321. \*****************************************************************************/
  8322. /*! no static exports found */
  8323. /***/ (function(module, exports, __webpack_require__) {
  8324. // toObject with fallback for non-array-like ES3 strings
  8325. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/_core-js@3.25.0@core-js/internals/indexed-object.js");
  8326. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/_core-js@3.25.0@core-js/internals/require-object-coercible.js");
  8327. module.exports = function (it) {
  8328. return IndexedObject(requireObjectCoercible(it));
  8329. };
  8330. /***/ }),
  8331. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-integer-or-infinity.js":
  8332. /*!**********************************************************************************!*\
  8333. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-integer-or-infinity.js ***!
  8334. \**********************************************************************************/
  8335. /*! no static exports found */
  8336. /***/ (function(module, exports, __webpack_require__) {
  8337. var trunc = __webpack_require__(/*! ../internals/math-trunc */ "./node_modules/_core-js@3.25.0@core-js/internals/math-trunc.js");
  8338. // `ToIntegerOrInfinity` abstract operation
  8339. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  8340. module.exports = function (argument) {
  8341. var number = +argument;
  8342. // eslint-disable-next-line no-self-compare -- NaN check
  8343. return number !== number || number === 0 ? 0 : trunc(number);
  8344. };
  8345. /***/ }),
  8346. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-length.js":
  8347. /*!*********************************************************************!*\
  8348. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-length.js ***!
  8349. \*********************************************************************/
  8350. /*! no static exports found */
  8351. /***/ (function(module, exports, __webpack_require__) {
  8352. var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ "./node_modules/_core-js@3.25.0@core-js/internals/to-integer-or-infinity.js");
  8353. var min = Math.min;
  8354. // `ToLength` abstract operation
  8355. // https://tc39.es/ecma262/#sec-tolength
  8356. module.exports = function (argument) {
  8357. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  8358. };
  8359. /***/ }),
  8360. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-object.js":
  8361. /*!*********************************************************************!*\
  8362. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-object.js ***!
  8363. \*********************************************************************/
  8364. /*! no static exports found */
  8365. /***/ (function(module, exports, __webpack_require__) {
  8366. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/_core-js@3.25.0@core-js/internals/require-object-coercible.js");
  8367. var $Object = Object;
  8368. // `ToObject` abstract operation
  8369. // https://tc39.es/ecma262/#sec-toobject
  8370. module.exports = function (argument) {
  8371. return $Object(requireObjectCoercible(argument));
  8372. };
  8373. /***/ }),
  8374. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-offset.js":
  8375. /*!*********************************************************************!*\
  8376. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-offset.js ***!
  8377. \*********************************************************************/
  8378. /*! no static exports found */
  8379. /***/ (function(module, exports, __webpack_require__) {
  8380. var toPositiveInteger = __webpack_require__(/*! ../internals/to-positive-integer */ "./node_modules/_core-js@3.25.0@core-js/internals/to-positive-integer.js");
  8381. var $RangeError = RangeError;
  8382. module.exports = function (it, BYTES) {
  8383. var offset = toPositiveInteger(it);
  8384. if (offset % BYTES) throw $RangeError('Wrong offset');
  8385. return offset;
  8386. };
  8387. /***/ }),
  8388. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-positive-integer.js":
  8389. /*!*******************************************************************************!*\
  8390. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-positive-integer.js ***!
  8391. \*******************************************************************************/
  8392. /*! no static exports found */
  8393. /***/ (function(module, exports, __webpack_require__) {
  8394. var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ "./node_modules/_core-js@3.25.0@core-js/internals/to-integer-or-infinity.js");
  8395. var $RangeError = RangeError;
  8396. module.exports = function (it) {
  8397. var result = toIntegerOrInfinity(it);
  8398. if (result < 0) throw $RangeError("The argument can't be less than 0");
  8399. return result;
  8400. };
  8401. /***/ }),
  8402. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-primitive.js":
  8403. /*!************************************************************************!*\
  8404. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-primitive.js ***!
  8405. \************************************************************************/
  8406. /*! no static exports found */
  8407. /***/ (function(module, exports, __webpack_require__) {
  8408. var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/_core-js@3.25.0@core-js/internals/function-call.js");
  8409. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/_core-js@3.25.0@core-js/internals/is-object.js");
  8410. var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ "./node_modules/_core-js@3.25.0@core-js/internals/is-symbol.js");
  8411. var getMethod = __webpack_require__(/*! ../internals/get-method */ "./node_modules/_core-js@3.25.0@core-js/internals/get-method.js");
  8412. var ordinaryToPrimitive = __webpack_require__(/*! ../internals/ordinary-to-primitive */ "./node_modules/_core-js@3.25.0@core-js/internals/ordinary-to-primitive.js");
  8413. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/_core-js@3.25.0@core-js/internals/well-known-symbol.js");
  8414. var $TypeError = TypeError;
  8415. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  8416. // `ToPrimitive` abstract operation
  8417. // https://tc39.es/ecma262/#sec-toprimitive
  8418. module.exports = function (input, pref) {
  8419. if (!isObject(input) || isSymbol(input)) return input;
  8420. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  8421. var result;
  8422. if (exoticToPrim) {
  8423. if (pref === undefined) pref = 'default';
  8424. result = call(exoticToPrim, input, pref);
  8425. if (!isObject(result) || isSymbol(result)) return result;
  8426. throw $TypeError("Can't convert object to primitive value");
  8427. }
  8428. if (pref === undefined) pref = 'number';
  8429. return ordinaryToPrimitive(input, pref);
  8430. };
  8431. /***/ }),
  8432. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-property-key.js":
  8433. /*!***************************************************************************!*\
  8434. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-property-key.js ***!
  8435. \***************************************************************************/
  8436. /*! no static exports found */
  8437. /***/ (function(module, exports, __webpack_require__) {
  8438. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/_core-js@3.25.0@core-js/internals/to-primitive.js");
  8439. var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ "./node_modules/_core-js@3.25.0@core-js/internals/is-symbol.js");
  8440. // `ToPropertyKey` abstract operation
  8441. // https://tc39.es/ecma262/#sec-topropertykey
  8442. module.exports = function (argument) {
  8443. var key = toPrimitive(argument, 'string');
  8444. return isSymbol(key) ? key : key + '';
  8445. };
  8446. /***/ }),
  8447. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-string-tag-support.js":
  8448. /*!*********************************************************************************!*\
  8449. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-string-tag-support.js ***!
  8450. \*********************************************************************************/
  8451. /*! no static exports found */
  8452. /***/ (function(module, exports, __webpack_require__) {
  8453. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/_core-js@3.25.0@core-js/internals/well-known-symbol.js");
  8454. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  8455. var test = {};
  8456. test[TO_STRING_TAG] = 'z';
  8457. module.exports = String(test) === '[object z]';
  8458. /***/ }),
  8459. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/to-string.js":
  8460. /*!*********************************************************************!*\
  8461. !*** ./node_modules/_core-js@3.25.0@core-js/internals/to-string.js ***!
  8462. \*********************************************************************/
  8463. /*! no static exports found */
  8464. /***/ (function(module, exports, __webpack_require__) {
  8465. var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/_core-js@3.25.0@core-js/internals/classof.js");
  8466. var $String = String;
  8467. module.exports = function (argument) {
  8468. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  8469. return $String(argument);
  8470. };
  8471. /***/ }),
  8472. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/try-to-string.js":
  8473. /*!*************************************************************************!*\
  8474. !*** ./node_modules/_core-js@3.25.0@core-js/internals/try-to-string.js ***!
  8475. \*************************************************************************/
  8476. /*! no static exports found */
  8477. /***/ (function(module, exports) {
  8478. var $String = String;
  8479. module.exports = function (argument) {
  8480. try {
  8481. return $String(argument);
  8482. } catch (error) {
  8483. return 'Object';
  8484. }
  8485. };
  8486. /***/ }),
  8487. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/uid.js":
  8488. /*!***************************************************************!*\
  8489. !*** ./node_modules/_core-js@3.25.0@core-js/internals/uid.js ***!
  8490. \***************************************************************/
  8491. /*! no static exports found */
  8492. /***/ (function(module, exports, __webpack_require__) {
  8493. var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/_core-js@3.25.0@core-js/internals/function-uncurry-this.js");
  8494. var id = 0;
  8495. var postfix = Math.random();
  8496. var toString = uncurryThis(1.0.toString);
  8497. module.exports = function (key) {
  8498. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  8499. };
  8500. /***/ }),
  8501. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/use-symbol-as-uid.js":
  8502. /*!*****************************************************************************!*\
  8503. !*** ./node_modules/_core-js@3.25.0@core-js/internals/use-symbol-as-uid.js ***!
  8504. \*****************************************************************************/
  8505. /*! no static exports found */
  8506. /***/ (function(module, exports, __webpack_require__) {
  8507. /* eslint-disable es-x/no-symbol -- required for testing */
  8508. var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ "./node_modules/_core-js@3.25.0@core-js/internals/symbol-constructor-detection.js");
  8509. module.exports = NATIVE_SYMBOL
  8510. && !Symbol.sham
  8511. && typeof Symbol.iterator == 'symbol';
  8512. /***/ }),
  8513. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/v8-prototype-define-bug.js":
  8514. /*!***********************************************************************************!*\
  8515. !*** ./node_modules/_core-js@3.25.0@core-js/internals/v8-prototype-define-bug.js ***!
  8516. \***********************************************************************************/
  8517. /*! no static exports found */
  8518. /***/ (function(module, exports, __webpack_require__) {
  8519. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  8520. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  8521. // V8 ~ Chrome 36-
  8522. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  8523. module.exports = DESCRIPTORS && fails(function () {
  8524. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  8525. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  8526. value: 42,
  8527. writable: false
  8528. }).prototype != 42;
  8529. });
  8530. /***/ }),
  8531. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/weak-map-basic-detection.js":
  8532. /*!************************************************************************************!*\
  8533. !*** ./node_modules/_core-js@3.25.0@core-js/internals/weak-map-basic-detection.js ***!
  8534. \************************************************************************************/
  8535. /*! no static exports found */
  8536. /***/ (function(module, exports, __webpack_require__) {
  8537. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  8538. var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/_core-js@3.25.0@core-js/internals/is-callable.js");
  8539. var WeakMap = global.WeakMap;
  8540. module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
  8541. /***/ }),
  8542. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/well-known-symbol.js":
  8543. /*!*****************************************************************************!*\
  8544. !*** ./node_modules/_core-js@3.25.0@core-js/internals/well-known-symbol.js ***!
  8545. \*****************************************************************************/
  8546. /*! no static exports found */
  8547. /***/ (function(module, exports, __webpack_require__) {
  8548. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  8549. var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/_core-js@3.25.0@core-js/internals/shared.js");
  8550. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  8551. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/_core-js@3.25.0@core-js/internals/uid.js");
  8552. var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ "./node_modules/_core-js@3.25.0@core-js/internals/symbol-constructor-detection.js");
  8553. var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/_core-js@3.25.0@core-js/internals/use-symbol-as-uid.js");
  8554. var WellKnownSymbolsStore = shared('wks');
  8555. var Symbol = global.Symbol;
  8556. var symbolFor = Symbol && Symbol['for'];
  8557. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  8558. module.exports = function (name) {
  8559. if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  8560. var description = 'Symbol.' + name;
  8561. if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
  8562. WellKnownSymbolsStore[name] = Symbol[name];
  8563. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  8564. WellKnownSymbolsStore[name] = symbolFor(description);
  8565. } else {
  8566. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  8567. }
  8568. } return WellKnownSymbolsStore[name];
  8569. };
  8570. /***/ }),
  8571. /***/ "./node_modules/_core-js@3.25.0@core-js/internals/wrap-error-constructor-with-cause.js":
  8572. /*!*********************************************************************************************!*\
  8573. !*** ./node_modules/_core-js@3.25.0@core-js/internals/wrap-error-constructor-with-cause.js ***!
  8574. \*********************************************************************************************/
  8575. /*! no static exports found */
  8576. /***/ (function(module, exports, __webpack_require__) {
  8577. "use strict";
  8578. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/get-built-in.js");
  8579. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  8580. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/_core-js@3.25.0@core-js/internals/create-non-enumerable-property.js");
  8581. var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-is-prototype-of.js");
  8582. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/_core-js@3.25.0@core-js/internals/object-set-prototype-of.js");
  8583. var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/_core-js@3.25.0@core-js/internals/copy-constructor-properties.js");
  8584. var proxyAccessor = __webpack_require__(/*! ../internals/proxy-accessor */ "./node_modules/_core-js@3.25.0@core-js/internals/proxy-accessor.js");
  8585. var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/_core-js@3.25.0@core-js/internals/inherit-if-required.js");
  8586. var normalizeStringArgument = __webpack_require__(/*! ../internals/normalize-string-argument */ "./node_modules/_core-js@3.25.0@core-js/internals/normalize-string-argument.js");
  8587. var installErrorCause = __webpack_require__(/*! ../internals/install-error-cause */ "./node_modules/_core-js@3.25.0@core-js/internals/install-error-cause.js");
  8588. var clearErrorStack = __webpack_require__(/*! ../internals/error-stack-clear */ "./node_modules/_core-js@3.25.0@core-js/internals/error-stack-clear.js");
  8589. var ERROR_STACK_INSTALLABLE = __webpack_require__(/*! ../internals/error-stack-installable */ "./node_modules/_core-js@3.25.0@core-js/internals/error-stack-installable.js");
  8590. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  8591. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/_core-js@3.25.0@core-js/internals/is-pure.js");
  8592. module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
  8593. var STACK_TRACE_LIMIT = 'stackTraceLimit';
  8594. var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
  8595. var path = FULL_NAME.split('.');
  8596. var ERROR_NAME = path[path.length - 1];
  8597. var OriginalError = getBuiltIn.apply(null, path);
  8598. if (!OriginalError) return;
  8599. var OriginalErrorPrototype = OriginalError.prototype;
  8600. // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
  8601. if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
  8602. if (!FORCED) return OriginalError;
  8603. var BaseError = getBuiltIn('Error');
  8604. var WrappedError = wrapper(function (a, b) {
  8605. var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
  8606. var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
  8607. if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
  8608. if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(result, 'stack', clearErrorStack(result.stack, 2));
  8609. if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
  8610. if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
  8611. return result;
  8612. });
  8613. WrappedError.prototype = OriginalErrorPrototype;
  8614. if (ERROR_NAME !== 'Error') {
  8615. if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
  8616. else copyConstructorProperties(WrappedError, BaseError, { name: true });
  8617. } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
  8618. proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
  8619. proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
  8620. }
  8621. copyConstructorProperties(WrappedError, OriginalError);
  8622. if (!IS_PURE) try {
  8623. // Safari 13- bug: WebAssembly errors does not have a proper `.name`
  8624. if (OriginalErrorPrototype.name !== ERROR_NAME) {
  8625. createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
  8626. }
  8627. OriginalErrorPrototype.constructor = WrappedError;
  8628. } catch (error) { /* empty */ }
  8629. return WrappedError;
  8630. };
  8631. /***/ }),
  8632. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/es.error.cause.js":
  8633. /*!************************************************************************!*\
  8634. !*** ./node_modules/_core-js@3.25.0@core-js/modules/es.error.cause.js ***!
  8635. \************************************************************************/
  8636. /*! no static exports found */
  8637. /***/ (function(module, exports, __webpack_require__) {
  8638. /* eslint-disable no-unused-vars -- required for functions `.length` */
  8639. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/_core-js@3.25.0@core-js/internals/export.js");
  8640. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  8641. var apply = __webpack_require__(/*! ../internals/function-apply */ "./node_modules/_core-js@3.25.0@core-js/internals/function-apply.js");
  8642. var wrapErrorConstructorWithCause = __webpack_require__(/*! ../internals/wrap-error-constructor-with-cause */ "./node_modules/_core-js@3.25.0@core-js/internals/wrap-error-constructor-with-cause.js");
  8643. var WEB_ASSEMBLY = 'WebAssembly';
  8644. var WebAssembly = global[WEB_ASSEMBLY];
  8645. var FORCED = Error('e', { cause: 7 }).cause !== 7;
  8646. var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  8647. var O = {};
  8648. O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
  8649. $({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
  8650. };
  8651. var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  8652. if (WebAssembly && WebAssembly[ERROR_NAME]) {
  8653. var O = {};
  8654. O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
  8655. $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
  8656. }
  8657. };
  8658. // https://github.com/tc39/proposal-error-cause
  8659. exportGlobalErrorCauseWrapper('Error', function (init) {
  8660. return function Error(message) { return apply(init, this, arguments); };
  8661. });
  8662. exportGlobalErrorCauseWrapper('EvalError', function (init) {
  8663. return function EvalError(message) { return apply(init, this, arguments); };
  8664. });
  8665. exportGlobalErrorCauseWrapper('RangeError', function (init) {
  8666. return function RangeError(message) { return apply(init, this, arguments); };
  8667. });
  8668. exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
  8669. return function ReferenceError(message) { return apply(init, this, arguments); };
  8670. });
  8671. exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
  8672. return function SyntaxError(message) { return apply(init, this, arguments); };
  8673. });
  8674. exportGlobalErrorCauseWrapper('TypeError', function (init) {
  8675. return function TypeError(message) { return apply(init, this, arguments); };
  8676. });
  8677. exportGlobalErrorCauseWrapper('URIError', function (init) {
  8678. return function URIError(message) { return apply(init, this, arguments); };
  8679. });
  8680. exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
  8681. return function CompileError(message) { return apply(init, this, arguments); };
  8682. });
  8683. exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
  8684. return function LinkError(message) { return apply(init, this, arguments); };
  8685. });
  8686. exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
  8687. return function RuntimeError(message) { return apply(init, this, arguments); };
  8688. });
  8689. /***/ }),
  8690. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.at.js":
  8691. /*!***************************************************************************!*\
  8692. !*** ./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.at.js ***!
  8693. \***************************************************************************/
  8694. /*! no static exports found */
  8695. /***/ (function(module, exports, __webpack_require__) {
  8696. "use strict";
  8697. var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-view-core.js");
  8698. var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ "./node_modules/_core-js@3.25.0@core-js/internals/length-of-array-like.js");
  8699. var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ "./node_modules/_core-js@3.25.0@core-js/internals/to-integer-or-infinity.js");
  8700. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  8701. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  8702. // `%TypedArray%.prototype.at` method
  8703. // https://github.com/tc39/proposal-relative-indexing-method
  8704. exportTypedArrayMethod('at', function at(index) {
  8705. var O = aTypedArray(this);
  8706. var len = lengthOfArrayLike(O);
  8707. var relativeIndex = toIntegerOrInfinity(index);
  8708. var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
  8709. return (k < 0 || k >= len) ? undefined : O[k];
  8710. });
  8711. /***/ }),
  8712. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.find-last-index.js":
  8713. /*!****************************************************************************************!*\
  8714. !*** ./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.find-last-index.js ***!
  8715. \****************************************************************************************/
  8716. /*! no static exports found */
  8717. /***/ (function(module, exports, __webpack_require__) {
  8718. "use strict";
  8719. var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-view-core.js");
  8720. var $findLastIndex = __webpack_require__(/*! ../internals/array-iteration-from-last */ "./node_modules/_core-js@3.25.0@core-js/internals/array-iteration-from-last.js").findLastIndex;
  8721. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  8722. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  8723. // `%TypedArray%.prototype.findLastIndex` method
  8724. // https://github.com/tc39/proposal-array-find-from-last
  8725. exportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {
  8726. return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  8727. });
  8728. /***/ }),
  8729. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.find-last.js":
  8730. /*!**********************************************************************************!*\
  8731. !*** ./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.find-last.js ***!
  8732. \**********************************************************************************/
  8733. /*! no static exports found */
  8734. /***/ (function(module, exports, __webpack_require__) {
  8735. "use strict";
  8736. var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-view-core.js");
  8737. var $findLast = __webpack_require__(/*! ../internals/array-iteration-from-last */ "./node_modules/_core-js@3.25.0@core-js/internals/array-iteration-from-last.js").findLast;
  8738. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  8739. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  8740. // `%TypedArray%.prototype.findLast` method
  8741. // https://github.com/tc39/proposal-array-find-from-last
  8742. exportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {
  8743. return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  8744. });
  8745. /***/ }),
  8746. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.set.js":
  8747. /*!****************************************************************************!*\
  8748. !*** ./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.set.js ***!
  8749. \****************************************************************************/
  8750. /*! no static exports found */
  8751. /***/ (function(module, exports, __webpack_require__) {
  8752. "use strict";
  8753. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  8754. var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/_core-js@3.25.0@core-js/internals/function-call.js");
  8755. var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "./node_modules/_core-js@3.25.0@core-js/internals/array-buffer-view-core.js");
  8756. var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ "./node_modules/_core-js@3.25.0@core-js/internals/length-of-array-like.js");
  8757. var toOffset = __webpack_require__(/*! ../internals/to-offset */ "./node_modules/_core-js@3.25.0@core-js/internals/to-offset.js");
  8758. var toIndexedObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/_core-js@3.25.0@core-js/internals/to-object.js");
  8759. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/_core-js@3.25.0@core-js/internals/fails.js");
  8760. var RangeError = global.RangeError;
  8761. var Int8Array = global.Int8Array;
  8762. var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
  8763. var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
  8764. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  8765. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  8766. var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
  8767. // eslint-disable-next-line es-x/no-typed-arrays -- required for testing
  8768. var array = new Uint8ClampedArray(2);
  8769. call($set, array, { length: 1, 0: 3 }, 1);
  8770. return array[1] !== 3;
  8771. });
  8772. // https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
  8773. var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
  8774. var array = new Int8Array(2);
  8775. array.set(1);
  8776. array.set('2', 1);
  8777. return array[0] !== 0 || array[1] !== 2;
  8778. });
  8779. // `%TypedArray%.prototype.set` method
  8780. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
  8781. exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
  8782. aTypedArray(this);
  8783. var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
  8784. var src = toIndexedObject(arrayLike);
  8785. if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
  8786. var length = this.length;
  8787. var len = lengthOfArrayLike(src);
  8788. var index = 0;
  8789. if (len + offset > length) throw RangeError('Wrong length');
  8790. while (index < len) this[offset + index] = src[index++];
  8791. }, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
  8792. /***/ }),
  8793. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/esnext.typed-array.find-last-index.js":
  8794. /*!********************************************************************************************!*\
  8795. !*** ./node_modules/_core-js@3.25.0@core-js/modules/esnext.typed-array.find-last-index.js ***!
  8796. \********************************************************************************************/
  8797. /*! no static exports found */
  8798. /***/ (function(module, exports, __webpack_require__) {
  8799. // TODO: Remove from `core-js@4`
  8800. __webpack_require__(/*! ../modules/es.typed-array.find-last-index */ "./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.find-last-index.js");
  8801. /***/ }),
  8802. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/esnext.typed-array.find-last.js":
  8803. /*!**************************************************************************************!*\
  8804. !*** ./node_modules/_core-js@3.25.0@core-js/modules/esnext.typed-array.find-last.js ***!
  8805. \**************************************************************************************/
  8806. /*! no static exports found */
  8807. /***/ (function(module, exports, __webpack_require__) {
  8808. // TODO: Remove from `core-js@4`
  8809. __webpack_require__(/*! ../modules/es.typed-array.find-last */ "./node_modules/_core-js@3.25.0@core-js/modules/es.typed-array.find-last.js");
  8810. /***/ }),
  8811. /***/ "./node_modules/_core-js@3.25.0@core-js/modules/web.dom-exception.stack.js":
  8812. /*!*********************************************************************************!*\
  8813. !*** ./node_modules/_core-js@3.25.0@core-js/modules/web.dom-exception.stack.js ***!
  8814. \*********************************************************************************/
  8815. /*! no static exports found */
  8816. /***/ (function(module, exports, __webpack_require__) {
  8817. "use strict";
  8818. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/_core-js@3.25.0@core-js/internals/export.js");
  8819. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/_core-js@3.25.0@core-js/internals/global.js");
  8820. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/_core-js@3.25.0@core-js/internals/get-built-in.js");
  8821. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/_core-js@3.25.0@core-js/internals/create-property-descriptor.js");
  8822. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/_core-js@3.25.0@core-js/internals/object-define-property.js").f;
  8823. var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/_core-js@3.25.0@core-js/internals/has-own-property.js");
  8824. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/_core-js@3.25.0@core-js/internals/an-instance.js");
  8825. var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/_core-js@3.25.0@core-js/internals/inherit-if-required.js");
  8826. var normalizeStringArgument = __webpack_require__(/*! ../internals/normalize-string-argument */ "./node_modules/_core-js@3.25.0@core-js/internals/normalize-string-argument.js");
  8827. var DOMExceptionConstants = __webpack_require__(/*! ../internals/dom-exception-constants */ "./node_modules/_core-js@3.25.0@core-js/internals/dom-exception-constants.js");
  8828. var clearErrorStack = __webpack_require__(/*! ../internals/error-stack-clear */ "./node_modules/_core-js@3.25.0@core-js/internals/error-stack-clear.js");
  8829. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/_core-js@3.25.0@core-js/internals/descriptors.js");
  8830. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/_core-js@3.25.0@core-js/internals/is-pure.js");
  8831. var DOM_EXCEPTION = 'DOMException';
  8832. var Error = getBuiltIn('Error');
  8833. var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
  8834. var $DOMException = function DOMException() {
  8835. anInstance(this, DOMExceptionPrototype);
  8836. var argumentsLength = arguments.length;
  8837. var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
  8838. var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
  8839. var that = new NativeDOMException(message, name);
  8840. var error = Error(message);
  8841. error.name = DOM_EXCEPTION;
  8842. defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
  8843. inheritIfRequired(that, this, $DOMException);
  8844. return that;
  8845. };
  8846. var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
  8847. var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
  8848. var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
  8849. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  8850. var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
  8851. // Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
  8852. // https://github.com/Jarred-Sumner/bun/issues/399
  8853. var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);
  8854. var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
  8855. // `DOMException` constructor patch for `.stack` where it's required
  8856. // https://webidl.spec.whatwg.org/#es-DOMException-specialness
  8857. $({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
  8858. DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
  8859. });
  8860. var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
  8861. var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
  8862. if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
  8863. if (!IS_PURE) {
  8864. defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
  8865. }
  8866. for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
  8867. var constant = DOMExceptionConstants[key];
  8868. var constantName = constant.s;
  8869. if (!hasOwn(PolyfilledDOMException, constantName)) {
  8870. defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
  8871. }
  8872. }
  8873. }
  8874. /***/ }),
  8875. /***/ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/display.css":
  8876. /*!************************************************************************************************************************************************************************************************************************************!*\
  8877. !*** ./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/display.css ***!
  8878. \************************************************************************************************************************************************************************************************************************************/
  8879. /*! no static exports found */
  8880. /***/ (function(module, exports, __webpack_require__) {
  8881. // Imports
  8882. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../_css-loader@3.6.0@css-loader/dist/runtime/api.js */ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/api.js");
  8883. exports = ___CSS_LOADER_API_IMPORT___(true);
  8884. // Module
  8885. exports.push([module.i, "@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px){.hidden-sm-and-up{display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.hidden-sm-only{display:none!important}}@media only screen and (max-width:991px){.hidden-sm-and-down{display:none!important}}@media only screen and (min-width:992px){.hidden-md-and-up{display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.hidden-md-only{display:none!important}}@media only screen and (max-width:1199px){.hidden-md-and-down{display:none!important}}@media only screen and (min-width:1200px){.hidden-lg-and-up{display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.hidden-lg-only{display:none!important}}@media only screen and (max-width:1919px){.hidden-lg-and-down{display:none!important}}@media only screen and (min-width:1920px){.hidden-xl-only{display:none!important}}", "",{"version":3,"sources":["display.css"],"names":[],"mappings":"AAAA,yCAAyC,gBAAgB,sBAAsB,CAAC,CAAC,yCAAyC,kBAAkB,sBAAsB,CAAC,CAAC,+DAA+D,gBAAgB,sBAAsB,CAAC,CAAC,yCAAyC,oBAAoB,sBAAsB,CAAC,CAAC,yCAAyC,kBAAkB,sBAAsB,CAAC,CAAC,gEAAgE,gBAAgB,sBAAsB,CAAC,CAAC,0CAA0C,oBAAoB,sBAAsB,CAAC,CAAC,0CAA0C,kBAAkB,sBAAsB,CAAC,CAAC,iEAAiE,gBAAgB,sBAAsB,CAAC,CAAC,0CAA0C,oBAAoB,sBAAsB,CAAC,CAAC,0CAA0C,gBAAgB,sBAAsB,CAAC","file":"display.css","sourcesContent":["@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px){.hidden-sm-and-up{display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.hidden-sm-only{display:none!important}}@media only screen and (max-width:991px){.hidden-sm-and-down{display:none!important}}@media only screen and (min-width:992px){.hidden-md-and-up{display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.hidden-md-only{display:none!important}}@media only screen and (max-width:1199px){.hidden-md-and-down{display:none!important}}@media only screen and (min-width:1200px){.hidden-lg-and-up{display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.hidden-lg-only{display:none!important}}@media only screen and (max-width:1919px){.hidden-lg-and-down{display:none!important}}@media only screen and (min-width:1920px){.hidden-xl-only{display:none!important}}"]}]);
  8886. // Exports
  8887. module.exports = exports;
  8888. /***/ }),
  8889. /***/ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_nprogress@0.2.0@nprogress/nprogress.css":
  8890. /*!*******************************************************************************************************************************************************************************************************************!*\
  8891. !*** ./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./node_modules/_nprogress@0.2.0@nprogress/nprogress.css ***!
  8892. \*******************************************************************************************************************************************************************************************************************/
  8893. /*! no static exports found */
  8894. /***/ (function(module, exports, __webpack_require__) {
  8895. // Imports
  8896. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../_css-loader@3.6.0@css-loader/dist/runtime/api.js */ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/api.js");
  8897. exports = ___CSS_LOADER_API_IMPORT___(true);
  8898. // Module
  8899. exports.push([module.i, "/* Make clicks pass-through */\n#nprogress {\n pointer-events: none;\n}\n\n#nprogress .bar {\n background: #29d;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n}\n\n/* Fancy blur effect */\n#nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1.0;\n transform: rotate(3deg) translate(0px, -4px);\n}\n\n/* Remove these to get rid of the spinner */\n#nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n}\n\n#nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n}\n\n.nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n}\n\n.nprogress-custom-parent #nprogress .spinner,\n.nprogress-custom-parent #nprogress .bar {\n position: absolute;\n}\n\n@-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n}\n@keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n", "",{"version":3,"sources":["nprogress.css"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B;EACE,oBAAoB;AACtB;;AAEA;EACE,gBAAgB;;EAEhB,eAAe;EACf,aAAa;EACb,MAAM;EACN,OAAO;;EAEP,WAAW;EACX,WAAW;AACb;;AAEA,sBAAsB;AACtB;EACE,cAAc;EACd,kBAAkB;EAClB,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,uCAAuC;EACvC,YAAY;EAIJ,4CAA4C;AACtD;;AAEA,2CAA2C;AAC3C;EACE,cAAc;EACd,eAAe;EACf,aAAa;EACb,SAAS;EACT,WAAW;AACb;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB;;EAEtB,6BAA6B;EAC7B,sBAAsB;EACtB,uBAAuB;EACvB,kBAAkB;;EAElB,0DAA0D;UAClD,kDAAkD;AAC5D;;AAEA;EACE,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;;EAEE,kBAAkB;AACpB;;AAEA;EACE,OAAO,+BAA+B,EAAE;EACxC,OAAO,iCAAiC,EAAE;AAC5C;AACA;EACE,OAAO,uBAAuB,EAAE;EAChC,OAAO,yBAAyB,EAAE;AACpC","file":"nprogress.css","sourcesContent":["/* Make clicks pass-through */\n#nprogress {\n pointer-events: none;\n}\n\n#nprogress .bar {\n background: #29d;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n}\n\n/* Fancy blur effect */\n#nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1.0;\n\n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n}\n\n/* Remove these to get rid of the spinner */\n#nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n}\n\n#nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n}\n\n.nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n}\n\n.nprogress-custom-parent #nprogress .spinner,\n.nprogress-custom-parent #nprogress .bar {\n position: absolute;\n}\n\n@-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n}\n@keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n"]}]);
  8900. // Exports
  8901. module.exports = exports;
  8902. /***/ }),
  8903. /***/ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_swiper@4.5.1@swiper/dist/css/swiper.min.css":
  8904. /*!***********************************************************************************************************************************************************************************************************************!*\
  8905. !*** ./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./node_modules/_swiper@4.5.1@swiper/dist/css/swiper.min.css ***!
  8906. \***********************************************************************************************************************************************************************************************************************/
  8907. /*! no static exports found */
  8908. /***/ (function(module, exports, __webpack_require__) {
  8909. // Imports
  8910. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../_css-loader@3.6.0@css-loader/dist/runtime/api.js */ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/api.js");
  8911. exports = ___CSS_LOADER_API_IMPORT___(true);
  8912. // Module
  8913. exports.push([module.i, "/**\n * Swiper 4.5.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * http://www.idangero.us/swiper/\n *\n * Copyright 2014-2019 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: September 13, 2019\n */\n.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform, -webkit-transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform, -webkit-transform;transition-property:transform,-webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-webkit-gradient(linear,right top, left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-webkit-gradient(linear,left top, right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-webkit-gradient(linear,left bottom, left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-webkit-gradient(linear,left top, left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;-o-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;-webkit-transition:.2s transform,.2s top;transition:.2s transform,.2s top;-webkit-transition:.2s transform,.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top,.2s -webkit-transform;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;-o-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;-webkit-transition:.2s transform,.2s left;transition:.2s transform,.2s left;-webkit-transition:.2s transform,.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left,.2s -webkit-transform;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;-o-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;-webkit-transition:.2s transform,.2s right;transition:.2s transform,.2s right;-webkit-transition:.2s transform,.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right,.2s -webkit-transform;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}", "",{"version":3,"sources":["swiper.min.css"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,kBAAkB,gBAAgB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,eAAe,CAAC,eAAe,CAAC,SAAS,CAAC,SAAS,CAAC,2CAA2C,UAAU,CAAC,2CAA2C,2BAA2B,CAAC,4BAA4B,CAAC,6BAA6B,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,gBAAgB,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,YAAY,CAAC,6CAA6C,CAAC,qCAAqC,CAAC,gCAAgC,CAAC,6BAA6B,CAA7B,gDAA6B,CAAC,+CAA+C,CAAC,8BAA8B,CAAC,sBAAsB,CAAC,wDAAwD,oCAAoC,CAAC,4BAA4B,CAAC,2CAA2C,sBAAsB,CAAC,kBAAkB,CAAC,cAAc,CAAC,4CAA4C,2CAA2C,CAAC,sCAAsC,CAAC,mCAAmC,CAAC,aAAa,CAAC,cAAc,qBAAqB,CAAC,mBAAmB,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,iBAAiB,CAAC,6CAA6C,CAAC,qCAAqC,CAAC,gCAAgC,CAAC,6BAA6B,CAA7B,gDAA6B,CAAC,+CAA+C,CAAC,8BAA8B,iBAAiB,CAAC,wEAAwE,WAAW,CAAC,6CAA6C,uBAAuB,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,sBAAsB,CAAC,oDAAoD,CAAC,4CAA4C,CAAC,uCAAuC,CAAC,oCAAoC,CAAC,sDAAsD,CAAC,qBAAqB,0BAA0B,CAAC,kBAAkB,CAAC,+SAA+S,mCAAmC,CAAC,2BAA2B,CAAC,8LAA8L,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,UAAU,CAAC,+CAA+C,mGAAmG,CAAC,4EAA4E,CAAC,uEAAuE,CAAC,oGAAqE,CAArE,sEAAsE,CAAC,gDAAgD,mGAAmG,CAAC,2EAA2E,CAAC,sEAAsE,CAAC,oGAAsE,CAAtE,uEAAuE,CAAC,8CAA8C,qGAAqG,CAAC,6EAA6E,CAAC,wEAAwE,CAAC,sGAAoE,CAApE,qEAAqE,CAAC,iDAAiD,qGAAqG,CAAC,0EAA0E,CAAC,qEAAqE,CAAC,sGAAuE,CAAvE,wEAAwE,CAAC,kFAAkF,sBAAsB,CAAC,kBAAkB,CAAC,8EAA8E,sBAAsB,CAAC,kBAAkB,CAAC,wCAAwC,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,CAAC,cAAc,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,2BAA2B,CAAC,sFAAsF,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC,8DAA8D,mRAAmR,CAAC,SAAS,CAAC,UAAU,CAAC,8DAA8D,mRAAmR,CAAC,UAAU,CAAC,SAAS,CAAC,sGAAsG,mRAAmR,CAAC,sGAAsG,mRAAmR,CAAC,sGAAsG,mRAAmR,CAAC,sGAAsG,mRAAmR,CAAC,oBAAoB,YAAY,CAAC,mBAAmB,iBAAiB,CAAC,iBAAiB,CAAC,8BAA8B,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,oCAAoC,CAAC,4BAA4B,CAAC,UAAU,CAAC,4CAA4C,SAAS,CAAC,8GAA8G,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,mCAAmC,eAAe,CAAC,WAAW,CAAC,6DAA6D,4BAA4B,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,oEAAoE,0BAA0B,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,yEAAyE,0BAA0B,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,yEAAyE,4BAA4B,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,8EAA8E,4BAA4B,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,yEAAyE,4BAA4B,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,8EAA8E,4BAA4B,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,0BAA0B,SAAS,CAAC,UAAU,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,eAAe,CAAC,UAAU,CAAC,gCAAgC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,uBAAuB,CAAC,eAAe,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,eAAe,CAAC,uDAAuD,cAAc,CAAC,iCAAiC,SAAS,CAAC,kBAAkB,CAAC,sDAAsD,UAAU,CAAC,OAAO,CAAC,uCAAuC,CAAC,+BAA+B,CAAC,gFAAgF,YAAY,CAAC,aAAa,CAAC,wFAAwF,OAAO,CAAC,kCAAkC,CAAC,8BAA8B,CAAC,0BAA0B,CAAC,SAAS,CAAC,kHAAkH,oBAAoB,CAAC,gDAAgD,CAAC,2CAAwC,CAAxC,wCAAwC,CAAC,mCAAmC,CAAC,wCAAgC,CAAhC,gCAAgC,CAAC,8DAAqD,CAArD,yDAAqD,CAArD,sDAAsD,CAAC,kFAAkF,YAAY,CAAC,0FAA0F,QAAQ,CAAC,kCAAkC,CAAC,8BAA8B,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,oHAAoH,iDAAiD,CAAC,4CAAyC,CAAzC,yCAAyC,CAAC,oCAAoC,CAAC,yCAAiC,CAAjC,iCAAiC,CAAC,+DAAsD,CAAtD,0DAAsD,CAAtD,uDAAuD,CAAC,+GAA+G,kDAAkD,CAAC,6CAA0C,CAA1C,0CAA0C,CAAC,qCAAqC,CAAC,0CAAkC,CAAlC,kCAAkC,CAAC,gEAAuD,CAAvD,2DAAuD,CAAvD,wDAAwD,CAAC,+BAA+B,0BAA0B,CAAC,iBAAiB,CAAC,mEAAmE,kBAAkB,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,0BAA0B,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,6BAA6B,CAAC,yBAAyB,CAAC,yFAAyF,kCAAkC,CAAC,8BAA8B,CAAC,0BAA0B,CAAC,6JAA6J,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,6JAA6J,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,0DAA0D,eAAe,CAAC,uDAAuD,gCAAgC,CAAC,2FAA2F,eAAe,CAAC,0DAA0D,eAAe,CAAC,uDAAuD,0BAA0B,CAAC,2FAA2F,eAAe,CAAC,wBAAwB,YAAY,CAAC,kBAAkB,kBAAkB,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,yBAAyB,CAAC,+CAA+C,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,6CAA6C,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,uBAAuB,WAAW,CAAC,UAAU,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,WAAW,CAAC,uBAAuB,YAAY,CAAC,uBAAuB,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,YAAY,CAAC,uBAAuB,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,sBAAsB,CAAC,wBAAwB,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,oFAAoF,cAAc,CAAC,eAAe,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,qBAAqB,WAAW,CAAC,uBAAuB,UAAU,CAAC,WAAW,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,CAAC,4BAA4B,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,iEAAiE,CAAC,yDAAyD,CAAC,6BAA6B,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,w7CAAw7C,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,mCAAmC,q7CAAq7C,CAAC,yCAAyC,KAAK,gCAAgC,CAAC,wBAAwB,CAAC,CAAC,iCAAiC,KAAK,gCAAgC,CAAC,wBAAwB,CAAC,CAAC,uCAAuC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,SAAS,CAAC,aAAa,CAAC,gEAAgE,2CAA2C,CAAC,sCAAsC,CAAC,mCAAmC,CAAC,qCAAqC,mBAAmB,CAAC,mCAAmC,CAAC,8BAA8B,CAAC,2BAA2B,CAAC,mDAAmD,mBAAmB,CAAC,6GAA6G,mBAAmB,CAAC,uBAAuB,gBAAgB,CAAC,qCAAqC,mBAAmB,CAAC,kCAAkC,CAAC,0BAA0B,CAAC,SAAS,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,UAAU,CAAC,WAAW,CAAC,mDAAmD,mBAAmB,CAAC,0DAA0D,+BAA+B,CAAC,2BAA2B,CAAC,uBAAuB,CAAC,6GAA6G,mBAAmB,CAAC,wLAAwL,mBAAmB,CAAC,kBAAkB,CAAC,sMAAsM,SAAS,CAAC,kCAAkC,CAAC,0BAA0B,CAAC,2CAA2C,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,SAAS,CAAC,uBAAuB,gBAAgB,CAAC,qCAAqC,mBAAmB,CAAC,kCAAkC,CAAC,0BAA0B,CAAC,SAAS,CAAC,mDAAmD,mBAAmB,CAAC,6GAA6G,mBAAmB,CAAC,sMAAsM,SAAS,CAAC,kCAAkC,CAAC,0BAA0B,CAAC,4CAA4C,sBAAsB","file":"swiper.min.css","sourcesContent":["/**\n * Swiper 4.5.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * http://www.idangero.us/swiper/\n *\n * Copyright 2014-2019 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: September 13, 2019\n */\n.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E\");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E\")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s transform,.2s top;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s transform,.2s left;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s transform,.2s right;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}"]}]);
  8914. // Exports
  8915. module.exports = exports;
  8916. /***/ }),
  8917. /***/ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_vab-icons@0.0.20@vab-icons/lib/vab-icons.css":
  8918. /*!************************************************************************************************************************************************************************************************************************!*\
  8919. !*** ./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./node_modules/_vab-icons@0.0.20@vab-icons/lib/vab-icons.css ***!
  8920. \************************************************************************************************************************************************************************************************************************/
  8921. /*! no static exports found */
  8922. /***/ (function(module, exports, __webpack_require__) {
  8923. // Imports
  8924. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../_css-loader@3.6.0@css-loader/dist/runtime/api.js */ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/api.js");
  8925. var ___CSS_LOADER_GET_URL_IMPORT___ = __webpack_require__(/*! ../../_css-loader@3.6.0@css-loader/dist/runtime/getUrl.js */ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/getUrl.js");
  8926. var ___CSS_LOADER_URL_IMPORT_0___ = __webpack_require__(/*! ./fonts/remixicon.31d28485.eot */ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.31d28485.eot");
  8927. var ___CSS_LOADER_URL_IMPORT_1___ = __webpack_require__(/*! ./fonts/remixicon.9915fef9.woff2 */ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.9915fef9.woff2");
  8928. var ___CSS_LOADER_URL_IMPORT_2___ = __webpack_require__(/*! ./fonts/remixicon.881fbc46.woff */ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.881fbc46.woff");
  8929. var ___CSS_LOADER_URL_IMPORT_3___ = __webpack_require__(/*! ./fonts/remixicon.888e61f0.ttf */ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.888e61f0.ttf");
  8930. var ___CSS_LOADER_URL_IMPORT_4___ = __webpack_require__(/*! ./img/remixicon.95138f36.svg */ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/img/remixicon.95138f36.svg");
  8931. exports = ___CSS_LOADER_API_IMPORT___(true);
  8932. var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
  8933. var ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___, { hash: "#iefix" });
  8934. var ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);
  8935. var ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);
  8936. var ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___);
  8937. var ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___, { hash: "#remixicon" });
  8938. // Module
  8939. exports.push([module.i, "@font-face{font-family:remixicon;src:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");src:url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ") format(\"embedded-opentype\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ") format(\"woff2\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_3___ + ") format(\"woff\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_4___ + ") format(\"truetype\"),url(" + ___CSS_LOADER_URL_REPLACEMENT_5___ + ") format(\"svg\");font-display:swap}[class*=\" ri-\"],[class^=ri-]{font-family:remixicon!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:\"\\ea01\"}.ri-24-hours-line:before{content:\"\\ea02\"}.ri-4k-fill:before{content:\"\\ea03\"}.ri-4k-line:before{content:\"\\ea04\"}.ri-a-b:before{content:\"\\ea05\"}.ri-account-box-fill:before{content:\"\\ea06\"}.ri-account-box-line:before{content:\"\\ea07\"}.ri-account-circle-fill:before{content:\"\\ea08\"}.ri-account-circle-line:before{content:\"\\ea09\"}.ri-account-pin-box-fill:before{content:\"\\ea0a\"}.ri-account-pin-box-line:before{content:\"\\ea0b\"}.ri-account-pin-circle-fill:before{content:\"\\ea0c\"}.ri-account-pin-circle-line:before{content:\"\\ea0d\"}.ri-add-box-fill:before{content:\"\\ea0e\"}.ri-add-box-line:before{content:\"\\ea0f\"}.ri-add-circle-fill:before{content:\"\\ea10\"}.ri-add-circle-line:before{content:\"\\ea11\"}.ri-add-fill:before{content:\"\\ea12\"}.ri-add-line:before{content:\"\\ea13\"}.ri-admin-fill:before{content:\"\\ea14\"}.ri-admin-line:before{content:\"\\ea15\"}.ri-advertisement-fill:before{content:\"\\ea16\"}.ri-advertisement-line:before{content:\"\\ea17\"}.ri-airplay-fill:before{content:\"\\ea18\"}.ri-airplay-line:before{content:\"\\ea19\"}.ri-alarm-fill:before{content:\"\\ea1a\"}.ri-alarm-line:before{content:\"\\ea1b\"}.ri-alarm-warning-fill:before{content:\"\\ea1c\"}.ri-alarm-warning-line:before{content:\"\\ea1d\"}.ri-album-fill:before{content:\"\\ea1e\"}.ri-album-line:before{content:\"\\ea1f\"}.ri-alert-fill:before{content:\"\\ea20\"}.ri-alert-line:before{content:\"\\ea21\"}.ri-aliens-fill:before{content:\"\\ea22\"}.ri-aliens-line:before{content:\"\\ea23\"}.ri-align-bottom:before{content:\"\\ea24\"}.ri-align-center:before{content:\"\\ea25\"}.ri-align-justify:before{content:\"\\ea26\"}.ri-align-left:before{content:\"\\ea27\"}.ri-align-right:before{content:\"\\ea28\"}.ri-align-top:before{content:\"\\ea29\"}.ri-align-vertically:before{content:\"\\ea2a\"}.ri-alipay-fill:before{content:\"\\ea2b\"}.ri-alipay-line:before{content:\"\\ea2c\"}.ri-amazon-fill:before{content:\"\\ea2d\"}.ri-amazon-line:before{content:\"\\ea2e\"}.ri-anchor-fill:before{content:\"\\ea2f\"}.ri-anchor-line:before{content:\"\\ea30\"}.ri-ancient-gate-fill:before{content:\"\\ea31\"}.ri-ancient-gate-line:before{content:\"\\ea32\"}.ri-ancient-pavilion-fill:before{content:\"\\ea33\"}.ri-ancient-pavilion-line:before{content:\"\\ea34\"}.ri-android-fill:before{content:\"\\ea35\"}.ri-android-line:before{content:\"\\ea36\"}.ri-angularjs-fill:before{content:\"\\ea37\"}.ri-angularjs-line:before{content:\"\\ea38\"}.ri-anticlockwise-2-fill:before{content:\"\\ea39\"}.ri-anticlockwise-2-line:before{content:\"\\ea3a\"}.ri-anticlockwise-fill:before{content:\"\\ea3b\"}.ri-anticlockwise-line:before{content:\"\\ea3c\"}.ri-app-store-fill:before{content:\"\\ea3d\"}.ri-app-store-line:before{content:\"\\ea3e\"}.ri-apple-fill:before{content:\"\\ea3f\"}.ri-apple-line:before{content:\"\\ea40\"}.ri-apps-2-fill:before{content:\"\\ea41\"}.ri-apps-2-line:before{content:\"\\ea42\"}.ri-apps-fill:before{content:\"\\ea43\"}.ri-apps-line:before{content:\"\\ea44\"}.ri-archive-drawer-fill:before{content:\"\\ea45\"}.ri-archive-drawer-line:before{content:\"\\ea46\"}.ri-archive-fill:before{content:\"\\ea47\"}.ri-archive-line:before{content:\"\\ea48\"}.ri-arrow-down-circle-fill:before{content:\"\\ea49\"}.ri-arrow-down-circle-line:before{content:\"\\ea4a\"}.ri-arrow-down-fill:before{content:\"\\ea4b\"}.ri-arrow-down-line:before{content:\"\\ea4c\"}.ri-arrow-down-s-fill:before{content:\"\\ea4d\"}.ri-arrow-down-s-line:before{content:\"\\ea4e\"}.ri-arrow-drop-down-fill:before{content:\"\\ea4f\"}.ri-arrow-drop-down-line:before{content:\"\\ea50\"}.ri-arrow-drop-left-fill:before{content:\"\\ea51\"}.ri-arrow-drop-left-line:before{content:\"\\ea52\"}.ri-arrow-drop-right-fill:before{content:\"\\ea53\"}.ri-arrow-drop-right-line:before{content:\"\\ea54\"}.ri-arrow-drop-up-fill:before{content:\"\\ea55\"}.ri-arrow-drop-up-line:before{content:\"\\ea56\"}.ri-arrow-go-back-fill:before{content:\"\\ea57\"}.ri-arrow-go-back-line:before{content:\"\\ea58\"}.ri-arrow-go-forward-fill:before{content:\"\\ea59\"}.ri-arrow-go-forward-line:before{content:\"\\ea5a\"}.ri-arrow-left-circle-fill:before{content:\"\\ea5b\"}.ri-arrow-left-circle-line:before{content:\"\\ea5c\"}.ri-arrow-left-down-fill:before{content:\"\\ea5d\"}.ri-arrow-left-down-line:before{content:\"\\ea5e\"}.ri-arrow-left-fill:before{content:\"\\ea5f\"}.ri-arrow-left-line:before{content:\"\\ea60\"}.ri-arrow-left-right-fill:before{content:\"\\ea61\"}.ri-arrow-left-right-line:before{content:\"\\ea62\"}.ri-arrow-left-s-fill:before{content:\"\\ea63\"}.ri-arrow-left-s-line:before{content:\"\\ea64\"}.ri-arrow-left-up-fill:before{content:\"\\ea65\"}.ri-arrow-left-up-line:before{content:\"\\ea66\"}.ri-arrow-right-circle-fill:before{content:\"\\ea67\"}.ri-arrow-right-circle-line:before{content:\"\\ea68\"}.ri-arrow-right-down-fill:before{content:\"\\ea69\"}.ri-arrow-right-down-line:before{content:\"\\ea6a\"}.ri-arrow-right-fill:before{content:\"\\ea6b\"}.ri-arrow-right-line:before{content:\"\\ea6c\"}.ri-arrow-right-s-fill:before{content:\"\\ea6d\"}.ri-arrow-right-s-line:before{content:\"\\ea6e\"}.ri-arrow-right-up-fill:before{content:\"\\ea6f\"}.ri-arrow-right-up-line:before{content:\"\\ea70\"}.ri-arrow-up-circle-fill:before{content:\"\\ea71\"}.ri-arrow-up-circle-line:before{content:\"\\ea72\"}.ri-arrow-up-down-fill:before{content:\"\\ea73\"}.ri-arrow-up-down-line:before{content:\"\\ea74\"}.ri-arrow-up-fill:before{content:\"\\ea75\"}.ri-arrow-up-line:before{content:\"\\ea76\"}.ri-arrow-up-s-fill:before{content:\"\\ea77\"}.ri-arrow-up-s-line:before{content:\"\\ea78\"}.ri-artboard-2-fill:before{content:\"\\ea79\"}.ri-artboard-2-line:before{content:\"\\ea7a\"}.ri-artboard-fill:before{content:\"\\ea7b\"}.ri-artboard-line:before{content:\"\\ea7c\"}.ri-article-fill:before{content:\"\\ea7d\"}.ri-article-line:before{content:\"\\ea7e\"}.ri-aspect-ratio-fill:before{content:\"\\ea7f\"}.ri-aspect-ratio-line:before{content:\"\\ea80\"}.ri-asterisk:before{content:\"\\ea81\"}.ri-at-fill:before{content:\"\\ea82\"}.ri-at-line:before{content:\"\\ea83\"}.ri-attachment-2:before{content:\"\\ea84\"}.ri-attachment-fill:before{content:\"\\ea85\"}.ri-attachment-line:before{content:\"\\ea86\"}.ri-auction-fill:before{content:\"\\ea87\"}.ri-auction-line:before{content:\"\\ea88\"}.ri-award-fill:before{content:\"\\ea89\"}.ri-award-line:before{content:\"\\ea8a\"}.ri-baidu-fill:before{content:\"\\ea8b\"}.ri-baidu-line:before{content:\"\\ea8c\"}.ri-ball-pen-fill:before{content:\"\\ea8d\"}.ri-ball-pen-line:before{content:\"\\ea8e\"}.ri-bank-card-2-fill:before{content:\"\\ea8f\"}.ri-bank-card-2-line:before{content:\"\\ea90\"}.ri-bank-card-fill:before{content:\"\\ea91\"}.ri-bank-card-line:before{content:\"\\ea92\"}.ri-bank-fill:before{content:\"\\ea93\"}.ri-bank-line:before{content:\"\\ea94\"}.ri-bar-chart-2-fill:before{content:\"\\ea95\"}.ri-bar-chart-2-line:before{content:\"\\ea96\"}.ri-bar-chart-box-fill:before{content:\"\\ea97\"}.ri-bar-chart-box-line:before{content:\"\\ea98\"}.ri-bar-chart-fill:before{content:\"\\ea99\"}.ri-bar-chart-grouped-fill:before{content:\"\\ea9a\"}.ri-bar-chart-grouped-line:before{content:\"\\ea9b\"}.ri-bar-chart-horizontal-fill:before{content:\"\\ea9c\"}.ri-bar-chart-horizontal-line:before{content:\"\\ea9d\"}.ri-bar-chart-line:before{content:\"\\ea9e\"}.ri-barcode-box-fill:before{content:\"\\ea9f\"}.ri-barcode-box-line:before{content:\"\\eaa0\"}.ri-barcode-fill:before{content:\"\\eaa1\"}.ri-barcode-line:before{content:\"\\eaa2\"}.ri-barricade-fill:before{content:\"\\eaa3\"}.ri-barricade-line:before{content:\"\\eaa4\"}.ri-base-station-fill:before{content:\"\\eaa5\"}.ri-base-station-line:before{content:\"\\eaa6\"}.ri-basketball-fill:before{content:\"\\eaa7\"}.ri-basketball-line:before{content:\"\\eaa8\"}.ri-battery-2-charge-fill:before{content:\"\\eaa9\"}.ri-battery-2-charge-line:before{content:\"\\eaaa\"}.ri-battery-2-fill:before{content:\"\\eaab\"}.ri-battery-2-line:before{content:\"\\eaac\"}.ri-battery-charge-fill:before{content:\"\\eaad\"}.ri-battery-charge-line:before{content:\"\\eaae\"}.ri-battery-fill:before{content:\"\\eaaf\"}.ri-battery-line:before{content:\"\\eab0\"}.ri-battery-low-fill:before{content:\"\\eab1\"}.ri-battery-low-line:before{content:\"\\eab2\"}.ri-battery-saver-fill:before{content:\"\\eab3\"}.ri-battery-saver-line:before{content:\"\\eab4\"}.ri-battery-share-fill:before{content:\"\\eab5\"}.ri-battery-share-line:before{content:\"\\eab6\"}.ri-bear-smile-fill:before{content:\"\\eab7\"}.ri-bear-smile-line:before{content:\"\\eab8\"}.ri-behance-fill:before{content:\"\\eab9\"}.ri-behance-line:before{content:\"\\eaba\"}.ri-bell-fill:before{content:\"\\eabb\"}.ri-bell-line:before{content:\"\\eabc\"}.ri-bike-fill:before{content:\"\\eabd\"}.ri-bike-line:before{content:\"\\eabe\"}.ri-bilibili-fill:before{content:\"\\eabf\"}.ri-bilibili-line:before{content:\"\\eac0\"}.ri-bill-fill:before{content:\"\\eac1\"}.ri-bill-line:before{content:\"\\eac2\"}.ri-billiards-fill:before{content:\"\\eac3\"}.ri-billiards-line:before{content:\"\\eac4\"}.ri-bit-coin-fill:before{content:\"\\eac5\"}.ri-bit-coin-line:before{content:\"\\eac6\"}.ri-blaze-fill:before{content:\"\\eac7\"}.ri-blaze-line:before{content:\"\\eac8\"}.ri-bluetooth-connect-fill:before{content:\"\\eac9\"}.ri-bluetooth-connect-line:before{content:\"\\eaca\"}.ri-bluetooth-fill:before{content:\"\\eacb\"}.ri-bluetooth-line:before{content:\"\\eacc\"}.ri-blur-off-fill:before{content:\"\\eacd\"}.ri-blur-off-line:before{content:\"\\eace\"}.ri-body-scan-fill:before{content:\"\\eacf\"}.ri-body-scan-line:before{content:\"\\ead0\"}.ri-bold:before{content:\"\\ead1\"}.ri-book-2-fill:before{content:\"\\ead2\"}.ri-book-2-line:before{content:\"\\ead3\"}.ri-book-3-fill:before{content:\"\\ead4\"}.ri-book-3-line:before{content:\"\\ead5\"}.ri-book-fill:before{content:\"\\ead6\"}.ri-book-line:before{content:\"\\ead7\"}.ri-book-mark-fill:before{content:\"\\ead8\"}.ri-book-mark-line:before{content:\"\\ead9\"}.ri-book-open-fill:before{content:\"\\eada\"}.ri-book-open-line:before{content:\"\\eadb\"}.ri-book-read-fill:before{content:\"\\eadc\"}.ri-book-read-line:before{content:\"\\eadd\"}.ri-booklet-fill:before{content:\"\\eade\"}.ri-booklet-line:before{content:\"\\eadf\"}.ri-bookmark-2-fill:before{content:\"\\eae0\"}.ri-bookmark-2-line:before{content:\"\\eae1\"}.ri-bookmark-3-fill:before{content:\"\\eae2\"}.ri-bookmark-3-line:before{content:\"\\eae3\"}.ri-bookmark-fill:before{content:\"\\eae4\"}.ri-bookmark-line:before{content:\"\\eae5\"}.ri-boxing-fill:before{content:\"\\eae6\"}.ri-boxing-line:before{content:\"\\eae7\"}.ri-braces-fill:before{content:\"\\eae8\"}.ri-braces-line:before{content:\"\\eae9\"}.ri-brackets-fill:before{content:\"\\eaea\"}.ri-brackets-line:before{content:\"\\eaeb\"}.ri-briefcase-2-fill:before{content:\"\\eaec\"}.ri-briefcase-2-line:before{content:\"\\eaed\"}.ri-briefcase-3-fill:before{content:\"\\eaee\"}.ri-briefcase-3-line:before{content:\"\\eaef\"}.ri-briefcase-4-fill:before{content:\"\\eaf0\"}.ri-briefcase-4-line:before{content:\"\\eaf1\"}.ri-briefcase-5-fill:before{content:\"\\eaf2\"}.ri-briefcase-5-line:before{content:\"\\eaf3\"}.ri-briefcase-fill:before{content:\"\\eaf4\"}.ri-briefcase-line:before{content:\"\\eaf5\"}.ri-bring-forward:before{content:\"\\eaf6\"}.ri-bring-to-front:before{content:\"\\eaf7\"}.ri-broadcast-fill:before{content:\"\\eaf8\"}.ri-broadcast-line:before{content:\"\\eaf9\"}.ri-brush-2-fill:before{content:\"\\eafa\"}.ri-brush-2-line:before{content:\"\\eafb\"}.ri-brush-3-fill:before{content:\"\\eafc\"}.ri-brush-3-line:before{content:\"\\eafd\"}.ri-brush-4-fill:before{content:\"\\eafe\"}.ri-brush-4-line:before{content:\"\\eaff\"}.ri-brush-fill:before{content:\"\\eb00\"}.ri-brush-line:before{content:\"\\eb01\"}.ri-bubble-chart-fill:before{content:\"\\eb02\"}.ri-bubble-chart-line:before{content:\"\\eb03\"}.ri-bug-2-fill:before{content:\"\\eb04\"}.ri-bug-2-line:before{content:\"\\eb05\"}.ri-bug-fill:before{content:\"\\eb06\"}.ri-bug-line:before{content:\"\\eb07\"}.ri-building-2-fill:before{content:\"\\eb08\"}.ri-building-2-line:before{content:\"\\eb09\"}.ri-building-3-fill:before{content:\"\\eb0a\"}.ri-building-3-line:before{content:\"\\eb0b\"}.ri-building-4-fill:before{content:\"\\eb0c\"}.ri-building-4-line:before{content:\"\\eb0d\"}.ri-building-fill:before{content:\"\\eb0e\"}.ri-building-line:before{content:\"\\eb0f\"}.ri-bus-2-fill:before{content:\"\\eb10\"}.ri-bus-2-line:before{content:\"\\eb11\"}.ri-bus-fill:before{content:\"\\eb12\"}.ri-bus-line:before{content:\"\\eb13\"}.ri-bus-wifi-fill:before{content:\"\\eb14\"}.ri-bus-wifi-line:before{content:\"\\eb15\"}.ri-cactus-fill:before{content:\"\\eb16\"}.ri-cactus-line:before{content:\"\\eb17\"}.ri-cake-2-fill:before{content:\"\\eb18\"}.ri-cake-2-line:before{content:\"\\eb19\"}.ri-cake-3-fill:before{content:\"\\eb1a\"}.ri-cake-3-line:before{content:\"\\eb1b\"}.ri-cake-fill:before{content:\"\\eb1c\"}.ri-cake-line:before{content:\"\\eb1d\"}.ri-calculator-fill:before{content:\"\\eb1e\"}.ri-calculator-line:before{content:\"\\eb1f\"}.ri-calendar-2-fill:before{content:\"\\eb20\"}.ri-calendar-2-line:before{content:\"\\eb21\"}.ri-calendar-check-fill:before{content:\"\\eb22\"}.ri-calendar-check-line:before{content:\"\\eb23\"}.ri-calendar-event-fill:before{content:\"\\eb24\"}.ri-calendar-event-line:before{content:\"\\eb25\"}.ri-calendar-fill:before{content:\"\\eb26\"}.ri-calendar-line:before{content:\"\\eb27\"}.ri-calendar-todo-fill:before{content:\"\\eb28\"}.ri-calendar-todo-line:before{content:\"\\eb29\"}.ri-camera-2-fill:before{content:\"\\eb2a\"}.ri-camera-2-line:before{content:\"\\eb2b\"}.ri-camera-3-fill:before{content:\"\\eb2c\"}.ri-camera-3-line:before{content:\"\\eb2d\"}.ri-camera-fill:before{content:\"\\eb2e\"}.ri-camera-lens-fill:before{content:\"\\eb2f\"}.ri-camera-lens-line:before{content:\"\\eb30\"}.ri-camera-line:before{content:\"\\eb31\"}.ri-camera-off-fill:before{content:\"\\eb32\"}.ri-camera-off-line:before{content:\"\\eb33\"}.ri-camera-switch-fill:before{content:\"\\eb34\"}.ri-camera-switch-line:before{content:\"\\eb35\"}.ri-capsule-fill:before{content:\"\\eb36\"}.ri-capsule-line:before{content:\"\\eb37\"}.ri-car-fill:before{content:\"\\eb38\"}.ri-car-line:before{content:\"\\eb39\"}.ri-car-washing-fill:before{content:\"\\eb3a\"}.ri-car-washing-line:before{content:\"\\eb3b\"}.ri-caravan-fill:before{content:\"\\eb3c\"}.ri-caravan-line:before{content:\"\\eb3d\"}.ri-cast-fill:before{content:\"\\eb3e\"}.ri-cast-line:before{content:\"\\eb3f\"}.ri-cellphone-fill:before{content:\"\\eb40\"}.ri-cellphone-line:before{content:\"\\eb41\"}.ri-celsius-fill:before{content:\"\\eb42\"}.ri-celsius-line:before{content:\"\\eb43\"}.ri-centos-fill:before{content:\"\\eb44\"}.ri-centos-line:before{content:\"\\eb45\"}.ri-character-recognition-fill:before{content:\"\\eb46\"}.ri-character-recognition-line:before{content:\"\\eb47\"}.ri-charging-pile-2-fill:before{content:\"\\eb48\"}.ri-charging-pile-2-line:before{content:\"\\eb49\"}.ri-charging-pile-fill:before{content:\"\\eb4a\"}.ri-charging-pile-line:before{content:\"\\eb4b\"}.ri-chat-1-fill:before{content:\"\\eb4c\"}.ri-chat-1-line:before{content:\"\\eb4d\"}.ri-chat-2-fill:before{content:\"\\eb4e\"}.ri-chat-2-line:before{content:\"\\eb4f\"}.ri-chat-3-fill:before{content:\"\\eb50\"}.ri-chat-3-line:before{content:\"\\eb51\"}.ri-chat-4-fill:before{content:\"\\eb52\"}.ri-chat-4-line:before{content:\"\\eb53\"}.ri-chat-check-fill:before{content:\"\\eb54\"}.ri-chat-check-line:before{content:\"\\eb55\"}.ri-chat-delete-fill:before{content:\"\\eb56\"}.ri-chat-delete-line:before{content:\"\\eb57\"}.ri-chat-download-fill:before{content:\"\\eb58\"}.ri-chat-download-line:before{content:\"\\eb59\"}.ri-chat-follow-up-fill:before{content:\"\\eb5a\"}.ri-chat-follow-up-line:before{content:\"\\eb5b\"}.ri-chat-forward-fill:before{content:\"\\eb5c\"}.ri-chat-forward-line:before{content:\"\\eb5d\"}.ri-chat-heart-fill:before{content:\"\\eb5e\"}.ri-chat-heart-line:before{content:\"\\eb5f\"}.ri-chat-history-fill:before{content:\"\\eb60\"}.ri-chat-history-line:before{content:\"\\eb61\"}.ri-chat-new-fill:before{content:\"\\eb62\"}.ri-chat-new-line:before{content:\"\\eb63\"}.ri-chat-off-fill:before{content:\"\\eb64\"}.ri-chat-off-line:before{content:\"\\eb65\"}.ri-chat-poll-fill:before{content:\"\\eb66\"}.ri-chat-poll-line:before{content:\"\\eb67\"}.ri-chat-private-fill:before{content:\"\\eb68\"}.ri-chat-private-line:before{content:\"\\eb69\"}.ri-chat-quote-fill:before{content:\"\\eb6a\"}.ri-chat-quote-line:before{content:\"\\eb6b\"}.ri-chat-settings-fill:before{content:\"\\eb6c\"}.ri-chat-settings-line:before{content:\"\\eb6d\"}.ri-chat-smile-2-fill:before{content:\"\\eb6e\"}.ri-chat-smile-2-line:before{content:\"\\eb6f\"}.ri-chat-smile-3-fill:before{content:\"\\eb70\"}.ri-chat-smile-3-line:before{content:\"\\eb71\"}.ri-chat-smile-fill:before{content:\"\\eb72\"}.ri-chat-smile-line:before{content:\"\\eb73\"}.ri-chat-upload-fill:before{content:\"\\eb74\"}.ri-chat-upload-line:before{content:\"\\eb75\"}.ri-chat-voice-fill:before{content:\"\\eb76\"}.ri-chat-voice-line:before{content:\"\\eb77\"}.ri-check-double-fill:before{content:\"\\eb78\"}.ri-check-double-line:before{content:\"\\eb79\"}.ri-check-fill:before{content:\"\\eb7a\"}.ri-check-line:before{content:\"\\eb7b\"}.ri-checkbox-blank-circle-fill:before{content:\"\\eb7c\"}.ri-checkbox-blank-circle-line:before{content:\"\\eb7d\"}.ri-checkbox-blank-fill:before{content:\"\\eb7e\"}.ri-checkbox-blank-line:before{content:\"\\eb7f\"}.ri-checkbox-circle-fill:before{content:\"\\eb80\"}.ri-checkbox-circle-line:before{content:\"\\eb81\"}.ri-checkbox-fill:before{content:\"\\eb82\"}.ri-checkbox-indeterminate-fill:before{content:\"\\eb83\"}.ri-checkbox-indeterminate-line:before{content:\"\\eb84\"}.ri-checkbox-line:before{content:\"\\eb85\"}.ri-checkbox-multiple-blank-fill:before{content:\"\\eb86\"}.ri-checkbox-multiple-blank-line:before{content:\"\\eb87\"}.ri-checkbox-multiple-fill:before{content:\"\\eb88\"}.ri-checkbox-multiple-line:before{content:\"\\eb89\"}.ri-china-railway-fill:before{content:\"\\eb8a\"}.ri-china-railway-line:before{content:\"\\eb8b\"}.ri-chrome-fill:before{content:\"\\eb8c\"}.ri-chrome-line:before{content:\"\\eb8d\"}.ri-clapperboard-fill:before{content:\"\\eb8e\"}.ri-clapperboard-line:before{content:\"\\eb8f\"}.ri-clipboard-fill:before{content:\"\\eb90\"}.ri-clipboard-line:before{content:\"\\eb91\"}.ri-clockwise-2-fill:before{content:\"\\eb92\"}.ri-clockwise-2-line:before{content:\"\\eb93\"}.ri-clockwise-fill:before{content:\"\\eb94\"}.ri-clockwise-line:before{content:\"\\eb95\"}.ri-close-circle-fill:before{content:\"\\eb96\"}.ri-close-circle-line:before{content:\"\\eb97\"}.ri-close-fill:before{content:\"\\eb98\"}.ri-close-line:before{content:\"\\eb99\"}.ri-closed-captioning-fill:before{content:\"\\eb9a\"}.ri-closed-captioning-line:before{content:\"\\eb9b\"}.ri-cloud-fill:before{content:\"\\eb9c\"}.ri-cloud-line:before{content:\"\\eb9d\"}.ri-cloud-off-fill:before{content:\"\\eb9e\"}.ri-cloud-off-line:before{content:\"\\eb9f\"}.ri-cloud-windy-fill:before{content:\"\\eba0\"}.ri-cloud-windy-line:before{content:\"\\eba1\"}.ri-cloudy-2-fill:before{content:\"\\eba2\"}.ri-cloudy-2-line:before{content:\"\\eba3\"}.ri-cloudy-fill:before{content:\"\\eba4\"}.ri-cloudy-line:before{content:\"\\eba5\"}.ri-code-box-fill:before{content:\"\\eba6\"}.ri-code-box-line:before{content:\"\\eba7\"}.ri-code-fill:before{content:\"\\eba8\"}.ri-code-line:before{content:\"\\eba9\"}.ri-code-s-fill:before{content:\"\\ebaa\"}.ri-code-s-line:before{content:\"\\ebab\"}.ri-code-s-slash-fill:before{content:\"\\ebac\"}.ri-code-s-slash-line:before{content:\"\\ebad\"}.ri-code-view:before{content:\"\\ebae\"}.ri-codepen-fill:before{content:\"\\ebaf\"}.ri-codepen-line:before{content:\"\\ebb0\"}.ri-coin-fill:before{content:\"\\ebb1\"}.ri-coin-line:before{content:\"\\ebb2\"}.ri-coins-fill:before{content:\"\\ebb3\"}.ri-coins-line:before{content:\"\\ebb4\"}.ri-collage-fill:before{content:\"\\ebb5\"}.ri-collage-line:before{content:\"\\ebb6\"}.ri-command-fill:before{content:\"\\ebb7\"}.ri-command-line:before{content:\"\\ebb8\"}.ri-community-fill:before{content:\"\\ebb9\"}.ri-community-line:before{content:\"\\ebba\"}.ri-compass-2-fill:before{content:\"\\ebbb\"}.ri-compass-2-line:before{content:\"\\ebbc\"}.ri-compass-3-fill:before{content:\"\\ebbd\"}.ri-compass-3-line:before{content:\"\\ebbe\"}.ri-compass-4-fill:before{content:\"\\ebbf\"}.ri-compass-4-line:before{content:\"\\ebc0\"}.ri-compass-discover-fill:before{content:\"\\ebc1\"}.ri-compass-discover-line:before{content:\"\\ebc2\"}.ri-compass-fill:before{content:\"\\ebc3\"}.ri-compass-line:before{content:\"\\ebc4\"}.ri-compasses-2-fill:before{content:\"\\ebc5\"}.ri-compasses-2-line:before{content:\"\\ebc6\"}.ri-compasses-fill:before{content:\"\\ebc7\"}.ri-compasses-line:before{content:\"\\ebc8\"}.ri-computer-fill:before{content:\"\\ebc9\"}.ri-computer-line:before{content:\"\\ebca\"}.ri-contacts-book-2-fill:before{content:\"\\ebcb\"}.ri-contacts-book-2-line:before{content:\"\\ebcc\"}.ri-contacts-book-fill:before{content:\"\\ebcd\"}.ri-contacts-book-line:before{content:\"\\ebce\"}.ri-contacts-book-upload-fill:before{content:\"\\ebcf\"}.ri-contacts-book-upload-line:before{content:\"\\ebd0\"}.ri-contacts-fill:before{content:\"\\ebd1\"}.ri-contacts-line:before{content:\"\\ebd2\"}.ri-contrast-2-fill:before{content:\"\\ebd3\"}.ri-contrast-2-line:before{content:\"\\ebd4\"}.ri-contrast-drop-2-fill:before{content:\"\\ebd5\"}.ri-contrast-drop-2-line:before{content:\"\\ebd6\"}.ri-contrast-drop-fill:before{content:\"\\ebd7\"}.ri-contrast-drop-line:before{content:\"\\ebd8\"}.ri-contrast-fill:before{content:\"\\ebd9\"}.ri-contrast-line:before{content:\"\\ebda\"}.ri-copper-coin-fill:before{content:\"\\ebdb\"}.ri-copper-coin-line:before{content:\"\\ebdc\"}.ri-copper-diamond-fill:before{content:\"\\ebdd\"}.ri-copper-diamond-line:before{content:\"\\ebde\"}.ri-copyleft-fill:before{content:\"\\ebdf\"}.ri-copyleft-line:before{content:\"\\ebe0\"}.ri-copyright-fill:before{content:\"\\ebe1\"}.ri-copyright-line:before{content:\"\\ebe2\"}.ri-coreos-fill:before{content:\"\\ebe3\"}.ri-coreos-line:before{content:\"\\ebe4\"}.ri-coupon-2-fill:before{content:\"\\ebe5\"}.ri-coupon-2-line:before{content:\"\\ebe6\"}.ri-coupon-3-fill:before{content:\"\\ebe7\"}.ri-coupon-3-line:before{content:\"\\ebe8\"}.ri-coupon-4-fill:before{content:\"\\ebe9\"}.ri-coupon-4-line:before{content:\"\\ebea\"}.ri-coupon-5-fill:before{content:\"\\ebeb\"}.ri-coupon-5-line:before{content:\"\\ebec\"}.ri-coupon-fill:before{content:\"\\ebed\"}.ri-coupon-line:before{content:\"\\ebee\"}.ri-cpu-fill:before{content:\"\\ebef\"}.ri-cpu-line:before{content:\"\\ebf0\"}.ri-creative-commons-by-fill:before{content:\"\\ebf1\"}.ri-creative-commons-by-line:before{content:\"\\ebf2\"}.ri-creative-commons-fill:before{content:\"\\ebf3\"}.ri-creative-commons-line:before{content:\"\\ebf4\"}.ri-creative-commons-nc-fill:before{content:\"\\ebf5\"}.ri-creative-commons-nc-line:before{content:\"\\ebf6\"}.ri-creative-commons-nd-fill:before{content:\"\\ebf7\"}.ri-creative-commons-nd-line:before{content:\"\\ebf8\"}.ri-creative-commons-sa-fill:before{content:\"\\ebf9\"}.ri-creative-commons-sa-line:before{content:\"\\ebfa\"}.ri-creative-commons-zero-fill:before{content:\"\\ebfb\"}.ri-creative-commons-zero-line:before{content:\"\\ebfc\"}.ri-criminal-fill:before{content:\"\\ebfd\"}.ri-criminal-line:before{content:\"\\ebfe\"}.ri-crop-2-fill:before{content:\"\\ebff\"}.ri-crop-2-line:before{content:\"\\ec00\"}.ri-crop-fill:before{content:\"\\ec01\"}.ri-crop-line:before{content:\"\\ec02\"}.ri-css3-fill:before{content:\"\\ec03\"}.ri-css3-line:before{content:\"\\ec04\"}.ri-cup-fill:before{content:\"\\ec05\"}.ri-cup-line:before{content:\"\\ec06\"}.ri-currency-fill:before{content:\"\\ec07\"}.ri-currency-line:before{content:\"\\ec08\"}.ri-cursor-fill:before{content:\"\\ec09\"}.ri-cursor-line:before{content:\"\\ec0a\"}.ri-customer-service-2-fill:before{content:\"\\ec0b\"}.ri-customer-service-2-line:before{content:\"\\ec0c\"}.ri-customer-service-fill:before{content:\"\\ec0d\"}.ri-customer-service-line:before{content:\"\\ec0e\"}.ri-dashboard-2-fill:before{content:\"\\ec0f\"}.ri-dashboard-2-line:before{content:\"\\ec10\"}.ri-dashboard-3-fill:before{content:\"\\ec11\"}.ri-dashboard-3-line:before{content:\"\\ec12\"}.ri-dashboard-fill:before{content:\"\\ec13\"}.ri-dashboard-line:before{content:\"\\ec14\"}.ri-database-2-fill:before{content:\"\\ec15\"}.ri-database-2-line:before{content:\"\\ec16\"}.ri-database-fill:before{content:\"\\ec17\"}.ri-database-line:before{content:\"\\ec18\"}.ri-delete-back-2-fill:before{content:\"\\ec19\"}.ri-delete-back-2-line:before{content:\"\\ec1a\"}.ri-delete-back-fill:before{content:\"\\ec1b\"}.ri-delete-back-line:before{content:\"\\ec1c\"}.ri-delete-bin-2-fill:before{content:\"\\ec1d\"}.ri-delete-bin-2-line:before{content:\"\\ec1e\"}.ri-delete-bin-3-fill:before{content:\"\\ec1f\"}.ri-delete-bin-3-line:before{content:\"\\ec20\"}.ri-delete-bin-4-fill:before{content:\"\\ec21\"}.ri-delete-bin-4-line:before{content:\"\\ec22\"}.ri-delete-bin-5-fill:before{content:\"\\ec23\"}.ri-delete-bin-5-line:before{content:\"\\ec24\"}.ri-delete-bin-6-fill:before{content:\"\\ec25\"}.ri-delete-bin-6-line:before{content:\"\\ec26\"}.ri-delete-bin-7-fill:before{content:\"\\ec27\"}.ri-delete-bin-7-line:before{content:\"\\ec28\"}.ri-delete-bin-fill:before{content:\"\\ec29\"}.ri-delete-bin-line:before{content:\"\\ec2a\"}.ri-delete-column:before{content:\"\\ec2b\"}.ri-delete-row:before{content:\"\\ec2c\"}.ri-device-fill:before{content:\"\\ec2d\"}.ri-device-line:before{content:\"\\ec2e\"}.ri-device-recover-fill:before{content:\"\\ec2f\"}.ri-device-recover-line:before{content:\"\\ec30\"}.ri-dingding-fill:before{content:\"\\ec31\"}.ri-dingding-line:before{content:\"\\ec32\"}.ri-direction-fill:before{content:\"\\ec33\"}.ri-direction-line:before{content:\"\\ec34\"}.ri-disc-fill:before{content:\"\\ec35\"}.ri-disc-line:before{content:\"\\ec36\"}.ri-discord-fill:before{content:\"\\ec37\"}.ri-discord-line:before{content:\"\\ec38\"}.ri-discuss-fill:before{content:\"\\ec39\"}.ri-discuss-line:before{content:\"\\ec3a\"}.ri-dislike-fill:before{content:\"\\ec3b\"}.ri-dislike-line:before{content:\"\\ec3c\"}.ri-disqus-fill:before{content:\"\\ec3d\"}.ri-disqus-line:before{content:\"\\ec3e\"}.ri-divide-fill:before{content:\"\\ec3f\"}.ri-divide-line:before{content:\"\\ec40\"}.ri-donut-chart-fill:before{content:\"\\ec41\"}.ri-donut-chart-line:before{content:\"\\ec42\"}.ri-door-closed-fill:before{content:\"\\ec43\"}.ri-door-closed-line:before{content:\"\\ec44\"}.ri-door-fill:before{content:\"\\ec45\"}.ri-door-line:before{content:\"\\ec46\"}.ri-door-lock-box-fill:before{content:\"\\ec47\"}.ri-door-lock-box-line:before{content:\"\\ec48\"}.ri-door-lock-fill:before{content:\"\\ec49\"}.ri-door-lock-line:before{content:\"\\ec4a\"}.ri-door-open-fill:before{content:\"\\ec4b\"}.ri-door-open-line:before{content:\"\\ec4c\"}.ri-dossier-fill:before{content:\"\\ec4d\"}.ri-dossier-line:before{content:\"\\ec4e\"}.ri-douban-fill:before{content:\"\\ec4f\"}.ri-douban-line:before{content:\"\\ec50\"}.ri-double-quotes-l:before{content:\"\\ec51\"}.ri-double-quotes-r:before{content:\"\\ec52\"}.ri-download-2-fill:before{content:\"\\ec53\"}.ri-download-2-line:before{content:\"\\ec54\"}.ri-download-cloud-2-fill:before{content:\"\\ec55\"}.ri-download-cloud-2-line:before{content:\"\\ec56\"}.ri-download-cloud-fill:before{content:\"\\ec57\"}.ri-download-cloud-line:before{content:\"\\ec58\"}.ri-download-fill:before{content:\"\\ec59\"}.ri-download-line:before{content:\"\\ec5a\"}.ri-draft-fill:before{content:\"\\ec5b\"}.ri-draft-line:before{content:\"\\ec5c\"}.ri-drag-drop-fill:before{content:\"\\ec5d\"}.ri-drag-drop-line:before{content:\"\\ec5e\"}.ri-drag-move-2-fill:before{content:\"\\ec5f\"}.ri-drag-move-2-line:before{content:\"\\ec60\"}.ri-drag-move-fill:before{content:\"\\ec61\"}.ri-drag-move-line:before{content:\"\\ec62\"}.ri-dribbble-fill:before{content:\"\\ec63\"}.ri-dribbble-line:before{content:\"\\ec64\"}.ri-drive-fill:before{content:\"\\ec65\"}.ri-drive-line:before{content:\"\\ec66\"}.ri-drizzle-fill:before{content:\"\\ec67\"}.ri-drizzle-line:before{content:\"\\ec68\"}.ri-drop-fill:before{content:\"\\ec69\"}.ri-drop-line:before{content:\"\\ec6a\"}.ri-dropbox-fill:before{content:\"\\ec6b\"}.ri-dropbox-line:before{content:\"\\ec6c\"}.ri-dual-sim-1-fill:before{content:\"\\ec6d\"}.ri-dual-sim-1-line:before{content:\"\\ec6e\"}.ri-dual-sim-2-fill:before{content:\"\\ec6f\"}.ri-dual-sim-2-line:before{content:\"\\ec70\"}.ri-dv-fill:before{content:\"\\ec71\"}.ri-dv-line:before{content:\"\\ec72\"}.ri-dvd-fill:before{content:\"\\ec73\"}.ri-dvd-line:before{content:\"\\ec74\"}.ri-e-bike-2-fill:before{content:\"\\ec75\"}.ri-e-bike-2-line:before{content:\"\\ec76\"}.ri-e-bike-fill:before{content:\"\\ec77\"}.ri-e-bike-line:before{content:\"\\ec78\"}.ri-earth-fill:before{content:\"\\ec79\"}.ri-earth-line:before{content:\"\\ec7a\"}.ri-earthquake-fill:before{content:\"\\ec7b\"}.ri-earthquake-line:before{content:\"\\ec7c\"}.ri-edge-fill:before{content:\"\\ec7d\"}.ri-edge-line:before{content:\"\\ec7e\"}.ri-edit-2-fill:before{content:\"\\ec7f\"}.ri-edit-2-line:before{content:\"\\ec80\"}.ri-edit-box-fill:before{content:\"\\ec81\"}.ri-edit-box-line:before{content:\"\\ec82\"}.ri-edit-circle-fill:before{content:\"\\ec83\"}.ri-edit-circle-line:before{content:\"\\ec84\"}.ri-edit-fill:before{content:\"\\ec85\"}.ri-edit-line:before{content:\"\\ec86\"}.ri-eject-fill:before{content:\"\\ec87\"}.ri-eject-line:before{content:\"\\ec88\"}.ri-emotion-2-fill:before{content:\"\\ec89\"}.ri-emotion-2-line:before{content:\"\\ec8a\"}.ri-emotion-fill:before{content:\"\\ec8b\"}.ri-emotion-happy-fill:before{content:\"\\ec8c\"}.ri-emotion-happy-line:before{content:\"\\ec8d\"}.ri-emotion-laugh-fill:before{content:\"\\ec8e\"}.ri-emotion-laugh-line:before{content:\"\\ec8f\"}.ri-emotion-line:before{content:\"\\ec90\"}.ri-emotion-normal-fill:before{content:\"\\ec91\"}.ri-emotion-normal-line:before{content:\"\\ec92\"}.ri-emotion-sad-fill:before{content:\"\\ec93\"}.ri-emotion-sad-line:before{content:\"\\ec94\"}.ri-emotion-unhappy-fill:before{content:\"\\ec95\"}.ri-emotion-unhappy-line:before{content:\"\\ec96\"}.ri-empathize-fill:before{content:\"\\ec97\"}.ri-empathize-line:before{content:\"\\ec98\"}.ri-emphasis-cn:before{content:\"\\ec99\"}.ri-emphasis:before{content:\"\\ec9a\"}.ri-english-input:before{content:\"\\ec9b\"}.ri-equalizer-fill:before{content:\"\\ec9c\"}.ri-equalizer-line:before{content:\"\\ec9d\"}.ri-eraser-fill:before{content:\"\\ec9e\"}.ri-eraser-line:before{content:\"\\ec9f\"}.ri-error-warning-fill:before{content:\"\\eca0\"}.ri-error-warning-line:before{content:\"\\eca1\"}.ri-evernote-fill:before{content:\"\\eca2\"}.ri-evernote-line:before{content:\"\\eca3\"}.ri-exchange-box-fill:before{content:\"\\eca4\"}.ri-exchange-box-line:before{content:\"\\eca5\"}.ri-exchange-cny-fill:before{content:\"\\eca6\"}.ri-exchange-cny-line:before{content:\"\\eca7\"}.ri-exchange-dollar-fill:before{content:\"\\eca8\"}.ri-exchange-dollar-line:before{content:\"\\eca9\"}.ri-exchange-fill:before{content:\"\\ecaa\"}.ri-exchange-funds-fill:before{content:\"\\ecab\"}.ri-exchange-funds-line:before{content:\"\\ecac\"}.ri-exchange-line:before{content:\"\\ecad\"}.ri-external-link-fill:before{content:\"\\ecae\"}.ri-external-link-line:before{content:\"\\ecaf\"}.ri-eye-2-fill:before{content:\"\\ecb0\"}.ri-eye-2-line:before{content:\"\\ecb1\"}.ri-eye-close-fill:before{content:\"\\ecb2\"}.ri-eye-close-line:before{content:\"\\ecb3\"}.ri-eye-fill:before{content:\"\\ecb4\"}.ri-eye-line:before{content:\"\\ecb5\"}.ri-eye-off-fill:before{content:\"\\ecb6\"}.ri-eye-off-line:before{content:\"\\ecb7\"}.ri-facebook-box-fill:before{content:\"\\ecb8\"}.ri-facebook-box-line:before{content:\"\\ecb9\"}.ri-facebook-circle-fill:before{content:\"\\ecba\"}.ri-facebook-circle-line:before{content:\"\\ecbb\"}.ri-facebook-fill:before{content:\"\\ecbc\"}.ri-facebook-line:before{content:\"\\ecbd\"}.ri-fahrenheit-fill:before{content:\"\\ecbe\"}.ri-fahrenheit-line:before{content:\"\\ecbf\"}.ri-feedback-fill:before{content:\"\\ecc0\"}.ri-feedback-line:before{content:\"\\ecc1\"}.ri-file-2-fill:before{content:\"\\ecc2\"}.ri-file-2-line:before{content:\"\\ecc3\"}.ri-file-3-fill:before{content:\"\\ecc4\"}.ri-file-3-line:before{content:\"\\ecc5\"}.ri-file-4-fill:before{content:\"\\ecc6\"}.ri-file-4-line:before{content:\"\\ecc7\"}.ri-file-add-fill:before{content:\"\\ecc8\"}.ri-file-add-line:before{content:\"\\ecc9\"}.ri-file-chart-2-fill:before{content:\"\\ecca\"}.ri-file-chart-2-line:before{content:\"\\eccb\"}.ri-file-chart-fill:before{content:\"\\eccc\"}.ri-file-chart-line:before{content:\"\\eccd\"}.ri-file-cloud-fill:before{content:\"\\ecce\"}.ri-file-cloud-line:before{content:\"\\eccf\"}.ri-file-code-fill:before{content:\"\\ecd0\"}.ri-file-code-line:before{content:\"\\ecd1\"}.ri-file-copy-2-fill:before{content:\"\\ecd2\"}.ri-file-copy-2-line:before{content:\"\\ecd3\"}.ri-file-copy-fill:before{content:\"\\ecd4\"}.ri-file-copy-line:before{content:\"\\ecd5\"}.ri-file-damage-fill:before{content:\"\\ecd6\"}.ri-file-damage-line:before{content:\"\\ecd7\"}.ri-file-download-fill:before{content:\"\\ecd8\"}.ri-file-download-line:before{content:\"\\ecd9\"}.ri-file-edit-fill:before{content:\"\\ecda\"}.ri-file-edit-line:before{content:\"\\ecdb\"}.ri-file-excel-2-fill:before{content:\"\\ecdc\"}.ri-file-excel-2-line:before{content:\"\\ecdd\"}.ri-file-excel-fill:before{content:\"\\ecde\"}.ri-file-excel-line:before{content:\"\\ecdf\"}.ri-file-fill:before{content:\"\\ece0\"}.ri-file-forbid-fill:before{content:\"\\ece1\"}.ri-file-forbid-line:before{content:\"\\ece2\"}.ri-file-gif-fill:before{content:\"\\ece3\"}.ri-file-gif-line:before{content:\"\\ece4\"}.ri-file-history-fill:before{content:\"\\ece5\"}.ri-file-history-line:before{content:\"\\ece6\"}.ri-file-hwp-fill:before{content:\"\\ece7\"}.ri-file-hwp-line:before{content:\"\\ece8\"}.ri-file-info-fill:before{content:\"\\ece9\"}.ri-file-info-line:before{content:\"\\ecea\"}.ri-file-line:before{content:\"\\eceb\"}.ri-file-list-2-fill:before{content:\"\\ecec\"}.ri-file-list-2-line:before{content:\"\\eced\"}.ri-file-list-3-fill:before{content:\"\\ecee\"}.ri-file-list-3-line:before{content:\"\\ecef\"}.ri-file-list-fill:before{content:\"\\ecf0\"}.ri-file-list-line:before{content:\"\\ecf1\"}.ri-file-lock-fill:before{content:\"\\ecf2\"}.ri-file-lock-line:before{content:\"\\ecf3\"}.ri-file-mark-fill:before{content:\"\\ecf4\"}.ri-file-mark-line:before{content:\"\\ecf5\"}.ri-file-music-fill:before{content:\"\\ecf6\"}.ri-file-music-line:before{content:\"\\ecf7\"}.ri-file-paper-2-fill:before{content:\"\\ecf8\"}.ri-file-paper-2-line:before{content:\"\\ecf9\"}.ri-file-paper-fill:before{content:\"\\ecfa\"}.ri-file-paper-line:before{content:\"\\ecfb\"}.ri-file-pdf-fill:before{content:\"\\ecfc\"}.ri-file-pdf-line:before{content:\"\\ecfd\"}.ri-file-ppt-2-fill:before{content:\"\\ecfe\"}.ri-file-ppt-2-line:before{content:\"\\ecff\"}.ri-file-ppt-fill:before{content:\"\\ed00\"}.ri-file-ppt-line:before{content:\"\\ed01\"}.ri-file-reduce-fill:before{content:\"\\ed02\"}.ri-file-reduce-line:before{content:\"\\ed03\"}.ri-file-search-fill:before{content:\"\\ed04\"}.ri-file-search-line:before{content:\"\\ed05\"}.ri-file-settings-fill:before{content:\"\\ed06\"}.ri-file-settings-line:before{content:\"\\ed07\"}.ri-file-shield-2-fill:before{content:\"\\ed08\"}.ri-file-shield-2-line:before{content:\"\\ed09\"}.ri-file-shield-fill:before{content:\"\\ed0a\"}.ri-file-shield-line:before{content:\"\\ed0b\"}.ri-file-shred-fill:before{content:\"\\ed0c\"}.ri-file-shred-line:before{content:\"\\ed0d\"}.ri-file-text-fill:before{content:\"\\ed0e\"}.ri-file-text-line:before{content:\"\\ed0f\"}.ri-file-transfer-fill:before{content:\"\\ed10\"}.ri-file-transfer-line:before{content:\"\\ed11\"}.ri-file-unknow-fill:before{content:\"\\ed12\"}.ri-file-unknow-line:before{content:\"\\ed13\"}.ri-file-upload-fill:before{content:\"\\ed14\"}.ri-file-upload-line:before{content:\"\\ed15\"}.ri-file-user-fill:before{content:\"\\ed16\"}.ri-file-user-line:before{content:\"\\ed17\"}.ri-file-warning-fill:before{content:\"\\ed18\"}.ri-file-warning-line:before{content:\"\\ed19\"}.ri-file-word-2-fill:before{content:\"\\ed1a\"}.ri-file-word-2-line:before{content:\"\\ed1b\"}.ri-file-word-fill:before{content:\"\\ed1c\"}.ri-file-word-line:before{content:\"\\ed1d\"}.ri-file-zip-fill:before{content:\"\\ed1e\"}.ri-file-zip-line:before{content:\"\\ed1f\"}.ri-film-fill:before{content:\"\\ed20\"}.ri-film-line:before{content:\"\\ed21\"}.ri-filter-2-fill:before{content:\"\\ed22\"}.ri-filter-2-line:before{content:\"\\ed23\"}.ri-filter-3-fill:before{content:\"\\ed24\"}.ri-filter-3-line:before{content:\"\\ed25\"}.ri-filter-fill:before{content:\"\\ed26\"}.ri-filter-line:before{content:\"\\ed27\"}.ri-filter-off-fill:before{content:\"\\ed28\"}.ri-filter-off-line:before{content:\"\\ed29\"}.ri-find-replace-fill:before{content:\"\\ed2a\"}.ri-find-replace-line:before{content:\"\\ed2b\"}.ri-finder-fill:before{content:\"\\ed2c\"}.ri-finder-line:before{content:\"\\ed2d\"}.ri-fingerprint-2-fill:before{content:\"\\ed2e\"}.ri-fingerprint-2-line:before{content:\"\\ed2f\"}.ri-fingerprint-fill:before{content:\"\\ed30\"}.ri-fingerprint-line:before{content:\"\\ed31\"}.ri-fire-fill:before{content:\"\\ed32\"}.ri-fire-line:before{content:\"\\ed33\"}.ri-firefox-fill:before{content:\"\\ed34\"}.ri-firefox-line:before{content:\"\\ed35\"}.ri-first-aid-kit-fill:before{content:\"\\ed36\"}.ri-first-aid-kit-line:before{content:\"\\ed37\"}.ri-flag-2-fill:before{content:\"\\ed38\"}.ri-flag-2-line:before{content:\"\\ed39\"}.ri-flag-fill:before{content:\"\\ed3a\"}.ri-flag-line:before{content:\"\\ed3b\"}.ri-flashlight-fill:before{content:\"\\ed3c\"}.ri-flashlight-line:before{content:\"\\ed3d\"}.ri-flask-fill:before{content:\"\\ed3e\"}.ri-flask-line:before{content:\"\\ed3f\"}.ri-flight-land-fill:before{content:\"\\ed40\"}.ri-flight-land-line:before{content:\"\\ed41\"}.ri-flight-takeoff-fill:before{content:\"\\ed42\"}.ri-flight-takeoff-line:before{content:\"\\ed43\"}.ri-flood-fill:before{content:\"\\ed44\"}.ri-flood-line:before{content:\"\\ed45\"}.ri-flow-chart:before{content:\"\\ed46\"}.ri-flutter-fill:before{content:\"\\ed47\"}.ri-flutter-line:before{content:\"\\ed48\"}.ri-focus-2-fill:before{content:\"\\ed49\"}.ri-focus-2-line:before{content:\"\\ed4a\"}.ri-focus-3-fill:before{content:\"\\ed4b\"}.ri-focus-3-line:before{content:\"\\ed4c\"}.ri-focus-fill:before{content:\"\\ed4d\"}.ri-focus-line:before{content:\"\\ed4e\"}.ri-foggy-fill:before{content:\"\\ed4f\"}.ri-foggy-line:before{content:\"\\ed50\"}.ri-folder-2-fill:before{content:\"\\ed51\"}.ri-folder-2-line:before{content:\"\\ed52\"}.ri-folder-3-fill:before{content:\"\\ed53\"}.ri-folder-3-line:before{content:\"\\ed54\"}.ri-folder-4-fill:before{content:\"\\ed55\"}.ri-folder-4-line:before{content:\"\\ed56\"}.ri-folder-5-fill:before{content:\"\\ed57\"}.ri-folder-5-line:before{content:\"\\ed58\"}.ri-folder-add-fill:before{content:\"\\ed59\"}.ri-folder-add-line:before{content:\"\\ed5a\"}.ri-folder-chart-2-fill:before{content:\"\\ed5b\"}.ri-folder-chart-2-line:before{content:\"\\ed5c\"}.ri-folder-chart-fill:before{content:\"\\ed5d\"}.ri-folder-chart-line:before{content:\"\\ed5e\"}.ri-folder-download-fill:before{content:\"\\ed5f\"}.ri-folder-download-line:before{content:\"\\ed60\"}.ri-folder-fill:before{content:\"\\ed61\"}.ri-folder-forbid-fill:before{content:\"\\ed62\"}.ri-folder-forbid-line:before{content:\"\\ed63\"}.ri-folder-history-fill:before{content:\"\\ed64\"}.ri-folder-history-line:before{content:\"\\ed65\"}.ri-folder-info-fill:before{content:\"\\ed66\"}.ri-folder-info-line:before{content:\"\\ed67\"}.ri-folder-keyhole-fill:before{content:\"\\ed68\"}.ri-folder-keyhole-line:before{content:\"\\ed69\"}.ri-folder-line:before{content:\"\\ed6a\"}.ri-folder-lock-fill:before{content:\"\\ed6b\"}.ri-folder-lock-line:before{content:\"\\ed6c\"}.ri-folder-music-fill:before{content:\"\\ed6d\"}.ri-folder-music-line:before{content:\"\\ed6e\"}.ri-folder-open-fill:before{content:\"\\ed6f\"}.ri-folder-open-line:before{content:\"\\ed70\"}.ri-folder-received-fill:before{content:\"\\ed71\"}.ri-folder-received-line:before{content:\"\\ed72\"}.ri-folder-reduce-fill:before{content:\"\\ed73\"}.ri-folder-reduce-line:before{content:\"\\ed74\"}.ri-folder-settings-fill:before{content:\"\\ed75\"}.ri-folder-settings-line:before{content:\"\\ed76\"}.ri-folder-shared-fill:before{content:\"\\ed77\"}.ri-folder-shared-line:before{content:\"\\ed78\"}.ri-folder-shield-2-fill:before{content:\"\\ed79\"}.ri-folder-shield-2-line:before{content:\"\\ed7a\"}.ri-folder-shield-fill:before{content:\"\\ed7b\"}.ri-folder-shield-line:before{content:\"\\ed7c\"}.ri-folder-transfer-fill:before{content:\"\\ed7d\"}.ri-folder-transfer-line:before{content:\"\\ed7e\"}.ri-folder-unknow-fill:before{content:\"\\ed7f\"}.ri-folder-unknow-line:before{content:\"\\ed80\"}.ri-folder-upload-fill:before{content:\"\\ed81\"}.ri-folder-upload-line:before{content:\"\\ed82\"}.ri-folder-user-fill:before{content:\"\\ed83\"}.ri-folder-user-line:before{content:\"\\ed84\"}.ri-folder-warning-fill:before{content:\"\\ed85\"}.ri-folder-warning-line:before{content:\"\\ed86\"}.ri-folder-zip-fill:before{content:\"\\ed87\"}.ri-folder-zip-line:before{content:\"\\ed88\"}.ri-folders-fill:before{content:\"\\ed89\"}.ri-folders-line:before{content:\"\\ed8a\"}.ri-font-color:before{content:\"\\ed8b\"}.ri-font-size-2:before{content:\"\\ed8c\"}.ri-font-size:before{content:\"\\ed8d\"}.ri-football-fill:before{content:\"\\ed8e\"}.ri-football-line:before{content:\"\\ed8f\"}.ri-footprint-fill:before{content:\"\\ed90\"}.ri-footprint-line:before{content:\"\\ed91\"}.ri-forbid-2-fill:before{content:\"\\ed92\"}.ri-forbid-2-line:before{content:\"\\ed93\"}.ri-forbid-fill:before{content:\"\\ed94\"}.ri-forbid-line:before{content:\"\\ed95\"}.ri-format-clear:before{content:\"\\ed96\"}.ri-fridge-fill:before{content:\"\\ed97\"}.ri-fridge-line:before{content:\"\\ed98\"}.ri-fullscreen-exit-fill:before{content:\"\\ed99\"}.ri-fullscreen-exit-line:before{content:\"\\ed9a\"}.ri-fullscreen-fill:before{content:\"\\ed9b\"}.ri-fullscreen-line:before{content:\"\\ed9c\"}.ri-function-fill:before{content:\"\\ed9d\"}.ri-function-line:before{content:\"\\ed9e\"}.ri-functions:before{content:\"\\ed9f\"}.ri-funds-box-fill:before{content:\"\\eda0\"}.ri-funds-box-line:before{content:\"\\eda1\"}.ri-funds-fill:before{content:\"\\eda2\"}.ri-funds-line:before{content:\"\\eda3\"}.ri-gallery-fill:before{content:\"\\eda4\"}.ri-gallery-line:before{content:\"\\eda5\"}.ri-gallery-upload-fill:before{content:\"\\eda6\"}.ri-gallery-upload-line:before{content:\"\\eda7\"}.ri-game-fill:before{content:\"\\eda8\"}.ri-game-line:before{content:\"\\eda9\"}.ri-gamepad-fill:before{content:\"\\edaa\"}.ri-gamepad-line:before{content:\"\\edab\"}.ri-gas-station-fill:before{content:\"\\edac\"}.ri-gas-station-line:before{content:\"\\edad\"}.ri-gatsby-fill:before{content:\"\\edae\"}.ri-gatsby-line:before{content:\"\\edaf\"}.ri-genderless-fill:before{content:\"\\edb0\"}.ri-genderless-line:before{content:\"\\edb1\"}.ri-ghost-2-fill:before{content:\"\\edb2\"}.ri-ghost-2-line:before{content:\"\\edb3\"}.ri-ghost-fill:before{content:\"\\edb4\"}.ri-ghost-line:before{content:\"\\edb5\"}.ri-ghost-smile-fill:before{content:\"\\edb6\"}.ri-ghost-smile-line:before{content:\"\\edb7\"}.ri-gift-2-fill:before{content:\"\\edb8\"}.ri-gift-2-line:before{content:\"\\edb9\"}.ri-gift-fill:before{content:\"\\edba\"}.ri-gift-line:before{content:\"\\edbb\"}.ri-git-branch-fill:before{content:\"\\edbc\"}.ri-git-branch-line:before{content:\"\\edbd\"}.ri-git-commit-fill:before{content:\"\\edbe\"}.ri-git-commit-line:before{content:\"\\edbf\"}.ri-git-merge-fill:before{content:\"\\edc0\"}.ri-git-merge-line:before{content:\"\\edc1\"}.ri-git-pull-request-fill:before{content:\"\\edc2\"}.ri-git-pull-request-line:before{content:\"\\edc3\"}.ri-git-repository-commits-fill:before{content:\"\\edc4\"}.ri-git-repository-commits-line:before{content:\"\\edc5\"}.ri-git-repository-fill:before{content:\"\\edc6\"}.ri-git-repository-line:before{content:\"\\edc7\"}.ri-git-repository-private-fill:before{content:\"\\edc8\"}.ri-git-repository-private-line:before{content:\"\\edc9\"}.ri-github-fill:before{content:\"\\edca\"}.ri-github-line:before{content:\"\\edcb\"}.ri-gitlab-fill:before{content:\"\\edcc\"}.ri-gitlab-line:before{content:\"\\edcd\"}.ri-global-fill:before{content:\"\\edce\"}.ri-global-line:before{content:\"\\edcf\"}.ri-globe-fill:before{content:\"\\edd0\"}.ri-globe-line:before{content:\"\\edd1\"}.ri-goblet-fill:before{content:\"\\edd2\"}.ri-goblet-line:before{content:\"\\edd3\"}.ri-google-fill:before{content:\"\\edd4\"}.ri-google-line:before{content:\"\\edd5\"}.ri-google-play-fill:before{content:\"\\edd6\"}.ri-google-play-line:before{content:\"\\edd7\"}.ri-government-fill:before{content:\"\\edd8\"}.ri-government-line:before{content:\"\\edd9\"}.ri-gps-fill:before{content:\"\\edda\"}.ri-gps-line:before{content:\"\\eddb\"}.ri-gradienter-fill:before{content:\"\\eddc\"}.ri-gradienter-line:before{content:\"\\eddd\"}.ri-grid-fill:before{content:\"\\edde\"}.ri-grid-line:before{content:\"\\eddf\"}.ri-group-2-fill:before{content:\"\\ede0\"}.ri-group-2-line:before{content:\"\\ede1\"}.ri-group-fill:before{content:\"\\ede2\"}.ri-group-line:before{content:\"\\ede3\"}.ri-guide-fill:before{content:\"\\ede4\"}.ri-guide-line:before{content:\"\\ede5\"}.ri-h-1:before{content:\"\\ede6\"}.ri-h-2:before{content:\"\\ede7\"}.ri-h-3:before{content:\"\\ede8\"}.ri-h-4:before{content:\"\\ede9\"}.ri-h-5:before{content:\"\\edea\"}.ri-h-6:before{content:\"\\edeb\"}.ri-hail-fill:before{content:\"\\edec\"}.ri-hail-line:before{content:\"\\eded\"}.ri-hammer-fill:before{content:\"\\edee\"}.ri-hammer-line:before{content:\"\\edef\"}.ri-hand-coin-fill:before{content:\"\\edf0\"}.ri-hand-coin-line:before{content:\"\\edf1\"}.ri-hand-heart-fill:before{content:\"\\edf2\"}.ri-hand-heart-line:before{content:\"\\edf3\"}.ri-hand-sanitizer-fill:before{content:\"\\edf4\"}.ri-hand-sanitizer-line:before{content:\"\\edf5\"}.ri-handbag-fill:before{content:\"\\edf6\"}.ri-handbag-line:before{content:\"\\edf7\"}.ri-hard-drive-2-fill:before{content:\"\\edf8\"}.ri-hard-drive-2-line:before{content:\"\\edf9\"}.ri-hard-drive-fill:before{content:\"\\edfa\"}.ri-hard-drive-line:before{content:\"\\edfb\"}.ri-hashtag:before{content:\"\\edfc\"}.ri-haze-2-fill:before{content:\"\\edfd\"}.ri-haze-2-line:before{content:\"\\edfe\"}.ri-haze-fill:before{content:\"\\edff\"}.ri-haze-line:before{content:\"\\ee00\"}.ri-hd-fill:before{content:\"\\ee01\"}.ri-hd-line:before{content:\"\\ee02\"}.ri-heading:before{content:\"\\ee03\"}.ri-headphone-fill:before{content:\"\\ee04\"}.ri-headphone-line:before{content:\"\\ee05\"}.ri-health-book-fill:before{content:\"\\ee06\"}.ri-health-book-line:before{content:\"\\ee07\"}.ri-heart-2-fill:before{content:\"\\ee08\"}.ri-heart-2-line:before{content:\"\\ee09\"}.ri-heart-3-fill:before{content:\"\\ee0a\"}.ri-heart-3-line:before{content:\"\\ee0b\"}.ri-heart-add-fill:before{content:\"\\ee0c\"}.ri-heart-add-line:before{content:\"\\ee0d\"}.ri-heart-fill:before{content:\"\\ee0e\"}.ri-heart-line:before{content:\"\\ee0f\"}.ri-heart-pulse-fill:before{content:\"\\ee10\"}.ri-heart-pulse-line:before{content:\"\\ee11\"}.ri-hearts-fill:before{content:\"\\ee12\"}.ri-hearts-line:before{content:\"\\ee13\"}.ri-heavy-showers-fill:before{content:\"\\ee14\"}.ri-heavy-showers-line:before{content:\"\\ee15\"}.ri-history-fill:before{content:\"\\ee16\"}.ri-history-line:before{content:\"\\ee17\"}.ri-home-2-fill:before{content:\"\\ee18\"}.ri-home-2-line:before{content:\"\\ee19\"}.ri-home-3-fill:before{content:\"\\ee1a\"}.ri-home-3-line:before{content:\"\\ee1b\"}.ri-home-4-fill:before{content:\"\\ee1c\"}.ri-home-4-line:before{content:\"\\ee1d\"}.ri-home-5-fill:before{content:\"\\ee1e\"}.ri-home-5-line:before{content:\"\\ee1f\"}.ri-home-6-fill:before{content:\"\\ee20\"}.ri-home-6-line:before{content:\"\\ee21\"}.ri-home-7-fill:before{content:\"\\ee22\"}.ri-home-7-line:before{content:\"\\ee23\"}.ri-home-8-fill:before{content:\"\\ee24\"}.ri-home-8-line:before{content:\"\\ee25\"}.ri-home-fill:before{content:\"\\ee26\"}.ri-home-gear-fill:before{content:\"\\ee27\"}.ri-home-gear-line:before{content:\"\\ee28\"}.ri-home-heart-fill:before{content:\"\\ee29\"}.ri-home-heart-line:before{content:\"\\ee2a\"}.ri-home-line:before{content:\"\\ee2b\"}.ri-home-smile-2-fill:before{content:\"\\ee2c\"}.ri-home-smile-2-line:before{content:\"\\ee2d\"}.ri-home-smile-fill:before{content:\"\\ee2e\"}.ri-home-smile-line:before{content:\"\\ee2f\"}.ri-home-wifi-fill:before{content:\"\\ee30\"}.ri-home-wifi-line:before{content:\"\\ee31\"}.ri-honor-of-kings-fill:before{content:\"\\ee32\"}.ri-honor-of-kings-line:before{content:\"\\ee33\"}.ri-honour-fill:before{content:\"\\ee34\"}.ri-honour-line:before{content:\"\\ee35\"}.ri-hospital-fill:before{content:\"\\ee36\"}.ri-hospital-line:before{content:\"\\ee37\"}.ri-hotel-bed-fill:before{content:\"\\ee38\"}.ri-hotel-bed-line:before{content:\"\\ee39\"}.ri-hotel-fill:before{content:\"\\ee3a\"}.ri-hotel-line:before{content:\"\\ee3b\"}.ri-hotspot-fill:before{content:\"\\ee3c\"}.ri-hotspot-line:before{content:\"\\ee3d\"}.ri-hq-fill:before{content:\"\\ee3e\"}.ri-hq-line:before{content:\"\\ee3f\"}.ri-html5-fill:before{content:\"\\ee40\"}.ri-html5-line:before{content:\"\\ee41\"}.ri-ie-fill:before{content:\"\\ee42\"}.ri-ie-line:before{content:\"\\ee43\"}.ri-image-2-fill:before{content:\"\\ee44\"}.ri-image-2-line:before{content:\"\\ee45\"}.ri-image-add-fill:before{content:\"\\ee46\"}.ri-image-add-line:before{content:\"\\ee47\"}.ri-image-edit-fill:before{content:\"\\ee48\"}.ri-image-edit-line:before{content:\"\\ee49\"}.ri-image-fill:before{content:\"\\ee4a\"}.ri-image-line:before{content:\"\\ee4b\"}.ri-inbox-archive-fill:before{content:\"\\ee4c\"}.ri-inbox-archive-line:before{content:\"\\ee4d\"}.ri-inbox-fill:before{content:\"\\ee4e\"}.ri-inbox-line:before{content:\"\\ee4f\"}.ri-inbox-unarchive-fill:before{content:\"\\ee50\"}.ri-inbox-unarchive-line:before{content:\"\\ee51\"}.ri-increase-decrease-fill:before{content:\"\\ee52\"}.ri-increase-decrease-line:before{content:\"\\ee53\"}.ri-indent-decrease:before{content:\"\\ee54\"}.ri-indent-increase:before{content:\"\\ee55\"}.ri-indeterminate-circle-fill:before{content:\"\\ee56\"}.ri-indeterminate-circle-line:before{content:\"\\ee57\"}.ri-information-fill:before{content:\"\\ee58\"}.ri-information-line:before{content:\"\\ee59\"}.ri-infrared-thermometer-fill:before{content:\"\\ee5a\"}.ri-infrared-thermometer-line:before{content:\"\\ee5b\"}.ri-ink-bottle-fill:before{content:\"\\ee5c\"}.ri-ink-bottle-line:before{content:\"\\ee5d\"}.ri-input-cursor-move:before{content:\"\\ee5e\"}.ri-input-method-fill:before{content:\"\\ee5f\"}.ri-input-method-line:before{content:\"\\ee60\"}.ri-insert-column-left:before{content:\"\\ee61\"}.ri-insert-column-right:before{content:\"\\ee62\"}.ri-insert-row-bottom:before{content:\"\\ee63\"}.ri-insert-row-top:before{content:\"\\ee64\"}.ri-instagram-fill:before{content:\"\\ee65\"}.ri-instagram-line:before{content:\"\\ee66\"}.ri-install-fill:before{content:\"\\ee67\"}.ri-install-line:before{content:\"\\ee68\"}.ri-invision-fill:before{content:\"\\ee69\"}.ri-invision-line:before{content:\"\\ee6a\"}.ri-italic:before{content:\"\\ee6b\"}.ri-kakao-talk-fill:before{content:\"\\ee6c\"}.ri-kakao-talk-line:before{content:\"\\ee6d\"}.ri-key-2-fill:before{content:\"\\ee6e\"}.ri-key-2-line:before{content:\"\\ee6f\"}.ri-key-fill:before{content:\"\\ee70\"}.ri-key-line:before{content:\"\\ee71\"}.ri-keyboard-box-fill:before{content:\"\\ee72\"}.ri-keyboard-box-line:before{content:\"\\ee73\"}.ri-keyboard-fill:before{content:\"\\ee74\"}.ri-keyboard-line:before{content:\"\\ee75\"}.ri-keynote-fill:before{content:\"\\ee76\"}.ri-keynote-line:before{content:\"\\ee77\"}.ri-knife-blood-fill:before{content:\"\\ee78\"}.ri-knife-blood-line:before{content:\"\\ee79\"}.ri-knife-fill:before{content:\"\\ee7a\"}.ri-knife-line:before{content:\"\\ee7b\"}.ri-landscape-fill:before{content:\"\\ee7c\"}.ri-landscape-line:before{content:\"\\ee7d\"}.ri-layout-2-fill:before{content:\"\\ee7e\"}.ri-layout-2-line:before{content:\"\\ee7f\"}.ri-layout-3-fill:before{content:\"\\ee80\"}.ri-layout-3-line:before{content:\"\\ee81\"}.ri-layout-4-fill:before{content:\"\\ee82\"}.ri-layout-4-line:before{content:\"\\ee83\"}.ri-layout-5-fill:before{content:\"\\ee84\"}.ri-layout-5-line:before{content:\"\\ee85\"}.ri-layout-6-fill:before{content:\"\\ee86\"}.ri-layout-6-line:before{content:\"\\ee87\"}.ri-layout-bottom-2-fill:before{content:\"\\ee88\"}.ri-layout-bottom-2-line:before{content:\"\\ee89\"}.ri-layout-bottom-fill:before{content:\"\\ee8a\"}.ri-layout-bottom-line:before{content:\"\\ee8b\"}.ri-layout-column-fill:before{content:\"\\ee8c\"}.ri-layout-column-line:before{content:\"\\ee8d\"}.ri-layout-fill:before{content:\"\\ee8e\"}.ri-layout-grid-fill:before{content:\"\\ee8f\"}.ri-layout-grid-line:before{content:\"\\ee90\"}.ri-layout-left-2-fill:before{content:\"\\ee91\"}.ri-layout-left-2-line:before{content:\"\\ee92\"}.ri-layout-left-fill:before{content:\"\\ee93\"}.ri-layout-left-line:before{content:\"\\ee94\"}.ri-layout-line:before{content:\"\\ee95\"}.ri-layout-masonry-fill:before{content:\"\\ee96\"}.ri-layout-masonry-line:before{content:\"\\ee97\"}.ri-layout-right-2-fill:before{content:\"\\ee98\"}.ri-layout-right-2-line:before{content:\"\\ee99\"}.ri-layout-right-fill:before{content:\"\\ee9a\"}.ri-layout-right-line:before{content:\"\\ee9b\"}.ri-layout-row-fill:before{content:\"\\ee9c\"}.ri-layout-row-line:before{content:\"\\ee9d\"}.ri-layout-top-2-fill:before{content:\"\\ee9e\"}.ri-layout-top-2-line:before{content:\"\\ee9f\"}.ri-layout-top-fill:before{content:\"\\eea0\"}.ri-layout-top-line:before{content:\"\\eea1\"}.ri-leaf-fill:before{content:\"\\eea2\"}.ri-leaf-line:before{content:\"\\eea3\"}.ri-lifebuoy-fill:before{content:\"\\eea4\"}.ri-lifebuoy-line:before{content:\"\\eea5\"}.ri-lightbulb-fill:before{content:\"\\eea6\"}.ri-lightbulb-flash-fill:before{content:\"\\eea7\"}.ri-lightbulb-flash-line:before{content:\"\\eea8\"}.ri-lightbulb-line:before{content:\"\\eea9\"}.ri-line-chart-fill:before{content:\"\\eeaa\"}.ri-line-chart-line:before{content:\"\\eeab\"}.ri-line-fill:before{content:\"\\eeac\"}.ri-line-height:before{content:\"\\eead\"}.ri-line-line:before{content:\"\\eeae\"}.ri-link-m:before{content:\"\\eeaf\"}.ri-link-unlink-m:before{content:\"\\eeb0\"}.ri-link-unlink:before{content:\"\\eeb1\"}.ri-link:before{content:\"\\eeb2\"}.ri-linkedin-box-fill:before{content:\"\\eeb3\"}.ri-linkedin-box-line:before{content:\"\\eeb4\"}.ri-linkedin-fill:before{content:\"\\eeb5\"}.ri-linkedin-line:before{content:\"\\eeb6\"}.ri-links-fill:before{content:\"\\eeb7\"}.ri-links-line:before{content:\"\\eeb8\"}.ri-list-check-2:before{content:\"\\eeb9\"}.ri-list-check:before{content:\"\\eeba\"}.ri-list-ordered:before{content:\"\\eebb\"}.ri-list-settings-fill:before{content:\"\\eebc\"}.ri-list-settings-line:before{content:\"\\eebd\"}.ri-list-unordered:before{content:\"\\eebe\"}.ri-live-fill:before{content:\"\\eebf\"}.ri-live-line:before{content:\"\\eec0\"}.ri-loader-2-fill:before{content:\"\\eec1\"}.ri-loader-2-line:before{content:\"\\eec2\"}.ri-loader-3-fill:before{content:\"\\eec3\"}.ri-loader-3-line:before{content:\"\\eec4\"}.ri-loader-4-fill:before{content:\"\\eec5\"}.ri-loader-4-line:before{content:\"\\eec6\"}.ri-loader-5-fill:before{content:\"\\eec7\"}.ri-loader-5-line:before{content:\"\\eec8\"}.ri-loader-fill:before{content:\"\\eec9\"}.ri-loader-line:before{content:\"\\eeca\"}.ri-lock-2-fill:before{content:\"\\eecb\"}.ri-lock-2-line:before{content:\"\\eecc\"}.ri-lock-fill:before{content:\"\\eecd\"}.ri-lock-line:before{content:\"\\eece\"}.ri-lock-password-fill:before{content:\"\\eecf\"}.ri-lock-password-line:before{content:\"\\eed0\"}.ri-lock-unlock-fill:before{content:\"\\eed1\"}.ri-lock-unlock-line:before{content:\"\\eed2\"}.ri-login-box-fill:before{content:\"\\eed3\"}.ri-login-box-line:before{content:\"\\eed4\"}.ri-login-circle-fill:before{content:\"\\eed5\"}.ri-login-circle-line:before{content:\"\\eed6\"}.ri-logout-box-fill:before{content:\"\\eed7\"}.ri-logout-box-line:before{content:\"\\eed8\"}.ri-logout-box-r-fill:before{content:\"\\eed9\"}.ri-logout-box-r-line:before{content:\"\\eeda\"}.ri-logout-circle-fill:before{content:\"\\eedb\"}.ri-logout-circle-line:before{content:\"\\eedc\"}.ri-logout-circle-r-fill:before{content:\"\\eedd\"}.ri-logout-circle-r-line:before{content:\"\\eede\"}.ri-luggage-cart-fill:before{content:\"\\eedf\"}.ri-luggage-cart-line:before{content:\"\\eee0\"}.ri-luggage-deposit-fill:before{content:\"\\eee1\"}.ri-luggage-deposit-line:before{content:\"\\eee2\"}.ri-lungs-fill:before{content:\"\\eee3\"}.ri-lungs-line:before{content:\"\\eee4\"}.ri-mac-fill:before{content:\"\\eee5\"}.ri-mac-line:before{content:\"\\eee6\"}.ri-macbook-fill:before{content:\"\\eee7\"}.ri-macbook-line:before{content:\"\\eee8\"}.ri-magic-fill:before{content:\"\\eee9\"}.ri-magic-line:before{content:\"\\eeea\"}.ri-mail-add-fill:before{content:\"\\eeeb\"}.ri-mail-add-line:before{content:\"\\eeec\"}.ri-mail-check-fill:before{content:\"\\eeed\"}.ri-mail-check-line:before{content:\"\\eeee\"}.ri-mail-close-fill:before{content:\"\\eeef\"}.ri-mail-close-line:before{content:\"\\eef0\"}.ri-mail-download-fill:before{content:\"\\eef1\"}.ri-mail-download-line:before{content:\"\\eef2\"}.ri-mail-fill:before{content:\"\\eef3\"}.ri-mail-forbid-fill:before{content:\"\\eef4\"}.ri-mail-forbid-line:before{content:\"\\eef5\"}.ri-mail-line:before{content:\"\\eef6\"}.ri-mail-lock-fill:before{content:\"\\eef7\"}.ri-mail-lock-line:before{content:\"\\eef8\"}.ri-mail-open-fill:before{content:\"\\eef9\"}.ri-mail-open-line:before{content:\"\\eefa\"}.ri-mail-send-fill:before{content:\"\\eefb\"}.ri-mail-send-line:before{content:\"\\eefc\"}.ri-mail-settings-fill:before{content:\"\\eefd\"}.ri-mail-settings-line:before{content:\"\\eefe\"}.ri-mail-star-fill:before{content:\"\\eeff\"}.ri-mail-star-line:before{content:\"\\ef00\"}.ri-mail-unread-fill:before{content:\"\\ef01\"}.ri-mail-unread-line:before{content:\"\\ef02\"}.ri-mail-volume-fill:before{content:\"\\ef03\"}.ri-mail-volume-line:before{content:\"\\ef04\"}.ri-map-2-fill:before{content:\"\\ef05\"}.ri-map-2-line:before{content:\"\\ef06\"}.ri-map-fill:before{content:\"\\ef07\"}.ri-map-line:before{content:\"\\ef08\"}.ri-map-pin-2-fill:before{content:\"\\ef09\"}.ri-map-pin-2-line:before{content:\"\\ef0a\"}.ri-map-pin-3-fill:before{content:\"\\ef0b\"}.ri-map-pin-3-line:before{content:\"\\ef0c\"}.ri-map-pin-4-fill:before{content:\"\\ef0d\"}.ri-map-pin-4-line:before{content:\"\\ef0e\"}.ri-map-pin-5-fill:before{content:\"\\ef0f\"}.ri-map-pin-5-line:before{content:\"\\ef10\"}.ri-map-pin-add-fill:before{content:\"\\ef11\"}.ri-map-pin-add-line:before{content:\"\\ef12\"}.ri-map-pin-fill:before{content:\"\\ef13\"}.ri-map-pin-line:before{content:\"\\ef14\"}.ri-map-pin-range-fill:before{content:\"\\ef15\"}.ri-map-pin-range-line:before{content:\"\\ef16\"}.ri-map-pin-time-fill:before{content:\"\\ef17\"}.ri-map-pin-time-line:before{content:\"\\ef18\"}.ri-map-pin-user-fill:before{content:\"\\ef19\"}.ri-map-pin-user-line:before{content:\"\\ef1a\"}.ri-mark-pen-fill:before{content:\"\\ef1b\"}.ri-mark-pen-line:before{content:\"\\ef1c\"}.ri-markdown-fill:before{content:\"\\ef1d\"}.ri-markdown-line:before{content:\"\\ef1e\"}.ri-markup-fill:before{content:\"\\ef1f\"}.ri-markup-line:before{content:\"\\ef20\"}.ri-mastercard-fill:before{content:\"\\ef21\"}.ri-mastercard-line:before{content:\"\\ef22\"}.ri-mastodon-fill:before{content:\"\\ef23\"}.ri-mastodon-line:before{content:\"\\ef24\"}.ri-medal-2-fill:before{content:\"\\ef25\"}.ri-medal-2-line:before{content:\"\\ef26\"}.ri-medal-fill:before{content:\"\\ef27\"}.ri-medal-line:before{content:\"\\ef28\"}.ri-medicine-bottle-fill:before{content:\"\\ef29\"}.ri-medicine-bottle-line:before{content:\"\\ef2a\"}.ri-medium-fill:before{content:\"\\ef2b\"}.ri-medium-line:before{content:\"\\ef2c\"}.ri-men-fill:before{content:\"\\ef2d\"}.ri-men-line:before{content:\"\\ef2e\"}.ri-mental-health-fill:before{content:\"\\ef2f\"}.ri-mental-health-line:before{content:\"\\ef30\"}.ri-menu-2-fill:before{content:\"\\ef31\"}.ri-menu-2-line:before{content:\"\\ef32\"}.ri-menu-3-fill:before{content:\"\\ef33\"}.ri-menu-3-line:before{content:\"\\ef34\"}.ri-menu-4-fill:before{content:\"\\ef35\"}.ri-menu-4-line:before{content:\"\\ef36\"}.ri-menu-5-fill:before{content:\"\\ef37\"}.ri-menu-5-line:before{content:\"\\ef38\"}.ri-menu-add-fill:before{content:\"\\ef39\"}.ri-menu-add-line:before{content:\"\\ef3a\"}.ri-menu-fill:before{content:\"\\ef3b\"}.ri-menu-fold-fill:before{content:\"\\ef3c\"}.ri-menu-fold-line:before{content:\"\\ef3d\"}.ri-menu-line:before{content:\"\\ef3e\"}.ri-menu-unfold-fill:before{content:\"\\ef3f\"}.ri-menu-unfold-line:before{content:\"\\ef40\"}.ri-merge-cells-horizontal:before{content:\"\\ef41\"}.ri-merge-cells-vertical:before{content:\"\\ef42\"}.ri-message-2-fill:before{content:\"\\ef43\"}.ri-message-2-line:before{content:\"\\ef44\"}.ri-message-3-fill:before{content:\"\\ef45\"}.ri-message-3-line:before{content:\"\\ef46\"}.ri-message-fill:before{content:\"\\ef47\"}.ri-message-line:before{content:\"\\ef48\"}.ri-messenger-fill:before{content:\"\\ef49\"}.ri-messenger-line:before{content:\"\\ef4a\"}.ri-meteor-fill:before{content:\"\\ef4b\"}.ri-meteor-line:before{content:\"\\ef4c\"}.ri-mic-2-fill:before{content:\"\\ef4d\"}.ri-mic-2-line:before{content:\"\\ef4e\"}.ri-mic-fill:before{content:\"\\ef4f\"}.ri-mic-line:before{content:\"\\ef50\"}.ri-mic-off-fill:before{content:\"\\ef51\"}.ri-mic-off-line:before{content:\"\\ef52\"}.ri-mickey-fill:before{content:\"\\ef53\"}.ri-mickey-line:before{content:\"\\ef54\"}.ri-microscope-fill:before{content:\"\\ef55\"}.ri-microscope-line:before{content:\"\\ef56\"}.ri-microsoft-fill:before{content:\"\\ef57\"}.ri-microsoft-line:before{content:\"\\ef58\"}.ri-mind-map:before{content:\"\\ef59\"}.ri-mini-program-fill:before{content:\"\\ef5a\"}.ri-mini-program-line:before{content:\"\\ef5b\"}.ri-mist-fill:before{content:\"\\ef5c\"}.ri-mist-line:before{content:\"\\ef5d\"}.ri-money-cny-box-fill:before{content:\"\\ef5e\"}.ri-money-cny-box-line:before{content:\"\\ef5f\"}.ri-money-cny-circle-fill:before{content:\"\\ef60\"}.ri-money-cny-circle-line:before{content:\"\\ef61\"}.ri-money-dollar-box-fill:before{content:\"\\ef62\"}.ri-money-dollar-box-line:before{content:\"\\ef63\"}.ri-money-dollar-circle-fill:before{content:\"\\ef64\"}.ri-money-dollar-circle-line:before{content:\"\\ef65\"}.ri-money-euro-box-fill:before{content:\"\\ef66\"}.ri-money-euro-box-line:before{content:\"\\ef67\"}.ri-money-euro-circle-fill:before{content:\"\\ef68\"}.ri-money-euro-circle-line:before{content:\"\\ef69\"}.ri-money-pound-box-fill:before{content:\"\\ef6a\"}.ri-money-pound-box-line:before{content:\"\\ef6b\"}.ri-money-pound-circle-fill:before{content:\"\\ef6c\"}.ri-money-pound-circle-line:before{content:\"\\ef6d\"}.ri-moon-clear-fill:before{content:\"\\ef6e\"}.ri-moon-clear-line:before{content:\"\\ef6f\"}.ri-moon-cloudy-fill:before{content:\"\\ef70\"}.ri-moon-cloudy-line:before{content:\"\\ef71\"}.ri-moon-fill:before{content:\"\\ef72\"}.ri-moon-foggy-fill:before{content:\"\\ef73\"}.ri-moon-foggy-line:before{content:\"\\ef74\"}.ri-moon-line:before{content:\"\\ef75\"}.ri-more-2-fill:before{content:\"\\ef76\"}.ri-more-2-line:before{content:\"\\ef77\"}.ri-more-fill:before{content:\"\\ef78\"}.ri-more-line:before{content:\"\\ef79\"}.ri-motorbike-fill:before{content:\"\\ef7a\"}.ri-motorbike-line:before{content:\"\\ef7b\"}.ri-mouse-fill:before{content:\"\\ef7c\"}.ri-mouse-line:before{content:\"\\ef7d\"}.ri-movie-2-fill:before{content:\"\\ef7e\"}.ri-movie-2-line:before{content:\"\\ef7f\"}.ri-movie-fill:before{content:\"\\ef80\"}.ri-movie-line:before{content:\"\\ef81\"}.ri-music-2-fill:before{content:\"\\ef82\"}.ri-music-2-line:before{content:\"\\ef83\"}.ri-music-fill:before{content:\"\\ef84\"}.ri-music-line:before{content:\"\\ef85\"}.ri-mv-fill:before{content:\"\\ef86\"}.ri-mv-line:before{content:\"\\ef87\"}.ri-navigation-fill:before{content:\"\\ef88\"}.ri-navigation-line:before{content:\"\\ef89\"}.ri-netease-cloud-music-fill:before{content:\"\\ef8a\"}.ri-netease-cloud-music-line:before{content:\"\\ef8b\"}.ri-netflix-fill:before{content:\"\\ef8c\"}.ri-netflix-line:before{content:\"\\ef8d\"}.ri-newspaper-fill:before{content:\"\\ef8e\"}.ri-newspaper-line:before{content:\"\\ef8f\"}.ri-node-tree:before{content:\"\\ef90\"}.ri-notification-2-fill:before{content:\"\\ef91\"}.ri-notification-2-line:before{content:\"\\ef92\"}.ri-notification-3-fill:before{content:\"\\ef93\"}.ri-notification-3-line:before{content:\"\\ef94\"}.ri-notification-4-fill:before{content:\"\\ef95\"}.ri-notification-4-line:before{content:\"\\ef96\"}.ri-notification-badge-fill:before{content:\"\\ef97\"}.ri-notification-badge-line:before{content:\"\\ef98\"}.ri-notification-fill:before{content:\"\\ef99\"}.ri-notification-line:before{content:\"\\ef9a\"}.ri-notification-off-fill:before{content:\"\\ef9b\"}.ri-notification-off-line:before{content:\"\\ef9c\"}.ri-npmjs-fill:before{content:\"\\ef9d\"}.ri-npmjs-line:before{content:\"\\ef9e\"}.ri-number-0:before{content:\"\\ef9f\"}.ri-number-1:before{content:\"\\efa0\"}.ri-number-2:before{content:\"\\efa1\"}.ri-number-3:before{content:\"\\efa2\"}.ri-number-4:before{content:\"\\efa3\"}.ri-number-5:before{content:\"\\efa4\"}.ri-number-6:before{content:\"\\efa5\"}.ri-number-7:before{content:\"\\efa6\"}.ri-number-8:before{content:\"\\efa7\"}.ri-number-9:before{content:\"\\efa8\"}.ri-numbers-fill:before{content:\"\\efa9\"}.ri-numbers-line:before{content:\"\\efaa\"}.ri-nurse-fill:before{content:\"\\efab\"}.ri-nurse-line:before{content:\"\\efac\"}.ri-oil-fill:before{content:\"\\efad\"}.ri-oil-line:before{content:\"\\efae\"}.ri-omega:before{content:\"\\efaf\"}.ri-open-arm-fill:before{content:\"\\efb0\"}.ri-open-arm-line:before{content:\"\\efb1\"}.ri-open-source-fill:before{content:\"\\efb2\"}.ri-open-source-line:before{content:\"\\efb3\"}.ri-opera-fill:before{content:\"\\efb4\"}.ri-opera-line:before{content:\"\\efb5\"}.ri-order-play-fill:before{content:\"\\efb6\"}.ri-order-play-line:before{content:\"\\efb7\"}.ri-organization-chart:before{content:\"\\efb8\"}.ri-outlet-2-fill:before{content:\"\\efb9\"}.ri-outlet-2-line:before{content:\"\\efba\"}.ri-outlet-fill:before{content:\"\\efbb\"}.ri-outlet-line:before{content:\"\\efbc\"}.ri-page-separator:before{content:\"\\efbd\"}.ri-pages-fill:before{content:\"\\efbe\"}.ri-pages-line:before{content:\"\\efbf\"}.ri-paint-brush-fill:before{content:\"\\efc0\"}.ri-paint-brush-line:before{content:\"\\efc1\"}.ri-paint-fill:before{content:\"\\efc2\"}.ri-paint-line:before{content:\"\\efc3\"}.ri-palette-fill:before{content:\"\\efc4\"}.ri-palette-line:before{content:\"\\efc5\"}.ri-pantone-fill:before{content:\"\\efc6\"}.ri-pantone-line:before{content:\"\\efc7\"}.ri-paragraph:before{content:\"\\efc8\"}.ri-parent-fill:before{content:\"\\efc9\"}.ri-parent-line:before{content:\"\\efca\"}.ri-parentheses-fill:before{content:\"\\efcb\"}.ri-parentheses-line:before{content:\"\\efcc\"}.ri-parking-box-fill:before{content:\"\\efcd\"}.ri-parking-box-line:before{content:\"\\efce\"}.ri-parking-fill:before{content:\"\\efcf\"}.ri-parking-line:before{content:\"\\efd0\"}.ri-passport-fill:before{content:\"\\efd1\"}.ri-passport-line:before{content:\"\\efd2\"}.ri-patreon-fill:before{content:\"\\efd3\"}.ri-patreon-line:before{content:\"\\efd4\"}.ri-pause-circle-fill:before{content:\"\\efd5\"}.ri-pause-circle-line:before{content:\"\\efd6\"}.ri-pause-fill:before{content:\"\\efd7\"}.ri-pause-line:before{content:\"\\efd8\"}.ri-pause-mini-fill:before{content:\"\\efd9\"}.ri-pause-mini-line:before{content:\"\\efda\"}.ri-paypal-fill:before{content:\"\\efdb\"}.ri-paypal-line:before{content:\"\\efdc\"}.ri-pen-nib-fill:before{content:\"\\efdd\"}.ri-pen-nib-line:before{content:\"\\efde\"}.ri-pencil-fill:before{content:\"\\efdf\"}.ri-pencil-line:before{content:\"\\efe0\"}.ri-pencil-ruler-2-fill:before{content:\"\\efe1\"}.ri-pencil-ruler-2-line:before{content:\"\\efe2\"}.ri-pencil-ruler-fill:before{content:\"\\efe3\"}.ri-pencil-ruler-line:before{content:\"\\efe4\"}.ri-percent-fill:before{content:\"\\efe5\"}.ri-percent-line:before{content:\"\\efe6\"}.ri-phone-camera-fill:before{content:\"\\efe7\"}.ri-phone-camera-line:before{content:\"\\efe8\"}.ri-phone-fill:before{content:\"\\efe9\"}.ri-phone-find-fill:before{content:\"\\efea\"}.ri-phone-find-line:before{content:\"\\efeb\"}.ri-phone-line:before{content:\"\\efec\"}.ri-phone-lock-fill:before{content:\"\\efed\"}.ri-phone-lock-line:before{content:\"\\efee\"}.ri-picture-in-picture-2-fill:before{content:\"\\efef\"}.ri-picture-in-picture-2-line:before{content:\"\\eff0\"}.ri-picture-in-picture-exit-fill:before{content:\"\\eff1\"}.ri-picture-in-picture-exit-line:before{content:\"\\eff2\"}.ri-picture-in-picture-fill:before{content:\"\\eff3\"}.ri-picture-in-picture-line:before{content:\"\\eff4\"}.ri-pie-chart-2-fill:before{content:\"\\eff5\"}.ri-pie-chart-2-line:before{content:\"\\eff6\"}.ri-pie-chart-box-fill:before{content:\"\\eff7\"}.ri-pie-chart-box-line:before{content:\"\\eff8\"}.ri-pie-chart-fill:before{content:\"\\eff9\"}.ri-pie-chart-line:before{content:\"\\effa\"}.ri-pin-distance-fill:before{content:\"\\effb\"}.ri-pin-distance-line:before{content:\"\\effc\"}.ri-ping-pong-fill:before{content:\"\\effd\"}.ri-ping-pong-line:before{content:\"\\effe\"}.ri-pinterest-fill:before{content:\"\\efff\"}.ri-pinterest-line:before{content:\"\\f000\"}.ri-pinyin-input:before{content:\"\\f001\"}.ri-pixelfed-fill:before{content:\"\\f002\"}.ri-pixelfed-line:before{content:\"\\f003\"}.ri-plane-fill:before{content:\"\\f004\"}.ri-plane-line:before{content:\"\\f005\"}.ri-plant-fill:before{content:\"\\f006\"}.ri-plant-line:before{content:\"\\f007\"}.ri-play-circle-fill:before{content:\"\\f008\"}.ri-play-circle-line:before{content:\"\\f009\"}.ri-play-fill:before{content:\"\\f00a\"}.ri-play-line:before{content:\"\\f00b\"}.ri-play-list-2-fill:before{content:\"\\f00c\"}.ri-play-list-2-line:before{content:\"\\f00d\"}.ri-play-list-add-fill:before{content:\"\\f00e\"}.ri-play-list-add-line:before{content:\"\\f00f\"}.ri-play-list-fill:before{content:\"\\f010\"}.ri-play-list-line:before{content:\"\\f011\"}.ri-play-mini-fill:before{content:\"\\f012\"}.ri-play-mini-line:before{content:\"\\f013\"}.ri-playstation-fill:before{content:\"\\f014\"}.ri-playstation-line:before{content:\"\\f015\"}.ri-plug-2-fill:before{content:\"\\f016\"}.ri-plug-2-line:before{content:\"\\f017\"}.ri-plug-fill:before{content:\"\\f018\"}.ri-plug-line:before{content:\"\\f019\"}.ri-polaroid-2-fill:before{content:\"\\f01a\"}.ri-polaroid-2-line:before{content:\"\\f01b\"}.ri-polaroid-fill:before{content:\"\\f01c\"}.ri-polaroid-line:before{content:\"\\f01d\"}.ri-police-car-fill:before{content:\"\\f01e\"}.ri-police-car-line:before{content:\"\\f01f\"}.ri-price-tag-2-fill:before{content:\"\\f020\"}.ri-price-tag-2-line:before{content:\"\\f021\"}.ri-price-tag-3-fill:before{content:\"\\f022\"}.ri-price-tag-3-line:before{content:\"\\f023\"}.ri-price-tag-fill:before{content:\"\\f024\"}.ri-price-tag-line:before{content:\"\\f025\"}.ri-printer-cloud-fill:before{content:\"\\f026\"}.ri-printer-cloud-line:before{content:\"\\f027\"}.ri-printer-fill:before{content:\"\\f028\"}.ri-printer-line:before{content:\"\\f029\"}.ri-product-hunt-fill:before{content:\"\\f02a\"}.ri-product-hunt-line:before{content:\"\\f02b\"}.ri-profile-fill:before{content:\"\\f02c\"}.ri-profile-line:before{content:\"\\f02d\"}.ri-projector-2-fill:before{content:\"\\f02e\"}.ri-projector-2-line:before{content:\"\\f02f\"}.ri-projector-fill:before{content:\"\\f030\"}.ri-projector-line:before{content:\"\\f031\"}.ri-psychotherapy-fill:before{content:\"\\f032\"}.ri-psychotherapy-line:before{content:\"\\f033\"}.ri-pulse-fill:before{content:\"\\f034\"}.ri-pulse-line:before{content:\"\\f035\"}.ri-pushpin-2-fill:before{content:\"\\f036\"}.ri-pushpin-2-line:before{content:\"\\f037\"}.ri-pushpin-fill:before{content:\"\\f038\"}.ri-pushpin-line:before{content:\"\\f039\"}.ri-qq-fill:before{content:\"\\f03a\"}.ri-qq-line:before{content:\"\\f03b\"}.ri-qr-code-fill:before{content:\"\\f03c\"}.ri-qr-code-line:before{content:\"\\f03d\"}.ri-qr-scan-2-fill:before{content:\"\\f03e\"}.ri-qr-scan-2-line:before{content:\"\\f03f\"}.ri-qr-scan-fill:before{content:\"\\f040\"}.ri-qr-scan-line:before{content:\"\\f041\"}.ri-question-answer-fill:before{content:\"\\f042\"}.ri-question-answer-line:before{content:\"\\f043\"}.ri-question-fill:before{content:\"\\f044\"}.ri-question-line:before{content:\"\\f045\"}.ri-question-mark:before{content:\"\\f046\"}.ri-questionnaire-fill:before{content:\"\\f047\"}.ri-questionnaire-line:before{content:\"\\f048\"}.ri-quill-pen-fill:before{content:\"\\f049\"}.ri-quill-pen-line:before{content:\"\\f04a\"}.ri-radar-fill:before{content:\"\\f04b\"}.ri-radar-line:before{content:\"\\f04c\"}.ri-radio-2-fill:before{content:\"\\f04d\"}.ri-radio-2-line:before{content:\"\\f04e\"}.ri-radio-button-fill:before{content:\"\\f04f\"}.ri-radio-button-line:before{content:\"\\f050\"}.ri-radio-fill:before{content:\"\\f051\"}.ri-radio-line:before{content:\"\\f052\"}.ri-rainbow-fill:before{content:\"\\f053\"}.ri-rainbow-line:before{content:\"\\f054\"}.ri-rainy-fill:before{content:\"\\f055\"}.ri-rainy-line:before{content:\"\\f056\"}.ri-reactjs-fill:before{content:\"\\f057\"}.ri-reactjs-line:before{content:\"\\f058\"}.ri-record-circle-fill:before{content:\"\\f059\"}.ri-record-circle-line:before{content:\"\\f05a\"}.ri-record-mail-fill:before{content:\"\\f05b\"}.ri-record-mail-line:before{content:\"\\f05c\"}.ri-recycle-fill:before{content:\"\\f05d\"}.ri-recycle-line:before{content:\"\\f05e\"}.ri-red-packet-fill:before{content:\"\\f05f\"}.ri-red-packet-line:before{content:\"\\f060\"}.ri-reddit-fill:before{content:\"\\f061\"}.ri-reddit-line:before{content:\"\\f062\"}.ri-refresh-fill:before{content:\"\\f063\"}.ri-refresh-line:before{content:\"\\f064\"}.ri-refund-2-fill:before{content:\"\\f065\"}.ri-refund-2-line:before{content:\"\\f066\"}.ri-refund-fill:before{content:\"\\f067\"}.ri-refund-line:before{content:\"\\f068\"}.ri-registered-fill:before{content:\"\\f069\"}.ri-registered-line:before{content:\"\\f06a\"}.ri-remixicon-fill:before{content:\"\\f06b\"}.ri-remixicon-line:before{content:\"\\f06c\"}.ri-remote-control-2-fill:before{content:\"\\f06d\"}.ri-remote-control-2-line:before{content:\"\\f06e\"}.ri-remote-control-fill:before{content:\"\\f06f\"}.ri-remote-control-line:before{content:\"\\f070\"}.ri-repeat-2-fill:before{content:\"\\f071\"}.ri-repeat-2-line:before{content:\"\\f072\"}.ri-repeat-fill:before{content:\"\\f073\"}.ri-repeat-line:before{content:\"\\f074\"}.ri-repeat-one-fill:before{content:\"\\f075\"}.ri-repeat-one-line:before{content:\"\\f076\"}.ri-reply-all-fill:before{content:\"\\f077\"}.ri-reply-all-line:before{content:\"\\f078\"}.ri-reply-fill:before{content:\"\\f079\"}.ri-reply-line:before{content:\"\\f07a\"}.ri-reserved-fill:before{content:\"\\f07b\"}.ri-reserved-line:before{content:\"\\f07c\"}.ri-rest-time-fill:before{content:\"\\f07d\"}.ri-rest-time-line:before{content:\"\\f07e\"}.ri-restart-fill:before{content:\"\\f07f\"}.ri-restart-line:before{content:\"\\f080\"}.ri-restaurant-2-fill:before{content:\"\\f081\"}.ri-restaurant-2-line:before{content:\"\\f082\"}.ri-restaurant-fill:before{content:\"\\f083\"}.ri-restaurant-line:before{content:\"\\f084\"}.ri-rewind-fill:before{content:\"\\f085\"}.ri-rewind-line:before{content:\"\\f086\"}.ri-rewind-mini-fill:before{content:\"\\f087\"}.ri-rewind-mini-line:before{content:\"\\f088\"}.ri-rhythm-fill:before{content:\"\\f089\"}.ri-rhythm-line:before{content:\"\\f08a\"}.ri-riding-fill:before{content:\"\\f08b\"}.ri-riding-line:before{content:\"\\f08c\"}.ri-road-map-fill:before{content:\"\\f08d\"}.ri-road-map-line:before{content:\"\\f08e\"}.ri-roadster-fill:before{content:\"\\f08f\"}.ri-roadster-line:before{content:\"\\f090\"}.ri-robot-fill:before{content:\"\\f091\"}.ri-robot-line:before{content:\"\\f092\"}.ri-rocket-2-fill:before{content:\"\\f093\"}.ri-rocket-2-line:before{content:\"\\f094\"}.ri-rocket-fill:before{content:\"\\f095\"}.ri-rocket-line:before{content:\"\\f096\"}.ri-rotate-lock-fill:before{content:\"\\f097\"}.ri-rotate-lock-line:before{content:\"\\f098\"}.ri-rounded-corner:before{content:\"\\f099\"}.ri-route-fill:before{content:\"\\f09a\"}.ri-route-line:before{content:\"\\f09b\"}.ri-router-fill:before{content:\"\\f09c\"}.ri-router-line:before{content:\"\\f09d\"}.ri-rss-fill:before{content:\"\\f09e\"}.ri-rss-line:before{content:\"\\f09f\"}.ri-ruler-2-fill:before{content:\"\\f0a0\"}.ri-ruler-2-line:before{content:\"\\f0a1\"}.ri-ruler-fill:before{content:\"\\f0a2\"}.ri-ruler-line:before{content:\"\\f0a3\"}.ri-run-fill:before{content:\"\\f0a4\"}.ri-run-line:before{content:\"\\f0a5\"}.ri-safari-fill:before{content:\"\\f0a6\"}.ri-safari-line:before{content:\"\\f0a7\"}.ri-safe-2-fill:before{content:\"\\f0a8\"}.ri-safe-2-line:before{content:\"\\f0a9\"}.ri-safe-fill:before{content:\"\\f0aa\"}.ri-safe-line:before{content:\"\\f0ab\"}.ri-sailboat-fill:before{content:\"\\f0ac\"}.ri-sailboat-line:before{content:\"\\f0ad\"}.ri-save-2-fill:before{content:\"\\f0ae\"}.ri-save-2-line:before{content:\"\\f0af\"}.ri-save-3-fill:before{content:\"\\f0b0\"}.ri-save-3-line:before{content:\"\\f0b1\"}.ri-save-fill:before{content:\"\\f0b2\"}.ri-save-line:before{content:\"\\f0b3\"}.ri-scales-2-fill:before{content:\"\\f0b4\"}.ri-scales-2-line:before{content:\"\\f0b5\"}.ri-scales-3-fill:before{content:\"\\f0b6\"}.ri-scales-3-line:before{content:\"\\f0b7\"}.ri-scales-fill:before{content:\"\\f0b8\"}.ri-scales-line:before{content:\"\\f0b9\"}.ri-scan-2-fill:before{content:\"\\f0ba\"}.ri-scan-2-line:before{content:\"\\f0bb\"}.ri-scan-fill:before{content:\"\\f0bc\"}.ri-scan-line:before{content:\"\\f0bd\"}.ri-scissors-2-fill:before{content:\"\\f0be\"}.ri-scissors-2-line:before{content:\"\\f0bf\"}.ri-scissors-cut-fill:before{content:\"\\f0c0\"}.ri-scissors-cut-line:before{content:\"\\f0c1\"}.ri-scissors-fill:before{content:\"\\f0c2\"}.ri-scissors-line:before{content:\"\\f0c3\"}.ri-screenshot-2-fill:before{content:\"\\f0c4\"}.ri-screenshot-2-line:before{content:\"\\f0c5\"}.ri-screenshot-fill:before{content:\"\\f0c6\"}.ri-screenshot-line:before{content:\"\\f0c7\"}.ri-sd-card-fill:before{content:\"\\f0c8\"}.ri-sd-card-line:before{content:\"\\f0c9\"}.ri-sd-card-mini-fill:before{content:\"\\f0ca\"}.ri-sd-card-mini-line:before{content:\"\\f0cb\"}.ri-search-2-fill:before{content:\"\\f0cc\"}.ri-search-2-line:before{content:\"\\f0cd\"}.ri-search-eye-fill:before{content:\"\\f0ce\"}.ri-search-eye-line:before{content:\"\\f0cf\"}.ri-search-fill:before{content:\"\\f0d0\"}.ri-search-line:before{content:\"\\f0d1\"}.ri-secure-payment-fill:before{content:\"\\f0d2\"}.ri-secure-payment-line:before{content:\"\\f0d3\"}.ri-seedling-fill:before{content:\"\\f0d4\"}.ri-seedling-line:before{content:\"\\f0d5\"}.ri-send-backward:before{content:\"\\f0d6\"}.ri-send-plane-2-fill:before{content:\"\\f0d7\"}.ri-send-plane-2-line:before{content:\"\\f0d8\"}.ri-send-plane-fill:before{content:\"\\f0d9\"}.ri-send-plane-line:before{content:\"\\f0da\"}.ri-send-to-back:before{content:\"\\f0db\"}.ri-sensor-fill:before{content:\"\\f0dc\"}.ri-sensor-line:before{content:\"\\f0dd\"}.ri-separator:before{content:\"\\f0de\"}.ri-server-fill:before{content:\"\\f0df\"}.ri-server-line:before{content:\"\\f0e0\"}.ri-service-fill:before{content:\"\\f0e1\"}.ri-service-line:before{content:\"\\f0e2\"}.ri-settings-2-fill:before{content:\"\\f0e3\"}.ri-settings-2-line:before{content:\"\\f0e4\"}.ri-settings-3-fill:before{content:\"\\f0e5\"}.ri-settings-3-line:before{content:\"\\f0e6\"}.ri-settings-4-fill:before{content:\"\\f0e7\"}.ri-settings-4-line:before{content:\"\\f0e8\"}.ri-settings-5-fill:before{content:\"\\f0e9\"}.ri-settings-5-line:before{content:\"\\f0ea\"}.ri-settings-6-fill:before{content:\"\\f0eb\"}.ri-settings-6-line:before{content:\"\\f0ec\"}.ri-settings-fill:before{content:\"\\f0ed\"}.ri-settings-line:before{content:\"\\f0ee\"}.ri-shape-2-fill:before{content:\"\\f0ef\"}.ri-shape-2-line:before{content:\"\\f0f0\"}.ri-shape-fill:before{content:\"\\f0f1\"}.ri-shape-line:before{content:\"\\f0f2\"}.ri-share-box-fill:before{content:\"\\f0f3\"}.ri-share-box-line:before{content:\"\\f0f4\"}.ri-share-circle-fill:before{content:\"\\f0f5\"}.ri-share-circle-line:before{content:\"\\f0f6\"}.ri-share-fill:before{content:\"\\f0f7\"}.ri-share-forward-2-fill:before{content:\"\\f0f8\"}.ri-share-forward-2-line:before{content:\"\\f0f9\"}.ri-share-forward-box-fill:before{content:\"\\f0fa\"}.ri-share-forward-box-line:before{content:\"\\f0fb\"}.ri-share-forward-fill:before{content:\"\\f0fc\"}.ri-share-forward-line:before{content:\"\\f0fd\"}.ri-share-line:before{content:\"\\f0fe\"}.ri-shield-check-fill:before{content:\"\\f0ff\"}.ri-shield-check-line:before{content:\"\\f100\"}.ri-shield-cross-fill:before{content:\"\\f101\"}.ri-shield-cross-line:before{content:\"\\f102\"}.ri-shield-fill:before{content:\"\\f103\"}.ri-shield-flash-fill:before{content:\"\\f104\"}.ri-shield-flash-line:before{content:\"\\f105\"}.ri-shield-keyhole-fill:before{content:\"\\f106\"}.ri-shield-keyhole-line:before{content:\"\\f107\"}.ri-shield-line:before{content:\"\\f108\"}.ri-shield-star-fill:before{content:\"\\f109\"}.ri-shield-star-line:before{content:\"\\f10a\"}.ri-shield-user-fill:before{content:\"\\f10b\"}.ri-shield-user-line:before{content:\"\\f10c\"}.ri-ship-2-fill:before{content:\"\\f10d\"}.ri-ship-2-line:before{content:\"\\f10e\"}.ri-ship-fill:before{content:\"\\f10f\"}.ri-ship-line:before{content:\"\\f110\"}.ri-shirt-fill:before{content:\"\\f111\"}.ri-shirt-line:before{content:\"\\f112\"}.ri-shopping-bag-2-fill:before{content:\"\\f113\"}.ri-shopping-bag-2-line:before{content:\"\\f114\"}.ri-shopping-bag-3-fill:before{content:\"\\f115\"}.ri-shopping-bag-3-line:before{content:\"\\f116\"}.ri-shopping-bag-fill:before{content:\"\\f117\"}.ri-shopping-bag-line:before{content:\"\\f118\"}.ri-shopping-basket-2-fill:before{content:\"\\f119\"}.ri-shopping-basket-2-line:before{content:\"\\f11a\"}.ri-shopping-basket-fill:before{content:\"\\f11b\"}.ri-shopping-basket-line:before{content:\"\\f11c\"}.ri-shopping-cart-2-fill:before{content:\"\\f11d\"}.ri-shopping-cart-2-line:before{content:\"\\f11e\"}.ri-shopping-cart-fill:before{content:\"\\f11f\"}.ri-shopping-cart-line:before{content:\"\\f120\"}.ri-showers-fill:before{content:\"\\f121\"}.ri-showers-line:before{content:\"\\f122\"}.ri-shuffle-fill:before{content:\"\\f123\"}.ri-shuffle-line:before{content:\"\\f124\"}.ri-shut-down-fill:before{content:\"\\f125\"}.ri-shut-down-line:before{content:\"\\f126\"}.ri-side-bar-fill:before{content:\"\\f127\"}.ri-side-bar-line:before{content:\"\\f128\"}.ri-signal-tower-fill:before{content:\"\\f129\"}.ri-signal-tower-line:before{content:\"\\f12a\"}.ri-signal-wifi-1-fill:before{content:\"\\f12b\"}.ri-signal-wifi-1-line:before{content:\"\\f12c\"}.ri-signal-wifi-2-fill:before{content:\"\\f12d\"}.ri-signal-wifi-2-line:before{content:\"\\f12e\"}.ri-signal-wifi-3-fill:before{content:\"\\f12f\"}.ri-signal-wifi-3-line:before{content:\"\\f130\"}.ri-signal-wifi-error-fill:before{content:\"\\f131\"}.ri-signal-wifi-error-line:before{content:\"\\f132\"}.ri-signal-wifi-fill:before{content:\"\\f133\"}.ri-signal-wifi-line:before{content:\"\\f134\"}.ri-signal-wifi-off-fill:before{content:\"\\f135\"}.ri-signal-wifi-off-line:before{content:\"\\f136\"}.ri-sim-card-2-fill:before{content:\"\\f137\"}.ri-sim-card-2-line:before{content:\"\\f138\"}.ri-sim-card-fill:before{content:\"\\f139\"}.ri-sim-card-line:before{content:\"\\f13a\"}.ri-single-quotes-l:before{content:\"\\f13b\"}.ri-single-quotes-r:before{content:\"\\f13c\"}.ri-sip-fill:before{content:\"\\f13d\"}.ri-sip-line:before{content:\"\\f13e\"}.ri-skip-back-fill:before{content:\"\\f13f\"}.ri-skip-back-line:before{content:\"\\f140\"}.ri-skip-back-mini-fill:before{content:\"\\f141\"}.ri-skip-back-mini-line:before{content:\"\\f142\"}.ri-skip-forward-fill:before{content:\"\\f143\"}.ri-skip-forward-line:before{content:\"\\f144\"}.ri-skip-forward-mini-fill:before{content:\"\\f145\"}.ri-skip-forward-mini-line:before{content:\"\\f146\"}.ri-skull-2-fill:before{content:\"\\f147\"}.ri-skull-2-line:before{content:\"\\f148\"}.ri-skull-fill:before{content:\"\\f149\"}.ri-skull-line:before{content:\"\\f14a\"}.ri-skype-fill:before{content:\"\\f14b\"}.ri-skype-line:before{content:\"\\f14c\"}.ri-slack-fill:before{content:\"\\f14d\"}.ri-slack-line:before{content:\"\\f14e\"}.ri-slice-fill:before{content:\"\\f14f\"}.ri-slice-line:before{content:\"\\f150\"}.ri-slideshow-2-fill:before{content:\"\\f151\"}.ri-slideshow-2-line:before{content:\"\\f152\"}.ri-slideshow-3-fill:before{content:\"\\f153\"}.ri-slideshow-3-line:before{content:\"\\f154\"}.ri-slideshow-4-fill:before{content:\"\\f155\"}.ri-slideshow-4-line:before{content:\"\\f156\"}.ri-slideshow-fill:before{content:\"\\f157\"}.ri-slideshow-line:before{content:\"\\f158\"}.ri-smartphone-fill:before{content:\"\\f159\"}.ri-smartphone-line:before{content:\"\\f15a\"}.ri-snapchat-fill:before{content:\"\\f15b\"}.ri-snapchat-line:before{content:\"\\f15c\"}.ri-snowy-fill:before{content:\"\\f15d\"}.ri-snowy-line:before{content:\"\\f15e\"}.ri-sort-asc:before{content:\"\\f15f\"}.ri-sort-desc:before{content:\"\\f160\"}.ri-sound-module-fill:before{content:\"\\f161\"}.ri-sound-module-line:before{content:\"\\f162\"}.ri-soundcloud-fill:before{content:\"\\f163\"}.ri-soundcloud-line:before{content:\"\\f164\"}.ri-space-ship-fill:before{content:\"\\f165\"}.ri-space-ship-line:before{content:\"\\f166\"}.ri-space:before{content:\"\\f167\"}.ri-spam-2-fill:before{content:\"\\f168\"}.ri-spam-2-line:before{content:\"\\f169\"}.ri-spam-3-fill:before{content:\"\\f16a\"}.ri-spam-3-line:before{content:\"\\f16b\"}.ri-spam-fill:before{content:\"\\f16c\"}.ri-spam-line:before{content:\"\\f16d\"}.ri-speaker-2-fill:before{content:\"\\f16e\"}.ri-speaker-2-line:before{content:\"\\f16f\"}.ri-speaker-3-fill:before{content:\"\\f170\"}.ri-speaker-3-line:before{content:\"\\f171\"}.ri-speaker-fill:before{content:\"\\f172\"}.ri-speaker-line:before{content:\"\\f173\"}.ri-spectrum-fill:before{content:\"\\f174\"}.ri-spectrum-line:before{content:\"\\f175\"}.ri-speed-fill:before{content:\"\\f176\"}.ri-speed-line:before{content:\"\\f177\"}.ri-speed-mini-fill:before{content:\"\\f178\"}.ri-speed-mini-line:before{content:\"\\f179\"}.ri-split-cells-horizontal:before{content:\"\\f17a\"}.ri-split-cells-vertical:before{content:\"\\f17b\"}.ri-spotify-fill:before{content:\"\\f17c\"}.ri-spotify-line:before{content:\"\\f17d\"}.ri-spy-fill:before{content:\"\\f17e\"}.ri-spy-line:before{content:\"\\f17f\"}.ri-stack-fill:before{content:\"\\f180\"}.ri-stack-line:before{content:\"\\f181\"}.ri-stack-overflow-fill:before{content:\"\\f182\"}.ri-stack-overflow-line:before{content:\"\\f183\"}.ri-stackshare-fill:before{content:\"\\f184\"}.ri-stackshare-line:before{content:\"\\f185\"}.ri-star-fill:before{content:\"\\f186\"}.ri-star-half-fill:before{content:\"\\f187\"}.ri-star-half-line:before{content:\"\\f188\"}.ri-star-half-s-fill:before{content:\"\\f189\"}.ri-star-half-s-line:before{content:\"\\f18a\"}.ri-star-line:before{content:\"\\f18b\"}.ri-star-s-fill:before{content:\"\\f18c\"}.ri-star-s-line:before{content:\"\\f18d\"}.ri-star-smile-fill:before{content:\"\\f18e\"}.ri-star-smile-line:before{content:\"\\f18f\"}.ri-steam-fill:before{content:\"\\f190\"}.ri-steam-line:before{content:\"\\f191\"}.ri-steering-2-fill:before{content:\"\\f192\"}.ri-steering-2-line:before{content:\"\\f193\"}.ri-steering-fill:before{content:\"\\f194\"}.ri-steering-line:before{content:\"\\f195\"}.ri-stethoscope-fill:before{content:\"\\f196\"}.ri-stethoscope-line:before{content:\"\\f197\"}.ri-sticky-note-2-fill:before{content:\"\\f198\"}.ri-sticky-note-2-line:before{content:\"\\f199\"}.ri-sticky-note-fill:before{content:\"\\f19a\"}.ri-sticky-note-line:before{content:\"\\f19b\"}.ri-stock-fill:before{content:\"\\f19c\"}.ri-stock-line:before{content:\"\\f19d\"}.ri-stop-circle-fill:before{content:\"\\f19e\"}.ri-stop-circle-line:before{content:\"\\f19f\"}.ri-stop-fill:before{content:\"\\f1a0\"}.ri-stop-line:before{content:\"\\f1a1\"}.ri-stop-mini-fill:before{content:\"\\f1a2\"}.ri-stop-mini-line:before{content:\"\\f1a3\"}.ri-store-2-fill:before{content:\"\\f1a4\"}.ri-store-2-line:before{content:\"\\f1a5\"}.ri-store-3-fill:before{content:\"\\f1a6\"}.ri-store-3-line:before{content:\"\\f1a7\"}.ri-store-fill:before{content:\"\\f1a8\"}.ri-store-line:before{content:\"\\f1a9\"}.ri-strikethrough-2:before{content:\"\\f1aa\"}.ri-strikethrough:before{content:\"\\f1ab\"}.ri-subscript-2:before{content:\"\\f1ac\"}.ri-subscript:before{content:\"\\f1ad\"}.ri-subtract-fill:before{content:\"\\f1ae\"}.ri-subtract-line:before{content:\"\\f1af\"}.ri-subway-fill:before{content:\"\\f1b0\"}.ri-subway-line:before{content:\"\\f1b1\"}.ri-subway-wifi-fill:before{content:\"\\f1b2\"}.ri-subway-wifi-line:before{content:\"\\f1b3\"}.ri-suitcase-2-fill:before{content:\"\\f1b4\"}.ri-suitcase-2-line:before{content:\"\\f1b5\"}.ri-suitcase-3-fill:before{content:\"\\f1b6\"}.ri-suitcase-3-line:before{content:\"\\f1b7\"}.ri-suitcase-fill:before{content:\"\\f1b8\"}.ri-suitcase-line:before{content:\"\\f1b9\"}.ri-sun-cloudy-fill:before{content:\"\\f1ba\"}.ri-sun-cloudy-line:before{content:\"\\f1bb\"}.ri-sun-fill:before{content:\"\\f1bc\"}.ri-sun-foggy-fill:before{content:\"\\f1bd\"}.ri-sun-foggy-line:before{content:\"\\f1be\"}.ri-sun-line:before{content:\"\\f1bf\"}.ri-superscript-2:before{content:\"\\f1c0\"}.ri-superscript:before{content:\"\\f1c1\"}.ri-surgical-mask-fill:before{content:\"\\f1c2\"}.ri-surgical-mask-line:before{content:\"\\f1c3\"}.ri-surround-sound-fill:before{content:\"\\f1c4\"}.ri-surround-sound-line:before{content:\"\\f1c5\"}.ri-survey-fill:before{content:\"\\f1c6\"}.ri-survey-line:before{content:\"\\f1c7\"}.ri-swap-box-fill:before{content:\"\\f1c8\"}.ri-swap-box-line:before{content:\"\\f1c9\"}.ri-swap-fill:before{content:\"\\f1ca\"}.ri-swap-line:before{content:\"\\f1cb\"}.ri-switch-fill:before{content:\"\\f1cc\"}.ri-switch-line:before{content:\"\\f1cd\"}.ri-sword-fill:before{content:\"\\f1ce\"}.ri-sword-line:before{content:\"\\f1cf\"}.ri-syringe-fill:before{content:\"\\f1d0\"}.ri-syringe-line:before{content:\"\\f1d1\"}.ri-t-box-fill:before{content:\"\\f1d2\"}.ri-t-box-line:before{content:\"\\f1d3\"}.ri-t-shirt-2-fill:before{content:\"\\f1d4\"}.ri-t-shirt-2-line:before{content:\"\\f1d5\"}.ri-t-shirt-air-fill:before{content:\"\\f1d6\"}.ri-t-shirt-air-line:before{content:\"\\f1d7\"}.ri-t-shirt-fill:before{content:\"\\f1d8\"}.ri-t-shirt-line:before{content:\"\\f1d9\"}.ri-table-2:before{content:\"\\f1da\"}.ri-table-alt-fill:before{content:\"\\f1db\"}.ri-table-alt-line:before{content:\"\\f1dc\"}.ri-table-fill:before{content:\"\\f1dd\"}.ri-table-line:before{content:\"\\f1de\"}.ri-tablet-fill:before{content:\"\\f1df\"}.ri-tablet-line:before{content:\"\\f1e0\"}.ri-takeaway-fill:before{content:\"\\f1e1\"}.ri-takeaway-line:before{content:\"\\f1e2\"}.ri-taobao-fill:before{content:\"\\f1e3\"}.ri-taobao-line:before{content:\"\\f1e4\"}.ri-tape-fill:before{content:\"\\f1e5\"}.ri-tape-line:before{content:\"\\f1e6\"}.ri-task-fill:before{content:\"\\f1e7\"}.ri-task-line:before{content:\"\\f1e8\"}.ri-taxi-fill:before{content:\"\\f1e9\"}.ri-taxi-line:before{content:\"\\f1ea\"}.ri-taxi-wifi-fill:before{content:\"\\f1eb\"}.ri-taxi-wifi-line:before{content:\"\\f1ec\"}.ri-team-fill:before{content:\"\\f1ed\"}.ri-team-line:before{content:\"\\f1ee\"}.ri-telegram-fill:before{content:\"\\f1ef\"}.ri-telegram-line:before{content:\"\\f1f0\"}.ri-temp-cold-fill:before{content:\"\\f1f1\"}.ri-temp-cold-line:before{content:\"\\f1f2\"}.ri-temp-hot-fill:before{content:\"\\f1f3\"}.ri-temp-hot-line:before{content:\"\\f1f4\"}.ri-terminal-box-fill:before{content:\"\\f1f5\"}.ri-terminal-box-line:before{content:\"\\f1f6\"}.ri-terminal-fill:before{content:\"\\f1f7\"}.ri-terminal-line:before{content:\"\\f1f8\"}.ri-terminal-window-fill:before{content:\"\\f1f9\"}.ri-terminal-window-line:before{content:\"\\f1fa\"}.ri-test-tube-fill:before{content:\"\\f1fb\"}.ri-test-tube-line:before{content:\"\\f1fc\"}.ri-text-direction-l:before{content:\"\\f1fd\"}.ri-text-direction-r:before{content:\"\\f1fe\"}.ri-text-spacing:before{content:\"\\f1ff\"}.ri-text-wrap:before{content:\"\\f200\"}.ri-text:before{content:\"\\f201\"}.ri-thermometer-fill:before{content:\"\\f202\"}.ri-thermometer-line:before{content:\"\\f203\"}.ri-thumb-down-fill:before{content:\"\\f204\"}.ri-thumb-down-line:before{content:\"\\f205\"}.ri-thumb-up-fill:before{content:\"\\f206\"}.ri-thumb-up-line:before{content:\"\\f207\"}.ri-thunderstorms-fill:before{content:\"\\f208\"}.ri-thunderstorms-line:before{content:\"\\f209\"}.ri-ticket-2-fill:before{content:\"\\f20a\"}.ri-ticket-2-line:before{content:\"\\f20b\"}.ri-ticket-fill:before{content:\"\\f20c\"}.ri-ticket-line:before{content:\"\\f20d\"}.ri-time-fill:before{content:\"\\f20e\"}.ri-time-line:before{content:\"\\f20f\"}.ri-timer-2-fill:before{content:\"\\f210\"}.ri-timer-2-line:before{content:\"\\f211\"}.ri-timer-fill:before{content:\"\\f212\"}.ri-timer-flash-fill:before{content:\"\\f213\"}.ri-timer-flash-line:before{content:\"\\f214\"}.ri-timer-line:before{content:\"\\f215\"}.ri-todo-fill:before{content:\"\\f216\"}.ri-todo-line:before{content:\"\\f217\"}.ri-toggle-fill:before{content:\"\\f218\"}.ri-toggle-line:before{content:\"\\f219\"}.ri-tools-fill:before{content:\"\\f21a\"}.ri-tools-line:before{content:\"\\f21b\"}.ri-tornado-fill:before{content:\"\\f21c\"}.ri-tornado-line:before{content:\"\\f21d\"}.ri-trademark-fill:before{content:\"\\f21e\"}.ri-trademark-line:before{content:\"\\f21f\"}.ri-traffic-light-fill:before{content:\"\\f220\"}.ri-traffic-light-line:before{content:\"\\f221\"}.ri-train-fill:before{content:\"\\f222\"}.ri-train-line:before{content:\"\\f223\"}.ri-train-wifi-fill:before{content:\"\\f224\"}.ri-train-wifi-line:before{content:\"\\f225\"}.ri-translate-2:before{content:\"\\f226\"}.ri-translate:before{content:\"\\f227\"}.ri-travesti-fill:before{content:\"\\f228\"}.ri-travesti-line:before{content:\"\\f229\"}.ri-treasure-map-fill:before{content:\"\\f22a\"}.ri-treasure-map-line:before{content:\"\\f22b\"}.ri-trello-fill:before{content:\"\\f22c\"}.ri-trello-line:before{content:\"\\f22d\"}.ri-trophy-fill:before{content:\"\\f22e\"}.ri-trophy-line:before{content:\"\\f22f\"}.ri-truck-fill:before{content:\"\\f230\"}.ri-truck-line:before{content:\"\\f231\"}.ri-tumblr-fill:before{content:\"\\f232\"}.ri-tumblr-line:before{content:\"\\f233\"}.ri-tv-2-fill:before{content:\"\\f234\"}.ri-tv-2-line:before{content:\"\\f235\"}.ri-tv-fill:before{content:\"\\f236\"}.ri-tv-line:before{content:\"\\f237\"}.ri-twitch-fill:before{content:\"\\f238\"}.ri-twitch-line:before{content:\"\\f239\"}.ri-twitter-fill:before{content:\"\\f23a\"}.ri-twitter-line:before{content:\"\\f23b\"}.ri-typhoon-fill:before{content:\"\\f23c\"}.ri-typhoon-line:before{content:\"\\f23d\"}.ri-u-disk-fill:before{content:\"\\f23e\"}.ri-u-disk-line:before{content:\"\\f23f\"}.ri-ubuntu-fill:before{content:\"\\f240\"}.ri-ubuntu-line:before{content:\"\\f241\"}.ri-umbrella-fill:before{content:\"\\f242\"}.ri-umbrella-line:before{content:\"\\f243\"}.ri-underline:before{content:\"\\f244\"}.ri-uninstall-fill:before{content:\"\\f245\"}.ri-uninstall-line:before{content:\"\\f246\"}.ri-unsplash-fill:before{content:\"\\f247\"}.ri-unsplash-line:before{content:\"\\f248\"}.ri-upload-2-fill:before{content:\"\\f249\"}.ri-upload-2-line:before{content:\"\\f24a\"}.ri-upload-cloud-2-fill:before{content:\"\\f24b\"}.ri-upload-cloud-2-line:before{content:\"\\f24c\"}.ri-upload-cloud-fill:before{content:\"\\f24d\"}.ri-upload-cloud-line:before{content:\"\\f24e\"}.ri-upload-fill:before{content:\"\\f24f\"}.ri-upload-line:before{content:\"\\f250\"}.ri-usb-fill:before{content:\"\\f251\"}.ri-usb-line:before{content:\"\\f252\"}.ri-user-2-fill:before{content:\"\\f253\"}.ri-user-2-line:before{content:\"\\f254\"}.ri-user-3-fill:before{content:\"\\f255\"}.ri-user-3-line:before{content:\"\\f256\"}.ri-user-4-fill:before{content:\"\\f257\"}.ri-user-4-line:before{content:\"\\f258\"}.ri-user-5-fill:before{content:\"\\f259\"}.ri-user-5-line:before{content:\"\\f25a\"}.ri-user-6-fill:before{content:\"\\f25b\"}.ri-user-6-line:before{content:\"\\f25c\"}.ri-user-add-fill:before{content:\"\\f25d\"}.ri-user-add-line:before{content:\"\\f25e\"}.ri-user-fill:before{content:\"\\f25f\"}.ri-user-follow-fill:before{content:\"\\f260\"}.ri-user-follow-line:before{content:\"\\f261\"}.ri-user-heart-fill:before{content:\"\\f262\"}.ri-user-heart-line:before{content:\"\\f263\"}.ri-user-line:before{content:\"\\f264\"}.ri-user-location-fill:before{content:\"\\f265\"}.ri-user-location-line:before{content:\"\\f266\"}.ri-user-received-2-fill:before{content:\"\\f267\"}.ri-user-received-2-line:before{content:\"\\f268\"}.ri-user-received-fill:before{content:\"\\f269\"}.ri-user-received-line:before{content:\"\\f26a\"}.ri-user-search-fill:before{content:\"\\f26b\"}.ri-user-search-line:before{content:\"\\f26c\"}.ri-user-settings-fill:before{content:\"\\f26d\"}.ri-user-settings-line:before{content:\"\\f26e\"}.ri-user-shared-2-fill:before{content:\"\\f26f\"}.ri-user-shared-2-line:before{content:\"\\f270\"}.ri-user-shared-fill:before{content:\"\\f271\"}.ri-user-shared-line:before{content:\"\\f272\"}.ri-user-smile-fill:before{content:\"\\f273\"}.ri-user-smile-line:before{content:\"\\f274\"}.ri-user-star-fill:before{content:\"\\f275\"}.ri-user-star-line:before{content:\"\\f276\"}.ri-user-unfollow-fill:before{content:\"\\f277\"}.ri-user-unfollow-line:before{content:\"\\f278\"}.ri-user-voice-fill:before{content:\"\\f279\"}.ri-user-voice-line:before{content:\"\\f27a\"}.ri-video-add-fill:before{content:\"\\f27b\"}.ri-video-add-line:before{content:\"\\f27c\"}.ri-video-chat-fill:before{content:\"\\f27d\"}.ri-video-chat-line:before{content:\"\\f27e\"}.ri-video-download-fill:before{content:\"\\f27f\"}.ri-video-download-line:before{content:\"\\f280\"}.ri-video-fill:before{content:\"\\f281\"}.ri-video-line:before{content:\"\\f282\"}.ri-video-upload-fill:before{content:\"\\f283\"}.ri-video-upload-line:before{content:\"\\f284\"}.ri-vidicon-2-fill:before{content:\"\\f285\"}.ri-vidicon-2-line:before{content:\"\\f286\"}.ri-vidicon-fill:before{content:\"\\f287\"}.ri-vidicon-line:before{content:\"\\f288\"}.ri-vimeo-fill:before{content:\"\\f289\"}.ri-vimeo-line:before{content:\"\\f28a\"}.ri-vip-crown-2-fill:before{content:\"\\f28b\"}.ri-vip-crown-2-line:before{content:\"\\f28c\"}.ri-vip-crown-fill:before{content:\"\\f28d\"}.ri-vip-crown-line:before{content:\"\\f28e\"}.ri-vip-diamond-fill:before{content:\"\\f28f\"}.ri-vip-diamond-line:before{content:\"\\f290\"}.ri-vip-fill:before{content:\"\\f291\"}.ri-vip-line:before{content:\"\\f292\"}.ri-virus-fill:before{content:\"\\f293\"}.ri-virus-line:before{content:\"\\f294\"}.ri-visa-fill:before{content:\"\\f295\"}.ri-visa-line:before{content:\"\\f296\"}.ri-voice-recognition-fill:before{content:\"\\f297\"}.ri-voice-recognition-line:before{content:\"\\f298\"}.ri-voiceprint-fill:before{content:\"\\f299\"}.ri-voiceprint-line:before{content:\"\\f29a\"}.ri-volume-down-fill:before{content:\"\\f29b\"}.ri-volume-down-line:before{content:\"\\f29c\"}.ri-volume-mute-fill:before{content:\"\\f29d\"}.ri-volume-mute-line:before{content:\"\\f29e\"}.ri-volume-off-vibrate-fill:before{content:\"\\f29f\"}.ri-volume-off-vibrate-line:before{content:\"\\f2a0\"}.ri-volume-up-fill:before{content:\"\\f2a1\"}.ri-volume-up-line:before{content:\"\\f2a2\"}.ri-volume-vibrate-fill:before{content:\"\\f2a3\"}.ri-volume-vibrate-line:before{content:\"\\f2a4\"}.ri-vuejs-fill:before{content:\"\\f2a5\"}.ri-vuejs-line:before{content:\"\\f2a6\"}.ri-walk-fill:before{content:\"\\f2a7\"}.ri-walk-line:before{content:\"\\f2a8\"}.ri-wallet-2-fill:before{content:\"\\f2a9\"}.ri-wallet-2-line:before{content:\"\\f2aa\"}.ri-wallet-3-fill:before{content:\"\\f2ab\"}.ri-wallet-3-line:before{content:\"\\f2ac\"}.ri-wallet-fill:before{content:\"\\f2ad\"}.ri-wallet-line:before{content:\"\\f2ae\"}.ri-water-flash-fill:before{content:\"\\f2af\"}.ri-water-flash-line:before{content:\"\\f2b0\"}.ri-webcam-fill:before{content:\"\\f2b1\"}.ri-webcam-line:before{content:\"\\f2b2\"}.ri-wechat-2-fill:before{content:\"\\f2b3\"}.ri-wechat-2-line:before{content:\"\\f2b4\"}.ri-wechat-fill:before{content:\"\\f2b5\"}.ri-wechat-line:before{content:\"\\f2b6\"}.ri-wechat-pay-fill:before{content:\"\\f2b7\"}.ri-wechat-pay-line:before{content:\"\\f2b8\"}.ri-weibo-fill:before{content:\"\\f2b9\"}.ri-weibo-line:before{content:\"\\f2ba\"}.ri-whatsapp-fill:before{content:\"\\f2bb\"}.ri-whatsapp-line:before{content:\"\\f2bc\"}.ri-wheelchair-fill:before{content:\"\\f2bd\"}.ri-wheelchair-line:before{content:\"\\f2be\"}.ri-wifi-fill:before{content:\"\\f2bf\"}.ri-wifi-line:before{content:\"\\f2c0\"}.ri-wifi-off-fill:before{content:\"\\f2c1\"}.ri-wifi-off-line:before{content:\"\\f2c2\"}.ri-window-2-fill:before{content:\"\\f2c3\"}.ri-window-2-line:before{content:\"\\f2c4\"}.ri-window-fill:before{content:\"\\f2c5\"}.ri-window-line:before{content:\"\\f2c6\"}.ri-windows-fill:before{content:\"\\f2c7\"}.ri-windows-line:before{content:\"\\f2c8\"}.ri-windy-fill:before{content:\"\\f2c9\"}.ri-windy-line:before{content:\"\\f2ca\"}.ri-wireless-charging-fill:before{content:\"\\f2cb\"}.ri-wireless-charging-line:before{content:\"\\f2cc\"}.ri-women-fill:before{content:\"\\f2cd\"}.ri-women-line:before{content:\"\\f2ce\"}.ri-wubi-input:before{content:\"\\f2cf\"}.ri-xbox-fill:before{content:\"\\f2d0\"}.ri-xbox-line:before{content:\"\\f2d1\"}.ri-xing-fill:before{content:\"\\f2d2\"}.ri-xing-line:before{content:\"\\f2d3\"}.ri-youtube-fill:before{content:\"\\f2d4\"}.ri-youtube-line:before{content:\"\\f2d5\"}.ri-zcool-fill:before{content:\"\\f2d6\"}.ri-zcool-line:before{content:\"\\f2d7\"}.ri-zhihu-fill:before{content:\"\\f2d8\"}.ri-zhihu-line:before{content:\"\\f2d9\"}.ri-zoom-in-fill:before{content:\"\\f2da\"}.ri-zoom-in-line:before{content:\"\\f2db\"}.ri-zoom-out-fill:before{content:\"\\f2dc\"}.ri-zoom-out-line:before{content:\"\\f2dd\"}.ri-zzz-fill:before{content:\"\\f2de\"}.ri-zzz-line:before{content:\"\\f2df\"}.img-icon[data-v-79aac9d9]{display:inline-block;width:2em;height:2em;vertical-align:middle}.vab-icon[data-v-79aac9d9]{display:inline-block;width:16px;height:16px;margin:0 auto;overflow:hidden;vertical-align:middle;fill:currentColor}[class*=ri][data-v-79aac9d9]{display:inline-block;font-size:16px;text-align:center;vertical-align:-3.5px}", "",{"version":3,"sources":["vab-icons.css"],"names":[],"mappings":"AAAA,WAAW,qBAAqB,CAAC,2CAAqC,CAAC,uSAA0R,CAAC,iBAAiB,CAAC,6BAA6B,+BAA+B,CAAC,iBAAiB,CAAC,kCAAkC,CAAC,iCAAiC,CAAC,OAAO,kBAAkB,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,OAAO,eAAe,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,QAAQ,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,gBAAgB,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,OAAO,aAAa,CAAC,QAAQ,cAAc,CAAC,OAAO,iBAAiB,CAAC,YAAY,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,eAAe,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,mCAAmC,eAAe,CAAC,mCAAmC,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,mCAAmC,eAAe,CAAC,mCAAmC,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,oBAAoB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,wBAAwB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,qCAAqC,eAAe,CAAC,qCAAqC,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,gBAAgB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,sCAAsC,eAAe,CAAC,sCAAsC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sCAAsC,eAAe,CAAC,sCAAsC,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,yBAAyB,eAAe,CAAC,uCAAuC,eAAe,CAAC,uCAAuC,eAAe,CAAC,yBAAyB,eAAe,CAAC,wCAAwC,eAAe,CAAC,wCAAwC,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,qCAAqC,eAAe,CAAC,qCAAqC,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,sCAAsC,eAAe,CAAC,sCAAsC,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,mCAAmC,eAAe,CAAC,mCAAmC,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,wBAAwB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,uBAAuB,eAAe,CAAC,oBAAoB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,yBAAyB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,uBAAuB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,uCAAuC,eAAe,CAAC,uCAAuC,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,uCAAuC,eAAe,CAAC,uCAAuC,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,eAAe,eAAe,CAAC,eAAe,eAAe,CAAC,eAAe,eAAe,CAAC,eAAe,eAAe,CAAC,eAAe,eAAe,CAAC,eAAe,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,mBAAmB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qCAAqC,eAAe,CAAC,qCAAqC,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qCAAqC,eAAe,CAAC,qCAAqC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,8BAA8B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,kBAAkB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,kBAAkB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,gBAAgB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,kCAAkC,eAAe,CAAC,gCAAgC,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,oBAAoB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,mCAAmC,eAAe,CAAC,mCAAmC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,oCAAoC,eAAe,CAAC,oCAAoC,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,qBAAqB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,mCAAmC,eAAe,CAAC,mCAAmC,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,iBAAiB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,8BAA8B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qCAAqC,eAAe,CAAC,qCAAqC,eAAe,CAAC,wCAAwC,eAAe,CAAC,wCAAwC,eAAe,CAAC,mCAAmC,eAAe,CAAC,mCAAmC,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,iCAAiC,eAAe,CAAC,iCAAiC,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,sBAAsB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,sBAAsB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,uBAAuB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,oBAAoB,eAAe,CAAC,qBAAqB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,iBAAiB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,kCAAkC,eAAe,CAAC,gCAAgC,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,oBAAoB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,oBAAoB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,mBAAmB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,wBAAwB,eAAe,CAAC,qBAAqB,eAAe,CAAC,gBAAgB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,sBAAsB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,mBAAmB,eAAe,CAAC,mBAAmB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,qBAAqB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,gCAAgC,eAAe,CAAC,gCAAgC,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,8BAA8B,eAAe,CAAC,8BAA8B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,6BAA6B,eAAe,CAAC,6BAA6B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,mCAAmC,eAAe,CAAC,mCAAmC,eAAe,CAAC,0BAA0B,eAAe,CAAC,0BAA0B,eAAe,CAAC,+BAA+B,eAAe,CAAC,+BAA+B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,4BAA4B,eAAe,CAAC,4BAA4B,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,2BAA2B,eAAe,CAAC,2BAA2B,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,uBAAuB,eAAe,CAAC,uBAAuB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,kCAAkC,eAAe,CAAC,kCAAkC,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,qBAAqB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,sBAAsB,eAAe,CAAC,wBAAwB,eAAe,CAAC,wBAAwB,eAAe,CAAC,yBAAyB,eAAe,CAAC,yBAAyB,eAAe,CAAC,oBAAoB,eAAe,CAAC,oBAAoB,eAAe,CAAC,2BAA2B,oBAAoB,CAAC,SAAS,CAAC,UAAU,CAAC,qBAAqB,CAAC,2BAA2B,oBAAoB,CAAC,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,6BAA6B,oBAAoB,CAAC,cAAc,CAAC,iBAAiB,CAAC,qBAAqB","file":"vab-icons.css","sourcesContent":["@font-face{font-family:remixicon;src:url(fonts/remixicon.31d28485.eot);src:url(fonts/remixicon.31d28485.eot#iefix) format(\"embedded-opentype\"),url(fonts/remixicon.9915fef9.woff2) format(\"woff2\"),url(fonts/remixicon.881fbc46.woff) format(\"woff\"),url(fonts/remixicon.888e61f0.ttf) format(\"truetype\"),url(img/remixicon.95138f36.svg#remixicon) format(\"svg\");font-display:swap}[class*=\" ri-\"],[class^=ri-]{font-family:remixicon!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:\"\\ea01\"}.ri-24-hours-line:before{content:\"\\ea02\"}.ri-4k-fill:before{content:\"\\ea03\"}.ri-4k-line:before{content:\"\\ea04\"}.ri-a-b:before{content:\"\\ea05\"}.ri-account-box-fill:before{content:\"\\ea06\"}.ri-account-box-line:before{content:\"\\ea07\"}.ri-account-circle-fill:before{content:\"\\ea08\"}.ri-account-circle-line:before{content:\"\\ea09\"}.ri-account-pin-box-fill:before{content:\"\\ea0a\"}.ri-account-pin-box-line:before{content:\"\\ea0b\"}.ri-account-pin-circle-fill:before{content:\"\\ea0c\"}.ri-account-pin-circle-line:before{content:\"\\ea0d\"}.ri-add-box-fill:before{content:\"\\ea0e\"}.ri-add-box-line:before{content:\"\\ea0f\"}.ri-add-circle-fill:before{content:\"\\ea10\"}.ri-add-circle-line:before{content:\"\\ea11\"}.ri-add-fill:before{content:\"\\ea12\"}.ri-add-line:before{content:\"\\ea13\"}.ri-admin-fill:before{content:\"\\ea14\"}.ri-admin-line:before{content:\"\\ea15\"}.ri-advertisement-fill:before{content:\"\\ea16\"}.ri-advertisement-line:before{content:\"\\ea17\"}.ri-airplay-fill:before{content:\"\\ea18\"}.ri-airplay-line:before{content:\"\\ea19\"}.ri-alarm-fill:before{content:\"\\ea1a\"}.ri-alarm-line:before{content:\"\\ea1b\"}.ri-alarm-warning-fill:before{content:\"\\ea1c\"}.ri-alarm-warning-line:before{content:\"\\ea1d\"}.ri-album-fill:before{content:\"\\ea1e\"}.ri-album-line:before{content:\"\\ea1f\"}.ri-alert-fill:before{content:\"\\ea20\"}.ri-alert-line:before{content:\"\\ea21\"}.ri-aliens-fill:before{content:\"\\ea22\"}.ri-aliens-line:before{content:\"\\ea23\"}.ri-align-bottom:before{content:\"\\ea24\"}.ri-align-center:before{content:\"\\ea25\"}.ri-align-justify:before{content:\"\\ea26\"}.ri-align-left:before{content:\"\\ea27\"}.ri-align-right:before{content:\"\\ea28\"}.ri-align-top:before{content:\"\\ea29\"}.ri-align-vertically:before{content:\"\\ea2a\"}.ri-alipay-fill:before{content:\"\\ea2b\"}.ri-alipay-line:before{content:\"\\ea2c\"}.ri-amazon-fill:before{content:\"\\ea2d\"}.ri-amazon-line:before{content:\"\\ea2e\"}.ri-anchor-fill:before{content:\"\\ea2f\"}.ri-anchor-line:before{content:\"\\ea30\"}.ri-ancient-gate-fill:before{content:\"\\ea31\"}.ri-ancient-gate-line:before{content:\"\\ea32\"}.ri-ancient-pavilion-fill:before{content:\"\\ea33\"}.ri-ancient-pavilion-line:before{content:\"\\ea34\"}.ri-android-fill:before{content:\"\\ea35\"}.ri-android-line:before{content:\"\\ea36\"}.ri-angularjs-fill:before{content:\"\\ea37\"}.ri-angularjs-line:before{content:\"\\ea38\"}.ri-anticlockwise-2-fill:before{content:\"\\ea39\"}.ri-anticlockwise-2-line:before{content:\"\\ea3a\"}.ri-anticlockwise-fill:before{content:\"\\ea3b\"}.ri-anticlockwise-line:before{content:\"\\ea3c\"}.ri-app-store-fill:before{content:\"\\ea3d\"}.ri-app-store-line:before{content:\"\\ea3e\"}.ri-apple-fill:before{content:\"\\ea3f\"}.ri-apple-line:before{content:\"\\ea40\"}.ri-apps-2-fill:before{content:\"\\ea41\"}.ri-apps-2-line:before{content:\"\\ea42\"}.ri-apps-fill:before{content:\"\\ea43\"}.ri-apps-line:before{content:\"\\ea44\"}.ri-archive-drawer-fill:before{content:\"\\ea45\"}.ri-archive-drawer-line:before{content:\"\\ea46\"}.ri-archive-fill:before{content:\"\\ea47\"}.ri-archive-line:before{content:\"\\ea48\"}.ri-arrow-down-circle-fill:before{content:\"\\ea49\"}.ri-arrow-down-circle-line:before{content:\"\\ea4a\"}.ri-arrow-down-fill:before{content:\"\\ea4b\"}.ri-arrow-down-line:before{content:\"\\ea4c\"}.ri-arrow-down-s-fill:before{content:\"\\ea4d\"}.ri-arrow-down-s-line:before{content:\"\\ea4e\"}.ri-arrow-drop-down-fill:before{content:\"\\ea4f\"}.ri-arrow-drop-down-line:before{content:\"\\ea50\"}.ri-arrow-drop-left-fill:before{content:\"\\ea51\"}.ri-arrow-drop-left-line:before{content:\"\\ea52\"}.ri-arrow-drop-right-fill:before{content:\"\\ea53\"}.ri-arrow-drop-right-line:before{content:\"\\ea54\"}.ri-arrow-drop-up-fill:before{content:\"\\ea55\"}.ri-arrow-drop-up-line:before{content:\"\\ea56\"}.ri-arrow-go-back-fill:before{content:\"\\ea57\"}.ri-arrow-go-back-line:before{content:\"\\ea58\"}.ri-arrow-go-forward-fill:before{content:\"\\ea59\"}.ri-arrow-go-forward-line:before{content:\"\\ea5a\"}.ri-arrow-left-circle-fill:before{content:\"\\ea5b\"}.ri-arrow-left-circle-line:before{content:\"\\ea5c\"}.ri-arrow-left-down-fill:before{content:\"\\ea5d\"}.ri-arrow-left-down-line:before{content:\"\\ea5e\"}.ri-arrow-left-fill:before{content:\"\\ea5f\"}.ri-arrow-left-line:before{content:\"\\ea60\"}.ri-arrow-left-right-fill:before{content:\"\\ea61\"}.ri-arrow-left-right-line:before{content:\"\\ea62\"}.ri-arrow-left-s-fill:before{content:\"\\ea63\"}.ri-arrow-left-s-line:before{content:\"\\ea64\"}.ri-arrow-left-up-fill:before{content:\"\\ea65\"}.ri-arrow-left-up-line:before{content:\"\\ea66\"}.ri-arrow-right-circle-fill:before{content:\"\\ea67\"}.ri-arrow-right-circle-line:before{content:\"\\ea68\"}.ri-arrow-right-down-fill:before{content:\"\\ea69\"}.ri-arrow-right-down-line:before{content:\"\\ea6a\"}.ri-arrow-right-fill:before{content:\"\\ea6b\"}.ri-arrow-right-line:before{content:\"\\ea6c\"}.ri-arrow-right-s-fill:before{content:\"\\ea6d\"}.ri-arrow-right-s-line:before{content:\"\\ea6e\"}.ri-arrow-right-up-fill:before{content:\"\\ea6f\"}.ri-arrow-right-up-line:before{content:\"\\ea70\"}.ri-arrow-up-circle-fill:before{content:\"\\ea71\"}.ri-arrow-up-circle-line:before{content:\"\\ea72\"}.ri-arrow-up-down-fill:before{content:\"\\ea73\"}.ri-arrow-up-down-line:before{content:\"\\ea74\"}.ri-arrow-up-fill:before{content:\"\\ea75\"}.ri-arrow-up-line:before{content:\"\\ea76\"}.ri-arrow-up-s-fill:before{content:\"\\ea77\"}.ri-arrow-up-s-line:before{content:\"\\ea78\"}.ri-artboard-2-fill:before{content:\"\\ea79\"}.ri-artboard-2-line:before{content:\"\\ea7a\"}.ri-artboard-fill:before{content:\"\\ea7b\"}.ri-artboard-line:before{content:\"\\ea7c\"}.ri-article-fill:before{content:\"\\ea7d\"}.ri-article-line:before{content:\"\\ea7e\"}.ri-aspect-ratio-fill:before{content:\"\\ea7f\"}.ri-aspect-ratio-line:before{content:\"\\ea80\"}.ri-asterisk:before{content:\"\\ea81\"}.ri-at-fill:before{content:\"\\ea82\"}.ri-at-line:before{content:\"\\ea83\"}.ri-attachment-2:before{content:\"\\ea84\"}.ri-attachment-fill:before{content:\"\\ea85\"}.ri-attachment-line:before{content:\"\\ea86\"}.ri-auction-fill:before{content:\"\\ea87\"}.ri-auction-line:before{content:\"\\ea88\"}.ri-award-fill:before{content:\"\\ea89\"}.ri-award-line:before{content:\"\\ea8a\"}.ri-baidu-fill:before{content:\"\\ea8b\"}.ri-baidu-line:before{content:\"\\ea8c\"}.ri-ball-pen-fill:before{content:\"\\ea8d\"}.ri-ball-pen-line:before{content:\"\\ea8e\"}.ri-bank-card-2-fill:before{content:\"\\ea8f\"}.ri-bank-card-2-line:before{content:\"\\ea90\"}.ri-bank-card-fill:before{content:\"\\ea91\"}.ri-bank-card-line:before{content:\"\\ea92\"}.ri-bank-fill:before{content:\"\\ea93\"}.ri-bank-line:before{content:\"\\ea94\"}.ri-bar-chart-2-fill:before{content:\"\\ea95\"}.ri-bar-chart-2-line:before{content:\"\\ea96\"}.ri-bar-chart-box-fill:before{content:\"\\ea97\"}.ri-bar-chart-box-line:before{content:\"\\ea98\"}.ri-bar-chart-fill:before{content:\"\\ea99\"}.ri-bar-chart-grouped-fill:before{content:\"\\ea9a\"}.ri-bar-chart-grouped-line:before{content:\"\\ea9b\"}.ri-bar-chart-horizontal-fill:before{content:\"\\ea9c\"}.ri-bar-chart-horizontal-line:before{content:\"\\ea9d\"}.ri-bar-chart-line:before{content:\"\\ea9e\"}.ri-barcode-box-fill:before{content:\"\\ea9f\"}.ri-barcode-box-line:before{content:\"\\eaa0\"}.ri-barcode-fill:before{content:\"\\eaa1\"}.ri-barcode-line:before{content:\"\\eaa2\"}.ri-barricade-fill:before{content:\"\\eaa3\"}.ri-barricade-line:before{content:\"\\eaa4\"}.ri-base-station-fill:before{content:\"\\eaa5\"}.ri-base-station-line:before{content:\"\\eaa6\"}.ri-basketball-fill:before{content:\"\\eaa7\"}.ri-basketball-line:before{content:\"\\eaa8\"}.ri-battery-2-charge-fill:before{content:\"\\eaa9\"}.ri-battery-2-charge-line:before{content:\"\\eaaa\"}.ri-battery-2-fill:before{content:\"\\eaab\"}.ri-battery-2-line:before{content:\"\\eaac\"}.ri-battery-charge-fill:before{content:\"\\eaad\"}.ri-battery-charge-line:before{content:\"\\eaae\"}.ri-battery-fill:before{content:\"\\eaaf\"}.ri-battery-line:before{content:\"\\eab0\"}.ri-battery-low-fill:before{content:\"\\eab1\"}.ri-battery-low-line:before{content:\"\\eab2\"}.ri-battery-saver-fill:before{content:\"\\eab3\"}.ri-battery-saver-line:before{content:\"\\eab4\"}.ri-battery-share-fill:before{content:\"\\eab5\"}.ri-battery-share-line:before{content:\"\\eab6\"}.ri-bear-smile-fill:before{content:\"\\eab7\"}.ri-bear-smile-line:before{content:\"\\eab8\"}.ri-behance-fill:before{content:\"\\eab9\"}.ri-behance-line:before{content:\"\\eaba\"}.ri-bell-fill:before{content:\"\\eabb\"}.ri-bell-line:before{content:\"\\eabc\"}.ri-bike-fill:before{content:\"\\eabd\"}.ri-bike-line:before{content:\"\\eabe\"}.ri-bilibili-fill:before{content:\"\\eabf\"}.ri-bilibili-line:before{content:\"\\eac0\"}.ri-bill-fill:before{content:\"\\eac1\"}.ri-bill-line:before{content:\"\\eac2\"}.ri-billiards-fill:before{content:\"\\eac3\"}.ri-billiards-line:before{content:\"\\eac4\"}.ri-bit-coin-fill:before{content:\"\\eac5\"}.ri-bit-coin-line:before{content:\"\\eac6\"}.ri-blaze-fill:before{content:\"\\eac7\"}.ri-blaze-line:before{content:\"\\eac8\"}.ri-bluetooth-connect-fill:before{content:\"\\eac9\"}.ri-bluetooth-connect-line:before{content:\"\\eaca\"}.ri-bluetooth-fill:before{content:\"\\eacb\"}.ri-bluetooth-line:before{content:\"\\eacc\"}.ri-blur-off-fill:before{content:\"\\eacd\"}.ri-blur-off-line:before{content:\"\\eace\"}.ri-body-scan-fill:before{content:\"\\eacf\"}.ri-body-scan-line:before{content:\"\\ead0\"}.ri-bold:before{content:\"\\ead1\"}.ri-book-2-fill:before{content:\"\\ead2\"}.ri-book-2-line:before{content:\"\\ead3\"}.ri-book-3-fill:before{content:\"\\ead4\"}.ri-book-3-line:before{content:\"\\ead5\"}.ri-book-fill:before{content:\"\\ead6\"}.ri-book-line:before{content:\"\\ead7\"}.ri-book-mark-fill:before{content:\"\\ead8\"}.ri-book-mark-line:before{content:\"\\ead9\"}.ri-book-open-fill:before{content:\"\\eada\"}.ri-book-open-line:before{content:\"\\eadb\"}.ri-book-read-fill:before{content:\"\\eadc\"}.ri-book-read-line:before{content:\"\\eadd\"}.ri-booklet-fill:before{content:\"\\eade\"}.ri-booklet-line:before{content:\"\\eadf\"}.ri-bookmark-2-fill:before{content:\"\\eae0\"}.ri-bookmark-2-line:before{content:\"\\eae1\"}.ri-bookmark-3-fill:before{content:\"\\eae2\"}.ri-bookmark-3-line:before{content:\"\\eae3\"}.ri-bookmark-fill:before{content:\"\\eae4\"}.ri-bookmark-line:before{content:\"\\eae5\"}.ri-boxing-fill:before{content:\"\\eae6\"}.ri-boxing-line:before{content:\"\\eae7\"}.ri-braces-fill:before{content:\"\\eae8\"}.ri-braces-line:before{content:\"\\eae9\"}.ri-brackets-fill:before{content:\"\\eaea\"}.ri-brackets-line:before{content:\"\\eaeb\"}.ri-briefcase-2-fill:before{content:\"\\eaec\"}.ri-briefcase-2-line:before{content:\"\\eaed\"}.ri-briefcase-3-fill:before{content:\"\\eaee\"}.ri-briefcase-3-line:before{content:\"\\eaef\"}.ri-briefcase-4-fill:before{content:\"\\eaf0\"}.ri-briefcase-4-line:before{content:\"\\eaf1\"}.ri-briefcase-5-fill:before{content:\"\\eaf2\"}.ri-briefcase-5-line:before{content:\"\\eaf3\"}.ri-briefcase-fill:before{content:\"\\eaf4\"}.ri-briefcase-line:before{content:\"\\eaf5\"}.ri-bring-forward:before{content:\"\\eaf6\"}.ri-bring-to-front:before{content:\"\\eaf7\"}.ri-broadcast-fill:before{content:\"\\eaf8\"}.ri-broadcast-line:before{content:\"\\eaf9\"}.ri-brush-2-fill:before{content:\"\\eafa\"}.ri-brush-2-line:before{content:\"\\eafb\"}.ri-brush-3-fill:before{content:\"\\eafc\"}.ri-brush-3-line:before{content:\"\\eafd\"}.ri-brush-4-fill:before{content:\"\\eafe\"}.ri-brush-4-line:before{content:\"\\eaff\"}.ri-brush-fill:before{content:\"\\eb00\"}.ri-brush-line:before{content:\"\\eb01\"}.ri-bubble-chart-fill:before{content:\"\\eb02\"}.ri-bubble-chart-line:before{content:\"\\eb03\"}.ri-bug-2-fill:before{content:\"\\eb04\"}.ri-bug-2-line:before{content:\"\\eb05\"}.ri-bug-fill:before{content:\"\\eb06\"}.ri-bug-line:before{content:\"\\eb07\"}.ri-building-2-fill:before{content:\"\\eb08\"}.ri-building-2-line:before{content:\"\\eb09\"}.ri-building-3-fill:before{content:\"\\eb0a\"}.ri-building-3-line:before{content:\"\\eb0b\"}.ri-building-4-fill:before{content:\"\\eb0c\"}.ri-building-4-line:before{content:\"\\eb0d\"}.ri-building-fill:before{content:\"\\eb0e\"}.ri-building-line:before{content:\"\\eb0f\"}.ri-bus-2-fill:before{content:\"\\eb10\"}.ri-bus-2-line:before{content:\"\\eb11\"}.ri-bus-fill:before{content:\"\\eb12\"}.ri-bus-line:before{content:\"\\eb13\"}.ri-bus-wifi-fill:before{content:\"\\eb14\"}.ri-bus-wifi-line:before{content:\"\\eb15\"}.ri-cactus-fill:before{content:\"\\eb16\"}.ri-cactus-line:before{content:\"\\eb17\"}.ri-cake-2-fill:before{content:\"\\eb18\"}.ri-cake-2-line:before{content:\"\\eb19\"}.ri-cake-3-fill:before{content:\"\\eb1a\"}.ri-cake-3-line:before{content:\"\\eb1b\"}.ri-cake-fill:before{content:\"\\eb1c\"}.ri-cake-line:before{content:\"\\eb1d\"}.ri-calculator-fill:before{content:\"\\eb1e\"}.ri-calculator-line:before{content:\"\\eb1f\"}.ri-calendar-2-fill:before{content:\"\\eb20\"}.ri-calendar-2-line:before{content:\"\\eb21\"}.ri-calendar-check-fill:before{content:\"\\eb22\"}.ri-calendar-check-line:before{content:\"\\eb23\"}.ri-calendar-event-fill:before{content:\"\\eb24\"}.ri-calendar-event-line:before{content:\"\\eb25\"}.ri-calendar-fill:before{content:\"\\eb26\"}.ri-calendar-line:before{content:\"\\eb27\"}.ri-calendar-todo-fill:before{content:\"\\eb28\"}.ri-calendar-todo-line:before{content:\"\\eb29\"}.ri-camera-2-fill:before{content:\"\\eb2a\"}.ri-camera-2-line:before{content:\"\\eb2b\"}.ri-camera-3-fill:before{content:\"\\eb2c\"}.ri-camera-3-line:before{content:\"\\eb2d\"}.ri-camera-fill:before{content:\"\\eb2e\"}.ri-camera-lens-fill:before{content:\"\\eb2f\"}.ri-camera-lens-line:before{content:\"\\eb30\"}.ri-camera-line:before{content:\"\\eb31\"}.ri-camera-off-fill:before{content:\"\\eb32\"}.ri-camera-off-line:before{content:\"\\eb33\"}.ri-camera-switch-fill:before{content:\"\\eb34\"}.ri-camera-switch-line:before{content:\"\\eb35\"}.ri-capsule-fill:before{content:\"\\eb36\"}.ri-capsule-line:before{content:\"\\eb37\"}.ri-car-fill:before{content:\"\\eb38\"}.ri-car-line:before{content:\"\\eb39\"}.ri-car-washing-fill:before{content:\"\\eb3a\"}.ri-car-washing-line:before{content:\"\\eb3b\"}.ri-caravan-fill:before{content:\"\\eb3c\"}.ri-caravan-line:before{content:\"\\eb3d\"}.ri-cast-fill:before{content:\"\\eb3e\"}.ri-cast-line:before{content:\"\\eb3f\"}.ri-cellphone-fill:before{content:\"\\eb40\"}.ri-cellphone-line:before{content:\"\\eb41\"}.ri-celsius-fill:before{content:\"\\eb42\"}.ri-celsius-line:before{content:\"\\eb43\"}.ri-centos-fill:before{content:\"\\eb44\"}.ri-centos-line:before{content:\"\\eb45\"}.ri-character-recognition-fill:before{content:\"\\eb46\"}.ri-character-recognition-line:before{content:\"\\eb47\"}.ri-charging-pile-2-fill:before{content:\"\\eb48\"}.ri-charging-pile-2-line:before{content:\"\\eb49\"}.ri-charging-pile-fill:before{content:\"\\eb4a\"}.ri-charging-pile-line:before{content:\"\\eb4b\"}.ri-chat-1-fill:before{content:\"\\eb4c\"}.ri-chat-1-line:before{content:\"\\eb4d\"}.ri-chat-2-fill:before{content:\"\\eb4e\"}.ri-chat-2-line:before{content:\"\\eb4f\"}.ri-chat-3-fill:before{content:\"\\eb50\"}.ri-chat-3-line:before{content:\"\\eb51\"}.ri-chat-4-fill:before{content:\"\\eb52\"}.ri-chat-4-line:before{content:\"\\eb53\"}.ri-chat-check-fill:before{content:\"\\eb54\"}.ri-chat-check-line:before{content:\"\\eb55\"}.ri-chat-delete-fill:before{content:\"\\eb56\"}.ri-chat-delete-line:before{content:\"\\eb57\"}.ri-chat-download-fill:before{content:\"\\eb58\"}.ri-chat-download-line:before{content:\"\\eb59\"}.ri-chat-follow-up-fill:before{content:\"\\eb5a\"}.ri-chat-follow-up-line:before{content:\"\\eb5b\"}.ri-chat-forward-fill:before{content:\"\\eb5c\"}.ri-chat-forward-line:before{content:\"\\eb5d\"}.ri-chat-heart-fill:before{content:\"\\eb5e\"}.ri-chat-heart-line:before{content:\"\\eb5f\"}.ri-chat-history-fill:before{content:\"\\eb60\"}.ri-chat-history-line:before{content:\"\\eb61\"}.ri-chat-new-fill:before{content:\"\\eb62\"}.ri-chat-new-line:before{content:\"\\eb63\"}.ri-chat-off-fill:before{content:\"\\eb64\"}.ri-chat-off-line:before{content:\"\\eb65\"}.ri-chat-poll-fill:before{content:\"\\eb66\"}.ri-chat-poll-line:before{content:\"\\eb67\"}.ri-chat-private-fill:before{content:\"\\eb68\"}.ri-chat-private-line:before{content:\"\\eb69\"}.ri-chat-quote-fill:before{content:\"\\eb6a\"}.ri-chat-quote-line:before{content:\"\\eb6b\"}.ri-chat-settings-fill:before{content:\"\\eb6c\"}.ri-chat-settings-line:before{content:\"\\eb6d\"}.ri-chat-smile-2-fill:before{content:\"\\eb6e\"}.ri-chat-smile-2-line:before{content:\"\\eb6f\"}.ri-chat-smile-3-fill:before{content:\"\\eb70\"}.ri-chat-smile-3-line:before{content:\"\\eb71\"}.ri-chat-smile-fill:before{content:\"\\eb72\"}.ri-chat-smile-line:before{content:\"\\eb73\"}.ri-chat-upload-fill:before{content:\"\\eb74\"}.ri-chat-upload-line:before{content:\"\\eb75\"}.ri-chat-voice-fill:before{content:\"\\eb76\"}.ri-chat-voice-line:before{content:\"\\eb77\"}.ri-check-double-fill:before{content:\"\\eb78\"}.ri-check-double-line:before{content:\"\\eb79\"}.ri-check-fill:before{content:\"\\eb7a\"}.ri-check-line:before{content:\"\\eb7b\"}.ri-checkbox-blank-circle-fill:before{content:\"\\eb7c\"}.ri-checkbox-blank-circle-line:before{content:\"\\eb7d\"}.ri-checkbox-blank-fill:before{content:\"\\eb7e\"}.ri-checkbox-blank-line:before{content:\"\\eb7f\"}.ri-checkbox-circle-fill:before{content:\"\\eb80\"}.ri-checkbox-circle-line:before{content:\"\\eb81\"}.ri-checkbox-fill:before{content:\"\\eb82\"}.ri-checkbox-indeterminate-fill:before{content:\"\\eb83\"}.ri-checkbox-indeterminate-line:before{content:\"\\eb84\"}.ri-checkbox-line:before{content:\"\\eb85\"}.ri-checkbox-multiple-blank-fill:before{content:\"\\eb86\"}.ri-checkbox-multiple-blank-line:before{content:\"\\eb87\"}.ri-checkbox-multiple-fill:before{content:\"\\eb88\"}.ri-checkbox-multiple-line:before{content:\"\\eb89\"}.ri-china-railway-fill:before{content:\"\\eb8a\"}.ri-china-railway-line:before{content:\"\\eb8b\"}.ri-chrome-fill:before{content:\"\\eb8c\"}.ri-chrome-line:before{content:\"\\eb8d\"}.ri-clapperboard-fill:before{content:\"\\eb8e\"}.ri-clapperboard-line:before{content:\"\\eb8f\"}.ri-clipboard-fill:before{content:\"\\eb90\"}.ri-clipboard-line:before{content:\"\\eb91\"}.ri-clockwise-2-fill:before{content:\"\\eb92\"}.ri-clockwise-2-line:before{content:\"\\eb93\"}.ri-clockwise-fill:before{content:\"\\eb94\"}.ri-clockwise-line:before{content:\"\\eb95\"}.ri-close-circle-fill:before{content:\"\\eb96\"}.ri-close-circle-line:before{content:\"\\eb97\"}.ri-close-fill:before{content:\"\\eb98\"}.ri-close-line:before{content:\"\\eb99\"}.ri-closed-captioning-fill:before{content:\"\\eb9a\"}.ri-closed-captioning-line:before{content:\"\\eb9b\"}.ri-cloud-fill:before{content:\"\\eb9c\"}.ri-cloud-line:before{content:\"\\eb9d\"}.ri-cloud-off-fill:before{content:\"\\eb9e\"}.ri-cloud-off-line:before{content:\"\\eb9f\"}.ri-cloud-windy-fill:before{content:\"\\eba0\"}.ri-cloud-windy-line:before{content:\"\\eba1\"}.ri-cloudy-2-fill:before{content:\"\\eba2\"}.ri-cloudy-2-line:before{content:\"\\eba3\"}.ri-cloudy-fill:before{content:\"\\eba4\"}.ri-cloudy-line:before{content:\"\\eba5\"}.ri-code-box-fill:before{content:\"\\eba6\"}.ri-code-box-line:before{content:\"\\eba7\"}.ri-code-fill:before{content:\"\\eba8\"}.ri-code-line:before{content:\"\\eba9\"}.ri-code-s-fill:before{content:\"\\ebaa\"}.ri-code-s-line:before{content:\"\\ebab\"}.ri-code-s-slash-fill:before{content:\"\\ebac\"}.ri-code-s-slash-line:before{content:\"\\ebad\"}.ri-code-view:before{content:\"\\ebae\"}.ri-codepen-fill:before{content:\"\\ebaf\"}.ri-codepen-line:before{content:\"\\ebb0\"}.ri-coin-fill:before{content:\"\\ebb1\"}.ri-coin-line:before{content:\"\\ebb2\"}.ri-coins-fill:before{content:\"\\ebb3\"}.ri-coins-line:before{content:\"\\ebb4\"}.ri-collage-fill:before{content:\"\\ebb5\"}.ri-collage-line:before{content:\"\\ebb6\"}.ri-command-fill:before{content:\"\\ebb7\"}.ri-command-line:before{content:\"\\ebb8\"}.ri-community-fill:before{content:\"\\ebb9\"}.ri-community-line:before{content:\"\\ebba\"}.ri-compass-2-fill:before{content:\"\\ebbb\"}.ri-compass-2-line:before{content:\"\\ebbc\"}.ri-compass-3-fill:before{content:\"\\ebbd\"}.ri-compass-3-line:before{content:\"\\ebbe\"}.ri-compass-4-fill:before{content:\"\\ebbf\"}.ri-compass-4-line:before{content:\"\\ebc0\"}.ri-compass-discover-fill:before{content:\"\\ebc1\"}.ri-compass-discover-line:before{content:\"\\ebc2\"}.ri-compass-fill:before{content:\"\\ebc3\"}.ri-compass-line:before{content:\"\\ebc4\"}.ri-compasses-2-fill:before{content:\"\\ebc5\"}.ri-compasses-2-line:before{content:\"\\ebc6\"}.ri-compasses-fill:before{content:\"\\ebc7\"}.ri-compasses-line:before{content:\"\\ebc8\"}.ri-computer-fill:before{content:\"\\ebc9\"}.ri-computer-line:before{content:\"\\ebca\"}.ri-contacts-book-2-fill:before{content:\"\\ebcb\"}.ri-contacts-book-2-line:before{content:\"\\ebcc\"}.ri-contacts-book-fill:before{content:\"\\ebcd\"}.ri-contacts-book-line:before{content:\"\\ebce\"}.ri-contacts-book-upload-fill:before{content:\"\\ebcf\"}.ri-contacts-book-upload-line:before{content:\"\\ebd0\"}.ri-contacts-fill:before{content:\"\\ebd1\"}.ri-contacts-line:before{content:\"\\ebd2\"}.ri-contrast-2-fill:before{content:\"\\ebd3\"}.ri-contrast-2-line:before{content:\"\\ebd4\"}.ri-contrast-drop-2-fill:before{content:\"\\ebd5\"}.ri-contrast-drop-2-line:before{content:\"\\ebd6\"}.ri-contrast-drop-fill:before{content:\"\\ebd7\"}.ri-contrast-drop-line:before{content:\"\\ebd8\"}.ri-contrast-fill:before{content:\"\\ebd9\"}.ri-contrast-line:before{content:\"\\ebda\"}.ri-copper-coin-fill:before{content:\"\\ebdb\"}.ri-copper-coin-line:before{content:\"\\ebdc\"}.ri-copper-diamond-fill:before{content:\"\\ebdd\"}.ri-copper-diamond-line:before{content:\"\\ebde\"}.ri-copyleft-fill:before{content:\"\\ebdf\"}.ri-copyleft-line:before{content:\"\\ebe0\"}.ri-copyright-fill:before{content:\"\\ebe1\"}.ri-copyright-line:before{content:\"\\ebe2\"}.ri-coreos-fill:before{content:\"\\ebe3\"}.ri-coreos-line:before{content:\"\\ebe4\"}.ri-coupon-2-fill:before{content:\"\\ebe5\"}.ri-coupon-2-line:before{content:\"\\ebe6\"}.ri-coupon-3-fill:before{content:\"\\ebe7\"}.ri-coupon-3-line:before{content:\"\\ebe8\"}.ri-coupon-4-fill:before{content:\"\\ebe9\"}.ri-coupon-4-line:before{content:\"\\ebea\"}.ri-coupon-5-fill:before{content:\"\\ebeb\"}.ri-coupon-5-line:before{content:\"\\ebec\"}.ri-coupon-fill:before{content:\"\\ebed\"}.ri-coupon-line:before{content:\"\\ebee\"}.ri-cpu-fill:before{content:\"\\ebef\"}.ri-cpu-line:before{content:\"\\ebf0\"}.ri-creative-commons-by-fill:before{content:\"\\ebf1\"}.ri-creative-commons-by-line:before{content:\"\\ebf2\"}.ri-creative-commons-fill:before{content:\"\\ebf3\"}.ri-creative-commons-line:before{content:\"\\ebf4\"}.ri-creative-commons-nc-fill:before{content:\"\\ebf5\"}.ri-creative-commons-nc-line:before{content:\"\\ebf6\"}.ri-creative-commons-nd-fill:before{content:\"\\ebf7\"}.ri-creative-commons-nd-line:before{content:\"\\ebf8\"}.ri-creative-commons-sa-fill:before{content:\"\\ebf9\"}.ri-creative-commons-sa-line:before{content:\"\\ebfa\"}.ri-creative-commons-zero-fill:before{content:\"\\ebfb\"}.ri-creative-commons-zero-line:before{content:\"\\ebfc\"}.ri-criminal-fill:before{content:\"\\ebfd\"}.ri-criminal-line:before{content:\"\\ebfe\"}.ri-crop-2-fill:before{content:\"\\ebff\"}.ri-crop-2-line:before{content:\"\\ec00\"}.ri-crop-fill:before{content:\"\\ec01\"}.ri-crop-line:before{content:\"\\ec02\"}.ri-css3-fill:before{content:\"\\ec03\"}.ri-css3-line:before{content:\"\\ec04\"}.ri-cup-fill:before{content:\"\\ec05\"}.ri-cup-line:before{content:\"\\ec06\"}.ri-currency-fill:before{content:\"\\ec07\"}.ri-currency-line:before{content:\"\\ec08\"}.ri-cursor-fill:before{content:\"\\ec09\"}.ri-cursor-line:before{content:\"\\ec0a\"}.ri-customer-service-2-fill:before{content:\"\\ec0b\"}.ri-customer-service-2-line:before{content:\"\\ec0c\"}.ri-customer-service-fill:before{content:\"\\ec0d\"}.ri-customer-service-line:before{content:\"\\ec0e\"}.ri-dashboard-2-fill:before{content:\"\\ec0f\"}.ri-dashboard-2-line:before{content:\"\\ec10\"}.ri-dashboard-3-fill:before{content:\"\\ec11\"}.ri-dashboard-3-line:before{content:\"\\ec12\"}.ri-dashboard-fill:before{content:\"\\ec13\"}.ri-dashboard-line:before{content:\"\\ec14\"}.ri-database-2-fill:before{content:\"\\ec15\"}.ri-database-2-line:before{content:\"\\ec16\"}.ri-database-fill:before{content:\"\\ec17\"}.ri-database-line:before{content:\"\\ec18\"}.ri-delete-back-2-fill:before{content:\"\\ec19\"}.ri-delete-back-2-line:before{content:\"\\ec1a\"}.ri-delete-back-fill:before{content:\"\\ec1b\"}.ri-delete-back-line:before{content:\"\\ec1c\"}.ri-delete-bin-2-fill:before{content:\"\\ec1d\"}.ri-delete-bin-2-line:before{content:\"\\ec1e\"}.ri-delete-bin-3-fill:before{content:\"\\ec1f\"}.ri-delete-bin-3-line:before{content:\"\\ec20\"}.ri-delete-bin-4-fill:before{content:\"\\ec21\"}.ri-delete-bin-4-line:before{content:\"\\ec22\"}.ri-delete-bin-5-fill:before{content:\"\\ec23\"}.ri-delete-bin-5-line:before{content:\"\\ec24\"}.ri-delete-bin-6-fill:before{content:\"\\ec25\"}.ri-delete-bin-6-line:before{content:\"\\ec26\"}.ri-delete-bin-7-fill:before{content:\"\\ec27\"}.ri-delete-bin-7-line:before{content:\"\\ec28\"}.ri-delete-bin-fill:before{content:\"\\ec29\"}.ri-delete-bin-line:before{content:\"\\ec2a\"}.ri-delete-column:before{content:\"\\ec2b\"}.ri-delete-row:before{content:\"\\ec2c\"}.ri-device-fill:before{content:\"\\ec2d\"}.ri-device-line:before{content:\"\\ec2e\"}.ri-device-recover-fill:before{content:\"\\ec2f\"}.ri-device-recover-line:before{content:\"\\ec30\"}.ri-dingding-fill:before{content:\"\\ec31\"}.ri-dingding-line:before{content:\"\\ec32\"}.ri-direction-fill:before{content:\"\\ec33\"}.ri-direction-line:before{content:\"\\ec34\"}.ri-disc-fill:before{content:\"\\ec35\"}.ri-disc-line:before{content:\"\\ec36\"}.ri-discord-fill:before{content:\"\\ec37\"}.ri-discord-line:before{content:\"\\ec38\"}.ri-discuss-fill:before{content:\"\\ec39\"}.ri-discuss-line:before{content:\"\\ec3a\"}.ri-dislike-fill:before{content:\"\\ec3b\"}.ri-dislike-line:before{content:\"\\ec3c\"}.ri-disqus-fill:before{content:\"\\ec3d\"}.ri-disqus-line:before{content:\"\\ec3e\"}.ri-divide-fill:before{content:\"\\ec3f\"}.ri-divide-line:before{content:\"\\ec40\"}.ri-donut-chart-fill:before{content:\"\\ec41\"}.ri-donut-chart-line:before{content:\"\\ec42\"}.ri-door-closed-fill:before{content:\"\\ec43\"}.ri-door-closed-line:before{content:\"\\ec44\"}.ri-door-fill:before{content:\"\\ec45\"}.ri-door-line:before{content:\"\\ec46\"}.ri-door-lock-box-fill:before{content:\"\\ec47\"}.ri-door-lock-box-line:before{content:\"\\ec48\"}.ri-door-lock-fill:before{content:\"\\ec49\"}.ri-door-lock-line:before{content:\"\\ec4a\"}.ri-door-open-fill:before{content:\"\\ec4b\"}.ri-door-open-line:before{content:\"\\ec4c\"}.ri-dossier-fill:before{content:\"\\ec4d\"}.ri-dossier-line:before{content:\"\\ec4e\"}.ri-douban-fill:before{content:\"\\ec4f\"}.ri-douban-line:before{content:\"\\ec50\"}.ri-double-quotes-l:before{content:\"\\ec51\"}.ri-double-quotes-r:before{content:\"\\ec52\"}.ri-download-2-fill:before{content:\"\\ec53\"}.ri-download-2-line:before{content:\"\\ec54\"}.ri-download-cloud-2-fill:before{content:\"\\ec55\"}.ri-download-cloud-2-line:before{content:\"\\ec56\"}.ri-download-cloud-fill:before{content:\"\\ec57\"}.ri-download-cloud-line:before{content:\"\\ec58\"}.ri-download-fill:before{content:\"\\ec59\"}.ri-download-line:before{content:\"\\ec5a\"}.ri-draft-fill:before{content:\"\\ec5b\"}.ri-draft-line:before{content:\"\\ec5c\"}.ri-drag-drop-fill:before{content:\"\\ec5d\"}.ri-drag-drop-line:before{content:\"\\ec5e\"}.ri-drag-move-2-fill:before{content:\"\\ec5f\"}.ri-drag-move-2-line:before{content:\"\\ec60\"}.ri-drag-move-fill:before{content:\"\\ec61\"}.ri-drag-move-line:before{content:\"\\ec62\"}.ri-dribbble-fill:before{content:\"\\ec63\"}.ri-dribbble-line:before{content:\"\\ec64\"}.ri-drive-fill:before{content:\"\\ec65\"}.ri-drive-line:before{content:\"\\ec66\"}.ri-drizzle-fill:before{content:\"\\ec67\"}.ri-drizzle-line:before{content:\"\\ec68\"}.ri-drop-fill:before{content:\"\\ec69\"}.ri-drop-line:before{content:\"\\ec6a\"}.ri-dropbox-fill:before{content:\"\\ec6b\"}.ri-dropbox-line:before{content:\"\\ec6c\"}.ri-dual-sim-1-fill:before{content:\"\\ec6d\"}.ri-dual-sim-1-line:before{content:\"\\ec6e\"}.ri-dual-sim-2-fill:before{content:\"\\ec6f\"}.ri-dual-sim-2-line:before{content:\"\\ec70\"}.ri-dv-fill:before{content:\"\\ec71\"}.ri-dv-line:before{content:\"\\ec72\"}.ri-dvd-fill:before{content:\"\\ec73\"}.ri-dvd-line:before{content:\"\\ec74\"}.ri-e-bike-2-fill:before{content:\"\\ec75\"}.ri-e-bike-2-line:before{content:\"\\ec76\"}.ri-e-bike-fill:before{content:\"\\ec77\"}.ri-e-bike-line:before{content:\"\\ec78\"}.ri-earth-fill:before{content:\"\\ec79\"}.ri-earth-line:before{content:\"\\ec7a\"}.ri-earthquake-fill:before{content:\"\\ec7b\"}.ri-earthquake-line:before{content:\"\\ec7c\"}.ri-edge-fill:before{content:\"\\ec7d\"}.ri-edge-line:before{content:\"\\ec7e\"}.ri-edit-2-fill:before{content:\"\\ec7f\"}.ri-edit-2-line:before{content:\"\\ec80\"}.ri-edit-box-fill:before{content:\"\\ec81\"}.ri-edit-box-line:before{content:\"\\ec82\"}.ri-edit-circle-fill:before{content:\"\\ec83\"}.ri-edit-circle-line:before{content:\"\\ec84\"}.ri-edit-fill:before{content:\"\\ec85\"}.ri-edit-line:before{content:\"\\ec86\"}.ri-eject-fill:before{content:\"\\ec87\"}.ri-eject-line:before{content:\"\\ec88\"}.ri-emotion-2-fill:before{content:\"\\ec89\"}.ri-emotion-2-line:before{content:\"\\ec8a\"}.ri-emotion-fill:before{content:\"\\ec8b\"}.ri-emotion-happy-fill:before{content:\"\\ec8c\"}.ri-emotion-happy-line:before{content:\"\\ec8d\"}.ri-emotion-laugh-fill:before{content:\"\\ec8e\"}.ri-emotion-laugh-line:before{content:\"\\ec8f\"}.ri-emotion-line:before{content:\"\\ec90\"}.ri-emotion-normal-fill:before{content:\"\\ec91\"}.ri-emotion-normal-line:before{content:\"\\ec92\"}.ri-emotion-sad-fill:before{content:\"\\ec93\"}.ri-emotion-sad-line:before{content:\"\\ec94\"}.ri-emotion-unhappy-fill:before{content:\"\\ec95\"}.ri-emotion-unhappy-line:before{content:\"\\ec96\"}.ri-empathize-fill:before{content:\"\\ec97\"}.ri-empathize-line:before{content:\"\\ec98\"}.ri-emphasis-cn:before{content:\"\\ec99\"}.ri-emphasis:before{content:\"\\ec9a\"}.ri-english-input:before{content:\"\\ec9b\"}.ri-equalizer-fill:before{content:\"\\ec9c\"}.ri-equalizer-line:before{content:\"\\ec9d\"}.ri-eraser-fill:before{content:\"\\ec9e\"}.ri-eraser-line:before{content:\"\\ec9f\"}.ri-error-warning-fill:before{content:\"\\eca0\"}.ri-error-warning-line:before{content:\"\\eca1\"}.ri-evernote-fill:before{content:\"\\eca2\"}.ri-evernote-line:before{content:\"\\eca3\"}.ri-exchange-box-fill:before{content:\"\\eca4\"}.ri-exchange-box-line:before{content:\"\\eca5\"}.ri-exchange-cny-fill:before{content:\"\\eca6\"}.ri-exchange-cny-line:before{content:\"\\eca7\"}.ri-exchange-dollar-fill:before{content:\"\\eca8\"}.ri-exchange-dollar-line:before{content:\"\\eca9\"}.ri-exchange-fill:before{content:\"\\ecaa\"}.ri-exchange-funds-fill:before{content:\"\\ecab\"}.ri-exchange-funds-line:before{content:\"\\ecac\"}.ri-exchange-line:before{content:\"\\ecad\"}.ri-external-link-fill:before{content:\"\\ecae\"}.ri-external-link-line:before{content:\"\\ecaf\"}.ri-eye-2-fill:before{content:\"\\ecb0\"}.ri-eye-2-line:before{content:\"\\ecb1\"}.ri-eye-close-fill:before{content:\"\\ecb2\"}.ri-eye-close-line:before{content:\"\\ecb3\"}.ri-eye-fill:before{content:\"\\ecb4\"}.ri-eye-line:before{content:\"\\ecb5\"}.ri-eye-off-fill:before{content:\"\\ecb6\"}.ri-eye-off-line:before{content:\"\\ecb7\"}.ri-facebook-box-fill:before{content:\"\\ecb8\"}.ri-facebook-box-line:before{content:\"\\ecb9\"}.ri-facebook-circle-fill:before{content:\"\\ecba\"}.ri-facebook-circle-line:before{content:\"\\ecbb\"}.ri-facebook-fill:before{content:\"\\ecbc\"}.ri-facebook-line:before{content:\"\\ecbd\"}.ri-fahrenheit-fill:before{content:\"\\ecbe\"}.ri-fahrenheit-line:before{content:\"\\ecbf\"}.ri-feedback-fill:before{content:\"\\ecc0\"}.ri-feedback-line:before{content:\"\\ecc1\"}.ri-file-2-fill:before{content:\"\\ecc2\"}.ri-file-2-line:before{content:\"\\ecc3\"}.ri-file-3-fill:before{content:\"\\ecc4\"}.ri-file-3-line:before{content:\"\\ecc5\"}.ri-file-4-fill:before{content:\"\\ecc6\"}.ri-file-4-line:before{content:\"\\ecc7\"}.ri-file-add-fill:before{content:\"\\ecc8\"}.ri-file-add-line:before{content:\"\\ecc9\"}.ri-file-chart-2-fill:before{content:\"\\ecca\"}.ri-file-chart-2-line:before{content:\"\\eccb\"}.ri-file-chart-fill:before{content:\"\\eccc\"}.ri-file-chart-line:before{content:\"\\eccd\"}.ri-file-cloud-fill:before{content:\"\\ecce\"}.ri-file-cloud-line:before{content:\"\\eccf\"}.ri-file-code-fill:before{content:\"\\ecd0\"}.ri-file-code-line:before{content:\"\\ecd1\"}.ri-file-copy-2-fill:before{content:\"\\ecd2\"}.ri-file-copy-2-line:before{content:\"\\ecd3\"}.ri-file-copy-fill:before{content:\"\\ecd4\"}.ri-file-copy-line:before{content:\"\\ecd5\"}.ri-file-damage-fill:before{content:\"\\ecd6\"}.ri-file-damage-line:before{content:\"\\ecd7\"}.ri-file-download-fill:before{content:\"\\ecd8\"}.ri-file-download-line:before{content:\"\\ecd9\"}.ri-file-edit-fill:before{content:\"\\ecda\"}.ri-file-edit-line:before{content:\"\\ecdb\"}.ri-file-excel-2-fill:before{content:\"\\ecdc\"}.ri-file-excel-2-line:before{content:\"\\ecdd\"}.ri-file-excel-fill:before{content:\"\\ecde\"}.ri-file-excel-line:before{content:\"\\ecdf\"}.ri-file-fill:before{content:\"\\ece0\"}.ri-file-forbid-fill:before{content:\"\\ece1\"}.ri-file-forbid-line:before{content:\"\\ece2\"}.ri-file-gif-fill:before{content:\"\\ece3\"}.ri-file-gif-line:before{content:\"\\ece4\"}.ri-file-history-fill:before{content:\"\\ece5\"}.ri-file-history-line:before{content:\"\\ece6\"}.ri-file-hwp-fill:before{content:\"\\ece7\"}.ri-file-hwp-line:before{content:\"\\ece8\"}.ri-file-info-fill:before{content:\"\\ece9\"}.ri-file-info-line:before{content:\"\\ecea\"}.ri-file-line:before{content:\"\\eceb\"}.ri-file-list-2-fill:before{content:\"\\ecec\"}.ri-file-list-2-line:before{content:\"\\eced\"}.ri-file-list-3-fill:before{content:\"\\ecee\"}.ri-file-list-3-line:before{content:\"\\ecef\"}.ri-file-list-fill:before{content:\"\\ecf0\"}.ri-file-list-line:before{content:\"\\ecf1\"}.ri-file-lock-fill:before{content:\"\\ecf2\"}.ri-file-lock-line:before{content:\"\\ecf3\"}.ri-file-mark-fill:before{content:\"\\ecf4\"}.ri-file-mark-line:before{content:\"\\ecf5\"}.ri-file-music-fill:before{content:\"\\ecf6\"}.ri-file-music-line:before{content:\"\\ecf7\"}.ri-file-paper-2-fill:before{content:\"\\ecf8\"}.ri-file-paper-2-line:before{content:\"\\ecf9\"}.ri-file-paper-fill:before{content:\"\\ecfa\"}.ri-file-paper-line:before{content:\"\\ecfb\"}.ri-file-pdf-fill:before{content:\"\\ecfc\"}.ri-file-pdf-line:before{content:\"\\ecfd\"}.ri-file-ppt-2-fill:before{content:\"\\ecfe\"}.ri-file-ppt-2-line:before{content:\"\\ecff\"}.ri-file-ppt-fill:before{content:\"\\ed00\"}.ri-file-ppt-line:before{content:\"\\ed01\"}.ri-file-reduce-fill:before{content:\"\\ed02\"}.ri-file-reduce-line:before{content:\"\\ed03\"}.ri-file-search-fill:before{content:\"\\ed04\"}.ri-file-search-line:before{content:\"\\ed05\"}.ri-file-settings-fill:before{content:\"\\ed06\"}.ri-file-settings-line:before{content:\"\\ed07\"}.ri-file-shield-2-fill:before{content:\"\\ed08\"}.ri-file-shield-2-line:before{content:\"\\ed09\"}.ri-file-shield-fill:before{content:\"\\ed0a\"}.ri-file-shield-line:before{content:\"\\ed0b\"}.ri-file-shred-fill:before{content:\"\\ed0c\"}.ri-file-shred-line:before{content:\"\\ed0d\"}.ri-file-text-fill:before{content:\"\\ed0e\"}.ri-file-text-line:before{content:\"\\ed0f\"}.ri-file-transfer-fill:before{content:\"\\ed10\"}.ri-file-transfer-line:before{content:\"\\ed11\"}.ri-file-unknow-fill:before{content:\"\\ed12\"}.ri-file-unknow-line:before{content:\"\\ed13\"}.ri-file-upload-fill:before{content:\"\\ed14\"}.ri-file-upload-line:before{content:\"\\ed15\"}.ri-file-user-fill:before{content:\"\\ed16\"}.ri-file-user-line:before{content:\"\\ed17\"}.ri-file-warning-fill:before{content:\"\\ed18\"}.ri-file-warning-line:before{content:\"\\ed19\"}.ri-file-word-2-fill:before{content:\"\\ed1a\"}.ri-file-word-2-line:before{content:\"\\ed1b\"}.ri-file-word-fill:before{content:\"\\ed1c\"}.ri-file-word-line:before{content:\"\\ed1d\"}.ri-file-zip-fill:before{content:\"\\ed1e\"}.ri-file-zip-line:before{content:\"\\ed1f\"}.ri-film-fill:before{content:\"\\ed20\"}.ri-film-line:before{content:\"\\ed21\"}.ri-filter-2-fill:before{content:\"\\ed22\"}.ri-filter-2-line:before{content:\"\\ed23\"}.ri-filter-3-fill:before{content:\"\\ed24\"}.ri-filter-3-line:before{content:\"\\ed25\"}.ri-filter-fill:before{content:\"\\ed26\"}.ri-filter-line:before{content:\"\\ed27\"}.ri-filter-off-fill:before{content:\"\\ed28\"}.ri-filter-off-line:before{content:\"\\ed29\"}.ri-find-replace-fill:before{content:\"\\ed2a\"}.ri-find-replace-line:before{content:\"\\ed2b\"}.ri-finder-fill:before{content:\"\\ed2c\"}.ri-finder-line:before{content:\"\\ed2d\"}.ri-fingerprint-2-fill:before{content:\"\\ed2e\"}.ri-fingerprint-2-line:before{content:\"\\ed2f\"}.ri-fingerprint-fill:before{content:\"\\ed30\"}.ri-fingerprint-line:before{content:\"\\ed31\"}.ri-fire-fill:before{content:\"\\ed32\"}.ri-fire-line:before{content:\"\\ed33\"}.ri-firefox-fill:before{content:\"\\ed34\"}.ri-firefox-line:before{content:\"\\ed35\"}.ri-first-aid-kit-fill:before{content:\"\\ed36\"}.ri-first-aid-kit-line:before{content:\"\\ed37\"}.ri-flag-2-fill:before{content:\"\\ed38\"}.ri-flag-2-line:before{content:\"\\ed39\"}.ri-flag-fill:before{content:\"\\ed3a\"}.ri-flag-line:before{content:\"\\ed3b\"}.ri-flashlight-fill:before{content:\"\\ed3c\"}.ri-flashlight-line:before{content:\"\\ed3d\"}.ri-flask-fill:before{content:\"\\ed3e\"}.ri-flask-line:before{content:\"\\ed3f\"}.ri-flight-land-fill:before{content:\"\\ed40\"}.ri-flight-land-line:before{content:\"\\ed41\"}.ri-flight-takeoff-fill:before{content:\"\\ed42\"}.ri-flight-takeoff-line:before{content:\"\\ed43\"}.ri-flood-fill:before{content:\"\\ed44\"}.ri-flood-line:before{content:\"\\ed45\"}.ri-flow-chart:before{content:\"\\ed46\"}.ri-flutter-fill:before{content:\"\\ed47\"}.ri-flutter-line:before{content:\"\\ed48\"}.ri-focus-2-fill:before{content:\"\\ed49\"}.ri-focus-2-line:before{content:\"\\ed4a\"}.ri-focus-3-fill:before{content:\"\\ed4b\"}.ri-focus-3-line:before{content:\"\\ed4c\"}.ri-focus-fill:before{content:\"\\ed4d\"}.ri-focus-line:before{content:\"\\ed4e\"}.ri-foggy-fill:before{content:\"\\ed4f\"}.ri-foggy-line:before{content:\"\\ed50\"}.ri-folder-2-fill:before{content:\"\\ed51\"}.ri-folder-2-line:before{content:\"\\ed52\"}.ri-folder-3-fill:before{content:\"\\ed53\"}.ri-folder-3-line:before{content:\"\\ed54\"}.ri-folder-4-fill:before{content:\"\\ed55\"}.ri-folder-4-line:before{content:\"\\ed56\"}.ri-folder-5-fill:before{content:\"\\ed57\"}.ri-folder-5-line:before{content:\"\\ed58\"}.ri-folder-add-fill:before{content:\"\\ed59\"}.ri-folder-add-line:before{content:\"\\ed5a\"}.ri-folder-chart-2-fill:before{content:\"\\ed5b\"}.ri-folder-chart-2-line:before{content:\"\\ed5c\"}.ri-folder-chart-fill:before{content:\"\\ed5d\"}.ri-folder-chart-line:before{content:\"\\ed5e\"}.ri-folder-download-fill:before{content:\"\\ed5f\"}.ri-folder-download-line:before{content:\"\\ed60\"}.ri-folder-fill:before{content:\"\\ed61\"}.ri-folder-forbid-fill:before{content:\"\\ed62\"}.ri-folder-forbid-line:before{content:\"\\ed63\"}.ri-folder-history-fill:before{content:\"\\ed64\"}.ri-folder-history-line:before{content:\"\\ed65\"}.ri-folder-info-fill:before{content:\"\\ed66\"}.ri-folder-info-line:before{content:\"\\ed67\"}.ri-folder-keyhole-fill:before{content:\"\\ed68\"}.ri-folder-keyhole-line:before{content:\"\\ed69\"}.ri-folder-line:before{content:\"\\ed6a\"}.ri-folder-lock-fill:before{content:\"\\ed6b\"}.ri-folder-lock-line:before{content:\"\\ed6c\"}.ri-folder-music-fill:before{content:\"\\ed6d\"}.ri-folder-music-line:before{content:\"\\ed6e\"}.ri-folder-open-fill:before{content:\"\\ed6f\"}.ri-folder-open-line:before{content:\"\\ed70\"}.ri-folder-received-fill:before{content:\"\\ed71\"}.ri-folder-received-line:before{content:\"\\ed72\"}.ri-folder-reduce-fill:before{content:\"\\ed73\"}.ri-folder-reduce-line:before{content:\"\\ed74\"}.ri-folder-settings-fill:before{content:\"\\ed75\"}.ri-folder-settings-line:before{content:\"\\ed76\"}.ri-folder-shared-fill:before{content:\"\\ed77\"}.ri-folder-shared-line:before{content:\"\\ed78\"}.ri-folder-shield-2-fill:before{content:\"\\ed79\"}.ri-folder-shield-2-line:before{content:\"\\ed7a\"}.ri-folder-shield-fill:before{content:\"\\ed7b\"}.ri-folder-shield-line:before{content:\"\\ed7c\"}.ri-folder-transfer-fill:before{content:\"\\ed7d\"}.ri-folder-transfer-line:before{content:\"\\ed7e\"}.ri-folder-unknow-fill:before{content:\"\\ed7f\"}.ri-folder-unknow-line:before{content:\"\\ed80\"}.ri-folder-upload-fill:before{content:\"\\ed81\"}.ri-folder-upload-line:before{content:\"\\ed82\"}.ri-folder-user-fill:before{content:\"\\ed83\"}.ri-folder-user-line:before{content:\"\\ed84\"}.ri-folder-warning-fill:before{content:\"\\ed85\"}.ri-folder-warning-line:before{content:\"\\ed86\"}.ri-folder-zip-fill:before{content:\"\\ed87\"}.ri-folder-zip-line:before{content:\"\\ed88\"}.ri-folders-fill:before{content:\"\\ed89\"}.ri-folders-line:before{content:\"\\ed8a\"}.ri-font-color:before{content:\"\\ed8b\"}.ri-font-size-2:before{content:\"\\ed8c\"}.ri-font-size:before{content:\"\\ed8d\"}.ri-football-fill:before{content:\"\\ed8e\"}.ri-football-line:before{content:\"\\ed8f\"}.ri-footprint-fill:before{content:\"\\ed90\"}.ri-footprint-line:before{content:\"\\ed91\"}.ri-forbid-2-fill:before{content:\"\\ed92\"}.ri-forbid-2-line:before{content:\"\\ed93\"}.ri-forbid-fill:before{content:\"\\ed94\"}.ri-forbid-line:before{content:\"\\ed95\"}.ri-format-clear:before{content:\"\\ed96\"}.ri-fridge-fill:before{content:\"\\ed97\"}.ri-fridge-line:before{content:\"\\ed98\"}.ri-fullscreen-exit-fill:before{content:\"\\ed99\"}.ri-fullscreen-exit-line:before{content:\"\\ed9a\"}.ri-fullscreen-fill:before{content:\"\\ed9b\"}.ri-fullscreen-line:before{content:\"\\ed9c\"}.ri-function-fill:before{content:\"\\ed9d\"}.ri-function-line:before{content:\"\\ed9e\"}.ri-functions:before{content:\"\\ed9f\"}.ri-funds-box-fill:before{content:\"\\eda0\"}.ri-funds-box-line:before{content:\"\\eda1\"}.ri-funds-fill:before{content:\"\\eda2\"}.ri-funds-line:before{content:\"\\eda3\"}.ri-gallery-fill:before{content:\"\\eda4\"}.ri-gallery-line:before{content:\"\\eda5\"}.ri-gallery-upload-fill:before{content:\"\\eda6\"}.ri-gallery-upload-line:before{content:\"\\eda7\"}.ri-game-fill:before{content:\"\\eda8\"}.ri-game-line:before{content:\"\\eda9\"}.ri-gamepad-fill:before{content:\"\\edaa\"}.ri-gamepad-line:before{content:\"\\edab\"}.ri-gas-station-fill:before{content:\"\\edac\"}.ri-gas-station-line:before{content:\"\\edad\"}.ri-gatsby-fill:before{content:\"\\edae\"}.ri-gatsby-line:before{content:\"\\edaf\"}.ri-genderless-fill:before{content:\"\\edb0\"}.ri-genderless-line:before{content:\"\\edb1\"}.ri-ghost-2-fill:before{content:\"\\edb2\"}.ri-ghost-2-line:before{content:\"\\edb3\"}.ri-ghost-fill:before{content:\"\\edb4\"}.ri-ghost-line:before{content:\"\\edb5\"}.ri-ghost-smile-fill:before{content:\"\\edb6\"}.ri-ghost-smile-line:before{content:\"\\edb7\"}.ri-gift-2-fill:before{content:\"\\edb8\"}.ri-gift-2-line:before{content:\"\\edb9\"}.ri-gift-fill:before{content:\"\\edba\"}.ri-gift-line:before{content:\"\\edbb\"}.ri-git-branch-fill:before{content:\"\\edbc\"}.ri-git-branch-line:before{content:\"\\edbd\"}.ri-git-commit-fill:before{content:\"\\edbe\"}.ri-git-commit-line:before{content:\"\\edbf\"}.ri-git-merge-fill:before{content:\"\\edc0\"}.ri-git-merge-line:before{content:\"\\edc1\"}.ri-git-pull-request-fill:before{content:\"\\edc2\"}.ri-git-pull-request-line:before{content:\"\\edc3\"}.ri-git-repository-commits-fill:before{content:\"\\edc4\"}.ri-git-repository-commits-line:before{content:\"\\edc5\"}.ri-git-repository-fill:before{content:\"\\edc6\"}.ri-git-repository-line:before{content:\"\\edc7\"}.ri-git-repository-private-fill:before{content:\"\\edc8\"}.ri-git-repository-private-line:before{content:\"\\edc9\"}.ri-github-fill:before{content:\"\\edca\"}.ri-github-line:before{content:\"\\edcb\"}.ri-gitlab-fill:before{content:\"\\edcc\"}.ri-gitlab-line:before{content:\"\\edcd\"}.ri-global-fill:before{content:\"\\edce\"}.ri-global-line:before{content:\"\\edcf\"}.ri-globe-fill:before{content:\"\\edd0\"}.ri-globe-line:before{content:\"\\edd1\"}.ri-goblet-fill:before{content:\"\\edd2\"}.ri-goblet-line:before{content:\"\\edd3\"}.ri-google-fill:before{content:\"\\edd4\"}.ri-google-line:before{content:\"\\edd5\"}.ri-google-play-fill:before{content:\"\\edd6\"}.ri-google-play-line:before{content:\"\\edd7\"}.ri-government-fill:before{content:\"\\edd8\"}.ri-government-line:before{content:\"\\edd9\"}.ri-gps-fill:before{content:\"\\edda\"}.ri-gps-line:before{content:\"\\eddb\"}.ri-gradienter-fill:before{content:\"\\eddc\"}.ri-gradienter-line:before{content:\"\\eddd\"}.ri-grid-fill:before{content:\"\\edde\"}.ri-grid-line:before{content:\"\\eddf\"}.ri-group-2-fill:before{content:\"\\ede0\"}.ri-group-2-line:before{content:\"\\ede1\"}.ri-group-fill:before{content:\"\\ede2\"}.ri-group-line:before{content:\"\\ede3\"}.ri-guide-fill:before{content:\"\\ede4\"}.ri-guide-line:before{content:\"\\ede5\"}.ri-h-1:before{content:\"\\ede6\"}.ri-h-2:before{content:\"\\ede7\"}.ri-h-3:before{content:\"\\ede8\"}.ri-h-4:before{content:\"\\ede9\"}.ri-h-5:before{content:\"\\edea\"}.ri-h-6:before{content:\"\\edeb\"}.ri-hail-fill:before{content:\"\\edec\"}.ri-hail-line:before{content:\"\\eded\"}.ri-hammer-fill:before{content:\"\\edee\"}.ri-hammer-line:before{content:\"\\edef\"}.ri-hand-coin-fill:before{content:\"\\edf0\"}.ri-hand-coin-line:before{content:\"\\edf1\"}.ri-hand-heart-fill:before{content:\"\\edf2\"}.ri-hand-heart-line:before{content:\"\\edf3\"}.ri-hand-sanitizer-fill:before{content:\"\\edf4\"}.ri-hand-sanitizer-line:before{content:\"\\edf5\"}.ri-handbag-fill:before{content:\"\\edf6\"}.ri-handbag-line:before{content:\"\\edf7\"}.ri-hard-drive-2-fill:before{content:\"\\edf8\"}.ri-hard-drive-2-line:before{content:\"\\edf9\"}.ri-hard-drive-fill:before{content:\"\\edfa\"}.ri-hard-drive-line:before{content:\"\\edfb\"}.ri-hashtag:before{content:\"\\edfc\"}.ri-haze-2-fill:before{content:\"\\edfd\"}.ri-haze-2-line:before{content:\"\\edfe\"}.ri-haze-fill:before{content:\"\\edff\"}.ri-haze-line:before{content:\"\\ee00\"}.ri-hd-fill:before{content:\"\\ee01\"}.ri-hd-line:before{content:\"\\ee02\"}.ri-heading:before{content:\"\\ee03\"}.ri-headphone-fill:before{content:\"\\ee04\"}.ri-headphone-line:before{content:\"\\ee05\"}.ri-health-book-fill:before{content:\"\\ee06\"}.ri-health-book-line:before{content:\"\\ee07\"}.ri-heart-2-fill:before{content:\"\\ee08\"}.ri-heart-2-line:before{content:\"\\ee09\"}.ri-heart-3-fill:before{content:\"\\ee0a\"}.ri-heart-3-line:before{content:\"\\ee0b\"}.ri-heart-add-fill:before{content:\"\\ee0c\"}.ri-heart-add-line:before{content:\"\\ee0d\"}.ri-heart-fill:before{content:\"\\ee0e\"}.ri-heart-line:before{content:\"\\ee0f\"}.ri-heart-pulse-fill:before{content:\"\\ee10\"}.ri-heart-pulse-line:before{content:\"\\ee11\"}.ri-hearts-fill:before{content:\"\\ee12\"}.ri-hearts-line:before{content:\"\\ee13\"}.ri-heavy-showers-fill:before{content:\"\\ee14\"}.ri-heavy-showers-line:before{content:\"\\ee15\"}.ri-history-fill:before{content:\"\\ee16\"}.ri-history-line:before{content:\"\\ee17\"}.ri-home-2-fill:before{content:\"\\ee18\"}.ri-home-2-line:before{content:\"\\ee19\"}.ri-home-3-fill:before{content:\"\\ee1a\"}.ri-home-3-line:before{content:\"\\ee1b\"}.ri-home-4-fill:before{content:\"\\ee1c\"}.ri-home-4-line:before{content:\"\\ee1d\"}.ri-home-5-fill:before{content:\"\\ee1e\"}.ri-home-5-line:before{content:\"\\ee1f\"}.ri-home-6-fill:before{content:\"\\ee20\"}.ri-home-6-line:before{content:\"\\ee21\"}.ri-home-7-fill:before{content:\"\\ee22\"}.ri-home-7-line:before{content:\"\\ee23\"}.ri-home-8-fill:before{content:\"\\ee24\"}.ri-home-8-line:before{content:\"\\ee25\"}.ri-home-fill:before{content:\"\\ee26\"}.ri-home-gear-fill:before{content:\"\\ee27\"}.ri-home-gear-line:before{content:\"\\ee28\"}.ri-home-heart-fill:before{content:\"\\ee29\"}.ri-home-heart-line:before{content:\"\\ee2a\"}.ri-home-line:before{content:\"\\ee2b\"}.ri-home-smile-2-fill:before{content:\"\\ee2c\"}.ri-home-smile-2-line:before{content:\"\\ee2d\"}.ri-home-smile-fill:before{content:\"\\ee2e\"}.ri-home-smile-line:before{content:\"\\ee2f\"}.ri-home-wifi-fill:before{content:\"\\ee30\"}.ri-home-wifi-line:before{content:\"\\ee31\"}.ri-honor-of-kings-fill:before{content:\"\\ee32\"}.ri-honor-of-kings-line:before{content:\"\\ee33\"}.ri-honour-fill:before{content:\"\\ee34\"}.ri-honour-line:before{content:\"\\ee35\"}.ri-hospital-fill:before{content:\"\\ee36\"}.ri-hospital-line:before{content:\"\\ee37\"}.ri-hotel-bed-fill:before{content:\"\\ee38\"}.ri-hotel-bed-line:before{content:\"\\ee39\"}.ri-hotel-fill:before{content:\"\\ee3a\"}.ri-hotel-line:before{content:\"\\ee3b\"}.ri-hotspot-fill:before{content:\"\\ee3c\"}.ri-hotspot-line:before{content:\"\\ee3d\"}.ri-hq-fill:before{content:\"\\ee3e\"}.ri-hq-line:before{content:\"\\ee3f\"}.ri-html5-fill:before{content:\"\\ee40\"}.ri-html5-line:before{content:\"\\ee41\"}.ri-ie-fill:before{content:\"\\ee42\"}.ri-ie-line:before{content:\"\\ee43\"}.ri-image-2-fill:before{content:\"\\ee44\"}.ri-image-2-line:before{content:\"\\ee45\"}.ri-image-add-fill:before{content:\"\\ee46\"}.ri-image-add-line:before{content:\"\\ee47\"}.ri-image-edit-fill:before{content:\"\\ee48\"}.ri-image-edit-line:before{content:\"\\ee49\"}.ri-image-fill:before{content:\"\\ee4a\"}.ri-image-line:before{content:\"\\ee4b\"}.ri-inbox-archive-fill:before{content:\"\\ee4c\"}.ri-inbox-archive-line:before{content:\"\\ee4d\"}.ri-inbox-fill:before{content:\"\\ee4e\"}.ri-inbox-line:before{content:\"\\ee4f\"}.ri-inbox-unarchive-fill:before{content:\"\\ee50\"}.ri-inbox-unarchive-line:before{content:\"\\ee51\"}.ri-increase-decrease-fill:before{content:\"\\ee52\"}.ri-increase-decrease-line:before{content:\"\\ee53\"}.ri-indent-decrease:before{content:\"\\ee54\"}.ri-indent-increase:before{content:\"\\ee55\"}.ri-indeterminate-circle-fill:before{content:\"\\ee56\"}.ri-indeterminate-circle-line:before{content:\"\\ee57\"}.ri-information-fill:before{content:\"\\ee58\"}.ri-information-line:before{content:\"\\ee59\"}.ri-infrared-thermometer-fill:before{content:\"\\ee5a\"}.ri-infrared-thermometer-line:before{content:\"\\ee5b\"}.ri-ink-bottle-fill:before{content:\"\\ee5c\"}.ri-ink-bottle-line:before{content:\"\\ee5d\"}.ri-input-cursor-move:before{content:\"\\ee5e\"}.ri-input-method-fill:before{content:\"\\ee5f\"}.ri-input-method-line:before{content:\"\\ee60\"}.ri-insert-column-left:before{content:\"\\ee61\"}.ri-insert-column-right:before{content:\"\\ee62\"}.ri-insert-row-bottom:before{content:\"\\ee63\"}.ri-insert-row-top:before{content:\"\\ee64\"}.ri-instagram-fill:before{content:\"\\ee65\"}.ri-instagram-line:before{content:\"\\ee66\"}.ri-install-fill:before{content:\"\\ee67\"}.ri-install-line:before{content:\"\\ee68\"}.ri-invision-fill:before{content:\"\\ee69\"}.ri-invision-line:before{content:\"\\ee6a\"}.ri-italic:before{content:\"\\ee6b\"}.ri-kakao-talk-fill:before{content:\"\\ee6c\"}.ri-kakao-talk-line:before{content:\"\\ee6d\"}.ri-key-2-fill:before{content:\"\\ee6e\"}.ri-key-2-line:before{content:\"\\ee6f\"}.ri-key-fill:before{content:\"\\ee70\"}.ri-key-line:before{content:\"\\ee71\"}.ri-keyboard-box-fill:before{content:\"\\ee72\"}.ri-keyboard-box-line:before{content:\"\\ee73\"}.ri-keyboard-fill:before{content:\"\\ee74\"}.ri-keyboard-line:before{content:\"\\ee75\"}.ri-keynote-fill:before{content:\"\\ee76\"}.ri-keynote-line:before{content:\"\\ee77\"}.ri-knife-blood-fill:before{content:\"\\ee78\"}.ri-knife-blood-line:before{content:\"\\ee79\"}.ri-knife-fill:before{content:\"\\ee7a\"}.ri-knife-line:before{content:\"\\ee7b\"}.ri-landscape-fill:before{content:\"\\ee7c\"}.ri-landscape-line:before{content:\"\\ee7d\"}.ri-layout-2-fill:before{content:\"\\ee7e\"}.ri-layout-2-line:before{content:\"\\ee7f\"}.ri-layout-3-fill:before{content:\"\\ee80\"}.ri-layout-3-line:before{content:\"\\ee81\"}.ri-layout-4-fill:before{content:\"\\ee82\"}.ri-layout-4-line:before{content:\"\\ee83\"}.ri-layout-5-fill:before{content:\"\\ee84\"}.ri-layout-5-line:before{content:\"\\ee85\"}.ri-layout-6-fill:before{content:\"\\ee86\"}.ri-layout-6-line:before{content:\"\\ee87\"}.ri-layout-bottom-2-fill:before{content:\"\\ee88\"}.ri-layout-bottom-2-line:before{content:\"\\ee89\"}.ri-layout-bottom-fill:before{content:\"\\ee8a\"}.ri-layout-bottom-line:before{content:\"\\ee8b\"}.ri-layout-column-fill:before{content:\"\\ee8c\"}.ri-layout-column-line:before{content:\"\\ee8d\"}.ri-layout-fill:before{content:\"\\ee8e\"}.ri-layout-grid-fill:before{content:\"\\ee8f\"}.ri-layout-grid-line:before{content:\"\\ee90\"}.ri-layout-left-2-fill:before{content:\"\\ee91\"}.ri-layout-left-2-line:before{content:\"\\ee92\"}.ri-layout-left-fill:before{content:\"\\ee93\"}.ri-layout-left-line:before{content:\"\\ee94\"}.ri-layout-line:before{content:\"\\ee95\"}.ri-layout-masonry-fill:before{content:\"\\ee96\"}.ri-layout-masonry-line:before{content:\"\\ee97\"}.ri-layout-right-2-fill:before{content:\"\\ee98\"}.ri-layout-right-2-line:before{content:\"\\ee99\"}.ri-layout-right-fill:before{content:\"\\ee9a\"}.ri-layout-right-line:before{content:\"\\ee9b\"}.ri-layout-row-fill:before{content:\"\\ee9c\"}.ri-layout-row-line:before{content:\"\\ee9d\"}.ri-layout-top-2-fill:before{content:\"\\ee9e\"}.ri-layout-top-2-line:before{content:\"\\ee9f\"}.ri-layout-top-fill:before{content:\"\\eea0\"}.ri-layout-top-line:before{content:\"\\eea1\"}.ri-leaf-fill:before{content:\"\\eea2\"}.ri-leaf-line:before{content:\"\\eea3\"}.ri-lifebuoy-fill:before{content:\"\\eea4\"}.ri-lifebuoy-line:before{content:\"\\eea5\"}.ri-lightbulb-fill:before{content:\"\\eea6\"}.ri-lightbulb-flash-fill:before{content:\"\\eea7\"}.ri-lightbulb-flash-line:before{content:\"\\eea8\"}.ri-lightbulb-line:before{content:\"\\eea9\"}.ri-line-chart-fill:before{content:\"\\eeaa\"}.ri-line-chart-line:before{content:\"\\eeab\"}.ri-line-fill:before{content:\"\\eeac\"}.ri-line-height:before{content:\"\\eead\"}.ri-line-line:before{content:\"\\eeae\"}.ri-link-m:before{content:\"\\eeaf\"}.ri-link-unlink-m:before{content:\"\\eeb0\"}.ri-link-unlink:before{content:\"\\eeb1\"}.ri-link:before{content:\"\\eeb2\"}.ri-linkedin-box-fill:before{content:\"\\eeb3\"}.ri-linkedin-box-line:before{content:\"\\eeb4\"}.ri-linkedin-fill:before{content:\"\\eeb5\"}.ri-linkedin-line:before{content:\"\\eeb6\"}.ri-links-fill:before{content:\"\\eeb7\"}.ri-links-line:before{content:\"\\eeb8\"}.ri-list-check-2:before{content:\"\\eeb9\"}.ri-list-check:before{content:\"\\eeba\"}.ri-list-ordered:before{content:\"\\eebb\"}.ri-list-settings-fill:before{content:\"\\eebc\"}.ri-list-settings-line:before{content:\"\\eebd\"}.ri-list-unordered:before{content:\"\\eebe\"}.ri-live-fill:before{content:\"\\eebf\"}.ri-live-line:before{content:\"\\eec0\"}.ri-loader-2-fill:before{content:\"\\eec1\"}.ri-loader-2-line:before{content:\"\\eec2\"}.ri-loader-3-fill:before{content:\"\\eec3\"}.ri-loader-3-line:before{content:\"\\eec4\"}.ri-loader-4-fill:before{content:\"\\eec5\"}.ri-loader-4-line:before{content:\"\\eec6\"}.ri-loader-5-fill:before{content:\"\\eec7\"}.ri-loader-5-line:before{content:\"\\eec8\"}.ri-loader-fill:before{content:\"\\eec9\"}.ri-loader-line:before{content:\"\\eeca\"}.ri-lock-2-fill:before{content:\"\\eecb\"}.ri-lock-2-line:before{content:\"\\eecc\"}.ri-lock-fill:before{content:\"\\eecd\"}.ri-lock-line:before{content:\"\\eece\"}.ri-lock-password-fill:before{content:\"\\eecf\"}.ri-lock-password-line:before{content:\"\\eed0\"}.ri-lock-unlock-fill:before{content:\"\\eed1\"}.ri-lock-unlock-line:before{content:\"\\eed2\"}.ri-login-box-fill:before{content:\"\\eed3\"}.ri-login-box-line:before{content:\"\\eed4\"}.ri-login-circle-fill:before{content:\"\\eed5\"}.ri-login-circle-line:before{content:\"\\eed6\"}.ri-logout-box-fill:before{content:\"\\eed7\"}.ri-logout-box-line:before{content:\"\\eed8\"}.ri-logout-box-r-fill:before{content:\"\\eed9\"}.ri-logout-box-r-line:before{content:\"\\eeda\"}.ri-logout-circle-fill:before{content:\"\\eedb\"}.ri-logout-circle-line:before{content:\"\\eedc\"}.ri-logout-circle-r-fill:before{content:\"\\eedd\"}.ri-logout-circle-r-line:before{content:\"\\eede\"}.ri-luggage-cart-fill:before{content:\"\\eedf\"}.ri-luggage-cart-line:before{content:\"\\eee0\"}.ri-luggage-deposit-fill:before{content:\"\\eee1\"}.ri-luggage-deposit-line:before{content:\"\\eee2\"}.ri-lungs-fill:before{content:\"\\eee3\"}.ri-lungs-line:before{content:\"\\eee4\"}.ri-mac-fill:before{content:\"\\eee5\"}.ri-mac-line:before{content:\"\\eee6\"}.ri-macbook-fill:before{content:\"\\eee7\"}.ri-macbook-line:before{content:\"\\eee8\"}.ri-magic-fill:before{content:\"\\eee9\"}.ri-magic-line:before{content:\"\\eeea\"}.ri-mail-add-fill:before{content:\"\\eeeb\"}.ri-mail-add-line:before{content:\"\\eeec\"}.ri-mail-check-fill:before{content:\"\\eeed\"}.ri-mail-check-line:before{content:\"\\eeee\"}.ri-mail-close-fill:before{content:\"\\eeef\"}.ri-mail-close-line:before{content:\"\\eef0\"}.ri-mail-download-fill:before{content:\"\\eef1\"}.ri-mail-download-line:before{content:\"\\eef2\"}.ri-mail-fill:before{content:\"\\eef3\"}.ri-mail-forbid-fill:before{content:\"\\eef4\"}.ri-mail-forbid-line:before{content:\"\\eef5\"}.ri-mail-line:before{content:\"\\eef6\"}.ri-mail-lock-fill:before{content:\"\\eef7\"}.ri-mail-lock-line:before{content:\"\\eef8\"}.ri-mail-open-fill:before{content:\"\\eef9\"}.ri-mail-open-line:before{content:\"\\eefa\"}.ri-mail-send-fill:before{content:\"\\eefb\"}.ri-mail-send-line:before{content:\"\\eefc\"}.ri-mail-settings-fill:before{content:\"\\eefd\"}.ri-mail-settings-line:before{content:\"\\eefe\"}.ri-mail-star-fill:before{content:\"\\eeff\"}.ri-mail-star-line:before{content:\"\\ef00\"}.ri-mail-unread-fill:before{content:\"\\ef01\"}.ri-mail-unread-line:before{content:\"\\ef02\"}.ri-mail-volume-fill:before{content:\"\\ef03\"}.ri-mail-volume-line:before{content:\"\\ef04\"}.ri-map-2-fill:before{content:\"\\ef05\"}.ri-map-2-line:before{content:\"\\ef06\"}.ri-map-fill:before{content:\"\\ef07\"}.ri-map-line:before{content:\"\\ef08\"}.ri-map-pin-2-fill:before{content:\"\\ef09\"}.ri-map-pin-2-line:before{content:\"\\ef0a\"}.ri-map-pin-3-fill:before{content:\"\\ef0b\"}.ri-map-pin-3-line:before{content:\"\\ef0c\"}.ri-map-pin-4-fill:before{content:\"\\ef0d\"}.ri-map-pin-4-line:before{content:\"\\ef0e\"}.ri-map-pin-5-fill:before{content:\"\\ef0f\"}.ri-map-pin-5-line:before{content:\"\\ef10\"}.ri-map-pin-add-fill:before{content:\"\\ef11\"}.ri-map-pin-add-line:before{content:\"\\ef12\"}.ri-map-pin-fill:before{content:\"\\ef13\"}.ri-map-pin-line:before{content:\"\\ef14\"}.ri-map-pin-range-fill:before{content:\"\\ef15\"}.ri-map-pin-range-line:before{content:\"\\ef16\"}.ri-map-pin-time-fill:before{content:\"\\ef17\"}.ri-map-pin-time-line:before{content:\"\\ef18\"}.ri-map-pin-user-fill:before{content:\"\\ef19\"}.ri-map-pin-user-line:before{content:\"\\ef1a\"}.ri-mark-pen-fill:before{content:\"\\ef1b\"}.ri-mark-pen-line:before{content:\"\\ef1c\"}.ri-markdown-fill:before{content:\"\\ef1d\"}.ri-markdown-line:before{content:\"\\ef1e\"}.ri-markup-fill:before{content:\"\\ef1f\"}.ri-markup-line:before{content:\"\\ef20\"}.ri-mastercard-fill:before{content:\"\\ef21\"}.ri-mastercard-line:before{content:\"\\ef22\"}.ri-mastodon-fill:before{content:\"\\ef23\"}.ri-mastodon-line:before{content:\"\\ef24\"}.ri-medal-2-fill:before{content:\"\\ef25\"}.ri-medal-2-line:before{content:\"\\ef26\"}.ri-medal-fill:before{content:\"\\ef27\"}.ri-medal-line:before{content:\"\\ef28\"}.ri-medicine-bottle-fill:before{content:\"\\ef29\"}.ri-medicine-bottle-line:before{content:\"\\ef2a\"}.ri-medium-fill:before{content:\"\\ef2b\"}.ri-medium-line:before{content:\"\\ef2c\"}.ri-men-fill:before{content:\"\\ef2d\"}.ri-men-line:before{content:\"\\ef2e\"}.ri-mental-health-fill:before{content:\"\\ef2f\"}.ri-mental-health-line:before{content:\"\\ef30\"}.ri-menu-2-fill:before{content:\"\\ef31\"}.ri-menu-2-line:before{content:\"\\ef32\"}.ri-menu-3-fill:before{content:\"\\ef33\"}.ri-menu-3-line:before{content:\"\\ef34\"}.ri-menu-4-fill:before{content:\"\\ef35\"}.ri-menu-4-line:before{content:\"\\ef36\"}.ri-menu-5-fill:before{content:\"\\ef37\"}.ri-menu-5-line:before{content:\"\\ef38\"}.ri-menu-add-fill:before{content:\"\\ef39\"}.ri-menu-add-line:before{content:\"\\ef3a\"}.ri-menu-fill:before{content:\"\\ef3b\"}.ri-menu-fold-fill:before{content:\"\\ef3c\"}.ri-menu-fold-line:before{content:\"\\ef3d\"}.ri-menu-line:before{content:\"\\ef3e\"}.ri-menu-unfold-fill:before{content:\"\\ef3f\"}.ri-menu-unfold-line:before{content:\"\\ef40\"}.ri-merge-cells-horizontal:before{content:\"\\ef41\"}.ri-merge-cells-vertical:before{content:\"\\ef42\"}.ri-message-2-fill:before{content:\"\\ef43\"}.ri-message-2-line:before{content:\"\\ef44\"}.ri-message-3-fill:before{content:\"\\ef45\"}.ri-message-3-line:before{content:\"\\ef46\"}.ri-message-fill:before{content:\"\\ef47\"}.ri-message-line:before{content:\"\\ef48\"}.ri-messenger-fill:before{content:\"\\ef49\"}.ri-messenger-line:before{content:\"\\ef4a\"}.ri-meteor-fill:before{content:\"\\ef4b\"}.ri-meteor-line:before{content:\"\\ef4c\"}.ri-mic-2-fill:before{content:\"\\ef4d\"}.ri-mic-2-line:before{content:\"\\ef4e\"}.ri-mic-fill:before{content:\"\\ef4f\"}.ri-mic-line:before{content:\"\\ef50\"}.ri-mic-off-fill:before{content:\"\\ef51\"}.ri-mic-off-line:before{content:\"\\ef52\"}.ri-mickey-fill:before{content:\"\\ef53\"}.ri-mickey-line:before{content:\"\\ef54\"}.ri-microscope-fill:before{content:\"\\ef55\"}.ri-microscope-line:before{content:\"\\ef56\"}.ri-microsoft-fill:before{content:\"\\ef57\"}.ri-microsoft-line:before{content:\"\\ef58\"}.ri-mind-map:before{content:\"\\ef59\"}.ri-mini-program-fill:before{content:\"\\ef5a\"}.ri-mini-program-line:before{content:\"\\ef5b\"}.ri-mist-fill:before{content:\"\\ef5c\"}.ri-mist-line:before{content:\"\\ef5d\"}.ri-money-cny-box-fill:before{content:\"\\ef5e\"}.ri-money-cny-box-line:before{content:\"\\ef5f\"}.ri-money-cny-circle-fill:before{content:\"\\ef60\"}.ri-money-cny-circle-line:before{content:\"\\ef61\"}.ri-money-dollar-box-fill:before{content:\"\\ef62\"}.ri-money-dollar-box-line:before{content:\"\\ef63\"}.ri-money-dollar-circle-fill:before{content:\"\\ef64\"}.ri-money-dollar-circle-line:before{content:\"\\ef65\"}.ri-money-euro-box-fill:before{content:\"\\ef66\"}.ri-money-euro-box-line:before{content:\"\\ef67\"}.ri-money-euro-circle-fill:before{content:\"\\ef68\"}.ri-money-euro-circle-line:before{content:\"\\ef69\"}.ri-money-pound-box-fill:before{content:\"\\ef6a\"}.ri-money-pound-box-line:before{content:\"\\ef6b\"}.ri-money-pound-circle-fill:before{content:\"\\ef6c\"}.ri-money-pound-circle-line:before{content:\"\\ef6d\"}.ri-moon-clear-fill:before{content:\"\\ef6e\"}.ri-moon-clear-line:before{content:\"\\ef6f\"}.ri-moon-cloudy-fill:before{content:\"\\ef70\"}.ri-moon-cloudy-line:before{content:\"\\ef71\"}.ri-moon-fill:before{content:\"\\ef72\"}.ri-moon-foggy-fill:before{content:\"\\ef73\"}.ri-moon-foggy-line:before{content:\"\\ef74\"}.ri-moon-line:before{content:\"\\ef75\"}.ri-more-2-fill:before{content:\"\\ef76\"}.ri-more-2-line:before{content:\"\\ef77\"}.ri-more-fill:before{content:\"\\ef78\"}.ri-more-line:before{content:\"\\ef79\"}.ri-motorbike-fill:before{content:\"\\ef7a\"}.ri-motorbike-line:before{content:\"\\ef7b\"}.ri-mouse-fill:before{content:\"\\ef7c\"}.ri-mouse-line:before{content:\"\\ef7d\"}.ri-movie-2-fill:before{content:\"\\ef7e\"}.ri-movie-2-line:before{content:\"\\ef7f\"}.ri-movie-fill:before{content:\"\\ef80\"}.ri-movie-line:before{content:\"\\ef81\"}.ri-music-2-fill:before{content:\"\\ef82\"}.ri-music-2-line:before{content:\"\\ef83\"}.ri-music-fill:before{content:\"\\ef84\"}.ri-music-line:before{content:\"\\ef85\"}.ri-mv-fill:before{content:\"\\ef86\"}.ri-mv-line:before{content:\"\\ef87\"}.ri-navigation-fill:before{content:\"\\ef88\"}.ri-navigation-line:before{content:\"\\ef89\"}.ri-netease-cloud-music-fill:before{content:\"\\ef8a\"}.ri-netease-cloud-music-line:before{content:\"\\ef8b\"}.ri-netflix-fill:before{content:\"\\ef8c\"}.ri-netflix-line:before{content:\"\\ef8d\"}.ri-newspaper-fill:before{content:\"\\ef8e\"}.ri-newspaper-line:before{content:\"\\ef8f\"}.ri-node-tree:before{content:\"\\ef90\"}.ri-notification-2-fill:before{content:\"\\ef91\"}.ri-notification-2-line:before{content:\"\\ef92\"}.ri-notification-3-fill:before{content:\"\\ef93\"}.ri-notification-3-line:before{content:\"\\ef94\"}.ri-notification-4-fill:before{content:\"\\ef95\"}.ri-notification-4-line:before{content:\"\\ef96\"}.ri-notification-badge-fill:before{content:\"\\ef97\"}.ri-notification-badge-line:before{content:\"\\ef98\"}.ri-notification-fill:before{content:\"\\ef99\"}.ri-notification-line:before{content:\"\\ef9a\"}.ri-notification-off-fill:before{content:\"\\ef9b\"}.ri-notification-off-line:before{content:\"\\ef9c\"}.ri-npmjs-fill:before{content:\"\\ef9d\"}.ri-npmjs-line:before{content:\"\\ef9e\"}.ri-number-0:before{content:\"\\ef9f\"}.ri-number-1:before{content:\"\\efa0\"}.ri-number-2:before{content:\"\\efa1\"}.ri-number-3:before{content:\"\\efa2\"}.ri-number-4:before{content:\"\\efa3\"}.ri-number-5:before{content:\"\\efa4\"}.ri-number-6:before{content:\"\\efa5\"}.ri-number-7:before{content:\"\\efa6\"}.ri-number-8:before{content:\"\\efa7\"}.ri-number-9:before{content:\"\\efa8\"}.ri-numbers-fill:before{content:\"\\efa9\"}.ri-numbers-line:before{content:\"\\efaa\"}.ri-nurse-fill:before{content:\"\\efab\"}.ri-nurse-line:before{content:\"\\efac\"}.ri-oil-fill:before{content:\"\\efad\"}.ri-oil-line:before{content:\"\\efae\"}.ri-omega:before{content:\"\\efaf\"}.ri-open-arm-fill:before{content:\"\\efb0\"}.ri-open-arm-line:before{content:\"\\efb1\"}.ri-open-source-fill:before{content:\"\\efb2\"}.ri-open-source-line:before{content:\"\\efb3\"}.ri-opera-fill:before{content:\"\\efb4\"}.ri-opera-line:before{content:\"\\efb5\"}.ri-order-play-fill:before{content:\"\\efb6\"}.ri-order-play-line:before{content:\"\\efb7\"}.ri-organization-chart:before{content:\"\\efb8\"}.ri-outlet-2-fill:before{content:\"\\efb9\"}.ri-outlet-2-line:before{content:\"\\efba\"}.ri-outlet-fill:before{content:\"\\efbb\"}.ri-outlet-line:before{content:\"\\efbc\"}.ri-page-separator:before{content:\"\\efbd\"}.ri-pages-fill:before{content:\"\\efbe\"}.ri-pages-line:before{content:\"\\efbf\"}.ri-paint-brush-fill:before{content:\"\\efc0\"}.ri-paint-brush-line:before{content:\"\\efc1\"}.ri-paint-fill:before{content:\"\\efc2\"}.ri-paint-line:before{content:\"\\efc3\"}.ri-palette-fill:before{content:\"\\efc4\"}.ri-palette-line:before{content:\"\\efc5\"}.ri-pantone-fill:before{content:\"\\efc6\"}.ri-pantone-line:before{content:\"\\efc7\"}.ri-paragraph:before{content:\"\\efc8\"}.ri-parent-fill:before{content:\"\\efc9\"}.ri-parent-line:before{content:\"\\efca\"}.ri-parentheses-fill:before{content:\"\\efcb\"}.ri-parentheses-line:before{content:\"\\efcc\"}.ri-parking-box-fill:before{content:\"\\efcd\"}.ri-parking-box-line:before{content:\"\\efce\"}.ri-parking-fill:before{content:\"\\efcf\"}.ri-parking-line:before{content:\"\\efd0\"}.ri-passport-fill:before{content:\"\\efd1\"}.ri-passport-line:before{content:\"\\efd2\"}.ri-patreon-fill:before{content:\"\\efd3\"}.ri-patreon-line:before{content:\"\\efd4\"}.ri-pause-circle-fill:before{content:\"\\efd5\"}.ri-pause-circle-line:before{content:\"\\efd6\"}.ri-pause-fill:before{content:\"\\efd7\"}.ri-pause-line:before{content:\"\\efd8\"}.ri-pause-mini-fill:before{content:\"\\efd9\"}.ri-pause-mini-line:before{content:\"\\efda\"}.ri-paypal-fill:before{content:\"\\efdb\"}.ri-paypal-line:before{content:\"\\efdc\"}.ri-pen-nib-fill:before{content:\"\\efdd\"}.ri-pen-nib-line:before{content:\"\\efde\"}.ri-pencil-fill:before{content:\"\\efdf\"}.ri-pencil-line:before{content:\"\\efe0\"}.ri-pencil-ruler-2-fill:before{content:\"\\efe1\"}.ri-pencil-ruler-2-line:before{content:\"\\efe2\"}.ri-pencil-ruler-fill:before{content:\"\\efe3\"}.ri-pencil-ruler-line:before{content:\"\\efe4\"}.ri-percent-fill:before{content:\"\\efe5\"}.ri-percent-line:before{content:\"\\efe6\"}.ri-phone-camera-fill:before{content:\"\\efe7\"}.ri-phone-camera-line:before{content:\"\\efe8\"}.ri-phone-fill:before{content:\"\\efe9\"}.ri-phone-find-fill:before{content:\"\\efea\"}.ri-phone-find-line:before{content:\"\\efeb\"}.ri-phone-line:before{content:\"\\efec\"}.ri-phone-lock-fill:before{content:\"\\efed\"}.ri-phone-lock-line:before{content:\"\\efee\"}.ri-picture-in-picture-2-fill:before{content:\"\\efef\"}.ri-picture-in-picture-2-line:before{content:\"\\eff0\"}.ri-picture-in-picture-exit-fill:before{content:\"\\eff1\"}.ri-picture-in-picture-exit-line:before{content:\"\\eff2\"}.ri-picture-in-picture-fill:before{content:\"\\eff3\"}.ri-picture-in-picture-line:before{content:\"\\eff4\"}.ri-pie-chart-2-fill:before{content:\"\\eff5\"}.ri-pie-chart-2-line:before{content:\"\\eff6\"}.ri-pie-chart-box-fill:before{content:\"\\eff7\"}.ri-pie-chart-box-line:before{content:\"\\eff8\"}.ri-pie-chart-fill:before{content:\"\\eff9\"}.ri-pie-chart-line:before{content:\"\\effa\"}.ri-pin-distance-fill:before{content:\"\\effb\"}.ri-pin-distance-line:before{content:\"\\effc\"}.ri-ping-pong-fill:before{content:\"\\effd\"}.ri-ping-pong-line:before{content:\"\\effe\"}.ri-pinterest-fill:before{content:\"\\efff\"}.ri-pinterest-line:before{content:\"\\f000\"}.ri-pinyin-input:before{content:\"\\f001\"}.ri-pixelfed-fill:before{content:\"\\f002\"}.ri-pixelfed-line:before{content:\"\\f003\"}.ri-plane-fill:before{content:\"\\f004\"}.ri-plane-line:before{content:\"\\f005\"}.ri-plant-fill:before{content:\"\\f006\"}.ri-plant-line:before{content:\"\\f007\"}.ri-play-circle-fill:before{content:\"\\f008\"}.ri-play-circle-line:before{content:\"\\f009\"}.ri-play-fill:before{content:\"\\f00a\"}.ri-play-line:before{content:\"\\f00b\"}.ri-play-list-2-fill:before{content:\"\\f00c\"}.ri-play-list-2-line:before{content:\"\\f00d\"}.ri-play-list-add-fill:before{content:\"\\f00e\"}.ri-play-list-add-line:before{content:\"\\f00f\"}.ri-play-list-fill:before{content:\"\\f010\"}.ri-play-list-line:before{content:\"\\f011\"}.ri-play-mini-fill:before{content:\"\\f012\"}.ri-play-mini-line:before{content:\"\\f013\"}.ri-playstation-fill:before{content:\"\\f014\"}.ri-playstation-line:before{content:\"\\f015\"}.ri-plug-2-fill:before{content:\"\\f016\"}.ri-plug-2-line:before{content:\"\\f017\"}.ri-plug-fill:before{content:\"\\f018\"}.ri-plug-line:before{content:\"\\f019\"}.ri-polaroid-2-fill:before{content:\"\\f01a\"}.ri-polaroid-2-line:before{content:\"\\f01b\"}.ri-polaroid-fill:before{content:\"\\f01c\"}.ri-polaroid-line:before{content:\"\\f01d\"}.ri-police-car-fill:before{content:\"\\f01e\"}.ri-police-car-line:before{content:\"\\f01f\"}.ri-price-tag-2-fill:before{content:\"\\f020\"}.ri-price-tag-2-line:before{content:\"\\f021\"}.ri-price-tag-3-fill:before{content:\"\\f022\"}.ri-price-tag-3-line:before{content:\"\\f023\"}.ri-price-tag-fill:before{content:\"\\f024\"}.ri-price-tag-line:before{content:\"\\f025\"}.ri-printer-cloud-fill:before{content:\"\\f026\"}.ri-printer-cloud-line:before{content:\"\\f027\"}.ri-printer-fill:before{content:\"\\f028\"}.ri-printer-line:before{content:\"\\f029\"}.ri-product-hunt-fill:before{content:\"\\f02a\"}.ri-product-hunt-line:before{content:\"\\f02b\"}.ri-profile-fill:before{content:\"\\f02c\"}.ri-profile-line:before{content:\"\\f02d\"}.ri-projector-2-fill:before{content:\"\\f02e\"}.ri-projector-2-line:before{content:\"\\f02f\"}.ri-projector-fill:before{content:\"\\f030\"}.ri-projector-line:before{content:\"\\f031\"}.ri-psychotherapy-fill:before{content:\"\\f032\"}.ri-psychotherapy-line:before{content:\"\\f033\"}.ri-pulse-fill:before{content:\"\\f034\"}.ri-pulse-line:before{content:\"\\f035\"}.ri-pushpin-2-fill:before{content:\"\\f036\"}.ri-pushpin-2-line:before{content:\"\\f037\"}.ri-pushpin-fill:before{content:\"\\f038\"}.ri-pushpin-line:before{content:\"\\f039\"}.ri-qq-fill:before{content:\"\\f03a\"}.ri-qq-line:before{content:\"\\f03b\"}.ri-qr-code-fill:before{content:\"\\f03c\"}.ri-qr-code-line:before{content:\"\\f03d\"}.ri-qr-scan-2-fill:before{content:\"\\f03e\"}.ri-qr-scan-2-line:before{content:\"\\f03f\"}.ri-qr-scan-fill:before{content:\"\\f040\"}.ri-qr-scan-line:before{content:\"\\f041\"}.ri-question-answer-fill:before{content:\"\\f042\"}.ri-question-answer-line:before{content:\"\\f043\"}.ri-question-fill:before{content:\"\\f044\"}.ri-question-line:before{content:\"\\f045\"}.ri-question-mark:before{content:\"\\f046\"}.ri-questionnaire-fill:before{content:\"\\f047\"}.ri-questionnaire-line:before{content:\"\\f048\"}.ri-quill-pen-fill:before{content:\"\\f049\"}.ri-quill-pen-line:before{content:\"\\f04a\"}.ri-radar-fill:before{content:\"\\f04b\"}.ri-radar-line:before{content:\"\\f04c\"}.ri-radio-2-fill:before{content:\"\\f04d\"}.ri-radio-2-line:before{content:\"\\f04e\"}.ri-radio-button-fill:before{content:\"\\f04f\"}.ri-radio-button-line:before{content:\"\\f050\"}.ri-radio-fill:before{content:\"\\f051\"}.ri-radio-line:before{content:\"\\f052\"}.ri-rainbow-fill:before{content:\"\\f053\"}.ri-rainbow-line:before{content:\"\\f054\"}.ri-rainy-fill:before{content:\"\\f055\"}.ri-rainy-line:before{content:\"\\f056\"}.ri-reactjs-fill:before{content:\"\\f057\"}.ri-reactjs-line:before{content:\"\\f058\"}.ri-record-circle-fill:before{content:\"\\f059\"}.ri-record-circle-line:before{content:\"\\f05a\"}.ri-record-mail-fill:before{content:\"\\f05b\"}.ri-record-mail-line:before{content:\"\\f05c\"}.ri-recycle-fill:before{content:\"\\f05d\"}.ri-recycle-line:before{content:\"\\f05e\"}.ri-red-packet-fill:before{content:\"\\f05f\"}.ri-red-packet-line:before{content:\"\\f060\"}.ri-reddit-fill:before{content:\"\\f061\"}.ri-reddit-line:before{content:\"\\f062\"}.ri-refresh-fill:before{content:\"\\f063\"}.ri-refresh-line:before{content:\"\\f064\"}.ri-refund-2-fill:before{content:\"\\f065\"}.ri-refund-2-line:before{content:\"\\f066\"}.ri-refund-fill:before{content:\"\\f067\"}.ri-refund-line:before{content:\"\\f068\"}.ri-registered-fill:before{content:\"\\f069\"}.ri-registered-line:before{content:\"\\f06a\"}.ri-remixicon-fill:before{content:\"\\f06b\"}.ri-remixicon-line:before{content:\"\\f06c\"}.ri-remote-control-2-fill:before{content:\"\\f06d\"}.ri-remote-control-2-line:before{content:\"\\f06e\"}.ri-remote-control-fill:before{content:\"\\f06f\"}.ri-remote-control-line:before{content:\"\\f070\"}.ri-repeat-2-fill:before{content:\"\\f071\"}.ri-repeat-2-line:before{content:\"\\f072\"}.ri-repeat-fill:before{content:\"\\f073\"}.ri-repeat-line:before{content:\"\\f074\"}.ri-repeat-one-fill:before{content:\"\\f075\"}.ri-repeat-one-line:before{content:\"\\f076\"}.ri-reply-all-fill:before{content:\"\\f077\"}.ri-reply-all-line:before{content:\"\\f078\"}.ri-reply-fill:before{content:\"\\f079\"}.ri-reply-line:before{content:\"\\f07a\"}.ri-reserved-fill:before{content:\"\\f07b\"}.ri-reserved-line:before{content:\"\\f07c\"}.ri-rest-time-fill:before{content:\"\\f07d\"}.ri-rest-time-line:before{content:\"\\f07e\"}.ri-restart-fill:before{content:\"\\f07f\"}.ri-restart-line:before{content:\"\\f080\"}.ri-restaurant-2-fill:before{content:\"\\f081\"}.ri-restaurant-2-line:before{content:\"\\f082\"}.ri-restaurant-fill:before{content:\"\\f083\"}.ri-restaurant-line:before{content:\"\\f084\"}.ri-rewind-fill:before{content:\"\\f085\"}.ri-rewind-line:before{content:\"\\f086\"}.ri-rewind-mini-fill:before{content:\"\\f087\"}.ri-rewind-mini-line:before{content:\"\\f088\"}.ri-rhythm-fill:before{content:\"\\f089\"}.ri-rhythm-line:before{content:\"\\f08a\"}.ri-riding-fill:before{content:\"\\f08b\"}.ri-riding-line:before{content:\"\\f08c\"}.ri-road-map-fill:before{content:\"\\f08d\"}.ri-road-map-line:before{content:\"\\f08e\"}.ri-roadster-fill:before{content:\"\\f08f\"}.ri-roadster-line:before{content:\"\\f090\"}.ri-robot-fill:before{content:\"\\f091\"}.ri-robot-line:before{content:\"\\f092\"}.ri-rocket-2-fill:before{content:\"\\f093\"}.ri-rocket-2-line:before{content:\"\\f094\"}.ri-rocket-fill:before{content:\"\\f095\"}.ri-rocket-line:before{content:\"\\f096\"}.ri-rotate-lock-fill:before{content:\"\\f097\"}.ri-rotate-lock-line:before{content:\"\\f098\"}.ri-rounded-corner:before{content:\"\\f099\"}.ri-route-fill:before{content:\"\\f09a\"}.ri-route-line:before{content:\"\\f09b\"}.ri-router-fill:before{content:\"\\f09c\"}.ri-router-line:before{content:\"\\f09d\"}.ri-rss-fill:before{content:\"\\f09e\"}.ri-rss-line:before{content:\"\\f09f\"}.ri-ruler-2-fill:before{content:\"\\f0a0\"}.ri-ruler-2-line:before{content:\"\\f0a1\"}.ri-ruler-fill:before{content:\"\\f0a2\"}.ri-ruler-line:before{content:\"\\f0a3\"}.ri-run-fill:before{content:\"\\f0a4\"}.ri-run-line:before{content:\"\\f0a5\"}.ri-safari-fill:before{content:\"\\f0a6\"}.ri-safari-line:before{content:\"\\f0a7\"}.ri-safe-2-fill:before{content:\"\\f0a8\"}.ri-safe-2-line:before{content:\"\\f0a9\"}.ri-safe-fill:before{content:\"\\f0aa\"}.ri-safe-line:before{content:\"\\f0ab\"}.ri-sailboat-fill:before{content:\"\\f0ac\"}.ri-sailboat-line:before{content:\"\\f0ad\"}.ri-save-2-fill:before{content:\"\\f0ae\"}.ri-save-2-line:before{content:\"\\f0af\"}.ri-save-3-fill:before{content:\"\\f0b0\"}.ri-save-3-line:before{content:\"\\f0b1\"}.ri-save-fill:before{content:\"\\f0b2\"}.ri-save-line:before{content:\"\\f0b3\"}.ri-scales-2-fill:before{content:\"\\f0b4\"}.ri-scales-2-line:before{content:\"\\f0b5\"}.ri-scales-3-fill:before{content:\"\\f0b6\"}.ri-scales-3-line:before{content:\"\\f0b7\"}.ri-scales-fill:before{content:\"\\f0b8\"}.ri-scales-line:before{content:\"\\f0b9\"}.ri-scan-2-fill:before{content:\"\\f0ba\"}.ri-scan-2-line:before{content:\"\\f0bb\"}.ri-scan-fill:before{content:\"\\f0bc\"}.ri-scan-line:before{content:\"\\f0bd\"}.ri-scissors-2-fill:before{content:\"\\f0be\"}.ri-scissors-2-line:before{content:\"\\f0bf\"}.ri-scissors-cut-fill:before{content:\"\\f0c0\"}.ri-scissors-cut-line:before{content:\"\\f0c1\"}.ri-scissors-fill:before{content:\"\\f0c2\"}.ri-scissors-line:before{content:\"\\f0c3\"}.ri-screenshot-2-fill:before{content:\"\\f0c4\"}.ri-screenshot-2-line:before{content:\"\\f0c5\"}.ri-screenshot-fill:before{content:\"\\f0c6\"}.ri-screenshot-line:before{content:\"\\f0c7\"}.ri-sd-card-fill:before{content:\"\\f0c8\"}.ri-sd-card-line:before{content:\"\\f0c9\"}.ri-sd-card-mini-fill:before{content:\"\\f0ca\"}.ri-sd-card-mini-line:before{content:\"\\f0cb\"}.ri-search-2-fill:before{content:\"\\f0cc\"}.ri-search-2-line:before{content:\"\\f0cd\"}.ri-search-eye-fill:before{content:\"\\f0ce\"}.ri-search-eye-line:before{content:\"\\f0cf\"}.ri-search-fill:before{content:\"\\f0d0\"}.ri-search-line:before{content:\"\\f0d1\"}.ri-secure-payment-fill:before{content:\"\\f0d2\"}.ri-secure-payment-line:before{content:\"\\f0d3\"}.ri-seedling-fill:before{content:\"\\f0d4\"}.ri-seedling-line:before{content:\"\\f0d5\"}.ri-send-backward:before{content:\"\\f0d6\"}.ri-send-plane-2-fill:before{content:\"\\f0d7\"}.ri-send-plane-2-line:before{content:\"\\f0d8\"}.ri-send-plane-fill:before{content:\"\\f0d9\"}.ri-send-plane-line:before{content:\"\\f0da\"}.ri-send-to-back:before{content:\"\\f0db\"}.ri-sensor-fill:before{content:\"\\f0dc\"}.ri-sensor-line:before{content:\"\\f0dd\"}.ri-separator:before{content:\"\\f0de\"}.ri-server-fill:before{content:\"\\f0df\"}.ri-server-line:before{content:\"\\f0e0\"}.ri-service-fill:before{content:\"\\f0e1\"}.ri-service-line:before{content:\"\\f0e2\"}.ri-settings-2-fill:before{content:\"\\f0e3\"}.ri-settings-2-line:before{content:\"\\f0e4\"}.ri-settings-3-fill:before{content:\"\\f0e5\"}.ri-settings-3-line:before{content:\"\\f0e6\"}.ri-settings-4-fill:before{content:\"\\f0e7\"}.ri-settings-4-line:before{content:\"\\f0e8\"}.ri-settings-5-fill:before{content:\"\\f0e9\"}.ri-settings-5-line:before{content:\"\\f0ea\"}.ri-settings-6-fill:before{content:\"\\f0eb\"}.ri-settings-6-line:before{content:\"\\f0ec\"}.ri-settings-fill:before{content:\"\\f0ed\"}.ri-settings-line:before{content:\"\\f0ee\"}.ri-shape-2-fill:before{content:\"\\f0ef\"}.ri-shape-2-line:before{content:\"\\f0f0\"}.ri-shape-fill:before{content:\"\\f0f1\"}.ri-shape-line:before{content:\"\\f0f2\"}.ri-share-box-fill:before{content:\"\\f0f3\"}.ri-share-box-line:before{content:\"\\f0f4\"}.ri-share-circle-fill:before{content:\"\\f0f5\"}.ri-share-circle-line:before{content:\"\\f0f6\"}.ri-share-fill:before{content:\"\\f0f7\"}.ri-share-forward-2-fill:before{content:\"\\f0f8\"}.ri-share-forward-2-line:before{content:\"\\f0f9\"}.ri-share-forward-box-fill:before{content:\"\\f0fa\"}.ri-share-forward-box-line:before{content:\"\\f0fb\"}.ri-share-forward-fill:before{content:\"\\f0fc\"}.ri-share-forward-line:before{content:\"\\f0fd\"}.ri-share-line:before{content:\"\\f0fe\"}.ri-shield-check-fill:before{content:\"\\f0ff\"}.ri-shield-check-line:before{content:\"\\f100\"}.ri-shield-cross-fill:before{content:\"\\f101\"}.ri-shield-cross-line:before{content:\"\\f102\"}.ri-shield-fill:before{content:\"\\f103\"}.ri-shield-flash-fill:before{content:\"\\f104\"}.ri-shield-flash-line:before{content:\"\\f105\"}.ri-shield-keyhole-fill:before{content:\"\\f106\"}.ri-shield-keyhole-line:before{content:\"\\f107\"}.ri-shield-line:before{content:\"\\f108\"}.ri-shield-star-fill:before{content:\"\\f109\"}.ri-shield-star-line:before{content:\"\\f10a\"}.ri-shield-user-fill:before{content:\"\\f10b\"}.ri-shield-user-line:before{content:\"\\f10c\"}.ri-ship-2-fill:before{content:\"\\f10d\"}.ri-ship-2-line:before{content:\"\\f10e\"}.ri-ship-fill:before{content:\"\\f10f\"}.ri-ship-line:before{content:\"\\f110\"}.ri-shirt-fill:before{content:\"\\f111\"}.ri-shirt-line:before{content:\"\\f112\"}.ri-shopping-bag-2-fill:before{content:\"\\f113\"}.ri-shopping-bag-2-line:before{content:\"\\f114\"}.ri-shopping-bag-3-fill:before{content:\"\\f115\"}.ri-shopping-bag-3-line:before{content:\"\\f116\"}.ri-shopping-bag-fill:before{content:\"\\f117\"}.ri-shopping-bag-line:before{content:\"\\f118\"}.ri-shopping-basket-2-fill:before{content:\"\\f119\"}.ri-shopping-basket-2-line:before{content:\"\\f11a\"}.ri-shopping-basket-fill:before{content:\"\\f11b\"}.ri-shopping-basket-line:before{content:\"\\f11c\"}.ri-shopping-cart-2-fill:before{content:\"\\f11d\"}.ri-shopping-cart-2-line:before{content:\"\\f11e\"}.ri-shopping-cart-fill:before{content:\"\\f11f\"}.ri-shopping-cart-line:before{content:\"\\f120\"}.ri-showers-fill:before{content:\"\\f121\"}.ri-showers-line:before{content:\"\\f122\"}.ri-shuffle-fill:before{content:\"\\f123\"}.ri-shuffle-line:before{content:\"\\f124\"}.ri-shut-down-fill:before{content:\"\\f125\"}.ri-shut-down-line:before{content:\"\\f126\"}.ri-side-bar-fill:before{content:\"\\f127\"}.ri-side-bar-line:before{content:\"\\f128\"}.ri-signal-tower-fill:before{content:\"\\f129\"}.ri-signal-tower-line:before{content:\"\\f12a\"}.ri-signal-wifi-1-fill:before{content:\"\\f12b\"}.ri-signal-wifi-1-line:before{content:\"\\f12c\"}.ri-signal-wifi-2-fill:before{content:\"\\f12d\"}.ri-signal-wifi-2-line:before{content:\"\\f12e\"}.ri-signal-wifi-3-fill:before{content:\"\\f12f\"}.ri-signal-wifi-3-line:before{content:\"\\f130\"}.ri-signal-wifi-error-fill:before{content:\"\\f131\"}.ri-signal-wifi-error-line:before{content:\"\\f132\"}.ri-signal-wifi-fill:before{content:\"\\f133\"}.ri-signal-wifi-line:before{content:\"\\f134\"}.ri-signal-wifi-off-fill:before{content:\"\\f135\"}.ri-signal-wifi-off-line:before{content:\"\\f136\"}.ri-sim-card-2-fill:before{content:\"\\f137\"}.ri-sim-card-2-line:before{content:\"\\f138\"}.ri-sim-card-fill:before{content:\"\\f139\"}.ri-sim-card-line:before{content:\"\\f13a\"}.ri-single-quotes-l:before{content:\"\\f13b\"}.ri-single-quotes-r:before{content:\"\\f13c\"}.ri-sip-fill:before{content:\"\\f13d\"}.ri-sip-line:before{content:\"\\f13e\"}.ri-skip-back-fill:before{content:\"\\f13f\"}.ri-skip-back-line:before{content:\"\\f140\"}.ri-skip-back-mini-fill:before{content:\"\\f141\"}.ri-skip-back-mini-line:before{content:\"\\f142\"}.ri-skip-forward-fill:before{content:\"\\f143\"}.ri-skip-forward-line:before{content:\"\\f144\"}.ri-skip-forward-mini-fill:before{content:\"\\f145\"}.ri-skip-forward-mini-line:before{content:\"\\f146\"}.ri-skull-2-fill:before{content:\"\\f147\"}.ri-skull-2-line:before{content:\"\\f148\"}.ri-skull-fill:before{content:\"\\f149\"}.ri-skull-line:before{content:\"\\f14a\"}.ri-skype-fill:before{content:\"\\f14b\"}.ri-skype-line:before{content:\"\\f14c\"}.ri-slack-fill:before{content:\"\\f14d\"}.ri-slack-line:before{content:\"\\f14e\"}.ri-slice-fill:before{content:\"\\f14f\"}.ri-slice-line:before{content:\"\\f150\"}.ri-slideshow-2-fill:before{content:\"\\f151\"}.ri-slideshow-2-line:before{content:\"\\f152\"}.ri-slideshow-3-fill:before{content:\"\\f153\"}.ri-slideshow-3-line:before{content:\"\\f154\"}.ri-slideshow-4-fill:before{content:\"\\f155\"}.ri-slideshow-4-line:before{content:\"\\f156\"}.ri-slideshow-fill:before{content:\"\\f157\"}.ri-slideshow-line:before{content:\"\\f158\"}.ri-smartphone-fill:before{content:\"\\f159\"}.ri-smartphone-line:before{content:\"\\f15a\"}.ri-snapchat-fill:before{content:\"\\f15b\"}.ri-snapchat-line:before{content:\"\\f15c\"}.ri-snowy-fill:before{content:\"\\f15d\"}.ri-snowy-line:before{content:\"\\f15e\"}.ri-sort-asc:before{content:\"\\f15f\"}.ri-sort-desc:before{content:\"\\f160\"}.ri-sound-module-fill:before{content:\"\\f161\"}.ri-sound-module-line:before{content:\"\\f162\"}.ri-soundcloud-fill:before{content:\"\\f163\"}.ri-soundcloud-line:before{content:\"\\f164\"}.ri-space-ship-fill:before{content:\"\\f165\"}.ri-space-ship-line:before{content:\"\\f166\"}.ri-space:before{content:\"\\f167\"}.ri-spam-2-fill:before{content:\"\\f168\"}.ri-spam-2-line:before{content:\"\\f169\"}.ri-spam-3-fill:before{content:\"\\f16a\"}.ri-spam-3-line:before{content:\"\\f16b\"}.ri-spam-fill:before{content:\"\\f16c\"}.ri-spam-line:before{content:\"\\f16d\"}.ri-speaker-2-fill:before{content:\"\\f16e\"}.ri-speaker-2-line:before{content:\"\\f16f\"}.ri-speaker-3-fill:before{content:\"\\f170\"}.ri-speaker-3-line:before{content:\"\\f171\"}.ri-speaker-fill:before{content:\"\\f172\"}.ri-speaker-line:before{content:\"\\f173\"}.ri-spectrum-fill:before{content:\"\\f174\"}.ri-spectrum-line:before{content:\"\\f175\"}.ri-speed-fill:before{content:\"\\f176\"}.ri-speed-line:before{content:\"\\f177\"}.ri-speed-mini-fill:before{content:\"\\f178\"}.ri-speed-mini-line:before{content:\"\\f179\"}.ri-split-cells-horizontal:before{content:\"\\f17a\"}.ri-split-cells-vertical:before{content:\"\\f17b\"}.ri-spotify-fill:before{content:\"\\f17c\"}.ri-spotify-line:before{content:\"\\f17d\"}.ri-spy-fill:before{content:\"\\f17e\"}.ri-spy-line:before{content:\"\\f17f\"}.ri-stack-fill:before{content:\"\\f180\"}.ri-stack-line:before{content:\"\\f181\"}.ri-stack-overflow-fill:before{content:\"\\f182\"}.ri-stack-overflow-line:before{content:\"\\f183\"}.ri-stackshare-fill:before{content:\"\\f184\"}.ri-stackshare-line:before{content:\"\\f185\"}.ri-star-fill:before{content:\"\\f186\"}.ri-star-half-fill:before{content:\"\\f187\"}.ri-star-half-line:before{content:\"\\f188\"}.ri-star-half-s-fill:before{content:\"\\f189\"}.ri-star-half-s-line:before{content:\"\\f18a\"}.ri-star-line:before{content:\"\\f18b\"}.ri-star-s-fill:before{content:\"\\f18c\"}.ri-star-s-line:before{content:\"\\f18d\"}.ri-star-smile-fill:before{content:\"\\f18e\"}.ri-star-smile-line:before{content:\"\\f18f\"}.ri-steam-fill:before{content:\"\\f190\"}.ri-steam-line:before{content:\"\\f191\"}.ri-steering-2-fill:before{content:\"\\f192\"}.ri-steering-2-line:before{content:\"\\f193\"}.ri-steering-fill:before{content:\"\\f194\"}.ri-steering-line:before{content:\"\\f195\"}.ri-stethoscope-fill:before{content:\"\\f196\"}.ri-stethoscope-line:before{content:\"\\f197\"}.ri-sticky-note-2-fill:before{content:\"\\f198\"}.ri-sticky-note-2-line:before{content:\"\\f199\"}.ri-sticky-note-fill:before{content:\"\\f19a\"}.ri-sticky-note-line:before{content:\"\\f19b\"}.ri-stock-fill:before{content:\"\\f19c\"}.ri-stock-line:before{content:\"\\f19d\"}.ri-stop-circle-fill:before{content:\"\\f19e\"}.ri-stop-circle-line:before{content:\"\\f19f\"}.ri-stop-fill:before{content:\"\\f1a0\"}.ri-stop-line:before{content:\"\\f1a1\"}.ri-stop-mini-fill:before{content:\"\\f1a2\"}.ri-stop-mini-line:before{content:\"\\f1a3\"}.ri-store-2-fill:before{content:\"\\f1a4\"}.ri-store-2-line:before{content:\"\\f1a5\"}.ri-store-3-fill:before{content:\"\\f1a6\"}.ri-store-3-line:before{content:\"\\f1a7\"}.ri-store-fill:before{content:\"\\f1a8\"}.ri-store-line:before{content:\"\\f1a9\"}.ri-strikethrough-2:before{content:\"\\f1aa\"}.ri-strikethrough:before{content:\"\\f1ab\"}.ri-subscript-2:before{content:\"\\f1ac\"}.ri-subscript:before{content:\"\\f1ad\"}.ri-subtract-fill:before{content:\"\\f1ae\"}.ri-subtract-line:before{content:\"\\f1af\"}.ri-subway-fill:before{content:\"\\f1b0\"}.ri-subway-line:before{content:\"\\f1b1\"}.ri-subway-wifi-fill:before{content:\"\\f1b2\"}.ri-subway-wifi-line:before{content:\"\\f1b3\"}.ri-suitcase-2-fill:before{content:\"\\f1b4\"}.ri-suitcase-2-line:before{content:\"\\f1b5\"}.ri-suitcase-3-fill:before{content:\"\\f1b6\"}.ri-suitcase-3-line:before{content:\"\\f1b7\"}.ri-suitcase-fill:before{content:\"\\f1b8\"}.ri-suitcase-line:before{content:\"\\f1b9\"}.ri-sun-cloudy-fill:before{content:\"\\f1ba\"}.ri-sun-cloudy-line:before{content:\"\\f1bb\"}.ri-sun-fill:before{content:\"\\f1bc\"}.ri-sun-foggy-fill:before{content:\"\\f1bd\"}.ri-sun-foggy-line:before{content:\"\\f1be\"}.ri-sun-line:before{content:\"\\f1bf\"}.ri-superscript-2:before{content:\"\\f1c0\"}.ri-superscript:before{content:\"\\f1c1\"}.ri-surgical-mask-fill:before{content:\"\\f1c2\"}.ri-surgical-mask-line:before{content:\"\\f1c3\"}.ri-surround-sound-fill:before{content:\"\\f1c4\"}.ri-surround-sound-line:before{content:\"\\f1c5\"}.ri-survey-fill:before{content:\"\\f1c6\"}.ri-survey-line:before{content:\"\\f1c7\"}.ri-swap-box-fill:before{content:\"\\f1c8\"}.ri-swap-box-line:before{content:\"\\f1c9\"}.ri-swap-fill:before{content:\"\\f1ca\"}.ri-swap-line:before{content:\"\\f1cb\"}.ri-switch-fill:before{content:\"\\f1cc\"}.ri-switch-line:before{content:\"\\f1cd\"}.ri-sword-fill:before{content:\"\\f1ce\"}.ri-sword-line:before{content:\"\\f1cf\"}.ri-syringe-fill:before{content:\"\\f1d0\"}.ri-syringe-line:before{content:\"\\f1d1\"}.ri-t-box-fill:before{content:\"\\f1d2\"}.ri-t-box-line:before{content:\"\\f1d3\"}.ri-t-shirt-2-fill:before{content:\"\\f1d4\"}.ri-t-shirt-2-line:before{content:\"\\f1d5\"}.ri-t-shirt-air-fill:before{content:\"\\f1d6\"}.ri-t-shirt-air-line:before{content:\"\\f1d7\"}.ri-t-shirt-fill:before{content:\"\\f1d8\"}.ri-t-shirt-line:before{content:\"\\f1d9\"}.ri-table-2:before{content:\"\\f1da\"}.ri-table-alt-fill:before{content:\"\\f1db\"}.ri-table-alt-line:before{content:\"\\f1dc\"}.ri-table-fill:before{content:\"\\f1dd\"}.ri-table-line:before{content:\"\\f1de\"}.ri-tablet-fill:before{content:\"\\f1df\"}.ri-tablet-line:before{content:\"\\f1e0\"}.ri-takeaway-fill:before{content:\"\\f1e1\"}.ri-takeaway-line:before{content:\"\\f1e2\"}.ri-taobao-fill:before{content:\"\\f1e3\"}.ri-taobao-line:before{content:\"\\f1e4\"}.ri-tape-fill:before{content:\"\\f1e5\"}.ri-tape-line:before{content:\"\\f1e6\"}.ri-task-fill:before{content:\"\\f1e7\"}.ri-task-line:before{content:\"\\f1e8\"}.ri-taxi-fill:before{content:\"\\f1e9\"}.ri-taxi-line:before{content:\"\\f1ea\"}.ri-taxi-wifi-fill:before{content:\"\\f1eb\"}.ri-taxi-wifi-line:before{content:\"\\f1ec\"}.ri-team-fill:before{content:\"\\f1ed\"}.ri-team-line:before{content:\"\\f1ee\"}.ri-telegram-fill:before{content:\"\\f1ef\"}.ri-telegram-line:before{content:\"\\f1f0\"}.ri-temp-cold-fill:before{content:\"\\f1f1\"}.ri-temp-cold-line:before{content:\"\\f1f2\"}.ri-temp-hot-fill:before{content:\"\\f1f3\"}.ri-temp-hot-line:before{content:\"\\f1f4\"}.ri-terminal-box-fill:before{content:\"\\f1f5\"}.ri-terminal-box-line:before{content:\"\\f1f6\"}.ri-terminal-fill:before{content:\"\\f1f7\"}.ri-terminal-line:before{content:\"\\f1f8\"}.ri-terminal-window-fill:before{content:\"\\f1f9\"}.ri-terminal-window-line:before{content:\"\\f1fa\"}.ri-test-tube-fill:before{content:\"\\f1fb\"}.ri-test-tube-line:before{content:\"\\f1fc\"}.ri-text-direction-l:before{content:\"\\f1fd\"}.ri-text-direction-r:before{content:\"\\f1fe\"}.ri-text-spacing:before{content:\"\\f1ff\"}.ri-text-wrap:before{content:\"\\f200\"}.ri-text:before{content:\"\\f201\"}.ri-thermometer-fill:before{content:\"\\f202\"}.ri-thermometer-line:before{content:\"\\f203\"}.ri-thumb-down-fill:before{content:\"\\f204\"}.ri-thumb-down-line:before{content:\"\\f205\"}.ri-thumb-up-fill:before{content:\"\\f206\"}.ri-thumb-up-line:before{content:\"\\f207\"}.ri-thunderstorms-fill:before{content:\"\\f208\"}.ri-thunderstorms-line:before{content:\"\\f209\"}.ri-ticket-2-fill:before{content:\"\\f20a\"}.ri-ticket-2-line:before{content:\"\\f20b\"}.ri-ticket-fill:before{content:\"\\f20c\"}.ri-ticket-line:before{content:\"\\f20d\"}.ri-time-fill:before{content:\"\\f20e\"}.ri-time-line:before{content:\"\\f20f\"}.ri-timer-2-fill:before{content:\"\\f210\"}.ri-timer-2-line:before{content:\"\\f211\"}.ri-timer-fill:before{content:\"\\f212\"}.ri-timer-flash-fill:before{content:\"\\f213\"}.ri-timer-flash-line:before{content:\"\\f214\"}.ri-timer-line:before{content:\"\\f215\"}.ri-todo-fill:before{content:\"\\f216\"}.ri-todo-line:before{content:\"\\f217\"}.ri-toggle-fill:before{content:\"\\f218\"}.ri-toggle-line:before{content:\"\\f219\"}.ri-tools-fill:before{content:\"\\f21a\"}.ri-tools-line:before{content:\"\\f21b\"}.ri-tornado-fill:before{content:\"\\f21c\"}.ri-tornado-line:before{content:\"\\f21d\"}.ri-trademark-fill:before{content:\"\\f21e\"}.ri-trademark-line:before{content:\"\\f21f\"}.ri-traffic-light-fill:before{content:\"\\f220\"}.ri-traffic-light-line:before{content:\"\\f221\"}.ri-train-fill:before{content:\"\\f222\"}.ri-train-line:before{content:\"\\f223\"}.ri-train-wifi-fill:before{content:\"\\f224\"}.ri-train-wifi-line:before{content:\"\\f225\"}.ri-translate-2:before{content:\"\\f226\"}.ri-translate:before{content:\"\\f227\"}.ri-travesti-fill:before{content:\"\\f228\"}.ri-travesti-line:before{content:\"\\f229\"}.ri-treasure-map-fill:before{content:\"\\f22a\"}.ri-treasure-map-line:before{content:\"\\f22b\"}.ri-trello-fill:before{content:\"\\f22c\"}.ri-trello-line:before{content:\"\\f22d\"}.ri-trophy-fill:before{content:\"\\f22e\"}.ri-trophy-line:before{content:\"\\f22f\"}.ri-truck-fill:before{content:\"\\f230\"}.ri-truck-line:before{content:\"\\f231\"}.ri-tumblr-fill:before{content:\"\\f232\"}.ri-tumblr-line:before{content:\"\\f233\"}.ri-tv-2-fill:before{content:\"\\f234\"}.ri-tv-2-line:before{content:\"\\f235\"}.ri-tv-fill:before{content:\"\\f236\"}.ri-tv-line:before{content:\"\\f237\"}.ri-twitch-fill:before{content:\"\\f238\"}.ri-twitch-line:before{content:\"\\f239\"}.ri-twitter-fill:before{content:\"\\f23a\"}.ri-twitter-line:before{content:\"\\f23b\"}.ri-typhoon-fill:before{content:\"\\f23c\"}.ri-typhoon-line:before{content:\"\\f23d\"}.ri-u-disk-fill:before{content:\"\\f23e\"}.ri-u-disk-line:before{content:\"\\f23f\"}.ri-ubuntu-fill:before{content:\"\\f240\"}.ri-ubuntu-line:before{content:\"\\f241\"}.ri-umbrella-fill:before{content:\"\\f242\"}.ri-umbrella-line:before{content:\"\\f243\"}.ri-underline:before{content:\"\\f244\"}.ri-uninstall-fill:before{content:\"\\f245\"}.ri-uninstall-line:before{content:\"\\f246\"}.ri-unsplash-fill:before{content:\"\\f247\"}.ri-unsplash-line:before{content:\"\\f248\"}.ri-upload-2-fill:before{content:\"\\f249\"}.ri-upload-2-line:before{content:\"\\f24a\"}.ri-upload-cloud-2-fill:before{content:\"\\f24b\"}.ri-upload-cloud-2-line:before{content:\"\\f24c\"}.ri-upload-cloud-fill:before{content:\"\\f24d\"}.ri-upload-cloud-line:before{content:\"\\f24e\"}.ri-upload-fill:before{content:\"\\f24f\"}.ri-upload-line:before{content:\"\\f250\"}.ri-usb-fill:before{content:\"\\f251\"}.ri-usb-line:before{content:\"\\f252\"}.ri-user-2-fill:before{content:\"\\f253\"}.ri-user-2-line:before{content:\"\\f254\"}.ri-user-3-fill:before{content:\"\\f255\"}.ri-user-3-line:before{content:\"\\f256\"}.ri-user-4-fill:before{content:\"\\f257\"}.ri-user-4-line:before{content:\"\\f258\"}.ri-user-5-fill:before{content:\"\\f259\"}.ri-user-5-line:before{content:\"\\f25a\"}.ri-user-6-fill:before{content:\"\\f25b\"}.ri-user-6-line:before{content:\"\\f25c\"}.ri-user-add-fill:before{content:\"\\f25d\"}.ri-user-add-line:before{content:\"\\f25e\"}.ri-user-fill:before{content:\"\\f25f\"}.ri-user-follow-fill:before{content:\"\\f260\"}.ri-user-follow-line:before{content:\"\\f261\"}.ri-user-heart-fill:before{content:\"\\f262\"}.ri-user-heart-line:before{content:\"\\f263\"}.ri-user-line:before{content:\"\\f264\"}.ri-user-location-fill:before{content:\"\\f265\"}.ri-user-location-line:before{content:\"\\f266\"}.ri-user-received-2-fill:before{content:\"\\f267\"}.ri-user-received-2-line:before{content:\"\\f268\"}.ri-user-received-fill:before{content:\"\\f269\"}.ri-user-received-line:before{content:\"\\f26a\"}.ri-user-search-fill:before{content:\"\\f26b\"}.ri-user-search-line:before{content:\"\\f26c\"}.ri-user-settings-fill:before{content:\"\\f26d\"}.ri-user-settings-line:before{content:\"\\f26e\"}.ri-user-shared-2-fill:before{content:\"\\f26f\"}.ri-user-shared-2-line:before{content:\"\\f270\"}.ri-user-shared-fill:before{content:\"\\f271\"}.ri-user-shared-line:before{content:\"\\f272\"}.ri-user-smile-fill:before{content:\"\\f273\"}.ri-user-smile-line:before{content:\"\\f274\"}.ri-user-star-fill:before{content:\"\\f275\"}.ri-user-star-line:before{content:\"\\f276\"}.ri-user-unfollow-fill:before{content:\"\\f277\"}.ri-user-unfollow-line:before{content:\"\\f278\"}.ri-user-voice-fill:before{content:\"\\f279\"}.ri-user-voice-line:before{content:\"\\f27a\"}.ri-video-add-fill:before{content:\"\\f27b\"}.ri-video-add-line:before{content:\"\\f27c\"}.ri-video-chat-fill:before{content:\"\\f27d\"}.ri-video-chat-line:before{content:\"\\f27e\"}.ri-video-download-fill:before{content:\"\\f27f\"}.ri-video-download-line:before{content:\"\\f280\"}.ri-video-fill:before{content:\"\\f281\"}.ri-video-line:before{content:\"\\f282\"}.ri-video-upload-fill:before{content:\"\\f283\"}.ri-video-upload-line:before{content:\"\\f284\"}.ri-vidicon-2-fill:before{content:\"\\f285\"}.ri-vidicon-2-line:before{content:\"\\f286\"}.ri-vidicon-fill:before{content:\"\\f287\"}.ri-vidicon-line:before{content:\"\\f288\"}.ri-vimeo-fill:before{content:\"\\f289\"}.ri-vimeo-line:before{content:\"\\f28a\"}.ri-vip-crown-2-fill:before{content:\"\\f28b\"}.ri-vip-crown-2-line:before{content:\"\\f28c\"}.ri-vip-crown-fill:before{content:\"\\f28d\"}.ri-vip-crown-line:before{content:\"\\f28e\"}.ri-vip-diamond-fill:before{content:\"\\f28f\"}.ri-vip-diamond-line:before{content:\"\\f290\"}.ri-vip-fill:before{content:\"\\f291\"}.ri-vip-line:before{content:\"\\f292\"}.ri-virus-fill:before{content:\"\\f293\"}.ri-virus-line:before{content:\"\\f294\"}.ri-visa-fill:before{content:\"\\f295\"}.ri-visa-line:before{content:\"\\f296\"}.ri-voice-recognition-fill:before{content:\"\\f297\"}.ri-voice-recognition-line:before{content:\"\\f298\"}.ri-voiceprint-fill:before{content:\"\\f299\"}.ri-voiceprint-line:before{content:\"\\f29a\"}.ri-volume-down-fill:before{content:\"\\f29b\"}.ri-volume-down-line:before{content:\"\\f29c\"}.ri-volume-mute-fill:before{content:\"\\f29d\"}.ri-volume-mute-line:before{content:\"\\f29e\"}.ri-volume-off-vibrate-fill:before{content:\"\\f29f\"}.ri-volume-off-vibrate-line:before{content:\"\\f2a0\"}.ri-volume-up-fill:before{content:\"\\f2a1\"}.ri-volume-up-line:before{content:\"\\f2a2\"}.ri-volume-vibrate-fill:before{content:\"\\f2a3\"}.ri-volume-vibrate-line:before{content:\"\\f2a4\"}.ri-vuejs-fill:before{content:\"\\f2a5\"}.ri-vuejs-line:before{content:\"\\f2a6\"}.ri-walk-fill:before{content:\"\\f2a7\"}.ri-walk-line:before{content:\"\\f2a8\"}.ri-wallet-2-fill:before{content:\"\\f2a9\"}.ri-wallet-2-line:before{content:\"\\f2aa\"}.ri-wallet-3-fill:before{content:\"\\f2ab\"}.ri-wallet-3-line:before{content:\"\\f2ac\"}.ri-wallet-fill:before{content:\"\\f2ad\"}.ri-wallet-line:before{content:\"\\f2ae\"}.ri-water-flash-fill:before{content:\"\\f2af\"}.ri-water-flash-line:before{content:\"\\f2b0\"}.ri-webcam-fill:before{content:\"\\f2b1\"}.ri-webcam-line:before{content:\"\\f2b2\"}.ri-wechat-2-fill:before{content:\"\\f2b3\"}.ri-wechat-2-line:before{content:\"\\f2b4\"}.ri-wechat-fill:before{content:\"\\f2b5\"}.ri-wechat-line:before{content:\"\\f2b6\"}.ri-wechat-pay-fill:before{content:\"\\f2b7\"}.ri-wechat-pay-line:before{content:\"\\f2b8\"}.ri-weibo-fill:before{content:\"\\f2b9\"}.ri-weibo-line:before{content:\"\\f2ba\"}.ri-whatsapp-fill:before{content:\"\\f2bb\"}.ri-whatsapp-line:before{content:\"\\f2bc\"}.ri-wheelchair-fill:before{content:\"\\f2bd\"}.ri-wheelchair-line:before{content:\"\\f2be\"}.ri-wifi-fill:before{content:\"\\f2bf\"}.ri-wifi-line:before{content:\"\\f2c0\"}.ri-wifi-off-fill:before{content:\"\\f2c1\"}.ri-wifi-off-line:before{content:\"\\f2c2\"}.ri-window-2-fill:before{content:\"\\f2c3\"}.ri-window-2-line:before{content:\"\\f2c4\"}.ri-window-fill:before{content:\"\\f2c5\"}.ri-window-line:before{content:\"\\f2c6\"}.ri-windows-fill:before{content:\"\\f2c7\"}.ri-windows-line:before{content:\"\\f2c8\"}.ri-windy-fill:before{content:\"\\f2c9\"}.ri-windy-line:before{content:\"\\f2ca\"}.ri-wireless-charging-fill:before{content:\"\\f2cb\"}.ri-wireless-charging-line:before{content:\"\\f2cc\"}.ri-women-fill:before{content:\"\\f2cd\"}.ri-women-line:before{content:\"\\f2ce\"}.ri-wubi-input:before{content:\"\\f2cf\"}.ri-xbox-fill:before{content:\"\\f2d0\"}.ri-xbox-line:before{content:\"\\f2d1\"}.ri-xing-fill:before{content:\"\\f2d2\"}.ri-xing-line:before{content:\"\\f2d3\"}.ri-youtube-fill:before{content:\"\\f2d4\"}.ri-youtube-line:before{content:\"\\f2d5\"}.ri-zcool-fill:before{content:\"\\f2d6\"}.ri-zcool-line:before{content:\"\\f2d7\"}.ri-zhihu-fill:before{content:\"\\f2d8\"}.ri-zhihu-line:before{content:\"\\f2d9\"}.ri-zoom-in-fill:before{content:\"\\f2da\"}.ri-zoom-in-line:before{content:\"\\f2db\"}.ri-zoom-out-fill:before{content:\"\\f2dc\"}.ri-zoom-out-line:before{content:\"\\f2dd\"}.ri-zzz-fill:before{content:\"\\f2de\"}.ri-zzz-line:before{content:\"\\f2df\"}.img-icon[data-v-79aac9d9]{display:inline-block;width:2em;height:2em;vertical-align:middle}.vab-icon[data-v-79aac9d9]{display:inline-block;width:16px;height:16px;margin:0 auto;overflow:hidden;vertical-align:middle;fill:currentColor}[class*=ri][data-v-79aac9d9]{display:inline-block;font-size:16px;text-align:center;vertical-align:-3.5px}"]}]);
  8940. // Exports
  8941. module.exports = exports;
  8942. /***/ }),
  8943. /***/ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css&":
  8944. /*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  8945. !*** ./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-1-2!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css& ***!
  8946. \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  8947. /*! no static exports found */
  8948. /***/ (function(module, exports, __webpack_require__) {
  8949. // Imports
  8950. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../_css-loader@3.6.0@css-loader/dist/runtime/api.js */ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/api.js");
  8951. exports = ___CSS_LOADER_API_IMPORT___(true);
  8952. // Module
  8953. exports.push([module.i, "\ncanvas[data-v-056888e0] {\n max-width: 100%;\n display: block;\n}\n", "",{"version":3,"sources":["/Users/xmnk/code/Lab/LabCenter/node_modules/_vue-esign@1.1.4@vue-esign/src/node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue"],"names":[],"mappings":";AA4RA;EACA,eAAA;EACA,cAAA;AACA","file":"index.vue","sourcesContent":["<template>\n <canvas ref=\"canvas\" @mousedown=\"mouseDown\" @mousemove=\"mouseMove\" @mouseup=\"mouseUp\"\n @touchstart=\"touchStart\" @touchmove=\"touchMove\" @touchend=\"touchEnd\"></canvas>\n</template>\n\n<script>\nexport default {\n props: {\n width: {\n type: Number,\n default: 800\n },\n height: {\n type: Number,\n default: 300\n },\n lineWidth: {\n type: Number,\n default: 4\n },\n lineColor: {\n type: String,\n default: '#000000'\n },\n bgColor: {\n type: String,\n default: ''\n },\n isCrop: {\n type: Boolean,\n default: false\n },\n isClearBgColor: {\n type: Boolean,\n default: true\n },\n format: {\n type: String,\n default: 'image/png'\n },\n quality: {\n type: Number,\n default: 1\n }\n },\n data () {\n return {\n hasDrew: false,\n resultImg: '',\n points: [],\n canvasTxt: null,\n startX: 0,\n startY: 0,\n isDrawing: false,\n sratio: 1\n }\n },\n computed: {\n ratio () {\n return this.height / this.width\n },\n stageInfo () {\n return this.$refs.canvas.getBoundingClientRect()\n },\n myBg () {\n return this.bgColor ? this.bgColor : 'rgba(255, 255, 255, 0)'\n }\n },\n watch: {\n 'myBg': function (newVal) {\n this.$refs.canvas.style.background = newVal\n }\n },\n beforeMount () {\n window.addEventListener('resize', this.$_resizeHandler)\n },\n beforeDestroy () {\n window.removeEventListener('resize', this.$_resizeHandler)\n },\n mounted () {\n const canvas = this.$refs.canvas\n canvas.height = this.height\n canvas.width = this.width\n canvas.style.background = this.myBg\n this.$_resizeHandler()\n // 在画板以外松开鼠标后冻结画笔\n document.onmouseup = () => {\n this.isDrawing = false\n }\n },\n methods: {\n $_resizeHandler () {\n const canvas = this.$refs.canvas\n canvas.style.width = this.width + \"px\"\n const realw = parseFloat(window.getComputedStyle(canvas).width)\n canvas.style.height = this.ratio * realw + \"px\";\n this.canvasTxt = canvas.getContext('2d')\n this.canvasTxt.scale(1 * this.sratio, 1 * this.sratio)\n this.sratio = realw / this.width\n this.canvasTxt.scale(1 / this.sratio, 1 / this.sratio)\n },\n // pc\n mouseDown (e) {\n e = e || event\n e.preventDefault()\n this.isDrawing = true\n this.hasDrew = true\n let obj = {\n x: e.offsetX,\n y: e.offsetY\n }\n this.drawStart(obj)\n },\n mouseMove (e) {\n e = e || event\n e.preventDefault()\n if (this.isDrawing) {\n let obj = {\n x: e.offsetX,\n y: e.offsetY\n }\n this.drawMove(obj)\n }\n },\n mouseUp (e) {\n e = e || event\n e.preventDefault()\n let obj = {\n x: e.offsetX,\n y: e.offsetY\n }\n this.drawEnd(obj)\n this.isDrawing = false\n },\n // mobile\n touchStart (e) {\n e = e || event\n e.preventDefault()\n this.hasDrew = true\n if (e.touches.length === 1) {\n let obj = {\n x: e.targetTouches[0].clientX - this.$refs.canvas.getBoundingClientRect().left,\n y: e.targetTouches[0].clientY - this.$refs.canvas.getBoundingClientRect().top\n }\n this.drawStart(obj)\n }\n },\n touchMove (e) {\n e = e || event\n e.preventDefault()\n if (e.touches.length === 1) {\n let obj = {\n x: e.targetTouches[0].clientX - this.$refs.canvas.getBoundingClientRect().left,\n y: e.targetTouches[0].clientY - this.$refs.canvas.getBoundingClientRect().top\n }\n this.drawMove(obj)\n }\n },\n touchEnd (e) {\n e = e || event\n e.preventDefault()\n if (e.touches.length === 1) {\n let obj = {\n x: e.targetTouches[0].clientX - this.$refs.canvas.getBoundingClientRect().left,\n y: e.targetTouches[0].clientY - this.$refs.canvas.getBoundingClientRect().top\n }\n this.drawEnd(obj)\n }\n },\n // 绘制\n drawStart (obj) {\n this.startX = obj.x\n this.startY = obj.y\n this.canvasTxt.beginPath()\n this.canvasTxt.moveTo(this.startX, this.startY)\n this.canvasTxt.lineTo(obj.x, obj.y)\n this.canvasTxt.lineCap = 'round'\n this.canvasTxt.lineJoin = 'round'\n this.canvasTxt.lineWidth = this.lineWidth * this.sratio\n this.canvasTxt.stroke()\n this.canvasTxt.closePath()\n this.points.push(obj)\n },\n drawMove (obj) {\n this.canvasTxt.beginPath()\n this.canvasTxt.moveTo(this.startX, this.startY)\n this.canvasTxt.lineTo(obj.x, obj.y)\n this.canvasTxt.strokeStyle = this.lineColor\n this.canvasTxt.lineWidth = this.lineWidth * this.sratio\n this.canvasTxt.lineCap = 'round'\n this.canvasTxt.lineJoin = 'round'\n this.canvasTxt.stroke()\n this.canvasTxt.closePath()\n this.startY = obj.y\n this.startX = obj.x\n this.points.push(obj)\n },\n drawEnd (obj) {\n this.canvasTxt.beginPath()\n this.canvasTxt.moveTo(this.startX, this.startY)\n this.canvasTxt.lineTo(obj.x, obj.y)\n this.canvasTxt.lineCap = 'round'\n this.canvasTxt.lineJoin = 'round'\n this.canvasTxt.stroke()\n this.canvasTxt.closePath()\n this.points.push(obj)\n this.points.push({x: -1, y: -1})\n },\n // 操作\n generate (options) {\n let imgFormat = options && options.format ? options.format: this.format\n let imgQuality = options && options.quality ? options.quality: this.quality\n const pm = new Promise((resolve, reject) => {\n if (!this.hasDrew) {\n reject(`Warning: Not Signned!`)\n return\n }\n var resImgData = this.canvasTxt.getImageData(0, 0, this.$refs.canvas.width, this.$refs.canvas.height)\n this.canvasTxt.globalCompositeOperation = \"destination-over\"\n this.canvasTxt.fillStyle = this.myBg\n this.canvasTxt.fillRect(0,0,this.$refs.canvas.width ,this.$refs.canvas.height)\n this.resultImg = this.$refs.canvas.toDataURL(imgFormat, imgQuality)\n var resultImg = this.resultImg\n this.canvasTxt.clearRect(0, 0, this.$refs.canvas.width ,this.$refs.canvas.height)\n this.canvasTxt.putImageData(resImgData, 0, 0)\n this.canvasTxt.globalCompositeOperation = \"source-over\"\n if (this.isCrop) {\n const crop_area = this.getCropArea(resImgData.data)\n var crop_canvas = document.createElement('canvas')\n const crop_ctx = crop_canvas.getContext('2d')\n crop_canvas.width = crop_area[2] - crop_area[0]\n crop_canvas.height = crop_area[3] - crop_area[1]\n const crop_imgData = this.canvasTxt.getImageData(...crop_area)\n crop_ctx.globalCompositeOperation = \"destination-over\"\n crop_ctx.putImageData(crop_imgData, 0, 0)\n crop_ctx.fillStyle = this.myBg\n crop_ctx.fillRect(0, 0, crop_canvas.width , crop_canvas.height)\n resultImg = crop_canvas.toDataURL(imgFormat, imgQuality)\n crop_canvas = null\n }\n resolve(resultImg)\n })\n return pm\n },\n reset () {\n this.canvasTxt.clearRect(\n 0,\n 0,\n this.$refs.canvas.width,\n this.$refs.canvas.height\n )\n if (this.isClearBgColor) {\n this.$emit('update:bgColor', '')\n this.$refs.canvas.style.background = 'rgba(255, 255, 255, 0)'\n }\n this.points = []\n this.hasDrew = false\n this.resultImg = ''\n },\n getCropArea (imgData) {\n var topX = this.$refs.canvas.width; var btmX = 0; var topY = this.$refs.canvas.height; var btnY = 0\n for (var i = 0; i < this.$refs.canvas.width; i++) {\n for (var j = 0; j < this.$refs.canvas.height; j++) {\n var pos = (i + this.$refs.canvas.width * j) * 4\n if (imgData[pos] > 0 || imgData[pos + 1] > 0 || imgData[pos + 2] || imgData[pos + 3] > 0) {\n btnY = Math.max(j, btnY)\n btmX = Math.max(i, btmX)\n topY = Math.min(j, topY)\n topX = Math.min(i, topX)\n }\n }\n }\n topX++\n btmX++\n topY++\n btnY++\n const data = [topX, topY, btmX, btnY]\n return data\n }\n }\n}\n</script>\n\n<style scoped>\ncanvas {\n max-width: 100%;\n display: block;\n}\n</style>\n"]}]);
  8954. // Exports
  8955. module.exports = exports;
  8956. /***/ }),
  8957. /***/ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/api.js":
  8958. /*!***********************************************************************!*\
  8959. !*** ./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/api.js ***!
  8960. \***********************************************************************/
  8961. /*! no static exports found */
  8962. /***/ (function(module, exports, __webpack_require__) {
  8963. "use strict";
  8964. /*
  8965. MIT License http://www.opensource.org/licenses/mit-license.php
  8966. Author Tobias Koppers @sokra
  8967. */
  8968. // css base code, injected by the css-loader
  8969. // eslint-disable-next-line func-names
  8970. module.exports = function (useSourceMap) {
  8971. var list = []; // return the list of modules as css string
  8972. list.toString = function toString() {
  8973. return this.map(function (item) {
  8974. var content = cssWithMappingToString(item, useSourceMap);
  8975. if (item[2]) {
  8976. return "@media ".concat(item[2], " {").concat(content, "}");
  8977. }
  8978. return content;
  8979. }).join('');
  8980. }; // import a list of modules into the list
  8981. // eslint-disable-next-line func-names
  8982. list.i = function (modules, mediaQuery, dedupe) {
  8983. if (typeof modules === 'string') {
  8984. // eslint-disable-next-line no-param-reassign
  8985. modules = [[null, modules, '']];
  8986. }
  8987. var alreadyImportedModules = {};
  8988. if (dedupe) {
  8989. for (var i = 0; i < this.length; i++) {
  8990. // eslint-disable-next-line prefer-destructuring
  8991. var id = this[i][0];
  8992. if (id != null) {
  8993. alreadyImportedModules[id] = true;
  8994. }
  8995. }
  8996. }
  8997. for (var _i = 0; _i < modules.length; _i++) {
  8998. var item = [].concat(modules[_i]);
  8999. if (dedupe && alreadyImportedModules[item[0]]) {
  9000. // eslint-disable-next-line no-continue
  9001. continue;
  9002. }
  9003. if (mediaQuery) {
  9004. if (!item[2]) {
  9005. item[2] = mediaQuery;
  9006. } else {
  9007. item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
  9008. }
  9009. }
  9010. list.push(item);
  9011. }
  9012. };
  9013. return list;
  9014. };
  9015. function cssWithMappingToString(item, useSourceMap) {
  9016. var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
  9017. var cssMapping = item[3];
  9018. if (!cssMapping) {
  9019. return content;
  9020. }
  9021. if (useSourceMap && typeof btoa === 'function') {
  9022. var sourceMapping = toComment(cssMapping);
  9023. var sourceURLs = cssMapping.sources.map(function (source) {
  9024. return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
  9025. });
  9026. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  9027. }
  9028. return [content].join('\n');
  9029. } // Adapted from convert-source-map (MIT)
  9030. function toComment(sourceMap) {
  9031. // eslint-disable-next-line no-undef
  9032. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  9033. var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
  9034. return "/*# ".concat(data, " */");
  9035. }
  9036. /***/ }),
  9037. /***/ "./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/getUrl.js":
  9038. /*!**************************************************************************!*\
  9039. !*** ./node_modules/_css-loader@3.6.0@css-loader/dist/runtime/getUrl.js ***!
  9040. \**************************************************************************/
  9041. /*! no static exports found */
  9042. /***/ (function(module, exports, __webpack_require__) {
  9043. "use strict";
  9044. module.exports = function (url, options) {
  9045. if (!options) {
  9046. // eslint-disable-next-line no-param-reassign
  9047. options = {};
  9048. } // eslint-disable-next-line no-underscore-dangle, no-param-reassign
  9049. url = url && url.__esModule ? url.default : url;
  9050. if (typeof url !== 'string') {
  9051. return url;
  9052. } // If url is already wrapped in quotes, remove them
  9053. if (/^['"].*['"]$/.test(url)) {
  9054. // eslint-disable-next-line no-param-reassign
  9055. url = url.slice(1, -1);
  9056. }
  9057. if (options.hash) {
  9058. // eslint-disable-next-line no-param-reassign
  9059. url += options.hash;
  9060. } // Should url be wrapped?
  9061. // See https://drafts.csswg.org/css-values-3/#urls
  9062. if (/["'() \t\n]/.test(url) || options.needQuotes) {
  9063. return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, '\\n'), "\"");
  9064. }
  9065. return url;
  9066. };
  9067. /***/ }),
  9068. /***/ "./node_modules/_deepmerge@1.5.2@deepmerge/dist/cjs.js":
  9069. /*!*************************************************************!*\
  9070. !*** ./node_modules/_deepmerge@1.5.2@deepmerge/dist/cjs.js ***!
  9071. \*************************************************************/
  9072. /*! no static exports found */
  9073. /***/ (function(module, exports, __webpack_require__) {
  9074. "use strict";
  9075. var isMergeableObject = function isMergeableObject(value) {
  9076. return isNonNullObject(value)
  9077. && !isSpecial(value)
  9078. };
  9079. function isNonNullObject(value) {
  9080. return !!value && typeof value === 'object'
  9081. }
  9082. function isSpecial(value) {
  9083. var stringValue = Object.prototype.toString.call(value);
  9084. return stringValue === '[object RegExp]'
  9085. || stringValue === '[object Date]'
  9086. || isReactElement(value)
  9087. }
  9088. // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
  9089. var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
  9090. var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
  9091. function isReactElement(value) {
  9092. return value.$$typeof === REACT_ELEMENT_TYPE
  9093. }
  9094. function emptyTarget(val) {
  9095. return Array.isArray(val) ? [] : {}
  9096. }
  9097. function cloneIfNecessary(value, optionsArgument) {
  9098. var clone = optionsArgument && optionsArgument.clone === true;
  9099. return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
  9100. }
  9101. function defaultArrayMerge(target, source, optionsArgument) {
  9102. var destination = target.slice();
  9103. source.forEach(function(e, i) {
  9104. if (typeof destination[i] === 'undefined') {
  9105. destination[i] = cloneIfNecessary(e, optionsArgument);
  9106. } else if (isMergeableObject(e)) {
  9107. destination[i] = deepmerge(target[i], e, optionsArgument);
  9108. } else if (target.indexOf(e) === -1) {
  9109. destination.push(cloneIfNecessary(e, optionsArgument));
  9110. }
  9111. });
  9112. return destination
  9113. }
  9114. function mergeObject(target, source, optionsArgument) {
  9115. var destination = {};
  9116. if (isMergeableObject(target)) {
  9117. Object.keys(target).forEach(function(key) {
  9118. destination[key] = cloneIfNecessary(target[key], optionsArgument);
  9119. });
  9120. }
  9121. Object.keys(source).forEach(function(key) {
  9122. if (!isMergeableObject(source[key]) || !target[key]) {
  9123. destination[key] = cloneIfNecessary(source[key], optionsArgument);
  9124. } else {
  9125. destination[key] = deepmerge(target[key], source[key], optionsArgument);
  9126. }
  9127. });
  9128. return destination
  9129. }
  9130. function deepmerge(target, source, optionsArgument) {
  9131. var sourceIsArray = Array.isArray(source);
  9132. var targetIsArray = Array.isArray(target);
  9133. var options = optionsArgument || { arrayMerge: defaultArrayMerge };
  9134. var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
  9135. if (!sourceAndTargetTypesMatch) {
  9136. return cloneIfNecessary(source, optionsArgument)
  9137. } else if (sourceIsArray) {
  9138. var arrayMerge = options.arrayMerge || defaultArrayMerge;
  9139. return arrayMerge(target, source, optionsArgument)
  9140. } else {
  9141. return mergeObject(target, source, optionsArgument)
  9142. }
  9143. }
  9144. deepmerge.all = function deepmergeAll(array, optionsArgument) {
  9145. if (!Array.isArray(array) || array.length < 2) {
  9146. throw new Error('first argument should be an array with at least two elements')
  9147. }
  9148. // we are sure there are at least 2 values, so it is safe to have no initial value
  9149. return array.reduce(function(prev, next) {
  9150. return deepmerge(prev, next, optionsArgument)
  9151. })
  9152. };
  9153. var deepmerge_1 = deepmerge;
  9154. module.exports = deepmerge_1;
  9155. /***/ }),
  9156. /***/ "./node_modules/_dijkstrajs@1.0.2@dijkstrajs/dijkstra.js":
  9157. /*!***************************************************************!*\
  9158. !*** ./node_modules/_dijkstrajs@1.0.2@dijkstrajs/dijkstra.js ***!
  9159. \***************************************************************/
  9160. /*! no static exports found */
  9161. /***/ (function(module, exports, __webpack_require__) {
  9162. "use strict";
  9163. /******************************************************************************
  9164. * Created 2008-08-19.
  9165. *
  9166. * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
  9167. *
  9168. * Copyright (C) 2008
  9169. * Wyatt Baldwin <self@wyattbaldwin.com>
  9170. * All rights reserved
  9171. *
  9172. * Licensed under the MIT license.
  9173. *
  9174. * http://www.opensource.org/licenses/mit-license.php
  9175. *
  9176. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  9177. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  9178. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  9179. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  9180. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  9181. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  9182. * THE SOFTWARE.
  9183. *****************************************************************************/
  9184. var dijkstra = {
  9185. single_source_shortest_paths: function(graph, s, d) {
  9186. // Predecessor map for each node that has been encountered.
  9187. // node ID => predecessor node ID
  9188. var predecessors = {};
  9189. // Costs of shortest paths from s to all nodes encountered.
  9190. // node ID => cost
  9191. var costs = {};
  9192. costs[s] = 0;
  9193. // Costs of shortest paths from s to all nodes encountered; differs from
  9194. // `costs` in that it provides easy access to the node that currently has
  9195. // the known shortest path from s.
  9196. // XXX: Do we actually need both `costs` and `open`?
  9197. var open = dijkstra.PriorityQueue.make();
  9198. open.push(s, 0);
  9199. var closest,
  9200. u, v,
  9201. cost_of_s_to_u,
  9202. adjacent_nodes,
  9203. cost_of_e,
  9204. cost_of_s_to_u_plus_cost_of_e,
  9205. cost_of_s_to_v,
  9206. first_visit;
  9207. while (!open.empty()) {
  9208. // In the nodes remaining in graph that have a known cost from s,
  9209. // find the node, u, that currently has the shortest path from s.
  9210. closest = open.pop();
  9211. u = closest.value;
  9212. cost_of_s_to_u = closest.cost;
  9213. // Get nodes adjacent to u...
  9214. adjacent_nodes = graph[u] || {};
  9215. // ...and explore the edges that connect u to those nodes, updating
  9216. // the cost of the shortest paths to any or all of those nodes as
  9217. // necessary. v is the node across the current edge from u.
  9218. for (v in adjacent_nodes) {
  9219. if (adjacent_nodes.hasOwnProperty(v)) {
  9220. // Get the cost of the edge running from u to v.
  9221. cost_of_e = adjacent_nodes[v];
  9222. // Cost of s to u plus the cost of u to v across e--this is *a*
  9223. // cost from s to v that may or may not be less than the current
  9224. // known cost to v.
  9225. cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
  9226. // If we haven't visited v yet OR if the current known cost from s to
  9227. // v is greater than the new cost we just found (cost of s to u plus
  9228. // cost of u to v across e), update v's cost in the cost list and
  9229. // update v's predecessor in the predecessor list (it's now u).
  9230. cost_of_s_to_v = costs[v];
  9231. first_visit = (typeof costs[v] === 'undefined');
  9232. if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
  9233. costs[v] = cost_of_s_to_u_plus_cost_of_e;
  9234. open.push(v, cost_of_s_to_u_plus_cost_of_e);
  9235. predecessors[v] = u;
  9236. }
  9237. }
  9238. }
  9239. }
  9240. if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
  9241. var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
  9242. throw new Error(msg);
  9243. }
  9244. return predecessors;
  9245. },
  9246. extract_shortest_path_from_predecessor_list: function(predecessors, d) {
  9247. var nodes = [];
  9248. var u = d;
  9249. var predecessor;
  9250. while (u) {
  9251. nodes.push(u);
  9252. predecessor = predecessors[u];
  9253. u = predecessors[u];
  9254. }
  9255. nodes.reverse();
  9256. return nodes;
  9257. },
  9258. find_path: function(graph, s, d) {
  9259. var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
  9260. return dijkstra.extract_shortest_path_from_predecessor_list(
  9261. predecessors, d);
  9262. },
  9263. /**
  9264. * A very naive priority queue implementation.
  9265. */
  9266. PriorityQueue: {
  9267. make: function (opts) {
  9268. var T = dijkstra.PriorityQueue,
  9269. t = {},
  9270. key;
  9271. opts = opts || {};
  9272. for (key in T) {
  9273. if (T.hasOwnProperty(key)) {
  9274. t[key] = T[key];
  9275. }
  9276. }
  9277. t.queue = [];
  9278. t.sorter = opts.sorter || T.default_sorter;
  9279. return t;
  9280. },
  9281. default_sorter: function (a, b) {
  9282. return a.cost - b.cost;
  9283. },
  9284. /**
  9285. * Add a new item to the queue and ensure the highest priority element
  9286. * is at the front of the queue.
  9287. */
  9288. push: function (value, cost) {
  9289. var item = {value: value, cost: cost};
  9290. this.queue.push(item);
  9291. this.queue.sort(this.sorter);
  9292. },
  9293. /**
  9294. * Return the highest priority element in the queue.
  9295. */
  9296. pop: function () {
  9297. return this.queue.shift();
  9298. },
  9299. empty: function () {
  9300. return this.queue.length === 0;
  9301. }
  9302. }
  9303. };
  9304. // node.js module exports
  9305. if (true) {
  9306. module.exports = dijkstra;
  9307. }
  9308. /***/ }),
  9309. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/button-group.js":
  9310. /*!************************************************************************!*\
  9311. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/button-group.js ***!
  9312. \************************************************************************/
  9313. /*! no static exports found */
  9314. /***/ (function(module, exports, __webpack_require__) {
  9315. module.exports =
  9316. /******/ (function(modules) { // webpackBootstrap
  9317. /******/ // The module cache
  9318. /******/ var installedModules = {};
  9319. /******/
  9320. /******/ // The require function
  9321. /******/ function __webpack_require__(moduleId) {
  9322. /******/
  9323. /******/ // Check if module is in cache
  9324. /******/ if(installedModules[moduleId]) {
  9325. /******/ return installedModules[moduleId].exports;
  9326. /******/ }
  9327. /******/ // Create a new module (and put it into the cache)
  9328. /******/ var module = installedModules[moduleId] = {
  9329. /******/ i: moduleId,
  9330. /******/ l: false,
  9331. /******/ exports: {}
  9332. /******/ };
  9333. /******/
  9334. /******/ // Execute the module function
  9335. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  9336. /******/
  9337. /******/ // Flag the module as loaded
  9338. /******/ module.l = true;
  9339. /******/
  9340. /******/ // Return the exports of the module
  9341. /******/ return module.exports;
  9342. /******/ }
  9343. /******/
  9344. /******/
  9345. /******/ // expose the modules object (__webpack_modules__)
  9346. /******/ __webpack_require__.m = modules;
  9347. /******/
  9348. /******/ // expose the module cache
  9349. /******/ __webpack_require__.c = installedModules;
  9350. /******/
  9351. /******/ // define getter function for harmony exports
  9352. /******/ __webpack_require__.d = function(exports, name, getter) {
  9353. /******/ if(!__webpack_require__.o(exports, name)) {
  9354. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  9355. /******/ }
  9356. /******/ };
  9357. /******/
  9358. /******/ // define __esModule on exports
  9359. /******/ __webpack_require__.r = function(exports) {
  9360. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  9361. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  9362. /******/ }
  9363. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  9364. /******/ };
  9365. /******/
  9366. /******/ // create a fake namespace object
  9367. /******/ // mode & 1: value is a module id, require it
  9368. /******/ // mode & 2: merge all properties of value into the ns
  9369. /******/ // mode & 4: return value when already ns object
  9370. /******/ // mode & 8|1: behave like require
  9371. /******/ __webpack_require__.t = function(value, mode) {
  9372. /******/ if(mode & 1) value = __webpack_require__(value);
  9373. /******/ if(mode & 8) return value;
  9374. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  9375. /******/ var ns = Object.create(null);
  9376. /******/ __webpack_require__.r(ns);
  9377. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  9378. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  9379. /******/ return ns;
  9380. /******/ };
  9381. /******/
  9382. /******/ // getDefaultExport function for compatibility with non-harmony modules
  9383. /******/ __webpack_require__.n = function(module) {
  9384. /******/ var getter = module && module.__esModule ?
  9385. /******/ function getDefault() { return module['default']; } :
  9386. /******/ function getModuleExports() { return module; };
  9387. /******/ __webpack_require__.d(getter, 'a', getter);
  9388. /******/ return getter;
  9389. /******/ };
  9390. /******/
  9391. /******/ // Object.prototype.hasOwnProperty.call
  9392. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  9393. /******/
  9394. /******/ // __webpack_public_path__
  9395. /******/ __webpack_require__.p = "/dist/";
  9396. /******/
  9397. /******/
  9398. /******/ // Load entry module and return exports
  9399. /******/ return __webpack_require__(__webpack_require__.s = 96);
  9400. /******/ })
  9401. /************************************************************************/
  9402. /******/ ({
  9403. /***/ 0:
  9404. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9405. "use strict";
  9406. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  9407. /* globals __VUE_SSR_CONTEXT__ */
  9408. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9409. // This module is a runtime utility for cleaner component module output and will
  9410. // be included in the final webpack user bundle.
  9411. function normalizeComponent (
  9412. scriptExports,
  9413. render,
  9414. staticRenderFns,
  9415. functionalTemplate,
  9416. injectStyles,
  9417. scopeId,
  9418. moduleIdentifier, /* server only */
  9419. shadowMode /* vue-cli only */
  9420. ) {
  9421. // Vue.extend constructor export interop
  9422. var options = typeof scriptExports === 'function'
  9423. ? scriptExports.options
  9424. : scriptExports
  9425. // render functions
  9426. if (render) {
  9427. options.render = render
  9428. options.staticRenderFns = staticRenderFns
  9429. options._compiled = true
  9430. }
  9431. // functional template
  9432. if (functionalTemplate) {
  9433. options.functional = true
  9434. }
  9435. // scopedId
  9436. if (scopeId) {
  9437. options._scopeId = 'data-v-' + scopeId
  9438. }
  9439. var hook
  9440. if (moduleIdentifier) { // server build
  9441. hook = function (context) {
  9442. // 2.3 injection
  9443. context =
  9444. context || // cached call
  9445. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9446. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9447. // 2.2 with runInNewContext: true
  9448. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9449. context = __VUE_SSR_CONTEXT__
  9450. }
  9451. // inject component styles
  9452. if (injectStyles) {
  9453. injectStyles.call(this, context)
  9454. }
  9455. // register component module identifier for async chunk inferrence
  9456. if (context && context._registeredComponents) {
  9457. context._registeredComponents.add(moduleIdentifier)
  9458. }
  9459. }
  9460. // used by ssr in case component is cached and beforeCreate
  9461. // never gets called
  9462. options._ssrRegister = hook
  9463. } else if (injectStyles) {
  9464. hook = shadowMode
  9465. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9466. : injectStyles
  9467. }
  9468. if (hook) {
  9469. if (options.functional) {
  9470. // for template-only hot-reload because in that case the render fn doesn't
  9471. // go through the normalizer
  9472. options._injectStyles = hook
  9473. // register for functioal component in vue file
  9474. var originalRender = options.render
  9475. options.render = function renderWithStyleInjection (h, context) {
  9476. hook.call(context)
  9477. return originalRender(h, context)
  9478. }
  9479. } else {
  9480. // inject component registration as beforeCreate hook
  9481. var existing = options.beforeCreate
  9482. options.beforeCreate = existing
  9483. ? [].concat(existing, hook)
  9484. : [hook]
  9485. }
  9486. }
  9487. return {
  9488. exports: scriptExports,
  9489. options: options
  9490. }
  9491. }
  9492. /***/ }),
  9493. /***/ 96:
  9494. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9495. "use strict";
  9496. __webpack_require__.r(__webpack_exports__);
  9497. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
  9498. var render = function() {
  9499. var _vm = this
  9500. var _h = _vm.$createElement
  9501. var _c = _vm._self._c || _h
  9502. return _c("div", { staticClass: "el-button-group" }, [_vm._t("default")], 2)
  9503. }
  9504. var staticRenderFns = []
  9505. render._withStripped = true
  9506. // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
  9507. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
  9508. //
  9509. //
  9510. //
  9511. //
  9512. //
  9513. /* harmony default export */ var button_groupvue_type_script_lang_js_ = ({
  9514. name: 'ElButtonGroup'
  9515. });
  9516. // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
  9517. /* harmony default export */ var src_button_groupvue_type_script_lang_js_ = (button_groupvue_type_script_lang_js_);
  9518. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  9519. var componentNormalizer = __webpack_require__(0);
  9520. // CONCATENATED MODULE: ./packages/button/src/button-group.vue
  9521. /* normalize component */
  9522. var component = Object(componentNormalizer["a" /* default */])(
  9523. src_button_groupvue_type_script_lang_js_,
  9524. render,
  9525. staticRenderFns,
  9526. false,
  9527. null,
  9528. null,
  9529. null
  9530. )
  9531. /* hot reload */
  9532. if (false) { var api; }
  9533. component.options.__file = "packages/button/src/button-group.vue"
  9534. /* harmony default export */ var button_group = (component.exports);
  9535. // CONCATENATED MODULE: ./packages/button-group/index.js
  9536. /* istanbul ignore next */
  9537. button_group.install = function (Vue) {
  9538. Vue.component(button_group.name, button_group);
  9539. };
  9540. /* harmony default export */ var packages_button_group = __webpack_exports__["default"] = (button_group);
  9541. /***/ })
  9542. /******/ });
  9543. /***/ }),
  9544. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/button.js":
  9545. /*!******************************************************************!*\
  9546. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/button.js ***!
  9547. \******************************************************************/
  9548. /*! no static exports found */
  9549. /***/ (function(module, exports, __webpack_require__) {
  9550. module.exports =
  9551. /******/ (function(modules) { // webpackBootstrap
  9552. /******/ // The module cache
  9553. /******/ var installedModules = {};
  9554. /******/
  9555. /******/ // The require function
  9556. /******/ function __webpack_require__(moduleId) {
  9557. /******/
  9558. /******/ // Check if module is in cache
  9559. /******/ if(installedModules[moduleId]) {
  9560. /******/ return installedModules[moduleId].exports;
  9561. /******/ }
  9562. /******/ // Create a new module (and put it into the cache)
  9563. /******/ var module = installedModules[moduleId] = {
  9564. /******/ i: moduleId,
  9565. /******/ l: false,
  9566. /******/ exports: {}
  9567. /******/ };
  9568. /******/
  9569. /******/ // Execute the module function
  9570. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  9571. /******/
  9572. /******/ // Flag the module as loaded
  9573. /******/ module.l = true;
  9574. /******/
  9575. /******/ // Return the exports of the module
  9576. /******/ return module.exports;
  9577. /******/ }
  9578. /******/
  9579. /******/
  9580. /******/ // expose the modules object (__webpack_modules__)
  9581. /******/ __webpack_require__.m = modules;
  9582. /******/
  9583. /******/ // expose the module cache
  9584. /******/ __webpack_require__.c = installedModules;
  9585. /******/
  9586. /******/ // define getter function for harmony exports
  9587. /******/ __webpack_require__.d = function(exports, name, getter) {
  9588. /******/ if(!__webpack_require__.o(exports, name)) {
  9589. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  9590. /******/ }
  9591. /******/ };
  9592. /******/
  9593. /******/ // define __esModule on exports
  9594. /******/ __webpack_require__.r = function(exports) {
  9595. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  9596. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  9597. /******/ }
  9598. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  9599. /******/ };
  9600. /******/
  9601. /******/ // create a fake namespace object
  9602. /******/ // mode & 1: value is a module id, require it
  9603. /******/ // mode & 2: merge all properties of value into the ns
  9604. /******/ // mode & 4: return value when already ns object
  9605. /******/ // mode & 8|1: behave like require
  9606. /******/ __webpack_require__.t = function(value, mode) {
  9607. /******/ if(mode & 1) value = __webpack_require__(value);
  9608. /******/ if(mode & 8) return value;
  9609. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  9610. /******/ var ns = Object.create(null);
  9611. /******/ __webpack_require__.r(ns);
  9612. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  9613. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  9614. /******/ return ns;
  9615. /******/ };
  9616. /******/
  9617. /******/ // getDefaultExport function for compatibility with non-harmony modules
  9618. /******/ __webpack_require__.n = function(module) {
  9619. /******/ var getter = module && module.__esModule ?
  9620. /******/ function getDefault() { return module['default']; } :
  9621. /******/ function getModuleExports() { return module; };
  9622. /******/ __webpack_require__.d(getter, 'a', getter);
  9623. /******/ return getter;
  9624. /******/ };
  9625. /******/
  9626. /******/ // Object.prototype.hasOwnProperty.call
  9627. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  9628. /******/
  9629. /******/ // __webpack_public_path__
  9630. /******/ __webpack_require__.p = "/dist/";
  9631. /******/
  9632. /******/
  9633. /******/ // Load entry module and return exports
  9634. /******/ return __webpack_require__(__webpack_require__.s = 95);
  9635. /******/ })
  9636. /************************************************************************/
  9637. /******/ ({
  9638. /***/ 0:
  9639. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9640. "use strict";
  9641. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  9642. /* globals __VUE_SSR_CONTEXT__ */
  9643. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9644. // This module is a runtime utility for cleaner component module output and will
  9645. // be included in the final webpack user bundle.
  9646. function normalizeComponent (
  9647. scriptExports,
  9648. render,
  9649. staticRenderFns,
  9650. functionalTemplate,
  9651. injectStyles,
  9652. scopeId,
  9653. moduleIdentifier, /* server only */
  9654. shadowMode /* vue-cli only */
  9655. ) {
  9656. // Vue.extend constructor export interop
  9657. var options = typeof scriptExports === 'function'
  9658. ? scriptExports.options
  9659. : scriptExports
  9660. // render functions
  9661. if (render) {
  9662. options.render = render
  9663. options.staticRenderFns = staticRenderFns
  9664. options._compiled = true
  9665. }
  9666. // functional template
  9667. if (functionalTemplate) {
  9668. options.functional = true
  9669. }
  9670. // scopedId
  9671. if (scopeId) {
  9672. options._scopeId = 'data-v-' + scopeId
  9673. }
  9674. var hook
  9675. if (moduleIdentifier) { // server build
  9676. hook = function (context) {
  9677. // 2.3 injection
  9678. context =
  9679. context || // cached call
  9680. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9681. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9682. // 2.2 with runInNewContext: true
  9683. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9684. context = __VUE_SSR_CONTEXT__
  9685. }
  9686. // inject component styles
  9687. if (injectStyles) {
  9688. injectStyles.call(this, context)
  9689. }
  9690. // register component module identifier for async chunk inferrence
  9691. if (context && context._registeredComponents) {
  9692. context._registeredComponents.add(moduleIdentifier)
  9693. }
  9694. }
  9695. // used by ssr in case component is cached and beforeCreate
  9696. // never gets called
  9697. options._ssrRegister = hook
  9698. } else if (injectStyles) {
  9699. hook = shadowMode
  9700. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9701. : injectStyles
  9702. }
  9703. if (hook) {
  9704. if (options.functional) {
  9705. // for template-only hot-reload because in that case the render fn doesn't
  9706. // go through the normalizer
  9707. options._injectStyles = hook
  9708. // register for functioal component in vue file
  9709. var originalRender = options.render
  9710. options.render = function renderWithStyleInjection (h, context) {
  9711. hook.call(context)
  9712. return originalRender(h, context)
  9713. }
  9714. } else {
  9715. // inject component registration as beforeCreate hook
  9716. var existing = options.beforeCreate
  9717. options.beforeCreate = existing
  9718. ? [].concat(existing, hook)
  9719. : [hook]
  9720. }
  9721. }
  9722. return {
  9723. exports: scriptExports,
  9724. options: options
  9725. }
  9726. }
  9727. /***/ }),
  9728. /***/ 95:
  9729. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9730. "use strict";
  9731. __webpack_require__.r(__webpack_exports__);
  9732. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
  9733. var render = function() {
  9734. var _vm = this
  9735. var _h = _vm.$createElement
  9736. var _c = _vm._self._c || _h
  9737. return _c(
  9738. "button",
  9739. {
  9740. staticClass: "el-button",
  9741. class: [
  9742. _vm.type ? "el-button--" + _vm.type : "",
  9743. _vm.buttonSize ? "el-button--" + _vm.buttonSize : "",
  9744. {
  9745. "is-disabled": _vm.buttonDisabled,
  9746. "is-loading": _vm.loading,
  9747. "is-plain": _vm.plain,
  9748. "is-round": _vm.round,
  9749. "is-circle": _vm.circle
  9750. }
  9751. ],
  9752. attrs: {
  9753. disabled: _vm.buttonDisabled || _vm.loading,
  9754. autofocus: _vm.autofocus,
  9755. type: _vm.nativeType
  9756. },
  9757. on: { click: _vm.handleClick }
  9758. },
  9759. [
  9760. _vm.loading ? _c("i", { staticClass: "el-icon-loading" }) : _vm._e(),
  9761. _vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(),
  9762. _vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e()
  9763. ]
  9764. )
  9765. }
  9766. var staticRenderFns = []
  9767. render._withStripped = true
  9768. // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
  9769. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js&
  9770. //
  9771. //
  9772. //
  9773. //
  9774. //
  9775. //
  9776. //
  9777. //
  9778. //
  9779. //
  9780. //
  9781. //
  9782. //
  9783. //
  9784. //
  9785. //
  9786. //
  9787. //
  9788. //
  9789. //
  9790. //
  9791. //
  9792. //
  9793. //
  9794. /* harmony default export */ var buttonvue_type_script_lang_js_ = ({
  9795. name: 'ElButton',
  9796. inject: {
  9797. elForm: {
  9798. default: ''
  9799. },
  9800. elFormItem: {
  9801. default: ''
  9802. }
  9803. },
  9804. props: {
  9805. type: {
  9806. type: String,
  9807. default: 'default'
  9808. },
  9809. size: String,
  9810. icon: {
  9811. type: String,
  9812. default: ''
  9813. },
  9814. nativeType: {
  9815. type: String,
  9816. default: 'button'
  9817. },
  9818. loading: Boolean,
  9819. disabled: Boolean,
  9820. plain: Boolean,
  9821. autofocus: Boolean,
  9822. round: Boolean,
  9823. circle: Boolean
  9824. },
  9825. computed: {
  9826. _elFormItemSize: function _elFormItemSize() {
  9827. return (this.elFormItem || {}).elFormItemSize;
  9828. },
  9829. buttonSize: function buttonSize() {
  9830. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  9831. },
  9832. buttonDisabled: function buttonDisabled() {
  9833. return this.$options.propsData.hasOwnProperty('disabled') ? this.disabled : (this.elForm || {}).disabled;
  9834. }
  9835. },
  9836. methods: {
  9837. handleClick: function handleClick(evt) {
  9838. this.$emit('click', evt);
  9839. }
  9840. }
  9841. });
  9842. // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js&
  9843. /* harmony default export */ var src_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_);
  9844. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  9845. var componentNormalizer = __webpack_require__(0);
  9846. // CONCATENATED MODULE: ./packages/button/src/button.vue
  9847. /* normalize component */
  9848. var component = Object(componentNormalizer["a" /* default */])(
  9849. src_buttonvue_type_script_lang_js_,
  9850. render,
  9851. staticRenderFns,
  9852. false,
  9853. null,
  9854. null,
  9855. null
  9856. )
  9857. /* hot reload */
  9858. if (false) { var api; }
  9859. component.options.__file = "packages/button/src/button.vue"
  9860. /* harmony default export */ var src_button = (component.exports);
  9861. // CONCATENATED MODULE: ./packages/button/index.js
  9862. /* istanbul ignore next */
  9863. src_button.install = function (Vue) {
  9864. Vue.component(src_button.name, src_button);
  9865. };
  9866. /* harmony default export */ var packages_button = __webpack_exports__["default"] = (src_button);
  9867. /***/ })
  9868. /******/ });
  9869. /***/ }),
  9870. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/cascader-panel.js":
  9871. /*!**************************************************************************!*\
  9872. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/cascader-panel.js ***!
  9873. \**************************************************************************/
  9874. /*! no static exports found */
  9875. /***/ (function(module, exports, __webpack_require__) {
  9876. module.exports =
  9877. /******/ (function(modules) { // webpackBootstrap
  9878. /******/ // The module cache
  9879. /******/ var installedModules = {};
  9880. /******/
  9881. /******/ // The require function
  9882. /******/ function __webpack_require__(moduleId) {
  9883. /******/
  9884. /******/ // Check if module is in cache
  9885. /******/ if(installedModules[moduleId]) {
  9886. /******/ return installedModules[moduleId].exports;
  9887. /******/ }
  9888. /******/ // Create a new module (and put it into the cache)
  9889. /******/ var module = installedModules[moduleId] = {
  9890. /******/ i: moduleId,
  9891. /******/ l: false,
  9892. /******/ exports: {}
  9893. /******/ };
  9894. /******/
  9895. /******/ // Execute the module function
  9896. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  9897. /******/
  9898. /******/ // Flag the module as loaded
  9899. /******/ module.l = true;
  9900. /******/
  9901. /******/ // Return the exports of the module
  9902. /******/ return module.exports;
  9903. /******/ }
  9904. /******/
  9905. /******/
  9906. /******/ // expose the modules object (__webpack_modules__)
  9907. /******/ __webpack_require__.m = modules;
  9908. /******/
  9909. /******/ // expose the module cache
  9910. /******/ __webpack_require__.c = installedModules;
  9911. /******/
  9912. /******/ // define getter function for harmony exports
  9913. /******/ __webpack_require__.d = function(exports, name, getter) {
  9914. /******/ if(!__webpack_require__.o(exports, name)) {
  9915. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  9916. /******/ }
  9917. /******/ };
  9918. /******/
  9919. /******/ // define __esModule on exports
  9920. /******/ __webpack_require__.r = function(exports) {
  9921. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  9922. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  9923. /******/ }
  9924. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  9925. /******/ };
  9926. /******/
  9927. /******/ // create a fake namespace object
  9928. /******/ // mode & 1: value is a module id, require it
  9929. /******/ // mode & 2: merge all properties of value into the ns
  9930. /******/ // mode & 4: return value when already ns object
  9931. /******/ // mode & 8|1: behave like require
  9932. /******/ __webpack_require__.t = function(value, mode) {
  9933. /******/ if(mode & 1) value = __webpack_require__(value);
  9934. /******/ if(mode & 8) return value;
  9935. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  9936. /******/ var ns = Object.create(null);
  9937. /******/ __webpack_require__.r(ns);
  9938. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  9939. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  9940. /******/ return ns;
  9941. /******/ };
  9942. /******/
  9943. /******/ // getDefaultExport function for compatibility with non-harmony modules
  9944. /******/ __webpack_require__.n = function(module) {
  9945. /******/ var getter = module && module.__esModule ?
  9946. /******/ function getDefault() { return module['default']; } :
  9947. /******/ function getModuleExports() { return module; };
  9948. /******/ __webpack_require__.d(getter, 'a', getter);
  9949. /******/ return getter;
  9950. /******/ };
  9951. /******/
  9952. /******/ // Object.prototype.hasOwnProperty.call
  9953. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  9954. /******/
  9955. /******/ // __webpack_public_path__
  9956. /******/ __webpack_require__.p = "/dist/";
  9957. /******/
  9958. /******/
  9959. /******/ // Load entry module and return exports
  9960. /******/ return __webpack_require__(__webpack_require__.s = 60);
  9961. /******/ })
  9962. /************************************************************************/
  9963. /******/ ({
  9964. /***/ 0:
  9965. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9966. "use strict";
  9967. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  9968. /* globals __VUE_SSR_CONTEXT__ */
  9969. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9970. // This module is a runtime utility for cleaner component module output and will
  9971. // be included in the final webpack user bundle.
  9972. function normalizeComponent (
  9973. scriptExports,
  9974. render,
  9975. staticRenderFns,
  9976. functionalTemplate,
  9977. injectStyles,
  9978. scopeId,
  9979. moduleIdentifier, /* server only */
  9980. shadowMode /* vue-cli only */
  9981. ) {
  9982. // Vue.extend constructor export interop
  9983. var options = typeof scriptExports === 'function'
  9984. ? scriptExports.options
  9985. : scriptExports
  9986. // render functions
  9987. if (render) {
  9988. options.render = render
  9989. options.staticRenderFns = staticRenderFns
  9990. options._compiled = true
  9991. }
  9992. // functional template
  9993. if (functionalTemplate) {
  9994. options.functional = true
  9995. }
  9996. // scopedId
  9997. if (scopeId) {
  9998. options._scopeId = 'data-v-' + scopeId
  9999. }
  10000. var hook
  10001. if (moduleIdentifier) { // server build
  10002. hook = function (context) {
  10003. // 2.3 injection
  10004. context =
  10005. context || // cached call
  10006. (this.$vnode && this.$vnode.ssrContext) || // stateful
  10007. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  10008. // 2.2 with runInNewContext: true
  10009. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  10010. context = __VUE_SSR_CONTEXT__
  10011. }
  10012. // inject component styles
  10013. if (injectStyles) {
  10014. injectStyles.call(this, context)
  10015. }
  10016. // register component module identifier for async chunk inferrence
  10017. if (context && context._registeredComponents) {
  10018. context._registeredComponents.add(moduleIdentifier)
  10019. }
  10020. }
  10021. // used by ssr in case component is cached and beforeCreate
  10022. // never gets called
  10023. options._ssrRegister = hook
  10024. } else if (injectStyles) {
  10025. hook = shadowMode
  10026. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  10027. : injectStyles
  10028. }
  10029. if (hook) {
  10030. if (options.functional) {
  10031. // for template-only hot-reload because in that case the render fn doesn't
  10032. // go through the normalizer
  10033. options._injectStyles = hook
  10034. // register for functioal component in vue file
  10035. var originalRender = options.render
  10036. options.render = function renderWithStyleInjection (h, context) {
  10037. hook.call(context)
  10038. return originalRender(h, context)
  10039. }
  10040. } else {
  10041. // inject component registration as beforeCreate hook
  10042. var existing = options.beforeCreate
  10043. options.beforeCreate = existing
  10044. ? [].concat(existing, hook)
  10045. : [hook]
  10046. }
  10047. }
  10048. return {
  10049. exports: scriptExports,
  10050. options: options
  10051. }
  10052. }
  10053. /***/ }),
  10054. /***/ 15:
  10055. /***/ (function(module, exports) {
  10056. module.exports = __webpack_require__(/*! element-ui/lib/scrollbar */ "./node_modules/_element-ui@2.15.8@element-ui/lib/scrollbar.js");
  10057. /***/ }),
  10058. /***/ 19:
  10059. /***/ (function(module, exports) {
  10060. module.exports = __webpack_require__(/*! element-ui/lib/checkbox */ "./node_modules/_element-ui@2.15.8@element-ui/lib/checkbox.js");
  10061. /***/ }),
  10062. /***/ 21:
  10063. /***/ (function(module, exports) {
  10064. module.exports = __webpack_require__(/*! element-ui/lib/utils/shared */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/shared.js");
  10065. /***/ }),
  10066. /***/ 26:
  10067. /***/ (function(module, exports) {
  10068. module.exports = __webpack_require__(/*! babel-helper-vue-jsx-merge-props */ "./node_modules/_babel-helper-vue-jsx-merge-props@2.0.3@babel-helper-vue-jsx-merge-props/index.js");
  10069. /***/ }),
  10070. /***/ 3:
  10071. /***/ (function(module, exports) {
  10072. module.exports = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  10073. /***/ }),
  10074. /***/ 31:
  10075. /***/ (function(module, exports) {
  10076. module.exports = __webpack_require__(/*! element-ui/lib/utils/scroll-into-view */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scroll-into-view.js");
  10077. /***/ }),
  10078. /***/ 40:
  10079. /***/ (function(module, exports) {
  10080. module.exports = __webpack_require__(/*! element-ui/lib/utils/aria-utils */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-utils.js");
  10081. /***/ }),
  10082. /***/ 51:
  10083. /***/ (function(module, exports) {
  10084. module.exports = __webpack_require__(/*! element-ui/lib/radio */ "./node_modules/_element-ui@2.15.8@element-ui/lib/radio.js");
  10085. /***/ }),
  10086. /***/ 6:
  10087. /***/ (function(module, exports) {
  10088. module.exports = __webpack_require__(/*! element-ui/lib/mixins/locale */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/locale.js");
  10089. /***/ }),
  10090. /***/ 60:
  10091. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10092. "use strict";
  10093. __webpack_require__.r(__webpack_exports__);
  10094. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
  10095. var cascader_panelvue_type_template_id_34932346_render = function() {
  10096. var _vm = this
  10097. var _h = _vm.$createElement
  10098. var _c = _vm._self._c || _h
  10099. return _c(
  10100. "div",
  10101. {
  10102. class: ["el-cascader-panel", _vm.border && "is-bordered"],
  10103. on: { keydown: _vm.handleKeyDown }
  10104. },
  10105. _vm._l(_vm.menus, function(menu, index) {
  10106. return _c("cascader-menu", {
  10107. key: index,
  10108. ref: "menu",
  10109. refInFor: true,
  10110. attrs: { index: index, nodes: menu }
  10111. })
  10112. }),
  10113. 1
  10114. )
  10115. }
  10116. var staticRenderFns = []
  10117. cascader_panelvue_type_template_id_34932346_render._withStripped = true
  10118. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
  10119. // EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"
  10120. var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(26);
  10121. var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);
  10122. // EXTERNAL MODULE: external "element-ui/lib/scrollbar"
  10123. var scrollbar_ = __webpack_require__(15);
  10124. var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
  10125. // EXTERNAL MODULE: external "element-ui/lib/checkbox"
  10126. var checkbox_ = __webpack_require__(19);
  10127. var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
  10128. // EXTERNAL MODULE: external "element-ui/lib/radio"
  10129. var radio_ = __webpack_require__(51);
  10130. var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
  10131. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  10132. var util_ = __webpack_require__(3);
  10133. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
  10134. var stopPropagation = function stopPropagation(e) {
  10135. return e.stopPropagation();
  10136. };
  10137. /* harmony default export */ var cascader_nodevue_type_script_lang_js_ = ({
  10138. inject: ['panel'],
  10139. components: {
  10140. ElCheckbox: checkbox_default.a,
  10141. ElRadio: radio_default.a
  10142. },
  10143. props: {
  10144. node: {
  10145. required: true
  10146. },
  10147. nodeId: String
  10148. },
  10149. computed: {
  10150. config: function config() {
  10151. return this.panel.config;
  10152. },
  10153. isLeaf: function isLeaf() {
  10154. return this.node.isLeaf;
  10155. },
  10156. isDisabled: function isDisabled() {
  10157. return this.node.isDisabled;
  10158. },
  10159. checkedValue: function checkedValue() {
  10160. return this.panel.checkedValue;
  10161. },
  10162. isChecked: function isChecked() {
  10163. return this.node.isSameNode(this.checkedValue);
  10164. },
  10165. inActivePath: function inActivePath() {
  10166. return this.isInPath(this.panel.activePath);
  10167. },
  10168. inCheckedPath: function inCheckedPath() {
  10169. var _this = this;
  10170. if (!this.config.checkStrictly) return false;
  10171. return this.panel.checkedNodePaths.some(function (checkedPath) {
  10172. return _this.isInPath(checkedPath);
  10173. });
  10174. },
  10175. value: function value() {
  10176. return this.node.getValueByOption();
  10177. }
  10178. },
  10179. methods: {
  10180. handleExpand: function handleExpand() {
  10181. var _this2 = this;
  10182. var panel = this.panel,
  10183. node = this.node,
  10184. isDisabled = this.isDisabled,
  10185. config = this.config;
  10186. var multiple = config.multiple,
  10187. checkStrictly = config.checkStrictly;
  10188. if (!checkStrictly && isDisabled || node.loading) return;
  10189. if (config.lazy && !node.loaded) {
  10190. panel.lazyLoad(node, function () {
  10191. // do not use cached leaf value here, invoke this.isLeaf to get new value.
  10192. var isLeaf = _this2.isLeaf;
  10193. if (!isLeaf) _this2.handleExpand();
  10194. if (multiple) {
  10195. // if leaf sync checked state, else clear checked state
  10196. var checked = isLeaf ? node.checked : false;
  10197. _this2.handleMultiCheckChange(checked);
  10198. }
  10199. });
  10200. } else {
  10201. panel.handleExpand(node);
  10202. }
  10203. },
  10204. handleCheckChange: function handleCheckChange() {
  10205. var panel = this.panel,
  10206. value = this.value,
  10207. node = this.node;
  10208. panel.handleCheckChange(value);
  10209. panel.handleExpand(node);
  10210. },
  10211. handleMultiCheckChange: function handleMultiCheckChange(checked) {
  10212. this.node.doCheck(checked);
  10213. this.panel.calculateMultiCheckedValue();
  10214. },
  10215. isInPath: function isInPath(pathNodes) {
  10216. var node = this.node;
  10217. var selectedPathNode = pathNodes[node.level - 1] || {};
  10218. return selectedPathNode.uid === node.uid;
  10219. },
  10220. renderPrefix: function renderPrefix(h) {
  10221. var isLeaf = this.isLeaf,
  10222. isChecked = this.isChecked,
  10223. config = this.config;
  10224. var checkStrictly = config.checkStrictly,
  10225. multiple = config.multiple;
  10226. if (multiple) {
  10227. return this.renderCheckbox(h);
  10228. } else if (checkStrictly) {
  10229. return this.renderRadio(h);
  10230. } else if (isLeaf && isChecked) {
  10231. return this.renderCheckIcon(h);
  10232. }
  10233. return null;
  10234. },
  10235. renderPostfix: function renderPostfix(h) {
  10236. var node = this.node,
  10237. isLeaf = this.isLeaf;
  10238. if (node.loading) {
  10239. return this.renderLoadingIcon(h);
  10240. } else if (!isLeaf) {
  10241. return this.renderExpandIcon(h);
  10242. }
  10243. return null;
  10244. },
  10245. renderCheckbox: function renderCheckbox(h) {
  10246. var node = this.node,
  10247. config = this.config,
  10248. isDisabled = this.isDisabled;
  10249. var events = {
  10250. on: { change: this.handleMultiCheckChange },
  10251. nativeOn: {}
  10252. };
  10253. if (config.checkStrictly) {
  10254. // when every node is selectable, click event should not trigger expand event.
  10255. events.nativeOn.click = stopPropagation;
  10256. }
  10257. return h('el-checkbox', external_babel_helper_vue_jsx_merge_props_default()([{
  10258. attrs: {
  10259. value: node.checked,
  10260. indeterminate: node.indeterminate,
  10261. disabled: isDisabled
  10262. }
  10263. }, events]));
  10264. },
  10265. renderRadio: function renderRadio(h) {
  10266. var checkedValue = this.checkedValue,
  10267. value = this.value,
  10268. isDisabled = this.isDisabled;
  10269. // to keep same reference if value cause radio's checked state is calculated by reference comparision;
  10270. if (Object(util_["isEqual"])(value, checkedValue)) {
  10271. value = checkedValue;
  10272. }
  10273. return h(
  10274. 'el-radio',
  10275. {
  10276. attrs: {
  10277. value: checkedValue,
  10278. label: value,
  10279. disabled: isDisabled
  10280. },
  10281. on: {
  10282. 'change': this.handleCheckChange
  10283. },
  10284. nativeOn: {
  10285. 'click': stopPropagation
  10286. }
  10287. },
  10288. [h('span')]
  10289. );
  10290. },
  10291. renderCheckIcon: function renderCheckIcon(h) {
  10292. return h('i', { 'class': 'el-icon-check el-cascader-node__prefix' });
  10293. },
  10294. renderLoadingIcon: function renderLoadingIcon(h) {
  10295. return h('i', { 'class': 'el-icon-loading el-cascader-node__postfix' });
  10296. },
  10297. renderExpandIcon: function renderExpandIcon(h) {
  10298. return h('i', { 'class': 'el-icon-arrow-right el-cascader-node__postfix' });
  10299. },
  10300. renderContent: function renderContent(h) {
  10301. var panel = this.panel,
  10302. node = this.node;
  10303. var render = panel.renderLabelFn;
  10304. var vnode = render ? render({ node: node, data: node.data }) : null;
  10305. return h(
  10306. 'span',
  10307. { 'class': 'el-cascader-node__label' },
  10308. [vnode || node.label]
  10309. );
  10310. }
  10311. },
  10312. render: function render(h) {
  10313. var _this3 = this;
  10314. var inActivePath = this.inActivePath,
  10315. inCheckedPath = this.inCheckedPath,
  10316. isChecked = this.isChecked,
  10317. isLeaf = this.isLeaf,
  10318. isDisabled = this.isDisabled,
  10319. config = this.config,
  10320. nodeId = this.nodeId;
  10321. var expandTrigger = config.expandTrigger,
  10322. checkStrictly = config.checkStrictly,
  10323. multiple = config.multiple;
  10324. var disabled = !checkStrictly && isDisabled;
  10325. var events = { on: {} };
  10326. if (expandTrigger === 'click') {
  10327. events.on.click = this.handleExpand;
  10328. } else {
  10329. events.on.mouseenter = function (e) {
  10330. _this3.handleExpand();
  10331. _this3.$emit('expand', e);
  10332. };
  10333. events.on.focus = function (e) {
  10334. _this3.handleExpand();
  10335. _this3.$emit('expand', e);
  10336. };
  10337. }
  10338. if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
  10339. events.on.click = this.handleCheckChange;
  10340. }
  10341. return h(
  10342. 'li',
  10343. external_babel_helper_vue_jsx_merge_props_default()([{
  10344. attrs: {
  10345. role: 'menuitem',
  10346. id: nodeId,
  10347. 'aria-expanded': inActivePath,
  10348. tabindex: disabled ? null : -1
  10349. },
  10350. 'class': {
  10351. 'el-cascader-node': true,
  10352. 'is-selectable': checkStrictly,
  10353. 'in-active-path': inActivePath,
  10354. 'in-checked-path': inCheckedPath,
  10355. 'is-active': isChecked,
  10356. 'is-disabled': disabled
  10357. }
  10358. }, events]),
  10359. [this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]
  10360. );
  10361. }
  10362. });
  10363. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
  10364. /* harmony default export */ var src_cascader_nodevue_type_script_lang_js_ = (cascader_nodevue_type_script_lang_js_);
  10365. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  10366. var componentNormalizer = __webpack_require__(0);
  10367. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue
  10368. var cascader_node_render, cascader_node_staticRenderFns
  10369. /* normalize component */
  10370. var component = Object(componentNormalizer["a" /* default */])(
  10371. src_cascader_nodevue_type_script_lang_js_,
  10372. cascader_node_render,
  10373. cascader_node_staticRenderFns,
  10374. false,
  10375. null,
  10376. null,
  10377. null
  10378. )
  10379. /* hot reload */
  10380. if (false) { var api; }
  10381. component.options.__file = "packages/cascader-panel/src/cascader-node.vue"
  10382. /* harmony default export */ var cascader_node = (component.exports);
  10383. // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
  10384. var locale_ = __webpack_require__(6);
  10385. var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
  10386. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
  10387. /* harmony default export */ var cascader_menuvue_type_script_lang_js_ = ({
  10388. name: 'ElCascaderMenu',
  10389. mixins: [locale_default.a],
  10390. inject: ['panel'],
  10391. components: {
  10392. ElScrollbar: scrollbar_default.a,
  10393. CascaderNode: cascader_node
  10394. },
  10395. props: {
  10396. nodes: {
  10397. type: Array,
  10398. required: true
  10399. },
  10400. index: Number
  10401. },
  10402. data: function data() {
  10403. return {
  10404. activeNode: null,
  10405. hoverTimer: null,
  10406. id: Object(util_["generateId"])()
  10407. };
  10408. },
  10409. computed: {
  10410. isEmpty: function isEmpty() {
  10411. return !this.nodes.length;
  10412. },
  10413. menuId: function menuId() {
  10414. return 'cascader-menu-' + this.id + '-' + this.index;
  10415. }
  10416. },
  10417. methods: {
  10418. handleExpand: function handleExpand(e) {
  10419. this.activeNode = e.target;
  10420. },
  10421. handleMouseMove: function handleMouseMove(e) {
  10422. var activeNode = this.activeNode,
  10423. hoverTimer = this.hoverTimer;
  10424. var hoverZone = this.$refs.hoverZone;
  10425. if (!activeNode || !hoverZone) return;
  10426. if (activeNode.contains(e.target)) {
  10427. clearTimeout(hoverTimer);
  10428. var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
  10429. left = _$el$getBoundingClien.left;
  10430. var startX = e.clientX - left;
  10431. var _$el = this.$el,
  10432. offsetWidth = _$el.offsetWidth,
  10433. offsetHeight = _$el.offsetHeight;
  10434. var top = activeNode.offsetTop;
  10435. var bottom = top + activeNode.offsetHeight;
  10436. hoverZone.innerHTML = '\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + top + ' L' + offsetWidth + ' 0 V' + top + ' Z" />\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + bottom + ' L' + offsetWidth + ' ' + offsetHeight + ' V' + bottom + ' Z" />\n ';
  10437. } else if (!hoverTimer) {
  10438. this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);
  10439. }
  10440. },
  10441. clearHoverZone: function clearHoverZone() {
  10442. var hoverZone = this.$refs.hoverZone;
  10443. if (!hoverZone) return;
  10444. hoverZone.innerHTML = '';
  10445. },
  10446. renderEmptyText: function renderEmptyText(h) {
  10447. return h(
  10448. 'div',
  10449. { 'class': 'el-cascader-menu__empty-text' },
  10450. [this.t('el.cascader.noData')]
  10451. );
  10452. },
  10453. renderNodeList: function renderNodeList(h) {
  10454. var menuId = this.menuId;
  10455. var isHoverMenu = this.panel.isHoverMenu;
  10456. var events = { on: {} };
  10457. if (isHoverMenu) {
  10458. events.on.expand = this.handleExpand;
  10459. }
  10460. var nodes = this.nodes.map(function (node, index) {
  10461. var hasChildren = node.hasChildren;
  10462. return h('cascader-node', external_babel_helper_vue_jsx_merge_props_default()([{
  10463. key: node.uid,
  10464. attrs: { node: node,
  10465. 'node-id': menuId + '-' + index,
  10466. 'aria-haspopup': hasChildren,
  10467. 'aria-owns': hasChildren ? menuId : null
  10468. }
  10469. }, events]));
  10470. });
  10471. return [].concat(nodes, [isHoverMenu ? h('svg', { ref: 'hoverZone', 'class': 'el-cascader-menu__hover-zone' }) : null]);
  10472. }
  10473. },
  10474. render: function render(h) {
  10475. var isEmpty = this.isEmpty,
  10476. menuId = this.menuId;
  10477. var events = { nativeOn: {} };
  10478. // optimize hover to expand experience (#8010)
  10479. if (this.panel.isHoverMenu) {
  10480. events.nativeOn.mousemove = this.handleMouseMove;
  10481. // events.nativeOn.mouseleave = this.clearHoverZone;
  10482. }
  10483. return h(
  10484. 'el-scrollbar',
  10485. external_babel_helper_vue_jsx_merge_props_default()([{
  10486. attrs: {
  10487. tag: 'ul',
  10488. role: 'menu',
  10489. id: menuId,
  10490. 'wrap-class': 'el-cascader-menu__wrap',
  10491. 'view-class': {
  10492. 'el-cascader-menu__list': true,
  10493. 'is-empty': isEmpty
  10494. }
  10495. },
  10496. 'class': 'el-cascader-menu' }, events]),
  10497. [isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]
  10498. );
  10499. }
  10500. });
  10501. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
  10502. /* harmony default export */ var src_cascader_menuvue_type_script_lang_js_ = (cascader_menuvue_type_script_lang_js_);
  10503. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue
  10504. var cascader_menu_render, cascader_menu_staticRenderFns
  10505. /* normalize component */
  10506. var cascader_menu_component = Object(componentNormalizer["a" /* default */])(
  10507. src_cascader_menuvue_type_script_lang_js_,
  10508. cascader_menu_render,
  10509. cascader_menu_staticRenderFns,
  10510. false,
  10511. null,
  10512. null,
  10513. null
  10514. )
  10515. /* hot reload */
  10516. if (false) { var cascader_menu_api; }
  10517. cascader_menu_component.options.__file = "packages/cascader-panel/src/cascader-menu.vue"
  10518. /* harmony default export */ var cascader_menu = (cascader_menu_component.exports);
  10519. // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
  10520. var shared_ = __webpack_require__(21);
  10521. // CONCATENATED MODULE: ./packages/cascader-panel/src/node.js
  10522. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  10523. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10524. var uid = 0;
  10525. var node_Node = function () {
  10526. function Node(data, config, parentNode) {
  10527. _classCallCheck(this, Node);
  10528. this.data = data;
  10529. this.config = config;
  10530. this.parent = parentNode || null;
  10531. this.level = !this.parent ? 1 : this.parent.level + 1;
  10532. this.uid = uid++;
  10533. this.initState();
  10534. this.initChildren();
  10535. }
  10536. Node.prototype.initState = function initState() {
  10537. var _config = this.config,
  10538. valueKey = _config.value,
  10539. labelKey = _config.label;
  10540. this.value = this.data[valueKey];
  10541. this.label = this.data[labelKey];
  10542. this.pathNodes = this.calculatePathNodes();
  10543. this.path = this.pathNodes.map(function (node) {
  10544. return node.value;
  10545. });
  10546. this.pathLabels = this.pathNodes.map(function (node) {
  10547. return node.label;
  10548. });
  10549. // lazy load
  10550. this.loading = false;
  10551. this.loaded = false;
  10552. };
  10553. Node.prototype.initChildren = function initChildren() {
  10554. var _this = this;
  10555. var config = this.config;
  10556. var childrenKey = config.children;
  10557. var childrenData = this.data[childrenKey];
  10558. this.hasChildren = Array.isArray(childrenData);
  10559. this.children = (childrenData || []).map(function (child) {
  10560. return new Node(child, config, _this);
  10561. });
  10562. };
  10563. Node.prototype.calculatePathNodes = function calculatePathNodes() {
  10564. var nodes = [this];
  10565. var parent = this.parent;
  10566. while (parent) {
  10567. nodes.unshift(parent);
  10568. parent = parent.parent;
  10569. }
  10570. return nodes;
  10571. };
  10572. Node.prototype.getPath = function getPath() {
  10573. return this.path;
  10574. };
  10575. Node.prototype.getValue = function getValue() {
  10576. return this.value;
  10577. };
  10578. Node.prototype.getValueByOption = function getValueByOption() {
  10579. return this.config.emitPath ? this.getPath() : this.getValue();
  10580. };
  10581. Node.prototype.getText = function getText(allLevels, separator) {
  10582. return allLevels ? this.pathLabels.join(separator) : this.label;
  10583. };
  10584. Node.prototype.isSameNode = function isSameNode(checkedValue) {
  10585. var value = this.getValueByOption();
  10586. return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(function (val) {
  10587. return Object(util_["isEqual"])(val, value);
  10588. }) : Object(util_["isEqual"])(checkedValue, value);
  10589. };
  10590. Node.prototype.broadcast = function broadcast(event) {
  10591. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  10592. args[_key - 1] = arguments[_key];
  10593. }
  10594. var handlerName = 'onParent' + Object(util_["capitalize"])(event);
  10595. this.children.forEach(function (child) {
  10596. if (child) {
  10597. // bottom up
  10598. child.broadcast.apply(child, [event].concat(args));
  10599. child[handlerName] && child[handlerName].apply(child, args);
  10600. }
  10601. });
  10602. };
  10603. Node.prototype.emit = function emit(event) {
  10604. var parent = this.parent;
  10605. var handlerName = 'onChild' + Object(util_["capitalize"])(event);
  10606. if (parent) {
  10607. for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  10608. args[_key2 - 1] = arguments[_key2];
  10609. }
  10610. parent[handlerName] && parent[handlerName].apply(parent, args);
  10611. parent.emit.apply(parent, [event].concat(args));
  10612. }
  10613. };
  10614. Node.prototype.onParentCheck = function onParentCheck(checked) {
  10615. if (!this.isDisabled) {
  10616. this.setCheckState(checked);
  10617. }
  10618. };
  10619. Node.prototype.onChildCheck = function onChildCheck() {
  10620. var children = this.children;
  10621. var validChildren = children.filter(function (child) {
  10622. return !child.isDisabled;
  10623. });
  10624. var checked = validChildren.length ? validChildren.every(function (child) {
  10625. return child.checked;
  10626. }) : false;
  10627. this.setCheckState(checked);
  10628. };
  10629. Node.prototype.setCheckState = function setCheckState(checked) {
  10630. var totalNum = this.children.length;
  10631. var checkedNum = this.children.reduce(function (c, p) {
  10632. var num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
  10633. return c + num;
  10634. }, 0);
  10635. this.checked = checked;
  10636. this.indeterminate = checkedNum !== totalNum && checkedNum > 0;
  10637. };
  10638. Node.prototype.syncCheckState = function syncCheckState(checkedValue) {
  10639. var value = this.getValueByOption();
  10640. var checked = this.isSameNode(checkedValue, value);
  10641. this.doCheck(checked);
  10642. };
  10643. Node.prototype.doCheck = function doCheck(checked) {
  10644. if (this.checked !== checked) {
  10645. if (this.config.checkStrictly) {
  10646. this.checked = checked;
  10647. } else {
  10648. // bottom up to unify the calculation of the indeterminate state
  10649. this.broadcast('check', checked);
  10650. this.setCheckState(checked);
  10651. this.emit('check');
  10652. }
  10653. }
  10654. };
  10655. _createClass(Node, [{
  10656. key: 'isDisabled',
  10657. get: function get() {
  10658. var data = this.data,
  10659. parent = this.parent,
  10660. config = this.config;
  10661. var disabledKey = config.disabled;
  10662. var checkStrictly = config.checkStrictly;
  10663. return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;
  10664. }
  10665. }, {
  10666. key: 'isLeaf',
  10667. get: function get() {
  10668. var data = this.data,
  10669. loaded = this.loaded,
  10670. hasChildren = this.hasChildren,
  10671. children = this.children;
  10672. var _config2 = this.config,
  10673. lazy = _config2.lazy,
  10674. leafKey = _config2.leaf;
  10675. if (lazy) {
  10676. var isLeaf = Object(shared_["isDef"])(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;
  10677. this.hasChildren = !isLeaf;
  10678. return isLeaf;
  10679. }
  10680. return !hasChildren;
  10681. }
  10682. }]);
  10683. return Node;
  10684. }();
  10685. /* harmony default export */ var src_node = (node_Node);
  10686. // CONCATENATED MODULE: ./packages/cascader-panel/src/store.js
  10687. function store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10688. var flatNodes = function flatNodes(data, leafOnly) {
  10689. return data.reduce(function (res, node) {
  10690. if (node.isLeaf) {
  10691. res.push(node);
  10692. } else {
  10693. !leafOnly && res.push(node);
  10694. res = res.concat(flatNodes(node.children, leafOnly));
  10695. }
  10696. return res;
  10697. }, []);
  10698. };
  10699. var store_Store = function () {
  10700. function Store(data, config) {
  10701. store_classCallCheck(this, Store);
  10702. this.config = config;
  10703. this.initNodes(data);
  10704. }
  10705. Store.prototype.initNodes = function initNodes(data) {
  10706. var _this = this;
  10707. data = Object(util_["coerceTruthyValueToArray"])(data);
  10708. this.nodes = data.map(function (nodeData) {
  10709. return new src_node(nodeData, _this.config);
  10710. });
  10711. this.flattedNodes = this.getFlattedNodes(false, false);
  10712. this.leafNodes = this.getFlattedNodes(true, false);
  10713. };
  10714. Store.prototype.appendNode = function appendNode(nodeData, parentNode) {
  10715. var node = new src_node(nodeData, this.config, parentNode);
  10716. var children = parentNode ? parentNode.children : this.nodes;
  10717. children.push(node);
  10718. };
  10719. Store.prototype.appendNodes = function appendNodes(nodeDataList, parentNode) {
  10720. var _this2 = this;
  10721. nodeDataList = Object(util_["coerceTruthyValueToArray"])(nodeDataList);
  10722. nodeDataList.forEach(function (nodeData) {
  10723. return _this2.appendNode(nodeData, parentNode);
  10724. });
  10725. };
  10726. Store.prototype.getNodes = function getNodes() {
  10727. return this.nodes;
  10728. };
  10729. Store.prototype.getFlattedNodes = function getFlattedNodes(leafOnly) {
  10730. var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  10731. var cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;
  10732. return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);
  10733. };
  10734. Store.prototype.getNodeByValue = function getNodeByValue(value) {
  10735. var nodes = this.getFlattedNodes(false, !this.config.lazy).filter(function (node) {
  10736. return Object(util_["valueEquals"])(node.path, value) || node.value === value;
  10737. });
  10738. return nodes && nodes.length ? nodes[0] : null;
  10739. };
  10740. return Store;
  10741. }();
  10742. /* harmony default export */ var src_store = (store_Store);
  10743. // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
  10744. var merge_ = __webpack_require__(9);
  10745. var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
  10746. // EXTERNAL MODULE: external "element-ui/lib/utils/aria-utils"
  10747. var aria_utils_ = __webpack_require__(40);
  10748. var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);
  10749. // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
  10750. var scroll_into_view_ = __webpack_require__(31);
  10751. var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
  10752. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
  10753. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  10754. //
  10755. //
  10756. //
  10757. //
  10758. //
  10759. //
  10760. //
  10761. //
  10762. //
  10763. //
  10764. //
  10765. //
  10766. //
  10767. //
  10768. //
  10769. //
  10770. var KeyCode = aria_utils_default.a.keys;
  10771. var DefaultProps = {
  10772. expandTrigger: 'click', // or hover
  10773. multiple: false,
  10774. checkStrictly: false, // whether all nodes can be selected
  10775. emitPath: true, // wether to emit an array of all levels value in which node is located
  10776. lazy: false,
  10777. lazyLoad: util_["noop"],
  10778. value: 'value',
  10779. label: 'label',
  10780. children: 'children',
  10781. leaf: 'leaf',
  10782. disabled: 'disabled',
  10783. hoverThreshold: 500
  10784. };
  10785. var cascader_panelvue_type_script_lang_js_isLeaf = function isLeaf(el) {
  10786. return !el.getAttribute('aria-owns');
  10787. };
  10788. var getSibling = function getSibling(el, distance) {
  10789. var parentNode = el.parentNode;
  10790. if (parentNode) {
  10791. var siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex="-1"]');
  10792. var index = Array.prototype.indexOf.call(siblings, el);
  10793. return siblings[index + distance] || null;
  10794. }
  10795. return null;
  10796. };
  10797. var getMenuIndex = function getMenuIndex(el, distance) {
  10798. if (!el) return;
  10799. var pieces = el.id.split('-');
  10800. return Number(pieces[pieces.length - 2]);
  10801. };
  10802. var focusNode = function focusNode(el) {
  10803. if (!el) return;
  10804. el.focus();
  10805. !cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();
  10806. };
  10807. var checkNode = function checkNode(el) {
  10808. if (!el) return;
  10809. var input = el.querySelector('input');
  10810. if (input) {
  10811. input.click();
  10812. } else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {
  10813. el.click();
  10814. }
  10815. };
  10816. /* harmony default export */ var cascader_panelvue_type_script_lang_js_ = ({
  10817. name: 'ElCascaderPanel',
  10818. components: {
  10819. CascaderMenu: cascader_menu
  10820. },
  10821. props: {
  10822. value: {},
  10823. options: Array,
  10824. props: Object,
  10825. border: {
  10826. type: Boolean,
  10827. default: true
  10828. },
  10829. renderLabel: Function
  10830. },
  10831. provide: function provide() {
  10832. return {
  10833. panel: this
  10834. };
  10835. },
  10836. data: function data() {
  10837. return {
  10838. checkedValue: null,
  10839. checkedNodePaths: [],
  10840. store: [],
  10841. menus: [],
  10842. activePath: [],
  10843. loadCount: 0
  10844. };
  10845. },
  10846. computed: {
  10847. config: function config() {
  10848. return merge_default()(_extends({}, DefaultProps), this.props || {});
  10849. },
  10850. multiple: function multiple() {
  10851. return this.config.multiple;
  10852. },
  10853. checkStrictly: function checkStrictly() {
  10854. return this.config.checkStrictly;
  10855. },
  10856. leafOnly: function leafOnly() {
  10857. return !this.checkStrictly;
  10858. },
  10859. isHoverMenu: function isHoverMenu() {
  10860. return this.config.expandTrigger === 'hover';
  10861. },
  10862. renderLabelFn: function renderLabelFn() {
  10863. return this.renderLabel || this.$scopedSlots.default;
  10864. }
  10865. },
  10866. watch: {
  10867. options: {
  10868. handler: function handler() {
  10869. this.initStore();
  10870. },
  10871. immediate: true,
  10872. deep: true
  10873. },
  10874. value: function value() {
  10875. this.syncCheckedValue();
  10876. this.checkStrictly && this.calculateCheckedNodePaths();
  10877. },
  10878. checkedValue: function checkedValue(val) {
  10879. if (!Object(util_["isEqual"])(val, this.value)) {
  10880. this.checkStrictly && this.calculateCheckedNodePaths();
  10881. this.$emit('input', val);
  10882. this.$emit('change', val);
  10883. }
  10884. }
  10885. },
  10886. mounted: function mounted() {
  10887. if (!this.isEmptyValue(this.value)) {
  10888. this.syncCheckedValue();
  10889. }
  10890. },
  10891. methods: {
  10892. initStore: function initStore() {
  10893. var config = this.config,
  10894. options = this.options;
  10895. if (config.lazy && Object(util_["isEmpty"])(options)) {
  10896. this.lazyLoad();
  10897. } else {
  10898. this.store = new src_store(options, config);
  10899. this.menus = [this.store.getNodes()];
  10900. this.syncMenuState();
  10901. }
  10902. },
  10903. syncCheckedValue: function syncCheckedValue() {
  10904. var value = this.value,
  10905. checkedValue = this.checkedValue;
  10906. if (!Object(util_["isEqual"])(value, checkedValue)) {
  10907. this.activePath = [];
  10908. this.checkedValue = value;
  10909. this.syncMenuState();
  10910. }
  10911. },
  10912. syncMenuState: function syncMenuState() {
  10913. var multiple = this.multiple,
  10914. checkStrictly = this.checkStrictly;
  10915. this.syncActivePath();
  10916. multiple && this.syncMultiCheckState();
  10917. checkStrictly && this.calculateCheckedNodePaths();
  10918. this.$nextTick(this.scrollIntoView);
  10919. },
  10920. syncMultiCheckState: function syncMultiCheckState() {
  10921. var _this = this;
  10922. var nodes = this.getFlattedNodes(this.leafOnly);
  10923. nodes.forEach(function (node) {
  10924. node.syncCheckState(_this.checkedValue);
  10925. });
  10926. },
  10927. isEmptyValue: function isEmptyValue(val) {
  10928. var multiple = this.multiple,
  10929. config = this.config;
  10930. var emitPath = config.emitPath;
  10931. if (multiple || emitPath) {
  10932. return Object(util_["isEmpty"])(val);
  10933. }
  10934. return false;
  10935. },
  10936. syncActivePath: function syncActivePath() {
  10937. var _this2 = this;
  10938. var store = this.store,
  10939. multiple = this.multiple,
  10940. activePath = this.activePath,
  10941. checkedValue = this.checkedValue;
  10942. if (!Object(util_["isEmpty"])(activePath)) {
  10943. var nodes = activePath.map(function (node) {
  10944. return _this2.getNodeByValue(node.getValue());
  10945. });
  10946. this.expandNodes(nodes);
  10947. } else if (!this.isEmptyValue(checkedValue)) {
  10948. var value = multiple ? checkedValue[0] : checkedValue;
  10949. var checkedNode = this.getNodeByValue(value) || {};
  10950. var _nodes = (checkedNode.pathNodes || []).slice(0, -1);
  10951. this.expandNodes(_nodes);
  10952. } else {
  10953. this.activePath = [];
  10954. this.menus = [store.getNodes()];
  10955. }
  10956. },
  10957. expandNodes: function expandNodes(nodes) {
  10958. var _this3 = this;
  10959. nodes.forEach(function (node) {
  10960. return _this3.handleExpand(node, true /* silent */);
  10961. });
  10962. },
  10963. calculateCheckedNodePaths: function calculateCheckedNodePaths() {
  10964. var _this4 = this;
  10965. var checkedValue = this.checkedValue,
  10966. multiple = this.multiple;
  10967. var checkedValues = multiple ? Object(util_["coerceTruthyValueToArray"])(checkedValue) : [checkedValue];
  10968. this.checkedNodePaths = checkedValues.map(function (v) {
  10969. var checkedNode = _this4.getNodeByValue(v);
  10970. return checkedNode ? checkedNode.pathNodes : [];
  10971. });
  10972. },
  10973. handleKeyDown: function handleKeyDown(e) {
  10974. var target = e.target,
  10975. keyCode = e.keyCode;
  10976. switch (keyCode) {
  10977. case KeyCode.up:
  10978. var prev = getSibling(target, -1);
  10979. focusNode(prev);
  10980. break;
  10981. case KeyCode.down:
  10982. var next = getSibling(target, 1);
  10983. focusNode(next);
  10984. break;
  10985. case KeyCode.left:
  10986. var preMenu = this.$refs.menu[getMenuIndex(target) - 1];
  10987. if (preMenu) {
  10988. var expandedNode = preMenu.$el.querySelector('.el-cascader-node[aria-expanded="true"]');
  10989. focusNode(expandedNode);
  10990. }
  10991. break;
  10992. case KeyCode.right:
  10993. var nextMenu = this.$refs.menu[getMenuIndex(target) + 1];
  10994. if (nextMenu) {
  10995. var firstNode = nextMenu.$el.querySelector('.el-cascader-node[tabindex="-1"]');
  10996. focusNode(firstNode);
  10997. }
  10998. break;
  10999. case KeyCode.enter:
  11000. checkNode(target);
  11001. break;
  11002. case KeyCode.esc:
  11003. case KeyCode.tab:
  11004. this.$emit('close');
  11005. break;
  11006. default:
  11007. return;
  11008. }
  11009. },
  11010. handleExpand: function handleExpand(node, silent) {
  11011. var activePath = this.activePath;
  11012. var level = node.level;
  11013. var path = activePath.slice(0, level - 1);
  11014. var menus = this.menus.slice(0, level);
  11015. if (!node.isLeaf) {
  11016. path.push(node);
  11017. menus.push(node.children);
  11018. }
  11019. this.activePath = path;
  11020. this.menus = menus;
  11021. if (!silent) {
  11022. var pathValues = path.map(function (node) {
  11023. return node.getValue();
  11024. });
  11025. var activePathValues = activePath.map(function (node) {
  11026. return node.getValue();
  11027. });
  11028. if (!Object(util_["valueEquals"])(pathValues, activePathValues)) {
  11029. this.$emit('active-item-change', pathValues); // Deprecated
  11030. this.$emit('expand-change', pathValues);
  11031. }
  11032. }
  11033. },
  11034. handleCheckChange: function handleCheckChange(value) {
  11035. this.checkedValue = value;
  11036. },
  11037. lazyLoad: function lazyLoad(node, onFullfiled) {
  11038. var _this5 = this;
  11039. var config = this.config;
  11040. if (!node) {
  11041. node = node || { root: true, level: 0 };
  11042. this.store = new src_store([], config);
  11043. this.menus = [this.store.getNodes()];
  11044. }
  11045. node.loading = true;
  11046. var resolve = function resolve(dataList) {
  11047. var parent = node.root ? null : node;
  11048. dataList && dataList.length && _this5.store.appendNodes(dataList, parent);
  11049. node.loading = false;
  11050. node.loaded = true;
  11051. // dispose default value on lazy load mode
  11052. if (Array.isArray(_this5.checkedValue)) {
  11053. var nodeValue = _this5.checkedValue[_this5.loadCount++];
  11054. var valueKey = _this5.config.value;
  11055. var leafKey = _this5.config.leaf;
  11056. if (Array.isArray(dataList) && dataList.filter(function (item) {
  11057. return item[valueKey] === nodeValue;
  11058. }).length > 0) {
  11059. var checkedNode = _this5.store.getNodeByValue(nodeValue);
  11060. if (!checkedNode.data[leafKey]) {
  11061. _this5.lazyLoad(checkedNode, function () {
  11062. _this5.handleExpand(checkedNode);
  11063. });
  11064. }
  11065. if (_this5.loadCount === _this5.checkedValue.length) {
  11066. _this5.$parent.computePresentText();
  11067. }
  11068. }
  11069. }
  11070. onFullfiled && onFullfiled(dataList);
  11071. };
  11072. config.lazyLoad(node, resolve);
  11073. },
  11074. /**
  11075. * public methods
  11076. */
  11077. calculateMultiCheckedValue: function calculateMultiCheckedValue() {
  11078. this.checkedValue = this.getCheckedNodes(this.leafOnly).map(function (node) {
  11079. return node.getValueByOption();
  11080. });
  11081. },
  11082. scrollIntoView: function scrollIntoView() {
  11083. if (this.$isServer) return;
  11084. var menus = this.$refs.menu || [];
  11085. menus.forEach(function (menu) {
  11086. var menuElement = menu.$el;
  11087. if (menuElement) {
  11088. var container = menuElement.querySelector('.el-scrollbar__wrap');
  11089. var activeNode = menuElement.querySelector('.el-cascader-node.is-active') || menuElement.querySelector('.el-cascader-node.in-active-path');
  11090. scroll_into_view_default()(container, activeNode);
  11091. }
  11092. });
  11093. },
  11094. getNodeByValue: function getNodeByValue(val) {
  11095. return this.store.getNodeByValue(val);
  11096. },
  11097. getFlattedNodes: function getFlattedNodes(leafOnly) {
  11098. var cached = !this.config.lazy;
  11099. return this.store.getFlattedNodes(leafOnly, cached);
  11100. },
  11101. getCheckedNodes: function getCheckedNodes(leafOnly) {
  11102. var checkedValue = this.checkedValue,
  11103. multiple = this.multiple;
  11104. if (multiple) {
  11105. var nodes = this.getFlattedNodes(leafOnly);
  11106. return nodes.filter(function (node) {
  11107. return node.checked;
  11108. });
  11109. } else {
  11110. return this.isEmptyValue(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];
  11111. }
  11112. },
  11113. clearCheckedNodes: function clearCheckedNodes() {
  11114. var config = this.config,
  11115. leafOnly = this.leafOnly;
  11116. var multiple = config.multiple,
  11117. emitPath = config.emitPath;
  11118. if (multiple) {
  11119. this.getCheckedNodes(leafOnly).filter(function (node) {
  11120. return !node.isDisabled;
  11121. }).forEach(function (node) {
  11122. return node.doCheck(false);
  11123. });
  11124. this.calculateMultiCheckedValue();
  11125. } else {
  11126. this.checkedValue = emitPath ? [] : null;
  11127. }
  11128. }
  11129. }
  11130. });
  11131. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
  11132. /* harmony default export */ var src_cascader_panelvue_type_script_lang_js_ = (cascader_panelvue_type_script_lang_js_);
  11133. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue
  11134. /* normalize component */
  11135. var cascader_panel_component = Object(componentNormalizer["a" /* default */])(
  11136. src_cascader_panelvue_type_script_lang_js_,
  11137. cascader_panelvue_type_template_id_34932346_render,
  11138. staticRenderFns,
  11139. false,
  11140. null,
  11141. null,
  11142. null
  11143. )
  11144. /* hot reload */
  11145. if (false) { var cascader_panel_api; }
  11146. cascader_panel_component.options.__file = "packages/cascader-panel/src/cascader-panel.vue"
  11147. /* harmony default export */ var cascader_panel = (cascader_panel_component.exports);
  11148. // CONCATENATED MODULE: ./packages/cascader-panel/index.js
  11149. /* istanbul ignore next */
  11150. cascader_panel.install = function (Vue) {
  11151. Vue.component(cascader_panel.name, cascader_panel);
  11152. };
  11153. /* harmony default export */ var packages_cascader_panel = __webpack_exports__["default"] = (cascader_panel);
  11154. /***/ }),
  11155. /***/ 9:
  11156. /***/ (function(module, exports) {
  11157. module.exports = __webpack_require__(/*! element-ui/lib/utils/merge */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/merge.js");
  11158. /***/ })
  11159. /******/ });
  11160. /***/ }),
  11161. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/checkbox-group.js":
  11162. /*!**************************************************************************!*\
  11163. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/checkbox-group.js ***!
  11164. \**************************************************************************/
  11165. /*! no static exports found */
  11166. /***/ (function(module, exports, __webpack_require__) {
  11167. module.exports =
  11168. /******/ (function(modules) { // webpackBootstrap
  11169. /******/ // The module cache
  11170. /******/ var installedModules = {};
  11171. /******/
  11172. /******/ // The require function
  11173. /******/ function __webpack_require__(moduleId) {
  11174. /******/
  11175. /******/ // Check if module is in cache
  11176. /******/ if(installedModules[moduleId]) {
  11177. /******/ return installedModules[moduleId].exports;
  11178. /******/ }
  11179. /******/ // Create a new module (and put it into the cache)
  11180. /******/ var module = installedModules[moduleId] = {
  11181. /******/ i: moduleId,
  11182. /******/ l: false,
  11183. /******/ exports: {}
  11184. /******/ };
  11185. /******/
  11186. /******/ // Execute the module function
  11187. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  11188. /******/
  11189. /******/ // Flag the module as loaded
  11190. /******/ module.l = true;
  11191. /******/
  11192. /******/ // Return the exports of the module
  11193. /******/ return module.exports;
  11194. /******/ }
  11195. /******/
  11196. /******/
  11197. /******/ // expose the modules object (__webpack_modules__)
  11198. /******/ __webpack_require__.m = modules;
  11199. /******/
  11200. /******/ // expose the module cache
  11201. /******/ __webpack_require__.c = installedModules;
  11202. /******/
  11203. /******/ // define getter function for harmony exports
  11204. /******/ __webpack_require__.d = function(exports, name, getter) {
  11205. /******/ if(!__webpack_require__.o(exports, name)) {
  11206. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  11207. /******/ }
  11208. /******/ };
  11209. /******/
  11210. /******/ // define __esModule on exports
  11211. /******/ __webpack_require__.r = function(exports) {
  11212. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  11213. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  11214. /******/ }
  11215. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  11216. /******/ };
  11217. /******/
  11218. /******/ // create a fake namespace object
  11219. /******/ // mode & 1: value is a module id, require it
  11220. /******/ // mode & 2: merge all properties of value into the ns
  11221. /******/ // mode & 4: return value when already ns object
  11222. /******/ // mode & 8|1: behave like require
  11223. /******/ __webpack_require__.t = function(value, mode) {
  11224. /******/ if(mode & 1) value = __webpack_require__(value);
  11225. /******/ if(mode & 8) return value;
  11226. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  11227. /******/ var ns = Object.create(null);
  11228. /******/ __webpack_require__.r(ns);
  11229. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  11230. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  11231. /******/ return ns;
  11232. /******/ };
  11233. /******/
  11234. /******/ // getDefaultExport function for compatibility with non-harmony modules
  11235. /******/ __webpack_require__.n = function(module) {
  11236. /******/ var getter = module && module.__esModule ?
  11237. /******/ function getDefault() { return module['default']; } :
  11238. /******/ function getModuleExports() { return module; };
  11239. /******/ __webpack_require__.d(getter, 'a', getter);
  11240. /******/ return getter;
  11241. /******/ };
  11242. /******/
  11243. /******/ // Object.prototype.hasOwnProperty.call
  11244. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  11245. /******/
  11246. /******/ // __webpack_public_path__
  11247. /******/ __webpack_require__.p = "/dist/";
  11248. /******/
  11249. /******/
  11250. /******/ // Load entry module and return exports
  11251. /******/ return __webpack_require__(__webpack_require__.s = 92);
  11252. /******/ })
  11253. /************************************************************************/
  11254. /******/ ({
  11255. /***/ 0:
  11256. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11257. "use strict";
  11258. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  11259. /* globals __VUE_SSR_CONTEXT__ */
  11260. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  11261. // This module is a runtime utility for cleaner component module output and will
  11262. // be included in the final webpack user bundle.
  11263. function normalizeComponent (
  11264. scriptExports,
  11265. render,
  11266. staticRenderFns,
  11267. functionalTemplate,
  11268. injectStyles,
  11269. scopeId,
  11270. moduleIdentifier, /* server only */
  11271. shadowMode /* vue-cli only */
  11272. ) {
  11273. // Vue.extend constructor export interop
  11274. var options = typeof scriptExports === 'function'
  11275. ? scriptExports.options
  11276. : scriptExports
  11277. // render functions
  11278. if (render) {
  11279. options.render = render
  11280. options.staticRenderFns = staticRenderFns
  11281. options._compiled = true
  11282. }
  11283. // functional template
  11284. if (functionalTemplate) {
  11285. options.functional = true
  11286. }
  11287. // scopedId
  11288. if (scopeId) {
  11289. options._scopeId = 'data-v-' + scopeId
  11290. }
  11291. var hook
  11292. if (moduleIdentifier) { // server build
  11293. hook = function (context) {
  11294. // 2.3 injection
  11295. context =
  11296. context || // cached call
  11297. (this.$vnode && this.$vnode.ssrContext) || // stateful
  11298. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  11299. // 2.2 with runInNewContext: true
  11300. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  11301. context = __VUE_SSR_CONTEXT__
  11302. }
  11303. // inject component styles
  11304. if (injectStyles) {
  11305. injectStyles.call(this, context)
  11306. }
  11307. // register component module identifier for async chunk inferrence
  11308. if (context && context._registeredComponents) {
  11309. context._registeredComponents.add(moduleIdentifier)
  11310. }
  11311. }
  11312. // used by ssr in case component is cached and beforeCreate
  11313. // never gets called
  11314. options._ssrRegister = hook
  11315. } else if (injectStyles) {
  11316. hook = shadowMode
  11317. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  11318. : injectStyles
  11319. }
  11320. if (hook) {
  11321. if (options.functional) {
  11322. // for template-only hot-reload because in that case the render fn doesn't
  11323. // go through the normalizer
  11324. options._injectStyles = hook
  11325. // register for functioal component in vue file
  11326. var originalRender = options.render
  11327. options.render = function renderWithStyleInjection (h, context) {
  11328. hook.call(context)
  11329. return originalRender(h, context)
  11330. }
  11331. } else {
  11332. // inject component registration as beforeCreate hook
  11333. var existing = options.beforeCreate
  11334. options.beforeCreate = existing
  11335. ? [].concat(existing, hook)
  11336. : [hook]
  11337. }
  11338. }
  11339. return {
  11340. exports: scriptExports,
  11341. options: options
  11342. }
  11343. }
  11344. /***/ }),
  11345. /***/ 4:
  11346. /***/ (function(module, exports) {
  11347. module.exports = __webpack_require__(/*! element-ui/lib/mixins/emitter */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js");
  11348. /***/ }),
  11349. /***/ 92:
  11350. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11351. "use strict";
  11352. __webpack_require__.r(__webpack_exports__);
  11353. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
  11354. var render = function() {
  11355. var _vm = this
  11356. var _h = _vm.$createElement
  11357. var _c = _vm._self._c || _h
  11358. return _c(
  11359. "div",
  11360. {
  11361. staticClass: "el-checkbox-group",
  11362. attrs: { role: "group", "aria-label": "checkbox-group" }
  11363. },
  11364. [_vm._t("default")],
  11365. 2
  11366. )
  11367. }
  11368. var staticRenderFns = []
  11369. render._withStripped = true
  11370. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
  11371. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  11372. var emitter_ = __webpack_require__(4);
  11373. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  11374. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
  11375. /* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({
  11376. name: 'ElCheckboxGroup',
  11377. componentName: 'ElCheckboxGroup',
  11378. mixins: [emitter_default.a],
  11379. inject: {
  11380. elFormItem: {
  11381. default: ''
  11382. }
  11383. },
  11384. props: {
  11385. value: {},
  11386. disabled: Boolean,
  11387. min: Number,
  11388. max: Number,
  11389. size: String,
  11390. fill: String,
  11391. textColor: String
  11392. },
  11393. computed: {
  11394. _elFormItemSize: function _elFormItemSize() {
  11395. return (this.elFormItem || {}).elFormItemSize;
  11396. },
  11397. checkboxGroupSize: function checkboxGroupSize() {
  11398. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  11399. }
  11400. },
  11401. watch: {
  11402. value: function value(_value) {
  11403. this.dispatch('ElFormItem', 'el.form.change', [_value]);
  11404. }
  11405. }
  11406. });
  11407. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
  11408. /* harmony default export */ var src_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_);
  11409. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  11410. var componentNormalizer = __webpack_require__(0);
  11411. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue
  11412. /* normalize component */
  11413. var component = Object(componentNormalizer["a" /* default */])(
  11414. src_checkbox_groupvue_type_script_lang_js_,
  11415. render,
  11416. staticRenderFns,
  11417. false,
  11418. null,
  11419. null,
  11420. null
  11421. )
  11422. /* hot reload */
  11423. if (false) { var api; }
  11424. component.options.__file = "packages/checkbox/src/checkbox-group.vue"
  11425. /* harmony default export */ var checkbox_group = (component.exports);
  11426. // CONCATENATED MODULE: ./packages/checkbox-group/index.js
  11427. /* istanbul ignore next */
  11428. checkbox_group.install = function (Vue) {
  11429. Vue.component(checkbox_group.name, checkbox_group);
  11430. };
  11431. /* harmony default export */ var packages_checkbox_group = __webpack_exports__["default"] = (checkbox_group);
  11432. /***/ })
  11433. /******/ });
  11434. /***/ }),
  11435. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/checkbox.js":
  11436. /*!********************************************************************!*\
  11437. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/checkbox.js ***!
  11438. \********************************************************************/
  11439. /*! no static exports found */
  11440. /***/ (function(module, exports, __webpack_require__) {
  11441. module.exports =
  11442. /******/ (function(modules) { // webpackBootstrap
  11443. /******/ // The module cache
  11444. /******/ var installedModules = {};
  11445. /******/
  11446. /******/ // The require function
  11447. /******/ function __webpack_require__(moduleId) {
  11448. /******/
  11449. /******/ // Check if module is in cache
  11450. /******/ if(installedModules[moduleId]) {
  11451. /******/ return installedModules[moduleId].exports;
  11452. /******/ }
  11453. /******/ // Create a new module (and put it into the cache)
  11454. /******/ var module = installedModules[moduleId] = {
  11455. /******/ i: moduleId,
  11456. /******/ l: false,
  11457. /******/ exports: {}
  11458. /******/ };
  11459. /******/
  11460. /******/ // Execute the module function
  11461. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  11462. /******/
  11463. /******/ // Flag the module as loaded
  11464. /******/ module.l = true;
  11465. /******/
  11466. /******/ // Return the exports of the module
  11467. /******/ return module.exports;
  11468. /******/ }
  11469. /******/
  11470. /******/
  11471. /******/ // expose the modules object (__webpack_modules__)
  11472. /******/ __webpack_require__.m = modules;
  11473. /******/
  11474. /******/ // expose the module cache
  11475. /******/ __webpack_require__.c = installedModules;
  11476. /******/
  11477. /******/ // define getter function for harmony exports
  11478. /******/ __webpack_require__.d = function(exports, name, getter) {
  11479. /******/ if(!__webpack_require__.o(exports, name)) {
  11480. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  11481. /******/ }
  11482. /******/ };
  11483. /******/
  11484. /******/ // define __esModule on exports
  11485. /******/ __webpack_require__.r = function(exports) {
  11486. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  11487. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  11488. /******/ }
  11489. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  11490. /******/ };
  11491. /******/
  11492. /******/ // create a fake namespace object
  11493. /******/ // mode & 1: value is a module id, require it
  11494. /******/ // mode & 2: merge all properties of value into the ns
  11495. /******/ // mode & 4: return value when already ns object
  11496. /******/ // mode & 8|1: behave like require
  11497. /******/ __webpack_require__.t = function(value, mode) {
  11498. /******/ if(mode & 1) value = __webpack_require__(value);
  11499. /******/ if(mode & 8) return value;
  11500. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  11501. /******/ var ns = Object.create(null);
  11502. /******/ __webpack_require__.r(ns);
  11503. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  11504. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  11505. /******/ return ns;
  11506. /******/ };
  11507. /******/
  11508. /******/ // getDefaultExport function for compatibility with non-harmony modules
  11509. /******/ __webpack_require__.n = function(module) {
  11510. /******/ var getter = module && module.__esModule ?
  11511. /******/ function getDefault() { return module['default']; } :
  11512. /******/ function getModuleExports() { return module; };
  11513. /******/ __webpack_require__.d(getter, 'a', getter);
  11514. /******/ return getter;
  11515. /******/ };
  11516. /******/
  11517. /******/ // Object.prototype.hasOwnProperty.call
  11518. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  11519. /******/
  11520. /******/ // __webpack_public_path__
  11521. /******/ __webpack_require__.p = "/dist/";
  11522. /******/
  11523. /******/
  11524. /******/ // Load entry module and return exports
  11525. /******/ return __webpack_require__(__webpack_require__.s = 90);
  11526. /******/ })
  11527. /************************************************************************/
  11528. /******/ ({
  11529. /***/ 0:
  11530. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11531. "use strict";
  11532. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  11533. /* globals __VUE_SSR_CONTEXT__ */
  11534. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  11535. // This module is a runtime utility for cleaner component module output and will
  11536. // be included in the final webpack user bundle.
  11537. function normalizeComponent (
  11538. scriptExports,
  11539. render,
  11540. staticRenderFns,
  11541. functionalTemplate,
  11542. injectStyles,
  11543. scopeId,
  11544. moduleIdentifier, /* server only */
  11545. shadowMode /* vue-cli only */
  11546. ) {
  11547. // Vue.extend constructor export interop
  11548. var options = typeof scriptExports === 'function'
  11549. ? scriptExports.options
  11550. : scriptExports
  11551. // render functions
  11552. if (render) {
  11553. options.render = render
  11554. options.staticRenderFns = staticRenderFns
  11555. options._compiled = true
  11556. }
  11557. // functional template
  11558. if (functionalTemplate) {
  11559. options.functional = true
  11560. }
  11561. // scopedId
  11562. if (scopeId) {
  11563. options._scopeId = 'data-v-' + scopeId
  11564. }
  11565. var hook
  11566. if (moduleIdentifier) { // server build
  11567. hook = function (context) {
  11568. // 2.3 injection
  11569. context =
  11570. context || // cached call
  11571. (this.$vnode && this.$vnode.ssrContext) || // stateful
  11572. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  11573. // 2.2 with runInNewContext: true
  11574. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  11575. context = __VUE_SSR_CONTEXT__
  11576. }
  11577. // inject component styles
  11578. if (injectStyles) {
  11579. injectStyles.call(this, context)
  11580. }
  11581. // register component module identifier for async chunk inferrence
  11582. if (context && context._registeredComponents) {
  11583. context._registeredComponents.add(moduleIdentifier)
  11584. }
  11585. }
  11586. // used by ssr in case component is cached and beforeCreate
  11587. // never gets called
  11588. options._ssrRegister = hook
  11589. } else if (injectStyles) {
  11590. hook = shadowMode
  11591. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  11592. : injectStyles
  11593. }
  11594. if (hook) {
  11595. if (options.functional) {
  11596. // for template-only hot-reload because in that case the render fn doesn't
  11597. // go through the normalizer
  11598. options._injectStyles = hook
  11599. // register for functioal component in vue file
  11600. var originalRender = options.render
  11601. options.render = function renderWithStyleInjection (h, context) {
  11602. hook.call(context)
  11603. return originalRender(h, context)
  11604. }
  11605. } else {
  11606. // inject component registration as beforeCreate hook
  11607. var existing = options.beforeCreate
  11608. options.beforeCreate = existing
  11609. ? [].concat(existing, hook)
  11610. : [hook]
  11611. }
  11612. }
  11613. return {
  11614. exports: scriptExports,
  11615. options: options
  11616. }
  11617. }
  11618. /***/ }),
  11619. /***/ 4:
  11620. /***/ (function(module, exports) {
  11621. module.exports = __webpack_require__(/*! element-ui/lib/mixins/emitter */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js");
  11622. /***/ }),
  11623. /***/ 90:
  11624. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11625. "use strict";
  11626. __webpack_require__.r(__webpack_exports__);
  11627. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
  11628. var render = function() {
  11629. var _vm = this
  11630. var _h = _vm.$createElement
  11631. var _c = _vm._self._c || _h
  11632. return _c(
  11633. "label",
  11634. {
  11635. staticClass: "el-checkbox",
  11636. class: [
  11637. _vm.border && _vm.checkboxSize
  11638. ? "el-checkbox--" + _vm.checkboxSize
  11639. : "",
  11640. { "is-disabled": _vm.isDisabled },
  11641. { "is-bordered": _vm.border },
  11642. { "is-checked": _vm.isChecked }
  11643. ],
  11644. attrs: { id: _vm.id }
  11645. },
  11646. [
  11647. _c(
  11648. "span",
  11649. {
  11650. staticClass: "el-checkbox__input",
  11651. class: {
  11652. "is-disabled": _vm.isDisabled,
  11653. "is-checked": _vm.isChecked,
  11654. "is-indeterminate": _vm.indeterminate,
  11655. "is-focus": _vm.focus
  11656. },
  11657. attrs: {
  11658. tabindex: _vm.indeterminate ? 0 : false,
  11659. role: _vm.indeterminate ? "checkbox" : false,
  11660. "aria-checked": _vm.indeterminate ? "mixed" : false
  11661. }
  11662. },
  11663. [
  11664. _c("span", { staticClass: "el-checkbox__inner" }),
  11665. _vm.trueLabel || _vm.falseLabel
  11666. ? _c("input", {
  11667. directives: [
  11668. {
  11669. name: "model",
  11670. rawName: "v-model",
  11671. value: _vm.model,
  11672. expression: "model"
  11673. }
  11674. ],
  11675. staticClass: "el-checkbox__original",
  11676. attrs: {
  11677. type: "checkbox",
  11678. "aria-hidden": _vm.indeterminate ? "true" : "false",
  11679. name: _vm.name,
  11680. disabled: _vm.isDisabled,
  11681. "true-value": _vm.trueLabel,
  11682. "false-value": _vm.falseLabel
  11683. },
  11684. domProps: {
  11685. checked: Array.isArray(_vm.model)
  11686. ? _vm._i(_vm.model, null) > -1
  11687. : _vm._q(_vm.model, _vm.trueLabel)
  11688. },
  11689. on: {
  11690. change: [
  11691. function($event) {
  11692. var $$a = _vm.model,
  11693. $$el = $event.target,
  11694. $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
  11695. if (Array.isArray($$a)) {
  11696. var $$v = null,
  11697. $$i = _vm._i($$a, $$v)
  11698. if ($$el.checked) {
  11699. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  11700. } else {
  11701. $$i > -1 &&
  11702. (_vm.model = $$a
  11703. .slice(0, $$i)
  11704. .concat($$a.slice($$i + 1)))
  11705. }
  11706. } else {
  11707. _vm.model = $$c
  11708. }
  11709. },
  11710. _vm.handleChange
  11711. ],
  11712. focus: function($event) {
  11713. _vm.focus = true
  11714. },
  11715. blur: function($event) {
  11716. _vm.focus = false
  11717. }
  11718. }
  11719. })
  11720. : _c("input", {
  11721. directives: [
  11722. {
  11723. name: "model",
  11724. rawName: "v-model",
  11725. value: _vm.model,
  11726. expression: "model"
  11727. }
  11728. ],
  11729. staticClass: "el-checkbox__original",
  11730. attrs: {
  11731. type: "checkbox",
  11732. "aria-hidden": _vm.indeterminate ? "true" : "false",
  11733. disabled: _vm.isDisabled,
  11734. name: _vm.name
  11735. },
  11736. domProps: {
  11737. value: _vm.label,
  11738. checked: Array.isArray(_vm.model)
  11739. ? _vm._i(_vm.model, _vm.label) > -1
  11740. : _vm.model
  11741. },
  11742. on: {
  11743. change: [
  11744. function($event) {
  11745. var $$a = _vm.model,
  11746. $$el = $event.target,
  11747. $$c = $$el.checked ? true : false
  11748. if (Array.isArray($$a)) {
  11749. var $$v = _vm.label,
  11750. $$i = _vm._i($$a, $$v)
  11751. if ($$el.checked) {
  11752. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  11753. } else {
  11754. $$i > -1 &&
  11755. (_vm.model = $$a
  11756. .slice(0, $$i)
  11757. .concat($$a.slice($$i + 1)))
  11758. }
  11759. } else {
  11760. _vm.model = $$c
  11761. }
  11762. },
  11763. _vm.handleChange
  11764. ],
  11765. focus: function($event) {
  11766. _vm.focus = true
  11767. },
  11768. blur: function($event) {
  11769. _vm.focus = false
  11770. }
  11771. }
  11772. })
  11773. ]
  11774. ),
  11775. _vm.$slots.default || _vm.label
  11776. ? _c(
  11777. "span",
  11778. { staticClass: "el-checkbox__label" },
  11779. [
  11780. _vm._t("default"),
  11781. !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
  11782. ],
  11783. 2
  11784. )
  11785. : _vm._e()
  11786. ]
  11787. )
  11788. }
  11789. var staticRenderFns = []
  11790. render._withStripped = true
  11791. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
  11792. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  11793. var emitter_ = __webpack_require__(4);
  11794. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  11795. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
  11796. //
  11797. //
  11798. //
  11799. //
  11800. //
  11801. //
  11802. //
  11803. //
  11804. //
  11805. //
  11806. //
  11807. //
  11808. //
  11809. //
  11810. //
  11811. //
  11812. //
  11813. //
  11814. //
  11815. //
  11816. //
  11817. //
  11818. //
  11819. //
  11820. //
  11821. //
  11822. //
  11823. //
  11824. //
  11825. //
  11826. //
  11827. //
  11828. //
  11829. //
  11830. //
  11831. //
  11832. //
  11833. //
  11834. //
  11835. //
  11836. //
  11837. //
  11838. //
  11839. //
  11840. //
  11841. //
  11842. //
  11843. //
  11844. //
  11845. //
  11846. //
  11847. //
  11848. //
  11849. //
  11850. //
  11851. /* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
  11852. name: 'ElCheckbox',
  11853. mixins: [emitter_default.a],
  11854. inject: {
  11855. elForm: {
  11856. default: ''
  11857. },
  11858. elFormItem: {
  11859. default: ''
  11860. }
  11861. },
  11862. componentName: 'ElCheckbox',
  11863. data: function data() {
  11864. return {
  11865. selfModel: false,
  11866. focus: false,
  11867. isLimitExceeded: false
  11868. };
  11869. },
  11870. computed: {
  11871. model: {
  11872. get: function get() {
  11873. return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
  11874. },
  11875. set: function set(val) {
  11876. if (this.isGroup) {
  11877. this.isLimitExceeded = false;
  11878. this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
  11879. this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
  11880. this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
  11881. } else {
  11882. this.$emit('input', val);
  11883. this.selfModel = val;
  11884. }
  11885. }
  11886. },
  11887. isChecked: function isChecked() {
  11888. if ({}.toString.call(this.model) === '[object Boolean]') {
  11889. return this.model;
  11890. } else if (Array.isArray(this.model)) {
  11891. return this.model.indexOf(this.label) > -1;
  11892. } else if (this.model !== null && this.model !== undefined) {
  11893. return this.model === this.trueLabel;
  11894. }
  11895. },
  11896. isGroup: function isGroup() {
  11897. var parent = this.$parent;
  11898. while (parent) {
  11899. if (parent.$options.componentName !== 'ElCheckboxGroup') {
  11900. parent = parent.$parent;
  11901. } else {
  11902. this._checkboxGroup = parent;
  11903. return true;
  11904. }
  11905. }
  11906. return false;
  11907. },
  11908. store: function store() {
  11909. return this._checkboxGroup ? this._checkboxGroup.value : this.value;
  11910. },
  11911. /* used to make the isDisabled judgment under max/min props */
  11912. isLimitDisabled: function isLimitDisabled() {
  11913. var _checkboxGroup = this._checkboxGroup,
  11914. max = _checkboxGroup.max,
  11915. min = _checkboxGroup.min;
  11916. return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
  11917. },
  11918. isDisabled: function isDisabled() {
  11919. return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
  11920. },
  11921. _elFormItemSize: function _elFormItemSize() {
  11922. return (this.elFormItem || {}).elFormItemSize;
  11923. },
  11924. checkboxSize: function checkboxSize() {
  11925. var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  11926. return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
  11927. }
  11928. },
  11929. props: {
  11930. value: {},
  11931. label: {},
  11932. indeterminate: Boolean,
  11933. disabled: Boolean,
  11934. checked: Boolean,
  11935. name: String,
  11936. trueLabel: [String, Number],
  11937. falseLabel: [String, Number],
  11938. id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
  11939. controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
  11940. border: Boolean,
  11941. size: String
  11942. },
  11943. methods: {
  11944. addToStore: function addToStore() {
  11945. if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
  11946. this.model.push(this.label);
  11947. } else {
  11948. this.model = this.trueLabel || true;
  11949. }
  11950. },
  11951. handleChange: function handleChange(ev) {
  11952. var _this = this;
  11953. if (this.isLimitExceeded) return;
  11954. var value = void 0;
  11955. if (ev.target.checked) {
  11956. value = this.trueLabel === undefined ? true : this.trueLabel;
  11957. } else {
  11958. value = this.falseLabel === undefined ? false : this.falseLabel;
  11959. }
  11960. this.$emit('change', value, ev);
  11961. this.$nextTick(function () {
  11962. if (_this.isGroup) {
  11963. _this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
  11964. }
  11965. });
  11966. }
  11967. },
  11968. created: function created() {
  11969. this.checked && this.addToStore();
  11970. },
  11971. mounted: function mounted() {
  11972. // 为indeterminate元素 添加aria-controls 属性
  11973. if (this.indeterminate) {
  11974. this.$el.setAttribute('aria-controls', this.controls);
  11975. }
  11976. },
  11977. watch: {
  11978. value: function value(_value) {
  11979. this.dispatch('ElFormItem', 'el.form.change', _value);
  11980. }
  11981. }
  11982. });
  11983. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
  11984. /* harmony default export */ var src_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_);
  11985. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  11986. var componentNormalizer = __webpack_require__(0);
  11987. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
  11988. /* normalize component */
  11989. var component = Object(componentNormalizer["a" /* default */])(
  11990. src_checkboxvue_type_script_lang_js_,
  11991. render,
  11992. staticRenderFns,
  11993. false,
  11994. null,
  11995. null,
  11996. null
  11997. )
  11998. /* hot reload */
  11999. if (false) { var api; }
  12000. component.options.__file = "packages/checkbox/src/checkbox.vue"
  12001. /* harmony default export */ var src_checkbox = (component.exports);
  12002. // CONCATENATED MODULE: ./packages/checkbox/index.js
  12003. /* istanbul ignore next */
  12004. src_checkbox.install = function (Vue) {
  12005. Vue.component(src_checkbox.name, src_checkbox);
  12006. };
  12007. /* harmony default export */ var packages_checkbox = __webpack_exports__["default"] = (src_checkbox);
  12008. /***/ })
  12009. /******/ });
  12010. /***/ }),
  12011. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/element-ui.common.js":
  12012. /*!*****************************************************************************!*\
  12013. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/element-ui.common.js ***!
  12014. \*****************************************************************************/
  12015. /*! no static exports found */
  12016. /***/ (function(module, exports, __webpack_require__) {
  12017. module.exports =
  12018. /******/ (function(modules) { // webpackBootstrap
  12019. /******/ // The module cache
  12020. /******/ var installedModules = {};
  12021. /******/
  12022. /******/ // The require function
  12023. /******/ function __webpack_require__(moduleId) {
  12024. /******/
  12025. /******/ // Check if module is in cache
  12026. /******/ if(installedModules[moduleId]) {
  12027. /******/ return installedModules[moduleId].exports;
  12028. /******/ }
  12029. /******/ // Create a new module (and put it into the cache)
  12030. /******/ var module = installedModules[moduleId] = {
  12031. /******/ i: moduleId,
  12032. /******/ l: false,
  12033. /******/ exports: {}
  12034. /******/ };
  12035. /******/
  12036. /******/ // Execute the module function
  12037. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  12038. /******/
  12039. /******/ // Flag the module as loaded
  12040. /******/ module.l = true;
  12041. /******/
  12042. /******/ // Return the exports of the module
  12043. /******/ return module.exports;
  12044. /******/ }
  12045. /******/
  12046. /******/
  12047. /******/ // expose the modules object (__webpack_modules__)
  12048. /******/ __webpack_require__.m = modules;
  12049. /******/
  12050. /******/ // expose the module cache
  12051. /******/ __webpack_require__.c = installedModules;
  12052. /******/
  12053. /******/ // define getter function for harmony exports
  12054. /******/ __webpack_require__.d = function(exports, name, getter) {
  12055. /******/ if(!__webpack_require__.o(exports, name)) {
  12056. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  12057. /******/ }
  12058. /******/ };
  12059. /******/
  12060. /******/ // define __esModule on exports
  12061. /******/ __webpack_require__.r = function(exports) {
  12062. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  12063. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  12064. /******/ }
  12065. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  12066. /******/ };
  12067. /******/
  12068. /******/ // create a fake namespace object
  12069. /******/ // mode & 1: value is a module id, require it
  12070. /******/ // mode & 2: merge all properties of value into the ns
  12071. /******/ // mode & 4: return value when already ns object
  12072. /******/ // mode & 8|1: behave like require
  12073. /******/ __webpack_require__.t = function(value, mode) {
  12074. /******/ if(mode & 1) value = __webpack_require__(value);
  12075. /******/ if(mode & 8) return value;
  12076. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  12077. /******/ var ns = Object.create(null);
  12078. /******/ __webpack_require__.r(ns);
  12079. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  12080. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  12081. /******/ return ns;
  12082. /******/ };
  12083. /******/
  12084. /******/ // getDefaultExport function for compatibility with non-harmony modules
  12085. /******/ __webpack_require__.n = function(module) {
  12086. /******/ var getter = module && module.__esModule ?
  12087. /******/ function getDefault() { return module['default']; } :
  12088. /******/ function getModuleExports() { return module; };
  12089. /******/ __webpack_require__.d(getter, 'a', getter);
  12090. /******/ return getter;
  12091. /******/ };
  12092. /******/
  12093. /******/ // Object.prototype.hasOwnProperty.call
  12094. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  12095. /******/
  12096. /******/ // __webpack_public_path__
  12097. /******/ __webpack_require__.p = "/dist/";
  12098. /******/
  12099. /******/
  12100. /******/ // Load entry module and return exports
  12101. /******/ return __webpack_require__(__webpack_require__.s = 45);
  12102. /******/ })
  12103. /************************************************************************/
  12104. /******/ ([
  12105. /* 0 */
  12106. /***/ (function(module, exports) {
  12107. module.exports = __webpack_require__(/*! element-ui/lib/utils/date-util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/date-util.js");
  12108. /***/ }),
  12109. /* 1 */
  12110. /***/ (function(module, exports) {
  12111. module.exports = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  12112. /***/ }),
  12113. /* 2 */
  12114. /***/ (function(module, exports) {
  12115. module.exports = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  12116. /***/ }),
  12117. /* 3 */
  12118. /***/ (function(module, exports) {
  12119. module.exports = __webpack_require__(/*! element-ui/lib/mixins/emitter */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js");
  12120. /***/ }),
  12121. /* 4 */
  12122. /***/ (function(module, exports) {
  12123. module.exports = __webpack_require__(/*! element-ui/lib/mixins/locale */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/locale.js");
  12124. /***/ }),
  12125. /* 5 */
  12126. /***/ (function(module, exports) {
  12127. module.exports = __webpack_require__(/*! element-ui/lib/utils/vue-popper */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vue-popper.js");
  12128. /***/ }),
  12129. /* 6 */
  12130. /***/ (function(module, exports) {
  12131. module.exports = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  12132. /***/ }),
  12133. /* 7 */
  12134. /***/ (function(module, exports) {
  12135. module.exports = __webpack_require__(/*! element-ui/lib/utils/merge */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/merge.js");
  12136. /***/ }),
  12137. /* 8 */
  12138. /***/ (function(module, exports) {
  12139. module.exports = __webpack_require__(/*! element-ui/lib/input */ "./node_modules/_element-ui@2.15.8@element-ui/lib/input.js");
  12140. /***/ }),
  12141. /* 9 */
  12142. /***/ (function(module, exports) {
  12143. module.exports = __webpack_require__(/*! element-ui/lib/mixins/migrating */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/migrating.js");
  12144. /***/ }),
  12145. /* 10 */
  12146. /***/ (function(module, exports) {
  12147. module.exports = __webpack_require__(/*! element-ui/lib/utils/clickoutside */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/clickoutside.js");
  12148. /***/ }),
  12149. /* 11 */
  12150. /***/ (function(module, exports) {
  12151. module.exports = __webpack_require__(/*! element-ui/lib/utils/popup */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popup/index.js");
  12152. /***/ }),
  12153. /* 12 */
  12154. /***/ (function(module, exports) {
  12155. module.exports = __webpack_require__(/*! element-ui/lib/locale */ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/index.js");
  12156. /***/ }),
  12157. /* 13 */
  12158. /***/ (function(module, exports) {
  12159. module.exports = __webpack_require__(/*! element-ui/lib/button */ "./node_modules/_element-ui@2.15.8@element-ui/lib/button.js");
  12160. /***/ }),
  12161. /* 14 */
  12162. /***/ (function(module, exports) {
  12163. module.exports = __webpack_require__(/*! element-ui/lib/utils/resize-event */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/resize-event.js");
  12164. /***/ }),
  12165. /* 15 */
  12166. /***/ (function(module, exports) {
  12167. module.exports = __webpack_require__(/*! element-ui/lib/utils/types */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/types.js");
  12168. /***/ }),
  12169. /* 16 */
  12170. /***/ (function(module, exports) {
  12171. module.exports = __webpack_require__(/*! throttle-debounce/debounce */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/debounce.js");
  12172. /***/ }),
  12173. /* 17 */
  12174. /***/ (function(module, exports) {
  12175. module.exports = __webpack_require__(/*! element-ui/lib/checkbox */ "./node_modules/_element-ui@2.15.8@element-ui/lib/checkbox.js");
  12176. /***/ }),
  12177. /* 18 */
  12178. /***/ (function(module, exports) {
  12179. module.exports = __webpack_require__(/*! element-ui/lib/scrollbar */ "./node_modules/_element-ui@2.15.8@element-ui/lib/scrollbar.js");
  12180. /***/ }),
  12181. /* 19 */
  12182. /***/ (function(module, exports) {
  12183. module.exports = __webpack_require__(/*! element-ui/lib/utils/shared */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/shared.js");
  12184. /***/ }),
  12185. /* 20 */
  12186. /***/ (function(module, exports) {
  12187. module.exports = __webpack_require__(/*! element-ui/lib/utils/date */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/date.js");
  12188. /***/ }),
  12189. /* 21 */
  12190. /***/ (function(module, exports) {
  12191. module.exports = __webpack_require__(/*! element-ui/lib/transitions/collapse-transition */ "./node_modules/_element-ui@2.15.8@element-ui/lib/transitions/collapse-transition.js");
  12192. /***/ }),
  12193. /* 22 */
  12194. /***/ (function(module, exports) {
  12195. module.exports = __webpack_require__(/*! element-ui/lib/utils/vdom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vdom.js");
  12196. /***/ }),
  12197. /* 23 */
  12198. /***/ (function(module, exports) {
  12199. module.exports = __webpack_require__(/*! element-ui/lib/mixins/focus */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/focus.js");
  12200. /***/ }),
  12201. /* 24 */
  12202. /***/ (function(module, exports) {
  12203. module.exports = __webpack_require__(/*! babel-helper-vue-jsx-merge-props */ "./node_modules/_babel-helper-vue-jsx-merge-props@2.0.3@babel-helper-vue-jsx-merge-props/index.js");
  12204. /***/ }),
  12205. /* 25 */
  12206. /***/ (function(module, exports) {
  12207. module.exports = __webpack_require__(/*! throttle-debounce/throttle */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/throttle.js");
  12208. /***/ }),
  12209. /* 26 */
  12210. /***/ (function(module, exports) {
  12211. module.exports = __webpack_require__(/*! element-ui/lib/tooltip */ "./node_modules/_element-ui@2.15.8@element-ui/lib/tooltip.js");
  12212. /***/ }),
  12213. /* 27 */
  12214. /***/ (function(module, exports) {
  12215. module.exports = __webpack_require__(/*! element-ui/lib/utils/scroll-into-view */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scroll-into-view.js");
  12216. /***/ }),
  12217. /* 28 */
  12218. /***/ (function(module, exports) {
  12219. module.exports = __webpack_require__(/*! element-ui/lib/button-group */ "./node_modules/_element-ui@2.15.8@element-ui/lib/button-group.js");
  12220. /***/ }),
  12221. /* 29 */
  12222. /***/ (function(module, exports) {
  12223. module.exports = __webpack_require__(/*! element-ui/lib/tag */ "./node_modules/_element-ui@2.15.8@element-ui/lib/tag.js");
  12224. /***/ }),
  12225. /* 30 */
  12226. /***/ (function(module, exports) {
  12227. module.exports = __webpack_require__(/*! element-ui/lib/utils/scrollbar-width */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scrollbar-width.js");
  12228. /***/ }),
  12229. /* 31 */
  12230. /***/ (function(module, exports) {
  12231. module.exports = __webpack_require__(/*! element-ui/lib/checkbox-group */ "./node_modules/_element-ui@2.15.8@element-ui/lib/checkbox-group.js");
  12232. /***/ }),
  12233. /* 32 */
  12234. /***/ (function(module, exports) {
  12235. module.exports = __webpack_require__(/*! element-ui/lib/utils/after-leave */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/after-leave.js");
  12236. /***/ }),
  12237. /* 33 */
  12238. /***/ (function(module, exports) {
  12239. module.exports = __webpack_require__(/*! element-ui/lib/progress */ "./node_modules/_element-ui@2.15.8@element-ui/lib/progress.js");
  12240. /***/ }),
  12241. /* 34 */
  12242. /***/ (function(module, exports) {
  12243. module.exports = __webpack_require__(/*! element-ui/lib/utils/aria-utils */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-utils.js");
  12244. /***/ }),
  12245. /* 35 */
  12246. /***/ (function(module, exports) {
  12247. module.exports = __webpack_require__(/*! throttle-debounce */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/index.js");
  12248. /***/ }),
  12249. /* 36 */
  12250. /***/ (function(module, exports) {
  12251. module.exports = __webpack_require__(/*! element-ui/lib/select */ "./node_modules/_element-ui@2.15.8@element-ui/lib/select.js");
  12252. /***/ }),
  12253. /* 37 */
  12254. /***/ (function(module, exports) {
  12255. module.exports = __webpack_require__(/*! element-ui/lib/option */ "./node_modules/_element-ui@2.15.8@element-ui/lib/option.js");
  12256. /***/ }),
  12257. /* 38 */
  12258. /***/ (function(module, exports) {
  12259. module.exports = __webpack_require__(/*! normalize-wheel */ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/index.js");
  12260. /***/ }),
  12261. /* 39 */
  12262. /***/ (function(module, exports) {
  12263. module.exports = __webpack_require__(/*! element-ui/lib/utils/aria-dialog */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-dialog.js");
  12264. /***/ }),
  12265. /* 40 */
  12266. /***/ (function(module, exports) {
  12267. module.exports = __webpack_require__(/*! async-validator */ "./node_modules/_async-validator@1.8.5@async-validator/es/index.js");
  12268. /***/ }),
  12269. /* 41 */
  12270. /***/ (function(module, exports) {
  12271. module.exports = __webpack_require__(/*! element-ui/lib/input-number */ "./node_modules/_element-ui@2.15.8@element-ui/lib/input-number.js");
  12272. /***/ }),
  12273. /* 42 */
  12274. /***/ (function(module, exports) {
  12275. module.exports = __webpack_require__(/*! element-ui/lib/cascader-panel */ "./node_modules/_element-ui@2.15.8@element-ui/lib/cascader-panel.js");
  12276. /***/ }),
  12277. /* 43 */
  12278. /***/ (function(module, exports) {
  12279. module.exports = __webpack_require__(/*! element-ui/lib/radio */ "./node_modules/_element-ui@2.15.8@element-ui/lib/radio.js");
  12280. /***/ }),
  12281. /* 44 */
  12282. /***/ (function(module, exports) {
  12283. module.exports = __webpack_require__(/*! element-ui/lib/popover */ "./node_modules/_element-ui@2.15.8@element-ui/lib/popover.js");
  12284. /***/ }),
  12285. /* 45 */
  12286. /***/ (function(module, exports, __webpack_require__) {
  12287. module.exports = __webpack_require__(46);
  12288. /***/ }),
  12289. /* 46 */
  12290. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  12291. "use strict";
  12292. __webpack_require__.r(__webpack_exports__);
  12293. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/pagination/src/pager.vue?vue&type=template&id=7274f267&
  12294. var pagervue_type_template_id_7274f267_render = function() {
  12295. var _vm = this
  12296. var _h = _vm.$createElement
  12297. var _c = _vm._self._c || _h
  12298. return _c(
  12299. "ul",
  12300. { staticClass: "el-pager", on: { click: _vm.onPagerClick } },
  12301. [
  12302. _vm.pageCount > 0
  12303. ? _c(
  12304. "li",
  12305. {
  12306. staticClass: "number",
  12307. class: { active: _vm.currentPage === 1, disabled: _vm.disabled }
  12308. },
  12309. [_vm._v("1")]
  12310. )
  12311. : _vm._e(),
  12312. _vm.showPrevMore
  12313. ? _c("li", {
  12314. staticClass: "el-icon more btn-quickprev",
  12315. class: [_vm.quickprevIconClass, { disabled: _vm.disabled }],
  12316. on: {
  12317. mouseenter: function($event) {
  12318. _vm.onMouseenter("left")
  12319. },
  12320. mouseleave: function($event) {
  12321. _vm.quickprevIconClass = "el-icon-more"
  12322. }
  12323. }
  12324. })
  12325. : _vm._e(),
  12326. _vm._l(_vm.pagers, function(pager) {
  12327. return _c(
  12328. "li",
  12329. {
  12330. key: pager,
  12331. staticClass: "number",
  12332. class: { active: _vm.currentPage === pager, disabled: _vm.disabled }
  12333. },
  12334. [_vm._v(_vm._s(pager))]
  12335. )
  12336. }),
  12337. _vm.showNextMore
  12338. ? _c("li", {
  12339. staticClass: "el-icon more btn-quicknext",
  12340. class: [_vm.quicknextIconClass, { disabled: _vm.disabled }],
  12341. on: {
  12342. mouseenter: function($event) {
  12343. _vm.onMouseenter("right")
  12344. },
  12345. mouseleave: function($event) {
  12346. _vm.quicknextIconClass = "el-icon-more"
  12347. }
  12348. }
  12349. })
  12350. : _vm._e(),
  12351. _vm.pageCount > 1
  12352. ? _c(
  12353. "li",
  12354. {
  12355. staticClass: "number",
  12356. class: {
  12357. active: _vm.currentPage === _vm.pageCount,
  12358. disabled: _vm.disabled
  12359. }
  12360. },
  12361. [_vm._v(_vm._s(_vm.pageCount))]
  12362. )
  12363. : _vm._e()
  12364. ],
  12365. 2
  12366. )
  12367. }
  12368. var staticRenderFns = []
  12369. pagervue_type_template_id_7274f267_render._withStripped = true
  12370. // CONCATENATED MODULE: ./packages/pagination/src/pager.vue?vue&type=template&id=7274f267&
  12371. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/pagination/src/pager.vue?vue&type=script&lang=js&
  12372. //
  12373. //
  12374. //
  12375. //
  12376. //
  12377. //
  12378. //
  12379. //
  12380. //
  12381. //
  12382. //
  12383. //
  12384. //
  12385. //
  12386. //
  12387. //
  12388. //
  12389. //
  12390. //
  12391. //
  12392. //
  12393. //
  12394. //
  12395. //
  12396. //
  12397. //
  12398. //
  12399. //
  12400. //
  12401. //
  12402. //
  12403. //
  12404. /* harmony default export */ var pagervue_type_script_lang_js_ = ({
  12405. name: 'ElPager',
  12406. props: {
  12407. currentPage: Number,
  12408. pageCount: Number,
  12409. pagerCount: Number,
  12410. disabled: Boolean
  12411. },
  12412. watch: {
  12413. showPrevMore: function showPrevMore(val) {
  12414. if (!val) this.quickprevIconClass = 'el-icon-more';
  12415. },
  12416. showNextMore: function showNextMore(val) {
  12417. if (!val) this.quicknextIconClass = 'el-icon-more';
  12418. }
  12419. },
  12420. methods: {
  12421. onPagerClick: function onPagerClick(event) {
  12422. var target = event.target;
  12423. if (target.tagName === 'UL' || this.disabled) {
  12424. return;
  12425. }
  12426. var newPage = Number(event.target.textContent);
  12427. var pageCount = this.pageCount;
  12428. var currentPage = this.currentPage;
  12429. var pagerCountOffset = this.pagerCount - 2;
  12430. if (target.className.indexOf('more') !== -1) {
  12431. if (target.className.indexOf('quickprev') !== -1) {
  12432. newPage = currentPage - pagerCountOffset;
  12433. } else if (target.className.indexOf('quicknext') !== -1) {
  12434. newPage = currentPage + pagerCountOffset;
  12435. }
  12436. }
  12437. /* istanbul ignore if */
  12438. if (!isNaN(newPage)) {
  12439. if (newPage < 1) {
  12440. newPage = 1;
  12441. }
  12442. if (newPage > pageCount) {
  12443. newPage = pageCount;
  12444. }
  12445. }
  12446. if (newPage !== currentPage) {
  12447. this.$emit('change', newPage);
  12448. }
  12449. },
  12450. onMouseenter: function onMouseenter(direction) {
  12451. if (this.disabled) return;
  12452. if (direction === 'left') {
  12453. this.quickprevIconClass = 'el-icon-d-arrow-left';
  12454. } else {
  12455. this.quicknextIconClass = 'el-icon-d-arrow-right';
  12456. }
  12457. }
  12458. },
  12459. computed: {
  12460. pagers: function pagers() {
  12461. var pagerCount = this.pagerCount;
  12462. var halfPagerCount = (pagerCount - 1) / 2;
  12463. var currentPage = Number(this.currentPage);
  12464. var pageCount = Number(this.pageCount);
  12465. var showPrevMore = false;
  12466. var showNextMore = false;
  12467. if (pageCount > pagerCount) {
  12468. if (currentPage > pagerCount - halfPagerCount) {
  12469. showPrevMore = true;
  12470. }
  12471. if (currentPage < pageCount - halfPagerCount) {
  12472. showNextMore = true;
  12473. }
  12474. }
  12475. var array = [];
  12476. if (showPrevMore && !showNextMore) {
  12477. var startPage = pageCount - (pagerCount - 2);
  12478. for (var i = startPage; i < pageCount; i++) {
  12479. array.push(i);
  12480. }
  12481. } else if (!showPrevMore && showNextMore) {
  12482. for (var _i = 2; _i < pagerCount; _i++) {
  12483. array.push(_i);
  12484. }
  12485. } else if (showPrevMore && showNextMore) {
  12486. var offset = Math.floor(pagerCount / 2) - 1;
  12487. for (var _i2 = currentPage - offset; _i2 <= currentPage + offset; _i2++) {
  12488. array.push(_i2);
  12489. }
  12490. } else {
  12491. for (var _i3 = 2; _i3 < pageCount; _i3++) {
  12492. array.push(_i3);
  12493. }
  12494. }
  12495. this.showPrevMore = showPrevMore;
  12496. this.showNextMore = showNextMore;
  12497. return array;
  12498. }
  12499. },
  12500. data: function data() {
  12501. return {
  12502. current: null,
  12503. showPrevMore: false,
  12504. showNextMore: false,
  12505. quicknextIconClass: 'el-icon-more',
  12506. quickprevIconClass: 'el-icon-more'
  12507. };
  12508. }
  12509. });
  12510. // CONCATENATED MODULE: ./packages/pagination/src/pager.vue?vue&type=script&lang=js&
  12511. /* harmony default export */ var src_pagervue_type_script_lang_js_ = (pagervue_type_script_lang_js_);
  12512. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  12513. /* globals __VUE_SSR_CONTEXT__ */
  12514. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  12515. // This module is a runtime utility for cleaner component module output and will
  12516. // be included in the final webpack user bundle.
  12517. function normalizeComponent (
  12518. scriptExports,
  12519. render,
  12520. staticRenderFns,
  12521. functionalTemplate,
  12522. injectStyles,
  12523. scopeId,
  12524. moduleIdentifier, /* server only */
  12525. shadowMode /* vue-cli only */
  12526. ) {
  12527. // Vue.extend constructor export interop
  12528. var options = typeof scriptExports === 'function'
  12529. ? scriptExports.options
  12530. : scriptExports
  12531. // render functions
  12532. if (render) {
  12533. options.render = render
  12534. options.staticRenderFns = staticRenderFns
  12535. options._compiled = true
  12536. }
  12537. // functional template
  12538. if (functionalTemplate) {
  12539. options.functional = true
  12540. }
  12541. // scopedId
  12542. if (scopeId) {
  12543. options._scopeId = 'data-v-' + scopeId
  12544. }
  12545. var hook
  12546. if (moduleIdentifier) { // server build
  12547. hook = function (context) {
  12548. // 2.3 injection
  12549. context =
  12550. context || // cached call
  12551. (this.$vnode && this.$vnode.ssrContext) || // stateful
  12552. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  12553. // 2.2 with runInNewContext: true
  12554. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  12555. context = __VUE_SSR_CONTEXT__
  12556. }
  12557. // inject component styles
  12558. if (injectStyles) {
  12559. injectStyles.call(this, context)
  12560. }
  12561. // register component module identifier for async chunk inferrence
  12562. if (context && context._registeredComponents) {
  12563. context._registeredComponents.add(moduleIdentifier)
  12564. }
  12565. }
  12566. // used by ssr in case component is cached and beforeCreate
  12567. // never gets called
  12568. options._ssrRegister = hook
  12569. } else if (injectStyles) {
  12570. hook = shadowMode
  12571. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  12572. : injectStyles
  12573. }
  12574. if (hook) {
  12575. if (options.functional) {
  12576. // for template-only hot-reload because in that case the render fn doesn't
  12577. // go through the normalizer
  12578. options._injectStyles = hook
  12579. // register for functioal component in vue file
  12580. var originalRender = options.render
  12581. options.render = function renderWithStyleInjection (h, context) {
  12582. hook.call(context)
  12583. return originalRender(h, context)
  12584. }
  12585. } else {
  12586. // inject component registration as beforeCreate hook
  12587. var existing = options.beforeCreate
  12588. options.beforeCreate = existing
  12589. ? [].concat(existing, hook)
  12590. : [hook]
  12591. }
  12592. }
  12593. return {
  12594. exports: scriptExports,
  12595. options: options
  12596. }
  12597. }
  12598. // CONCATENATED MODULE: ./packages/pagination/src/pager.vue
  12599. /* normalize component */
  12600. var component = normalizeComponent(
  12601. src_pagervue_type_script_lang_js_,
  12602. pagervue_type_template_id_7274f267_render,
  12603. staticRenderFns,
  12604. false,
  12605. null,
  12606. null,
  12607. null
  12608. )
  12609. /* hot reload */
  12610. if (false) { var api; }
  12611. component.options.__file = "packages/pagination/src/pager.vue"
  12612. /* harmony default export */ var pager = (component.exports);
  12613. // EXTERNAL MODULE: external "element-ui/lib/select"
  12614. var select_ = __webpack_require__(36);
  12615. var select_default = /*#__PURE__*/__webpack_require__.n(select_);
  12616. // EXTERNAL MODULE: external "element-ui/lib/option"
  12617. var option_ = __webpack_require__(37);
  12618. var option_default = /*#__PURE__*/__webpack_require__.n(option_);
  12619. // EXTERNAL MODULE: external "element-ui/lib/input"
  12620. var input_ = __webpack_require__(8);
  12621. var input_default = /*#__PURE__*/__webpack_require__.n(input_);
  12622. // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
  12623. var locale_ = __webpack_require__(4);
  12624. var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
  12625. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  12626. var util_ = __webpack_require__(2);
  12627. // CONCATENATED MODULE: ./packages/pagination/src/pagination.js
  12628. /* harmony default export */ var pagination = ({
  12629. name: 'ElPagination',
  12630. props: {
  12631. pageSize: {
  12632. type: Number,
  12633. default: 10
  12634. },
  12635. small: Boolean,
  12636. total: Number,
  12637. pageCount: Number,
  12638. pagerCount: {
  12639. type: Number,
  12640. validator: function validator(value) {
  12641. return (value | 0) === value && value > 4 && value < 22 && value % 2 === 1;
  12642. },
  12643. default: 7
  12644. },
  12645. currentPage: {
  12646. type: Number,
  12647. default: 1
  12648. },
  12649. layout: {
  12650. default: 'prev, pager, next, jumper, ->, total'
  12651. },
  12652. pageSizes: {
  12653. type: Array,
  12654. default: function _default() {
  12655. return [10, 20, 30, 40, 50, 100];
  12656. }
  12657. },
  12658. popperClass: String,
  12659. prevText: String,
  12660. nextText: String,
  12661. background: Boolean,
  12662. disabled: Boolean,
  12663. hideOnSinglePage: Boolean
  12664. },
  12665. data: function data() {
  12666. return {
  12667. internalCurrentPage: 1,
  12668. internalPageSize: 0,
  12669. lastEmittedPage: -1,
  12670. userChangePageSize: false
  12671. };
  12672. },
  12673. render: function render(h) {
  12674. var layout = this.layout;
  12675. if (!layout) return null;
  12676. if (this.hideOnSinglePage && (!this.internalPageCount || this.internalPageCount === 1)) return null;
  12677. var template = h('div', { 'class': ['el-pagination', {
  12678. 'is-background': this.background,
  12679. 'el-pagination--small': this.small
  12680. }] });
  12681. var TEMPLATE_MAP = {
  12682. prev: h('prev'),
  12683. jumper: h('jumper'),
  12684. pager: h('pager', {
  12685. attrs: { currentPage: this.internalCurrentPage, pageCount: this.internalPageCount, pagerCount: this.pagerCount, disabled: this.disabled },
  12686. on: {
  12687. 'change': this.handleCurrentChange
  12688. }
  12689. }),
  12690. next: h('next'),
  12691. sizes: h('sizes', {
  12692. attrs: { pageSizes: this.pageSizes }
  12693. }),
  12694. slot: h('slot', [this.$slots.default ? this.$slots.default : '']),
  12695. total: h('total')
  12696. };
  12697. var components = layout.split(',').map(function (item) {
  12698. return item.trim();
  12699. });
  12700. var rightWrapper = h('div', { 'class': 'el-pagination__rightwrapper' });
  12701. var haveRightWrapper = false;
  12702. template.children = template.children || [];
  12703. rightWrapper.children = rightWrapper.children || [];
  12704. components.forEach(function (compo) {
  12705. if (compo === '->') {
  12706. haveRightWrapper = true;
  12707. return;
  12708. }
  12709. if (!haveRightWrapper) {
  12710. template.children.push(TEMPLATE_MAP[compo]);
  12711. } else {
  12712. rightWrapper.children.push(TEMPLATE_MAP[compo]);
  12713. }
  12714. });
  12715. if (haveRightWrapper) {
  12716. template.children.unshift(rightWrapper);
  12717. }
  12718. return template;
  12719. },
  12720. components: {
  12721. Prev: {
  12722. render: function render(h) {
  12723. return h(
  12724. 'button',
  12725. {
  12726. attrs: {
  12727. type: 'button',
  12728. disabled: this.$parent.disabled || this.$parent.internalCurrentPage <= 1
  12729. },
  12730. 'class': 'btn-prev', on: {
  12731. 'click': this.$parent.prev
  12732. }
  12733. },
  12734. [this.$parent.prevText ? h('span', [this.$parent.prevText]) : h('i', { 'class': 'el-icon el-icon-arrow-left' })]
  12735. );
  12736. }
  12737. },
  12738. Next: {
  12739. render: function render(h) {
  12740. return h(
  12741. 'button',
  12742. {
  12743. attrs: {
  12744. type: 'button',
  12745. disabled: this.$parent.disabled || this.$parent.internalCurrentPage === this.$parent.internalPageCount || this.$parent.internalPageCount === 0
  12746. },
  12747. 'class': 'btn-next', on: {
  12748. 'click': this.$parent.next
  12749. }
  12750. },
  12751. [this.$parent.nextText ? h('span', [this.$parent.nextText]) : h('i', { 'class': 'el-icon el-icon-arrow-right' })]
  12752. );
  12753. }
  12754. },
  12755. Sizes: {
  12756. mixins: [locale_default.a],
  12757. props: {
  12758. pageSizes: Array
  12759. },
  12760. watch: {
  12761. pageSizes: {
  12762. immediate: true,
  12763. handler: function handler(newVal, oldVal) {
  12764. if (Object(util_["valueEquals"])(newVal, oldVal)) return;
  12765. if (Array.isArray(newVal)) {
  12766. this.$parent.internalPageSize = newVal.indexOf(this.$parent.pageSize) > -1 ? this.$parent.pageSize : this.pageSizes[0];
  12767. }
  12768. }
  12769. }
  12770. },
  12771. render: function render(h) {
  12772. var _this = this;
  12773. return h(
  12774. 'span',
  12775. { 'class': 'el-pagination__sizes' },
  12776. [h(
  12777. 'el-select',
  12778. {
  12779. attrs: {
  12780. value: this.$parent.internalPageSize,
  12781. popperClass: this.$parent.popperClass || '',
  12782. size: 'mini',
  12783. disabled: this.$parent.disabled },
  12784. on: {
  12785. 'input': this.handleChange
  12786. }
  12787. },
  12788. [this.pageSizes.map(function (item) {
  12789. return h('el-option', {
  12790. attrs: {
  12791. value: item,
  12792. label: item + _this.t('el.pagination.pagesize') }
  12793. });
  12794. })]
  12795. )]
  12796. );
  12797. },
  12798. components: {
  12799. ElSelect: select_default.a,
  12800. ElOption: option_default.a
  12801. },
  12802. methods: {
  12803. handleChange: function handleChange(val) {
  12804. if (val !== this.$parent.internalPageSize) {
  12805. this.$parent.internalPageSize = val = parseInt(val, 10);
  12806. this.$parent.userChangePageSize = true;
  12807. this.$parent.$emit('update:pageSize', val);
  12808. this.$parent.$emit('size-change', val);
  12809. }
  12810. }
  12811. }
  12812. },
  12813. Jumper: {
  12814. mixins: [locale_default.a],
  12815. components: { ElInput: input_default.a },
  12816. data: function data() {
  12817. return {
  12818. userInput: null
  12819. };
  12820. },
  12821. watch: {
  12822. '$parent.internalCurrentPage': function $parentInternalCurrentPage() {
  12823. this.userInput = null;
  12824. }
  12825. },
  12826. methods: {
  12827. handleKeyup: function handleKeyup(_ref) {
  12828. var keyCode = _ref.keyCode,
  12829. target = _ref.target;
  12830. // Chrome, Safari, Firefox triggers change event on Enter
  12831. // Hack for IE: https://github.com/ElemeFE/element/issues/11710
  12832. // Drop this method when we no longer supports IE
  12833. if (keyCode === 13) {
  12834. this.handleChange(target.value);
  12835. }
  12836. },
  12837. handleInput: function handleInput(value) {
  12838. this.userInput = value;
  12839. },
  12840. handleChange: function handleChange(value) {
  12841. this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(value);
  12842. this.$parent.emitChange();
  12843. this.userInput = null;
  12844. }
  12845. },
  12846. render: function render(h) {
  12847. return h(
  12848. 'span',
  12849. { 'class': 'el-pagination__jump' },
  12850. [this.t('el.pagination.goto'), h('el-input', {
  12851. 'class': 'el-pagination__editor is-in-pagination',
  12852. attrs: { min: 1,
  12853. max: this.$parent.internalPageCount,
  12854. value: this.userInput !== null ? this.userInput : this.$parent.internalCurrentPage,
  12855. type: 'number',
  12856. disabled: this.$parent.disabled
  12857. },
  12858. nativeOn: {
  12859. 'keyup': this.handleKeyup
  12860. },
  12861. on: {
  12862. 'input': this.handleInput,
  12863. 'change': this.handleChange
  12864. }
  12865. }), this.t('el.pagination.pageClassifier')]
  12866. );
  12867. }
  12868. },
  12869. Total: {
  12870. mixins: [locale_default.a],
  12871. render: function render(h) {
  12872. return typeof this.$parent.total === 'number' ? h(
  12873. 'span',
  12874. { 'class': 'el-pagination__total' },
  12875. [this.t('el.pagination.total', { total: this.$parent.total })]
  12876. ) : '';
  12877. }
  12878. },
  12879. Pager: pager
  12880. },
  12881. methods: {
  12882. handleCurrentChange: function handleCurrentChange(val) {
  12883. this.internalCurrentPage = this.getValidCurrentPage(val);
  12884. this.userChangePageSize = true;
  12885. this.emitChange();
  12886. },
  12887. prev: function prev() {
  12888. if (this.disabled) return;
  12889. var newVal = this.internalCurrentPage - 1;
  12890. this.internalCurrentPage = this.getValidCurrentPage(newVal);
  12891. this.$emit('prev-click', this.internalCurrentPage);
  12892. this.emitChange();
  12893. },
  12894. next: function next() {
  12895. if (this.disabled) return;
  12896. var newVal = this.internalCurrentPage + 1;
  12897. this.internalCurrentPage = this.getValidCurrentPage(newVal);
  12898. this.$emit('next-click', this.internalCurrentPage);
  12899. this.emitChange();
  12900. },
  12901. getValidCurrentPage: function getValidCurrentPage(value) {
  12902. value = parseInt(value, 10);
  12903. var havePageCount = typeof this.internalPageCount === 'number';
  12904. var resetValue = void 0;
  12905. if (!havePageCount) {
  12906. if (isNaN(value) || value < 1) resetValue = 1;
  12907. } else {
  12908. if (value < 1) {
  12909. resetValue = 1;
  12910. } else if (value > this.internalPageCount) {
  12911. resetValue = this.internalPageCount;
  12912. }
  12913. }
  12914. if (resetValue === undefined && isNaN(value)) {
  12915. resetValue = 1;
  12916. } else if (resetValue === 0) {
  12917. resetValue = 1;
  12918. }
  12919. return resetValue === undefined ? value : resetValue;
  12920. },
  12921. emitChange: function emitChange() {
  12922. var _this2 = this;
  12923. this.$nextTick(function () {
  12924. if (_this2.internalCurrentPage !== _this2.lastEmittedPage || _this2.userChangePageSize) {
  12925. _this2.$emit('current-change', _this2.internalCurrentPage);
  12926. _this2.lastEmittedPage = _this2.internalCurrentPage;
  12927. _this2.userChangePageSize = false;
  12928. }
  12929. });
  12930. }
  12931. },
  12932. computed: {
  12933. internalPageCount: function internalPageCount() {
  12934. if (typeof this.total === 'number') {
  12935. return Math.max(1, Math.ceil(this.total / this.internalPageSize));
  12936. } else if (typeof this.pageCount === 'number') {
  12937. return Math.max(1, this.pageCount);
  12938. }
  12939. return null;
  12940. }
  12941. },
  12942. watch: {
  12943. currentPage: {
  12944. immediate: true,
  12945. handler: function handler(val) {
  12946. this.internalCurrentPage = this.getValidCurrentPage(val);
  12947. }
  12948. },
  12949. pageSize: {
  12950. immediate: true,
  12951. handler: function handler(val) {
  12952. this.internalPageSize = isNaN(val) ? 10 : val;
  12953. }
  12954. },
  12955. internalCurrentPage: {
  12956. immediate: true,
  12957. handler: function handler(newVal) {
  12958. this.$emit('update:currentPage', newVal);
  12959. this.lastEmittedPage = -1;
  12960. }
  12961. },
  12962. internalPageCount: function internalPageCount(newVal) {
  12963. /* istanbul ignore if */
  12964. var oldPage = this.internalCurrentPage;
  12965. if (newVal > 0 && oldPage === 0) {
  12966. this.internalCurrentPage = 1;
  12967. } else if (oldPage > newVal) {
  12968. this.internalCurrentPage = newVal === 0 ? 1 : newVal;
  12969. this.userChangePageSize && this.emitChange();
  12970. }
  12971. this.userChangePageSize = false;
  12972. }
  12973. }
  12974. });
  12975. // CONCATENATED MODULE: ./packages/pagination/index.js
  12976. /* istanbul ignore next */
  12977. pagination.install = function (Vue) {
  12978. Vue.component(pagination.name, pagination);
  12979. };
  12980. /* harmony default export */ var packages_pagination = (pagination);
  12981. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=template&id=60140e62&
  12982. var componentvue_type_template_id_60140e62_render = function() {
  12983. var _vm = this
  12984. var _h = _vm.$createElement
  12985. var _c = _vm._self._c || _h
  12986. return _c(
  12987. "transition",
  12988. {
  12989. attrs: { name: "dialog-fade" },
  12990. on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave }
  12991. },
  12992. [
  12993. _c(
  12994. "div",
  12995. {
  12996. directives: [
  12997. {
  12998. name: "show",
  12999. rawName: "v-show",
  13000. value: _vm.visible,
  13001. expression: "visible"
  13002. }
  13003. ],
  13004. staticClass: "el-dialog__wrapper",
  13005. on: {
  13006. click: function($event) {
  13007. if ($event.target !== $event.currentTarget) {
  13008. return null
  13009. }
  13010. return _vm.handleWrapperClick($event)
  13011. }
  13012. }
  13013. },
  13014. [
  13015. _c(
  13016. "div",
  13017. {
  13018. key: _vm.key,
  13019. ref: "dialog",
  13020. class: [
  13021. "el-dialog",
  13022. {
  13023. "is-fullscreen": _vm.fullscreen,
  13024. "el-dialog--center": _vm.center
  13025. },
  13026. _vm.customClass
  13027. ],
  13028. style: _vm.style,
  13029. attrs: {
  13030. role: "dialog",
  13031. "aria-modal": "true",
  13032. "aria-label": _vm.title || "dialog"
  13033. }
  13034. },
  13035. [
  13036. _c(
  13037. "div",
  13038. { staticClass: "el-dialog__header" },
  13039. [
  13040. _vm._t("title", [
  13041. _c("span", { staticClass: "el-dialog__title" }, [
  13042. _vm._v(_vm._s(_vm.title))
  13043. ])
  13044. ]),
  13045. _vm.showClose
  13046. ? _c(
  13047. "button",
  13048. {
  13049. staticClass: "el-dialog__headerbtn",
  13050. attrs: { type: "button", "aria-label": "Close" },
  13051. on: { click: _vm.handleClose }
  13052. },
  13053. [
  13054. _c("i", {
  13055. staticClass:
  13056. "el-dialog__close el-icon el-icon-close"
  13057. })
  13058. ]
  13059. )
  13060. : _vm._e()
  13061. ],
  13062. 2
  13063. ),
  13064. _vm.rendered
  13065. ? _c(
  13066. "div",
  13067. { staticClass: "el-dialog__body" },
  13068. [_vm._t("default")],
  13069. 2
  13070. )
  13071. : _vm._e(),
  13072. _vm.$slots.footer
  13073. ? _c(
  13074. "div",
  13075. { staticClass: "el-dialog__footer" },
  13076. [_vm._t("footer")],
  13077. 2
  13078. )
  13079. : _vm._e()
  13080. ]
  13081. )
  13082. ]
  13083. )
  13084. ]
  13085. )
  13086. }
  13087. var componentvue_type_template_id_60140e62_staticRenderFns = []
  13088. componentvue_type_template_id_60140e62_render._withStripped = true
  13089. // CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=template&id=60140e62&
  13090. // EXTERNAL MODULE: external "element-ui/lib/utils/popup"
  13091. var popup_ = __webpack_require__(11);
  13092. var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
  13093. // EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
  13094. var migrating_ = __webpack_require__(9);
  13095. var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
  13096. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  13097. var emitter_ = __webpack_require__(3);
  13098. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  13099. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=script&lang=js&
  13100. //
  13101. //
  13102. //
  13103. //
  13104. //
  13105. //
  13106. //
  13107. //
  13108. //
  13109. //
  13110. //
  13111. //
  13112. //
  13113. //
  13114. //
  13115. //
  13116. //
  13117. //
  13118. //
  13119. //
  13120. //
  13121. //
  13122. //
  13123. //
  13124. //
  13125. //
  13126. //
  13127. //
  13128. //
  13129. //
  13130. //
  13131. //
  13132. //
  13133. //
  13134. //
  13135. //
  13136. //
  13137. //
  13138. //
  13139. /* harmony default export */ var componentvue_type_script_lang_js_ = ({
  13140. name: 'ElDialog',
  13141. mixins: [popup_default.a, emitter_default.a, migrating_default.a],
  13142. props: {
  13143. title: {
  13144. type: String,
  13145. default: ''
  13146. },
  13147. modal: {
  13148. type: Boolean,
  13149. default: true
  13150. },
  13151. modalAppendToBody: {
  13152. type: Boolean,
  13153. default: true
  13154. },
  13155. appendToBody: {
  13156. type: Boolean,
  13157. default: false
  13158. },
  13159. lockScroll: {
  13160. type: Boolean,
  13161. default: true
  13162. },
  13163. closeOnClickModal: {
  13164. type: Boolean,
  13165. default: true
  13166. },
  13167. closeOnPressEscape: {
  13168. type: Boolean,
  13169. default: true
  13170. },
  13171. showClose: {
  13172. type: Boolean,
  13173. default: true
  13174. },
  13175. width: String,
  13176. fullscreen: Boolean,
  13177. customClass: {
  13178. type: String,
  13179. default: ''
  13180. },
  13181. top: {
  13182. type: String,
  13183. default: '15vh'
  13184. },
  13185. beforeClose: Function,
  13186. center: {
  13187. type: Boolean,
  13188. default: false
  13189. },
  13190. destroyOnClose: Boolean
  13191. },
  13192. data: function data() {
  13193. return {
  13194. closed: false,
  13195. key: 0
  13196. };
  13197. },
  13198. watch: {
  13199. visible: function visible(val) {
  13200. var _this = this;
  13201. if (val) {
  13202. this.closed = false;
  13203. this.$emit('open');
  13204. this.$el.addEventListener('scroll', this.updatePopper);
  13205. this.$nextTick(function () {
  13206. _this.$refs.dialog.scrollTop = 0;
  13207. });
  13208. if (this.appendToBody) {
  13209. document.body.appendChild(this.$el);
  13210. }
  13211. } else {
  13212. this.$el.removeEventListener('scroll', this.updatePopper);
  13213. if (!this.closed) this.$emit('close');
  13214. if (this.destroyOnClose) {
  13215. this.$nextTick(function () {
  13216. _this.key++;
  13217. });
  13218. }
  13219. }
  13220. }
  13221. },
  13222. computed: {
  13223. style: function style() {
  13224. var style = {};
  13225. if (!this.fullscreen) {
  13226. style.marginTop = this.top;
  13227. if (this.width) {
  13228. style.width = this.width;
  13229. }
  13230. }
  13231. return style;
  13232. }
  13233. },
  13234. methods: {
  13235. getMigratingConfig: function getMigratingConfig() {
  13236. return {
  13237. props: {
  13238. 'size': 'size is removed.'
  13239. }
  13240. };
  13241. },
  13242. handleWrapperClick: function handleWrapperClick() {
  13243. if (!this.closeOnClickModal) return;
  13244. this.handleClose();
  13245. },
  13246. handleClose: function handleClose() {
  13247. if (typeof this.beforeClose === 'function') {
  13248. this.beforeClose(this.hide);
  13249. } else {
  13250. this.hide();
  13251. }
  13252. },
  13253. hide: function hide(cancel) {
  13254. if (cancel !== false) {
  13255. this.$emit('update:visible', false);
  13256. this.$emit('close');
  13257. this.closed = true;
  13258. }
  13259. },
  13260. updatePopper: function updatePopper() {
  13261. this.broadcast('ElSelectDropdown', 'updatePopper');
  13262. this.broadcast('ElDropdownMenu', 'updatePopper');
  13263. },
  13264. afterEnter: function afterEnter() {
  13265. this.$emit('opened');
  13266. },
  13267. afterLeave: function afterLeave() {
  13268. this.$emit('closed');
  13269. }
  13270. },
  13271. mounted: function mounted() {
  13272. if (this.visible) {
  13273. this.rendered = true;
  13274. this.open();
  13275. if (this.appendToBody) {
  13276. document.body.appendChild(this.$el);
  13277. }
  13278. }
  13279. },
  13280. destroyed: function destroyed() {
  13281. // if appendToBody is true, remove DOM node after destroy
  13282. if (this.appendToBody && this.$el && this.$el.parentNode) {
  13283. this.$el.parentNode.removeChild(this.$el);
  13284. }
  13285. }
  13286. });
  13287. // CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=script&lang=js&
  13288. /* harmony default export */ var src_componentvue_type_script_lang_js_ = (componentvue_type_script_lang_js_);
  13289. // CONCATENATED MODULE: ./packages/dialog/src/component.vue
  13290. /* normalize component */
  13291. var component_component = normalizeComponent(
  13292. src_componentvue_type_script_lang_js_,
  13293. componentvue_type_template_id_60140e62_render,
  13294. componentvue_type_template_id_60140e62_staticRenderFns,
  13295. false,
  13296. null,
  13297. null,
  13298. null
  13299. )
  13300. /* hot reload */
  13301. if (false) { var component_api; }
  13302. component_component.options.__file = "packages/dialog/src/component.vue"
  13303. /* harmony default export */ var src_component = (component_component.exports);
  13304. // CONCATENATED MODULE: ./packages/dialog/index.js
  13305. /* istanbul ignore next */
  13306. src_component.install = function (Vue) {
  13307. Vue.component(src_component.name, src_component);
  13308. };
  13309. /* harmony default export */ var dialog = (src_component);
  13310. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete.vue?vue&type=template&id=152f2ee6&
  13311. var autocompletevue_type_template_id_152f2ee6_render = function() {
  13312. var _vm = this
  13313. var _h = _vm.$createElement
  13314. var _c = _vm._self._c || _h
  13315. return _c(
  13316. "div",
  13317. {
  13318. directives: [
  13319. {
  13320. name: "clickoutside",
  13321. rawName: "v-clickoutside",
  13322. value: _vm.close,
  13323. expression: "close"
  13324. }
  13325. ],
  13326. staticClass: "el-autocomplete",
  13327. attrs: {
  13328. "aria-haspopup": "listbox",
  13329. role: "combobox",
  13330. "aria-expanded": _vm.suggestionVisible,
  13331. "aria-owns": _vm.id
  13332. }
  13333. },
  13334. [
  13335. _c(
  13336. "el-input",
  13337. _vm._b(
  13338. {
  13339. ref: "input",
  13340. on: {
  13341. input: _vm.handleInput,
  13342. change: _vm.handleChange,
  13343. focus: _vm.handleFocus,
  13344. blur: _vm.handleBlur,
  13345. clear: _vm.handleClear
  13346. },
  13347. nativeOn: {
  13348. keydown: [
  13349. function($event) {
  13350. if (
  13351. !("button" in $event) &&
  13352. _vm._k($event.keyCode, "up", 38, $event.key, [
  13353. "Up",
  13354. "ArrowUp"
  13355. ])
  13356. ) {
  13357. return null
  13358. }
  13359. $event.preventDefault()
  13360. _vm.highlight(_vm.highlightedIndex - 1)
  13361. },
  13362. function($event) {
  13363. if (
  13364. !("button" in $event) &&
  13365. _vm._k($event.keyCode, "down", 40, $event.key, [
  13366. "Down",
  13367. "ArrowDown"
  13368. ])
  13369. ) {
  13370. return null
  13371. }
  13372. $event.preventDefault()
  13373. _vm.highlight(_vm.highlightedIndex + 1)
  13374. },
  13375. function($event) {
  13376. if (
  13377. !("button" in $event) &&
  13378. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  13379. ) {
  13380. return null
  13381. }
  13382. return _vm.handleKeyEnter($event)
  13383. },
  13384. function($event) {
  13385. if (
  13386. !("button" in $event) &&
  13387. _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
  13388. ) {
  13389. return null
  13390. }
  13391. return _vm.close($event)
  13392. }
  13393. ]
  13394. }
  13395. },
  13396. "el-input",
  13397. [_vm.$props, _vm.$attrs],
  13398. false
  13399. ),
  13400. [
  13401. _vm.$slots.prepend
  13402. ? _c("template", { slot: "prepend" }, [_vm._t("prepend")], 2)
  13403. : _vm._e(),
  13404. _vm.$slots.append
  13405. ? _c("template", { slot: "append" }, [_vm._t("append")], 2)
  13406. : _vm._e(),
  13407. _vm.$slots.prefix
  13408. ? _c("template", { slot: "prefix" }, [_vm._t("prefix")], 2)
  13409. : _vm._e(),
  13410. _vm.$slots.suffix
  13411. ? _c("template", { slot: "suffix" }, [_vm._t("suffix")], 2)
  13412. : _vm._e()
  13413. ],
  13414. 2
  13415. ),
  13416. _c(
  13417. "el-autocomplete-suggestions",
  13418. {
  13419. ref: "suggestions",
  13420. class: [_vm.popperClass ? _vm.popperClass : ""],
  13421. attrs: {
  13422. "visible-arrow": "",
  13423. "popper-options": _vm.popperOptions,
  13424. "append-to-body": _vm.popperAppendToBody,
  13425. placement: _vm.placement,
  13426. id: _vm.id
  13427. }
  13428. },
  13429. _vm._l(_vm.suggestions, function(item, index) {
  13430. return _c(
  13431. "li",
  13432. {
  13433. key: index,
  13434. class: { highlighted: _vm.highlightedIndex === index },
  13435. attrs: {
  13436. id: _vm.id + "-item-" + index,
  13437. role: "option",
  13438. "aria-selected": _vm.highlightedIndex === index
  13439. },
  13440. on: {
  13441. click: function($event) {
  13442. _vm.select(item)
  13443. }
  13444. }
  13445. },
  13446. [
  13447. _vm._t(
  13448. "default",
  13449. [
  13450. _vm._v("\n " + _vm._s(item[_vm.valueKey]) + "\n ")
  13451. ],
  13452. { item: item }
  13453. )
  13454. ],
  13455. 2
  13456. )
  13457. }),
  13458. 0
  13459. )
  13460. ],
  13461. 1
  13462. )
  13463. }
  13464. var autocompletevue_type_template_id_152f2ee6_staticRenderFns = []
  13465. autocompletevue_type_template_id_152f2ee6_render._withStripped = true
  13466. // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue?vue&type=template&id=152f2ee6&
  13467. // EXTERNAL MODULE: external "throttle-debounce/debounce"
  13468. var debounce_ = __webpack_require__(16);
  13469. var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
  13470. // EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
  13471. var clickoutside_ = __webpack_require__(10);
  13472. var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
  13473. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=template&id=cd10dcf0&
  13474. var autocomplete_suggestionsvue_type_template_id_cd10dcf0_render = function() {
  13475. var _vm = this
  13476. var _h = _vm.$createElement
  13477. var _c = _vm._self._c || _h
  13478. return _c(
  13479. "transition",
  13480. { attrs: { name: "el-zoom-in-top" }, on: { "after-leave": _vm.doDestroy } },
  13481. [
  13482. _c(
  13483. "div",
  13484. {
  13485. directives: [
  13486. {
  13487. name: "show",
  13488. rawName: "v-show",
  13489. value: _vm.showPopper,
  13490. expression: "showPopper"
  13491. }
  13492. ],
  13493. staticClass: "el-autocomplete-suggestion el-popper",
  13494. class: {
  13495. "is-loading": !_vm.parent.hideLoading && _vm.parent.loading
  13496. },
  13497. style: { width: _vm.dropdownWidth },
  13498. attrs: { role: "region" }
  13499. },
  13500. [
  13501. _c(
  13502. "el-scrollbar",
  13503. {
  13504. attrs: {
  13505. tag: "ul",
  13506. "wrap-class": "el-autocomplete-suggestion__wrap",
  13507. "view-class": "el-autocomplete-suggestion__list"
  13508. }
  13509. },
  13510. [
  13511. !_vm.parent.hideLoading && _vm.parent.loading
  13512. ? _c("li", [_c("i", { staticClass: "el-icon-loading" })])
  13513. : _vm._t("default")
  13514. ],
  13515. 2
  13516. )
  13517. ],
  13518. 1
  13519. )
  13520. ]
  13521. )
  13522. }
  13523. var autocomplete_suggestionsvue_type_template_id_cd10dcf0_staticRenderFns = []
  13524. autocomplete_suggestionsvue_type_template_id_cd10dcf0_render._withStripped = true
  13525. // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=template&id=cd10dcf0&
  13526. // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
  13527. var vue_popper_ = __webpack_require__(5);
  13528. var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
  13529. // EXTERNAL MODULE: external "element-ui/lib/scrollbar"
  13530. var scrollbar_ = __webpack_require__(18);
  13531. var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
  13532. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=script&lang=js&
  13533. //
  13534. //
  13535. //
  13536. //
  13537. //
  13538. //
  13539. //
  13540. //
  13541. //
  13542. //
  13543. //
  13544. //
  13545. //
  13546. //
  13547. //
  13548. //
  13549. //
  13550. //
  13551. //
  13552. /* harmony default export */ var autocomplete_suggestionsvue_type_script_lang_js_ = ({
  13553. components: { ElScrollbar: scrollbar_default.a },
  13554. mixins: [vue_popper_default.a, emitter_default.a],
  13555. componentName: 'ElAutocompleteSuggestions',
  13556. data: function data() {
  13557. return {
  13558. parent: this.$parent,
  13559. dropdownWidth: ''
  13560. };
  13561. },
  13562. props: {
  13563. options: {
  13564. default: function _default() {
  13565. return {
  13566. gpuAcceleration: false
  13567. };
  13568. }
  13569. },
  13570. id: String
  13571. },
  13572. methods: {
  13573. select: function select(item) {
  13574. this.dispatch('ElAutocomplete', 'item-click', item);
  13575. }
  13576. },
  13577. updated: function updated() {
  13578. var _this = this;
  13579. this.$nextTick(function (_) {
  13580. _this.popperJS && _this.updatePopper();
  13581. });
  13582. },
  13583. mounted: function mounted() {
  13584. this.$parent.popperElm = this.popperElm = this.$el;
  13585. this.referenceElm = this.$parent.$refs.input.$refs.input || this.$parent.$refs.input.$refs.textarea;
  13586. this.referenceList = this.$el.querySelector('.el-autocomplete-suggestion__list');
  13587. this.referenceList.setAttribute('role', 'listbox');
  13588. this.referenceList.setAttribute('id', this.id);
  13589. },
  13590. created: function created() {
  13591. var _this2 = this;
  13592. this.$on('visible', function (val, inputWidth) {
  13593. _this2.dropdownWidth = inputWidth + 'px';
  13594. _this2.showPopper = val;
  13595. });
  13596. }
  13597. });
  13598. // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=script&lang=js&
  13599. /* harmony default export */ var src_autocomplete_suggestionsvue_type_script_lang_js_ = (autocomplete_suggestionsvue_type_script_lang_js_);
  13600. // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue
  13601. /* normalize component */
  13602. var autocomplete_suggestions_component = normalizeComponent(
  13603. src_autocomplete_suggestionsvue_type_script_lang_js_,
  13604. autocomplete_suggestionsvue_type_template_id_cd10dcf0_render,
  13605. autocomplete_suggestionsvue_type_template_id_cd10dcf0_staticRenderFns,
  13606. false,
  13607. null,
  13608. null,
  13609. null
  13610. )
  13611. /* hot reload */
  13612. if (false) { var autocomplete_suggestions_api; }
  13613. autocomplete_suggestions_component.options.__file = "packages/autocomplete/src/autocomplete-suggestions.vue"
  13614. /* harmony default export */ var autocomplete_suggestions = (autocomplete_suggestions_component.exports);
  13615. // EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
  13616. var focus_ = __webpack_require__(23);
  13617. var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
  13618. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete.vue?vue&type=script&lang=js&
  13619. //
  13620. //
  13621. //
  13622. //
  13623. //
  13624. //
  13625. //
  13626. //
  13627. //
  13628. //
  13629. //
  13630. //
  13631. //
  13632. //
  13633. //
  13634. //
  13635. //
  13636. //
  13637. //
  13638. //
  13639. //
  13640. //
  13641. //
  13642. //
  13643. //
  13644. //
  13645. //
  13646. //
  13647. //
  13648. //
  13649. //
  13650. //
  13651. //
  13652. //
  13653. //
  13654. //
  13655. //
  13656. //
  13657. //
  13658. //
  13659. //
  13660. //
  13661. //
  13662. //
  13663. //
  13664. //
  13665. //
  13666. //
  13667. //
  13668. //
  13669. //
  13670. //
  13671. //
  13672. //
  13673. //
  13674. //
  13675. //
  13676. //
  13677. //
  13678. /* harmony default export */ var autocompletevue_type_script_lang_js_ = ({
  13679. name: 'ElAutocomplete',
  13680. mixins: [emitter_default.a, focus_default()('input'), migrating_default.a],
  13681. inheritAttrs: false,
  13682. componentName: 'ElAutocomplete',
  13683. components: {
  13684. ElInput: input_default.a,
  13685. ElAutocompleteSuggestions: autocomplete_suggestions
  13686. },
  13687. directives: { Clickoutside: clickoutside_default.a },
  13688. props: {
  13689. valueKey: {
  13690. type: String,
  13691. default: 'value'
  13692. },
  13693. popperClass: String,
  13694. popperOptions: Object,
  13695. placeholder: String,
  13696. clearable: {
  13697. type: Boolean,
  13698. default: false
  13699. },
  13700. disabled: Boolean,
  13701. name: String,
  13702. size: String,
  13703. value: String,
  13704. maxlength: Number,
  13705. minlength: Number,
  13706. autofocus: Boolean,
  13707. fetchSuggestions: Function,
  13708. triggerOnFocus: {
  13709. type: Boolean,
  13710. default: true
  13711. },
  13712. customItem: String,
  13713. selectWhenUnmatched: {
  13714. type: Boolean,
  13715. default: false
  13716. },
  13717. prefixIcon: String,
  13718. suffixIcon: String,
  13719. label: String,
  13720. debounce: {
  13721. type: Number,
  13722. default: 300
  13723. },
  13724. placement: {
  13725. type: String,
  13726. default: 'bottom-start'
  13727. },
  13728. hideLoading: Boolean,
  13729. popperAppendToBody: {
  13730. type: Boolean,
  13731. default: true
  13732. },
  13733. highlightFirstItem: {
  13734. type: Boolean,
  13735. default: false
  13736. }
  13737. },
  13738. data: function data() {
  13739. return {
  13740. activated: false,
  13741. suggestions: [],
  13742. loading: false,
  13743. highlightedIndex: -1,
  13744. suggestionDisabled: false
  13745. };
  13746. },
  13747. computed: {
  13748. suggestionVisible: function suggestionVisible() {
  13749. var suggestions = this.suggestions;
  13750. var isValidData = Array.isArray(suggestions) && suggestions.length > 0;
  13751. return (isValidData || this.loading) && this.activated;
  13752. },
  13753. id: function id() {
  13754. return 'el-autocomplete-' + Object(util_["generateId"])();
  13755. }
  13756. },
  13757. watch: {
  13758. suggestionVisible: function suggestionVisible(val) {
  13759. var $input = this.getInput();
  13760. if ($input) {
  13761. this.broadcast('ElAutocompleteSuggestions', 'visible', [val, $input.offsetWidth]);
  13762. }
  13763. }
  13764. },
  13765. methods: {
  13766. getMigratingConfig: function getMigratingConfig() {
  13767. return {
  13768. props: {
  13769. 'custom-item': 'custom-item is removed, use scoped slot instead.',
  13770. 'props': 'props is removed, use value-key instead.'
  13771. }
  13772. };
  13773. },
  13774. getData: function getData(queryString) {
  13775. var _this = this;
  13776. if (this.suggestionDisabled) {
  13777. return;
  13778. }
  13779. this.loading = true;
  13780. this.fetchSuggestions(queryString, function (suggestions) {
  13781. _this.loading = false;
  13782. if (_this.suggestionDisabled) {
  13783. return;
  13784. }
  13785. if (Array.isArray(suggestions)) {
  13786. _this.suggestions = suggestions;
  13787. _this.highlightedIndex = _this.highlightFirstItem ? 0 : -1;
  13788. } else {
  13789. console.error('[Element Error][Autocomplete]autocomplete suggestions must be an array');
  13790. }
  13791. });
  13792. },
  13793. handleInput: function handleInput(value) {
  13794. this.$emit('input', value);
  13795. this.suggestionDisabled = false;
  13796. if (!this.triggerOnFocus && !value) {
  13797. this.suggestionDisabled = true;
  13798. this.suggestions = [];
  13799. return;
  13800. }
  13801. this.debouncedGetData(value);
  13802. },
  13803. handleChange: function handleChange(value) {
  13804. this.$emit('change', value);
  13805. },
  13806. handleFocus: function handleFocus(event) {
  13807. this.activated = true;
  13808. this.$emit('focus', event);
  13809. if (this.triggerOnFocus) {
  13810. this.debouncedGetData(this.value);
  13811. }
  13812. },
  13813. handleBlur: function handleBlur(event) {
  13814. this.$emit('blur', event);
  13815. },
  13816. handleClear: function handleClear() {
  13817. this.activated = false;
  13818. this.$emit('clear');
  13819. },
  13820. close: function close(e) {
  13821. this.activated = false;
  13822. },
  13823. handleKeyEnter: function handleKeyEnter(e) {
  13824. var _this2 = this;
  13825. if (this.suggestionVisible && this.highlightedIndex >= 0 && this.highlightedIndex < this.suggestions.length) {
  13826. e.preventDefault();
  13827. this.select(this.suggestions[this.highlightedIndex]);
  13828. } else if (this.selectWhenUnmatched) {
  13829. this.$emit('select', { value: this.value });
  13830. this.$nextTick(function (_) {
  13831. _this2.suggestions = [];
  13832. _this2.highlightedIndex = -1;
  13833. });
  13834. }
  13835. },
  13836. select: function select(item) {
  13837. var _this3 = this;
  13838. this.$emit('input', item[this.valueKey]);
  13839. this.$emit('select', item);
  13840. this.$nextTick(function (_) {
  13841. _this3.suggestions = [];
  13842. _this3.highlightedIndex = -1;
  13843. });
  13844. },
  13845. highlight: function highlight(index) {
  13846. if (!this.suggestionVisible || this.loading) {
  13847. return;
  13848. }
  13849. if (index < 0) {
  13850. this.highlightedIndex = -1;
  13851. return;
  13852. }
  13853. if (index >= this.suggestions.length) {
  13854. index = this.suggestions.length - 1;
  13855. }
  13856. var suggestion = this.$refs.suggestions.$el.querySelector('.el-autocomplete-suggestion__wrap');
  13857. var suggestionList = suggestion.querySelectorAll('.el-autocomplete-suggestion__list li');
  13858. var highlightItem = suggestionList[index];
  13859. var scrollTop = suggestion.scrollTop;
  13860. var offsetTop = highlightItem.offsetTop;
  13861. if (offsetTop + highlightItem.scrollHeight > scrollTop + suggestion.clientHeight) {
  13862. suggestion.scrollTop += highlightItem.scrollHeight;
  13863. }
  13864. if (offsetTop < scrollTop) {
  13865. suggestion.scrollTop -= highlightItem.scrollHeight;
  13866. }
  13867. this.highlightedIndex = index;
  13868. var $input = this.getInput();
  13869. $input.setAttribute('aria-activedescendant', this.id + '-item-' + this.highlightedIndex);
  13870. },
  13871. getInput: function getInput() {
  13872. return this.$refs.input.getInput();
  13873. }
  13874. },
  13875. mounted: function mounted() {
  13876. var _this4 = this;
  13877. this.debouncedGetData = debounce_default()(this.debounce, this.getData);
  13878. this.$on('item-click', function (item) {
  13879. _this4.select(item);
  13880. });
  13881. var $input = this.getInput();
  13882. $input.setAttribute('role', 'textbox');
  13883. $input.setAttribute('aria-autocomplete', 'list');
  13884. $input.setAttribute('aria-controls', 'id');
  13885. $input.setAttribute('aria-activedescendant', this.id + '-item-' + this.highlightedIndex);
  13886. },
  13887. beforeDestroy: function beforeDestroy() {
  13888. this.$refs.suggestions.$destroy();
  13889. }
  13890. });
  13891. // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue?vue&type=script&lang=js&
  13892. /* harmony default export */ var src_autocompletevue_type_script_lang_js_ = (autocompletevue_type_script_lang_js_);
  13893. // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue
  13894. /* normalize component */
  13895. var autocomplete_component = normalizeComponent(
  13896. src_autocompletevue_type_script_lang_js_,
  13897. autocompletevue_type_template_id_152f2ee6_render,
  13898. autocompletevue_type_template_id_152f2ee6_staticRenderFns,
  13899. false,
  13900. null,
  13901. null,
  13902. null
  13903. )
  13904. /* hot reload */
  13905. if (false) { var autocomplete_api; }
  13906. autocomplete_component.options.__file = "packages/autocomplete/src/autocomplete.vue"
  13907. /* harmony default export */ var autocomplete = (autocomplete_component.exports);
  13908. // CONCATENATED MODULE: ./packages/autocomplete/index.js
  13909. /* istanbul ignore next */
  13910. autocomplete.install = function (Vue) {
  13911. Vue.component(autocomplete.name, autocomplete);
  13912. };
  13913. /* harmony default export */ var packages_autocomplete = (autocomplete);
  13914. // EXTERNAL MODULE: external "element-ui/lib/button"
  13915. var button_ = __webpack_require__(13);
  13916. var button_default = /*#__PURE__*/__webpack_require__.n(button_);
  13917. // EXTERNAL MODULE: external "element-ui/lib/button-group"
  13918. var button_group_ = __webpack_require__(28);
  13919. var button_group_default = /*#__PURE__*/__webpack_require__.n(button_group_);
  13920. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown.vue?vue&type=script&lang=js&
  13921. /* harmony default export */ var dropdownvue_type_script_lang_js_ = ({
  13922. name: 'ElDropdown',
  13923. componentName: 'ElDropdown',
  13924. mixins: [emitter_default.a, migrating_default.a],
  13925. directives: { Clickoutside: clickoutside_default.a },
  13926. components: {
  13927. ElButton: button_default.a,
  13928. ElButtonGroup: button_group_default.a
  13929. },
  13930. provide: function provide() {
  13931. return {
  13932. dropdown: this
  13933. };
  13934. },
  13935. props: {
  13936. trigger: {
  13937. type: String,
  13938. default: 'hover'
  13939. },
  13940. type: String,
  13941. size: {
  13942. type: String,
  13943. default: ''
  13944. },
  13945. splitButton: Boolean,
  13946. hideOnClick: {
  13947. type: Boolean,
  13948. default: true
  13949. },
  13950. placement: {
  13951. type: String,
  13952. default: 'bottom-end'
  13953. },
  13954. visibleArrow: {
  13955. default: true
  13956. },
  13957. showTimeout: {
  13958. type: Number,
  13959. default: 250
  13960. },
  13961. hideTimeout: {
  13962. type: Number,
  13963. default: 150
  13964. },
  13965. tabindex: {
  13966. type: Number,
  13967. default: 0
  13968. },
  13969. disabled: {
  13970. type: Boolean,
  13971. default: false
  13972. }
  13973. },
  13974. data: function data() {
  13975. return {
  13976. timeout: null,
  13977. visible: false,
  13978. triggerElm: null,
  13979. menuItems: null,
  13980. menuItemsArray: null,
  13981. dropdownElm: null,
  13982. focusing: false,
  13983. listId: 'dropdown-menu-' + Object(util_["generateId"])()
  13984. };
  13985. },
  13986. computed: {
  13987. dropdownSize: function dropdownSize() {
  13988. return this.size || (this.$ELEMENT || {}).size;
  13989. }
  13990. },
  13991. mounted: function mounted() {
  13992. this.$on('menu-item-click', this.handleMenuItemClick);
  13993. },
  13994. watch: {
  13995. visible: function visible(val) {
  13996. this.broadcast('ElDropdownMenu', 'visible', val);
  13997. this.$emit('visible-change', val);
  13998. },
  13999. focusing: function focusing(val) {
  14000. var selfDefine = this.$el.querySelector('.el-dropdown-selfdefine');
  14001. if (selfDefine) {
  14002. // 自定义
  14003. if (val) {
  14004. selfDefine.className += ' focusing';
  14005. } else {
  14006. selfDefine.className = selfDefine.className.replace('focusing', '');
  14007. }
  14008. }
  14009. }
  14010. },
  14011. methods: {
  14012. getMigratingConfig: function getMigratingConfig() {
  14013. return {
  14014. props: {
  14015. 'menu-align': 'menu-align is renamed to placement.'
  14016. }
  14017. };
  14018. },
  14019. show: function show() {
  14020. var _this = this;
  14021. if (this.disabled) return;
  14022. clearTimeout(this.timeout);
  14023. this.timeout = setTimeout(function () {
  14024. _this.visible = true;
  14025. }, this.trigger === 'click' ? 0 : this.showTimeout);
  14026. },
  14027. hide: function hide() {
  14028. var _this2 = this;
  14029. if (this.disabled) return;
  14030. this.removeTabindex();
  14031. if (this.tabindex >= 0) {
  14032. this.resetTabindex(this.triggerElm);
  14033. }
  14034. clearTimeout(this.timeout);
  14035. this.timeout = setTimeout(function () {
  14036. _this2.visible = false;
  14037. }, this.trigger === 'click' ? 0 : this.hideTimeout);
  14038. },
  14039. handleClick: function handleClick() {
  14040. if (this.disabled) return;
  14041. if (this.visible) {
  14042. this.hide();
  14043. } else {
  14044. this.show();
  14045. }
  14046. },
  14047. handleTriggerKeyDown: function handleTriggerKeyDown(ev) {
  14048. var keyCode = ev.keyCode;
  14049. if ([38, 40].indexOf(keyCode) > -1) {
  14050. // up/down
  14051. this.removeTabindex();
  14052. this.resetTabindex(this.menuItems[0]);
  14053. this.menuItems[0].focus();
  14054. ev.preventDefault();
  14055. ev.stopPropagation();
  14056. } else if (keyCode === 13) {
  14057. // space enter选中
  14058. this.handleClick();
  14059. } else if ([9, 27].indexOf(keyCode) > -1) {
  14060. // tab || esc
  14061. this.hide();
  14062. }
  14063. },
  14064. handleItemKeyDown: function handleItemKeyDown(ev) {
  14065. var keyCode = ev.keyCode;
  14066. var target = ev.target;
  14067. var currentIndex = this.menuItemsArray.indexOf(target);
  14068. var max = this.menuItemsArray.length - 1;
  14069. var nextIndex = void 0;
  14070. if ([38, 40].indexOf(keyCode) > -1) {
  14071. // up/down
  14072. if (keyCode === 38) {
  14073. // up
  14074. nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0;
  14075. } else {
  14076. // down
  14077. nextIndex = currentIndex < max ? currentIndex + 1 : max;
  14078. }
  14079. this.removeTabindex();
  14080. this.resetTabindex(this.menuItems[nextIndex]);
  14081. this.menuItems[nextIndex].focus();
  14082. ev.preventDefault();
  14083. ev.stopPropagation();
  14084. } else if (keyCode === 13) {
  14085. // enter选中
  14086. this.triggerElmFocus();
  14087. target.click();
  14088. if (this.hideOnClick) {
  14089. // click关闭
  14090. this.visible = false;
  14091. }
  14092. } else if ([9, 27].indexOf(keyCode) > -1) {
  14093. // tab // esc
  14094. this.hide();
  14095. this.triggerElmFocus();
  14096. }
  14097. },
  14098. resetTabindex: function resetTabindex(ele) {
  14099. // 下次tab时组件聚焦元素
  14100. this.removeTabindex();
  14101. ele.setAttribute('tabindex', '0'); // 下次期望的聚焦元素
  14102. },
  14103. removeTabindex: function removeTabindex() {
  14104. this.triggerElm.setAttribute('tabindex', '-1');
  14105. this.menuItemsArray.forEach(function (item) {
  14106. item.setAttribute('tabindex', '-1');
  14107. });
  14108. },
  14109. initAria: function initAria() {
  14110. this.dropdownElm.setAttribute('id', this.listId);
  14111. this.triggerElm.setAttribute('aria-haspopup', 'list');
  14112. this.triggerElm.setAttribute('aria-controls', this.listId);
  14113. if (!this.splitButton) {
  14114. // 自定义
  14115. this.triggerElm.setAttribute('role', 'button');
  14116. this.triggerElm.setAttribute('tabindex', this.tabindex);
  14117. this.triggerElm.setAttribute('class', (this.triggerElm.getAttribute('class') || '') + ' el-dropdown-selfdefine'); // 控制
  14118. }
  14119. },
  14120. initEvent: function initEvent() {
  14121. var _this3 = this;
  14122. var trigger = this.trigger,
  14123. show = this.show,
  14124. hide = this.hide,
  14125. handleClick = this.handleClick,
  14126. splitButton = this.splitButton,
  14127. handleTriggerKeyDown = this.handleTriggerKeyDown,
  14128. handleItemKeyDown = this.handleItemKeyDown;
  14129. this.triggerElm = splitButton ? this.$refs.trigger.$el : this.$slots.default[0].elm;
  14130. var dropdownElm = this.dropdownElm;
  14131. this.triggerElm.addEventListener('keydown', handleTriggerKeyDown); // triggerElm keydown
  14132. dropdownElm.addEventListener('keydown', handleItemKeyDown, true); // item keydown
  14133. // 控制自定义元素的样式
  14134. if (!splitButton) {
  14135. this.triggerElm.addEventListener('focus', function () {
  14136. _this3.focusing = true;
  14137. });
  14138. this.triggerElm.addEventListener('blur', function () {
  14139. _this3.focusing = false;
  14140. });
  14141. this.triggerElm.addEventListener('click', function () {
  14142. _this3.focusing = false;
  14143. });
  14144. }
  14145. if (trigger === 'hover') {
  14146. this.triggerElm.addEventListener('mouseenter', show);
  14147. this.triggerElm.addEventListener('mouseleave', hide);
  14148. dropdownElm.addEventListener('mouseenter', show);
  14149. dropdownElm.addEventListener('mouseleave', hide);
  14150. } else if (trigger === 'click') {
  14151. this.triggerElm.addEventListener('click', handleClick);
  14152. }
  14153. },
  14154. handleMenuItemClick: function handleMenuItemClick(command, instance) {
  14155. if (this.hideOnClick) {
  14156. this.visible = false;
  14157. }
  14158. this.$emit('command', command, instance);
  14159. },
  14160. triggerElmFocus: function triggerElmFocus() {
  14161. this.triggerElm.focus && this.triggerElm.focus();
  14162. },
  14163. initDomOperation: function initDomOperation() {
  14164. this.dropdownElm = this.popperElm;
  14165. this.menuItems = this.dropdownElm.querySelectorAll("[tabindex='-1']");
  14166. this.menuItemsArray = [].slice.call(this.menuItems);
  14167. this.initEvent();
  14168. this.initAria();
  14169. }
  14170. },
  14171. render: function render(h) {
  14172. var _this4 = this;
  14173. var hide = this.hide,
  14174. splitButton = this.splitButton,
  14175. type = this.type,
  14176. dropdownSize = this.dropdownSize,
  14177. disabled = this.disabled;
  14178. var handleMainButtonClick = function handleMainButtonClick(event) {
  14179. _this4.$emit('click', event);
  14180. hide();
  14181. };
  14182. var triggerElm = null;
  14183. if (splitButton) {
  14184. triggerElm = h('el-button-group', [h(
  14185. 'el-button',
  14186. {
  14187. attrs: { type: type, size: dropdownSize, disabled: disabled },
  14188. nativeOn: {
  14189. 'click': handleMainButtonClick
  14190. }
  14191. },
  14192. [this.$slots.default]
  14193. ), h(
  14194. 'el-button',
  14195. { ref: 'trigger', attrs: { type: type, size: dropdownSize, disabled: disabled },
  14196. 'class': 'el-dropdown__caret-button' },
  14197. [h('i', { 'class': 'el-dropdown__icon el-icon-arrow-down' })]
  14198. )]);
  14199. } else {
  14200. triggerElm = this.$slots.default;
  14201. var vnodeData = triggerElm[0].data || {};
  14202. var _vnodeData$attrs = vnodeData.attrs,
  14203. attrs = _vnodeData$attrs === undefined ? {} : _vnodeData$attrs;
  14204. if (disabled && !attrs.disabled) {
  14205. attrs.disabled = true;
  14206. vnodeData.attrs = attrs;
  14207. }
  14208. }
  14209. var menuElm = disabled ? null : this.$slots.dropdown;
  14210. return h(
  14211. 'div',
  14212. { 'class': 'el-dropdown', directives: [{
  14213. name: 'clickoutside',
  14214. value: hide
  14215. }],
  14216. attrs: { 'aria-disabled': disabled }
  14217. },
  14218. [triggerElm, menuElm]
  14219. );
  14220. }
  14221. });
  14222. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown.vue?vue&type=script&lang=js&
  14223. /* harmony default export */ var src_dropdownvue_type_script_lang_js_ = (dropdownvue_type_script_lang_js_);
  14224. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown.vue
  14225. var dropdown_render, dropdown_staticRenderFns
  14226. /* normalize component */
  14227. var dropdown_component = normalizeComponent(
  14228. src_dropdownvue_type_script_lang_js_,
  14229. dropdown_render,
  14230. dropdown_staticRenderFns,
  14231. false,
  14232. null,
  14233. null,
  14234. null
  14235. )
  14236. /* hot reload */
  14237. if (false) { var dropdown_api; }
  14238. dropdown_component.options.__file = "packages/dropdown/src/dropdown.vue"
  14239. /* harmony default export */ var dropdown = (dropdown_component.exports);
  14240. // CONCATENATED MODULE: ./packages/dropdown/index.js
  14241. /* istanbul ignore next */
  14242. dropdown.install = function (Vue) {
  14243. Vue.component(dropdown.name, dropdown);
  14244. };
  14245. /* harmony default export */ var packages_dropdown = (dropdown);
  14246. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=0da6b714&
  14247. var dropdown_menuvue_type_template_id_0da6b714_render = function() {
  14248. var _vm = this
  14249. var _h = _vm.$createElement
  14250. var _c = _vm._self._c || _h
  14251. return _c(
  14252. "transition",
  14253. { attrs: { name: "el-zoom-in-top" }, on: { "after-leave": _vm.doDestroy } },
  14254. [
  14255. _c(
  14256. "ul",
  14257. {
  14258. directives: [
  14259. {
  14260. name: "show",
  14261. rawName: "v-show",
  14262. value: _vm.showPopper,
  14263. expression: "showPopper"
  14264. }
  14265. ],
  14266. staticClass: "el-dropdown-menu el-popper",
  14267. class: [_vm.size && "el-dropdown-menu--" + _vm.size]
  14268. },
  14269. [_vm._t("default")],
  14270. 2
  14271. )
  14272. ]
  14273. )
  14274. }
  14275. var dropdown_menuvue_type_template_id_0da6b714_staticRenderFns = []
  14276. dropdown_menuvue_type_template_id_0da6b714_render._withStripped = true
  14277. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=0da6b714&
  14278. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js&
  14279. //
  14280. //
  14281. //
  14282. //
  14283. //
  14284. //
  14285. //
  14286. /* harmony default export */ var dropdown_menuvue_type_script_lang_js_ = ({
  14287. name: 'ElDropdownMenu',
  14288. componentName: 'ElDropdownMenu',
  14289. mixins: [vue_popper_default.a],
  14290. props: {
  14291. visibleArrow: {
  14292. type: Boolean,
  14293. default: true
  14294. },
  14295. arrowOffset: {
  14296. type: Number,
  14297. default: 0
  14298. }
  14299. },
  14300. data: function data() {
  14301. return {
  14302. size: this.dropdown.dropdownSize
  14303. };
  14304. },
  14305. inject: ['dropdown'],
  14306. created: function created() {
  14307. var _this = this;
  14308. this.$on('updatePopper', function () {
  14309. if (_this.showPopper) _this.updatePopper();
  14310. });
  14311. this.$on('visible', function (val) {
  14312. _this.showPopper = val;
  14313. });
  14314. },
  14315. mounted: function mounted() {
  14316. this.dropdown.popperElm = this.popperElm = this.$el;
  14317. this.referenceElm = this.dropdown.$el;
  14318. // compatible with 2.6 new v-slot syntax
  14319. // issue link https://github.com/ElemeFE/element/issues/14345
  14320. this.dropdown.initDomOperation();
  14321. },
  14322. watch: {
  14323. 'dropdown.placement': {
  14324. immediate: true,
  14325. handler: function handler(val) {
  14326. this.currentPlacement = val;
  14327. }
  14328. }
  14329. }
  14330. });
  14331. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js&
  14332. /* harmony default export */ var src_dropdown_menuvue_type_script_lang_js_ = (dropdown_menuvue_type_script_lang_js_);
  14333. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue
  14334. /* normalize component */
  14335. var dropdown_menu_component = normalizeComponent(
  14336. src_dropdown_menuvue_type_script_lang_js_,
  14337. dropdown_menuvue_type_template_id_0da6b714_render,
  14338. dropdown_menuvue_type_template_id_0da6b714_staticRenderFns,
  14339. false,
  14340. null,
  14341. null,
  14342. null
  14343. )
  14344. /* hot reload */
  14345. if (false) { var dropdown_menu_api; }
  14346. dropdown_menu_component.options.__file = "packages/dropdown/src/dropdown-menu.vue"
  14347. /* harmony default export */ var dropdown_menu = (dropdown_menu_component.exports);
  14348. // CONCATENATED MODULE: ./packages/dropdown-menu/index.js
  14349. /* istanbul ignore next */
  14350. dropdown_menu.install = function (Vue) {
  14351. Vue.component(dropdown_menu.name, dropdown_menu);
  14352. };
  14353. /* harmony default export */ var packages_dropdown_menu = (dropdown_menu);
  14354. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-item.vue?vue&type=template&id=6359102a&
  14355. var dropdown_itemvue_type_template_id_6359102a_render = function() {
  14356. var _vm = this
  14357. var _h = _vm.$createElement
  14358. var _c = _vm._self._c || _h
  14359. return _c(
  14360. "li",
  14361. {
  14362. staticClass: "el-dropdown-menu__item",
  14363. class: {
  14364. "is-disabled": _vm.disabled,
  14365. "el-dropdown-menu__item--divided": _vm.divided
  14366. },
  14367. attrs: {
  14368. "aria-disabled": _vm.disabled,
  14369. tabindex: _vm.disabled ? null : -1
  14370. },
  14371. on: { click: _vm.handleClick }
  14372. },
  14373. [_vm.icon ? _c("i", { class: _vm.icon }) : _vm._e(), _vm._t("default")],
  14374. 2
  14375. )
  14376. }
  14377. var dropdown_itemvue_type_template_id_6359102a_staticRenderFns = []
  14378. dropdown_itemvue_type_template_id_6359102a_render._withStripped = true
  14379. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-item.vue?vue&type=template&id=6359102a&
  14380. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-item.vue?vue&type=script&lang=js&
  14381. //
  14382. //
  14383. //
  14384. //
  14385. //
  14386. //
  14387. //
  14388. //
  14389. //
  14390. //
  14391. //
  14392. //
  14393. //
  14394. //
  14395. //
  14396. /* harmony default export */ var dropdown_itemvue_type_script_lang_js_ = ({
  14397. name: 'ElDropdownItem',
  14398. mixins: [emitter_default.a],
  14399. props: {
  14400. command: {},
  14401. disabled: Boolean,
  14402. divided: Boolean,
  14403. icon: String
  14404. },
  14405. methods: {
  14406. handleClick: function handleClick(e) {
  14407. this.dispatch('ElDropdown', 'menu-item-click', [this.command, this]);
  14408. }
  14409. }
  14410. });
  14411. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-item.vue?vue&type=script&lang=js&
  14412. /* harmony default export */ var src_dropdown_itemvue_type_script_lang_js_ = (dropdown_itemvue_type_script_lang_js_);
  14413. // CONCATENATED MODULE: ./packages/dropdown/src/dropdown-item.vue
  14414. /* normalize component */
  14415. var dropdown_item_component = normalizeComponent(
  14416. src_dropdown_itemvue_type_script_lang_js_,
  14417. dropdown_itemvue_type_template_id_6359102a_render,
  14418. dropdown_itemvue_type_template_id_6359102a_staticRenderFns,
  14419. false,
  14420. null,
  14421. null,
  14422. null
  14423. )
  14424. /* hot reload */
  14425. if (false) { var dropdown_item_api; }
  14426. dropdown_item_component.options.__file = "packages/dropdown/src/dropdown-item.vue"
  14427. /* harmony default export */ var dropdown_item = (dropdown_item_component.exports);
  14428. // CONCATENATED MODULE: ./packages/dropdown-item/index.js
  14429. /* istanbul ignore next */
  14430. dropdown_item.install = function (Vue) {
  14431. Vue.component(dropdown_item.name, dropdown_item);
  14432. };
  14433. /* harmony default export */ var packages_dropdown_item = (dropdown_item);
  14434. // CONCATENATED MODULE: ./src/utils/aria-utils.js
  14435. var aria = aria || {};
  14436. aria.Utils = aria.Utils || {};
  14437. /**
  14438. * @desc Set focus on descendant nodes until the first focusable element is
  14439. * found.
  14440. * @param element
  14441. * DOM node for which to find the first focusable descendant.
  14442. * @returns
  14443. * true if a focusable element is found and focus is set.
  14444. */
  14445. aria.Utils.focusFirstDescendant = function (element) {
  14446. for (var i = 0; i < element.childNodes.length; i++) {
  14447. var child = element.childNodes[i];
  14448. if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
  14449. return true;
  14450. }
  14451. }
  14452. return false;
  14453. };
  14454. /**
  14455. * @desc Find the last descendant node that is focusable.
  14456. * @param element
  14457. * DOM node for which to find the last focusable descendant.
  14458. * @returns
  14459. * true if a focusable element is found and focus is set.
  14460. */
  14461. aria.Utils.focusLastDescendant = function (element) {
  14462. for (var i = element.childNodes.length - 1; i >= 0; i--) {
  14463. var child = element.childNodes[i];
  14464. if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
  14465. return true;
  14466. }
  14467. }
  14468. return false;
  14469. };
  14470. /**
  14471. * @desc Set Attempt to set focus on the current node.
  14472. * @param element
  14473. * The node to attempt to focus on.
  14474. * @returns
  14475. * true if element is focused.
  14476. */
  14477. aria.Utils.attemptFocus = function (element) {
  14478. if (!aria.Utils.isFocusable(element)) {
  14479. return false;
  14480. }
  14481. aria.Utils.IgnoreUtilFocusChanges = true;
  14482. try {
  14483. element.focus();
  14484. } catch (e) {}
  14485. aria.Utils.IgnoreUtilFocusChanges = false;
  14486. return document.activeElement === element;
  14487. };
  14488. aria.Utils.isFocusable = function (element) {
  14489. if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
  14490. return true;
  14491. }
  14492. if (element.disabled) {
  14493. return false;
  14494. }
  14495. switch (element.nodeName) {
  14496. case 'A':
  14497. return !!element.href && element.rel !== 'ignore';
  14498. case 'INPUT':
  14499. return element.type !== 'hidden' && element.type !== 'file';
  14500. case 'BUTTON':
  14501. case 'SELECT':
  14502. case 'TEXTAREA':
  14503. return true;
  14504. default:
  14505. return false;
  14506. }
  14507. };
  14508. /**
  14509. * 触发一个事件
  14510. * mouseenter, mouseleave, mouseover, keyup, change, click 等
  14511. * @param {Element} elm
  14512. * @param {String} name
  14513. * @param {*} opts
  14514. */
  14515. aria.Utils.triggerEvent = function (elm, name) {
  14516. var eventName = void 0;
  14517. if (/^mouse|click/.test(name)) {
  14518. eventName = 'MouseEvents';
  14519. } else if (/^key/.test(name)) {
  14520. eventName = 'KeyboardEvent';
  14521. } else {
  14522. eventName = 'HTMLEvents';
  14523. }
  14524. var evt = document.createEvent(eventName);
  14525. for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  14526. opts[_key - 2] = arguments[_key];
  14527. }
  14528. evt.initEvent.apply(evt, [name].concat(opts));
  14529. elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
  14530. return elm;
  14531. };
  14532. aria.Utils.keys = {
  14533. tab: 9,
  14534. enter: 13,
  14535. space: 32,
  14536. left: 37,
  14537. up: 38,
  14538. right: 39,
  14539. down: 40,
  14540. esc: 27
  14541. };
  14542. /* harmony default export */ var aria_utils = (aria.Utils);
  14543. // CONCATENATED MODULE: ./src/utils/menu/aria-submenu.js
  14544. var SubMenu = function SubMenu(parent, domNode) {
  14545. this.domNode = domNode;
  14546. this.parent = parent;
  14547. this.subMenuItems = [];
  14548. this.subIndex = 0;
  14549. this.init();
  14550. };
  14551. SubMenu.prototype.init = function () {
  14552. this.subMenuItems = this.domNode.querySelectorAll('li');
  14553. this.addListeners();
  14554. };
  14555. SubMenu.prototype.gotoSubIndex = function (idx) {
  14556. if (idx === this.subMenuItems.length) {
  14557. idx = 0;
  14558. } else if (idx < 0) {
  14559. idx = this.subMenuItems.length - 1;
  14560. }
  14561. this.subMenuItems[idx].focus();
  14562. this.subIndex = idx;
  14563. };
  14564. SubMenu.prototype.addListeners = function () {
  14565. var _this = this;
  14566. var keys = aria_utils.keys;
  14567. var parentNode = this.parent.domNode;
  14568. Array.prototype.forEach.call(this.subMenuItems, function (el) {
  14569. el.addEventListener('keydown', function (event) {
  14570. var prevDef = false;
  14571. switch (event.keyCode) {
  14572. case keys.down:
  14573. _this.gotoSubIndex(_this.subIndex + 1);
  14574. prevDef = true;
  14575. break;
  14576. case keys.up:
  14577. _this.gotoSubIndex(_this.subIndex - 1);
  14578. prevDef = true;
  14579. break;
  14580. case keys.tab:
  14581. aria_utils.triggerEvent(parentNode, 'mouseleave');
  14582. break;
  14583. case keys.enter:
  14584. case keys.space:
  14585. prevDef = true;
  14586. event.currentTarget.click();
  14587. break;
  14588. }
  14589. if (prevDef) {
  14590. event.preventDefault();
  14591. event.stopPropagation();
  14592. }
  14593. return false;
  14594. });
  14595. });
  14596. };
  14597. /* harmony default export */ var aria_submenu = (SubMenu);
  14598. // CONCATENATED MODULE: ./src/utils/menu/aria-menuitem.js
  14599. var MenuItem = function MenuItem(domNode) {
  14600. this.domNode = domNode;
  14601. this.submenu = null;
  14602. this.init();
  14603. };
  14604. MenuItem.prototype.init = function () {
  14605. this.domNode.setAttribute('tabindex', '0');
  14606. var menuChild = this.domNode.querySelector('.el-menu');
  14607. if (menuChild) {
  14608. this.submenu = new aria_submenu(this, menuChild);
  14609. }
  14610. this.addListeners();
  14611. };
  14612. MenuItem.prototype.addListeners = function () {
  14613. var _this = this;
  14614. var keys = aria_utils.keys;
  14615. this.domNode.addEventListener('keydown', function (event) {
  14616. var prevDef = false;
  14617. switch (event.keyCode) {
  14618. case keys.down:
  14619. aria_utils.triggerEvent(event.currentTarget, 'mouseenter');
  14620. _this.submenu && _this.submenu.gotoSubIndex(0);
  14621. prevDef = true;
  14622. break;
  14623. case keys.up:
  14624. aria_utils.triggerEvent(event.currentTarget, 'mouseenter');
  14625. _this.submenu && _this.submenu.gotoSubIndex(_this.submenu.subMenuItems.length - 1);
  14626. prevDef = true;
  14627. break;
  14628. case keys.tab:
  14629. aria_utils.triggerEvent(event.currentTarget, 'mouseleave');
  14630. break;
  14631. case keys.enter:
  14632. case keys.space:
  14633. prevDef = true;
  14634. event.currentTarget.click();
  14635. break;
  14636. }
  14637. if (prevDef) {
  14638. event.preventDefault();
  14639. }
  14640. });
  14641. };
  14642. /* harmony default export */ var aria_menuitem = (MenuItem);
  14643. // CONCATENATED MODULE: ./src/utils/menu/aria-menubar.js
  14644. var Menu = function Menu(domNode) {
  14645. this.domNode = domNode;
  14646. this.init();
  14647. };
  14648. Menu.prototype.init = function () {
  14649. var menuChildren = this.domNode.childNodes;
  14650. [].filter.call(menuChildren, function (child) {
  14651. return child.nodeType === 1;
  14652. }).forEach(function (child) {
  14653. new aria_menuitem(child); // eslint-disable-line
  14654. });
  14655. };
  14656. /* harmony default export */ var aria_menubar = (Menu);
  14657. // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
  14658. var dom_ = __webpack_require__(1);
  14659. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu.vue?vue&type=script&lang=js&
  14660. /* harmony default export */ var menuvue_type_script_lang_js_ = ({
  14661. name: 'ElMenu',
  14662. render: function render(h) {
  14663. var component = h(
  14664. 'ul',
  14665. {
  14666. attrs: {
  14667. role: 'menubar'
  14668. },
  14669. key: +this.collapse,
  14670. style: { backgroundColor: this.backgroundColor || '' },
  14671. 'class': {
  14672. 'el-menu--horizontal': this.mode === 'horizontal',
  14673. 'el-menu--collapse': this.collapse,
  14674. "el-menu": true
  14675. }
  14676. },
  14677. [this.$slots.default]
  14678. );
  14679. if (this.collapseTransition) {
  14680. return h('el-menu-collapse-transition', [component]);
  14681. } else {
  14682. return component;
  14683. }
  14684. },
  14685. componentName: 'ElMenu',
  14686. mixins: [emitter_default.a, migrating_default.a],
  14687. provide: function provide() {
  14688. return {
  14689. rootMenu: this
  14690. };
  14691. },
  14692. components: {
  14693. 'el-menu-collapse-transition': {
  14694. functional: true,
  14695. render: function render(createElement, context) {
  14696. var data = {
  14697. props: {
  14698. mode: 'out-in'
  14699. },
  14700. on: {
  14701. beforeEnter: function beforeEnter(el) {
  14702. el.style.opacity = 0.2;
  14703. },
  14704. enter: function enter(el) {
  14705. Object(dom_["addClass"])(el, 'el-opacity-transition');
  14706. el.style.opacity = 1;
  14707. },
  14708. afterEnter: function afterEnter(el) {
  14709. Object(dom_["removeClass"])(el, 'el-opacity-transition');
  14710. el.style.opacity = '';
  14711. },
  14712. beforeLeave: function beforeLeave(el) {
  14713. if (!el.dataset) el.dataset = {};
  14714. if (Object(dom_["hasClass"])(el, 'el-menu--collapse')) {
  14715. Object(dom_["removeClass"])(el, 'el-menu--collapse');
  14716. el.dataset.oldOverflow = el.style.overflow;
  14717. el.dataset.scrollWidth = el.clientWidth;
  14718. Object(dom_["addClass"])(el, 'el-menu--collapse');
  14719. } else {
  14720. Object(dom_["addClass"])(el, 'el-menu--collapse');
  14721. el.dataset.oldOverflow = el.style.overflow;
  14722. el.dataset.scrollWidth = el.clientWidth;
  14723. Object(dom_["removeClass"])(el, 'el-menu--collapse');
  14724. }
  14725. el.style.width = el.scrollWidth + 'px';
  14726. el.style.overflow = 'hidden';
  14727. },
  14728. leave: function leave(el) {
  14729. Object(dom_["addClass"])(el, 'horizontal-collapse-transition');
  14730. el.style.width = el.dataset.scrollWidth + 'px';
  14731. }
  14732. }
  14733. };
  14734. return createElement('transition', data, context.children);
  14735. }
  14736. }
  14737. },
  14738. props: {
  14739. mode: {
  14740. type: String,
  14741. default: 'vertical'
  14742. },
  14743. defaultActive: {
  14744. type: String,
  14745. default: ''
  14746. },
  14747. defaultOpeneds: Array,
  14748. uniqueOpened: Boolean,
  14749. router: Boolean,
  14750. menuTrigger: {
  14751. type: String,
  14752. default: 'hover'
  14753. },
  14754. collapse: Boolean,
  14755. backgroundColor: String,
  14756. textColor: String,
  14757. activeTextColor: String,
  14758. collapseTransition: {
  14759. type: Boolean,
  14760. default: true
  14761. }
  14762. },
  14763. data: function data() {
  14764. return {
  14765. activeIndex: this.defaultActive,
  14766. openedMenus: this.defaultOpeneds && !this.collapse ? this.defaultOpeneds.slice(0) : [],
  14767. items: {},
  14768. submenus: {}
  14769. };
  14770. },
  14771. computed: {
  14772. hoverBackground: function hoverBackground() {
  14773. return this.backgroundColor ? this.mixColor(this.backgroundColor, 0.2) : '';
  14774. },
  14775. isMenuPopup: function isMenuPopup() {
  14776. return this.mode === 'horizontal' || this.mode === 'vertical' && this.collapse;
  14777. }
  14778. },
  14779. watch: {
  14780. defaultActive: function defaultActive(value) {
  14781. if (!this.items[value]) {
  14782. this.activeIndex = null;
  14783. }
  14784. this.updateActiveIndex(value);
  14785. },
  14786. defaultOpeneds: function defaultOpeneds(value) {
  14787. if (!this.collapse) {
  14788. this.openedMenus = value;
  14789. }
  14790. },
  14791. collapse: function collapse(value) {
  14792. if (value) this.openedMenus = [];
  14793. this.broadcast('ElSubmenu', 'toggle-collapse', value);
  14794. }
  14795. },
  14796. methods: {
  14797. updateActiveIndex: function updateActiveIndex(val) {
  14798. var item = this.items[val] || this.items[this.activeIndex] || this.items[this.defaultActive];
  14799. if (item) {
  14800. this.activeIndex = item.index;
  14801. this.initOpenedMenu();
  14802. } else {
  14803. this.activeIndex = null;
  14804. }
  14805. },
  14806. getMigratingConfig: function getMigratingConfig() {
  14807. return {
  14808. props: {
  14809. 'theme': 'theme is removed.'
  14810. }
  14811. };
  14812. },
  14813. getColorChannels: function getColorChannels(color) {
  14814. color = color.replace('#', '');
  14815. if (/^[0-9a-fA-F]{3}$/.test(color)) {
  14816. color = color.split('');
  14817. for (var i = 2; i >= 0; i--) {
  14818. color.splice(i, 0, color[i]);
  14819. }
  14820. color = color.join('');
  14821. }
  14822. if (/^[0-9a-fA-F]{6}$/.test(color)) {
  14823. return {
  14824. red: parseInt(color.slice(0, 2), 16),
  14825. green: parseInt(color.slice(2, 4), 16),
  14826. blue: parseInt(color.slice(4, 6), 16)
  14827. };
  14828. } else {
  14829. return {
  14830. red: 255,
  14831. green: 255,
  14832. blue: 255
  14833. };
  14834. }
  14835. },
  14836. mixColor: function mixColor(color, percent) {
  14837. var _getColorChannels = this.getColorChannels(color),
  14838. red = _getColorChannels.red,
  14839. green = _getColorChannels.green,
  14840. blue = _getColorChannels.blue;
  14841. if (percent > 0) {
  14842. // shade given color
  14843. red *= 1 - percent;
  14844. green *= 1 - percent;
  14845. blue *= 1 - percent;
  14846. } else {
  14847. // tint given color
  14848. red += (255 - red) * percent;
  14849. green += (255 - green) * percent;
  14850. blue += (255 - blue) * percent;
  14851. }
  14852. return 'rgb(' + Math.round(red) + ', ' + Math.round(green) + ', ' + Math.round(blue) + ')';
  14853. },
  14854. addItem: function addItem(item) {
  14855. this.$set(this.items, item.index, item);
  14856. },
  14857. removeItem: function removeItem(item) {
  14858. delete this.items[item.index];
  14859. },
  14860. addSubmenu: function addSubmenu(item) {
  14861. this.$set(this.submenus, item.index, item);
  14862. },
  14863. removeSubmenu: function removeSubmenu(item) {
  14864. delete this.submenus[item.index];
  14865. },
  14866. openMenu: function openMenu(index, indexPath) {
  14867. var openedMenus = this.openedMenus;
  14868. if (openedMenus.indexOf(index) !== -1) return;
  14869. // 将不在该菜单路径下的其余菜单收起
  14870. // collapse all menu that are not under current menu item
  14871. if (this.uniqueOpened) {
  14872. this.openedMenus = openedMenus.filter(function (index) {
  14873. return indexPath.indexOf(index) !== -1;
  14874. });
  14875. }
  14876. this.openedMenus.push(index);
  14877. },
  14878. closeMenu: function closeMenu(index) {
  14879. var i = this.openedMenus.indexOf(index);
  14880. if (i !== -1) {
  14881. this.openedMenus.splice(i, 1);
  14882. }
  14883. },
  14884. handleSubmenuClick: function handleSubmenuClick(submenu) {
  14885. var index = submenu.index,
  14886. indexPath = submenu.indexPath;
  14887. var isOpened = this.openedMenus.indexOf(index) !== -1;
  14888. if (isOpened) {
  14889. this.closeMenu(index);
  14890. this.$emit('close', index, indexPath);
  14891. } else {
  14892. this.openMenu(index, indexPath);
  14893. this.$emit('open', index, indexPath);
  14894. }
  14895. },
  14896. handleItemClick: function handleItemClick(item) {
  14897. var _this = this;
  14898. var index = item.index,
  14899. indexPath = item.indexPath;
  14900. var oldActiveIndex = this.activeIndex;
  14901. var hasIndex = item.index !== null;
  14902. if (hasIndex) {
  14903. this.activeIndex = item.index;
  14904. }
  14905. this.$emit('select', index, indexPath, item);
  14906. if (this.mode === 'horizontal' || this.collapse) {
  14907. this.openedMenus = [];
  14908. }
  14909. if (this.router && hasIndex) {
  14910. this.routeToItem(item, function (error) {
  14911. _this.activeIndex = oldActiveIndex;
  14912. if (error) {
  14913. // vue-router 3.1.0+ push/replace cause NavigationDuplicated error
  14914. // https://github.com/ElemeFE/element/issues/17044
  14915. if (error.name === 'NavigationDuplicated') return;
  14916. console.error(error);
  14917. }
  14918. });
  14919. }
  14920. },
  14921. // 初始化展开菜单
  14922. // initialize opened menu
  14923. initOpenedMenu: function initOpenedMenu() {
  14924. var _this2 = this;
  14925. var index = this.activeIndex;
  14926. var activeItem = this.items[index];
  14927. if (!activeItem || this.mode === 'horizontal' || this.collapse) return;
  14928. var indexPath = activeItem.indexPath;
  14929. // 展开该菜单项的路径上所有子菜单
  14930. // expand all submenus of the menu item
  14931. indexPath.forEach(function (index) {
  14932. var submenu = _this2.submenus[index];
  14933. submenu && _this2.openMenu(index, submenu.indexPath);
  14934. });
  14935. },
  14936. routeToItem: function routeToItem(item, onError) {
  14937. var route = item.route || item.index;
  14938. try {
  14939. this.$router.push(route, function () {}, onError);
  14940. } catch (e) {
  14941. console.error(e);
  14942. }
  14943. },
  14944. open: function open(index) {
  14945. var _this3 = this;
  14946. var indexPath = this.submenus[index.toString()].indexPath;
  14947. indexPath.forEach(function (i) {
  14948. return _this3.openMenu(i, indexPath);
  14949. });
  14950. },
  14951. close: function close(index) {
  14952. this.closeMenu(index);
  14953. }
  14954. },
  14955. mounted: function mounted() {
  14956. this.initOpenedMenu();
  14957. this.$on('item-click', this.handleItemClick);
  14958. this.$on('submenu-click', this.handleSubmenuClick);
  14959. if (this.mode === 'horizontal') {
  14960. new aria_menubar(this.$el); // eslint-disable-line
  14961. }
  14962. this.$watch('items', this.updateActiveIndex);
  14963. }
  14964. });
  14965. // CONCATENATED MODULE: ./packages/menu/src/menu.vue?vue&type=script&lang=js&
  14966. /* harmony default export */ var src_menuvue_type_script_lang_js_ = (menuvue_type_script_lang_js_);
  14967. // CONCATENATED MODULE: ./packages/menu/src/menu.vue
  14968. var menu_render, menu_staticRenderFns
  14969. /* normalize component */
  14970. var menu_component = normalizeComponent(
  14971. src_menuvue_type_script_lang_js_,
  14972. menu_render,
  14973. menu_staticRenderFns,
  14974. false,
  14975. null,
  14976. null,
  14977. null
  14978. )
  14979. /* hot reload */
  14980. if (false) { var menu_api; }
  14981. menu_component.options.__file = "packages/menu/src/menu.vue"
  14982. /* harmony default export */ var src_menu = (menu_component.exports);
  14983. // CONCATENATED MODULE: ./packages/menu/index.js
  14984. /* istanbul ignore next */
  14985. src_menu.install = function (Vue) {
  14986. Vue.component(src_menu.name, src_menu);
  14987. };
  14988. /* harmony default export */ var packages_menu = (src_menu);
  14989. // EXTERNAL MODULE: external "element-ui/lib/transitions/collapse-transition"
  14990. var collapse_transition_ = __webpack_require__(21);
  14991. var collapse_transition_default = /*#__PURE__*/__webpack_require__.n(collapse_transition_);
  14992. // CONCATENATED MODULE: ./packages/menu/src/menu-mixin.js
  14993. /* harmony default export */ var menu_mixin = ({
  14994. inject: ['rootMenu'],
  14995. computed: {
  14996. indexPath: function indexPath() {
  14997. var path = [this.index];
  14998. var parent = this.$parent;
  14999. while (parent.$options.componentName !== 'ElMenu') {
  15000. if (parent.index) {
  15001. path.unshift(parent.index);
  15002. }
  15003. parent = parent.$parent;
  15004. }
  15005. return path;
  15006. },
  15007. parentMenu: function parentMenu() {
  15008. var parent = this.$parent;
  15009. while (parent && ['ElMenu', 'ElSubmenu'].indexOf(parent.$options.componentName) === -1) {
  15010. parent = parent.$parent;
  15011. }
  15012. return parent;
  15013. },
  15014. paddingStyle: function paddingStyle() {
  15015. if (this.rootMenu.mode !== 'vertical') return {};
  15016. var padding = 20;
  15017. var parent = this.$parent;
  15018. if (this.rootMenu.collapse) {
  15019. padding = 20;
  15020. } else {
  15021. while (parent && parent.$options.componentName !== 'ElMenu') {
  15022. if (parent.$options.componentName === 'ElSubmenu') {
  15023. padding += 20;
  15024. }
  15025. parent = parent.$parent;
  15026. }
  15027. }
  15028. return { paddingLeft: padding + 'px' };
  15029. }
  15030. }
  15031. });
  15032. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=script&lang=js&
  15033. var poperMixins = {
  15034. props: {
  15035. transformOrigin: {
  15036. type: [Boolean, String],
  15037. default: false
  15038. },
  15039. offset: vue_popper_default.a.props.offset,
  15040. boundariesPadding: vue_popper_default.a.props.boundariesPadding,
  15041. popperOptions: vue_popper_default.a.props.popperOptions
  15042. },
  15043. data: vue_popper_default.a.data,
  15044. methods: vue_popper_default.a.methods,
  15045. beforeDestroy: vue_popper_default.a.beforeDestroy,
  15046. deactivated: vue_popper_default.a.deactivated
  15047. };
  15048. /* harmony default export */ var submenuvue_type_script_lang_js_ = ({
  15049. name: 'ElSubmenu',
  15050. componentName: 'ElSubmenu',
  15051. mixins: [menu_mixin, emitter_default.a, poperMixins],
  15052. components: { ElCollapseTransition: collapse_transition_default.a },
  15053. props: {
  15054. index: {
  15055. type: String,
  15056. required: true
  15057. },
  15058. showTimeout: {
  15059. type: Number,
  15060. default: 300
  15061. },
  15062. hideTimeout: {
  15063. type: Number,
  15064. default: 300
  15065. },
  15066. popperClass: String,
  15067. disabled: Boolean,
  15068. popperAppendToBody: {
  15069. type: Boolean,
  15070. default: undefined
  15071. }
  15072. },
  15073. data: function data() {
  15074. return {
  15075. popperJS: null,
  15076. timeout: null,
  15077. items: {},
  15078. submenus: {},
  15079. mouseInChild: false
  15080. };
  15081. },
  15082. watch: {
  15083. opened: function opened(val) {
  15084. var _this = this;
  15085. if (this.isMenuPopup) {
  15086. this.$nextTick(function (_) {
  15087. _this.updatePopper();
  15088. });
  15089. }
  15090. }
  15091. },
  15092. computed: {
  15093. // popper option
  15094. appendToBody: function appendToBody() {
  15095. return this.popperAppendToBody === undefined ? this.isFirstLevel : this.popperAppendToBody;
  15096. },
  15097. menuTransitionName: function menuTransitionName() {
  15098. return this.rootMenu.collapse ? 'el-zoom-in-left' : 'el-zoom-in-top';
  15099. },
  15100. opened: function opened() {
  15101. return this.rootMenu.openedMenus.indexOf(this.index) > -1;
  15102. },
  15103. active: function active() {
  15104. var isActive = false;
  15105. var submenus = this.submenus;
  15106. var items = this.items;
  15107. Object.keys(items).forEach(function (index) {
  15108. if (items[index].active) {
  15109. isActive = true;
  15110. }
  15111. });
  15112. Object.keys(submenus).forEach(function (index) {
  15113. if (submenus[index].active) {
  15114. isActive = true;
  15115. }
  15116. });
  15117. return isActive;
  15118. },
  15119. hoverBackground: function hoverBackground() {
  15120. return this.rootMenu.hoverBackground;
  15121. },
  15122. backgroundColor: function backgroundColor() {
  15123. return this.rootMenu.backgroundColor || '';
  15124. },
  15125. activeTextColor: function activeTextColor() {
  15126. return this.rootMenu.activeTextColor || '';
  15127. },
  15128. textColor: function textColor() {
  15129. return this.rootMenu.textColor || '';
  15130. },
  15131. mode: function mode() {
  15132. return this.rootMenu.mode;
  15133. },
  15134. isMenuPopup: function isMenuPopup() {
  15135. return this.rootMenu.isMenuPopup;
  15136. },
  15137. titleStyle: function titleStyle() {
  15138. if (this.mode !== 'horizontal') {
  15139. return {
  15140. color: this.textColor
  15141. };
  15142. }
  15143. return {
  15144. borderBottomColor: this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent',
  15145. color: this.active ? this.activeTextColor : this.textColor
  15146. };
  15147. },
  15148. isFirstLevel: function isFirstLevel() {
  15149. var isFirstLevel = true;
  15150. var parent = this.$parent;
  15151. while (parent && parent !== this.rootMenu) {
  15152. if (['ElSubmenu', 'ElMenuItemGroup'].indexOf(parent.$options.componentName) > -1) {
  15153. isFirstLevel = false;
  15154. break;
  15155. } else {
  15156. parent = parent.$parent;
  15157. }
  15158. }
  15159. return isFirstLevel;
  15160. }
  15161. },
  15162. methods: {
  15163. handleCollapseToggle: function handleCollapseToggle(value) {
  15164. if (value) {
  15165. this.initPopper();
  15166. } else {
  15167. this.doDestroy();
  15168. }
  15169. },
  15170. addItem: function addItem(item) {
  15171. this.$set(this.items, item.index, item);
  15172. },
  15173. removeItem: function removeItem(item) {
  15174. delete this.items[item.index];
  15175. },
  15176. addSubmenu: function addSubmenu(item) {
  15177. this.$set(this.submenus, item.index, item);
  15178. },
  15179. removeSubmenu: function removeSubmenu(item) {
  15180. delete this.submenus[item.index];
  15181. },
  15182. handleClick: function handleClick() {
  15183. var rootMenu = this.rootMenu,
  15184. disabled = this.disabled;
  15185. if (rootMenu.menuTrigger === 'hover' && rootMenu.mode === 'horizontal' || rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
  15186. return;
  15187. }
  15188. this.dispatch('ElMenu', 'submenu-click', this);
  15189. },
  15190. handleMouseenter: function handleMouseenter(event) {
  15191. var _this2 = this;
  15192. var showTimeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.showTimeout;
  15193. if (!('ActiveXObject' in window) && event.type === 'focus' && !event.relatedTarget) {
  15194. return;
  15195. }
  15196. var rootMenu = this.rootMenu,
  15197. disabled = this.disabled;
  15198. if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
  15199. return;
  15200. }
  15201. this.dispatch('ElSubmenu', 'mouse-enter-child');
  15202. clearTimeout(this.timeout);
  15203. this.timeout = setTimeout(function () {
  15204. _this2.rootMenu.openMenu(_this2.index, _this2.indexPath);
  15205. }, showTimeout);
  15206. if (this.appendToBody) {
  15207. this.$parent.$el.dispatchEvent(new MouseEvent('mouseenter'));
  15208. }
  15209. },
  15210. handleMouseleave: function handleMouseleave() {
  15211. var _this3 = this;
  15212. var deepDispatch = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  15213. var rootMenu = this.rootMenu;
  15214. if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical') {
  15215. return;
  15216. }
  15217. this.dispatch('ElSubmenu', 'mouse-leave-child');
  15218. clearTimeout(this.timeout);
  15219. this.timeout = setTimeout(function () {
  15220. !_this3.mouseInChild && _this3.rootMenu.closeMenu(_this3.index);
  15221. }, this.hideTimeout);
  15222. if (this.appendToBody && deepDispatch) {
  15223. if (this.$parent.$options.name === 'ElSubmenu') {
  15224. this.$parent.handleMouseleave(true);
  15225. }
  15226. }
  15227. },
  15228. handleTitleMouseenter: function handleTitleMouseenter() {
  15229. if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
  15230. var title = this.$refs['submenu-title'];
  15231. title && (title.style.backgroundColor = this.rootMenu.hoverBackground);
  15232. },
  15233. handleTitleMouseleave: function handleTitleMouseleave() {
  15234. if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
  15235. var title = this.$refs['submenu-title'];
  15236. title && (title.style.backgroundColor = this.rootMenu.backgroundColor || '');
  15237. },
  15238. updatePlacement: function updatePlacement() {
  15239. this.currentPlacement = this.mode === 'horizontal' && this.isFirstLevel ? 'bottom-start' : 'right-start';
  15240. },
  15241. initPopper: function initPopper() {
  15242. this.referenceElm = this.$el;
  15243. this.popperElm = this.$refs.menu;
  15244. this.updatePlacement();
  15245. }
  15246. },
  15247. created: function created() {
  15248. var _this4 = this;
  15249. this.$on('toggle-collapse', this.handleCollapseToggle);
  15250. this.$on('mouse-enter-child', function () {
  15251. _this4.mouseInChild = true;
  15252. clearTimeout(_this4.timeout);
  15253. });
  15254. this.$on('mouse-leave-child', function () {
  15255. _this4.mouseInChild = false;
  15256. clearTimeout(_this4.timeout);
  15257. });
  15258. },
  15259. mounted: function mounted() {
  15260. this.parentMenu.addSubmenu(this);
  15261. this.rootMenu.addSubmenu(this);
  15262. this.initPopper();
  15263. },
  15264. beforeDestroy: function beforeDestroy() {
  15265. this.parentMenu.removeSubmenu(this);
  15266. this.rootMenu.removeSubmenu(this);
  15267. },
  15268. render: function render(h) {
  15269. var _this5 = this;
  15270. var active = this.active,
  15271. opened = this.opened,
  15272. paddingStyle = this.paddingStyle,
  15273. titleStyle = this.titleStyle,
  15274. backgroundColor = this.backgroundColor,
  15275. rootMenu = this.rootMenu,
  15276. currentPlacement = this.currentPlacement,
  15277. menuTransitionName = this.menuTransitionName,
  15278. mode = this.mode,
  15279. disabled = this.disabled,
  15280. popperClass = this.popperClass,
  15281. $slots = this.$slots,
  15282. isFirstLevel = this.isFirstLevel;
  15283. var popupMenu = h(
  15284. 'transition',
  15285. {
  15286. attrs: { name: menuTransitionName }
  15287. },
  15288. [h(
  15289. 'div',
  15290. {
  15291. ref: 'menu',
  15292. directives: [{
  15293. name: 'show',
  15294. value: opened
  15295. }],
  15296. 'class': ['el-menu--' + mode, popperClass],
  15297. on: {
  15298. 'mouseenter': function mouseenter($event) {
  15299. return _this5.handleMouseenter($event, 100);
  15300. },
  15301. 'mouseleave': function mouseleave() {
  15302. return _this5.handleMouseleave(true);
  15303. },
  15304. 'focus': function focus($event) {
  15305. return _this5.handleMouseenter($event, 100);
  15306. }
  15307. }
  15308. },
  15309. [h(
  15310. 'ul',
  15311. {
  15312. attrs: {
  15313. role: 'menu'
  15314. },
  15315. 'class': ['el-menu el-menu--popup', 'el-menu--popup-' + currentPlacement],
  15316. style: { backgroundColor: rootMenu.backgroundColor || '' } },
  15317. [$slots.default]
  15318. )]
  15319. )]
  15320. );
  15321. var inlineMenu = h('el-collapse-transition', [h(
  15322. 'ul',
  15323. {
  15324. attrs: {
  15325. role: 'menu'
  15326. },
  15327. 'class': 'el-menu el-menu--inline',
  15328. directives: [{
  15329. name: 'show',
  15330. value: opened
  15331. }],
  15332. style: { backgroundColor: rootMenu.backgroundColor || '' } },
  15333. [$slots.default]
  15334. )]);
  15335. var submenuTitleIcon = rootMenu.mode === 'horizontal' && isFirstLevel || rootMenu.mode === 'vertical' && !rootMenu.collapse ? 'el-icon-arrow-down' : 'el-icon-arrow-right';
  15336. return h(
  15337. 'li',
  15338. {
  15339. 'class': {
  15340. 'el-submenu': true,
  15341. 'is-active': active,
  15342. 'is-opened': opened,
  15343. 'is-disabled': disabled
  15344. },
  15345. attrs: { role: 'menuitem',
  15346. 'aria-haspopup': 'true',
  15347. 'aria-expanded': opened
  15348. },
  15349. on: {
  15350. 'mouseenter': this.handleMouseenter,
  15351. 'mouseleave': function mouseleave() {
  15352. return _this5.handleMouseleave(false);
  15353. },
  15354. 'focus': this.handleMouseenter
  15355. }
  15356. },
  15357. [h(
  15358. 'div',
  15359. {
  15360. 'class': 'el-submenu__title',
  15361. ref: 'submenu-title',
  15362. on: {
  15363. 'click': this.handleClick,
  15364. 'mouseenter': this.handleTitleMouseenter,
  15365. 'mouseleave': this.handleTitleMouseleave
  15366. },
  15367. style: [paddingStyle, titleStyle, { backgroundColor: backgroundColor }]
  15368. },
  15369. [$slots.title, h('i', { 'class': ['el-submenu__icon-arrow', submenuTitleIcon] })]
  15370. ), this.isMenuPopup ? popupMenu : inlineMenu]
  15371. );
  15372. }
  15373. });
  15374. // CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=script&lang=js&
  15375. /* harmony default export */ var src_submenuvue_type_script_lang_js_ = (submenuvue_type_script_lang_js_);
  15376. // CONCATENATED MODULE: ./packages/menu/src/submenu.vue
  15377. var submenu_render, submenu_staticRenderFns
  15378. /* normalize component */
  15379. var submenu_component = normalizeComponent(
  15380. src_submenuvue_type_script_lang_js_,
  15381. submenu_render,
  15382. submenu_staticRenderFns,
  15383. false,
  15384. null,
  15385. null,
  15386. null
  15387. )
  15388. /* hot reload */
  15389. if (false) { var submenu_api; }
  15390. submenu_component.options.__file = "packages/menu/src/submenu.vue"
  15391. /* harmony default export */ var submenu = (submenu_component.exports);
  15392. // CONCATENATED MODULE: ./packages/submenu/index.js
  15393. /* istanbul ignore next */
  15394. submenu.install = function (Vue) {
  15395. Vue.component(submenu.name, submenu);
  15396. };
  15397. /* harmony default export */ var packages_submenu = (submenu);
  15398. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item.vue?vue&type=template&id=2a5dbfea&
  15399. var menu_itemvue_type_template_id_2a5dbfea_render = function() {
  15400. var _vm = this
  15401. var _h = _vm.$createElement
  15402. var _c = _vm._self._c || _h
  15403. return _c(
  15404. "li",
  15405. {
  15406. staticClass: "el-menu-item",
  15407. class: {
  15408. "is-active": _vm.active,
  15409. "is-disabled": _vm.disabled
  15410. },
  15411. style: [
  15412. _vm.paddingStyle,
  15413. _vm.itemStyle,
  15414. { backgroundColor: _vm.backgroundColor }
  15415. ],
  15416. attrs: { role: "menuitem", tabindex: "-1" },
  15417. on: {
  15418. click: _vm.handleClick,
  15419. mouseenter: _vm.onMouseEnter,
  15420. focus: _vm.onMouseEnter,
  15421. blur: _vm.onMouseLeave,
  15422. mouseleave: _vm.onMouseLeave
  15423. }
  15424. },
  15425. [
  15426. _vm.parentMenu.$options.componentName === "ElMenu" &&
  15427. _vm.rootMenu.collapse &&
  15428. _vm.$slots.title
  15429. ? _c("el-tooltip", { attrs: { effect: "dark", placement: "right" } }, [
  15430. _c(
  15431. "div",
  15432. { attrs: { slot: "content" }, slot: "content" },
  15433. [_vm._t("title")],
  15434. 2
  15435. ),
  15436. _c(
  15437. "div",
  15438. {
  15439. staticStyle: {
  15440. position: "absolute",
  15441. left: "0",
  15442. top: "0",
  15443. height: "100%",
  15444. width: "100%",
  15445. display: "inline-block",
  15446. "box-sizing": "border-box",
  15447. padding: "0 20px"
  15448. }
  15449. },
  15450. [_vm._t("default")],
  15451. 2
  15452. )
  15453. ])
  15454. : [_vm._t("default"), _vm._t("title")]
  15455. ],
  15456. 2
  15457. )
  15458. }
  15459. var menu_itemvue_type_template_id_2a5dbfea_staticRenderFns = []
  15460. menu_itemvue_type_template_id_2a5dbfea_render._withStripped = true
  15461. // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=template&id=2a5dbfea&
  15462. // EXTERNAL MODULE: external "element-ui/lib/tooltip"
  15463. var tooltip_ = __webpack_require__(26);
  15464. var tooltip_default = /*#__PURE__*/__webpack_require__.n(tooltip_);
  15465. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item.vue?vue&type=script&lang=js&
  15466. //
  15467. //
  15468. //
  15469. //
  15470. //
  15471. //
  15472. //
  15473. //
  15474. //
  15475. //
  15476. //
  15477. //
  15478. //
  15479. //
  15480. //
  15481. //
  15482. //
  15483. //
  15484. //
  15485. //
  15486. //
  15487. //
  15488. //
  15489. //
  15490. //
  15491. //
  15492. //
  15493. //
  15494. //
  15495. //
  15496. /* harmony default export */ var menu_itemvue_type_script_lang_js_ = ({
  15497. name: 'ElMenuItem',
  15498. componentName: 'ElMenuItem',
  15499. mixins: [menu_mixin, emitter_default.a],
  15500. components: { ElTooltip: tooltip_default.a },
  15501. props: {
  15502. index: {
  15503. default: null,
  15504. validator: function validator(val) {
  15505. return typeof val === 'string' || val === null;
  15506. }
  15507. },
  15508. route: [String, Object],
  15509. disabled: Boolean
  15510. },
  15511. computed: {
  15512. active: function active() {
  15513. return this.index === this.rootMenu.activeIndex;
  15514. },
  15515. hoverBackground: function hoverBackground() {
  15516. return this.rootMenu.hoverBackground;
  15517. },
  15518. backgroundColor: function backgroundColor() {
  15519. return this.rootMenu.backgroundColor || '';
  15520. },
  15521. activeTextColor: function activeTextColor() {
  15522. return this.rootMenu.activeTextColor || '';
  15523. },
  15524. textColor: function textColor() {
  15525. return this.rootMenu.textColor || '';
  15526. },
  15527. mode: function mode() {
  15528. return this.rootMenu.mode;
  15529. },
  15530. itemStyle: function itemStyle() {
  15531. var style = {
  15532. color: this.active ? this.activeTextColor : this.textColor
  15533. };
  15534. if (this.mode === 'horizontal' && !this.isNested) {
  15535. style.borderBottomColor = this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent';
  15536. }
  15537. return style;
  15538. },
  15539. isNested: function isNested() {
  15540. return this.parentMenu !== this.rootMenu;
  15541. }
  15542. },
  15543. methods: {
  15544. onMouseEnter: function onMouseEnter() {
  15545. if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
  15546. this.$el.style.backgroundColor = this.hoverBackground;
  15547. },
  15548. onMouseLeave: function onMouseLeave() {
  15549. if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
  15550. this.$el.style.backgroundColor = this.backgroundColor;
  15551. },
  15552. handleClick: function handleClick() {
  15553. if (!this.disabled) {
  15554. this.dispatch('ElMenu', 'item-click', this);
  15555. this.$emit('click', this);
  15556. }
  15557. }
  15558. },
  15559. mounted: function mounted() {
  15560. this.parentMenu.addItem(this);
  15561. this.rootMenu.addItem(this);
  15562. },
  15563. beforeDestroy: function beforeDestroy() {
  15564. this.parentMenu.removeItem(this);
  15565. this.rootMenu.removeItem(this);
  15566. }
  15567. });
  15568. // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=script&lang=js&
  15569. /* harmony default export */ var src_menu_itemvue_type_script_lang_js_ = (menu_itemvue_type_script_lang_js_);
  15570. // CONCATENATED MODULE: ./packages/menu/src/menu-item.vue
  15571. /* normalize component */
  15572. var menu_item_component = normalizeComponent(
  15573. src_menu_itemvue_type_script_lang_js_,
  15574. menu_itemvue_type_template_id_2a5dbfea_render,
  15575. menu_itemvue_type_template_id_2a5dbfea_staticRenderFns,
  15576. false,
  15577. null,
  15578. null,
  15579. null
  15580. )
  15581. /* hot reload */
  15582. if (false) { var menu_item_api; }
  15583. menu_item_component.options.__file = "packages/menu/src/menu-item.vue"
  15584. /* harmony default export */ var menu_item = (menu_item_component.exports);
  15585. // CONCATENATED MODULE: ./packages/menu-item/index.js
  15586. /* istanbul ignore next */
  15587. menu_item.install = function (Vue) {
  15588. Vue.component(menu_item.name, menu_item);
  15589. };
  15590. /* harmony default export */ var packages_menu_item = (menu_item);
  15591. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item-group.vue?vue&type=template&id=543b7bdc&
  15592. var menu_item_groupvue_type_template_id_543b7bdc_render = function() {
  15593. var _vm = this
  15594. var _h = _vm.$createElement
  15595. var _c = _vm._self._c || _h
  15596. return _c("li", { staticClass: "el-menu-item-group" }, [
  15597. _c(
  15598. "div",
  15599. {
  15600. staticClass: "el-menu-item-group__title",
  15601. style: { paddingLeft: _vm.levelPadding + "px" }
  15602. },
  15603. [!_vm.$slots.title ? [_vm._v(_vm._s(_vm.title))] : _vm._t("title")],
  15604. 2
  15605. ),
  15606. _c("ul", [_vm._t("default")], 2)
  15607. ])
  15608. }
  15609. var menu_item_groupvue_type_template_id_543b7bdc_staticRenderFns = []
  15610. menu_item_groupvue_type_template_id_543b7bdc_render._withStripped = true
  15611. // CONCATENATED MODULE: ./packages/menu/src/menu-item-group.vue?vue&type=template&id=543b7bdc&
  15612. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item-group.vue?vue&type=script&lang=js&
  15613. //
  15614. //
  15615. //
  15616. //
  15617. //
  15618. //
  15619. //
  15620. //
  15621. //
  15622. //
  15623. //
  15624. /* harmony default export */ var menu_item_groupvue_type_script_lang_js_ = ({
  15625. name: 'ElMenuItemGroup',
  15626. componentName: 'ElMenuItemGroup',
  15627. inject: ['rootMenu'],
  15628. props: {
  15629. title: {
  15630. type: String
  15631. }
  15632. },
  15633. data: function data() {
  15634. return {
  15635. paddingLeft: 20
  15636. };
  15637. },
  15638. computed: {
  15639. levelPadding: function levelPadding() {
  15640. var padding = 20;
  15641. var parent = this.$parent;
  15642. if (this.rootMenu.collapse) return 20;
  15643. while (parent && parent.$options.componentName !== 'ElMenu') {
  15644. if (parent.$options.componentName === 'ElSubmenu') {
  15645. padding += 20;
  15646. }
  15647. parent = parent.$parent;
  15648. }
  15649. return padding;
  15650. }
  15651. }
  15652. });
  15653. // CONCATENATED MODULE: ./packages/menu/src/menu-item-group.vue?vue&type=script&lang=js&
  15654. /* harmony default export */ var src_menu_item_groupvue_type_script_lang_js_ = (menu_item_groupvue_type_script_lang_js_);
  15655. // CONCATENATED MODULE: ./packages/menu/src/menu-item-group.vue
  15656. /* normalize component */
  15657. var menu_item_group_component = normalizeComponent(
  15658. src_menu_item_groupvue_type_script_lang_js_,
  15659. menu_item_groupvue_type_template_id_543b7bdc_render,
  15660. menu_item_groupvue_type_template_id_543b7bdc_staticRenderFns,
  15661. false,
  15662. null,
  15663. null,
  15664. null
  15665. )
  15666. /* hot reload */
  15667. if (false) { var menu_item_group_api; }
  15668. menu_item_group_component.options.__file = "packages/menu/src/menu-item-group.vue"
  15669. /* harmony default export */ var menu_item_group = (menu_item_group_component.exports);
  15670. // CONCATENATED MODULE: ./packages/menu-item-group/index.js
  15671. /* istanbul ignore next */
  15672. menu_item_group.install = function (Vue) {
  15673. Vue.component(menu_item_group.name, menu_item_group);
  15674. };
  15675. /* harmony default export */ var packages_menu_item_group = (menu_item_group);
  15676. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=343dd774&
  15677. var inputvue_type_template_id_343dd774_render = function() {
  15678. var _vm = this
  15679. var _h = _vm.$createElement
  15680. var _c = _vm._self._c || _h
  15681. return _c(
  15682. "div",
  15683. {
  15684. class: [
  15685. _vm.type === "textarea" ? "el-textarea" : "el-input",
  15686. _vm.inputSize ? "el-input--" + _vm.inputSize : "",
  15687. {
  15688. "is-disabled": _vm.inputDisabled,
  15689. "is-exceed": _vm.inputExceed,
  15690. "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
  15691. "el-input-group--append": _vm.$slots.append,
  15692. "el-input-group--prepend": _vm.$slots.prepend,
  15693. "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
  15694. "el-input--suffix":
  15695. _vm.$slots.suffix ||
  15696. _vm.suffixIcon ||
  15697. _vm.clearable ||
  15698. _vm.showPassword
  15699. }
  15700. ],
  15701. on: {
  15702. mouseenter: function($event) {
  15703. _vm.hovering = true
  15704. },
  15705. mouseleave: function($event) {
  15706. _vm.hovering = false
  15707. }
  15708. }
  15709. },
  15710. [
  15711. _vm.type !== "textarea"
  15712. ? [
  15713. _vm.$slots.prepend
  15714. ? _c(
  15715. "div",
  15716. { staticClass: "el-input-group__prepend" },
  15717. [_vm._t("prepend")],
  15718. 2
  15719. )
  15720. : _vm._e(),
  15721. _vm.type !== "textarea"
  15722. ? _c(
  15723. "input",
  15724. _vm._b(
  15725. {
  15726. ref: "input",
  15727. staticClass: "el-input__inner",
  15728. attrs: {
  15729. tabindex: _vm.tabindex,
  15730. type: _vm.showPassword
  15731. ? _vm.passwordVisible
  15732. ? "text"
  15733. : "password"
  15734. : _vm.type,
  15735. disabled: _vm.inputDisabled,
  15736. readonly: _vm.readonly,
  15737. autocomplete: _vm.autoComplete || _vm.autocomplete,
  15738. "aria-label": _vm.label
  15739. },
  15740. on: {
  15741. compositionstart: _vm.handleCompositionStart,
  15742. compositionupdate: _vm.handleCompositionUpdate,
  15743. compositionend: _vm.handleCompositionEnd,
  15744. input: _vm.handleInput,
  15745. focus: _vm.handleFocus,
  15746. blur: _vm.handleBlur,
  15747. change: _vm.handleChange
  15748. }
  15749. },
  15750. "input",
  15751. _vm.$attrs,
  15752. false
  15753. )
  15754. )
  15755. : _vm._e(),
  15756. _vm.$slots.prefix || _vm.prefixIcon
  15757. ? _c(
  15758. "span",
  15759. { staticClass: "el-input__prefix" },
  15760. [
  15761. _vm._t("prefix"),
  15762. _vm.prefixIcon
  15763. ? _c("i", {
  15764. staticClass: "el-input__icon",
  15765. class: _vm.prefixIcon
  15766. })
  15767. : _vm._e()
  15768. ],
  15769. 2
  15770. )
  15771. : _vm._e(),
  15772. _vm.getSuffixVisible()
  15773. ? _c("span", { staticClass: "el-input__suffix" }, [
  15774. _c(
  15775. "span",
  15776. { staticClass: "el-input__suffix-inner" },
  15777. [
  15778. !_vm.showClear ||
  15779. !_vm.showPwdVisible ||
  15780. !_vm.isWordLimitVisible
  15781. ? [
  15782. _vm._t("suffix"),
  15783. _vm.suffixIcon
  15784. ? _c("i", {
  15785. staticClass: "el-input__icon",
  15786. class: _vm.suffixIcon
  15787. })
  15788. : _vm._e()
  15789. ]
  15790. : _vm._e(),
  15791. _vm.showClear
  15792. ? _c("i", {
  15793. staticClass:
  15794. "el-input__icon el-icon-circle-close el-input__clear",
  15795. on: {
  15796. mousedown: function($event) {
  15797. $event.preventDefault()
  15798. },
  15799. click: _vm.clear
  15800. }
  15801. })
  15802. : _vm._e(),
  15803. _vm.showPwdVisible
  15804. ? _c("i", {
  15805. staticClass:
  15806. "el-input__icon el-icon-view el-input__clear",
  15807. on: { click: _vm.handlePasswordVisible }
  15808. })
  15809. : _vm._e(),
  15810. _vm.isWordLimitVisible
  15811. ? _c("span", { staticClass: "el-input__count" }, [
  15812. _c(
  15813. "span",
  15814. { staticClass: "el-input__count-inner" },
  15815. [
  15816. _vm._v(
  15817. "\n " +
  15818. _vm._s(_vm.textLength) +
  15819. "/" +
  15820. _vm._s(_vm.upperLimit) +
  15821. "\n "
  15822. )
  15823. ]
  15824. )
  15825. ])
  15826. : _vm._e()
  15827. ],
  15828. 2
  15829. ),
  15830. _vm.validateState
  15831. ? _c("i", {
  15832. staticClass: "el-input__icon",
  15833. class: ["el-input__validateIcon", _vm.validateIcon]
  15834. })
  15835. : _vm._e()
  15836. ])
  15837. : _vm._e(),
  15838. _vm.$slots.append
  15839. ? _c(
  15840. "div",
  15841. { staticClass: "el-input-group__append" },
  15842. [_vm._t("append")],
  15843. 2
  15844. )
  15845. : _vm._e()
  15846. ]
  15847. : _c(
  15848. "textarea",
  15849. _vm._b(
  15850. {
  15851. ref: "textarea",
  15852. staticClass: "el-textarea__inner",
  15853. style: _vm.textareaStyle,
  15854. attrs: {
  15855. tabindex: _vm.tabindex,
  15856. disabled: _vm.inputDisabled,
  15857. readonly: _vm.readonly,
  15858. autocomplete: _vm.autoComplete || _vm.autocomplete,
  15859. "aria-label": _vm.label
  15860. },
  15861. on: {
  15862. compositionstart: _vm.handleCompositionStart,
  15863. compositionupdate: _vm.handleCompositionUpdate,
  15864. compositionend: _vm.handleCompositionEnd,
  15865. input: _vm.handleInput,
  15866. focus: _vm.handleFocus,
  15867. blur: _vm.handleBlur,
  15868. change: _vm.handleChange
  15869. }
  15870. },
  15871. "textarea",
  15872. _vm.$attrs,
  15873. false
  15874. )
  15875. ),
  15876. _vm.isWordLimitVisible && _vm.type === "textarea"
  15877. ? _c("span", { staticClass: "el-input__count" }, [
  15878. _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))
  15879. ])
  15880. : _vm._e()
  15881. ],
  15882. 2
  15883. )
  15884. }
  15885. var inputvue_type_template_id_343dd774_staticRenderFns = []
  15886. inputvue_type_template_id_343dd774_render._withStripped = true
  15887. // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=343dd774&
  15888. // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
  15889. var hiddenTextarea = void 0;
  15890. var HIDDEN_STYLE = '\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
  15891. var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
  15892. function calculateNodeStyling(targetElement) {
  15893. var style = window.getComputedStyle(targetElement);
  15894. var boxSizing = style.getPropertyValue('box-sizing');
  15895. var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
  15896. var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
  15897. var contextStyle = CONTEXT_STYLE.map(function (name) {
  15898. return name + ':' + style.getPropertyValue(name);
  15899. }).join(';');
  15900. return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
  15901. }
  15902. function calcTextareaHeight(targetElement) {
  15903. var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  15904. var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  15905. if (!hiddenTextarea) {
  15906. hiddenTextarea = document.createElement('textarea');
  15907. document.body.appendChild(hiddenTextarea);
  15908. }
  15909. var _calculateNodeStyling = calculateNodeStyling(targetElement),
  15910. paddingSize = _calculateNodeStyling.paddingSize,
  15911. borderSize = _calculateNodeStyling.borderSize,
  15912. boxSizing = _calculateNodeStyling.boxSizing,
  15913. contextStyle = _calculateNodeStyling.contextStyle;
  15914. hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
  15915. hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
  15916. var height = hiddenTextarea.scrollHeight;
  15917. var result = {};
  15918. if (boxSizing === 'border-box') {
  15919. height = height + borderSize;
  15920. } else if (boxSizing === 'content-box') {
  15921. height = height - paddingSize;
  15922. }
  15923. hiddenTextarea.value = '';
  15924. var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  15925. if (minRows !== null) {
  15926. var minHeight = singleRowHeight * minRows;
  15927. if (boxSizing === 'border-box') {
  15928. minHeight = minHeight + paddingSize + borderSize;
  15929. }
  15930. height = Math.max(minHeight, height);
  15931. result.minHeight = minHeight + 'px';
  15932. }
  15933. if (maxRows !== null) {
  15934. var maxHeight = singleRowHeight * maxRows;
  15935. if (boxSizing === 'border-box') {
  15936. maxHeight = maxHeight + paddingSize + borderSize;
  15937. }
  15938. height = Math.min(maxHeight, height);
  15939. }
  15940. result.height = height + 'px';
  15941. hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
  15942. hiddenTextarea = null;
  15943. return result;
  15944. };
  15945. // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
  15946. var merge_ = __webpack_require__(7);
  15947. var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
  15948. // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
  15949. var shared_ = __webpack_require__(19);
  15950. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&
  15951. //
  15952. //
  15953. //
  15954. //
  15955. //
  15956. //
  15957. //
  15958. //
  15959. //
  15960. //
  15961. //
  15962. //
  15963. //
  15964. //
  15965. //
  15966. //
  15967. //
  15968. //
  15969. //
  15970. //
  15971. //
  15972. //
  15973. //
  15974. //
  15975. //
  15976. //
  15977. //
  15978. //
  15979. //
  15980. //
  15981. //
  15982. //
  15983. //
  15984. //
  15985. //
  15986. //
  15987. //
  15988. //
  15989. //
  15990. //
  15991. //
  15992. //
  15993. //
  15994. //
  15995. //
  15996. //
  15997. //
  15998. //
  15999. //
  16000. //
  16001. //
  16002. //
  16003. //
  16004. //
  16005. //
  16006. //
  16007. //
  16008. //
  16009. //
  16010. //
  16011. //
  16012. //
  16013. //
  16014. //
  16015. //
  16016. //
  16017. //
  16018. //
  16019. //
  16020. //
  16021. //
  16022. //
  16023. //
  16024. //
  16025. //
  16026. //
  16027. //
  16028. //
  16029. //
  16030. //
  16031. //
  16032. //
  16033. //
  16034. //
  16035. //
  16036. //
  16037. //
  16038. //
  16039. //
  16040. //
  16041. //
  16042. //
  16043. //
  16044. //
  16045. //
  16046. //
  16047. //
  16048. //
  16049. //
  16050. //
  16051. //
  16052. //
  16053. //
  16054. //
  16055. //
  16056. //
  16057. //
  16058. //
  16059. //
  16060. /* harmony default export */ var inputvue_type_script_lang_js_ = ({
  16061. name: 'ElInput',
  16062. componentName: 'ElInput',
  16063. mixins: [emitter_default.a, migrating_default.a],
  16064. inheritAttrs: false,
  16065. inject: {
  16066. elForm: {
  16067. default: ''
  16068. },
  16069. elFormItem: {
  16070. default: ''
  16071. }
  16072. },
  16073. data: function data() {
  16074. return {
  16075. textareaCalcStyle: {},
  16076. hovering: false,
  16077. focused: false,
  16078. isComposing: false,
  16079. passwordVisible: false
  16080. };
  16081. },
  16082. props: {
  16083. value: [String, Number],
  16084. size: String,
  16085. resize: String,
  16086. form: String,
  16087. disabled: Boolean,
  16088. readonly: Boolean,
  16089. type: {
  16090. type: String,
  16091. default: 'text'
  16092. },
  16093. autosize: {
  16094. type: [Boolean, Object],
  16095. default: false
  16096. },
  16097. autocomplete: {
  16098. type: String,
  16099. default: 'off'
  16100. },
  16101. /** @Deprecated in next major version */
  16102. autoComplete: {
  16103. type: String,
  16104. validator: function validator(val) {
  16105. false && false;
  16106. return true;
  16107. }
  16108. },
  16109. validateEvent: {
  16110. type: Boolean,
  16111. default: true
  16112. },
  16113. suffixIcon: String,
  16114. prefixIcon: String,
  16115. label: String,
  16116. clearable: {
  16117. type: Boolean,
  16118. default: false
  16119. },
  16120. showPassword: {
  16121. type: Boolean,
  16122. default: false
  16123. },
  16124. showWordLimit: {
  16125. type: Boolean,
  16126. default: false
  16127. },
  16128. tabindex: String
  16129. },
  16130. computed: {
  16131. _elFormItemSize: function _elFormItemSize() {
  16132. return (this.elFormItem || {}).elFormItemSize;
  16133. },
  16134. validateState: function validateState() {
  16135. return this.elFormItem ? this.elFormItem.validateState : '';
  16136. },
  16137. needStatusIcon: function needStatusIcon() {
  16138. return this.elForm ? this.elForm.statusIcon : false;
  16139. },
  16140. validateIcon: function validateIcon() {
  16141. return {
  16142. validating: 'el-icon-loading',
  16143. success: 'el-icon-circle-check',
  16144. error: 'el-icon-circle-close'
  16145. }[this.validateState];
  16146. },
  16147. textareaStyle: function textareaStyle() {
  16148. return merge_default()({}, this.textareaCalcStyle, { resize: this.resize });
  16149. },
  16150. inputSize: function inputSize() {
  16151. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  16152. },
  16153. inputDisabled: function inputDisabled() {
  16154. return this.disabled || (this.elForm || {}).disabled;
  16155. },
  16156. nativeInputValue: function nativeInputValue() {
  16157. return this.value === null || this.value === undefined ? '' : String(this.value);
  16158. },
  16159. showClear: function showClear() {
  16160. return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
  16161. },
  16162. showPwdVisible: function showPwdVisible() {
  16163. return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
  16164. },
  16165. isWordLimitVisible: function isWordLimitVisible() {
  16166. return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
  16167. },
  16168. upperLimit: function upperLimit() {
  16169. return this.$attrs.maxlength;
  16170. },
  16171. textLength: function textLength() {
  16172. if (typeof this.value === 'number') {
  16173. return String(this.value).length;
  16174. }
  16175. return (this.value || '').length;
  16176. },
  16177. inputExceed: function inputExceed() {
  16178. // show exceed style if length of initial value greater then maxlength
  16179. return this.isWordLimitVisible && this.textLength > this.upperLimit;
  16180. }
  16181. },
  16182. watch: {
  16183. value: function value(val) {
  16184. this.$nextTick(this.resizeTextarea);
  16185. if (this.validateEvent) {
  16186. this.dispatch('ElFormItem', 'el.form.change', [val]);
  16187. }
  16188. },
  16189. // native input value is set explicitly
  16190. // do not use v-model / :value in template
  16191. // see: https://github.com/ElemeFE/element/issues/14521
  16192. nativeInputValue: function nativeInputValue() {
  16193. this.setNativeInputValue();
  16194. },
  16195. // when change between <input> and <textarea>,
  16196. // update DOM dependent value and styles
  16197. // https://github.com/ElemeFE/element/issues/14857
  16198. type: function type() {
  16199. var _this = this;
  16200. this.$nextTick(function () {
  16201. _this.setNativeInputValue();
  16202. _this.resizeTextarea();
  16203. _this.updateIconOffset();
  16204. });
  16205. }
  16206. },
  16207. methods: {
  16208. focus: function focus() {
  16209. this.getInput().focus();
  16210. },
  16211. blur: function blur() {
  16212. this.getInput().blur();
  16213. },
  16214. getMigratingConfig: function getMigratingConfig() {
  16215. return {
  16216. props: {
  16217. 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
  16218. 'on-icon-click': 'on-icon-click is removed.'
  16219. },
  16220. events: {
  16221. 'click': 'click is removed.'
  16222. }
  16223. };
  16224. },
  16225. handleBlur: function handleBlur(event) {
  16226. this.focused = false;
  16227. this.$emit('blur', event);
  16228. if (this.validateEvent) {
  16229. this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
  16230. }
  16231. },
  16232. select: function select() {
  16233. this.getInput().select();
  16234. },
  16235. resizeTextarea: function resizeTextarea() {
  16236. if (this.$isServer) return;
  16237. var autosize = this.autosize,
  16238. type = this.type;
  16239. if (type !== 'textarea') return;
  16240. if (!autosize) {
  16241. this.textareaCalcStyle = {
  16242. minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
  16243. };
  16244. return;
  16245. }
  16246. var minRows = autosize.minRows;
  16247. var maxRows = autosize.maxRows;
  16248. this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
  16249. },
  16250. setNativeInputValue: function setNativeInputValue() {
  16251. var input = this.getInput();
  16252. if (!input) return;
  16253. if (input.value === this.nativeInputValue) return;
  16254. input.value = this.nativeInputValue;
  16255. },
  16256. handleFocus: function handleFocus(event) {
  16257. this.focused = true;
  16258. this.$emit('focus', event);
  16259. },
  16260. handleCompositionStart: function handleCompositionStart(event) {
  16261. this.$emit('compositionstart', event);
  16262. this.isComposing = true;
  16263. },
  16264. handleCompositionUpdate: function handleCompositionUpdate(event) {
  16265. this.$emit('compositionupdate', event);
  16266. var text = event.target.value;
  16267. var lastCharacter = text[text.length - 1] || '';
  16268. this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
  16269. },
  16270. handleCompositionEnd: function handleCompositionEnd(event) {
  16271. this.$emit('compositionend', event);
  16272. if (this.isComposing) {
  16273. this.isComposing = false;
  16274. this.handleInput(event);
  16275. }
  16276. },
  16277. handleInput: function handleInput(event) {
  16278. // should not emit input during composition
  16279. // see: https://github.com/ElemeFE/element/issues/10516
  16280. if (this.isComposing) return;
  16281. // hack for https://github.com/ElemeFE/element/issues/8548
  16282. // should remove the following line when we don't support IE
  16283. if (event.target.value === this.nativeInputValue) return;
  16284. this.$emit('input', event.target.value);
  16285. // ensure native input value is controlled
  16286. // see: https://github.com/ElemeFE/element/issues/12850
  16287. this.$nextTick(this.setNativeInputValue);
  16288. },
  16289. handleChange: function handleChange(event) {
  16290. this.$emit('change', event.target.value);
  16291. },
  16292. calcIconOffset: function calcIconOffset(place) {
  16293. var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
  16294. if (!elList.length) return;
  16295. var el = null;
  16296. for (var i = 0; i < elList.length; i++) {
  16297. if (elList[i].parentNode === this.$el) {
  16298. el = elList[i];
  16299. break;
  16300. }
  16301. }
  16302. if (!el) return;
  16303. var pendantMap = {
  16304. suffix: 'append',
  16305. prefix: 'prepend'
  16306. };
  16307. var pendant = pendantMap[place];
  16308. if (this.$slots[pendant]) {
  16309. el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
  16310. } else {
  16311. el.removeAttribute('style');
  16312. }
  16313. },
  16314. updateIconOffset: function updateIconOffset() {
  16315. this.calcIconOffset('prefix');
  16316. this.calcIconOffset('suffix');
  16317. },
  16318. clear: function clear() {
  16319. this.$emit('input', '');
  16320. this.$emit('change', '');
  16321. this.$emit('clear');
  16322. },
  16323. handlePasswordVisible: function handlePasswordVisible() {
  16324. var _this2 = this;
  16325. this.passwordVisible = !this.passwordVisible;
  16326. this.$nextTick(function () {
  16327. _this2.focus();
  16328. });
  16329. },
  16330. getInput: function getInput() {
  16331. return this.$refs.input || this.$refs.textarea;
  16332. },
  16333. getSuffixVisible: function getSuffixVisible() {
  16334. return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
  16335. }
  16336. },
  16337. created: function created() {
  16338. this.$on('inputSelect', this.select);
  16339. },
  16340. mounted: function mounted() {
  16341. this.setNativeInputValue();
  16342. this.resizeTextarea();
  16343. this.updateIconOffset();
  16344. },
  16345. updated: function updated() {
  16346. this.$nextTick(this.updateIconOffset);
  16347. }
  16348. });
  16349. // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&
  16350. /* harmony default export */ var src_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
  16351. // CONCATENATED MODULE: ./packages/input/src/input.vue
  16352. /* normalize component */
  16353. var input_component = normalizeComponent(
  16354. src_inputvue_type_script_lang_js_,
  16355. inputvue_type_template_id_343dd774_render,
  16356. inputvue_type_template_id_343dd774_staticRenderFns,
  16357. false,
  16358. null,
  16359. null,
  16360. null
  16361. )
  16362. /* hot reload */
  16363. if (false) { var input_api; }
  16364. input_component.options.__file = "packages/input/src/input.vue"
  16365. /* harmony default export */ var src_input = (input_component.exports);
  16366. // CONCATENATED MODULE: ./packages/input/index.js
  16367. /* istanbul ignore next */
  16368. src_input.install = function (Vue) {
  16369. Vue.component(src_input.name, src_input);
  16370. };
  16371. /* harmony default export */ var packages_input = (src_input);
  16372. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
  16373. var input_numbervue_type_template_id_42f8cf66_render = function() {
  16374. var _vm = this
  16375. var _h = _vm.$createElement
  16376. var _c = _vm._self._c || _h
  16377. return _c(
  16378. "div",
  16379. {
  16380. class: [
  16381. "el-input-number",
  16382. _vm.inputNumberSize ? "el-input-number--" + _vm.inputNumberSize : "",
  16383. { "is-disabled": _vm.inputNumberDisabled },
  16384. { "is-without-controls": !_vm.controls },
  16385. { "is-controls-right": _vm.controlsAtRight }
  16386. ],
  16387. on: {
  16388. dragstart: function($event) {
  16389. $event.preventDefault()
  16390. }
  16391. }
  16392. },
  16393. [
  16394. _vm.controls
  16395. ? _c(
  16396. "span",
  16397. {
  16398. directives: [
  16399. {
  16400. name: "repeat-click",
  16401. rawName: "v-repeat-click",
  16402. value: _vm.decrease,
  16403. expression: "decrease"
  16404. }
  16405. ],
  16406. staticClass: "el-input-number__decrease",
  16407. class: { "is-disabled": _vm.minDisabled },
  16408. attrs: { role: "button" },
  16409. on: {
  16410. keydown: function($event) {
  16411. if (
  16412. !("button" in $event) &&
  16413. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  16414. ) {
  16415. return null
  16416. }
  16417. return _vm.decrease($event)
  16418. }
  16419. }
  16420. },
  16421. [
  16422. _c("i", {
  16423. class:
  16424. "el-icon-" + (_vm.controlsAtRight ? "arrow-down" : "minus")
  16425. })
  16426. ]
  16427. )
  16428. : _vm._e(),
  16429. _vm.controls
  16430. ? _c(
  16431. "span",
  16432. {
  16433. directives: [
  16434. {
  16435. name: "repeat-click",
  16436. rawName: "v-repeat-click",
  16437. value: _vm.increase,
  16438. expression: "increase"
  16439. }
  16440. ],
  16441. staticClass: "el-input-number__increase",
  16442. class: { "is-disabled": _vm.maxDisabled },
  16443. attrs: { role: "button" },
  16444. on: {
  16445. keydown: function($event) {
  16446. if (
  16447. !("button" in $event) &&
  16448. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  16449. ) {
  16450. return null
  16451. }
  16452. return _vm.increase($event)
  16453. }
  16454. }
  16455. },
  16456. [
  16457. _c("i", {
  16458. class: "el-icon-" + (_vm.controlsAtRight ? "arrow-up" : "plus")
  16459. })
  16460. ]
  16461. )
  16462. : _vm._e(),
  16463. _c("el-input", {
  16464. ref: "input",
  16465. attrs: {
  16466. value: _vm.displayValue,
  16467. placeholder: _vm.placeholder,
  16468. disabled: _vm.inputNumberDisabled,
  16469. size: _vm.inputNumberSize,
  16470. max: _vm.max,
  16471. min: _vm.min,
  16472. name: _vm.name,
  16473. label: _vm.label
  16474. },
  16475. on: {
  16476. blur: _vm.handleBlur,
  16477. focus: _vm.handleFocus,
  16478. input: _vm.handleInput,
  16479. change: _vm.handleInputChange
  16480. },
  16481. nativeOn: {
  16482. keydown: [
  16483. function($event) {
  16484. if (
  16485. !("button" in $event) &&
  16486. _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])
  16487. ) {
  16488. return null
  16489. }
  16490. $event.preventDefault()
  16491. return _vm.increase($event)
  16492. },
  16493. function($event) {
  16494. if (
  16495. !("button" in $event) &&
  16496. _vm._k($event.keyCode, "down", 40, $event.key, [
  16497. "Down",
  16498. "ArrowDown"
  16499. ])
  16500. ) {
  16501. return null
  16502. }
  16503. $event.preventDefault()
  16504. return _vm.decrease($event)
  16505. }
  16506. ]
  16507. }
  16508. })
  16509. ],
  16510. 1
  16511. )
  16512. }
  16513. var input_numbervue_type_template_id_42f8cf66_staticRenderFns = []
  16514. input_numbervue_type_template_id_42f8cf66_render._withStripped = true
  16515. // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
  16516. // CONCATENATED MODULE: ./src/directives/repeat-click.js
  16517. /* harmony default export */ var repeat_click = ({
  16518. bind: function bind(el, binding, vnode) {
  16519. var interval = null;
  16520. var startTime = void 0;
  16521. var handler = function handler() {
  16522. return vnode.context[binding.expression].apply();
  16523. };
  16524. var clear = function clear() {
  16525. if (Date.now() - startTime < 100) {
  16526. handler();
  16527. }
  16528. clearInterval(interval);
  16529. interval = null;
  16530. };
  16531. Object(dom_["on"])(el, 'mousedown', function (e) {
  16532. if (e.button !== 0) return;
  16533. startTime = Date.now();
  16534. Object(dom_["once"])(document, 'mouseup', clear);
  16535. clearInterval(interval);
  16536. interval = setInterval(handler, 100);
  16537. });
  16538. }
  16539. });
  16540. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
  16541. //
  16542. //
  16543. //
  16544. //
  16545. //
  16546. //
  16547. //
  16548. //
  16549. //
  16550. //
  16551. //
  16552. //
  16553. //
  16554. //
  16555. //
  16556. //
  16557. //
  16558. //
  16559. //
  16560. //
  16561. //
  16562. //
  16563. //
  16564. //
  16565. //
  16566. //
  16567. //
  16568. //
  16569. //
  16570. //
  16571. //
  16572. //
  16573. //
  16574. //
  16575. //
  16576. //
  16577. //
  16578. //
  16579. //
  16580. //
  16581. //
  16582. //
  16583. //
  16584. //
  16585. //
  16586. //
  16587. //
  16588. /* harmony default export */ var input_numbervue_type_script_lang_js_ = ({
  16589. name: 'ElInputNumber',
  16590. mixins: [focus_default()('input')],
  16591. inject: {
  16592. elForm: {
  16593. default: ''
  16594. },
  16595. elFormItem: {
  16596. default: ''
  16597. }
  16598. },
  16599. directives: {
  16600. repeatClick: repeat_click
  16601. },
  16602. components: {
  16603. ElInput: input_default.a
  16604. },
  16605. props: {
  16606. step: {
  16607. type: Number,
  16608. default: 1
  16609. },
  16610. stepStrictly: {
  16611. type: Boolean,
  16612. default: false
  16613. },
  16614. max: {
  16615. type: Number,
  16616. default: Infinity
  16617. },
  16618. min: {
  16619. type: Number,
  16620. default: -Infinity
  16621. },
  16622. value: {},
  16623. disabled: Boolean,
  16624. size: String,
  16625. controls: {
  16626. type: Boolean,
  16627. default: true
  16628. },
  16629. controlsPosition: {
  16630. type: String,
  16631. default: ''
  16632. },
  16633. name: String,
  16634. label: String,
  16635. placeholder: String,
  16636. precision: {
  16637. type: Number,
  16638. validator: function validator(val) {
  16639. return val >= 0 && val === parseInt(val, 10);
  16640. }
  16641. }
  16642. },
  16643. data: function data() {
  16644. return {
  16645. currentValue: 0,
  16646. userInput: null
  16647. };
  16648. },
  16649. watch: {
  16650. value: {
  16651. immediate: true,
  16652. handler: function handler(value) {
  16653. var newVal = value === undefined ? value : Number(value);
  16654. if (newVal !== undefined) {
  16655. if (isNaN(newVal)) {
  16656. return;
  16657. }
  16658. if (this.stepStrictly) {
  16659. var stepPrecision = this.getPrecision(this.step);
  16660. var precisionFactor = Math.pow(10, stepPrecision);
  16661. newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
  16662. }
  16663. if (this.precision !== undefined) {
  16664. newVal = this.toPrecision(newVal, this.precision);
  16665. }
  16666. }
  16667. if (newVal >= this.max) newVal = this.max;
  16668. if (newVal <= this.min) newVal = this.min;
  16669. this.currentValue = newVal;
  16670. this.userInput = null;
  16671. this.$emit('input', newVal);
  16672. }
  16673. }
  16674. },
  16675. computed: {
  16676. minDisabled: function minDisabled() {
  16677. return this._decrease(this.value, this.step) < this.min;
  16678. },
  16679. maxDisabled: function maxDisabled() {
  16680. return this._increase(this.value, this.step) > this.max;
  16681. },
  16682. numPrecision: function numPrecision() {
  16683. var value = this.value,
  16684. step = this.step,
  16685. getPrecision = this.getPrecision,
  16686. precision = this.precision;
  16687. var stepPrecision = getPrecision(step);
  16688. if (precision !== undefined) {
  16689. if (stepPrecision > precision) {
  16690. console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
  16691. }
  16692. return precision;
  16693. } else {
  16694. return Math.max(getPrecision(value), stepPrecision);
  16695. }
  16696. },
  16697. controlsAtRight: function controlsAtRight() {
  16698. return this.controls && this.controlsPosition === 'right';
  16699. },
  16700. _elFormItemSize: function _elFormItemSize() {
  16701. return (this.elFormItem || {}).elFormItemSize;
  16702. },
  16703. inputNumberSize: function inputNumberSize() {
  16704. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  16705. },
  16706. inputNumberDisabled: function inputNumberDisabled() {
  16707. return this.disabled || !!(this.elForm || {}).disabled;
  16708. },
  16709. displayValue: function displayValue() {
  16710. if (this.userInput !== null) {
  16711. return this.userInput;
  16712. }
  16713. var currentValue = this.currentValue;
  16714. if (typeof currentValue === 'number') {
  16715. if (this.stepStrictly) {
  16716. var stepPrecision = this.getPrecision(this.step);
  16717. var precisionFactor = Math.pow(10, stepPrecision);
  16718. currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
  16719. }
  16720. if (this.precision !== undefined) {
  16721. currentValue = currentValue.toFixed(this.precision);
  16722. }
  16723. }
  16724. return currentValue;
  16725. }
  16726. },
  16727. methods: {
  16728. toPrecision: function toPrecision(num, precision) {
  16729. if (precision === undefined) precision = this.numPrecision;
  16730. return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
  16731. },
  16732. getPrecision: function getPrecision(value) {
  16733. if (value === undefined) return 0;
  16734. var valueString = value.toString();
  16735. var dotPosition = valueString.indexOf('.');
  16736. var precision = 0;
  16737. if (dotPosition !== -1) {
  16738. precision = valueString.length - dotPosition - 1;
  16739. }
  16740. return precision;
  16741. },
  16742. _increase: function _increase(val, step) {
  16743. if (typeof val !== 'number' && val !== undefined) return this.currentValue;
  16744. var precisionFactor = Math.pow(10, this.numPrecision);
  16745. // Solve the accuracy problem of JS decimal calculation by converting the value to integer.
  16746. return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
  16747. },
  16748. _decrease: function _decrease(val, step) {
  16749. if (typeof val !== 'number' && val !== undefined) return this.currentValue;
  16750. var precisionFactor = Math.pow(10, this.numPrecision);
  16751. return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
  16752. },
  16753. increase: function increase() {
  16754. if (this.inputNumberDisabled || this.maxDisabled) return;
  16755. var value = this.value || 0;
  16756. var newVal = this._increase(value, this.step);
  16757. this.setCurrentValue(newVal);
  16758. },
  16759. decrease: function decrease() {
  16760. if (this.inputNumberDisabled || this.minDisabled) return;
  16761. var value = this.value || 0;
  16762. var newVal = this._decrease(value, this.step);
  16763. this.setCurrentValue(newVal);
  16764. },
  16765. handleBlur: function handleBlur(event) {
  16766. this.$emit('blur', event);
  16767. },
  16768. handleFocus: function handleFocus(event) {
  16769. this.$emit('focus', event);
  16770. },
  16771. setCurrentValue: function setCurrentValue(newVal) {
  16772. var oldVal = this.currentValue;
  16773. if (typeof newVal === 'number' && this.precision !== undefined) {
  16774. newVal = this.toPrecision(newVal, this.precision);
  16775. }
  16776. if (newVal >= this.max) newVal = this.max;
  16777. if (newVal <= this.min) newVal = this.min;
  16778. if (oldVal === newVal) return;
  16779. this.userInput = null;
  16780. this.$emit('input', newVal);
  16781. this.$emit('change', newVal, oldVal);
  16782. this.currentValue = newVal;
  16783. },
  16784. handleInput: function handleInput(value) {
  16785. this.userInput = value;
  16786. },
  16787. handleInputChange: function handleInputChange(value) {
  16788. var newVal = value === '' ? undefined : Number(value);
  16789. if (!isNaN(newVal) || value === '') {
  16790. this.setCurrentValue(newVal);
  16791. }
  16792. this.userInput = null;
  16793. },
  16794. select: function select() {
  16795. this.$refs.input.select();
  16796. }
  16797. },
  16798. mounted: function mounted() {
  16799. var innerInput = this.$refs.input.$refs.input;
  16800. innerInput.setAttribute('role', 'spinbutton');
  16801. innerInput.setAttribute('aria-valuemax', this.max);
  16802. innerInput.setAttribute('aria-valuemin', this.min);
  16803. innerInput.setAttribute('aria-valuenow', this.currentValue);
  16804. innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
  16805. },
  16806. updated: function updated() {
  16807. if (!this.$refs || !this.$refs.input) return;
  16808. var innerInput = this.$refs.input.$refs.input;
  16809. innerInput.setAttribute('aria-valuenow', this.currentValue);
  16810. }
  16811. });
  16812. // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
  16813. /* harmony default export */ var src_input_numbervue_type_script_lang_js_ = (input_numbervue_type_script_lang_js_);
  16814. // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue
  16815. /* normalize component */
  16816. var input_number_component = normalizeComponent(
  16817. src_input_numbervue_type_script_lang_js_,
  16818. input_numbervue_type_template_id_42f8cf66_render,
  16819. input_numbervue_type_template_id_42f8cf66_staticRenderFns,
  16820. false,
  16821. null,
  16822. null,
  16823. null
  16824. )
  16825. /* hot reload */
  16826. if (false) { var input_number_api; }
  16827. input_number_component.options.__file = "packages/input-number/src/input-number.vue"
  16828. /* harmony default export */ var input_number = (input_number_component.exports);
  16829. // CONCATENATED MODULE: ./packages/input-number/index.js
  16830. /* istanbul ignore next */
  16831. input_number.install = function (Vue) {
  16832. Vue.component(input_number.name, input_number);
  16833. };
  16834. /* harmony default export */ var packages_input_number = (input_number);
  16835. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
  16836. var radiovue_type_template_id_69cd6268_render = function() {
  16837. var _vm = this
  16838. var _h = _vm.$createElement
  16839. var _c = _vm._self._c || _h
  16840. return _c(
  16841. "label",
  16842. {
  16843. staticClass: "el-radio",
  16844. class: [
  16845. _vm.border && _vm.radioSize ? "el-radio--" + _vm.radioSize : "",
  16846. { "is-disabled": _vm.isDisabled },
  16847. { "is-focus": _vm.focus },
  16848. { "is-bordered": _vm.border },
  16849. { "is-checked": _vm.model === _vm.label }
  16850. ],
  16851. attrs: {
  16852. role: "radio",
  16853. "aria-checked": _vm.model === _vm.label,
  16854. "aria-disabled": _vm.isDisabled,
  16855. tabindex: _vm.tabIndex
  16856. },
  16857. on: {
  16858. keydown: function($event) {
  16859. if (
  16860. !("button" in $event) &&
  16861. _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])
  16862. ) {
  16863. return null
  16864. }
  16865. $event.stopPropagation()
  16866. $event.preventDefault()
  16867. _vm.model = _vm.isDisabled ? _vm.model : _vm.label
  16868. }
  16869. }
  16870. },
  16871. [
  16872. _c(
  16873. "span",
  16874. {
  16875. staticClass: "el-radio__input",
  16876. class: {
  16877. "is-disabled": _vm.isDisabled,
  16878. "is-checked": _vm.model === _vm.label
  16879. }
  16880. },
  16881. [
  16882. _c("span", { staticClass: "el-radio__inner" }),
  16883. _c("input", {
  16884. directives: [
  16885. {
  16886. name: "model",
  16887. rawName: "v-model",
  16888. value: _vm.model,
  16889. expression: "model"
  16890. }
  16891. ],
  16892. ref: "radio",
  16893. staticClass: "el-radio__original",
  16894. attrs: {
  16895. type: "radio",
  16896. "aria-hidden": "true",
  16897. name: _vm.name,
  16898. disabled: _vm.isDisabled,
  16899. tabindex: "-1",
  16900. autocomplete: "off"
  16901. },
  16902. domProps: {
  16903. value: _vm.label,
  16904. checked: _vm._q(_vm.model, _vm.label)
  16905. },
  16906. on: {
  16907. focus: function($event) {
  16908. _vm.focus = true
  16909. },
  16910. blur: function($event) {
  16911. _vm.focus = false
  16912. },
  16913. change: [
  16914. function($event) {
  16915. _vm.model = _vm.label
  16916. },
  16917. _vm.handleChange
  16918. ]
  16919. }
  16920. })
  16921. ]
  16922. ),
  16923. _c(
  16924. "span",
  16925. {
  16926. staticClass: "el-radio__label",
  16927. on: {
  16928. keydown: function($event) {
  16929. $event.stopPropagation()
  16930. }
  16931. }
  16932. },
  16933. [
  16934. _vm._t("default"),
  16935. !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
  16936. ],
  16937. 2
  16938. )
  16939. ]
  16940. )
  16941. }
  16942. var radiovue_type_template_id_69cd6268_staticRenderFns = []
  16943. radiovue_type_template_id_69cd6268_render._withStripped = true
  16944. // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
  16945. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
  16946. //
  16947. //
  16948. //
  16949. //
  16950. //
  16951. //
  16952. //
  16953. //
  16954. //
  16955. //
  16956. //
  16957. //
  16958. //
  16959. //
  16960. //
  16961. //
  16962. //
  16963. //
  16964. //
  16965. //
  16966. //
  16967. //
  16968. //
  16969. //
  16970. //
  16971. //
  16972. //
  16973. //
  16974. //
  16975. //
  16976. //
  16977. //
  16978. //
  16979. //
  16980. //
  16981. //
  16982. //
  16983. //
  16984. //
  16985. //
  16986. //
  16987. //
  16988. //
  16989. //
  16990. //
  16991. /* harmony default export */ var radiovue_type_script_lang_js_ = ({
  16992. name: 'ElRadio',
  16993. mixins: [emitter_default.a],
  16994. inject: {
  16995. elForm: {
  16996. default: ''
  16997. },
  16998. elFormItem: {
  16999. default: ''
  17000. }
  17001. },
  17002. componentName: 'ElRadio',
  17003. props: {
  17004. value: {},
  17005. label: {},
  17006. disabled: Boolean,
  17007. name: String,
  17008. border: Boolean,
  17009. size: String
  17010. },
  17011. data: function data() {
  17012. return {
  17013. focus: false
  17014. };
  17015. },
  17016. computed: {
  17017. isGroup: function isGroup() {
  17018. var parent = this.$parent;
  17019. while (parent) {
  17020. if (parent.$options.componentName !== 'ElRadioGroup') {
  17021. parent = parent.$parent;
  17022. } else {
  17023. this._radioGroup = parent;
  17024. return true;
  17025. }
  17026. }
  17027. return false;
  17028. },
  17029. model: {
  17030. get: function get() {
  17031. return this.isGroup ? this._radioGroup.value : this.value;
  17032. },
  17033. set: function set(val) {
  17034. if (this.isGroup) {
  17035. this.dispatch('ElRadioGroup', 'input', [val]);
  17036. } else {
  17037. this.$emit('input', val);
  17038. }
  17039. this.$refs.radio && (this.$refs.radio.checked = this.model === this.label);
  17040. }
  17041. },
  17042. _elFormItemSize: function _elFormItemSize() {
  17043. return (this.elFormItem || {}).elFormItemSize;
  17044. },
  17045. radioSize: function radioSize() {
  17046. var temRadioSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  17047. return this.isGroup ? this._radioGroup.radioGroupSize || temRadioSize : temRadioSize;
  17048. },
  17049. isDisabled: function isDisabled() {
  17050. return this.isGroup ? this._radioGroup.disabled || this.disabled || (this.elForm || {}).disabled : this.disabled || (this.elForm || {}).disabled;
  17051. },
  17052. tabIndex: function tabIndex() {
  17053. return this.isDisabled || this.isGroup && this.model !== this.label ? -1 : 0;
  17054. }
  17055. },
  17056. methods: {
  17057. handleChange: function handleChange() {
  17058. var _this = this;
  17059. this.$nextTick(function () {
  17060. _this.$emit('change', _this.model);
  17061. _this.isGroup && _this.dispatch('ElRadioGroup', 'handleChange', _this.model);
  17062. });
  17063. }
  17064. }
  17065. });
  17066. // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&
  17067. /* harmony default export */ var src_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_);
  17068. // CONCATENATED MODULE: ./packages/radio/src/radio.vue
  17069. /* normalize component */
  17070. var radio_component = normalizeComponent(
  17071. src_radiovue_type_script_lang_js_,
  17072. radiovue_type_template_id_69cd6268_render,
  17073. radiovue_type_template_id_69cd6268_staticRenderFns,
  17074. false,
  17075. null,
  17076. null,
  17077. null
  17078. )
  17079. /* hot reload */
  17080. if (false) { var radio_api; }
  17081. radio_component.options.__file = "packages/radio/src/radio.vue"
  17082. /* harmony default export */ var src_radio = (radio_component.exports);
  17083. // CONCATENATED MODULE: ./packages/radio/index.js
  17084. /* istanbul ignore next */
  17085. src_radio.install = function (Vue) {
  17086. Vue.component(src_radio.name, src_radio);
  17087. };
  17088. /* harmony default export */ var packages_radio = (src_radio);
  17089. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-group.vue?vue&type=template&id=818a704c&
  17090. var radio_groupvue_type_template_id_818a704c_render = function() {
  17091. var _vm = this
  17092. var _h = _vm.$createElement
  17093. var _c = _vm._self._c || _h
  17094. return _c(
  17095. _vm._elTag,
  17096. {
  17097. tag: "component",
  17098. staticClass: "el-radio-group",
  17099. attrs: { role: "radiogroup" },
  17100. on: { keydown: _vm.handleKeydown }
  17101. },
  17102. [_vm._t("default")],
  17103. 2
  17104. )
  17105. }
  17106. var radio_groupvue_type_template_id_818a704c_staticRenderFns = []
  17107. radio_groupvue_type_template_id_818a704c_render._withStripped = true
  17108. // CONCATENATED MODULE: ./packages/radio/src/radio-group.vue?vue&type=template&id=818a704c&
  17109. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-group.vue?vue&type=script&lang=js&
  17110. //
  17111. //
  17112. //
  17113. //
  17114. //
  17115. //
  17116. //
  17117. //
  17118. //
  17119. //
  17120. var keyCode = Object.freeze({
  17121. LEFT: 37,
  17122. UP: 38,
  17123. RIGHT: 39,
  17124. DOWN: 40
  17125. });
  17126. /* harmony default export */ var radio_groupvue_type_script_lang_js_ = ({
  17127. name: 'ElRadioGroup',
  17128. componentName: 'ElRadioGroup',
  17129. inject: {
  17130. elFormItem: {
  17131. default: ''
  17132. }
  17133. },
  17134. mixins: [emitter_default.a],
  17135. props: {
  17136. value: {},
  17137. size: String,
  17138. fill: String,
  17139. textColor: String,
  17140. disabled: Boolean
  17141. },
  17142. computed: {
  17143. _elFormItemSize: function _elFormItemSize() {
  17144. return (this.elFormItem || {}).elFormItemSize;
  17145. },
  17146. _elTag: function _elTag() {
  17147. var tag = (this.$vnode.data || {}).tag;
  17148. if (!tag || tag === 'component') tag = 'div';
  17149. return tag;
  17150. },
  17151. radioGroupSize: function radioGroupSize() {
  17152. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  17153. }
  17154. },
  17155. created: function created() {
  17156. var _this = this;
  17157. this.$on('handleChange', function (value) {
  17158. _this.$emit('change', value);
  17159. });
  17160. },
  17161. mounted: function mounted() {
  17162. // 当radioGroup没有默认选项时,第一个可以选中Tab导航
  17163. var radios = this.$el.querySelectorAll('[type=radio]');
  17164. var firstLabel = this.$el.querySelectorAll('[role=radio]')[0];
  17165. if (![].some.call(radios, function (radio) {
  17166. return radio.checked;
  17167. }) && firstLabel) {
  17168. firstLabel.tabIndex = 0;
  17169. }
  17170. },
  17171. methods: {
  17172. handleKeydown: function handleKeydown(e) {
  17173. // 左右上下按键 可以在radio组内切换不同选项
  17174. var target = e.target;
  17175. var className = target.nodeName === 'INPUT' ? '[type=radio]' : '[role=radio]';
  17176. var radios = this.$el.querySelectorAll(className);
  17177. var length = radios.length;
  17178. var index = [].indexOf.call(radios, target);
  17179. var roleRadios = this.$el.querySelectorAll('[role=radio]');
  17180. switch (e.keyCode) {
  17181. case keyCode.LEFT:
  17182. case keyCode.UP:
  17183. e.stopPropagation();
  17184. e.preventDefault();
  17185. if (index === 0) {
  17186. roleRadios[length - 1].click();
  17187. roleRadios[length - 1].focus();
  17188. } else {
  17189. roleRadios[index - 1].click();
  17190. roleRadios[index - 1].focus();
  17191. }
  17192. break;
  17193. case keyCode.RIGHT:
  17194. case keyCode.DOWN:
  17195. if (index === length - 1) {
  17196. e.stopPropagation();
  17197. e.preventDefault();
  17198. roleRadios[0].click();
  17199. roleRadios[0].focus();
  17200. } else {
  17201. roleRadios[index + 1].click();
  17202. roleRadios[index + 1].focus();
  17203. }
  17204. break;
  17205. default:
  17206. break;
  17207. }
  17208. }
  17209. },
  17210. watch: {
  17211. value: function value(_value) {
  17212. this.dispatch('ElFormItem', 'el.form.change', [this.value]);
  17213. }
  17214. }
  17215. });
  17216. // CONCATENATED MODULE: ./packages/radio/src/radio-group.vue?vue&type=script&lang=js&
  17217. /* harmony default export */ var src_radio_groupvue_type_script_lang_js_ = (radio_groupvue_type_script_lang_js_);
  17218. // CONCATENATED MODULE: ./packages/radio/src/radio-group.vue
  17219. /* normalize component */
  17220. var radio_group_component = normalizeComponent(
  17221. src_radio_groupvue_type_script_lang_js_,
  17222. radio_groupvue_type_template_id_818a704c_render,
  17223. radio_groupvue_type_template_id_818a704c_staticRenderFns,
  17224. false,
  17225. null,
  17226. null,
  17227. null
  17228. )
  17229. /* hot reload */
  17230. if (false) { var radio_group_api; }
  17231. radio_group_component.options.__file = "packages/radio/src/radio-group.vue"
  17232. /* harmony default export */ var radio_group = (radio_group_component.exports);
  17233. // CONCATENATED MODULE: ./packages/radio-group/index.js
  17234. /* istanbul ignore next */
  17235. radio_group.install = function (Vue) {
  17236. Vue.component(radio_group.name, radio_group);
  17237. };
  17238. /* harmony default export */ var packages_radio_group = (radio_group);
  17239. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-button.vue?vue&type=template&id=18a77a32&
  17240. var radio_buttonvue_type_template_id_18a77a32_render = function() {
  17241. var _vm = this
  17242. var _h = _vm.$createElement
  17243. var _c = _vm._self._c || _h
  17244. return _c(
  17245. "label",
  17246. {
  17247. staticClass: "el-radio-button",
  17248. class: [
  17249. _vm.size ? "el-radio-button--" + _vm.size : "",
  17250. { "is-active": _vm.value === _vm.label },
  17251. { "is-disabled": _vm.isDisabled },
  17252. { "is-focus": _vm.focus }
  17253. ],
  17254. attrs: {
  17255. role: "radio",
  17256. "aria-checked": _vm.value === _vm.label,
  17257. "aria-disabled": _vm.isDisabled,
  17258. tabindex: _vm.tabIndex
  17259. },
  17260. on: {
  17261. keydown: function($event) {
  17262. if (
  17263. !("button" in $event) &&
  17264. _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])
  17265. ) {
  17266. return null
  17267. }
  17268. $event.stopPropagation()
  17269. $event.preventDefault()
  17270. _vm.value = _vm.isDisabled ? _vm.value : _vm.label
  17271. }
  17272. }
  17273. },
  17274. [
  17275. _c("input", {
  17276. directives: [
  17277. {
  17278. name: "model",
  17279. rawName: "v-model",
  17280. value: _vm.value,
  17281. expression: "value"
  17282. }
  17283. ],
  17284. staticClass: "el-radio-button__orig-radio",
  17285. attrs: {
  17286. type: "radio",
  17287. name: _vm.name,
  17288. disabled: _vm.isDisabled,
  17289. tabindex: "-1",
  17290. autocomplete: "off"
  17291. },
  17292. domProps: { value: _vm.label, checked: _vm._q(_vm.value, _vm.label) },
  17293. on: {
  17294. change: [
  17295. function($event) {
  17296. _vm.value = _vm.label
  17297. },
  17298. _vm.handleChange
  17299. ],
  17300. focus: function($event) {
  17301. _vm.focus = true
  17302. },
  17303. blur: function($event) {
  17304. _vm.focus = false
  17305. }
  17306. }
  17307. }),
  17308. _c(
  17309. "span",
  17310. {
  17311. staticClass: "el-radio-button__inner",
  17312. style: _vm.value === _vm.label ? _vm.activeStyle : null,
  17313. on: {
  17314. keydown: function($event) {
  17315. $event.stopPropagation()
  17316. }
  17317. }
  17318. },
  17319. [
  17320. _vm._t("default"),
  17321. !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
  17322. ],
  17323. 2
  17324. )
  17325. ]
  17326. )
  17327. }
  17328. var radio_buttonvue_type_template_id_18a77a32_staticRenderFns = []
  17329. radio_buttonvue_type_template_id_18a77a32_render._withStripped = true
  17330. // CONCATENATED MODULE: ./packages/radio/src/radio-button.vue?vue&type=template&id=18a77a32&
  17331. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-button.vue?vue&type=script&lang=js&
  17332. //
  17333. //
  17334. //
  17335. //
  17336. //
  17337. //
  17338. //
  17339. //
  17340. //
  17341. //
  17342. //
  17343. //
  17344. //
  17345. //
  17346. //
  17347. //
  17348. //
  17349. //
  17350. //
  17351. //
  17352. //
  17353. //
  17354. //
  17355. //
  17356. //
  17357. //
  17358. //
  17359. //
  17360. //
  17361. //
  17362. //
  17363. //
  17364. //
  17365. //
  17366. //
  17367. //
  17368. //
  17369. /* harmony default export */ var radio_buttonvue_type_script_lang_js_ = ({
  17370. name: 'ElRadioButton',
  17371. mixins: [emitter_default.a],
  17372. inject: {
  17373. elForm: {
  17374. default: ''
  17375. },
  17376. elFormItem: {
  17377. default: ''
  17378. }
  17379. },
  17380. props: {
  17381. label: {},
  17382. disabled: Boolean,
  17383. name: String
  17384. },
  17385. data: function data() {
  17386. return {
  17387. focus: false
  17388. };
  17389. },
  17390. computed: {
  17391. value: {
  17392. get: function get() {
  17393. return this._radioGroup.value;
  17394. },
  17395. set: function set(value) {
  17396. this._radioGroup.$emit('input', value);
  17397. }
  17398. },
  17399. _radioGroup: function _radioGroup() {
  17400. var parent = this.$parent;
  17401. while (parent) {
  17402. if (parent.$options.componentName !== 'ElRadioGroup') {
  17403. parent = parent.$parent;
  17404. } else {
  17405. return parent;
  17406. }
  17407. }
  17408. return false;
  17409. },
  17410. activeStyle: function activeStyle() {
  17411. return {
  17412. backgroundColor: this._radioGroup.fill || '',
  17413. borderColor: this._radioGroup.fill || '',
  17414. boxShadow: this._radioGroup.fill ? '-1px 0 0 0 ' + this._radioGroup.fill : '',
  17415. color: this._radioGroup.textColor || ''
  17416. };
  17417. },
  17418. _elFormItemSize: function _elFormItemSize() {
  17419. return (this.elFormItem || {}).elFormItemSize;
  17420. },
  17421. size: function size() {
  17422. return this._radioGroup.radioGroupSize || this._elFormItemSize || (this.$ELEMENT || {}).size;
  17423. },
  17424. isDisabled: function isDisabled() {
  17425. return this.disabled || this._radioGroup.disabled || (this.elForm || {}).disabled;
  17426. },
  17427. tabIndex: function tabIndex() {
  17428. return this.isDisabled || this._radioGroup && this.value !== this.label ? -1 : 0;
  17429. }
  17430. },
  17431. methods: {
  17432. handleChange: function handleChange() {
  17433. var _this = this;
  17434. this.$nextTick(function () {
  17435. _this.dispatch('ElRadioGroup', 'handleChange', _this.value);
  17436. });
  17437. }
  17438. }
  17439. });
  17440. // CONCATENATED MODULE: ./packages/radio/src/radio-button.vue?vue&type=script&lang=js&
  17441. /* harmony default export */ var src_radio_buttonvue_type_script_lang_js_ = (radio_buttonvue_type_script_lang_js_);
  17442. // CONCATENATED MODULE: ./packages/radio/src/radio-button.vue
  17443. /* normalize component */
  17444. var radio_button_component = normalizeComponent(
  17445. src_radio_buttonvue_type_script_lang_js_,
  17446. radio_buttonvue_type_template_id_18a77a32_render,
  17447. radio_buttonvue_type_template_id_18a77a32_staticRenderFns,
  17448. false,
  17449. null,
  17450. null,
  17451. null
  17452. )
  17453. /* hot reload */
  17454. if (false) { var radio_button_api; }
  17455. radio_button_component.options.__file = "packages/radio/src/radio-button.vue"
  17456. /* harmony default export */ var radio_button = (radio_button_component.exports);
  17457. // CONCATENATED MODULE: ./packages/radio-button/index.js
  17458. /* istanbul ignore next */
  17459. radio_button.install = function (Vue) {
  17460. Vue.component(radio_button.name, radio_button);
  17461. };
  17462. /* harmony default export */ var packages_radio_button = (radio_button);
  17463. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
  17464. var checkboxvue_type_template_id_d0387074_render = function() {
  17465. var _vm = this
  17466. var _h = _vm.$createElement
  17467. var _c = _vm._self._c || _h
  17468. return _c(
  17469. "label",
  17470. {
  17471. staticClass: "el-checkbox",
  17472. class: [
  17473. _vm.border && _vm.checkboxSize
  17474. ? "el-checkbox--" + _vm.checkboxSize
  17475. : "",
  17476. { "is-disabled": _vm.isDisabled },
  17477. { "is-bordered": _vm.border },
  17478. { "is-checked": _vm.isChecked }
  17479. ],
  17480. attrs: { id: _vm.id }
  17481. },
  17482. [
  17483. _c(
  17484. "span",
  17485. {
  17486. staticClass: "el-checkbox__input",
  17487. class: {
  17488. "is-disabled": _vm.isDisabled,
  17489. "is-checked": _vm.isChecked,
  17490. "is-indeterminate": _vm.indeterminate,
  17491. "is-focus": _vm.focus
  17492. },
  17493. attrs: {
  17494. tabindex: _vm.indeterminate ? 0 : false,
  17495. role: _vm.indeterminate ? "checkbox" : false,
  17496. "aria-checked": _vm.indeterminate ? "mixed" : false
  17497. }
  17498. },
  17499. [
  17500. _c("span", { staticClass: "el-checkbox__inner" }),
  17501. _vm.trueLabel || _vm.falseLabel
  17502. ? _c("input", {
  17503. directives: [
  17504. {
  17505. name: "model",
  17506. rawName: "v-model",
  17507. value: _vm.model,
  17508. expression: "model"
  17509. }
  17510. ],
  17511. staticClass: "el-checkbox__original",
  17512. attrs: {
  17513. type: "checkbox",
  17514. "aria-hidden": _vm.indeterminate ? "true" : "false",
  17515. name: _vm.name,
  17516. disabled: _vm.isDisabled,
  17517. "true-value": _vm.trueLabel,
  17518. "false-value": _vm.falseLabel
  17519. },
  17520. domProps: {
  17521. checked: Array.isArray(_vm.model)
  17522. ? _vm._i(_vm.model, null) > -1
  17523. : _vm._q(_vm.model, _vm.trueLabel)
  17524. },
  17525. on: {
  17526. change: [
  17527. function($event) {
  17528. var $$a = _vm.model,
  17529. $$el = $event.target,
  17530. $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
  17531. if (Array.isArray($$a)) {
  17532. var $$v = null,
  17533. $$i = _vm._i($$a, $$v)
  17534. if ($$el.checked) {
  17535. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  17536. } else {
  17537. $$i > -1 &&
  17538. (_vm.model = $$a
  17539. .slice(0, $$i)
  17540. .concat($$a.slice($$i + 1)))
  17541. }
  17542. } else {
  17543. _vm.model = $$c
  17544. }
  17545. },
  17546. _vm.handleChange
  17547. ],
  17548. focus: function($event) {
  17549. _vm.focus = true
  17550. },
  17551. blur: function($event) {
  17552. _vm.focus = false
  17553. }
  17554. }
  17555. })
  17556. : _c("input", {
  17557. directives: [
  17558. {
  17559. name: "model",
  17560. rawName: "v-model",
  17561. value: _vm.model,
  17562. expression: "model"
  17563. }
  17564. ],
  17565. staticClass: "el-checkbox__original",
  17566. attrs: {
  17567. type: "checkbox",
  17568. "aria-hidden": _vm.indeterminate ? "true" : "false",
  17569. disabled: _vm.isDisabled,
  17570. name: _vm.name
  17571. },
  17572. domProps: {
  17573. value: _vm.label,
  17574. checked: Array.isArray(_vm.model)
  17575. ? _vm._i(_vm.model, _vm.label) > -1
  17576. : _vm.model
  17577. },
  17578. on: {
  17579. change: [
  17580. function($event) {
  17581. var $$a = _vm.model,
  17582. $$el = $event.target,
  17583. $$c = $$el.checked ? true : false
  17584. if (Array.isArray($$a)) {
  17585. var $$v = _vm.label,
  17586. $$i = _vm._i($$a, $$v)
  17587. if ($$el.checked) {
  17588. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  17589. } else {
  17590. $$i > -1 &&
  17591. (_vm.model = $$a
  17592. .slice(0, $$i)
  17593. .concat($$a.slice($$i + 1)))
  17594. }
  17595. } else {
  17596. _vm.model = $$c
  17597. }
  17598. },
  17599. _vm.handleChange
  17600. ],
  17601. focus: function($event) {
  17602. _vm.focus = true
  17603. },
  17604. blur: function($event) {
  17605. _vm.focus = false
  17606. }
  17607. }
  17608. })
  17609. ]
  17610. ),
  17611. _vm.$slots.default || _vm.label
  17612. ? _c(
  17613. "span",
  17614. { staticClass: "el-checkbox__label" },
  17615. [
  17616. _vm._t("default"),
  17617. !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
  17618. ],
  17619. 2
  17620. )
  17621. : _vm._e()
  17622. ]
  17623. )
  17624. }
  17625. var checkboxvue_type_template_id_d0387074_staticRenderFns = []
  17626. checkboxvue_type_template_id_d0387074_render._withStripped = true
  17627. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
  17628. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
  17629. //
  17630. //
  17631. //
  17632. //
  17633. //
  17634. //
  17635. //
  17636. //
  17637. //
  17638. //
  17639. //
  17640. //
  17641. //
  17642. //
  17643. //
  17644. //
  17645. //
  17646. //
  17647. //
  17648. //
  17649. //
  17650. //
  17651. //
  17652. //
  17653. //
  17654. //
  17655. //
  17656. //
  17657. //
  17658. //
  17659. //
  17660. //
  17661. //
  17662. //
  17663. //
  17664. //
  17665. //
  17666. //
  17667. //
  17668. //
  17669. //
  17670. //
  17671. //
  17672. //
  17673. //
  17674. //
  17675. //
  17676. //
  17677. //
  17678. //
  17679. //
  17680. //
  17681. //
  17682. //
  17683. //
  17684. /* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
  17685. name: 'ElCheckbox',
  17686. mixins: [emitter_default.a],
  17687. inject: {
  17688. elForm: {
  17689. default: ''
  17690. },
  17691. elFormItem: {
  17692. default: ''
  17693. }
  17694. },
  17695. componentName: 'ElCheckbox',
  17696. data: function data() {
  17697. return {
  17698. selfModel: false,
  17699. focus: false,
  17700. isLimitExceeded: false
  17701. };
  17702. },
  17703. computed: {
  17704. model: {
  17705. get: function get() {
  17706. return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
  17707. },
  17708. set: function set(val) {
  17709. if (this.isGroup) {
  17710. this.isLimitExceeded = false;
  17711. this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
  17712. this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
  17713. this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
  17714. } else {
  17715. this.$emit('input', val);
  17716. this.selfModel = val;
  17717. }
  17718. }
  17719. },
  17720. isChecked: function isChecked() {
  17721. if ({}.toString.call(this.model) === '[object Boolean]') {
  17722. return this.model;
  17723. } else if (Array.isArray(this.model)) {
  17724. return this.model.indexOf(this.label) > -1;
  17725. } else if (this.model !== null && this.model !== undefined) {
  17726. return this.model === this.trueLabel;
  17727. }
  17728. },
  17729. isGroup: function isGroup() {
  17730. var parent = this.$parent;
  17731. while (parent) {
  17732. if (parent.$options.componentName !== 'ElCheckboxGroup') {
  17733. parent = parent.$parent;
  17734. } else {
  17735. this._checkboxGroup = parent;
  17736. return true;
  17737. }
  17738. }
  17739. return false;
  17740. },
  17741. store: function store() {
  17742. return this._checkboxGroup ? this._checkboxGroup.value : this.value;
  17743. },
  17744. /* used to make the isDisabled judgment under max/min props */
  17745. isLimitDisabled: function isLimitDisabled() {
  17746. var _checkboxGroup = this._checkboxGroup,
  17747. max = _checkboxGroup.max,
  17748. min = _checkboxGroup.min;
  17749. return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
  17750. },
  17751. isDisabled: function isDisabled() {
  17752. return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
  17753. },
  17754. _elFormItemSize: function _elFormItemSize() {
  17755. return (this.elFormItem || {}).elFormItemSize;
  17756. },
  17757. checkboxSize: function checkboxSize() {
  17758. var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  17759. return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
  17760. }
  17761. },
  17762. props: {
  17763. value: {},
  17764. label: {},
  17765. indeterminate: Boolean,
  17766. disabled: Boolean,
  17767. checked: Boolean,
  17768. name: String,
  17769. trueLabel: [String, Number],
  17770. falseLabel: [String, Number],
  17771. id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
  17772. controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
  17773. border: Boolean,
  17774. size: String
  17775. },
  17776. methods: {
  17777. addToStore: function addToStore() {
  17778. if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
  17779. this.model.push(this.label);
  17780. } else {
  17781. this.model = this.trueLabel || true;
  17782. }
  17783. },
  17784. handleChange: function handleChange(ev) {
  17785. var _this = this;
  17786. if (this.isLimitExceeded) return;
  17787. var value = void 0;
  17788. if (ev.target.checked) {
  17789. value = this.trueLabel === undefined ? true : this.trueLabel;
  17790. } else {
  17791. value = this.falseLabel === undefined ? false : this.falseLabel;
  17792. }
  17793. this.$emit('change', value, ev);
  17794. this.$nextTick(function () {
  17795. if (_this.isGroup) {
  17796. _this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
  17797. }
  17798. });
  17799. }
  17800. },
  17801. created: function created() {
  17802. this.checked && this.addToStore();
  17803. },
  17804. mounted: function mounted() {
  17805. // 为indeterminate元素 添加aria-controls 属性
  17806. if (this.indeterminate) {
  17807. this.$el.setAttribute('aria-controls', this.controls);
  17808. }
  17809. },
  17810. watch: {
  17811. value: function value(_value) {
  17812. this.dispatch('ElFormItem', 'el.form.change', _value);
  17813. }
  17814. }
  17815. });
  17816. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
  17817. /* harmony default export */ var src_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_);
  17818. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
  17819. /* normalize component */
  17820. var checkbox_component = normalizeComponent(
  17821. src_checkboxvue_type_script_lang_js_,
  17822. checkboxvue_type_template_id_d0387074_render,
  17823. checkboxvue_type_template_id_d0387074_staticRenderFns,
  17824. false,
  17825. null,
  17826. null,
  17827. null
  17828. )
  17829. /* hot reload */
  17830. if (false) { var checkbox_api; }
  17831. checkbox_component.options.__file = "packages/checkbox/src/checkbox.vue"
  17832. /* harmony default export */ var src_checkbox = (checkbox_component.exports);
  17833. // CONCATENATED MODULE: ./packages/checkbox/index.js
  17834. /* istanbul ignore next */
  17835. src_checkbox.install = function (Vue) {
  17836. Vue.component(src_checkbox.name, src_checkbox);
  17837. };
  17838. /* harmony default export */ var packages_checkbox = (src_checkbox);
  17839. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-button.vue?vue&type=template&id=478e906e&
  17840. var checkbox_buttonvue_type_template_id_478e906e_render = function() {
  17841. var _vm = this
  17842. var _h = _vm.$createElement
  17843. var _c = _vm._self._c || _h
  17844. return _c(
  17845. "label",
  17846. {
  17847. staticClass: "el-checkbox-button",
  17848. class: [
  17849. _vm.size ? "el-checkbox-button--" + _vm.size : "",
  17850. { "is-disabled": _vm.isDisabled },
  17851. { "is-checked": _vm.isChecked },
  17852. { "is-focus": _vm.focus }
  17853. ],
  17854. attrs: {
  17855. role: "checkbox",
  17856. "aria-checked": _vm.isChecked,
  17857. "aria-disabled": _vm.isDisabled
  17858. }
  17859. },
  17860. [
  17861. _vm.trueLabel || _vm.falseLabel
  17862. ? _c("input", {
  17863. directives: [
  17864. {
  17865. name: "model",
  17866. rawName: "v-model",
  17867. value: _vm.model,
  17868. expression: "model"
  17869. }
  17870. ],
  17871. staticClass: "el-checkbox-button__original",
  17872. attrs: {
  17873. type: "checkbox",
  17874. name: _vm.name,
  17875. disabled: _vm.isDisabled,
  17876. "true-value": _vm.trueLabel,
  17877. "false-value": _vm.falseLabel
  17878. },
  17879. domProps: {
  17880. checked: Array.isArray(_vm.model)
  17881. ? _vm._i(_vm.model, null) > -1
  17882. : _vm._q(_vm.model, _vm.trueLabel)
  17883. },
  17884. on: {
  17885. change: [
  17886. function($event) {
  17887. var $$a = _vm.model,
  17888. $$el = $event.target,
  17889. $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
  17890. if (Array.isArray($$a)) {
  17891. var $$v = null,
  17892. $$i = _vm._i($$a, $$v)
  17893. if ($$el.checked) {
  17894. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  17895. } else {
  17896. $$i > -1 &&
  17897. (_vm.model = $$a
  17898. .slice(0, $$i)
  17899. .concat($$a.slice($$i + 1)))
  17900. }
  17901. } else {
  17902. _vm.model = $$c
  17903. }
  17904. },
  17905. _vm.handleChange
  17906. ],
  17907. focus: function($event) {
  17908. _vm.focus = true
  17909. },
  17910. blur: function($event) {
  17911. _vm.focus = false
  17912. }
  17913. }
  17914. })
  17915. : _c("input", {
  17916. directives: [
  17917. {
  17918. name: "model",
  17919. rawName: "v-model",
  17920. value: _vm.model,
  17921. expression: "model"
  17922. }
  17923. ],
  17924. staticClass: "el-checkbox-button__original",
  17925. attrs: {
  17926. type: "checkbox",
  17927. name: _vm.name,
  17928. disabled: _vm.isDisabled
  17929. },
  17930. domProps: {
  17931. value: _vm.label,
  17932. checked: Array.isArray(_vm.model)
  17933. ? _vm._i(_vm.model, _vm.label) > -1
  17934. : _vm.model
  17935. },
  17936. on: {
  17937. change: [
  17938. function($event) {
  17939. var $$a = _vm.model,
  17940. $$el = $event.target,
  17941. $$c = $$el.checked ? true : false
  17942. if (Array.isArray($$a)) {
  17943. var $$v = _vm.label,
  17944. $$i = _vm._i($$a, $$v)
  17945. if ($$el.checked) {
  17946. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  17947. } else {
  17948. $$i > -1 &&
  17949. (_vm.model = $$a
  17950. .slice(0, $$i)
  17951. .concat($$a.slice($$i + 1)))
  17952. }
  17953. } else {
  17954. _vm.model = $$c
  17955. }
  17956. },
  17957. _vm.handleChange
  17958. ],
  17959. focus: function($event) {
  17960. _vm.focus = true
  17961. },
  17962. blur: function($event) {
  17963. _vm.focus = false
  17964. }
  17965. }
  17966. }),
  17967. _vm.$slots.default || _vm.label
  17968. ? _c(
  17969. "span",
  17970. {
  17971. staticClass: "el-checkbox-button__inner",
  17972. style: _vm.isChecked ? _vm.activeStyle : null
  17973. },
  17974. [_vm._t("default", [_vm._v(_vm._s(_vm.label))])],
  17975. 2
  17976. )
  17977. : _vm._e()
  17978. ]
  17979. )
  17980. }
  17981. var checkbox_buttonvue_type_template_id_478e906e_staticRenderFns = []
  17982. checkbox_buttonvue_type_template_id_478e906e_render._withStripped = true
  17983. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-button.vue?vue&type=template&id=478e906e&
  17984. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-button.vue?vue&type=script&lang=js&
  17985. //
  17986. //
  17987. //
  17988. //
  17989. //
  17990. //
  17991. //
  17992. //
  17993. //
  17994. //
  17995. //
  17996. //
  17997. //
  17998. //
  17999. //
  18000. //
  18001. //
  18002. //
  18003. //
  18004. //
  18005. //
  18006. //
  18007. //
  18008. //
  18009. //
  18010. //
  18011. //
  18012. //
  18013. //
  18014. //
  18015. //
  18016. //
  18017. //
  18018. //
  18019. //
  18020. //
  18021. //
  18022. //
  18023. //
  18024. //
  18025. //
  18026. //
  18027. //
  18028. //
  18029. //
  18030. /* harmony default export */ var checkbox_buttonvue_type_script_lang_js_ = ({
  18031. name: 'ElCheckboxButton',
  18032. mixins: [emitter_default.a],
  18033. inject: {
  18034. elForm: {
  18035. default: ''
  18036. },
  18037. elFormItem: {
  18038. default: ''
  18039. }
  18040. },
  18041. data: function data() {
  18042. return {
  18043. selfModel: false,
  18044. focus: false,
  18045. isLimitExceeded: false
  18046. };
  18047. },
  18048. props: {
  18049. value: {},
  18050. label: {},
  18051. disabled: Boolean,
  18052. checked: Boolean,
  18053. name: String,
  18054. trueLabel: [String, Number],
  18055. falseLabel: [String, Number]
  18056. },
  18057. computed: {
  18058. model: {
  18059. get: function get() {
  18060. return this._checkboxGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
  18061. },
  18062. set: function set(val) {
  18063. if (this._checkboxGroup) {
  18064. this.isLimitExceeded = false;
  18065. this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
  18066. this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
  18067. this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
  18068. } else if (this.value !== undefined) {
  18069. this.$emit('input', val);
  18070. } else {
  18071. this.selfModel = val;
  18072. }
  18073. }
  18074. },
  18075. isChecked: function isChecked() {
  18076. if ({}.toString.call(this.model) === '[object Boolean]') {
  18077. return this.model;
  18078. } else if (Array.isArray(this.model)) {
  18079. return this.model.indexOf(this.label) > -1;
  18080. } else if (this.model !== null && this.model !== undefined) {
  18081. return this.model === this.trueLabel;
  18082. }
  18083. },
  18084. _checkboxGroup: function _checkboxGroup() {
  18085. var parent = this.$parent;
  18086. while (parent) {
  18087. if (parent.$options.componentName !== 'ElCheckboxGroup') {
  18088. parent = parent.$parent;
  18089. } else {
  18090. return parent;
  18091. }
  18092. }
  18093. return false;
  18094. },
  18095. store: function store() {
  18096. return this._checkboxGroup ? this._checkboxGroup.value : this.value;
  18097. },
  18098. activeStyle: function activeStyle() {
  18099. return {
  18100. backgroundColor: this._checkboxGroup.fill || '',
  18101. borderColor: this._checkboxGroup.fill || '',
  18102. color: this._checkboxGroup.textColor || '',
  18103. 'box-shadow': '-1px 0 0 0 ' + this._checkboxGroup.fill
  18104. };
  18105. },
  18106. _elFormItemSize: function _elFormItemSize() {
  18107. return (this.elFormItem || {}).elFormItemSize;
  18108. },
  18109. size: function size() {
  18110. return this._checkboxGroup.checkboxGroupSize || this._elFormItemSize || (this.$ELEMENT || {}).size;
  18111. },
  18112. /* used to make the isDisabled judgment under max/min props */
  18113. isLimitDisabled: function isLimitDisabled() {
  18114. var _checkboxGroup2 = this._checkboxGroup,
  18115. max = _checkboxGroup2.max,
  18116. min = _checkboxGroup2.min;
  18117. return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
  18118. },
  18119. isDisabled: function isDisabled() {
  18120. return this._checkboxGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
  18121. }
  18122. },
  18123. methods: {
  18124. addToStore: function addToStore() {
  18125. if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
  18126. this.model.push(this.label);
  18127. } else {
  18128. this.model = this.trueLabel || true;
  18129. }
  18130. },
  18131. handleChange: function handleChange(ev) {
  18132. var _this = this;
  18133. if (this.isLimitExceeded) return;
  18134. var value = void 0;
  18135. if (ev.target.checked) {
  18136. value = this.trueLabel === undefined ? true : this.trueLabel;
  18137. } else {
  18138. value = this.falseLabel === undefined ? false : this.falseLabel;
  18139. }
  18140. this.$emit('change', value, ev);
  18141. this.$nextTick(function () {
  18142. if (_this._checkboxGroup) {
  18143. _this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
  18144. }
  18145. });
  18146. }
  18147. },
  18148. created: function created() {
  18149. this.checked && this.addToStore();
  18150. }
  18151. });
  18152. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-button.vue?vue&type=script&lang=js&
  18153. /* harmony default export */ var src_checkbox_buttonvue_type_script_lang_js_ = (checkbox_buttonvue_type_script_lang_js_);
  18154. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-button.vue
  18155. /* normalize component */
  18156. var checkbox_button_component = normalizeComponent(
  18157. src_checkbox_buttonvue_type_script_lang_js_,
  18158. checkbox_buttonvue_type_template_id_478e906e_render,
  18159. checkbox_buttonvue_type_template_id_478e906e_staticRenderFns,
  18160. false,
  18161. null,
  18162. null,
  18163. null
  18164. )
  18165. /* hot reload */
  18166. if (false) { var checkbox_button_api; }
  18167. checkbox_button_component.options.__file = "packages/checkbox/src/checkbox-button.vue"
  18168. /* harmony default export */ var checkbox_button = (checkbox_button_component.exports);
  18169. // CONCATENATED MODULE: ./packages/checkbox-button/index.js
  18170. /* istanbul ignore next */
  18171. checkbox_button.install = function (Vue) {
  18172. Vue.component(checkbox_button.name, checkbox_button);
  18173. };
  18174. /* harmony default export */ var packages_checkbox_button = (checkbox_button);
  18175. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
  18176. var checkbox_groupvue_type_template_id_7289a290_render = function() {
  18177. var _vm = this
  18178. var _h = _vm.$createElement
  18179. var _c = _vm._self._c || _h
  18180. return _c(
  18181. "div",
  18182. {
  18183. staticClass: "el-checkbox-group",
  18184. attrs: { role: "group", "aria-label": "checkbox-group" }
  18185. },
  18186. [_vm._t("default")],
  18187. 2
  18188. )
  18189. }
  18190. var checkbox_groupvue_type_template_id_7289a290_staticRenderFns = []
  18191. checkbox_groupvue_type_template_id_7289a290_render._withStripped = true
  18192. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
  18193. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
  18194. /* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({
  18195. name: 'ElCheckboxGroup',
  18196. componentName: 'ElCheckboxGroup',
  18197. mixins: [emitter_default.a],
  18198. inject: {
  18199. elFormItem: {
  18200. default: ''
  18201. }
  18202. },
  18203. props: {
  18204. value: {},
  18205. disabled: Boolean,
  18206. min: Number,
  18207. max: Number,
  18208. size: String,
  18209. fill: String,
  18210. textColor: String
  18211. },
  18212. computed: {
  18213. _elFormItemSize: function _elFormItemSize() {
  18214. return (this.elFormItem || {}).elFormItemSize;
  18215. },
  18216. checkboxGroupSize: function checkboxGroupSize() {
  18217. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  18218. }
  18219. },
  18220. watch: {
  18221. value: function value(_value) {
  18222. this.dispatch('ElFormItem', 'el.form.change', [_value]);
  18223. }
  18224. }
  18225. });
  18226. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
  18227. /* harmony default export */ var src_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_);
  18228. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue
  18229. /* normalize component */
  18230. var checkbox_group_component = normalizeComponent(
  18231. src_checkbox_groupvue_type_script_lang_js_,
  18232. checkbox_groupvue_type_template_id_7289a290_render,
  18233. checkbox_groupvue_type_template_id_7289a290_staticRenderFns,
  18234. false,
  18235. null,
  18236. null,
  18237. null
  18238. )
  18239. /* hot reload */
  18240. if (false) { var checkbox_group_api; }
  18241. checkbox_group_component.options.__file = "packages/checkbox/src/checkbox-group.vue"
  18242. /* harmony default export */ var checkbox_group = (checkbox_group_component.exports);
  18243. // CONCATENATED MODULE: ./packages/checkbox-group/index.js
  18244. /* istanbul ignore next */
  18245. checkbox_group.install = function (Vue) {
  18246. Vue.component(checkbox_group.name, checkbox_group);
  18247. };
  18248. /* harmony default export */ var packages_checkbox_group = (checkbox_group);
  18249. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/component.vue?vue&type=template&id=2dcd8fbb&
  18250. var componentvue_type_template_id_2dcd8fbb_render = function() {
  18251. var _vm = this
  18252. var _h = _vm.$createElement
  18253. var _c = _vm._self._c || _h
  18254. return _c(
  18255. "div",
  18256. {
  18257. staticClass: "el-switch",
  18258. class: { "is-disabled": _vm.switchDisabled, "is-checked": _vm.checked },
  18259. attrs: {
  18260. role: "switch",
  18261. "aria-checked": _vm.checked,
  18262. "aria-disabled": _vm.switchDisabled
  18263. },
  18264. on: {
  18265. click: function($event) {
  18266. $event.preventDefault()
  18267. return _vm.switchValue($event)
  18268. }
  18269. }
  18270. },
  18271. [
  18272. _c("input", {
  18273. ref: "input",
  18274. staticClass: "el-switch__input",
  18275. attrs: {
  18276. type: "checkbox",
  18277. id: _vm.id,
  18278. name: _vm.name,
  18279. "true-value": _vm.activeValue,
  18280. "false-value": _vm.inactiveValue,
  18281. disabled: _vm.switchDisabled
  18282. },
  18283. on: {
  18284. change: _vm.handleChange,
  18285. keydown: function($event) {
  18286. if (
  18287. !("button" in $event) &&
  18288. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  18289. ) {
  18290. return null
  18291. }
  18292. return _vm.switchValue($event)
  18293. }
  18294. }
  18295. }),
  18296. _vm.inactiveIconClass || _vm.inactiveText
  18297. ? _c(
  18298. "span",
  18299. {
  18300. class: [
  18301. "el-switch__label",
  18302. "el-switch__label--left",
  18303. !_vm.checked ? "is-active" : ""
  18304. ]
  18305. },
  18306. [
  18307. _vm.inactiveIconClass
  18308. ? _c("i", { class: [_vm.inactiveIconClass] })
  18309. : _vm._e(),
  18310. !_vm.inactiveIconClass && _vm.inactiveText
  18311. ? _c("span", { attrs: { "aria-hidden": _vm.checked } }, [
  18312. _vm._v(_vm._s(_vm.inactiveText))
  18313. ])
  18314. : _vm._e()
  18315. ]
  18316. )
  18317. : _vm._e(),
  18318. _c("span", {
  18319. ref: "core",
  18320. staticClass: "el-switch__core",
  18321. style: { width: _vm.coreWidth + "px" }
  18322. }),
  18323. _vm.activeIconClass || _vm.activeText
  18324. ? _c(
  18325. "span",
  18326. {
  18327. class: [
  18328. "el-switch__label",
  18329. "el-switch__label--right",
  18330. _vm.checked ? "is-active" : ""
  18331. ]
  18332. },
  18333. [
  18334. _vm.activeIconClass
  18335. ? _c("i", { class: [_vm.activeIconClass] })
  18336. : _vm._e(),
  18337. !_vm.activeIconClass && _vm.activeText
  18338. ? _c("span", { attrs: { "aria-hidden": !_vm.checked } }, [
  18339. _vm._v(_vm._s(_vm.activeText))
  18340. ])
  18341. : _vm._e()
  18342. ]
  18343. )
  18344. : _vm._e()
  18345. ]
  18346. )
  18347. }
  18348. var componentvue_type_template_id_2dcd8fbb_staticRenderFns = []
  18349. componentvue_type_template_id_2dcd8fbb_render._withStripped = true
  18350. // CONCATENATED MODULE: ./packages/switch/src/component.vue?vue&type=template&id=2dcd8fbb&
  18351. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/component.vue?vue&type=script&lang=js&
  18352. //
  18353. //
  18354. //
  18355. //
  18356. //
  18357. //
  18358. //
  18359. //
  18360. //
  18361. //
  18362. //
  18363. //
  18364. //
  18365. //
  18366. //
  18367. //
  18368. //
  18369. //
  18370. //
  18371. //
  18372. //
  18373. //
  18374. //
  18375. //
  18376. //
  18377. //
  18378. //
  18379. //
  18380. //
  18381. //
  18382. //
  18383. //
  18384. //
  18385. //
  18386. //
  18387. //
  18388. //
  18389. /* harmony default export */ var switch_src_componentvue_type_script_lang_js_ = ({
  18390. name: 'ElSwitch',
  18391. mixins: [focus_default()('input'), migrating_default.a, emitter_default.a],
  18392. inject: {
  18393. elForm: {
  18394. default: ''
  18395. }
  18396. },
  18397. props: {
  18398. value: {
  18399. type: [Boolean, String, Number],
  18400. default: false
  18401. },
  18402. disabled: {
  18403. type: Boolean,
  18404. default: false
  18405. },
  18406. width: {
  18407. type: Number,
  18408. default: 40
  18409. },
  18410. activeIconClass: {
  18411. type: String,
  18412. default: ''
  18413. },
  18414. inactiveIconClass: {
  18415. type: String,
  18416. default: ''
  18417. },
  18418. activeText: String,
  18419. inactiveText: String,
  18420. activeColor: {
  18421. type: String,
  18422. default: ''
  18423. },
  18424. inactiveColor: {
  18425. type: String,
  18426. default: ''
  18427. },
  18428. activeValue: {
  18429. type: [Boolean, String, Number],
  18430. default: true
  18431. },
  18432. inactiveValue: {
  18433. type: [Boolean, String, Number],
  18434. default: false
  18435. },
  18436. name: {
  18437. type: String,
  18438. default: ''
  18439. },
  18440. validateEvent: {
  18441. type: Boolean,
  18442. default: true
  18443. },
  18444. id: String
  18445. },
  18446. data: function data() {
  18447. return {
  18448. coreWidth: this.width
  18449. };
  18450. },
  18451. created: function created() {
  18452. if (!~[this.activeValue, this.inactiveValue].indexOf(this.value)) {
  18453. this.$emit('input', this.inactiveValue);
  18454. }
  18455. },
  18456. computed: {
  18457. checked: function checked() {
  18458. return this.value === this.activeValue;
  18459. },
  18460. switchDisabled: function switchDisabled() {
  18461. return this.disabled || (this.elForm || {}).disabled;
  18462. }
  18463. },
  18464. watch: {
  18465. checked: function checked() {
  18466. this.$refs.input.checked = this.checked;
  18467. if (this.activeColor || this.inactiveColor) {
  18468. this.setBackgroundColor();
  18469. }
  18470. if (this.validateEvent) {
  18471. this.dispatch('ElFormItem', 'el.form.change', [this.value]);
  18472. }
  18473. }
  18474. },
  18475. methods: {
  18476. handleChange: function handleChange(event) {
  18477. var _this = this;
  18478. var val = this.checked ? this.inactiveValue : this.activeValue;
  18479. this.$emit('input', val);
  18480. this.$emit('change', val);
  18481. this.$nextTick(function () {
  18482. // set input's checked property
  18483. // in case parent refuses to change component's value
  18484. if (_this.$refs.input) {
  18485. _this.$refs.input.checked = _this.checked;
  18486. }
  18487. });
  18488. },
  18489. setBackgroundColor: function setBackgroundColor() {
  18490. var newColor = this.checked ? this.activeColor : this.inactiveColor;
  18491. this.$refs.core.style.borderColor = newColor;
  18492. this.$refs.core.style.backgroundColor = newColor;
  18493. },
  18494. switchValue: function switchValue() {
  18495. !this.switchDisabled && this.handleChange();
  18496. },
  18497. getMigratingConfig: function getMigratingConfig() {
  18498. return {
  18499. props: {
  18500. 'on-color': 'on-color is renamed to active-color.',
  18501. 'off-color': 'off-color is renamed to inactive-color.',
  18502. 'on-text': 'on-text is renamed to active-text.',
  18503. 'off-text': 'off-text is renamed to inactive-text.',
  18504. 'on-value': 'on-value is renamed to active-value.',
  18505. 'off-value': 'off-value is renamed to inactive-value.',
  18506. 'on-icon-class': 'on-icon-class is renamed to active-icon-class.',
  18507. 'off-icon-class': 'off-icon-class is renamed to inactive-icon-class.'
  18508. }
  18509. };
  18510. }
  18511. },
  18512. mounted: function mounted() {
  18513. /* istanbul ignore if */
  18514. this.coreWidth = this.width || 40;
  18515. if (this.activeColor || this.inactiveColor) {
  18516. this.setBackgroundColor();
  18517. }
  18518. this.$refs.input.checked = this.checked;
  18519. }
  18520. });
  18521. // CONCATENATED MODULE: ./packages/switch/src/component.vue?vue&type=script&lang=js&
  18522. /* harmony default export */ var packages_switch_src_componentvue_type_script_lang_js_ = (switch_src_componentvue_type_script_lang_js_);
  18523. // CONCATENATED MODULE: ./packages/switch/src/component.vue
  18524. /* normalize component */
  18525. var src_component_component = normalizeComponent(
  18526. packages_switch_src_componentvue_type_script_lang_js_,
  18527. componentvue_type_template_id_2dcd8fbb_render,
  18528. componentvue_type_template_id_2dcd8fbb_staticRenderFns,
  18529. false,
  18530. null,
  18531. null,
  18532. null
  18533. )
  18534. /* hot reload */
  18535. if (false) { var src_component_api; }
  18536. src_component_component.options.__file = "packages/switch/src/component.vue"
  18537. /* harmony default export */ var switch_src_component = (src_component_component.exports);
  18538. // CONCATENATED MODULE: ./packages/switch/index.js
  18539. /* istanbul ignore next */
  18540. switch_src_component.install = function (Vue) {
  18541. Vue.component(switch_src_component.name, switch_src_component);
  18542. };
  18543. /* harmony default export */ var packages_switch = (switch_src_component);
  18544. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
  18545. var selectvue_type_template_id_0e4aade6_render = function() {
  18546. var _vm = this
  18547. var _h = _vm.$createElement
  18548. var _c = _vm._self._c || _h
  18549. return _c(
  18550. "div",
  18551. {
  18552. directives: [
  18553. {
  18554. name: "clickoutside",
  18555. rawName: "v-clickoutside",
  18556. value: _vm.handleClose,
  18557. expression: "handleClose"
  18558. }
  18559. ],
  18560. staticClass: "el-select",
  18561. class: [_vm.selectSize ? "el-select--" + _vm.selectSize : ""],
  18562. on: {
  18563. click: function($event) {
  18564. $event.stopPropagation()
  18565. return _vm.toggleMenu($event)
  18566. }
  18567. }
  18568. },
  18569. [
  18570. _vm.multiple
  18571. ? _c(
  18572. "div",
  18573. {
  18574. ref: "tags",
  18575. staticClass: "el-select__tags",
  18576. style: { "max-width": _vm.inputWidth - 32 + "px", width: "100%" }
  18577. },
  18578. [
  18579. _vm.collapseTags && _vm.selected.length
  18580. ? _c(
  18581. "span",
  18582. [
  18583. _c(
  18584. "el-tag",
  18585. {
  18586. attrs: {
  18587. closable: !_vm.selectDisabled,
  18588. size: _vm.collapseTagSize,
  18589. hit: _vm.selected[0].hitState,
  18590. type: "info",
  18591. "disable-transitions": ""
  18592. },
  18593. on: {
  18594. close: function($event) {
  18595. _vm.deleteTag($event, _vm.selected[0])
  18596. }
  18597. }
  18598. },
  18599. [
  18600. _c("span", { staticClass: "el-select__tags-text" }, [
  18601. _vm._v(_vm._s(_vm.selected[0].currentLabel))
  18602. ])
  18603. ]
  18604. ),
  18605. _vm.selected.length > 1
  18606. ? _c(
  18607. "el-tag",
  18608. {
  18609. attrs: {
  18610. closable: false,
  18611. size: _vm.collapseTagSize,
  18612. type: "info",
  18613. "disable-transitions": ""
  18614. }
  18615. },
  18616. [
  18617. _c(
  18618. "span",
  18619. { staticClass: "el-select__tags-text" },
  18620. [_vm._v("+ " + _vm._s(_vm.selected.length - 1))]
  18621. )
  18622. ]
  18623. )
  18624. : _vm._e()
  18625. ],
  18626. 1
  18627. )
  18628. : _vm._e(),
  18629. !_vm.collapseTags
  18630. ? _c(
  18631. "transition-group",
  18632. { on: { "after-leave": _vm.resetInputHeight } },
  18633. _vm._l(_vm.selected, function(item) {
  18634. return _c(
  18635. "el-tag",
  18636. {
  18637. key: _vm.getValueKey(item),
  18638. attrs: {
  18639. closable: !_vm.selectDisabled,
  18640. size: _vm.collapseTagSize,
  18641. hit: item.hitState,
  18642. type: "info",
  18643. "disable-transitions": ""
  18644. },
  18645. on: {
  18646. close: function($event) {
  18647. _vm.deleteTag($event, item)
  18648. }
  18649. }
  18650. },
  18651. [
  18652. _c("span", { staticClass: "el-select__tags-text" }, [
  18653. _vm._v(_vm._s(item.currentLabel))
  18654. ])
  18655. ]
  18656. )
  18657. }),
  18658. 1
  18659. )
  18660. : _vm._e(),
  18661. _vm.filterable
  18662. ? _c("input", {
  18663. directives: [
  18664. {
  18665. name: "model",
  18666. rawName: "v-model",
  18667. value: _vm.query,
  18668. expression: "query"
  18669. }
  18670. ],
  18671. ref: "input",
  18672. staticClass: "el-select__input",
  18673. class: [_vm.selectSize ? "is-" + _vm.selectSize : ""],
  18674. style: {
  18675. "flex-grow": "1",
  18676. width: _vm.inputLength / (_vm.inputWidth - 32) + "%",
  18677. "max-width": _vm.inputWidth - 42 + "px"
  18678. },
  18679. attrs: {
  18680. type: "text",
  18681. disabled: _vm.selectDisabled,
  18682. autocomplete: _vm.autoComplete || _vm.autocomplete
  18683. },
  18684. domProps: { value: _vm.query },
  18685. on: {
  18686. focus: _vm.handleFocus,
  18687. blur: function($event) {
  18688. _vm.softFocus = false
  18689. },
  18690. keyup: _vm.managePlaceholder,
  18691. keydown: [
  18692. _vm.resetInputState,
  18693. function($event) {
  18694. if (
  18695. !("button" in $event) &&
  18696. _vm._k($event.keyCode, "down", 40, $event.key, [
  18697. "Down",
  18698. "ArrowDown"
  18699. ])
  18700. ) {
  18701. return null
  18702. }
  18703. $event.preventDefault()
  18704. _vm.handleNavigate("next")
  18705. },
  18706. function($event) {
  18707. if (
  18708. !("button" in $event) &&
  18709. _vm._k($event.keyCode, "up", 38, $event.key, [
  18710. "Up",
  18711. "ArrowUp"
  18712. ])
  18713. ) {
  18714. return null
  18715. }
  18716. $event.preventDefault()
  18717. _vm.handleNavigate("prev")
  18718. },
  18719. function($event) {
  18720. if (
  18721. !("button" in $event) &&
  18722. _vm._k(
  18723. $event.keyCode,
  18724. "enter",
  18725. 13,
  18726. $event.key,
  18727. "Enter"
  18728. )
  18729. ) {
  18730. return null
  18731. }
  18732. $event.preventDefault()
  18733. return _vm.selectOption($event)
  18734. },
  18735. function($event) {
  18736. if (
  18737. !("button" in $event) &&
  18738. _vm._k($event.keyCode, "esc", 27, $event.key, [
  18739. "Esc",
  18740. "Escape"
  18741. ])
  18742. ) {
  18743. return null
  18744. }
  18745. $event.stopPropagation()
  18746. $event.preventDefault()
  18747. _vm.visible = false
  18748. },
  18749. function($event) {
  18750. if (
  18751. !("button" in $event) &&
  18752. _vm._k(
  18753. $event.keyCode,
  18754. "delete",
  18755. [8, 46],
  18756. $event.key,
  18757. ["Backspace", "Delete", "Del"]
  18758. )
  18759. ) {
  18760. return null
  18761. }
  18762. return _vm.deletePrevTag($event)
  18763. },
  18764. function($event) {
  18765. if (
  18766. !("button" in $event) &&
  18767. _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
  18768. ) {
  18769. return null
  18770. }
  18771. _vm.visible = false
  18772. }
  18773. ],
  18774. compositionstart: _vm.handleComposition,
  18775. compositionupdate: _vm.handleComposition,
  18776. compositionend: _vm.handleComposition,
  18777. input: [
  18778. function($event) {
  18779. if ($event.target.composing) {
  18780. return
  18781. }
  18782. _vm.query = $event.target.value
  18783. },
  18784. _vm.debouncedQueryChange
  18785. ]
  18786. }
  18787. })
  18788. : _vm._e()
  18789. ],
  18790. 1
  18791. )
  18792. : _vm._e(),
  18793. _c(
  18794. "el-input",
  18795. {
  18796. ref: "reference",
  18797. class: { "is-focus": _vm.visible },
  18798. attrs: {
  18799. type: "text",
  18800. placeholder: _vm.currentPlaceholder,
  18801. name: _vm.name,
  18802. id: _vm.id,
  18803. autocomplete: _vm.autoComplete || _vm.autocomplete,
  18804. size: _vm.selectSize,
  18805. disabled: _vm.selectDisabled,
  18806. readonly: _vm.readonly,
  18807. "validate-event": false,
  18808. tabindex: _vm.multiple && _vm.filterable ? "-1" : null
  18809. },
  18810. on: {
  18811. focus: _vm.handleFocus,
  18812. blur: _vm.handleBlur,
  18813. input: _vm.debouncedOnInputChange,
  18814. compositionstart: _vm.handleComposition,
  18815. compositionupdate: _vm.handleComposition,
  18816. compositionend: _vm.handleComposition
  18817. },
  18818. nativeOn: {
  18819. keydown: [
  18820. function($event) {
  18821. if (
  18822. !("button" in $event) &&
  18823. _vm._k($event.keyCode, "down", 40, $event.key, [
  18824. "Down",
  18825. "ArrowDown"
  18826. ])
  18827. ) {
  18828. return null
  18829. }
  18830. $event.stopPropagation()
  18831. $event.preventDefault()
  18832. _vm.handleNavigate("next")
  18833. },
  18834. function($event) {
  18835. if (
  18836. !("button" in $event) &&
  18837. _vm._k($event.keyCode, "up", 38, $event.key, [
  18838. "Up",
  18839. "ArrowUp"
  18840. ])
  18841. ) {
  18842. return null
  18843. }
  18844. $event.stopPropagation()
  18845. $event.preventDefault()
  18846. _vm.handleNavigate("prev")
  18847. },
  18848. function($event) {
  18849. if (
  18850. !("button" in $event) &&
  18851. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  18852. ) {
  18853. return null
  18854. }
  18855. $event.preventDefault()
  18856. return _vm.selectOption($event)
  18857. },
  18858. function($event) {
  18859. if (
  18860. !("button" in $event) &&
  18861. _vm._k($event.keyCode, "esc", 27, $event.key, [
  18862. "Esc",
  18863. "Escape"
  18864. ])
  18865. ) {
  18866. return null
  18867. }
  18868. $event.stopPropagation()
  18869. $event.preventDefault()
  18870. _vm.visible = false
  18871. },
  18872. function($event) {
  18873. if (
  18874. !("button" in $event) &&
  18875. _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
  18876. ) {
  18877. return null
  18878. }
  18879. _vm.visible = false
  18880. }
  18881. ],
  18882. mouseenter: function($event) {
  18883. _vm.inputHovering = true
  18884. },
  18885. mouseleave: function($event) {
  18886. _vm.inputHovering = false
  18887. }
  18888. },
  18889. model: {
  18890. value: _vm.selectedLabel,
  18891. callback: function($$v) {
  18892. _vm.selectedLabel = $$v
  18893. },
  18894. expression: "selectedLabel"
  18895. }
  18896. },
  18897. [
  18898. _vm.$slots.prefix
  18899. ? _c("template", { slot: "prefix" }, [_vm._t("prefix")], 2)
  18900. : _vm._e(),
  18901. _c("template", { slot: "suffix" }, [
  18902. _c("i", {
  18903. directives: [
  18904. {
  18905. name: "show",
  18906. rawName: "v-show",
  18907. value: !_vm.showClose,
  18908. expression: "!showClose"
  18909. }
  18910. ],
  18911. class: [
  18912. "el-select__caret",
  18913. "el-input__icon",
  18914. "el-icon-" + _vm.iconClass
  18915. ]
  18916. }),
  18917. _vm.showClose
  18918. ? _c("i", {
  18919. staticClass:
  18920. "el-select__caret el-input__icon el-icon-circle-close",
  18921. on: { click: _vm.handleClearClick }
  18922. })
  18923. : _vm._e()
  18924. ])
  18925. ],
  18926. 2
  18927. ),
  18928. _c(
  18929. "transition",
  18930. {
  18931. attrs: { name: "el-zoom-in-top" },
  18932. on: {
  18933. "before-enter": _vm.handleMenuEnter,
  18934. "after-leave": _vm.doDestroy
  18935. }
  18936. },
  18937. [
  18938. _c(
  18939. "el-select-menu",
  18940. {
  18941. directives: [
  18942. {
  18943. name: "show",
  18944. rawName: "v-show",
  18945. value: _vm.visible && _vm.emptyText !== false,
  18946. expression: "visible && emptyText !== false"
  18947. }
  18948. ],
  18949. ref: "popper",
  18950. attrs: { "append-to-body": _vm.popperAppendToBody }
  18951. },
  18952. [
  18953. _c(
  18954. "el-scrollbar",
  18955. {
  18956. directives: [
  18957. {
  18958. name: "show",
  18959. rawName: "v-show",
  18960. value: _vm.options.length > 0 && !_vm.loading,
  18961. expression: "options.length > 0 && !loading"
  18962. }
  18963. ],
  18964. ref: "scrollbar",
  18965. class: {
  18966. "is-empty":
  18967. !_vm.allowCreate &&
  18968. _vm.query &&
  18969. _vm.filteredOptionsCount === 0
  18970. },
  18971. attrs: {
  18972. tag: "ul",
  18973. "wrap-class": "el-select-dropdown__wrap",
  18974. "view-class": "el-select-dropdown__list"
  18975. }
  18976. },
  18977. [
  18978. _vm.showNewOption
  18979. ? _c("el-option", {
  18980. attrs: { value: _vm.query, created: "" }
  18981. })
  18982. : _vm._e(),
  18983. _vm._t("default")
  18984. ],
  18985. 2
  18986. ),
  18987. _vm.emptyText &&
  18988. (!_vm.allowCreate ||
  18989. _vm.loading ||
  18990. (_vm.allowCreate && _vm.options.length === 0))
  18991. ? [
  18992. _vm.$slots.empty
  18993. ? _vm._t("empty")
  18994. : _c("p", { staticClass: "el-select-dropdown__empty" }, [
  18995. _vm._v(
  18996. "\n " +
  18997. _vm._s(_vm.emptyText) +
  18998. "\n "
  18999. )
  19000. ])
  19001. ]
  19002. : _vm._e()
  19003. ],
  19004. 2
  19005. )
  19006. ],
  19007. 1
  19008. )
  19009. ],
  19010. 1
  19011. )
  19012. }
  19013. var selectvue_type_template_id_0e4aade6_staticRenderFns = []
  19014. selectvue_type_template_id_0e4aade6_render._withStripped = true
  19015. // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
  19016. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
  19017. var select_dropdownvue_type_template_id_06828748_render = function() {
  19018. var _vm = this
  19019. var _h = _vm.$createElement
  19020. var _c = _vm._self._c || _h
  19021. return _c(
  19022. "div",
  19023. {
  19024. staticClass: "el-select-dropdown el-popper",
  19025. class: [{ "is-multiple": _vm.$parent.multiple }, _vm.popperClass],
  19026. style: { minWidth: _vm.minWidth }
  19027. },
  19028. [_vm._t("default")],
  19029. 2
  19030. )
  19031. }
  19032. var select_dropdownvue_type_template_id_06828748_staticRenderFns = []
  19033. select_dropdownvue_type_template_id_06828748_render._withStripped = true
  19034. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
  19035. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
  19036. //
  19037. //
  19038. //
  19039. //
  19040. //
  19041. //
  19042. //
  19043. //
  19044. //
  19045. /* harmony default export */ var select_dropdownvue_type_script_lang_js_ = ({
  19046. name: 'ElSelectDropdown',
  19047. componentName: 'ElSelectDropdown',
  19048. mixins: [vue_popper_default.a],
  19049. props: {
  19050. placement: {
  19051. default: 'bottom-start'
  19052. },
  19053. boundariesPadding: {
  19054. default: 0
  19055. },
  19056. popperOptions: {
  19057. default: function _default() {
  19058. return {
  19059. gpuAcceleration: false
  19060. };
  19061. }
  19062. },
  19063. visibleArrow: {
  19064. default: true
  19065. },
  19066. appendToBody: {
  19067. type: Boolean,
  19068. default: true
  19069. }
  19070. },
  19071. data: function data() {
  19072. return {
  19073. minWidth: ''
  19074. };
  19075. },
  19076. computed: {
  19077. popperClass: function popperClass() {
  19078. return this.$parent.popperClass;
  19079. }
  19080. },
  19081. watch: {
  19082. '$parent.inputWidth': function $parentInputWidth() {
  19083. this.minWidth = this.$parent.$el.getBoundingClientRect().width + 'px';
  19084. }
  19085. },
  19086. mounted: function mounted() {
  19087. var _this = this;
  19088. this.referenceElm = this.$parent.$refs.reference.$el;
  19089. this.$parent.popperElm = this.popperElm = this.$el;
  19090. this.$on('updatePopper', function () {
  19091. if (_this.$parent.visible) _this.updatePopper();
  19092. });
  19093. this.$on('destroyPopper', this.destroyPopper);
  19094. }
  19095. });
  19096. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
  19097. /* harmony default export */ var src_select_dropdownvue_type_script_lang_js_ = (select_dropdownvue_type_script_lang_js_);
  19098. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue
  19099. /* normalize component */
  19100. var select_dropdown_component = normalizeComponent(
  19101. src_select_dropdownvue_type_script_lang_js_,
  19102. select_dropdownvue_type_template_id_06828748_render,
  19103. select_dropdownvue_type_template_id_06828748_staticRenderFns,
  19104. false,
  19105. null,
  19106. null,
  19107. null
  19108. )
  19109. /* hot reload */
  19110. if (false) { var select_dropdown_api; }
  19111. select_dropdown_component.options.__file = "packages/select/src/select-dropdown.vue"
  19112. /* harmony default export */ var select_dropdown = (select_dropdown_component.exports);
  19113. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  19114. var optionvue_type_template_id_7a44c642_render = function() {
  19115. var _vm = this
  19116. var _h = _vm.$createElement
  19117. var _c = _vm._self._c || _h
  19118. return _c(
  19119. "li",
  19120. {
  19121. directives: [
  19122. {
  19123. name: "show",
  19124. rawName: "v-show",
  19125. value: _vm.visible,
  19126. expression: "visible"
  19127. }
  19128. ],
  19129. staticClass: "el-select-dropdown__item",
  19130. class: {
  19131. selected: _vm.itemSelected,
  19132. "is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
  19133. hover: _vm.hover
  19134. },
  19135. on: {
  19136. mouseenter: _vm.hoverItem,
  19137. click: function($event) {
  19138. $event.stopPropagation()
  19139. return _vm.selectOptionClick($event)
  19140. }
  19141. }
  19142. },
  19143. [_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])],
  19144. 2
  19145. )
  19146. }
  19147. var optionvue_type_template_id_7a44c642_staticRenderFns = []
  19148. optionvue_type_template_id_7a44c642_render._withStripped = true
  19149. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  19150. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&
  19151. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  19152. //
  19153. //
  19154. //
  19155. //
  19156. //
  19157. //
  19158. //
  19159. //
  19160. //
  19161. //
  19162. //
  19163. //
  19164. //
  19165. //
  19166. //
  19167. //
  19168. //
  19169. /* harmony default export */ var optionvue_type_script_lang_js_ = ({
  19170. mixins: [emitter_default.a],
  19171. name: 'ElOption',
  19172. componentName: 'ElOption',
  19173. inject: ['select'],
  19174. props: {
  19175. value: {
  19176. required: true
  19177. },
  19178. label: [String, Number],
  19179. created: Boolean,
  19180. disabled: {
  19181. type: Boolean,
  19182. default: false
  19183. }
  19184. },
  19185. data: function data() {
  19186. return {
  19187. index: -1,
  19188. groupDisabled: false,
  19189. visible: true,
  19190. hitState: false,
  19191. hover: false
  19192. };
  19193. },
  19194. computed: {
  19195. isObject: function isObject() {
  19196. return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
  19197. },
  19198. currentLabel: function currentLabel() {
  19199. return this.label || (this.isObject ? '' : this.value);
  19200. },
  19201. currentValue: function currentValue() {
  19202. return this.value || this.label || '';
  19203. },
  19204. itemSelected: function itemSelected() {
  19205. if (!this.select.multiple) {
  19206. return this.isEqual(this.value, this.select.value);
  19207. } else {
  19208. return this.contains(this.select.value, this.value);
  19209. }
  19210. },
  19211. limitReached: function limitReached() {
  19212. if (this.select.multiple) {
  19213. return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
  19214. } else {
  19215. return false;
  19216. }
  19217. }
  19218. },
  19219. watch: {
  19220. currentLabel: function currentLabel() {
  19221. if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
  19222. },
  19223. value: function value(val, oldVal) {
  19224. var _select = this.select,
  19225. remote = _select.remote,
  19226. valueKey = _select.valueKey;
  19227. if (!this.created && !remote) {
  19228. if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
  19229. return;
  19230. }
  19231. this.dispatch('ElSelect', 'setSelected');
  19232. }
  19233. }
  19234. },
  19235. methods: {
  19236. isEqual: function isEqual(a, b) {
  19237. if (!this.isObject) {
  19238. return a === b;
  19239. } else {
  19240. var valueKey = this.select.valueKey;
  19241. return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
  19242. }
  19243. },
  19244. contains: function contains() {
  19245. var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  19246. var target = arguments[1];
  19247. if (!this.isObject) {
  19248. return arr && arr.indexOf(target) > -1;
  19249. } else {
  19250. var valueKey = this.select.valueKey;
  19251. return arr && arr.some(function (item) {
  19252. return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
  19253. });
  19254. }
  19255. },
  19256. handleGroupDisabled: function handleGroupDisabled(val) {
  19257. this.groupDisabled = val;
  19258. },
  19259. hoverItem: function hoverItem() {
  19260. if (!this.disabled && !this.groupDisabled) {
  19261. this.select.hoverIndex = this.select.options.indexOf(this);
  19262. }
  19263. },
  19264. selectOptionClick: function selectOptionClick() {
  19265. if (this.disabled !== true && this.groupDisabled !== true) {
  19266. this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
  19267. }
  19268. },
  19269. queryChange: function queryChange(query) {
  19270. this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;
  19271. if (!this.visible) {
  19272. this.select.filteredOptionsCount--;
  19273. }
  19274. }
  19275. },
  19276. created: function created() {
  19277. this.select.options.push(this);
  19278. this.select.cachedOptions.push(this);
  19279. this.select.optionsCount++;
  19280. this.select.filteredOptionsCount++;
  19281. this.$on('queryChange', this.queryChange);
  19282. this.$on('handleGroupDisabled', this.handleGroupDisabled);
  19283. },
  19284. beforeDestroy: function beforeDestroy() {
  19285. var _select2 = this.select,
  19286. selected = _select2.selected,
  19287. multiple = _select2.multiple;
  19288. var selectedOptions = multiple ? selected : [selected];
  19289. var index = this.select.cachedOptions.indexOf(this);
  19290. var selectedIndex = selectedOptions.indexOf(this);
  19291. // if option is not selected, remove it from cache
  19292. if (index > -1 && selectedIndex < 0) {
  19293. this.select.cachedOptions.splice(index, 1);
  19294. }
  19295. this.select.onOptionDestroy(this.select.options.indexOf(this));
  19296. }
  19297. });
  19298. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&
  19299. /* harmony default export */ var src_optionvue_type_script_lang_js_ = (optionvue_type_script_lang_js_);
  19300. // CONCATENATED MODULE: ./packages/select/src/option.vue
  19301. /* normalize component */
  19302. var option_component = normalizeComponent(
  19303. src_optionvue_type_script_lang_js_,
  19304. optionvue_type_template_id_7a44c642_render,
  19305. optionvue_type_template_id_7a44c642_staticRenderFns,
  19306. false,
  19307. null,
  19308. null,
  19309. null
  19310. )
  19311. /* hot reload */
  19312. if (false) { var option_api; }
  19313. option_component.options.__file = "packages/select/src/option.vue"
  19314. /* harmony default export */ var src_option = (option_component.exports);
  19315. // EXTERNAL MODULE: external "element-ui/lib/tag"
  19316. var tag_ = __webpack_require__(29);
  19317. var tag_default = /*#__PURE__*/__webpack_require__.n(tag_);
  19318. // EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
  19319. var resize_event_ = __webpack_require__(14);
  19320. // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
  19321. var scroll_into_view_ = __webpack_require__(27);
  19322. var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
  19323. // CONCATENATED MODULE: ./packages/select/src/navigation-mixin.js
  19324. /* harmony default export */ var navigation_mixin = ({
  19325. data: function data() {
  19326. return {
  19327. hoverOption: -1
  19328. };
  19329. },
  19330. computed: {
  19331. optionsAllDisabled: function optionsAllDisabled() {
  19332. return this.options.filter(function (option) {
  19333. return option.visible;
  19334. }).every(function (option) {
  19335. return option.disabled;
  19336. });
  19337. }
  19338. },
  19339. watch: {
  19340. hoverIndex: function hoverIndex(val) {
  19341. var _this = this;
  19342. if (typeof val === 'number' && val > -1) {
  19343. this.hoverOption = this.options[val] || {};
  19344. }
  19345. this.options.forEach(function (option) {
  19346. option.hover = _this.hoverOption === option;
  19347. });
  19348. }
  19349. },
  19350. methods: {
  19351. navigateOptions: function navigateOptions(direction) {
  19352. var _this2 = this;
  19353. if (!this.visible) {
  19354. this.visible = true;
  19355. return;
  19356. }
  19357. if (this.options.length === 0 || this.filteredOptionsCount === 0) return;
  19358. if (!this.optionsAllDisabled) {
  19359. if (direction === 'next') {
  19360. this.hoverIndex++;
  19361. if (this.hoverIndex === this.options.length) {
  19362. this.hoverIndex = 0;
  19363. }
  19364. } else if (direction === 'prev') {
  19365. this.hoverIndex--;
  19366. if (this.hoverIndex < 0) {
  19367. this.hoverIndex = this.options.length - 1;
  19368. }
  19369. }
  19370. var option = this.options[this.hoverIndex];
  19371. if (option.disabled === true || option.groupDisabled === true || !option.visible) {
  19372. this.navigateOptions(direction);
  19373. }
  19374. this.$nextTick(function () {
  19375. return _this2.scrollToOption(_this2.hoverOption);
  19376. });
  19377. }
  19378. }
  19379. }
  19380. });
  19381. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js&
  19382. //
  19383. //
  19384. //
  19385. //
  19386. //
  19387. //
  19388. //
  19389. //
  19390. //
  19391. //
  19392. //
  19393. //
  19394. //
  19395. //
  19396. //
  19397. //
  19398. //
  19399. //
  19400. //
  19401. //
  19402. //
  19403. //
  19404. //
  19405. //
  19406. //
  19407. //
  19408. //
  19409. //
  19410. //
  19411. //
  19412. //
  19413. //
  19414. //
  19415. //
  19416. //
  19417. //
  19418. //
  19419. //
  19420. //
  19421. //
  19422. //
  19423. //
  19424. //
  19425. //
  19426. //
  19427. //
  19428. //
  19429. //
  19430. //
  19431. //
  19432. //
  19433. //
  19434. //
  19435. //
  19436. //
  19437. //
  19438. //
  19439. //
  19440. //
  19441. //
  19442. //
  19443. //
  19444. //
  19445. //
  19446. //
  19447. //
  19448. //
  19449. //
  19450. //
  19451. //
  19452. //
  19453. //
  19454. //
  19455. //
  19456. //
  19457. //
  19458. //
  19459. //
  19460. //
  19461. //
  19462. //
  19463. //
  19464. //
  19465. //
  19466. //
  19467. //
  19468. //
  19469. //
  19470. //
  19471. //
  19472. //
  19473. //
  19474. //
  19475. //
  19476. //
  19477. //
  19478. //
  19479. //
  19480. //
  19481. //
  19482. //
  19483. //
  19484. //
  19485. //
  19486. //
  19487. //
  19488. //
  19489. //
  19490. //
  19491. //
  19492. //
  19493. //
  19494. //
  19495. //
  19496. //
  19497. //
  19498. //
  19499. //
  19500. //
  19501. //
  19502. //
  19503. //
  19504. //
  19505. //
  19506. //
  19507. //
  19508. //
  19509. //
  19510. //
  19511. //
  19512. //
  19513. //
  19514. //
  19515. //
  19516. //
  19517. //
  19518. //
  19519. /* harmony default export */ var selectvue_type_script_lang_js_ = ({
  19520. mixins: [emitter_default.a, locale_default.a, focus_default()('reference'), navigation_mixin],
  19521. name: 'ElSelect',
  19522. componentName: 'ElSelect',
  19523. inject: {
  19524. elForm: {
  19525. default: ''
  19526. },
  19527. elFormItem: {
  19528. default: ''
  19529. }
  19530. },
  19531. provide: function provide() {
  19532. return {
  19533. 'select': this
  19534. };
  19535. },
  19536. computed: {
  19537. _elFormItemSize: function _elFormItemSize() {
  19538. return (this.elFormItem || {}).elFormItemSize;
  19539. },
  19540. readonly: function readonly() {
  19541. return !this.filterable || this.multiple || !Object(util_["isIE"])() && !Object(util_["isEdge"])() && !this.visible;
  19542. },
  19543. showClose: function showClose() {
  19544. var hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== undefined && this.value !== null && this.value !== '';
  19545. var criteria = this.clearable && !this.selectDisabled && this.inputHovering && hasValue;
  19546. return criteria;
  19547. },
  19548. iconClass: function iconClass() {
  19549. return this.remote && this.filterable ? '' : this.visible ? 'arrow-up is-reverse' : 'arrow-up';
  19550. },
  19551. debounce: function debounce() {
  19552. return this.remote ? 300 : 0;
  19553. },
  19554. emptyText: function emptyText() {
  19555. if (this.loading) {
  19556. return this.loadingText || this.t('el.select.loading');
  19557. } else {
  19558. if (this.remote && this.query === '' && this.options.length === 0) return false;
  19559. if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
  19560. return this.noMatchText || this.t('el.select.noMatch');
  19561. }
  19562. if (this.options.length === 0) {
  19563. return this.noDataText || this.t('el.select.noData');
  19564. }
  19565. }
  19566. return null;
  19567. },
  19568. showNewOption: function showNewOption() {
  19569. var _this = this;
  19570. var hasExistingOption = this.options.filter(function (option) {
  19571. return !option.created;
  19572. }).some(function (option) {
  19573. return option.currentLabel === _this.query;
  19574. });
  19575. return this.filterable && this.allowCreate && this.query !== '' && !hasExistingOption;
  19576. },
  19577. selectSize: function selectSize() {
  19578. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  19579. },
  19580. selectDisabled: function selectDisabled() {
  19581. return this.disabled || (this.elForm || {}).disabled;
  19582. },
  19583. collapseTagSize: function collapseTagSize() {
  19584. return ['small', 'mini'].indexOf(this.selectSize) > -1 ? 'mini' : 'small';
  19585. },
  19586. propPlaceholder: function propPlaceholder() {
  19587. return typeof this.placeholder !== 'undefined' ? this.placeholder : this.t('el.select.placeholder');
  19588. }
  19589. },
  19590. components: {
  19591. ElInput: input_default.a,
  19592. ElSelectMenu: select_dropdown,
  19593. ElOption: src_option,
  19594. ElTag: tag_default.a,
  19595. ElScrollbar: scrollbar_default.a
  19596. },
  19597. directives: { Clickoutside: clickoutside_default.a },
  19598. props: {
  19599. name: String,
  19600. id: String,
  19601. value: {
  19602. required: true
  19603. },
  19604. autocomplete: {
  19605. type: String,
  19606. default: 'off'
  19607. },
  19608. /** @Deprecated in next major version */
  19609. autoComplete: {
  19610. type: String,
  19611. validator: function validator(val) {
  19612. false && false;
  19613. return true;
  19614. }
  19615. },
  19616. automaticDropdown: Boolean,
  19617. size: String,
  19618. disabled: Boolean,
  19619. clearable: Boolean,
  19620. filterable: Boolean,
  19621. allowCreate: Boolean,
  19622. loading: Boolean,
  19623. popperClass: String,
  19624. remote: Boolean,
  19625. loadingText: String,
  19626. noMatchText: String,
  19627. noDataText: String,
  19628. remoteMethod: Function,
  19629. filterMethod: Function,
  19630. multiple: Boolean,
  19631. multipleLimit: {
  19632. type: Number,
  19633. default: 0
  19634. },
  19635. placeholder: {
  19636. type: String,
  19637. required: false
  19638. },
  19639. defaultFirstOption: Boolean,
  19640. reserveKeyword: Boolean,
  19641. valueKey: {
  19642. type: String,
  19643. default: 'value'
  19644. },
  19645. collapseTags: Boolean,
  19646. popperAppendToBody: {
  19647. type: Boolean,
  19648. default: true
  19649. }
  19650. },
  19651. data: function data() {
  19652. return {
  19653. options: [],
  19654. cachedOptions: [],
  19655. createdLabel: null,
  19656. createdSelected: false,
  19657. selected: this.multiple ? [] : {},
  19658. inputLength: 20,
  19659. inputWidth: 0,
  19660. initialInputHeight: 0,
  19661. cachedPlaceHolder: '',
  19662. optionsCount: 0,
  19663. filteredOptionsCount: 0,
  19664. visible: false,
  19665. softFocus: false,
  19666. selectedLabel: '',
  19667. hoverIndex: -1,
  19668. query: '',
  19669. previousQuery: null,
  19670. inputHovering: false,
  19671. currentPlaceholder: '',
  19672. menuVisibleOnFocus: false,
  19673. isOnComposition: false,
  19674. isSilentBlur: false
  19675. };
  19676. },
  19677. watch: {
  19678. selectDisabled: function selectDisabled() {
  19679. var _this2 = this;
  19680. this.$nextTick(function () {
  19681. _this2.resetInputHeight();
  19682. });
  19683. },
  19684. propPlaceholder: function propPlaceholder(val) {
  19685. this.cachedPlaceHolder = this.currentPlaceholder = val;
  19686. },
  19687. value: function value(val, oldVal) {
  19688. if (this.multiple) {
  19689. this.resetInputHeight();
  19690. if (val && val.length > 0 || this.$refs.input && this.query !== '') {
  19691. this.currentPlaceholder = '';
  19692. } else {
  19693. this.currentPlaceholder = this.cachedPlaceHolder;
  19694. }
  19695. if (this.filterable && !this.reserveKeyword) {
  19696. this.query = '';
  19697. this.handleQueryChange(this.query);
  19698. }
  19699. }
  19700. this.setSelected();
  19701. if (this.filterable && !this.multiple) {
  19702. this.inputLength = 20;
  19703. }
  19704. if (!Object(util_["valueEquals"])(val, oldVal)) {
  19705. this.dispatch('ElFormItem', 'el.form.change', val);
  19706. }
  19707. },
  19708. visible: function visible(val) {
  19709. var _this3 = this;
  19710. if (!val) {
  19711. this.broadcast('ElSelectDropdown', 'destroyPopper');
  19712. if (this.$refs.input) {
  19713. this.$refs.input.blur();
  19714. }
  19715. this.query = '';
  19716. this.previousQuery = null;
  19717. this.selectedLabel = '';
  19718. this.inputLength = 20;
  19719. this.menuVisibleOnFocus = false;
  19720. this.resetHoverIndex();
  19721. this.$nextTick(function () {
  19722. if (_this3.$refs.input && _this3.$refs.input.value === '' && _this3.selected.length === 0) {
  19723. _this3.currentPlaceholder = _this3.cachedPlaceHolder;
  19724. }
  19725. });
  19726. if (!this.multiple) {
  19727. if (this.selected) {
  19728. if (this.filterable && this.allowCreate && this.createdSelected && this.createdLabel) {
  19729. this.selectedLabel = this.createdLabel;
  19730. } else {
  19731. this.selectedLabel = this.selected.currentLabel;
  19732. }
  19733. if (this.filterable) this.query = this.selectedLabel;
  19734. }
  19735. if (this.filterable) {
  19736. this.currentPlaceholder = this.cachedPlaceHolder;
  19737. }
  19738. }
  19739. } else {
  19740. this.broadcast('ElSelectDropdown', 'updatePopper');
  19741. if (this.filterable) {
  19742. this.query = this.remote ? '' : this.selectedLabel;
  19743. this.handleQueryChange(this.query);
  19744. if (this.multiple) {
  19745. this.$refs.input.focus();
  19746. } else {
  19747. if (!this.remote) {
  19748. this.broadcast('ElOption', 'queryChange', '');
  19749. this.broadcast('ElOptionGroup', 'queryChange');
  19750. }
  19751. if (this.selectedLabel) {
  19752. this.currentPlaceholder = this.selectedLabel;
  19753. this.selectedLabel = '';
  19754. }
  19755. }
  19756. }
  19757. }
  19758. this.$emit('visible-change', val);
  19759. },
  19760. options: function options() {
  19761. var _this4 = this;
  19762. if (this.$isServer) return;
  19763. this.$nextTick(function () {
  19764. _this4.broadcast('ElSelectDropdown', 'updatePopper');
  19765. });
  19766. if (this.multiple) {
  19767. this.resetInputHeight();
  19768. }
  19769. var inputs = this.$el.querySelectorAll('input');
  19770. if ([].indexOf.call(inputs, document.activeElement) === -1) {
  19771. this.setSelected();
  19772. }
  19773. if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
  19774. this.checkDefaultFirstOption();
  19775. }
  19776. }
  19777. },
  19778. methods: {
  19779. handleNavigate: function handleNavigate(direction) {
  19780. if (this.isOnComposition) return;
  19781. this.navigateOptions(direction);
  19782. },
  19783. handleComposition: function handleComposition(event) {
  19784. var _this5 = this;
  19785. var text = event.target.value;
  19786. if (event.type === 'compositionend') {
  19787. this.isOnComposition = false;
  19788. this.$nextTick(function (_) {
  19789. return _this5.handleQueryChange(text);
  19790. });
  19791. } else {
  19792. var lastCharacter = text[text.length - 1] || '';
  19793. this.isOnComposition = !Object(shared_["isKorean"])(lastCharacter);
  19794. }
  19795. },
  19796. handleQueryChange: function handleQueryChange(val) {
  19797. var _this6 = this;
  19798. if (this.previousQuery === val || this.isOnComposition) return;
  19799. if (this.previousQuery === null && (typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')) {
  19800. this.previousQuery = val;
  19801. return;
  19802. }
  19803. this.previousQuery = val;
  19804. this.$nextTick(function () {
  19805. if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper');
  19806. });
  19807. this.hoverIndex = -1;
  19808. if (this.multiple && this.filterable) {
  19809. this.$nextTick(function () {
  19810. var length = _this6.$refs.input.value.length * 15 + 20;
  19811. _this6.inputLength = _this6.collapseTags ? Math.min(50, length) : length;
  19812. _this6.managePlaceholder();
  19813. _this6.resetInputHeight();
  19814. });
  19815. }
  19816. if (this.remote && typeof this.remoteMethod === 'function') {
  19817. this.hoverIndex = -1;
  19818. this.remoteMethod(val);
  19819. } else if (typeof this.filterMethod === 'function') {
  19820. this.filterMethod(val);
  19821. this.broadcast('ElOptionGroup', 'queryChange');
  19822. } else {
  19823. this.filteredOptionsCount = this.optionsCount;
  19824. this.broadcast('ElOption', 'queryChange', val);
  19825. this.broadcast('ElOptionGroup', 'queryChange');
  19826. }
  19827. if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
  19828. this.checkDefaultFirstOption();
  19829. }
  19830. },
  19831. scrollToOption: function scrollToOption(option) {
  19832. var target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;
  19833. if (this.$refs.popper && target) {
  19834. var menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
  19835. scroll_into_view_default()(menu, target);
  19836. }
  19837. this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
  19838. },
  19839. handleMenuEnter: function handleMenuEnter() {
  19840. var _this7 = this;
  19841. this.$nextTick(function () {
  19842. return _this7.scrollToOption(_this7.selected);
  19843. });
  19844. },
  19845. emitChange: function emitChange(val) {
  19846. if (!Object(util_["valueEquals"])(this.value, val)) {
  19847. this.$emit('change', val);
  19848. }
  19849. },
  19850. getOption: function getOption(value) {
  19851. var option = void 0;
  19852. var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
  19853. var isNull = Object.prototype.toString.call(value).toLowerCase() === '[object null]';
  19854. var isUndefined = Object.prototype.toString.call(value).toLowerCase() === '[object undefined]';
  19855. for (var i = this.cachedOptions.length - 1; i >= 0; i--) {
  19856. var cachedOption = this.cachedOptions[i];
  19857. var isEqual = isObject ? Object(util_["getValueByPath"])(cachedOption.value, this.valueKey) === Object(util_["getValueByPath"])(value, this.valueKey) : cachedOption.value === value;
  19858. if (isEqual) {
  19859. option = cachedOption;
  19860. break;
  19861. }
  19862. }
  19863. if (option) return option;
  19864. var label = !isObject && !isNull && !isUndefined ? String(value) : '';
  19865. var newOption = {
  19866. value: value,
  19867. currentLabel: label
  19868. };
  19869. if (this.multiple) {
  19870. newOption.hitState = false;
  19871. }
  19872. return newOption;
  19873. },
  19874. setSelected: function setSelected() {
  19875. var _this8 = this;
  19876. if (!this.multiple) {
  19877. var option = this.getOption(this.value);
  19878. if (option.created) {
  19879. this.createdLabel = option.currentLabel;
  19880. this.createdSelected = true;
  19881. } else {
  19882. this.createdSelected = false;
  19883. }
  19884. this.selectedLabel = option.currentLabel;
  19885. this.selected = option;
  19886. if (this.filterable) this.query = this.selectedLabel;
  19887. return;
  19888. }
  19889. var result = [];
  19890. if (Array.isArray(this.value)) {
  19891. this.value.forEach(function (value) {
  19892. result.push(_this8.getOption(value));
  19893. });
  19894. }
  19895. this.selected = result;
  19896. this.$nextTick(function () {
  19897. _this8.resetInputHeight();
  19898. });
  19899. },
  19900. handleFocus: function handleFocus(event) {
  19901. if (!this.softFocus) {
  19902. if (this.automaticDropdown || this.filterable) {
  19903. if (this.filterable && !this.visible) {
  19904. this.menuVisibleOnFocus = true;
  19905. }
  19906. this.visible = true;
  19907. }
  19908. this.$emit('focus', event);
  19909. } else {
  19910. this.softFocus = false;
  19911. }
  19912. },
  19913. blur: function blur() {
  19914. this.visible = false;
  19915. this.$refs.reference.blur();
  19916. },
  19917. handleBlur: function handleBlur(event) {
  19918. var _this9 = this;
  19919. setTimeout(function () {
  19920. if (_this9.isSilentBlur) {
  19921. _this9.isSilentBlur = false;
  19922. } else {
  19923. _this9.$emit('blur', event);
  19924. }
  19925. }, 50);
  19926. this.softFocus = false;
  19927. },
  19928. handleClearClick: function handleClearClick(event) {
  19929. this.deleteSelected(event);
  19930. },
  19931. doDestroy: function doDestroy() {
  19932. this.$refs.popper && this.$refs.popper.doDestroy();
  19933. },
  19934. handleClose: function handleClose() {
  19935. this.visible = false;
  19936. },
  19937. toggleLastOptionHitState: function toggleLastOptionHitState(hit) {
  19938. if (!Array.isArray(this.selected)) return;
  19939. var option = this.selected[this.selected.length - 1];
  19940. if (!option) return;
  19941. if (hit === true || hit === false) {
  19942. option.hitState = hit;
  19943. return hit;
  19944. }
  19945. option.hitState = !option.hitState;
  19946. return option.hitState;
  19947. },
  19948. deletePrevTag: function deletePrevTag(e) {
  19949. if (e.target.value.length <= 0 && !this.toggleLastOptionHitState()) {
  19950. var value = this.value.slice();
  19951. value.pop();
  19952. this.$emit('input', value);
  19953. this.emitChange(value);
  19954. }
  19955. },
  19956. managePlaceholder: function managePlaceholder() {
  19957. if (this.currentPlaceholder !== '') {
  19958. this.currentPlaceholder = this.$refs.input.value ? '' : this.cachedPlaceHolder;
  19959. }
  19960. },
  19961. resetInputState: function resetInputState(e) {
  19962. if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
  19963. this.inputLength = this.$refs.input.value.length * 15 + 20;
  19964. this.resetInputHeight();
  19965. },
  19966. resetInputHeight: function resetInputHeight() {
  19967. var _this10 = this;
  19968. if (this.collapseTags && !this.filterable) return;
  19969. this.$nextTick(function () {
  19970. if (!_this10.$refs.reference) return;
  19971. var inputChildNodes = _this10.$refs.reference.$el.childNodes;
  19972. var input = [].filter.call(inputChildNodes, function (item) {
  19973. return item.tagName === 'INPUT';
  19974. })[0];
  19975. var tags = _this10.$refs.tags;
  19976. var tagsHeight = tags ? Math.round(tags.getBoundingClientRect().height) : 0;
  19977. var sizeInMap = _this10.initialInputHeight || 40;
  19978. input.style.height = _this10.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tagsHeight + (tagsHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
  19979. if (_this10.visible && _this10.emptyText !== false) {
  19980. _this10.broadcast('ElSelectDropdown', 'updatePopper');
  19981. }
  19982. });
  19983. },
  19984. resetHoverIndex: function resetHoverIndex() {
  19985. var _this11 = this;
  19986. setTimeout(function () {
  19987. if (!_this11.multiple) {
  19988. _this11.hoverIndex = _this11.options.indexOf(_this11.selected);
  19989. } else {
  19990. if (_this11.selected.length > 0) {
  19991. _this11.hoverIndex = Math.min.apply(null, _this11.selected.map(function (item) {
  19992. return _this11.options.indexOf(item);
  19993. }));
  19994. } else {
  19995. _this11.hoverIndex = -1;
  19996. }
  19997. }
  19998. }, 300);
  19999. },
  20000. handleOptionSelect: function handleOptionSelect(option, byClick) {
  20001. var _this12 = this;
  20002. if (this.multiple) {
  20003. var value = (this.value || []).slice();
  20004. var optionIndex = this.getValueIndex(value, option.value);
  20005. if (optionIndex > -1) {
  20006. value.splice(optionIndex, 1);
  20007. } else if (this.multipleLimit <= 0 || value.length < this.multipleLimit) {
  20008. value.push(option.value);
  20009. }
  20010. this.$emit('input', value);
  20011. this.emitChange(value);
  20012. if (option.created) {
  20013. this.query = '';
  20014. this.handleQueryChange('');
  20015. this.inputLength = 20;
  20016. }
  20017. if (this.filterable) this.$refs.input.focus();
  20018. } else {
  20019. this.$emit('input', option.value);
  20020. this.emitChange(option.value);
  20021. this.visible = false;
  20022. }
  20023. this.isSilentBlur = byClick;
  20024. this.setSoftFocus();
  20025. if (this.visible) return;
  20026. this.$nextTick(function () {
  20027. _this12.scrollToOption(option);
  20028. });
  20029. },
  20030. setSoftFocus: function setSoftFocus() {
  20031. this.softFocus = true;
  20032. var input = this.$refs.input || this.$refs.reference;
  20033. if (input) {
  20034. input.focus();
  20035. }
  20036. },
  20037. getValueIndex: function getValueIndex() {
  20038. var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  20039. var value = arguments[1];
  20040. var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
  20041. if (!isObject) {
  20042. return arr.indexOf(value);
  20043. } else {
  20044. var valueKey = this.valueKey;
  20045. var index = -1;
  20046. arr.some(function (item, i) {
  20047. if (Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(value, valueKey)) {
  20048. index = i;
  20049. return true;
  20050. }
  20051. return false;
  20052. });
  20053. return index;
  20054. }
  20055. },
  20056. toggleMenu: function toggleMenu() {
  20057. if (!this.selectDisabled) {
  20058. if (this.menuVisibleOnFocus) {
  20059. this.menuVisibleOnFocus = false;
  20060. } else {
  20061. this.visible = !this.visible;
  20062. }
  20063. if (this.visible) {
  20064. (this.$refs.input || this.$refs.reference).focus();
  20065. }
  20066. }
  20067. },
  20068. selectOption: function selectOption() {
  20069. if (!this.visible) {
  20070. this.toggleMenu();
  20071. } else {
  20072. if (this.options[this.hoverIndex]) {
  20073. this.handleOptionSelect(this.options[this.hoverIndex]);
  20074. }
  20075. }
  20076. },
  20077. deleteSelected: function deleteSelected(event) {
  20078. event.stopPropagation();
  20079. var value = this.multiple ? [] : '';
  20080. this.$emit('input', value);
  20081. this.emitChange(value);
  20082. this.visible = false;
  20083. this.$emit('clear');
  20084. },
  20085. deleteTag: function deleteTag(event, tag) {
  20086. var index = this.selected.indexOf(tag);
  20087. if (index > -1 && !this.selectDisabled) {
  20088. var value = this.value.slice();
  20089. value.splice(index, 1);
  20090. this.$emit('input', value);
  20091. this.emitChange(value);
  20092. this.$emit('remove-tag', tag.value);
  20093. }
  20094. event.stopPropagation();
  20095. },
  20096. onInputChange: function onInputChange() {
  20097. if (this.filterable && this.query !== this.selectedLabel) {
  20098. this.query = this.selectedLabel;
  20099. this.handleQueryChange(this.query);
  20100. }
  20101. },
  20102. onOptionDestroy: function onOptionDestroy(index) {
  20103. if (index > -1) {
  20104. this.optionsCount--;
  20105. this.filteredOptionsCount--;
  20106. this.options.splice(index, 1);
  20107. }
  20108. },
  20109. resetInputWidth: function resetInputWidth() {
  20110. this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
  20111. },
  20112. handleResize: function handleResize() {
  20113. this.resetInputWidth();
  20114. if (this.multiple) this.resetInputHeight();
  20115. },
  20116. checkDefaultFirstOption: function checkDefaultFirstOption() {
  20117. this.hoverIndex = -1;
  20118. // highlight the created option
  20119. var hasCreated = false;
  20120. for (var i = this.options.length - 1; i >= 0; i--) {
  20121. if (this.options[i].created) {
  20122. hasCreated = true;
  20123. this.hoverIndex = i;
  20124. break;
  20125. }
  20126. }
  20127. if (hasCreated) return;
  20128. for (var _i = 0; _i !== this.options.length; ++_i) {
  20129. var option = this.options[_i];
  20130. if (this.query) {
  20131. // highlight first options that passes the filter
  20132. if (!option.disabled && !option.groupDisabled && option.visible) {
  20133. this.hoverIndex = _i;
  20134. break;
  20135. }
  20136. } else {
  20137. // highlight currently selected option
  20138. if (option.itemSelected) {
  20139. this.hoverIndex = _i;
  20140. break;
  20141. }
  20142. }
  20143. }
  20144. },
  20145. getValueKey: function getValueKey(item) {
  20146. if (Object.prototype.toString.call(item.value).toLowerCase() !== '[object object]') {
  20147. return item.value;
  20148. } else {
  20149. return Object(util_["getValueByPath"])(item.value, this.valueKey);
  20150. }
  20151. }
  20152. },
  20153. created: function created() {
  20154. var _this13 = this;
  20155. this.cachedPlaceHolder = this.currentPlaceholder = this.propPlaceholder;
  20156. if (this.multiple && !Array.isArray(this.value)) {
  20157. this.$emit('input', []);
  20158. }
  20159. if (!this.multiple && Array.isArray(this.value)) {
  20160. this.$emit('input', '');
  20161. }
  20162. this.debouncedOnInputChange = debounce_default()(this.debounce, function () {
  20163. _this13.onInputChange();
  20164. });
  20165. this.debouncedQueryChange = debounce_default()(this.debounce, function (e) {
  20166. _this13.handleQueryChange(e.target.value);
  20167. });
  20168. this.$on('handleOptionClick', this.handleOptionSelect);
  20169. this.$on('setSelected', this.setSelected);
  20170. },
  20171. mounted: function mounted() {
  20172. var _this14 = this;
  20173. if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
  20174. this.currentPlaceholder = '';
  20175. }
  20176. Object(resize_event_["addResizeListener"])(this.$el, this.handleResize);
  20177. var reference = this.$refs.reference;
  20178. if (reference && reference.$el) {
  20179. var sizeMap = {
  20180. medium: 36,
  20181. small: 32,
  20182. mini: 28
  20183. };
  20184. var input = reference.$el.querySelector('input');
  20185. this.initialInputHeight = input.getBoundingClientRect().height || sizeMap[this.selectSize];
  20186. }
  20187. if (this.remote && this.multiple) {
  20188. this.resetInputHeight();
  20189. }
  20190. this.$nextTick(function () {
  20191. if (reference && reference.$el) {
  20192. _this14.inputWidth = reference.$el.getBoundingClientRect().width;
  20193. }
  20194. });
  20195. this.setSelected();
  20196. },
  20197. beforeDestroy: function beforeDestroy() {
  20198. if (this.$el && this.handleResize) Object(resize_event_["removeResizeListener"])(this.$el, this.handleResize);
  20199. }
  20200. });
  20201. // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js&
  20202. /* harmony default export */ var src_selectvue_type_script_lang_js_ = (selectvue_type_script_lang_js_);
  20203. // CONCATENATED MODULE: ./packages/select/src/select.vue
  20204. /* normalize component */
  20205. var select_component = normalizeComponent(
  20206. src_selectvue_type_script_lang_js_,
  20207. selectvue_type_template_id_0e4aade6_render,
  20208. selectvue_type_template_id_0e4aade6_staticRenderFns,
  20209. false,
  20210. null,
  20211. null,
  20212. null
  20213. )
  20214. /* hot reload */
  20215. if (false) { var select_api; }
  20216. select_component.options.__file = "packages/select/src/select.vue"
  20217. /* harmony default export */ var src_select = (select_component.exports);
  20218. // CONCATENATED MODULE: ./packages/select/index.js
  20219. /* istanbul ignore next */
  20220. src_select.install = function (Vue) {
  20221. Vue.component(src_select.name, src_select);
  20222. };
  20223. /* harmony default export */ var packages_select = (src_select);
  20224. // CONCATENATED MODULE: ./packages/option/index.js
  20225. /* istanbul ignore next */
  20226. src_option.install = function (Vue) {
  20227. Vue.component(src_option.name, src_option);
  20228. };
  20229. /* harmony default export */ var packages_option = (src_option);
  20230. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option-group.vue?vue&type=template&id=6685e5de&
  20231. var option_groupvue_type_template_id_6685e5de_render = function() {
  20232. var _vm = this
  20233. var _h = _vm.$createElement
  20234. var _c = _vm._self._c || _h
  20235. return _c(
  20236. "ul",
  20237. {
  20238. directives: [
  20239. {
  20240. name: "show",
  20241. rawName: "v-show",
  20242. value: _vm.visible,
  20243. expression: "visible"
  20244. }
  20245. ],
  20246. staticClass: "el-select-group__wrap"
  20247. },
  20248. [
  20249. _c("li", { staticClass: "el-select-group__title" }, [
  20250. _vm._v(_vm._s(_vm.label))
  20251. ]),
  20252. _c("li", [
  20253. _c("ul", { staticClass: "el-select-group" }, [_vm._t("default")], 2)
  20254. ])
  20255. ]
  20256. )
  20257. }
  20258. var option_groupvue_type_template_id_6685e5de_staticRenderFns = []
  20259. option_groupvue_type_template_id_6685e5de_render._withStripped = true
  20260. // CONCATENATED MODULE: ./packages/select/src/option-group.vue?vue&type=template&id=6685e5de&
  20261. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option-group.vue?vue&type=script&lang=js&
  20262. //
  20263. //
  20264. //
  20265. //
  20266. //
  20267. //
  20268. //
  20269. //
  20270. //
  20271. //
  20272. //
  20273. /* harmony default export */ var option_groupvue_type_script_lang_js_ = ({
  20274. mixins: [emitter_default.a],
  20275. name: 'ElOptionGroup',
  20276. componentName: 'ElOptionGroup',
  20277. props: {
  20278. label: String,
  20279. disabled: {
  20280. type: Boolean,
  20281. default: false
  20282. }
  20283. },
  20284. data: function data() {
  20285. return {
  20286. visible: true
  20287. };
  20288. },
  20289. watch: {
  20290. disabled: function disabled(val) {
  20291. this.broadcast('ElOption', 'handleGroupDisabled', val);
  20292. }
  20293. },
  20294. methods: {
  20295. queryChange: function queryChange() {
  20296. this.visible = this.$children && Array.isArray(this.$children) && this.$children.some(function (option) {
  20297. return option.visible === true;
  20298. });
  20299. }
  20300. },
  20301. created: function created() {
  20302. this.$on('queryChange', this.queryChange);
  20303. },
  20304. mounted: function mounted() {
  20305. if (this.disabled) {
  20306. this.broadcast('ElOption', 'handleGroupDisabled', this.disabled);
  20307. }
  20308. }
  20309. });
  20310. // CONCATENATED MODULE: ./packages/select/src/option-group.vue?vue&type=script&lang=js&
  20311. /* harmony default export */ var src_option_groupvue_type_script_lang_js_ = (option_groupvue_type_script_lang_js_);
  20312. // CONCATENATED MODULE: ./packages/select/src/option-group.vue
  20313. /* normalize component */
  20314. var option_group_component = normalizeComponent(
  20315. src_option_groupvue_type_script_lang_js_,
  20316. option_groupvue_type_template_id_6685e5de_render,
  20317. option_groupvue_type_template_id_6685e5de_staticRenderFns,
  20318. false,
  20319. null,
  20320. null,
  20321. null
  20322. )
  20323. /* hot reload */
  20324. if (false) { var option_group_api; }
  20325. option_group_component.options.__file = "packages/select/src/option-group.vue"
  20326. /* harmony default export */ var option_group = (option_group_component.exports);
  20327. // CONCATENATED MODULE: ./packages/option-group/index.js
  20328. /* istanbul ignore next */
  20329. option_group.install = function (Vue) {
  20330. Vue.component(option_group.name, option_group);
  20331. };
  20332. /* harmony default export */ var packages_option_group = (option_group);
  20333. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
  20334. var buttonvue_type_template_id_ca859fb4_render = function() {
  20335. var _vm = this
  20336. var _h = _vm.$createElement
  20337. var _c = _vm._self._c || _h
  20338. return _c(
  20339. "button",
  20340. {
  20341. staticClass: "el-button",
  20342. class: [
  20343. _vm.type ? "el-button--" + _vm.type : "",
  20344. _vm.buttonSize ? "el-button--" + _vm.buttonSize : "",
  20345. {
  20346. "is-disabled": _vm.buttonDisabled,
  20347. "is-loading": _vm.loading,
  20348. "is-plain": _vm.plain,
  20349. "is-round": _vm.round,
  20350. "is-circle": _vm.circle
  20351. }
  20352. ],
  20353. attrs: {
  20354. disabled: _vm.buttonDisabled || _vm.loading,
  20355. autofocus: _vm.autofocus,
  20356. type: _vm.nativeType
  20357. },
  20358. on: { click: _vm.handleClick }
  20359. },
  20360. [
  20361. _vm.loading ? _c("i", { staticClass: "el-icon-loading" }) : _vm._e(),
  20362. _vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(),
  20363. _vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e()
  20364. ]
  20365. )
  20366. }
  20367. var buttonvue_type_template_id_ca859fb4_staticRenderFns = []
  20368. buttonvue_type_template_id_ca859fb4_render._withStripped = true
  20369. // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
  20370. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js&
  20371. //
  20372. //
  20373. //
  20374. //
  20375. //
  20376. //
  20377. //
  20378. //
  20379. //
  20380. //
  20381. //
  20382. //
  20383. //
  20384. //
  20385. //
  20386. //
  20387. //
  20388. //
  20389. //
  20390. //
  20391. //
  20392. //
  20393. //
  20394. //
  20395. /* harmony default export */ var buttonvue_type_script_lang_js_ = ({
  20396. name: 'ElButton',
  20397. inject: {
  20398. elForm: {
  20399. default: ''
  20400. },
  20401. elFormItem: {
  20402. default: ''
  20403. }
  20404. },
  20405. props: {
  20406. type: {
  20407. type: String,
  20408. default: 'default'
  20409. },
  20410. size: String,
  20411. icon: {
  20412. type: String,
  20413. default: ''
  20414. },
  20415. nativeType: {
  20416. type: String,
  20417. default: 'button'
  20418. },
  20419. loading: Boolean,
  20420. disabled: Boolean,
  20421. plain: Boolean,
  20422. autofocus: Boolean,
  20423. round: Boolean,
  20424. circle: Boolean
  20425. },
  20426. computed: {
  20427. _elFormItemSize: function _elFormItemSize() {
  20428. return (this.elFormItem || {}).elFormItemSize;
  20429. },
  20430. buttonSize: function buttonSize() {
  20431. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  20432. },
  20433. buttonDisabled: function buttonDisabled() {
  20434. return this.$options.propsData.hasOwnProperty('disabled') ? this.disabled : (this.elForm || {}).disabled;
  20435. }
  20436. },
  20437. methods: {
  20438. handleClick: function handleClick(evt) {
  20439. this.$emit('click', evt);
  20440. }
  20441. }
  20442. });
  20443. // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js&
  20444. /* harmony default export */ var src_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_);
  20445. // CONCATENATED MODULE: ./packages/button/src/button.vue
  20446. /* normalize component */
  20447. var button_component = normalizeComponent(
  20448. src_buttonvue_type_script_lang_js_,
  20449. buttonvue_type_template_id_ca859fb4_render,
  20450. buttonvue_type_template_id_ca859fb4_staticRenderFns,
  20451. false,
  20452. null,
  20453. null,
  20454. null
  20455. )
  20456. /* hot reload */
  20457. if (false) { var button_api; }
  20458. button_component.options.__file = "packages/button/src/button.vue"
  20459. /* harmony default export */ var src_button = (button_component.exports);
  20460. // CONCATENATED MODULE: ./packages/button/index.js
  20461. /* istanbul ignore next */
  20462. src_button.install = function (Vue) {
  20463. Vue.component(src_button.name, src_button);
  20464. };
  20465. /* harmony default export */ var packages_button = (src_button);
  20466. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
  20467. var button_groupvue_type_template_id_3d8661d0_render = function() {
  20468. var _vm = this
  20469. var _h = _vm.$createElement
  20470. var _c = _vm._self._c || _h
  20471. return _c("div", { staticClass: "el-button-group" }, [_vm._t("default")], 2)
  20472. }
  20473. var button_groupvue_type_template_id_3d8661d0_staticRenderFns = []
  20474. button_groupvue_type_template_id_3d8661d0_render._withStripped = true
  20475. // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
  20476. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
  20477. //
  20478. //
  20479. //
  20480. //
  20481. //
  20482. /* harmony default export */ var button_groupvue_type_script_lang_js_ = ({
  20483. name: 'ElButtonGroup'
  20484. });
  20485. // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
  20486. /* harmony default export */ var src_button_groupvue_type_script_lang_js_ = (button_groupvue_type_script_lang_js_);
  20487. // CONCATENATED MODULE: ./packages/button/src/button-group.vue
  20488. /* normalize component */
  20489. var button_group_component = normalizeComponent(
  20490. src_button_groupvue_type_script_lang_js_,
  20491. button_groupvue_type_template_id_3d8661d0_render,
  20492. button_groupvue_type_template_id_3d8661d0_staticRenderFns,
  20493. false,
  20494. null,
  20495. null,
  20496. null
  20497. )
  20498. /* hot reload */
  20499. if (false) { var button_group_api; }
  20500. button_group_component.options.__file = "packages/button/src/button-group.vue"
  20501. /* harmony default export */ var button_group = (button_group_component.exports);
  20502. // CONCATENATED MODULE: ./packages/button-group/index.js
  20503. /* istanbul ignore next */
  20504. button_group.install = function (Vue) {
  20505. Vue.component(button_group.name, button_group);
  20506. };
  20507. /* harmony default export */ var packages_button_group = (button_group);
  20508. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=493fe34e&
  20509. var tablevue_type_template_id_493fe34e_render = function() {
  20510. var _vm = this
  20511. var _h = _vm.$createElement
  20512. var _c = _vm._self._c || _h
  20513. return _c(
  20514. "div",
  20515. {
  20516. staticClass: "el-table",
  20517. class: [
  20518. {
  20519. "el-table--fit": _vm.fit,
  20520. "el-table--striped": _vm.stripe,
  20521. "el-table--border": _vm.border || _vm.isGroup,
  20522. "el-table--hidden": _vm.isHidden,
  20523. "el-table--group": _vm.isGroup,
  20524. "el-table--fluid-height": _vm.maxHeight,
  20525. "el-table--scrollable-x": _vm.layout.scrollX,
  20526. "el-table--scrollable-y": _vm.layout.scrollY,
  20527. "el-table--enable-row-hover": !_vm.store.states.isComplex,
  20528. "el-table--enable-row-transition":
  20529. (_vm.store.states.data || []).length !== 0 &&
  20530. (_vm.store.states.data || []).length < 100
  20531. },
  20532. _vm.tableSize ? "el-table--" + _vm.tableSize : ""
  20533. ],
  20534. on: {
  20535. mouseleave: function($event) {
  20536. _vm.handleMouseLeave($event)
  20537. }
  20538. }
  20539. },
  20540. [
  20541. _c(
  20542. "div",
  20543. { ref: "hiddenColumns", staticClass: "hidden-columns" },
  20544. [_vm._t("default")],
  20545. 2
  20546. ),
  20547. _vm.showHeader
  20548. ? _c(
  20549. "div",
  20550. {
  20551. directives: [
  20552. {
  20553. name: "mousewheel",
  20554. rawName: "v-mousewheel",
  20555. value: _vm.handleHeaderFooterMousewheel,
  20556. expression: "handleHeaderFooterMousewheel"
  20557. }
  20558. ],
  20559. ref: "headerWrapper",
  20560. staticClass: "el-table__header-wrapper"
  20561. },
  20562. [
  20563. _c("table-header", {
  20564. ref: "tableHeader",
  20565. style: {
  20566. width: _vm.layout.bodyWidth ? _vm.layout.bodyWidth + "px" : ""
  20567. },
  20568. attrs: {
  20569. store: _vm.store,
  20570. border: _vm.border,
  20571. "default-sort": _vm.defaultSort
  20572. }
  20573. })
  20574. ],
  20575. 1
  20576. )
  20577. : _vm._e(),
  20578. _c(
  20579. "div",
  20580. {
  20581. ref: "bodyWrapper",
  20582. staticClass: "el-table__body-wrapper",
  20583. class: [
  20584. _vm.layout.scrollX
  20585. ? "is-scrolling-" + _vm.scrollPosition
  20586. : "is-scrolling-none"
  20587. ],
  20588. style: [_vm.bodyHeight]
  20589. },
  20590. [
  20591. _c("table-body", {
  20592. style: {
  20593. width: _vm.bodyWidth
  20594. },
  20595. attrs: {
  20596. context: _vm.context,
  20597. store: _vm.store,
  20598. stripe: _vm.stripe,
  20599. "row-class-name": _vm.rowClassName,
  20600. "row-style": _vm.rowStyle,
  20601. highlight: _vm.highlightCurrentRow
  20602. }
  20603. }),
  20604. !_vm.data || _vm.data.length === 0
  20605. ? _c(
  20606. "div",
  20607. {
  20608. ref: "emptyBlock",
  20609. staticClass: "el-table__empty-block",
  20610. style: _vm.emptyBlockStyle
  20611. },
  20612. [
  20613. _c(
  20614. "span",
  20615. { staticClass: "el-table__empty-text" },
  20616. [
  20617. _vm._t("empty", [
  20618. _vm._v(
  20619. _vm._s(_vm.emptyText || _vm.t("el.table.emptyText"))
  20620. )
  20621. ])
  20622. ],
  20623. 2
  20624. )
  20625. ]
  20626. )
  20627. : _vm._e(),
  20628. _vm.$slots.append
  20629. ? _c(
  20630. "div",
  20631. {
  20632. ref: "appendWrapper",
  20633. staticClass: "el-table__append-wrapper"
  20634. },
  20635. [_vm._t("append")],
  20636. 2
  20637. )
  20638. : _vm._e()
  20639. ],
  20640. 1
  20641. ),
  20642. _vm.showSummary
  20643. ? _c(
  20644. "div",
  20645. {
  20646. directives: [
  20647. {
  20648. name: "show",
  20649. rawName: "v-show",
  20650. value: _vm.data && _vm.data.length > 0,
  20651. expression: "data && data.length > 0"
  20652. },
  20653. {
  20654. name: "mousewheel",
  20655. rawName: "v-mousewheel",
  20656. value: _vm.handleHeaderFooterMousewheel,
  20657. expression: "handleHeaderFooterMousewheel"
  20658. }
  20659. ],
  20660. ref: "footerWrapper",
  20661. staticClass: "el-table__footer-wrapper"
  20662. },
  20663. [
  20664. _c("table-footer", {
  20665. style: {
  20666. width: _vm.layout.bodyWidth ? _vm.layout.bodyWidth + "px" : ""
  20667. },
  20668. attrs: {
  20669. store: _vm.store,
  20670. border: _vm.border,
  20671. "sum-text": _vm.sumText || _vm.t("el.table.sumText"),
  20672. "summary-method": _vm.summaryMethod,
  20673. "default-sort": _vm.defaultSort
  20674. }
  20675. })
  20676. ],
  20677. 1
  20678. )
  20679. : _vm._e(),
  20680. _vm.fixedColumns.length > 0
  20681. ? _c(
  20682. "div",
  20683. {
  20684. directives: [
  20685. {
  20686. name: "mousewheel",
  20687. rawName: "v-mousewheel",
  20688. value: _vm.handleFixedMousewheel,
  20689. expression: "handleFixedMousewheel"
  20690. }
  20691. ],
  20692. ref: "fixedWrapper",
  20693. staticClass: "el-table__fixed",
  20694. style: [
  20695. {
  20696. width: _vm.layout.fixedWidth
  20697. ? _vm.layout.fixedWidth + "px"
  20698. : ""
  20699. },
  20700. _vm.fixedHeight
  20701. ]
  20702. },
  20703. [
  20704. _vm.showHeader
  20705. ? _c(
  20706. "div",
  20707. {
  20708. ref: "fixedHeaderWrapper",
  20709. staticClass: "el-table__fixed-header-wrapper"
  20710. },
  20711. [
  20712. _c("table-header", {
  20713. ref: "fixedTableHeader",
  20714. style: {
  20715. width: _vm.bodyWidth
  20716. },
  20717. attrs: {
  20718. fixed: "left",
  20719. border: _vm.border,
  20720. store: _vm.store
  20721. }
  20722. })
  20723. ],
  20724. 1
  20725. )
  20726. : _vm._e(),
  20727. _c(
  20728. "div",
  20729. {
  20730. ref: "fixedBodyWrapper",
  20731. staticClass: "el-table__fixed-body-wrapper",
  20732. style: [
  20733. {
  20734. top: _vm.layout.headerHeight + "px"
  20735. },
  20736. _vm.fixedBodyHeight
  20737. ]
  20738. },
  20739. [
  20740. _c("table-body", {
  20741. style: {
  20742. width: _vm.bodyWidth
  20743. },
  20744. attrs: {
  20745. fixed: "left",
  20746. store: _vm.store,
  20747. stripe: _vm.stripe,
  20748. highlight: _vm.highlightCurrentRow,
  20749. "row-class-name": _vm.rowClassName,
  20750. "row-style": _vm.rowStyle
  20751. }
  20752. }),
  20753. _vm.$slots.append
  20754. ? _c("div", {
  20755. staticClass: "el-table__append-gutter",
  20756. style: { height: _vm.layout.appendHeight + "px" }
  20757. })
  20758. : _vm._e()
  20759. ],
  20760. 1
  20761. ),
  20762. _vm.showSummary
  20763. ? _c(
  20764. "div",
  20765. {
  20766. directives: [
  20767. {
  20768. name: "show",
  20769. rawName: "v-show",
  20770. value: _vm.data && _vm.data.length > 0,
  20771. expression: "data && data.length > 0"
  20772. }
  20773. ],
  20774. ref: "fixedFooterWrapper",
  20775. staticClass: "el-table__fixed-footer-wrapper"
  20776. },
  20777. [
  20778. _c("table-footer", {
  20779. style: {
  20780. width: _vm.bodyWidth
  20781. },
  20782. attrs: {
  20783. fixed: "left",
  20784. border: _vm.border,
  20785. "sum-text": _vm.sumText || _vm.t("el.table.sumText"),
  20786. "summary-method": _vm.summaryMethod,
  20787. store: _vm.store
  20788. }
  20789. })
  20790. ],
  20791. 1
  20792. )
  20793. : _vm._e()
  20794. ]
  20795. )
  20796. : _vm._e(),
  20797. _vm.rightFixedColumns.length > 0
  20798. ? _c(
  20799. "div",
  20800. {
  20801. directives: [
  20802. {
  20803. name: "mousewheel",
  20804. rawName: "v-mousewheel",
  20805. value: _vm.handleFixedMousewheel,
  20806. expression: "handleFixedMousewheel"
  20807. }
  20808. ],
  20809. ref: "rightFixedWrapper",
  20810. staticClass: "el-table__fixed-right",
  20811. style: [
  20812. {
  20813. width: _vm.layout.rightFixedWidth
  20814. ? _vm.layout.rightFixedWidth + "px"
  20815. : "",
  20816. right: _vm.layout.scrollY
  20817. ? (_vm.border
  20818. ? _vm.layout.gutterWidth
  20819. : _vm.layout.gutterWidth || 0) + "px"
  20820. : ""
  20821. },
  20822. _vm.fixedHeight
  20823. ]
  20824. },
  20825. [
  20826. _vm.showHeader
  20827. ? _c(
  20828. "div",
  20829. {
  20830. ref: "rightFixedHeaderWrapper",
  20831. staticClass: "el-table__fixed-header-wrapper"
  20832. },
  20833. [
  20834. _c("table-header", {
  20835. ref: "rightFixedTableHeader",
  20836. style: {
  20837. width: _vm.bodyWidth
  20838. },
  20839. attrs: {
  20840. fixed: "right",
  20841. border: _vm.border,
  20842. store: _vm.store
  20843. }
  20844. })
  20845. ],
  20846. 1
  20847. )
  20848. : _vm._e(),
  20849. _c(
  20850. "div",
  20851. {
  20852. ref: "rightFixedBodyWrapper",
  20853. staticClass: "el-table__fixed-body-wrapper",
  20854. style: [
  20855. {
  20856. top: _vm.layout.headerHeight + "px"
  20857. },
  20858. _vm.fixedBodyHeight
  20859. ]
  20860. },
  20861. [
  20862. _c("table-body", {
  20863. style: {
  20864. width: _vm.bodyWidth
  20865. },
  20866. attrs: {
  20867. fixed: "right",
  20868. store: _vm.store,
  20869. stripe: _vm.stripe,
  20870. "row-class-name": _vm.rowClassName,
  20871. "row-style": _vm.rowStyle,
  20872. highlight: _vm.highlightCurrentRow
  20873. }
  20874. }),
  20875. _vm.$slots.append
  20876. ? _c("div", {
  20877. staticClass: "el-table__append-gutter",
  20878. style: { height: _vm.layout.appendHeight + "px" }
  20879. })
  20880. : _vm._e()
  20881. ],
  20882. 1
  20883. ),
  20884. _vm.showSummary
  20885. ? _c(
  20886. "div",
  20887. {
  20888. directives: [
  20889. {
  20890. name: "show",
  20891. rawName: "v-show",
  20892. value: _vm.data && _vm.data.length > 0,
  20893. expression: "data && data.length > 0"
  20894. }
  20895. ],
  20896. ref: "rightFixedFooterWrapper",
  20897. staticClass: "el-table__fixed-footer-wrapper"
  20898. },
  20899. [
  20900. _c("table-footer", {
  20901. style: {
  20902. width: _vm.bodyWidth
  20903. },
  20904. attrs: {
  20905. fixed: "right",
  20906. border: _vm.border,
  20907. "sum-text": _vm.sumText || _vm.t("el.table.sumText"),
  20908. "summary-method": _vm.summaryMethod,
  20909. store: _vm.store
  20910. }
  20911. })
  20912. ],
  20913. 1
  20914. )
  20915. : _vm._e()
  20916. ]
  20917. )
  20918. : _vm._e(),
  20919. _vm.rightFixedColumns.length > 0
  20920. ? _c("div", {
  20921. ref: "rightFixedPatch",
  20922. staticClass: "el-table__fixed-right-patch",
  20923. style: {
  20924. width: _vm.layout.scrollY ? _vm.layout.gutterWidth + "px" : "0",
  20925. height: _vm.layout.headerHeight + "px"
  20926. }
  20927. })
  20928. : _vm._e(),
  20929. _c("div", {
  20930. directives: [
  20931. {
  20932. name: "show",
  20933. rawName: "v-show",
  20934. value: _vm.resizeProxyVisible,
  20935. expression: "resizeProxyVisible"
  20936. }
  20937. ],
  20938. ref: "resizeProxy",
  20939. staticClass: "el-table__column-resize-proxy"
  20940. })
  20941. ]
  20942. )
  20943. }
  20944. var tablevue_type_template_id_493fe34e_staticRenderFns = []
  20945. tablevue_type_template_id_493fe34e_render._withStripped = true
  20946. // CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=493fe34e&
  20947. // EXTERNAL MODULE: external "element-ui/lib/checkbox"
  20948. var checkbox_ = __webpack_require__(17);
  20949. var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
  20950. // EXTERNAL MODULE: external "throttle-debounce"
  20951. var external_throttle_debounce_ = __webpack_require__(35);
  20952. // EXTERNAL MODULE: external "normalize-wheel"
  20953. var external_normalize_wheel_ = __webpack_require__(38);
  20954. var external_normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(external_normalize_wheel_);
  20955. // CONCATENATED MODULE: ./src/directives/mousewheel.js
  20956. var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
  20957. var mousewheel_mousewheel = function mousewheel(element, callback) {
  20958. if (element && element.addEventListener) {
  20959. element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', function (event) {
  20960. var normalized = external_normalize_wheel_default()(event);
  20961. callback && callback.apply(this, [event, normalized]);
  20962. });
  20963. }
  20964. };
  20965. /* harmony default export */ var directives_mousewheel = ({
  20966. bind: function bind(el, binding) {
  20967. mousewheel_mousewheel(el, binding.value);
  20968. }
  20969. });
  20970. // EXTERNAL MODULE: external "vue"
  20971. var external_vue_ = __webpack_require__(6);
  20972. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  20973. // CONCATENATED MODULE: ./packages/table/src/util.js
  20974. var util_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  20975. var getCell = function getCell(event) {
  20976. var cell = event.target;
  20977. while (cell && cell.tagName.toUpperCase() !== 'HTML') {
  20978. if (cell.tagName.toUpperCase() === 'TD') {
  20979. return cell;
  20980. }
  20981. cell = cell.parentNode;
  20982. }
  20983. return null;
  20984. };
  20985. var util_isObject = function isObject(obj) {
  20986. return obj !== null && (typeof obj === 'undefined' ? 'undefined' : util_typeof(obj)) === 'object';
  20987. };
  20988. var util_orderBy = function orderBy(array, sortKey, reverse, sortMethod, sortBy) {
  20989. if (!sortKey && !sortMethod && (!sortBy || Array.isArray(sortBy) && !sortBy.length)) {
  20990. return array;
  20991. }
  20992. if (typeof reverse === 'string') {
  20993. reverse = reverse === 'descending' ? -1 : 1;
  20994. } else {
  20995. reverse = reverse && reverse < 0 ? -1 : 1;
  20996. }
  20997. var getKey = sortMethod ? null : function (value, index) {
  20998. if (sortBy) {
  20999. if (!Array.isArray(sortBy)) {
  21000. sortBy = [sortBy];
  21001. }
  21002. return sortBy.map(function (by) {
  21003. if (typeof by === 'string') {
  21004. return Object(util_["getValueByPath"])(value, by);
  21005. } else {
  21006. return by(value, index, array);
  21007. }
  21008. });
  21009. }
  21010. if (sortKey !== '$key') {
  21011. if (util_isObject(value) && '$value' in value) value = value.$value;
  21012. }
  21013. return [util_isObject(value) ? Object(util_["getValueByPath"])(value, sortKey) : value];
  21014. };
  21015. var compare = function compare(a, b) {
  21016. if (sortMethod) {
  21017. return sortMethod(a.value, b.value);
  21018. }
  21019. for (var i = 0, len = a.key.length; i < len; i++) {
  21020. if (a.key[i] < b.key[i]) {
  21021. return -1;
  21022. }
  21023. if (a.key[i] > b.key[i]) {
  21024. return 1;
  21025. }
  21026. }
  21027. return 0;
  21028. };
  21029. return array.map(function (value, index) {
  21030. return {
  21031. value: value,
  21032. index: index,
  21033. key: getKey ? getKey(value, index) : null
  21034. };
  21035. }).sort(function (a, b) {
  21036. var order = compare(a, b);
  21037. if (!order) {
  21038. // make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
  21039. order = a.index - b.index;
  21040. }
  21041. return order * reverse;
  21042. }).map(function (item) {
  21043. return item.value;
  21044. });
  21045. };
  21046. var getColumnById = function getColumnById(table, columnId) {
  21047. var column = null;
  21048. table.columns.forEach(function (item) {
  21049. if (item.id === columnId) {
  21050. column = item;
  21051. }
  21052. });
  21053. return column;
  21054. };
  21055. var getColumnByKey = function getColumnByKey(table, columnKey) {
  21056. var column = null;
  21057. for (var i = 0; i < table.columns.length; i++) {
  21058. var item = table.columns[i];
  21059. if (item.columnKey === columnKey) {
  21060. column = item;
  21061. break;
  21062. }
  21063. }
  21064. return column;
  21065. };
  21066. var getColumnByCell = function getColumnByCell(table, cell) {
  21067. var matches = (cell.className || '').match(/el-table_[^\s]+/gm);
  21068. if (matches) {
  21069. return getColumnById(table, matches[0]);
  21070. }
  21071. return null;
  21072. };
  21073. var getRowIdentity = function getRowIdentity(row, rowKey) {
  21074. if (!row) throw new Error('row is required when get row identity');
  21075. if (typeof rowKey === 'string') {
  21076. if (rowKey.indexOf('.') < 0) {
  21077. return row[rowKey];
  21078. }
  21079. var key = rowKey.split('.');
  21080. var current = row;
  21081. for (var i = 0; i < key.length; i++) {
  21082. current = current[key[i]];
  21083. }
  21084. return current;
  21085. } else if (typeof rowKey === 'function') {
  21086. return rowKey.call(null, row);
  21087. }
  21088. };
  21089. var getKeysMap = function getKeysMap(array, rowKey) {
  21090. var arrayMap = {};
  21091. (array || []).forEach(function (row, index) {
  21092. arrayMap[getRowIdentity(row, rowKey)] = { row: row, index: index };
  21093. });
  21094. return arrayMap;
  21095. };
  21096. function hasOwn(obj, key) {
  21097. return Object.prototype.hasOwnProperty.call(obj, key);
  21098. }
  21099. function mergeOptions(defaults, config) {
  21100. var options = {};
  21101. var key = void 0;
  21102. for (key in defaults) {
  21103. options[key] = defaults[key];
  21104. }
  21105. for (key in config) {
  21106. if (hasOwn(config, key)) {
  21107. var value = config[key];
  21108. if (typeof value !== 'undefined') {
  21109. options[key] = value;
  21110. }
  21111. }
  21112. }
  21113. return options;
  21114. }
  21115. function parseWidth(width) {
  21116. if (width !== undefined) {
  21117. width = parseInt(width, 10);
  21118. if (isNaN(width)) {
  21119. width = null;
  21120. }
  21121. }
  21122. return width;
  21123. }
  21124. function parseMinWidth(minWidth) {
  21125. if (typeof minWidth !== 'undefined') {
  21126. minWidth = parseWidth(minWidth);
  21127. if (isNaN(minWidth)) {
  21128. minWidth = 80;
  21129. }
  21130. }
  21131. return minWidth;
  21132. };
  21133. function parseHeight(height) {
  21134. if (typeof height === 'number') {
  21135. return height;
  21136. }
  21137. if (typeof height === 'string') {
  21138. if (/^\d+(?:px)?$/.test(height)) {
  21139. return parseInt(height, 10);
  21140. } else {
  21141. return height;
  21142. }
  21143. }
  21144. return null;
  21145. }
  21146. // https://github.com/reduxjs/redux/blob/master/src/compose.js
  21147. function compose() {
  21148. for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
  21149. funcs[_key] = arguments[_key];
  21150. }
  21151. if (funcs.length === 0) {
  21152. return function (arg) {
  21153. return arg;
  21154. };
  21155. }
  21156. if (funcs.length === 1) {
  21157. return funcs[0];
  21158. }
  21159. return funcs.reduce(function (a, b) {
  21160. return function () {
  21161. return a(b.apply(undefined, arguments));
  21162. };
  21163. });
  21164. }
  21165. function toggleRowStatus(statusArr, row, newVal) {
  21166. var changed = false;
  21167. var index = statusArr.indexOf(row);
  21168. var included = index !== -1;
  21169. var addRow = function addRow() {
  21170. statusArr.push(row);
  21171. changed = true;
  21172. };
  21173. var removeRow = function removeRow() {
  21174. statusArr.splice(index, 1);
  21175. changed = true;
  21176. };
  21177. if (typeof newVal === 'boolean') {
  21178. if (newVal && !included) {
  21179. addRow();
  21180. } else if (!newVal && included) {
  21181. removeRow();
  21182. }
  21183. } else {
  21184. if (included) {
  21185. removeRow();
  21186. } else {
  21187. addRow();
  21188. }
  21189. }
  21190. return changed;
  21191. }
  21192. function walkTreeNode(root, cb) {
  21193. var childrenKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'children';
  21194. var lazyKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'hasChildren';
  21195. var isNil = function isNil(array) {
  21196. return !(Array.isArray(array) && array.length);
  21197. };
  21198. function _walker(parent, children, level) {
  21199. cb(parent, children, level);
  21200. children.forEach(function (item) {
  21201. if (item[lazyKey]) {
  21202. cb(item, null, level + 1);
  21203. return;
  21204. }
  21205. var children = item[childrenKey];
  21206. if (!isNil(children)) {
  21207. _walker(item, children, level + 1);
  21208. }
  21209. });
  21210. }
  21211. root.forEach(function (item) {
  21212. if (item[lazyKey]) {
  21213. cb(item, null, 0);
  21214. return;
  21215. }
  21216. var children = item[childrenKey];
  21217. if (!isNil(children)) {
  21218. _walker(item, children, 0);
  21219. }
  21220. });
  21221. }
  21222. // CONCATENATED MODULE: ./packages/table/src/store/expand.js
  21223. /* harmony default export */ var expand = ({
  21224. data: function data() {
  21225. return {
  21226. states: {
  21227. defaultExpandAll: false,
  21228. expandRows: []
  21229. }
  21230. };
  21231. },
  21232. methods: {
  21233. updateExpandRows: function updateExpandRows() {
  21234. var _states = this.states,
  21235. _states$data = _states.data,
  21236. data = _states$data === undefined ? [] : _states$data,
  21237. rowKey = _states.rowKey,
  21238. defaultExpandAll = _states.defaultExpandAll,
  21239. expandRows = _states.expandRows;
  21240. if (defaultExpandAll) {
  21241. this.states.expandRows = data.slice();
  21242. } else if (rowKey) {
  21243. // TODO:这里的代码可以优化
  21244. var expandRowsMap = getKeysMap(expandRows, rowKey);
  21245. this.states.expandRows = data.reduce(function (prev, row) {
  21246. var rowId = getRowIdentity(row, rowKey);
  21247. var rowInfo = expandRowsMap[rowId];
  21248. if (rowInfo) {
  21249. prev.push(row);
  21250. }
  21251. return prev;
  21252. }, []);
  21253. } else {
  21254. this.states.expandRows = [];
  21255. }
  21256. },
  21257. toggleRowExpansion: function toggleRowExpansion(row, expanded) {
  21258. var changed = toggleRowStatus(this.states.expandRows, row, expanded);
  21259. if (changed) {
  21260. this.table.$emit('expand-change', row, this.states.expandRows.slice());
  21261. this.scheduleLayout();
  21262. }
  21263. },
  21264. setExpandRowKeys: function setExpandRowKeys(rowKeys) {
  21265. this.assertRowKey();
  21266. // TODO:这里的代码可以优化
  21267. var _states2 = this.states,
  21268. data = _states2.data,
  21269. rowKey = _states2.rowKey;
  21270. var keysMap = getKeysMap(data, rowKey);
  21271. this.states.expandRows = rowKeys.reduce(function (prev, cur) {
  21272. var info = keysMap[cur];
  21273. if (info) {
  21274. prev.push(info.row);
  21275. }
  21276. return prev;
  21277. }, []);
  21278. },
  21279. isRowExpanded: function isRowExpanded(row) {
  21280. var _states3 = this.states,
  21281. _states3$expandRows = _states3.expandRows,
  21282. expandRows = _states3$expandRows === undefined ? [] : _states3$expandRows,
  21283. rowKey = _states3.rowKey;
  21284. if (rowKey) {
  21285. var expandMap = getKeysMap(expandRows, rowKey);
  21286. return !!expandMap[getRowIdentity(row, rowKey)];
  21287. }
  21288. return expandRows.indexOf(row) !== -1;
  21289. }
  21290. }
  21291. });
  21292. // CONCATENATED MODULE: ./packages/table/src/store/current.js
  21293. /* harmony default export */ var store_current = ({
  21294. data: function data() {
  21295. return {
  21296. states: {
  21297. // 不可响应的,设置 currentRowKey 时,data 不一定存在,也许无法算出正确的 currentRow
  21298. // 把该值缓存一下,当用户点击修改 currentRow 时,把该值重置为 null
  21299. _currentRowKey: null,
  21300. currentRow: null
  21301. }
  21302. };
  21303. },
  21304. methods: {
  21305. setCurrentRowKey: function setCurrentRowKey(key) {
  21306. this.assertRowKey();
  21307. this.states._currentRowKey = key;
  21308. this.setCurrentRowByKey(key);
  21309. },
  21310. restoreCurrentRowKey: function restoreCurrentRowKey() {
  21311. this.states._currentRowKey = null;
  21312. },
  21313. setCurrentRowByKey: function setCurrentRowByKey(key) {
  21314. var states = this.states;
  21315. var _states$data = states.data,
  21316. data = _states$data === undefined ? [] : _states$data,
  21317. rowKey = states.rowKey;
  21318. var currentRow = null;
  21319. if (rowKey) {
  21320. currentRow = Object(util_["arrayFind"])(data, function (item) {
  21321. return getRowIdentity(item, rowKey) === key;
  21322. });
  21323. }
  21324. states.currentRow = currentRow;
  21325. },
  21326. updateCurrentRow: function updateCurrentRow(currentRow) {
  21327. var states = this.states,
  21328. table = this.table;
  21329. var oldCurrentRow = states.currentRow;
  21330. if (currentRow && currentRow !== oldCurrentRow) {
  21331. states.currentRow = currentRow;
  21332. table.$emit('current-change', currentRow, oldCurrentRow);
  21333. return;
  21334. }
  21335. if (!currentRow && oldCurrentRow) {
  21336. states.currentRow = null;
  21337. table.$emit('current-change', null, oldCurrentRow);
  21338. }
  21339. },
  21340. updateCurrentRowData: function updateCurrentRowData() {
  21341. var states = this.states,
  21342. table = this.table;
  21343. var rowKey = states.rowKey,
  21344. _currentRowKey = states._currentRowKey;
  21345. // data 为 null 时,解构时的默认值会被忽略
  21346. var data = states.data || [];
  21347. var oldCurrentRow = states.currentRow;
  21348. // 当 currentRow 不在 data 中时尝试更新数据
  21349. if (data.indexOf(oldCurrentRow) === -1 && oldCurrentRow) {
  21350. if (rowKey) {
  21351. var currentRowKey = getRowIdentity(oldCurrentRow, rowKey);
  21352. this.setCurrentRowByKey(currentRowKey);
  21353. } else {
  21354. states.currentRow = null;
  21355. }
  21356. if (states.currentRow === null) {
  21357. table.$emit('current-change', null, oldCurrentRow);
  21358. }
  21359. } else if (_currentRowKey) {
  21360. // 把初始时下设置的 rowKey 转化成 rowData
  21361. this.setCurrentRowByKey(_currentRowKey);
  21362. this.restoreCurrentRowKey();
  21363. }
  21364. }
  21365. }
  21366. });
  21367. // CONCATENATED MODULE: ./packages/table/src/store/tree.js
  21368. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  21369. /* harmony default export */ var tree = ({
  21370. data: function data() {
  21371. return {
  21372. states: {
  21373. // defaultExpandAll 存在于 expand.js 中,这里不重复添加
  21374. // 在展开行中,expandRowKeys 会被转化成 expandRows,expandRowKeys 这个属性只是记录了 TreeTable 行的展开
  21375. // TODO: 拆分为独立的 TreeTable,统一用法
  21376. expandRowKeys: [],
  21377. treeData: {},
  21378. indent: 16,
  21379. lazy: false,
  21380. lazyTreeNodeMap: {},
  21381. lazyColumnIdentifier: 'hasChildren',
  21382. childrenColumnName: 'children'
  21383. }
  21384. };
  21385. },
  21386. computed: {
  21387. // 嵌入型的数据,watch 无法是检测到变化 https://github.com/ElemeFE/element/issues/14998
  21388. // TODO: 使用 computed 解决该问题,是否会造成性能问题?
  21389. // @return { id: { level, children } }
  21390. normalizedData: function normalizedData() {
  21391. if (!this.states.rowKey) return {};
  21392. var data = this.states.data || [];
  21393. return this.normalize(data);
  21394. },
  21395. // @return { id: { children } }
  21396. // 针对懒加载的情形,不处理嵌套数据
  21397. normalizedLazyNode: function normalizedLazyNode() {
  21398. var _states = this.states,
  21399. rowKey = _states.rowKey,
  21400. lazyTreeNodeMap = _states.lazyTreeNodeMap,
  21401. lazyColumnIdentifier = _states.lazyColumnIdentifier;
  21402. var keys = Object.keys(lazyTreeNodeMap);
  21403. var res = {};
  21404. if (!keys.length) return res;
  21405. keys.forEach(function (key) {
  21406. if (lazyTreeNodeMap[key].length) {
  21407. var item = { children: [] };
  21408. lazyTreeNodeMap[key].forEach(function (row) {
  21409. var currentRowKey = getRowIdentity(row, rowKey);
  21410. item.children.push(currentRowKey);
  21411. if (row[lazyColumnIdentifier] && !res[currentRowKey]) {
  21412. res[currentRowKey] = { children: [] };
  21413. }
  21414. });
  21415. res[key] = item;
  21416. }
  21417. });
  21418. return res;
  21419. }
  21420. },
  21421. watch: {
  21422. normalizedData: 'updateTreeData',
  21423. normalizedLazyNode: 'updateTreeData'
  21424. },
  21425. methods: {
  21426. normalize: function normalize(data) {
  21427. var _states2 = this.states,
  21428. childrenColumnName = _states2.childrenColumnName,
  21429. lazyColumnIdentifier = _states2.lazyColumnIdentifier,
  21430. rowKey = _states2.rowKey,
  21431. lazy = _states2.lazy;
  21432. var res = {};
  21433. walkTreeNode(data, function (parent, children, level) {
  21434. var parentId = getRowIdentity(parent, rowKey);
  21435. if (Array.isArray(children)) {
  21436. res[parentId] = {
  21437. children: children.map(function (row) {
  21438. return getRowIdentity(row, rowKey);
  21439. }),
  21440. level: level
  21441. };
  21442. } else if (lazy) {
  21443. // 当 children 不存在且 lazy 为 true,该节点即为懒加载的节点
  21444. res[parentId] = {
  21445. children: [],
  21446. lazy: true,
  21447. level: level
  21448. };
  21449. }
  21450. }, childrenColumnName, lazyColumnIdentifier);
  21451. return res;
  21452. },
  21453. updateTreeData: function updateTreeData() {
  21454. var nested = this.normalizedData;
  21455. var normalizedLazyNode = this.normalizedLazyNode;
  21456. var keys = Object.keys(nested);
  21457. var newTreeData = {};
  21458. if (keys.length) {
  21459. var _states3 = this.states,
  21460. oldTreeData = _states3.treeData,
  21461. defaultExpandAll = _states3.defaultExpandAll,
  21462. expandRowKeys = _states3.expandRowKeys,
  21463. lazy = _states3.lazy;
  21464. var rootLazyRowKeys = [];
  21465. var getExpanded = function getExpanded(oldValue, key) {
  21466. var included = defaultExpandAll || expandRowKeys && expandRowKeys.indexOf(key) !== -1;
  21467. return !!(oldValue && oldValue.expanded || included);
  21468. };
  21469. // 合并 expanded 与 display,确保数据刷新后,状态不变
  21470. keys.forEach(function (key) {
  21471. var oldValue = oldTreeData[key];
  21472. var newValue = _extends({}, nested[key]);
  21473. newValue.expanded = getExpanded(oldValue, key);
  21474. if (newValue.lazy) {
  21475. var _ref = oldValue || {},
  21476. _ref$loaded = _ref.loaded,
  21477. loaded = _ref$loaded === undefined ? false : _ref$loaded,
  21478. _ref$loading = _ref.loading,
  21479. loading = _ref$loading === undefined ? false : _ref$loading;
  21480. newValue.loaded = !!loaded;
  21481. newValue.loading = !!loading;
  21482. rootLazyRowKeys.push(key);
  21483. }
  21484. newTreeData[key] = newValue;
  21485. });
  21486. // 根据懒加载数据更新 treeData
  21487. var lazyKeys = Object.keys(normalizedLazyNode);
  21488. if (lazy && lazyKeys.length && rootLazyRowKeys.length) {
  21489. lazyKeys.forEach(function (key) {
  21490. var oldValue = oldTreeData[key];
  21491. var lazyNodeChildren = normalizedLazyNode[key].children;
  21492. if (rootLazyRowKeys.indexOf(key) !== -1) {
  21493. // 懒加载的 root 节点,更新一下原有的数据,原来的 children 一定是空数组
  21494. if (newTreeData[key].children.length !== 0) {
  21495. throw new Error('[ElTable]children must be an empty array.');
  21496. }
  21497. newTreeData[key].children = lazyNodeChildren;
  21498. } else {
  21499. var _ref2 = oldValue || {},
  21500. _ref2$loaded = _ref2.loaded,
  21501. loaded = _ref2$loaded === undefined ? false : _ref2$loaded,
  21502. _ref2$loading = _ref2.loading,
  21503. loading = _ref2$loading === undefined ? false : _ref2$loading;
  21504. newTreeData[key] = {
  21505. lazy: true,
  21506. loaded: !!loaded,
  21507. loading: !!loading,
  21508. expanded: getExpanded(oldValue, key),
  21509. children: lazyNodeChildren,
  21510. level: ''
  21511. };
  21512. }
  21513. });
  21514. }
  21515. }
  21516. this.states.treeData = newTreeData;
  21517. this.updateTableScrollY();
  21518. },
  21519. updateTreeExpandKeys: function updateTreeExpandKeys(value) {
  21520. this.states.expandRowKeys = value;
  21521. this.updateTreeData();
  21522. },
  21523. toggleTreeExpansion: function toggleTreeExpansion(row, expanded) {
  21524. this.assertRowKey();
  21525. var _states4 = this.states,
  21526. rowKey = _states4.rowKey,
  21527. treeData = _states4.treeData;
  21528. var id = getRowIdentity(row, rowKey);
  21529. var data = id && treeData[id];
  21530. if (id && data && 'expanded' in data) {
  21531. var oldExpanded = data.expanded;
  21532. expanded = typeof expanded === 'undefined' ? !data.expanded : expanded;
  21533. treeData[id].expanded = expanded;
  21534. if (oldExpanded !== expanded) {
  21535. this.table.$emit('expand-change', row, expanded);
  21536. }
  21537. this.updateTableScrollY();
  21538. }
  21539. },
  21540. loadOrToggle: function loadOrToggle(row) {
  21541. this.assertRowKey();
  21542. var _states5 = this.states,
  21543. lazy = _states5.lazy,
  21544. treeData = _states5.treeData,
  21545. rowKey = _states5.rowKey;
  21546. var id = getRowIdentity(row, rowKey);
  21547. var data = treeData[id];
  21548. if (lazy && data && 'loaded' in data && !data.loaded) {
  21549. this.loadData(row, id, data);
  21550. } else {
  21551. this.toggleTreeExpansion(row);
  21552. }
  21553. },
  21554. loadData: function loadData(row, key, treeNode) {
  21555. var _this = this;
  21556. var load = this.table.load;
  21557. var rawTreeData = this.states.treeData;
  21558. if (load && !rawTreeData[key].loaded) {
  21559. rawTreeData[key].loading = true;
  21560. load(row, treeNode, function (data) {
  21561. if (!Array.isArray(data)) {
  21562. throw new Error('[ElTable] data must be an array');
  21563. }
  21564. var _states6 = _this.states,
  21565. lazyTreeNodeMap = _states6.lazyTreeNodeMap,
  21566. treeData = _states6.treeData;
  21567. treeData[key].loading = false;
  21568. treeData[key].loaded = true;
  21569. treeData[key].expanded = true;
  21570. if (data.length) {
  21571. _this.$set(lazyTreeNodeMap, key, data);
  21572. }
  21573. _this.table.$emit('expand-change', row, true);
  21574. });
  21575. }
  21576. }
  21577. }
  21578. });
  21579. // CONCATENATED MODULE: ./packages/table/src/store/watcher.js
  21580. var watcher_sortData = function sortData(data, states) {
  21581. var sortingColumn = states.sortingColumn;
  21582. if (!sortingColumn || typeof sortingColumn.sortable === 'string') {
  21583. return data;
  21584. }
  21585. return util_orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
  21586. };
  21587. var doFlattenColumns = function doFlattenColumns(columns) {
  21588. var result = [];
  21589. columns.forEach(function (column) {
  21590. if (column.children) {
  21591. result.push.apply(result, doFlattenColumns(column.children));
  21592. } else {
  21593. result.push(column);
  21594. }
  21595. });
  21596. return result;
  21597. };
  21598. /* harmony default export */ var watcher = (external_vue_default.a.extend({
  21599. data: function data() {
  21600. return {
  21601. states: {
  21602. // 3.0 版本后要求必须设置该属性
  21603. rowKey: null,
  21604. // 渲染的数据来源,是对 table 中的 data 过滤排序后的结果
  21605. data: [],
  21606. // 是否包含固定列
  21607. isComplex: false,
  21608. // 列
  21609. _columns: [], // 不可响应的
  21610. originColumns: [],
  21611. columns: [],
  21612. fixedColumns: [],
  21613. rightFixedColumns: [],
  21614. leafColumns: [],
  21615. fixedLeafColumns: [],
  21616. rightFixedLeafColumns: [],
  21617. leafColumnsLength: 0,
  21618. fixedLeafColumnsLength: 0,
  21619. rightFixedLeafColumnsLength: 0,
  21620. // 选择
  21621. isAllSelected: false,
  21622. selection: [],
  21623. reserveSelection: false,
  21624. selectOnIndeterminate: false,
  21625. selectable: null,
  21626. // 过滤
  21627. filters: {}, // 不可响应的
  21628. filteredData: null,
  21629. // 排序
  21630. sortingColumn: null,
  21631. sortProp: null,
  21632. sortOrder: null,
  21633. hoverRow: null
  21634. }
  21635. };
  21636. },
  21637. mixins: [expand, store_current, tree],
  21638. methods: {
  21639. // 检查 rowKey 是否存在
  21640. assertRowKey: function assertRowKey() {
  21641. var rowKey = this.states.rowKey;
  21642. if (!rowKey) throw new Error('[ElTable] prop row-key is required');
  21643. },
  21644. // 更新列
  21645. updateColumns: function updateColumns() {
  21646. var states = this.states;
  21647. var _columns = states._columns || [];
  21648. states.fixedColumns = _columns.filter(function (column) {
  21649. return column.fixed === true || column.fixed === 'left';
  21650. });
  21651. states.rightFixedColumns = _columns.filter(function (column) {
  21652. return column.fixed === 'right';
  21653. });
  21654. if (states.fixedColumns.length > 0 && _columns[0] && _columns[0].type === 'selection' && !_columns[0].fixed) {
  21655. _columns[0].fixed = true;
  21656. states.fixedColumns.unshift(_columns[0]);
  21657. }
  21658. var notFixedColumns = _columns.filter(function (column) {
  21659. return !column.fixed;
  21660. });
  21661. states.originColumns = [].concat(states.fixedColumns).concat(notFixedColumns).concat(states.rightFixedColumns);
  21662. var leafColumns = doFlattenColumns(notFixedColumns);
  21663. var fixedLeafColumns = doFlattenColumns(states.fixedColumns);
  21664. var rightFixedLeafColumns = doFlattenColumns(states.rightFixedColumns);
  21665. states.leafColumnsLength = leafColumns.length;
  21666. states.fixedLeafColumnsLength = fixedLeafColumns.length;
  21667. states.rightFixedLeafColumnsLength = rightFixedLeafColumns.length;
  21668. states.columns = [].concat(fixedLeafColumns).concat(leafColumns).concat(rightFixedLeafColumns);
  21669. states.isComplex = states.fixedColumns.length > 0 || states.rightFixedColumns.length > 0;
  21670. },
  21671. // 更新 DOM
  21672. scheduleLayout: function scheduleLayout(needUpdateColumns) {
  21673. if (needUpdateColumns) {
  21674. this.updateColumns();
  21675. }
  21676. this.table.debouncedUpdateLayout();
  21677. },
  21678. // 选择
  21679. isSelected: function isSelected(row) {
  21680. var _states$selection = this.states.selection,
  21681. selection = _states$selection === undefined ? [] : _states$selection;
  21682. return selection.indexOf(row) > -1;
  21683. },
  21684. clearSelection: function clearSelection() {
  21685. var states = this.states;
  21686. states.isAllSelected = false;
  21687. var oldSelection = states.selection;
  21688. if (oldSelection.length) {
  21689. states.selection = [];
  21690. this.table.$emit('selection-change', []);
  21691. }
  21692. },
  21693. cleanSelection: function cleanSelection() {
  21694. var states = this.states;
  21695. var data = states.data,
  21696. rowKey = states.rowKey,
  21697. selection = states.selection;
  21698. var deleted = void 0;
  21699. if (rowKey) {
  21700. deleted = [];
  21701. var selectedMap = getKeysMap(selection, rowKey);
  21702. var dataMap = getKeysMap(data, rowKey);
  21703. for (var key in selectedMap) {
  21704. if (selectedMap.hasOwnProperty(key) && !dataMap[key]) {
  21705. deleted.push(selectedMap[key].row);
  21706. }
  21707. }
  21708. } else {
  21709. deleted = selection.filter(function (item) {
  21710. return data.indexOf(item) === -1;
  21711. });
  21712. }
  21713. if (deleted.length) {
  21714. var newSelection = selection.filter(function (item) {
  21715. return deleted.indexOf(item) === -1;
  21716. });
  21717. states.selection = newSelection;
  21718. this.table.$emit('selection-change', newSelection.slice());
  21719. }
  21720. },
  21721. toggleRowSelection: function toggleRowSelection(row, selected) {
  21722. var emitChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  21723. var changed = toggleRowStatus(this.states.selection, row, selected);
  21724. if (changed) {
  21725. var newSelection = (this.states.selection || []).slice();
  21726. // 调用 API 修改选中值,不触发 select 事件
  21727. if (emitChange) {
  21728. this.table.$emit('select', newSelection, row);
  21729. }
  21730. this.table.$emit('selection-change', newSelection);
  21731. }
  21732. },
  21733. _toggleAllSelection: function _toggleAllSelection() {
  21734. var states = this.states;
  21735. var _states$data = states.data,
  21736. data = _states$data === undefined ? [] : _states$data,
  21737. selection = states.selection;
  21738. // when only some rows are selected (but not all), select or deselect all of them
  21739. // depending on the value of selectOnIndeterminate
  21740. var value = states.selectOnIndeterminate ? !states.isAllSelected : !(states.isAllSelected || selection.length);
  21741. states.isAllSelected = value;
  21742. var selectionChanged = false;
  21743. data.forEach(function (row, index) {
  21744. if (states.selectable) {
  21745. if (states.selectable.call(null, row, index) && toggleRowStatus(selection, row, value)) {
  21746. selectionChanged = true;
  21747. }
  21748. } else {
  21749. if (toggleRowStatus(selection, row, value)) {
  21750. selectionChanged = true;
  21751. }
  21752. }
  21753. });
  21754. if (selectionChanged) {
  21755. this.table.$emit('selection-change', selection ? selection.slice() : []);
  21756. }
  21757. this.table.$emit('select-all', selection);
  21758. },
  21759. updateSelectionByRowKey: function updateSelectionByRowKey() {
  21760. var states = this.states;
  21761. var selection = states.selection,
  21762. rowKey = states.rowKey,
  21763. data = states.data;
  21764. var selectedMap = getKeysMap(selection, rowKey);
  21765. data.forEach(function (row) {
  21766. var rowId = getRowIdentity(row, rowKey);
  21767. var rowInfo = selectedMap[rowId];
  21768. if (rowInfo) {
  21769. selection[rowInfo.index] = row;
  21770. }
  21771. });
  21772. },
  21773. updateAllSelected: function updateAllSelected() {
  21774. var states = this.states;
  21775. var selection = states.selection,
  21776. rowKey = states.rowKey,
  21777. selectable = states.selectable;
  21778. // data 为 null 时,解构时的默认值会被忽略
  21779. var data = states.data || [];
  21780. if (data.length === 0) {
  21781. states.isAllSelected = false;
  21782. return;
  21783. }
  21784. var selectedMap = void 0;
  21785. if (rowKey) {
  21786. selectedMap = getKeysMap(selection, rowKey);
  21787. }
  21788. var isSelected = function isSelected(row) {
  21789. if (selectedMap) {
  21790. return !!selectedMap[getRowIdentity(row, rowKey)];
  21791. } else {
  21792. return selection.indexOf(row) !== -1;
  21793. }
  21794. };
  21795. var isAllSelected = true;
  21796. var selectedCount = 0;
  21797. for (var i = 0, j = data.length; i < j; i++) {
  21798. var item = data[i];
  21799. var isRowSelectable = selectable && selectable.call(null, item, i);
  21800. if (!isSelected(item)) {
  21801. if (!selectable || isRowSelectable) {
  21802. isAllSelected = false;
  21803. break;
  21804. }
  21805. } else {
  21806. selectedCount++;
  21807. }
  21808. }
  21809. if (selectedCount === 0) isAllSelected = false;
  21810. states.isAllSelected = isAllSelected;
  21811. },
  21812. // 过滤与排序
  21813. updateFilters: function updateFilters(columns, values) {
  21814. if (!Array.isArray(columns)) {
  21815. columns = [columns];
  21816. }
  21817. var states = this.states;
  21818. var filters = {};
  21819. columns.forEach(function (col) {
  21820. states.filters[col.id] = values;
  21821. filters[col.columnKey || col.id] = values;
  21822. });
  21823. return filters;
  21824. },
  21825. updateSort: function updateSort(column, prop, order) {
  21826. if (this.states.sortingColumn && this.states.sortingColumn !== column) {
  21827. this.states.sortingColumn.order = null;
  21828. }
  21829. this.states.sortingColumn = column;
  21830. this.states.sortProp = prop;
  21831. this.states.sortOrder = order;
  21832. },
  21833. execFilter: function execFilter() {
  21834. var _this = this;
  21835. var states = this.states;
  21836. var _data = states._data,
  21837. filters = states.filters;
  21838. var data = _data;
  21839. Object.keys(filters).forEach(function (columnId) {
  21840. var values = states.filters[columnId];
  21841. if (!values || values.length === 0) return;
  21842. var column = getColumnById(_this.states, columnId);
  21843. if (column && column.filterMethod) {
  21844. data = data.filter(function (row) {
  21845. return values.some(function (value) {
  21846. return column.filterMethod.call(null, value, row, column);
  21847. });
  21848. });
  21849. }
  21850. });
  21851. states.filteredData = data;
  21852. },
  21853. execSort: function execSort() {
  21854. var states = this.states;
  21855. states.data = watcher_sortData(states.filteredData, states);
  21856. },
  21857. // 根据 filters 与 sort 去过滤 data
  21858. execQuery: function execQuery(ignore) {
  21859. if (!(ignore && ignore.filter)) {
  21860. this.execFilter();
  21861. }
  21862. this.execSort();
  21863. },
  21864. clearFilter: function clearFilter(columnKeys) {
  21865. var states = this.states;
  21866. var _table$$refs = this.table.$refs,
  21867. tableHeader = _table$$refs.tableHeader,
  21868. fixedTableHeader = _table$$refs.fixedTableHeader,
  21869. rightFixedTableHeader = _table$$refs.rightFixedTableHeader;
  21870. var panels = {};
  21871. if (tableHeader) panels = merge_default()(panels, tableHeader.filterPanels);
  21872. if (fixedTableHeader) panels = merge_default()(panels, fixedTableHeader.filterPanels);
  21873. if (rightFixedTableHeader) panels = merge_default()(panels, rightFixedTableHeader.filterPanels);
  21874. var keys = Object.keys(panels);
  21875. if (!keys.length) return;
  21876. if (typeof columnKeys === 'string') {
  21877. columnKeys = [columnKeys];
  21878. }
  21879. if (Array.isArray(columnKeys)) {
  21880. var columns = columnKeys.map(function (key) {
  21881. return getColumnByKey(states, key);
  21882. });
  21883. keys.forEach(function (key) {
  21884. var column = columns.find(function (col) {
  21885. return col.id === key;
  21886. });
  21887. if (column) {
  21888. // TODO: 优化这里的代码
  21889. panels[key].filteredValue = [];
  21890. }
  21891. });
  21892. this.commit('filterChange', {
  21893. column: columns,
  21894. values: [],
  21895. silent: true,
  21896. multi: true
  21897. });
  21898. } else {
  21899. keys.forEach(function (key) {
  21900. // TODO: 优化这里的代码
  21901. panels[key].filteredValue = [];
  21902. });
  21903. states.filters = {};
  21904. this.commit('filterChange', {
  21905. column: {},
  21906. values: [],
  21907. silent: true
  21908. });
  21909. }
  21910. },
  21911. clearSort: function clearSort() {
  21912. var states = this.states;
  21913. if (!states.sortingColumn) return;
  21914. this.updateSort(null, null, null);
  21915. this.commit('changeSortCondition', {
  21916. silent: true
  21917. });
  21918. },
  21919. // 适配层,expand-row-keys 在 Expand 与 TreeTable 中都有使用
  21920. setExpandRowKeysAdapter: function setExpandRowKeysAdapter(val) {
  21921. // 这里会触发额外的计算,但为了兼容性,暂时这么做
  21922. this.setExpandRowKeys(val);
  21923. this.updateTreeExpandKeys(val);
  21924. },
  21925. // 展开行与 TreeTable 都要使用
  21926. toggleRowExpansionAdapter: function toggleRowExpansionAdapter(row, expanded) {
  21927. var hasExpandColumn = this.states.columns.some(function (_ref) {
  21928. var type = _ref.type;
  21929. return type === 'expand';
  21930. });
  21931. if (hasExpandColumn) {
  21932. this.toggleRowExpansion(row, expanded);
  21933. } else {
  21934. this.toggleTreeExpansion(row, expanded);
  21935. }
  21936. }
  21937. }
  21938. }));
  21939. // CONCATENATED MODULE: ./packages/table/src/store/index.js
  21940. watcher.prototype.mutations = {
  21941. setData: function setData(states, data) {
  21942. var dataInstanceChanged = states._data !== data;
  21943. states._data = data;
  21944. this.execQuery();
  21945. // 数据变化,更新部分数据。
  21946. // 没有使用 computed,而是手动更新部分数据 https://github.com/vuejs/vue/issues/6660#issuecomment-331417140
  21947. this.updateCurrentRowData();
  21948. this.updateExpandRows();
  21949. if (states.reserveSelection) {
  21950. this.assertRowKey();
  21951. this.updateSelectionByRowKey();
  21952. } else {
  21953. if (dataInstanceChanged) {
  21954. this.clearSelection();
  21955. } else {
  21956. this.cleanSelection();
  21957. }
  21958. }
  21959. this.updateAllSelected();
  21960. this.updateTableScrollY();
  21961. },
  21962. insertColumn: function insertColumn(states, column, index, parent) {
  21963. var array = states._columns;
  21964. if (parent) {
  21965. array = parent.children;
  21966. if (!array) array = parent.children = [];
  21967. }
  21968. if (typeof index !== 'undefined') {
  21969. array.splice(index, 0, column);
  21970. } else {
  21971. array.push(column);
  21972. }
  21973. if (column.type === 'selection') {
  21974. states.selectable = column.selectable;
  21975. states.reserveSelection = column.reserveSelection;
  21976. }
  21977. if (this.table.$ready) {
  21978. this.updateColumns(); // hack for dynamics insert column
  21979. this.scheduleLayout();
  21980. }
  21981. },
  21982. removeColumn: function removeColumn(states, column, parent) {
  21983. var array = states._columns;
  21984. if (parent) {
  21985. array = parent.children;
  21986. if (!array) array = parent.children = [];
  21987. }
  21988. if (array) {
  21989. array.splice(array.indexOf(column), 1);
  21990. }
  21991. if (this.table.$ready) {
  21992. this.updateColumns(); // hack for dynamics remove column
  21993. this.scheduleLayout();
  21994. }
  21995. },
  21996. sort: function sort(states, options) {
  21997. var prop = options.prop,
  21998. order = options.order,
  21999. init = options.init;
  22000. if (prop) {
  22001. var column = Object(util_["arrayFind"])(states.columns, function (column) {
  22002. return column.property === prop;
  22003. });
  22004. if (column) {
  22005. column.order = order;
  22006. this.updateSort(column, prop, order);
  22007. this.commit('changeSortCondition', { init: init });
  22008. }
  22009. }
  22010. },
  22011. changeSortCondition: function changeSortCondition(states, options) {
  22012. // 修复 pr https://github.com/ElemeFE/element/pull/15012 导致的 bug
  22013. var column = states.sortingColumn,
  22014. prop = states.sortProp,
  22015. order = states.sortOrder;
  22016. if (order === null) {
  22017. states.sortingColumn = null;
  22018. states.sortProp = null;
  22019. }
  22020. var ingore = { filter: true };
  22021. this.execQuery(ingore);
  22022. if (!options || !(options.silent || options.init)) {
  22023. this.table.$emit('sort-change', {
  22024. column: column,
  22025. prop: prop,
  22026. order: order
  22027. });
  22028. }
  22029. this.updateTableScrollY();
  22030. },
  22031. filterChange: function filterChange(states, options) {
  22032. var column = options.column,
  22033. values = options.values,
  22034. silent = options.silent;
  22035. var newFilters = this.updateFilters(column, values);
  22036. this.execQuery();
  22037. if (!silent) {
  22038. this.table.$emit('filter-change', newFilters);
  22039. }
  22040. this.updateTableScrollY();
  22041. },
  22042. toggleAllSelection: function toggleAllSelection() {
  22043. this.toggleAllSelection();
  22044. },
  22045. rowSelectedChanged: function rowSelectedChanged(states, row) {
  22046. this.toggleRowSelection(row);
  22047. this.updateAllSelected();
  22048. },
  22049. setHoverRow: function setHoverRow(states, row) {
  22050. states.hoverRow = row;
  22051. },
  22052. setCurrentRow: function setCurrentRow(states, row) {
  22053. this.updateCurrentRow(row);
  22054. }
  22055. };
  22056. watcher.prototype.commit = function (name) {
  22057. var mutations = this.mutations;
  22058. if (mutations[name]) {
  22059. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  22060. args[_key - 1] = arguments[_key];
  22061. }
  22062. mutations[name].apply(this, [this.states].concat(args));
  22063. } else {
  22064. throw new Error('Action not found: ' + name);
  22065. }
  22066. };
  22067. watcher.prototype.updateTableScrollY = function () {
  22068. external_vue_default.a.nextTick(this.table.updateScrollY);
  22069. };
  22070. /* harmony default export */ var src_store = (watcher);
  22071. // CONCATENATED MODULE: ./packages/table/src/store/helper.js
  22072. function createStore(table) {
  22073. var initialState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  22074. if (!table) {
  22075. throw new Error('Table is required.');
  22076. }
  22077. var store = new src_store();
  22078. store.table = table;
  22079. // fix https://github.com/ElemeFE/element/issues/14075
  22080. // related pr https://github.com/ElemeFE/element/pull/14146
  22081. store.toggleAllSelection = debounce_default()(10, store._toggleAllSelection);
  22082. Object.keys(initialState).forEach(function (key) {
  22083. store.states[key] = initialState[key];
  22084. });
  22085. return store;
  22086. }
  22087. function mapStates(mapper) {
  22088. var res = {};
  22089. Object.keys(mapper).forEach(function (key) {
  22090. var value = mapper[key];
  22091. var fn = void 0;
  22092. if (typeof value === 'string') {
  22093. fn = function fn() {
  22094. return this.store.states[value];
  22095. };
  22096. } else if (typeof value === 'function') {
  22097. fn = function fn() {
  22098. return value.call(this, this.store.states);
  22099. };
  22100. } else {
  22101. console.error('invalid value type');
  22102. }
  22103. if (fn) {
  22104. res[key] = fn;
  22105. }
  22106. });
  22107. return res;
  22108. };
  22109. // EXTERNAL MODULE: external "element-ui/lib/utils/scrollbar-width"
  22110. var scrollbar_width_ = __webpack_require__(30);
  22111. var scrollbar_width_default = /*#__PURE__*/__webpack_require__.n(scrollbar_width_);
  22112. // CONCATENATED MODULE: ./packages/table/src/table-layout.js
  22113. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  22114. var table_layout_TableLayout = function () {
  22115. function TableLayout(options) {
  22116. _classCallCheck(this, TableLayout);
  22117. this.observers = [];
  22118. this.table = null;
  22119. this.store = null;
  22120. this.columns = null;
  22121. this.fit = true;
  22122. this.showHeader = true;
  22123. this.height = null;
  22124. this.scrollX = false;
  22125. this.scrollY = false;
  22126. this.bodyWidth = null;
  22127. this.fixedWidth = null;
  22128. this.rightFixedWidth = null;
  22129. this.tableHeight = null;
  22130. this.headerHeight = 44; // Table Header Height
  22131. this.appendHeight = 0; // Append Slot Height
  22132. this.footerHeight = 44; // Table Footer Height
  22133. this.viewportHeight = null; // Table Height - Scroll Bar Height
  22134. this.bodyHeight = null; // Table Height - Table Header Height
  22135. this.fixedBodyHeight = null; // Table Height - Table Header Height - Scroll Bar Height
  22136. this.gutterWidth = scrollbar_width_default()();
  22137. for (var name in options) {
  22138. if (options.hasOwnProperty(name)) {
  22139. this[name] = options[name];
  22140. }
  22141. }
  22142. if (!this.table) {
  22143. throw new Error('table is required for Table Layout');
  22144. }
  22145. if (!this.store) {
  22146. throw new Error('store is required for Table Layout');
  22147. }
  22148. }
  22149. TableLayout.prototype.updateScrollY = function updateScrollY() {
  22150. var height = this.height;
  22151. if (height === null) return false;
  22152. var bodyWrapper = this.table.bodyWrapper;
  22153. if (this.table.$el && bodyWrapper) {
  22154. var body = bodyWrapper.querySelector('.el-table__body');
  22155. var prevScrollY = this.scrollY;
  22156. var scrollY = body.offsetHeight > this.bodyHeight;
  22157. this.scrollY = scrollY;
  22158. return prevScrollY !== scrollY;
  22159. }
  22160. return false;
  22161. };
  22162. TableLayout.prototype.setHeight = function setHeight(value) {
  22163. var _this = this;
  22164. var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'height';
  22165. if (external_vue_default.a.prototype.$isServer) return;
  22166. var el = this.table.$el;
  22167. value = parseHeight(value);
  22168. this.height = value;
  22169. if (!el && (value || value === 0)) return external_vue_default.a.nextTick(function () {
  22170. return _this.setHeight(value, prop);
  22171. });
  22172. if (typeof value === 'number') {
  22173. el.style[prop] = value + 'px';
  22174. this.updateElsHeight();
  22175. } else if (typeof value === 'string') {
  22176. el.style[prop] = value;
  22177. this.updateElsHeight();
  22178. }
  22179. };
  22180. TableLayout.prototype.setMaxHeight = function setMaxHeight(value) {
  22181. this.setHeight(value, 'max-height');
  22182. };
  22183. TableLayout.prototype.getFlattenColumns = function getFlattenColumns() {
  22184. var flattenColumns = [];
  22185. var columns = this.table.columns;
  22186. columns.forEach(function (column) {
  22187. if (column.isColumnGroup) {
  22188. flattenColumns.push.apply(flattenColumns, column.columns);
  22189. } else {
  22190. flattenColumns.push(column);
  22191. }
  22192. });
  22193. return flattenColumns;
  22194. };
  22195. TableLayout.prototype.updateElsHeight = function updateElsHeight() {
  22196. var _this2 = this;
  22197. if (!this.table.$ready) return external_vue_default.a.nextTick(function () {
  22198. return _this2.updateElsHeight();
  22199. });
  22200. var _table$$refs = this.table.$refs,
  22201. headerWrapper = _table$$refs.headerWrapper,
  22202. appendWrapper = _table$$refs.appendWrapper,
  22203. footerWrapper = _table$$refs.footerWrapper;
  22204. this.appendHeight = appendWrapper ? appendWrapper.offsetHeight : 0;
  22205. if (this.showHeader && !headerWrapper) return;
  22206. // fix issue (https://github.com/ElemeFE/element/pull/16956)
  22207. var headerTrElm = headerWrapper ? headerWrapper.querySelector('.el-table__header tr') : null;
  22208. var noneHeader = this.headerDisplayNone(headerTrElm);
  22209. var headerHeight = this.headerHeight = !this.showHeader ? 0 : headerWrapper.offsetHeight;
  22210. if (this.showHeader && !noneHeader && headerWrapper.offsetWidth > 0 && (this.table.columns || []).length > 0 && headerHeight < 2) {
  22211. return external_vue_default.a.nextTick(function () {
  22212. return _this2.updateElsHeight();
  22213. });
  22214. }
  22215. var tableHeight = this.tableHeight = this.table.$el.clientHeight;
  22216. var footerHeight = this.footerHeight = footerWrapper ? footerWrapper.offsetHeight : 0;
  22217. if (this.height !== null) {
  22218. this.bodyHeight = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
  22219. }
  22220. this.fixedBodyHeight = this.scrollX ? this.bodyHeight - this.gutterWidth : this.bodyHeight;
  22221. var noData = !(this.store.states.data && this.store.states.data.length);
  22222. this.viewportHeight = this.scrollX ? tableHeight - (noData ? 0 : this.gutterWidth) : tableHeight;
  22223. this.updateScrollY();
  22224. this.notifyObservers('scrollable');
  22225. };
  22226. TableLayout.prototype.headerDisplayNone = function headerDisplayNone(elm) {
  22227. if (!elm) return true;
  22228. var headerChild = elm;
  22229. while (headerChild.tagName !== 'DIV') {
  22230. if (getComputedStyle(headerChild).display === 'none') {
  22231. return true;
  22232. }
  22233. headerChild = headerChild.parentElement;
  22234. }
  22235. return false;
  22236. };
  22237. TableLayout.prototype.updateColumnsWidth = function updateColumnsWidth() {
  22238. if (external_vue_default.a.prototype.$isServer) return;
  22239. var fit = this.fit;
  22240. var bodyWidth = this.table.$el.clientWidth;
  22241. var bodyMinWidth = 0;
  22242. var flattenColumns = this.getFlattenColumns();
  22243. var flexColumns = flattenColumns.filter(function (column) {
  22244. return typeof column.width !== 'number';
  22245. });
  22246. flattenColumns.forEach(function (column) {
  22247. // Clean those columns whose width changed from flex to unflex
  22248. if (typeof column.width === 'number' && column.realWidth) column.realWidth = null;
  22249. });
  22250. if (flexColumns.length > 0 && fit) {
  22251. flattenColumns.forEach(function (column) {
  22252. bodyMinWidth += column.width || column.minWidth || 80;
  22253. });
  22254. var scrollYWidth = this.scrollY ? this.gutterWidth : 0;
  22255. if (bodyMinWidth <= bodyWidth - scrollYWidth) {
  22256. // DON'T HAVE SCROLL BAR
  22257. this.scrollX = false;
  22258. var totalFlexWidth = bodyWidth - scrollYWidth - bodyMinWidth;
  22259. if (flexColumns.length === 1) {
  22260. flexColumns[0].realWidth = (flexColumns[0].minWidth || 80) + totalFlexWidth;
  22261. } else {
  22262. var allColumnsWidth = flexColumns.reduce(function (prev, column) {
  22263. return prev + (column.minWidth || 80);
  22264. }, 0);
  22265. var flexWidthPerPixel = totalFlexWidth / allColumnsWidth;
  22266. var noneFirstWidth = 0;
  22267. flexColumns.forEach(function (column, index) {
  22268. if (index === 0) return;
  22269. var flexWidth = Math.floor((column.minWidth || 80) * flexWidthPerPixel);
  22270. noneFirstWidth += flexWidth;
  22271. column.realWidth = (column.minWidth || 80) + flexWidth;
  22272. });
  22273. flexColumns[0].realWidth = (flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
  22274. }
  22275. } else {
  22276. // HAVE HORIZONTAL SCROLL BAR
  22277. this.scrollX = true;
  22278. flexColumns.forEach(function (column) {
  22279. column.realWidth = column.minWidth;
  22280. });
  22281. }
  22282. this.bodyWidth = Math.max(bodyMinWidth, bodyWidth);
  22283. this.table.resizeState.width = this.bodyWidth;
  22284. } else {
  22285. flattenColumns.forEach(function (column) {
  22286. if (!column.width && !column.minWidth) {
  22287. column.realWidth = 80;
  22288. } else {
  22289. column.realWidth = column.width || column.minWidth;
  22290. }
  22291. bodyMinWidth += column.realWidth;
  22292. });
  22293. this.scrollX = bodyMinWidth > bodyWidth;
  22294. this.bodyWidth = bodyMinWidth;
  22295. }
  22296. var fixedColumns = this.store.states.fixedColumns;
  22297. if (fixedColumns.length > 0) {
  22298. var fixedWidth = 0;
  22299. fixedColumns.forEach(function (column) {
  22300. fixedWidth += column.realWidth || column.width;
  22301. });
  22302. this.fixedWidth = fixedWidth;
  22303. }
  22304. var rightFixedColumns = this.store.states.rightFixedColumns;
  22305. if (rightFixedColumns.length > 0) {
  22306. var rightFixedWidth = 0;
  22307. rightFixedColumns.forEach(function (column) {
  22308. rightFixedWidth += column.realWidth || column.width;
  22309. });
  22310. this.rightFixedWidth = rightFixedWidth;
  22311. }
  22312. this.notifyObservers('columns');
  22313. };
  22314. TableLayout.prototype.addObserver = function addObserver(observer) {
  22315. this.observers.push(observer);
  22316. };
  22317. TableLayout.prototype.removeObserver = function removeObserver(observer) {
  22318. var index = this.observers.indexOf(observer);
  22319. if (index !== -1) {
  22320. this.observers.splice(index, 1);
  22321. }
  22322. };
  22323. TableLayout.prototype.notifyObservers = function notifyObservers(event) {
  22324. var _this3 = this;
  22325. var observers = this.observers;
  22326. observers.forEach(function (observer) {
  22327. switch (event) {
  22328. case 'columns':
  22329. observer.onColumnsChange(_this3);
  22330. break;
  22331. case 'scrollable':
  22332. observer.onScrollableChange(_this3);
  22333. break;
  22334. default:
  22335. throw new Error('Table Layout don\'t have event ' + event + '.');
  22336. }
  22337. });
  22338. };
  22339. return TableLayout;
  22340. }();
  22341. /* harmony default export */ var table_layout = (table_layout_TableLayout);
  22342. // CONCATENATED MODULE: ./packages/table/src/layout-observer.js
  22343. /* harmony default export */ var layout_observer = ({
  22344. created: function created() {
  22345. this.tableLayout.addObserver(this);
  22346. },
  22347. destroyed: function destroyed() {
  22348. this.tableLayout.removeObserver(this);
  22349. },
  22350. computed: {
  22351. tableLayout: function tableLayout() {
  22352. var layout = this.layout;
  22353. if (!layout && this.table) {
  22354. layout = this.table.layout;
  22355. }
  22356. if (!layout) {
  22357. throw new Error('Can not find table layout.');
  22358. }
  22359. return layout;
  22360. }
  22361. },
  22362. mounted: function mounted() {
  22363. this.onColumnsChange(this.tableLayout);
  22364. this.onScrollableChange(this.tableLayout);
  22365. },
  22366. updated: function updated() {
  22367. if (this.__updated__) return;
  22368. this.onColumnsChange(this.tableLayout);
  22369. this.onScrollableChange(this.tableLayout);
  22370. this.__updated__ = true;
  22371. },
  22372. methods: {
  22373. onColumnsChange: function onColumnsChange(layout) {
  22374. var cols = this.$el.querySelectorAll('colgroup > col');
  22375. if (!cols.length) return;
  22376. var flattenColumns = layout.getFlattenColumns();
  22377. var columnsMap = {};
  22378. flattenColumns.forEach(function (column) {
  22379. columnsMap[column.id] = column;
  22380. });
  22381. for (var i = 0, j = cols.length; i < j; i++) {
  22382. var col = cols[i];
  22383. var name = col.getAttribute('name');
  22384. var column = columnsMap[name];
  22385. if (column) {
  22386. col.setAttribute('width', column.realWidth || column.width);
  22387. }
  22388. }
  22389. },
  22390. onScrollableChange: function onScrollableChange(layout) {
  22391. var cols = this.$el.querySelectorAll('colgroup > col[name=gutter]');
  22392. for (var i = 0, j = cols.length; i < j; i++) {
  22393. var col = cols[i];
  22394. col.setAttribute('width', layout.scrollY ? layout.gutterWidth : '0');
  22395. }
  22396. var ths = this.$el.querySelectorAll('th.gutter');
  22397. for (var _i = 0, _j = ths.length; _i < _j; _i++) {
  22398. var th = ths[_i];
  22399. th.style.width = layout.scrollY ? layout.gutterWidth + 'px' : '0';
  22400. th.style.display = layout.scrollY ? '' : 'none';
  22401. }
  22402. }
  22403. }
  22404. });
  22405. // CONCATENATED MODULE: ./packages/table/src/table-row.js
  22406. var table_row_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  22407. /* harmony default export */ var table_row = ({
  22408. name: 'ElTableRow',
  22409. props: ['columns', 'row', 'index', 'isSelected', 'isExpanded', 'store', 'context', 'firstDefaultColumnIndex', 'treeRowData', 'treeIndent', 'columnsHidden', 'getSpan', 'getColspanRealWidth', 'getCellStyle', 'getCellClass', 'handleCellMouseLeave', 'handleCellMouseEnter', 'fixed'],
  22410. render: function render() {
  22411. var _this = this;
  22412. var h = arguments[0];
  22413. var columns = this.columns,
  22414. row = this.row,
  22415. $index = this.index,
  22416. store = this.store,
  22417. context = this.context,
  22418. firstDefaultColumnIndex = this.firstDefaultColumnIndex,
  22419. treeRowData = this.treeRowData,
  22420. treeIndent = this.treeIndent,
  22421. _columnsHidden = this.columnsHidden,
  22422. columnsHidden = _columnsHidden === undefined ? [] : _columnsHidden,
  22423. isSelected = this.isSelected,
  22424. isExpanded = this.isExpanded;
  22425. return h('tr', [columns.map(function (column, cellIndex) {
  22426. var _getSpan = _this.getSpan(row, column, $index, cellIndex),
  22427. rowspan = _getSpan.rowspan,
  22428. colspan = _getSpan.colspan;
  22429. if (!rowspan || !colspan) {
  22430. return null;
  22431. }
  22432. var columnData = table_row_extends({}, column);
  22433. columnData.realWidth = _this.getColspanRealWidth(columns, colspan, cellIndex);
  22434. var data = {
  22435. store: store,
  22436. isSelected: isSelected,
  22437. isExpanded: isExpanded,
  22438. _self: context,
  22439. column: columnData,
  22440. row: row,
  22441. $index: $index
  22442. };
  22443. if (cellIndex === firstDefaultColumnIndex && treeRowData) {
  22444. data.treeNode = {
  22445. indent: treeRowData.level * treeIndent,
  22446. level: treeRowData.level
  22447. };
  22448. if (typeof treeRowData.expanded === 'boolean') {
  22449. data.treeNode.expanded = treeRowData.expanded;
  22450. // 表明是懒加载
  22451. if ('loading' in treeRowData) {
  22452. data.treeNode.loading = treeRowData.loading;
  22453. }
  22454. if ('noLazyChildren' in treeRowData) {
  22455. data.treeNode.noLazyChildren = treeRowData.noLazyChildren;
  22456. }
  22457. }
  22458. }
  22459. return h(
  22460. 'td',
  22461. {
  22462. style: _this.getCellStyle($index, cellIndex, row, column),
  22463. 'class': _this.getCellClass($index, cellIndex, row, column),
  22464. attrs: { rowspan: rowspan,
  22465. colspan: colspan
  22466. },
  22467. on: {
  22468. 'mouseenter': function mouseenter($event) {
  22469. return _this.handleCellMouseEnter($event, row);
  22470. },
  22471. 'mouseleave': _this.handleCellMouseLeave
  22472. }
  22473. },
  22474. [column.renderCell.call(_this._renderProxy, _this.$createElement, data, columnsHidden[cellIndex])]
  22475. );
  22476. })]);
  22477. }
  22478. });
  22479. // CONCATENATED MODULE: ./packages/table/src/table-body.js
  22480. var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  22481. var table_body_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  22482. /* harmony default export */ var table_body = ({
  22483. name: 'ElTableBody',
  22484. mixins: [layout_observer],
  22485. components: {
  22486. ElCheckbox: checkbox_default.a,
  22487. ElTooltip: tooltip_default.a,
  22488. TableRow: table_row
  22489. },
  22490. props: {
  22491. store: {
  22492. required: true
  22493. },
  22494. stripe: Boolean,
  22495. context: {},
  22496. rowClassName: [String, Function],
  22497. rowStyle: [Object, Function],
  22498. fixed: String,
  22499. highlight: Boolean
  22500. },
  22501. render: function render(h) {
  22502. var _this = this;
  22503. var data = this.data || [];
  22504. return h(
  22505. 'table',
  22506. {
  22507. 'class': 'el-table__body',
  22508. attrs: { cellspacing: '0',
  22509. cellpadding: '0',
  22510. border: '0' }
  22511. },
  22512. [h('colgroup', [this.columns.map(function (column) {
  22513. return h('col', {
  22514. attrs: { name: column.id },
  22515. key: column.id });
  22516. })]), h('tbody', [data.reduce(function (acc, row) {
  22517. return acc.concat(_this.wrappedRowRender(row, acc.length));
  22518. }, []), h('el-tooltip', {
  22519. attrs: { effect: this.table.tooltipEffect, placement: 'top', content: this.tooltipContent },
  22520. ref: 'tooltip' })])]
  22521. );
  22522. },
  22523. computed: table_body_extends({
  22524. table: function table() {
  22525. return this.$parent;
  22526. }
  22527. }, mapStates({
  22528. data: 'data',
  22529. columns: 'columns',
  22530. treeIndent: 'indent',
  22531. leftFixedLeafCount: 'fixedLeafColumnsLength',
  22532. rightFixedLeafCount: 'rightFixedLeafColumnsLength',
  22533. columnsCount: function columnsCount(states) {
  22534. return states.columns.length;
  22535. },
  22536. leftFixedCount: function leftFixedCount(states) {
  22537. return states.fixedColumns.length;
  22538. },
  22539. rightFixedCount: function rightFixedCount(states) {
  22540. return states.rightFixedColumns.length;
  22541. },
  22542. hasExpandColumn: function hasExpandColumn(states) {
  22543. return states.columns.some(function (_ref) {
  22544. var type = _ref.type;
  22545. return type === 'expand';
  22546. });
  22547. }
  22548. }), {
  22549. columnsHidden: function columnsHidden() {
  22550. var _this2 = this;
  22551. return this.columns.map(function (column, index) {
  22552. return _this2.isColumnHidden(index);
  22553. });
  22554. },
  22555. firstDefaultColumnIndex: function firstDefaultColumnIndex() {
  22556. return Object(util_["arrayFindIndex"])(this.columns, function (_ref2) {
  22557. var type = _ref2.type;
  22558. return type === 'default';
  22559. });
  22560. }
  22561. }),
  22562. watch: {
  22563. // don't trigger getter of currentRow in getCellClass. see https://jsfiddle.net/oe2b4hqt/
  22564. // update DOM manually. see https://github.com/ElemeFE/element/pull/13954/files#diff-9b450c00d0a9dec0ffad5a3176972e40
  22565. 'store.states.hoverRow': function storeStatesHoverRow(newVal, oldVal) {
  22566. var _this3 = this;
  22567. if (!this.store.states.isComplex || this.$isServer) return;
  22568. var raf = window.requestAnimationFrame;
  22569. if (!raf) {
  22570. raf = function raf(fn) {
  22571. return setTimeout(fn, 16);
  22572. };
  22573. }
  22574. raf(function () {
  22575. var rows = _this3.$el.querySelectorAll('.el-table__row');
  22576. var oldRow = rows[oldVal];
  22577. var newRow = rows[newVal];
  22578. if (oldRow) {
  22579. Object(dom_["removeClass"])(oldRow, 'hover-row');
  22580. }
  22581. if (newRow) {
  22582. Object(dom_["addClass"])(newRow, 'hover-row');
  22583. }
  22584. });
  22585. }
  22586. },
  22587. data: function data() {
  22588. return {
  22589. tooltipContent: ''
  22590. };
  22591. },
  22592. created: function created() {
  22593. this.activateTooltip = debounce_default()(50, function (tooltip) {
  22594. return tooltip.handleShowPopper();
  22595. });
  22596. },
  22597. methods: {
  22598. getKeyOfRow: function getKeyOfRow(row, index) {
  22599. var rowKey = this.table.rowKey;
  22600. if (rowKey) {
  22601. return getRowIdentity(row, rowKey);
  22602. }
  22603. return index;
  22604. },
  22605. isColumnHidden: function isColumnHidden(index) {
  22606. if (this.fixed === true || this.fixed === 'left') {
  22607. return index >= this.leftFixedLeafCount;
  22608. } else if (this.fixed === 'right') {
  22609. return index < this.columnsCount - this.rightFixedLeafCount;
  22610. } else {
  22611. return index < this.leftFixedLeafCount || index >= this.columnsCount - this.rightFixedLeafCount;
  22612. }
  22613. },
  22614. getSpan: function getSpan(row, column, rowIndex, columnIndex) {
  22615. var rowspan = 1;
  22616. var colspan = 1;
  22617. var fn = this.table.spanMethod;
  22618. if (typeof fn === 'function') {
  22619. var result = fn({
  22620. row: row,
  22621. column: column,
  22622. rowIndex: rowIndex,
  22623. columnIndex: columnIndex
  22624. });
  22625. if (Array.isArray(result)) {
  22626. rowspan = result[0];
  22627. colspan = result[1];
  22628. } else if ((typeof result === 'undefined' ? 'undefined' : table_body_typeof(result)) === 'object') {
  22629. rowspan = result.rowspan;
  22630. colspan = result.colspan;
  22631. }
  22632. }
  22633. return { rowspan: rowspan, colspan: colspan };
  22634. },
  22635. getRowStyle: function getRowStyle(row, rowIndex) {
  22636. var rowStyle = this.table.rowStyle;
  22637. if (typeof rowStyle === 'function') {
  22638. return rowStyle.call(null, {
  22639. row: row,
  22640. rowIndex: rowIndex
  22641. });
  22642. }
  22643. return rowStyle || null;
  22644. },
  22645. getRowClass: function getRowClass(row, rowIndex) {
  22646. var classes = ['el-table__row'];
  22647. if (this.table.highlightCurrentRow && row === this.store.states.currentRow) {
  22648. classes.push('current-row');
  22649. }
  22650. if (this.stripe && rowIndex % 2 === 1) {
  22651. classes.push('el-table__row--striped');
  22652. }
  22653. var rowClassName = this.table.rowClassName;
  22654. if (typeof rowClassName === 'string') {
  22655. classes.push(rowClassName);
  22656. } else if (typeof rowClassName === 'function') {
  22657. classes.push(rowClassName.call(null, {
  22658. row: row,
  22659. rowIndex: rowIndex
  22660. }));
  22661. }
  22662. if (this.store.states.expandRows.indexOf(row) > -1) {
  22663. classes.push('expanded');
  22664. }
  22665. return classes;
  22666. },
  22667. getCellStyle: function getCellStyle(rowIndex, columnIndex, row, column) {
  22668. var cellStyle = this.table.cellStyle;
  22669. if (typeof cellStyle === 'function') {
  22670. return cellStyle.call(null, {
  22671. rowIndex: rowIndex,
  22672. columnIndex: columnIndex,
  22673. row: row,
  22674. column: column
  22675. });
  22676. }
  22677. return cellStyle;
  22678. },
  22679. getCellClass: function getCellClass(rowIndex, columnIndex, row, column) {
  22680. var classes = [column.id, column.align, column.className];
  22681. if (this.isColumnHidden(columnIndex)) {
  22682. classes.push('is-hidden');
  22683. }
  22684. var cellClassName = this.table.cellClassName;
  22685. if (typeof cellClassName === 'string') {
  22686. classes.push(cellClassName);
  22687. } else if (typeof cellClassName === 'function') {
  22688. classes.push(cellClassName.call(null, {
  22689. rowIndex: rowIndex,
  22690. columnIndex: columnIndex,
  22691. row: row,
  22692. column: column
  22693. }));
  22694. }
  22695. classes.push('el-table__cell');
  22696. return classes.join(' ');
  22697. },
  22698. getColspanRealWidth: function getColspanRealWidth(columns, colspan, index) {
  22699. if (colspan < 1) {
  22700. return columns[index].realWidth;
  22701. }
  22702. var widthArr = columns.map(function (_ref3) {
  22703. var realWidth = _ref3.realWidth;
  22704. return realWidth;
  22705. }).slice(index, index + colspan);
  22706. return widthArr.reduce(function (acc, width) {
  22707. return acc + width;
  22708. }, -1);
  22709. },
  22710. handleCellMouseEnter: function handleCellMouseEnter(event, row) {
  22711. var table = this.table;
  22712. var cell = getCell(event);
  22713. if (cell) {
  22714. var column = getColumnByCell(table, cell);
  22715. var hoverState = table.hoverState = { cell: cell, column: column, row: row };
  22716. table.$emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, event);
  22717. }
  22718. // 判断是否text-overflow, 如果是就显示tooltip
  22719. var cellChild = event.target.querySelector('.cell');
  22720. if (!(Object(dom_["hasClass"])(cellChild, 'el-tooltip') && cellChild.childNodes.length)) {
  22721. return;
  22722. }
  22723. // use range width instead of scrollWidth to determine whether the text is overflowing
  22724. // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3
  22725. var range = document.createRange();
  22726. range.setStart(cellChild, 0);
  22727. range.setEnd(cellChild, cellChild.childNodes.length);
  22728. var rangeWidth = range.getBoundingClientRect().width;
  22729. var padding = (parseInt(Object(dom_["getStyle"])(cellChild, 'paddingLeft'), 10) || 0) + (parseInt(Object(dom_["getStyle"])(cellChild, 'paddingRight'), 10) || 0);
  22730. if ((rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) && this.$refs.tooltip) {
  22731. var tooltip = this.$refs.tooltip;
  22732. // TODO 会引起整个 Table 的重新渲染,需要优化
  22733. this.tooltipContent = cell.innerText || cell.textContent;
  22734. tooltip.referenceElm = cell;
  22735. tooltip.$refs.popper && (tooltip.$refs.popper.style.display = 'none');
  22736. tooltip.doDestroy();
  22737. tooltip.setExpectedState(true);
  22738. this.activateTooltip(tooltip);
  22739. }
  22740. },
  22741. handleCellMouseLeave: function handleCellMouseLeave(event) {
  22742. var tooltip = this.$refs.tooltip;
  22743. if (tooltip) {
  22744. tooltip.setExpectedState(false);
  22745. tooltip.handleClosePopper();
  22746. }
  22747. var cell = getCell(event);
  22748. if (!cell) return;
  22749. var oldHoverState = this.table.hoverState || {};
  22750. this.table.$emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, event);
  22751. },
  22752. handleMouseEnter: debounce_default()(30, function (index) {
  22753. this.store.commit('setHoverRow', index);
  22754. }),
  22755. handleMouseLeave: debounce_default()(30, function () {
  22756. this.store.commit('setHoverRow', null);
  22757. }),
  22758. handleContextMenu: function handleContextMenu(event, row) {
  22759. this.handleEvent(event, row, 'contextmenu');
  22760. },
  22761. handleDoubleClick: function handleDoubleClick(event, row) {
  22762. this.handleEvent(event, row, 'dblclick');
  22763. },
  22764. handleClick: function handleClick(event, row) {
  22765. this.store.commit('setCurrentRow', row);
  22766. this.handleEvent(event, row, 'click');
  22767. },
  22768. handleEvent: function handleEvent(event, row, name) {
  22769. var table = this.table;
  22770. var cell = getCell(event);
  22771. var column = void 0;
  22772. if (cell) {
  22773. column = getColumnByCell(table, cell);
  22774. if (column) {
  22775. table.$emit('cell-' + name, row, column, cell, event);
  22776. }
  22777. }
  22778. table.$emit('row-' + name, row, column, event);
  22779. },
  22780. rowRender: function rowRender(row, $index, treeRowData) {
  22781. var _this4 = this;
  22782. var h = this.$createElement;
  22783. var treeIndent = this.treeIndent,
  22784. columns = this.columns,
  22785. firstDefaultColumnIndex = this.firstDefaultColumnIndex;
  22786. var rowClasses = this.getRowClass(row, $index);
  22787. var display = true;
  22788. if (treeRowData) {
  22789. rowClasses.push('el-table__row--level-' + treeRowData.level);
  22790. display = treeRowData.display;
  22791. }
  22792. // 指令 v-show 会覆盖 row-style 中 display
  22793. // 使用 :style 代替 v-show https://github.com/ElemeFE/element/issues/16995
  22794. var displayStyle = display ? null : {
  22795. display: 'none'
  22796. };
  22797. return h(table_row, {
  22798. style: [displayStyle, this.getRowStyle(row, $index)],
  22799. 'class': rowClasses,
  22800. key: this.getKeyOfRow(row, $index),
  22801. nativeOn: {
  22802. 'dblclick': function dblclick($event) {
  22803. return _this4.handleDoubleClick($event, row);
  22804. },
  22805. 'click': function click($event) {
  22806. return _this4.handleClick($event, row);
  22807. },
  22808. 'contextmenu': function contextmenu($event) {
  22809. return _this4.handleContextMenu($event, row);
  22810. },
  22811. 'mouseenter': function mouseenter(_) {
  22812. return _this4.handleMouseEnter($index);
  22813. },
  22814. 'mouseleave': this.handleMouseLeave
  22815. },
  22816. attrs: {
  22817. columns: columns,
  22818. row: row,
  22819. index: $index,
  22820. store: this.store,
  22821. context: this.context || this.table.$vnode.context,
  22822. firstDefaultColumnIndex: firstDefaultColumnIndex,
  22823. treeRowData: treeRowData,
  22824. treeIndent: treeIndent,
  22825. columnsHidden: this.columnsHidden,
  22826. getSpan: this.getSpan,
  22827. getColspanRealWidth: this.getColspanRealWidth,
  22828. getCellStyle: this.getCellStyle,
  22829. getCellClass: this.getCellClass,
  22830. handleCellMouseEnter: this.handleCellMouseEnter,
  22831. handleCellMouseLeave: this.handleCellMouseLeave,
  22832. isSelected: this.store.isSelected(row),
  22833. isExpanded: this.store.states.expandRows.indexOf(row) > -1,
  22834. fixed: this.fixed
  22835. }
  22836. });
  22837. },
  22838. wrappedRowRender: function wrappedRowRender(row, $index) {
  22839. var _this5 = this;
  22840. var h = this.$createElement;
  22841. var store = this.store;
  22842. var isRowExpanded = store.isRowExpanded,
  22843. assertRowKey = store.assertRowKey;
  22844. var _store$states = store.states,
  22845. treeData = _store$states.treeData,
  22846. lazyTreeNodeMap = _store$states.lazyTreeNodeMap,
  22847. childrenColumnName = _store$states.childrenColumnName,
  22848. rowKey = _store$states.rowKey;
  22849. if (this.hasExpandColumn && isRowExpanded(row)) {
  22850. var renderExpanded = this.table.renderExpanded;
  22851. var tr = this.rowRender(row, $index);
  22852. if (!renderExpanded) {
  22853. console.error('[Element Error]renderExpanded is required.');
  22854. return tr;
  22855. }
  22856. // 使用二维数组,避免修改 $index
  22857. return [[tr, h(
  22858. 'tr',
  22859. { key: 'expanded-row__' + tr.key },
  22860. [h(
  22861. 'td',
  22862. {
  22863. attrs: { colspan: this.columnsCount },
  22864. 'class': 'el-table__cell el-table__expanded-cell' },
  22865. [renderExpanded(this.$createElement, { row: row, $index: $index, store: this.store })]
  22866. )]
  22867. )]];
  22868. } else if (Object.keys(treeData).length) {
  22869. assertRowKey();
  22870. // TreeTable 时,rowKey 必须由用户设定,不使用 getKeyOfRow 计算
  22871. // 在调用 rowRender 函数时,仍然会计算 rowKey,不太好的操作
  22872. var key = getRowIdentity(row, rowKey);
  22873. var cur = treeData[key];
  22874. var treeRowData = null;
  22875. if (cur) {
  22876. treeRowData = {
  22877. expanded: cur.expanded,
  22878. level: cur.level,
  22879. display: true
  22880. };
  22881. if (typeof cur.lazy === 'boolean') {
  22882. if (typeof cur.loaded === 'boolean' && cur.loaded) {
  22883. treeRowData.noLazyChildren = !(cur.children && cur.children.length);
  22884. }
  22885. treeRowData.loading = cur.loading;
  22886. }
  22887. }
  22888. var tmp = [this.rowRender(row, $index, treeRowData)];
  22889. // 渲染嵌套数据
  22890. if (cur) {
  22891. // currentRow 记录的是 index,所以还需主动增加 TreeTable 的 index
  22892. var i = 0;
  22893. var traverse = function traverse(children, parent) {
  22894. if (!(children && children.length && parent)) return;
  22895. children.forEach(function (node) {
  22896. // 父节点的 display 状态影响子节点的显示状态
  22897. var innerTreeRowData = {
  22898. display: parent.display && parent.expanded,
  22899. level: parent.level + 1
  22900. };
  22901. var childKey = getRowIdentity(node, rowKey);
  22902. if (childKey === undefined || childKey === null) {
  22903. throw new Error('for nested data item, row-key is required.');
  22904. }
  22905. cur = table_body_extends({}, treeData[childKey]);
  22906. // 对于当前节点,分成有无子节点两种情况。
  22907. // 如果包含子节点的,设置 expanded 属性。
  22908. // 对于它子节点的 display 属性由它本身的 expanded 与 display 共同决定。
  22909. if (cur) {
  22910. innerTreeRowData.expanded = cur.expanded;
  22911. // 懒加载的某些节点,level 未知
  22912. cur.level = cur.level || innerTreeRowData.level;
  22913. cur.display = !!(cur.expanded && innerTreeRowData.display);
  22914. if (typeof cur.lazy === 'boolean') {
  22915. if (typeof cur.loaded === 'boolean' && cur.loaded) {
  22916. innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length);
  22917. }
  22918. innerTreeRowData.loading = cur.loading;
  22919. }
  22920. }
  22921. i++;
  22922. tmp.push(_this5.rowRender(node, $index + i, innerTreeRowData));
  22923. if (cur) {
  22924. var _nodes = lazyTreeNodeMap[childKey] || node[childrenColumnName];
  22925. traverse(_nodes, cur);
  22926. }
  22927. });
  22928. };
  22929. // 对于 root 节点,display 一定为 true
  22930. cur.display = true;
  22931. var nodes = lazyTreeNodeMap[key] || row[childrenColumnName];
  22932. traverse(nodes, cur);
  22933. }
  22934. return tmp;
  22935. } else {
  22936. return this.rowRender(row, $index);
  22937. }
  22938. }
  22939. }
  22940. });
  22941. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/filter-panel.vue?vue&type=template&id=7f2c919f&
  22942. var filter_panelvue_type_template_id_7f2c919f_render = function() {
  22943. var _vm = this
  22944. var _h = _vm.$createElement
  22945. var _c = _vm._self._c || _h
  22946. return _c("transition", { attrs: { name: "el-zoom-in-top" } }, [
  22947. _vm.multiple
  22948. ? _c(
  22949. "div",
  22950. {
  22951. directives: [
  22952. {
  22953. name: "clickoutside",
  22954. rawName: "v-clickoutside",
  22955. value: _vm.handleOutsideClick,
  22956. expression: "handleOutsideClick"
  22957. },
  22958. {
  22959. name: "show",
  22960. rawName: "v-show",
  22961. value: _vm.showPopper,
  22962. expression: "showPopper"
  22963. }
  22964. ],
  22965. staticClass: "el-table-filter"
  22966. },
  22967. [
  22968. _c(
  22969. "div",
  22970. { staticClass: "el-table-filter__content" },
  22971. [
  22972. _c(
  22973. "el-scrollbar",
  22974. { attrs: { "wrap-class": "el-table-filter__wrap" } },
  22975. [
  22976. _c(
  22977. "el-checkbox-group",
  22978. {
  22979. staticClass: "el-table-filter__checkbox-group",
  22980. model: {
  22981. value: _vm.filteredValue,
  22982. callback: function($$v) {
  22983. _vm.filteredValue = $$v
  22984. },
  22985. expression: "filteredValue"
  22986. }
  22987. },
  22988. _vm._l(_vm.filters, function(filter) {
  22989. return _c(
  22990. "el-checkbox",
  22991. { key: filter.value, attrs: { label: filter.value } },
  22992. [_vm._v(_vm._s(filter.text))]
  22993. )
  22994. }),
  22995. 1
  22996. )
  22997. ],
  22998. 1
  22999. )
  23000. ],
  23001. 1
  23002. ),
  23003. _c("div", { staticClass: "el-table-filter__bottom" }, [
  23004. _c(
  23005. "button",
  23006. {
  23007. class: { "is-disabled": _vm.filteredValue.length === 0 },
  23008. attrs: { disabled: _vm.filteredValue.length === 0 },
  23009. on: { click: _vm.handleConfirm }
  23010. },
  23011. [_vm._v(_vm._s(_vm.t("el.table.confirmFilter")))]
  23012. ),
  23013. _c("button", { on: { click: _vm.handleReset } }, [
  23014. _vm._v(_vm._s(_vm.t("el.table.resetFilter")))
  23015. ])
  23016. ])
  23017. ]
  23018. )
  23019. : _c(
  23020. "div",
  23021. {
  23022. directives: [
  23023. {
  23024. name: "clickoutside",
  23025. rawName: "v-clickoutside",
  23026. value: _vm.handleOutsideClick,
  23027. expression: "handleOutsideClick"
  23028. },
  23029. {
  23030. name: "show",
  23031. rawName: "v-show",
  23032. value: _vm.showPopper,
  23033. expression: "showPopper"
  23034. }
  23035. ],
  23036. staticClass: "el-table-filter"
  23037. },
  23038. [
  23039. _c(
  23040. "ul",
  23041. { staticClass: "el-table-filter__list" },
  23042. [
  23043. _c(
  23044. "li",
  23045. {
  23046. staticClass: "el-table-filter__list-item",
  23047. class: {
  23048. "is-active":
  23049. _vm.filterValue === undefined ||
  23050. _vm.filterValue === null
  23051. },
  23052. on: {
  23053. click: function($event) {
  23054. _vm.handleSelect(null)
  23055. }
  23056. }
  23057. },
  23058. [_vm._v(_vm._s(_vm.t("el.table.clearFilter")))]
  23059. ),
  23060. _vm._l(_vm.filters, function(filter) {
  23061. return _c(
  23062. "li",
  23063. {
  23064. key: filter.value,
  23065. staticClass: "el-table-filter__list-item",
  23066. class: { "is-active": _vm.isActive(filter) },
  23067. attrs: { label: filter.value },
  23068. on: {
  23069. click: function($event) {
  23070. _vm.handleSelect(filter.value)
  23071. }
  23072. }
  23073. },
  23074. [_vm._v(_vm._s(filter.text))]
  23075. )
  23076. })
  23077. ],
  23078. 2
  23079. )
  23080. ]
  23081. )
  23082. ])
  23083. }
  23084. var filter_panelvue_type_template_id_7f2c919f_staticRenderFns = []
  23085. filter_panelvue_type_template_id_7f2c919f_render._withStripped = true
  23086. // CONCATENATED MODULE: ./packages/table/src/filter-panel.vue?vue&type=template&id=7f2c919f&
  23087. // CONCATENATED MODULE: ./packages/table/src/dropdown.js
  23088. var dropdowns = [];
  23089. !external_vue_default.a.prototype.$isServer && document.addEventListener('click', function (event) {
  23090. dropdowns.forEach(function (dropdown) {
  23091. var target = event.target;
  23092. if (!dropdown || !dropdown.$el) return;
  23093. if (target === dropdown.$el || dropdown.$el.contains(target)) {
  23094. return;
  23095. }
  23096. dropdown.handleOutsideClick && dropdown.handleOutsideClick(event);
  23097. });
  23098. });
  23099. /* harmony default export */ var src_dropdown = ({
  23100. open: function open(instance) {
  23101. if (instance) {
  23102. dropdowns.push(instance);
  23103. }
  23104. },
  23105. close: function close(instance) {
  23106. var index = dropdowns.indexOf(instance);
  23107. if (index !== -1) {
  23108. dropdowns.splice(instance, 1);
  23109. }
  23110. }
  23111. });
  23112. // EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
  23113. var checkbox_group_ = __webpack_require__(31);
  23114. var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
  23115. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/filter-panel.vue?vue&type=script&lang=js&
  23116. //
  23117. //
  23118. //
  23119. //
  23120. //
  23121. //
  23122. //
  23123. //
  23124. //
  23125. //
  23126. //
  23127. //
  23128. //
  23129. //
  23130. //
  23131. //
  23132. //
  23133. //
  23134. //
  23135. //
  23136. //
  23137. //
  23138. //
  23139. //
  23140. //
  23141. //
  23142. //
  23143. //
  23144. //
  23145. //
  23146. //
  23147. //
  23148. //
  23149. //
  23150. //
  23151. //
  23152. //
  23153. //
  23154. //
  23155. //
  23156. //
  23157. //
  23158. //
  23159. //
  23160. /* harmony default export */ var filter_panelvue_type_script_lang_js_ = ({
  23161. name: 'ElTableFilterPanel',
  23162. mixins: [vue_popper_default.a, locale_default.a],
  23163. directives: {
  23164. Clickoutside: clickoutside_default.a
  23165. },
  23166. components: {
  23167. ElCheckbox: checkbox_default.a,
  23168. ElCheckboxGroup: checkbox_group_default.a,
  23169. ElScrollbar: scrollbar_default.a
  23170. },
  23171. props: {
  23172. placement: {
  23173. type: String,
  23174. default: 'bottom-end'
  23175. }
  23176. },
  23177. methods: {
  23178. isActive: function isActive(filter) {
  23179. return filter.value === this.filterValue;
  23180. },
  23181. handleOutsideClick: function handleOutsideClick() {
  23182. var _this = this;
  23183. setTimeout(function () {
  23184. _this.showPopper = false;
  23185. }, 16);
  23186. },
  23187. handleConfirm: function handleConfirm() {
  23188. this.confirmFilter(this.filteredValue);
  23189. this.handleOutsideClick();
  23190. },
  23191. handleReset: function handleReset() {
  23192. this.filteredValue = [];
  23193. this.confirmFilter(this.filteredValue);
  23194. this.handleOutsideClick();
  23195. },
  23196. handleSelect: function handleSelect(filterValue) {
  23197. this.filterValue = filterValue;
  23198. if (typeof filterValue !== 'undefined' && filterValue !== null) {
  23199. this.confirmFilter(this.filteredValue);
  23200. } else {
  23201. this.confirmFilter([]);
  23202. }
  23203. this.handleOutsideClick();
  23204. },
  23205. confirmFilter: function confirmFilter(filteredValue) {
  23206. this.table.store.commit('filterChange', {
  23207. column: this.column,
  23208. values: filteredValue
  23209. });
  23210. this.table.store.updateAllSelected();
  23211. }
  23212. },
  23213. data: function data() {
  23214. return {
  23215. table: null,
  23216. cell: null,
  23217. column: null
  23218. };
  23219. },
  23220. computed: {
  23221. filters: function filters() {
  23222. return this.column && this.column.filters;
  23223. },
  23224. filterValue: {
  23225. get: function get() {
  23226. return (this.column.filteredValue || [])[0];
  23227. },
  23228. set: function set(value) {
  23229. if (this.filteredValue) {
  23230. if (typeof value !== 'undefined' && value !== null) {
  23231. this.filteredValue.splice(0, 1, value);
  23232. } else {
  23233. this.filteredValue.splice(0, 1);
  23234. }
  23235. }
  23236. }
  23237. },
  23238. filteredValue: {
  23239. get: function get() {
  23240. if (this.column) {
  23241. return this.column.filteredValue || [];
  23242. }
  23243. return [];
  23244. },
  23245. set: function set(value) {
  23246. if (this.column) {
  23247. this.column.filteredValue = value;
  23248. }
  23249. }
  23250. },
  23251. multiple: function multiple() {
  23252. if (this.column) {
  23253. return this.column.filterMultiple;
  23254. }
  23255. return true;
  23256. }
  23257. },
  23258. mounted: function mounted() {
  23259. var _this2 = this;
  23260. this.popperElm = this.$el;
  23261. this.referenceElm = this.cell;
  23262. this.table.bodyWrapper.addEventListener('scroll', function () {
  23263. _this2.updatePopper();
  23264. });
  23265. this.$watch('showPopper', function (value) {
  23266. if (_this2.column) _this2.column.filterOpened = value;
  23267. if (value) {
  23268. src_dropdown.open(_this2);
  23269. } else {
  23270. src_dropdown.close(_this2);
  23271. }
  23272. });
  23273. },
  23274. watch: {
  23275. showPopper: function showPopper(val) {
  23276. if (val === true && parseInt(this.popperJS._popper.style.zIndex, 10) < popup_["PopupManager"].zIndex) {
  23277. this.popperJS._popper.style.zIndex = popup_["PopupManager"].nextZIndex();
  23278. }
  23279. }
  23280. }
  23281. });
  23282. // CONCATENATED MODULE: ./packages/table/src/filter-panel.vue?vue&type=script&lang=js&
  23283. /* harmony default export */ var src_filter_panelvue_type_script_lang_js_ = (filter_panelvue_type_script_lang_js_);
  23284. // CONCATENATED MODULE: ./packages/table/src/filter-panel.vue
  23285. /* normalize component */
  23286. var filter_panel_component = normalizeComponent(
  23287. src_filter_panelvue_type_script_lang_js_,
  23288. filter_panelvue_type_template_id_7f2c919f_render,
  23289. filter_panelvue_type_template_id_7f2c919f_staticRenderFns,
  23290. false,
  23291. null,
  23292. null,
  23293. null
  23294. )
  23295. /* hot reload */
  23296. if (false) { var filter_panel_api; }
  23297. filter_panel_component.options.__file = "packages/table/src/filter-panel.vue"
  23298. /* harmony default export */ var filter_panel = (filter_panel_component.exports);
  23299. // CONCATENATED MODULE: ./packages/table/src/table-header.js
  23300. var table_header_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  23301. var getAllColumns = function getAllColumns(columns) {
  23302. var result = [];
  23303. columns.forEach(function (column) {
  23304. if (column.children) {
  23305. result.push(column);
  23306. result.push.apply(result, getAllColumns(column.children));
  23307. } else {
  23308. result.push(column);
  23309. }
  23310. });
  23311. return result;
  23312. };
  23313. var convertToRows = function convertToRows(originColumns) {
  23314. var maxLevel = 1;
  23315. var traverse = function traverse(column, parent) {
  23316. if (parent) {
  23317. column.level = parent.level + 1;
  23318. if (maxLevel < column.level) {
  23319. maxLevel = column.level;
  23320. }
  23321. }
  23322. if (column.children) {
  23323. var colSpan = 0;
  23324. column.children.forEach(function (subColumn) {
  23325. traverse(subColumn, column);
  23326. colSpan += subColumn.colSpan;
  23327. });
  23328. column.colSpan = colSpan;
  23329. } else {
  23330. column.colSpan = 1;
  23331. }
  23332. };
  23333. originColumns.forEach(function (column) {
  23334. column.level = 1;
  23335. traverse(column);
  23336. });
  23337. var rows = [];
  23338. for (var i = 0; i < maxLevel; i++) {
  23339. rows.push([]);
  23340. }
  23341. var allColumns = getAllColumns(originColumns);
  23342. allColumns.forEach(function (column) {
  23343. if (!column.children) {
  23344. column.rowSpan = maxLevel - column.level + 1;
  23345. } else {
  23346. column.rowSpan = 1;
  23347. }
  23348. rows[column.level - 1].push(column);
  23349. });
  23350. return rows;
  23351. };
  23352. /* harmony default export */ var table_header = ({
  23353. name: 'ElTableHeader',
  23354. mixins: [layout_observer],
  23355. render: function render(h) {
  23356. var _this = this;
  23357. var originColumns = this.store.states.originColumns;
  23358. var columnRows = convertToRows(originColumns, this.columns);
  23359. // 是否拥有多级表头
  23360. var isGroup = columnRows.length > 1;
  23361. if (isGroup) this.$parent.isGroup = true;
  23362. return h(
  23363. 'table',
  23364. {
  23365. 'class': 'el-table__header',
  23366. attrs: { cellspacing: '0',
  23367. cellpadding: '0',
  23368. border: '0' }
  23369. },
  23370. [h('colgroup', [this.columns.map(function (column) {
  23371. return h('col', {
  23372. attrs: { name: column.id },
  23373. key: column.id });
  23374. }), this.hasGutter ? h('col', {
  23375. attrs: { name: 'gutter' }
  23376. }) : '']), h(
  23377. 'thead',
  23378. { 'class': [{ 'is-group': isGroup, 'has-gutter': this.hasGutter }] },
  23379. [this._l(columnRows, function (columns, rowIndex) {
  23380. return h(
  23381. 'tr',
  23382. {
  23383. style: _this.getHeaderRowStyle(rowIndex),
  23384. 'class': _this.getHeaderRowClass(rowIndex)
  23385. },
  23386. [columns.map(function (column, cellIndex) {
  23387. return h(
  23388. 'th',
  23389. {
  23390. attrs: {
  23391. colspan: column.colSpan,
  23392. rowspan: column.rowSpan
  23393. },
  23394. on: {
  23395. 'mousemove': function mousemove($event) {
  23396. return _this.handleMouseMove($event, column);
  23397. },
  23398. 'mouseout': _this.handleMouseOut,
  23399. 'mousedown': function mousedown($event) {
  23400. return _this.handleMouseDown($event, column);
  23401. },
  23402. 'click': function click($event) {
  23403. return _this.handleHeaderClick($event, column);
  23404. },
  23405. 'contextmenu': function contextmenu($event) {
  23406. return _this.handleHeaderContextMenu($event, column);
  23407. }
  23408. },
  23409. style: _this.getHeaderCellStyle(rowIndex, cellIndex, columns, column),
  23410. 'class': _this.getHeaderCellClass(rowIndex, cellIndex, columns, column),
  23411. key: column.id },
  23412. [h(
  23413. 'div',
  23414. { 'class': ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] },
  23415. [column.renderHeader ? column.renderHeader.call(_this._renderProxy, h, { column: column, $index: cellIndex, store: _this.store, _self: _this.$parent.$vnode.context }) : column.label, column.sortable ? h(
  23416. 'span',
  23417. {
  23418. 'class': 'caret-wrapper',
  23419. on: {
  23420. 'click': function click($event) {
  23421. return _this.handleSortClick($event, column);
  23422. }
  23423. }
  23424. },
  23425. [h('i', { 'class': 'sort-caret ascending',
  23426. on: {
  23427. 'click': function click($event) {
  23428. return _this.handleSortClick($event, column, 'ascending');
  23429. }
  23430. }
  23431. }), h('i', { 'class': 'sort-caret descending',
  23432. on: {
  23433. 'click': function click($event) {
  23434. return _this.handleSortClick($event, column, 'descending');
  23435. }
  23436. }
  23437. })]
  23438. ) : '', column.filterable ? h(
  23439. 'span',
  23440. {
  23441. 'class': 'el-table__column-filter-trigger',
  23442. on: {
  23443. 'click': function click($event) {
  23444. return _this.handleFilterClick($event, column);
  23445. }
  23446. }
  23447. },
  23448. [h('i', { 'class': ['el-icon-arrow-down', column.filterOpened ? 'el-icon-arrow-up' : ''] })]
  23449. ) : '']
  23450. )]
  23451. );
  23452. }), _this.hasGutter ? h('th', { 'class': 'el-table__cell gutter' }) : '']
  23453. );
  23454. })]
  23455. )]
  23456. );
  23457. },
  23458. props: {
  23459. fixed: String,
  23460. store: {
  23461. required: true
  23462. },
  23463. border: Boolean,
  23464. defaultSort: {
  23465. type: Object,
  23466. default: function _default() {
  23467. return {
  23468. prop: '',
  23469. order: ''
  23470. };
  23471. }
  23472. }
  23473. },
  23474. components: {
  23475. ElCheckbox: checkbox_default.a
  23476. },
  23477. computed: table_header_extends({
  23478. table: function table() {
  23479. return this.$parent;
  23480. },
  23481. hasGutter: function hasGutter() {
  23482. return !this.fixed && this.tableLayout.gutterWidth;
  23483. }
  23484. }, mapStates({
  23485. columns: 'columns',
  23486. isAllSelected: 'isAllSelected',
  23487. leftFixedLeafCount: 'fixedLeafColumnsLength',
  23488. rightFixedLeafCount: 'rightFixedLeafColumnsLength',
  23489. columnsCount: function columnsCount(states) {
  23490. return states.columns.length;
  23491. },
  23492. leftFixedCount: function leftFixedCount(states) {
  23493. return states.fixedColumns.length;
  23494. },
  23495. rightFixedCount: function rightFixedCount(states) {
  23496. return states.rightFixedColumns.length;
  23497. }
  23498. })),
  23499. created: function created() {
  23500. this.filterPanels = {};
  23501. },
  23502. mounted: function mounted() {
  23503. var _this2 = this;
  23504. // nextTick 是有必要的 https://github.com/ElemeFE/element/pull/11311
  23505. this.$nextTick(function () {
  23506. var _defaultSort = _this2.defaultSort,
  23507. prop = _defaultSort.prop,
  23508. order = _defaultSort.order;
  23509. var init = true;
  23510. _this2.store.commit('sort', { prop: prop, order: order, init: init });
  23511. });
  23512. },
  23513. beforeDestroy: function beforeDestroy() {
  23514. var panels = this.filterPanels;
  23515. for (var prop in panels) {
  23516. if (panels.hasOwnProperty(prop) && panels[prop]) {
  23517. panels[prop].$destroy(true);
  23518. }
  23519. }
  23520. },
  23521. methods: {
  23522. isCellHidden: function isCellHidden(index, columns) {
  23523. var start = 0;
  23524. for (var i = 0; i < index; i++) {
  23525. start += columns[i].colSpan;
  23526. }
  23527. var after = start + columns[index].colSpan - 1;
  23528. if (this.fixed === true || this.fixed === 'left') {
  23529. return after >= this.leftFixedLeafCount;
  23530. } else if (this.fixed === 'right') {
  23531. return start < this.columnsCount - this.rightFixedLeafCount;
  23532. } else {
  23533. return after < this.leftFixedLeafCount || start >= this.columnsCount - this.rightFixedLeafCount;
  23534. }
  23535. },
  23536. getHeaderRowStyle: function getHeaderRowStyle(rowIndex) {
  23537. var headerRowStyle = this.table.headerRowStyle;
  23538. if (typeof headerRowStyle === 'function') {
  23539. return headerRowStyle.call(null, { rowIndex: rowIndex });
  23540. }
  23541. return headerRowStyle;
  23542. },
  23543. getHeaderRowClass: function getHeaderRowClass(rowIndex) {
  23544. var classes = [];
  23545. var headerRowClassName = this.table.headerRowClassName;
  23546. if (typeof headerRowClassName === 'string') {
  23547. classes.push(headerRowClassName);
  23548. } else if (typeof headerRowClassName === 'function') {
  23549. classes.push(headerRowClassName.call(null, { rowIndex: rowIndex }));
  23550. }
  23551. return classes.join(' ');
  23552. },
  23553. getHeaderCellStyle: function getHeaderCellStyle(rowIndex, columnIndex, row, column) {
  23554. var headerCellStyle = this.table.headerCellStyle;
  23555. if (typeof headerCellStyle === 'function') {
  23556. return headerCellStyle.call(null, {
  23557. rowIndex: rowIndex,
  23558. columnIndex: columnIndex,
  23559. row: row,
  23560. column: column
  23561. });
  23562. }
  23563. return headerCellStyle;
  23564. },
  23565. getHeaderCellClass: function getHeaderCellClass(rowIndex, columnIndex, row, column) {
  23566. var classes = [column.id, column.order, column.headerAlign, column.className, column.labelClassName];
  23567. if (rowIndex === 0 && this.isCellHidden(columnIndex, row)) {
  23568. classes.push('is-hidden');
  23569. }
  23570. if (!column.children) {
  23571. classes.push('is-leaf');
  23572. }
  23573. if (column.sortable) {
  23574. classes.push('is-sortable');
  23575. }
  23576. var headerCellClassName = this.table.headerCellClassName;
  23577. if (typeof headerCellClassName === 'string') {
  23578. classes.push(headerCellClassName);
  23579. } else if (typeof headerCellClassName === 'function') {
  23580. classes.push(headerCellClassName.call(null, {
  23581. rowIndex: rowIndex,
  23582. columnIndex: columnIndex,
  23583. row: row,
  23584. column: column
  23585. }));
  23586. }
  23587. classes.push('el-table__cell');
  23588. return classes.join(' ');
  23589. },
  23590. toggleAllSelection: function toggleAllSelection() {
  23591. this.store.commit('toggleAllSelection');
  23592. },
  23593. handleFilterClick: function handleFilterClick(event, column) {
  23594. event.stopPropagation();
  23595. var target = event.target;
  23596. var cell = target.tagName === 'TH' ? target : target.parentNode;
  23597. if (Object(dom_["hasClass"])(cell, 'noclick')) return;
  23598. cell = cell.querySelector('.el-table__column-filter-trigger') || cell;
  23599. var table = this.$parent;
  23600. var filterPanel = this.filterPanels[column.id];
  23601. if (filterPanel && column.filterOpened) {
  23602. filterPanel.showPopper = false;
  23603. return;
  23604. }
  23605. if (!filterPanel) {
  23606. filterPanel = new external_vue_default.a(filter_panel);
  23607. this.filterPanels[column.id] = filterPanel;
  23608. if (column.filterPlacement) {
  23609. filterPanel.placement = column.filterPlacement;
  23610. }
  23611. filterPanel.table = table;
  23612. filterPanel.cell = cell;
  23613. filterPanel.column = column;
  23614. !this.$isServer && filterPanel.$mount(document.createElement('div'));
  23615. }
  23616. setTimeout(function () {
  23617. filterPanel.showPopper = true;
  23618. }, 16);
  23619. },
  23620. handleHeaderClick: function handleHeaderClick(event, column) {
  23621. if (!column.filters && column.sortable) {
  23622. this.handleSortClick(event, column);
  23623. } else if (column.filterable && !column.sortable) {
  23624. this.handleFilterClick(event, column);
  23625. }
  23626. this.$parent.$emit('header-click', column, event);
  23627. },
  23628. handleHeaderContextMenu: function handleHeaderContextMenu(event, column) {
  23629. this.$parent.$emit('header-contextmenu', column, event);
  23630. },
  23631. handleMouseDown: function handleMouseDown(event, column) {
  23632. var _this3 = this;
  23633. if (this.$isServer) return;
  23634. if (column.children && column.children.length > 0) return;
  23635. /* istanbul ignore if */
  23636. if (this.draggingColumn && this.border) {
  23637. this.dragging = true;
  23638. this.$parent.resizeProxyVisible = true;
  23639. var table = this.$parent;
  23640. var tableEl = table.$el;
  23641. var tableLeft = tableEl.getBoundingClientRect().left;
  23642. var columnEl = this.$el.querySelector('th.' + column.id);
  23643. var columnRect = columnEl.getBoundingClientRect();
  23644. var minLeft = columnRect.left - tableLeft + 30;
  23645. Object(dom_["addClass"])(columnEl, 'noclick');
  23646. this.dragState = {
  23647. startMouseLeft: event.clientX,
  23648. startLeft: columnRect.right - tableLeft,
  23649. startColumnLeft: columnRect.left - tableLeft,
  23650. tableLeft: tableLeft
  23651. };
  23652. var resizeProxy = table.$refs.resizeProxy;
  23653. resizeProxy.style.left = this.dragState.startLeft + 'px';
  23654. document.onselectstart = function () {
  23655. return false;
  23656. };
  23657. document.ondragstart = function () {
  23658. return false;
  23659. };
  23660. var handleMouseMove = function handleMouseMove(event) {
  23661. var deltaLeft = event.clientX - _this3.dragState.startMouseLeft;
  23662. var proxyLeft = _this3.dragState.startLeft + deltaLeft;
  23663. resizeProxy.style.left = Math.max(minLeft, proxyLeft) + 'px';
  23664. };
  23665. var handleMouseUp = function handleMouseUp() {
  23666. if (_this3.dragging) {
  23667. var _dragState = _this3.dragState,
  23668. startColumnLeft = _dragState.startColumnLeft,
  23669. startLeft = _dragState.startLeft;
  23670. var finalLeft = parseInt(resizeProxy.style.left, 10);
  23671. var columnWidth = finalLeft - startColumnLeft;
  23672. column.width = column.realWidth = columnWidth;
  23673. table.$emit('header-dragend', column.width, startLeft - startColumnLeft, column, event);
  23674. _this3.store.scheduleLayout();
  23675. document.body.style.cursor = '';
  23676. _this3.dragging = false;
  23677. _this3.draggingColumn = null;
  23678. _this3.dragState = {};
  23679. table.resizeProxyVisible = false;
  23680. }
  23681. document.removeEventListener('mousemove', handleMouseMove);
  23682. document.removeEventListener('mouseup', handleMouseUp);
  23683. document.onselectstart = null;
  23684. document.ondragstart = null;
  23685. setTimeout(function () {
  23686. Object(dom_["removeClass"])(columnEl, 'noclick');
  23687. }, 0);
  23688. };
  23689. document.addEventListener('mousemove', handleMouseMove);
  23690. document.addEventListener('mouseup', handleMouseUp);
  23691. }
  23692. },
  23693. handleMouseMove: function handleMouseMove(event, column) {
  23694. if (column.children && column.children.length > 0) return;
  23695. var target = event.target;
  23696. while (target && target.tagName !== 'TH') {
  23697. target = target.parentNode;
  23698. }
  23699. if (!column || !column.resizable) return;
  23700. if (!this.dragging && this.border) {
  23701. var rect = target.getBoundingClientRect();
  23702. var bodyStyle = document.body.style;
  23703. if (rect.width > 12 && rect.right - event.pageX < 8) {
  23704. bodyStyle.cursor = 'col-resize';
  23705. if (Object(dom_["hasClass"])(target, 'is-sortable')) {
  23706. target.style.cursor = 'col-resize';
  23707. }
  23708. this.draggingColumn = column;
  23709. } else if (!this.dragging) {
  23710. bodyStyle.cursor = '';
  23711. if (Object(dom_["hasClass"])(target, 'is-sortable')) {
  23712. target.style.cursor = 'pointer';
  23713. }
  23714. this.draggingColumn = null;
  23715. }
  23716. }
  23717. },
  23718. handleMouseOut: function handleMouseOut() {
  23719. if (this.$isServer) return;
  23720. document.body.style.cursor = '';
  23721. },
  23722. toggleOrder: function toggleOrder(_ref) {
  23723. var order = _ref.order,
  23724. sortOrders = _ref.sortOrders;
  23725. if (order === '') return sortOrders[0];
  23726. var index = sortOrders.indexOf(order || null);
  23727. return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];
  23728. },
  23729. handleSortClick: function handleSortClick(event, column, givenOrder) {
  23730. event.stopPropagation();
  23731. var order = column.order === givenOrder ? null : givenOrder || this.toggleOrder(column);
  23732. var target = event.target;
  23733. while (target && target.tagName !== 'TH') {
  23734. target = target.parentNode;
  23735. }
  23736. if (target && target.tagName === 'TH') {
  23737. if (Object(dom_["hasClass"])(target, 'noclick')) {
  23738. Object(dom_["removeClass"])(target, 'noclick');
  23739. return;
  23740. }
  23741. }
  23742. if (!column.sortable) return;
  23743. var states = this.store.states;
  23744. var sortProp = states.sortProp;
  23745. var sortOrder = void 0;
  23746. var sortingColumn = states.sortingColumn;
  23747. if (sortingColumn !== column || sortingColumn === column && sortingColumn.order === null) {
  23748. if (sortingColumn) {
  23749. sortingColumn.order = null;
  23750. }
  23751. states.sortingColumn = column;
  23752. sortProp = column.property;
  23753. }
  23754. if (!order) {
  23755. sortOrder = column.order = null;
  23756. } else {
  23757. sortOrder = column.order = order;
  23758. }
  23759. states.sortProp = sortProp;
  23760. states.sortOrder = sortOrder;
  23761. this.store.commit('changeSortCondition');
  23762. }
  23763. },
  23764. data: function data() {
  23765. return {
  23766. draggingColumn: null,
  23767. dragging: false,
  23768. dragState: {}
  23769. };
  23770. }
  23771. });
  23772. // CONCATENATED MODULE: ./packages/table/src/table-footer.js
  23773. var table_footer_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  23774. /* harmony default export */ var table_footer = ({
  23775. name: 'ElTableFooter',
  23776. mixins: [layout_observer],
  23777. render: function render(h) {
  23778. var _this = this;
  23779. var sums = [];
  23780. if (this.summaryMethod) {
  23781. sums = this.summaryMethod({ columns: this.columns, data: this.store.states.data });
  23782. } else {
  23783. this.columns.forEach(function (column, index) {
  23784. if (index === 0) {
  23785. sums[index] = _this.sumText;
  23786. return;
  23787. }
  23788. var values = _this.store.states.data.map(function (item) {
  23789. return Number(item[column.property]);
  23790. });
  23791. var precisions = [];
  23792. var notNumber = true;
  23793. values.forEach(function (value) {
  23794. if (!isNaN(value)) {
  23795. notNumber = false;
  23796. var decimal = ('' + value).split('.')[1];
  23797. precisions.push(decimal ? decimal.length : 0);
  23798. }
  23799. });
  23800. var precision = Math.max.apply(null, precisions);
  23801. if (!notNumber) {
  23802. sums[index] = values.reduce(function (prev, curr) {
  23803. var value = Number(curr);
  23804. if (!isNaN(value)) {
  23805. return parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
  23806. } else {
  23807. return prev;
  23808. }
  23809. }, 0);
  23810. } else {
  23811. sums[index] = '';
  23812. }
  23813. });
  23814. }
  23815. return h(
  23816. 'table',
  23817. {
  23818. 'class': 'el-table__footer',
  23819. attrs: { cellspacing: '0',
  23820. cellpadding: '0',
  23821. border: '0' }
  23822. },
  23823. [h('colgroup', [this.columns.map(function (column) {
  23824. return h('col', {
  23825. attrs: { name: column.id },
  23826. key: column.id });
  23827. }), this.hasGutter ? h('col', {
  23828. attrs: { name: 'gutter' }
  23829. }) : '']), h(
  23830. 'tbody',
  23831. { 'class': [{ 'has-gutter': this.hasGutter }] },
  23832. [h('tr', [this.columns.map(function (column, cellIndex) {
  23833. return h(
  23834. 'td',
  23835. {
  23836. key: cellIndex,
  23837. attrs: { colspan: column.colSpan,
  23838. rowspan: column.rowSpan
  23839. },
  23840. 'class': [].concat(_this.getRowClasses(column, cellIndex), ['el-table__cell']) },
  23841. [h(
  23842. 'div',
  23843. { 'class': ['cell', column.labelClassName] },
  23844. [sums[cellIndex]]
  23845. )]
  23846. );
  23847. }), this.hasGutter ? h('th', { 'class': 'el-table__cell gutter' }) : ''])]
  23848. )]
  23849. );
  23850. },
  23851. props: {
  23852. fixed: String,
  23853. store: {
  23854. required: true
  23855. },
  23856. summaryMethod: Function,
  23857. sumText: String,
  23858. border: Boolean,
  23859. defaultSort: {
  23860. type: Object,
  23861. default: function _default() {
  23862. return {
  23863. prop: '',
  23864. order: ''
  23865. };
  23866. }
  23867. }
  23868. },
  23869. computed: table_footer_extends({
  23870. table: function table() {
  23871. return this.$parent;
  23872. },
  23873. hasGutter: function hasGutter() {
  23874. return !this.fixed && this.tableLayout.gutterWidth;
  23875. }
  23876. }, mapStates({
  23877. columns: 'columns',
  23878. isAllSelected: 'isAllSelected',
  23879. leftFixedLeafCount: 'fixedLeafColumnsLength',
  23880. rightFixedLeafCount: 'rightFixedLeafColumnsLength',
  23881. columnsCount: function columnsCount(states) {
  23882. return states.columns.length;
  23883. },
  23884. leftFixedCount: function leftFixedCount(states) {
  23885. return states.fixedColumns.length;
  23886. },
  23887. rightFixedCount: function rightFixedCount(states) {
  23888. return states.rightFixedColumns.length;
  23889. }
  23890. })),
  23891. methods: {
  23892. isCellHidden: function isCellHidden(index, columns, column) {
  23893. if (this.fixed === true || this.fixed === 'left') {
  23894. return index >= this.leftFixedLeafCount;
  23895. } else if (this.fixed === 'right') {
  23896. var before = 0;
  23897. for (var i = 0; i < index; i++) {
  23898. before += columns[i].colSpan;
  23899. }
  23900. return before < this.columnsCount - this.rightFixedLeafCount;
  23901. } else if (!this.fixed && column.fixed) {
  23902. // hide cell when footer instance is not fixed and column is fixed
  23903. return true;
  23904. } else {
  23905. return index < this.leftFixedCount || index >= this.columnsCount - this.rightFixedCount;
  23906. }
  23907. },
  23908. getRowClasses: function getRowClasses(column, cellIndex) {
  23909. var classes = [column.id, column.align, column.labelClassName];
  23910. if (column.className) {
  23911. classes.push(column.className);
  23912. }
  23913. if (this.isCellHidden(cellIndex, this.columns, column)) {
  23914. classes.push('is-hidden');
  23915. }
  23916. if (!column.children) {
  23917. classes.push('is-leaf');
  23918. }
  23919. return classes;
  23920. }
  23921. }
  23922. });
  23923. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=script&lang=js&
  23924. var tablevue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  23925. //
  23926. //
  23927. //
  23928. //
  23929. //
  23930. //
  23931. //
  23932. //
  23933. //
  23934. //
  23935. //
  23936. //
  23937. //
  23938. //
  23939. //
  23940. //
  23941. //
  23942. //
  23943. //
  23944. //
  23945. //
  23946. //
  23947. //
  23948. //
  23949. //
  23950. //
  23951. //
  23952. //
  23953. //
  23954. //
  23955. //
  23956. //
  23957. //
  23958. //
  23959. //
  23960. //
  23961. //
  23962. //
  23963. //
  23964. //
  23965. //
  23966. //
  23967. //
  23968. //
  23969. //
  23970. //
  23971. //
  23972. //
  23973. //
  23974. //
  23975. //
  23976. //
  23977. //
  23978. //
  23979. //
  23980. //
  23981. //
  23982. //
  23983. //
  23984. //
  23985. //
  23986. //
  23987. //
  23988. //
  23989. //
  23990. //
  23991. //
  23992. //
  23993. //
  23994. //
  23995. //
  23996. //
  23997. //
  23998. //
  23999. //
  24000. //
  24001. //
  24002. //
  24003. //
  24004. //
  24005. //
  24006. //
  24007. //
  24008. //
  24009. //
  24010. //
  24011. //
  24012. //
  24013. //
  24014. //
  24015. //
  24016. //
  24017. //
  24018. //
  24019. //
  24020. //
  24021. //
  24022. //
  24023. //
  24024. //
  24025. //
  24026. //
  24027. //
  24028. //
  24029. //
  24030. //
  24031. //
  24032. //
  24033. //
  24034. //
  24035. //
  24036. //
  24037. //
  24038. //
  24039. //
  24040. //
  24041. //
  24042. //
  24043. //
  24044. //
  24045. //
  24046. //
  24047. //
  24048. //
  24049. //
  24050. //
  24051. //
  24052. //
  24053. //
  24054. //
  24055. //
  24056. //
  24057. //
  24058. //
  24059. //
  24060. //
  24061. //
  24062. //
  24063. //
  24064. //
  24065. //
  24066. //
  24067. //
  24068. //
  24069. //
  24070. //
  24071. //
  24072. //
  24073. //
  24074. //
  24075. //
  24076. //
  24077. //
  24078. //
  24079. //
  24080. //
  24081. //
  24082. //
  24083. //
  24084. //
  24085. //
  24086. //
  24087. //
  24088. //
  24089. //
  24090. //
  24091. //
  24092. //
  24093. //
  24094. //
  24095. //
  24096. //
  24097. //
  24098. //
  24099. //
  24100. //
  24101. //
  24102. //
  24103. //
  24104. //
  24105. //
  24106. //
  24107. //
  24108. //
  24109. //
  24110. //
  24111. //
  24112. //
  24113. //
  24114. //
  24115. //
  24116. //
  24117. //
  24118. //
  24119. //
  24120. //
  24121. //
  24122. //
  24123. //
  24124. //
  24125. //
  24126. //
  24127. //
  24128. //
  24129. //
  24130. //
  24131. //
  24132. //
  24133. //
  24134. //
  24135. //
  24136. //
  24137. //
  24138. //
  24139. var tableIdSeed = 1;
  24140. /* harmony default export */ var tablevue_type_script_lang_js_ = ({
  24141. name: 'ElTable',
  24142. mixins: [locale_default.a, migrating_default.a],
  24143. directives: {
  24144. Mousewheel: directives_mousewheel
  24145. },
  24146. props: {
  24147. data: {
  24148. type: Array,
  24149. default: function _default() {
  24150. return [];
  24151. }
  24152. },
  24153. size: String,
  24154. width: [String, Number],
  24155. height: [String, Number],
  24156. maxHeight: [String, Number],
  24157. fit: {
  24158. type: Boolean,
  24159. default: true
  24160. },
  24161. stripe: Boolean,
  24162. border: Boolean,
  24163. rowKey: [String, Function],
  24164. context: {},
  24165. showHeader: {
  24166. type: Boolean,
  24167. default: true
  24168. },
  24169. showSummary: Boolean,
  24170. sumText: String,
  24171. summaryMethod: Function,
  24172. rowClassName: [String, Function],
  24173. rowStyle: [Object, Function],
  24174. cellClassName: [String, Function],
  24175. cellStyle: [Object, Function],
  24176. headerRowClassName: [String, Function],
  24177. headerRowStyle: [Object, Function],
  24178. headerCellClassName: [String, Function],
  24179. headerCellStyle: [Object, Function],
  24180. highlightCurrentRow: Boolean,
  24181. currentRowKey: [String, Number],
  24182. emptyText: String,
  24183. expandRowKeys: Array,
  24184. defaultExpandAll: Boolean,
  24185. defaultSort: Object,
  24186. tooltipEffect: String,
  24187. spanMethod: Function,
  24188. selectOnIndeterminate: {
  24189. type: Boolean,
  24190. default: true
  24191. },
  24192. indent: {
  24193. type: Number,
  24194. default: 16
  24195. },
  24196. treeProps: {
  24197. type: Object,
  24198. default: function _default() {
  24199. return {
  24200. hasChildren: 'hasChildren',
  24201. children: 'children'
  24202. };
  24203. }
  24204. },
  24205. lazy: Boolean,
  24206. load: Function
  24207. },
  24208. components: {
  24209. TableHeader: table_header,
  24210. TableFooter: table_footer,
  24211. TableBody: table_body,
  24212. ElCheckbox: checkbox_default.a
  24213. },
  24214. methods: {
  24215. getMigratingConfig: function getMigratingConfig() {
  24216. return {
  24217. events: {
  24218. expand: 'expand is renamed to expand-change'
  24219. }
  24220. };
  24221. },
  24222. setCurrentRow: function setCurrentRow(row) {
  24223. this.store.commit('setCurrentRow', row);
  24224. },
  24225. toggleRowSelection: function toggleRowSelection(row, selected) {
  24226. this.store.toggleRowSelection(row, selected, false);
  24227. this.store.updateAllSelected();
  24228. },
  24229. toggleRowExpansion: function toggleRowExpansion(row, expanded) {
  24230. this.store.toggleRowExpansionAdapter(row, expanded);
  24231. },
  24232. clearSelection: function clearSelection() {
  24233. this.store.clearSelection();
  24234. },
  24235. clearFilter: function clearFilter(columnKeys) {
  24236. this.store.clearFilter(columnKeys);
  24237. },
  24238. clearSort: function clearSort() {
  24239. this.store.clearSort();
  24240. },
  24241. handleMouseLeave: function handleMouseLeave() {
  24242. this.store.commit('setHoverRow', null);
  24243. if (this.hoverState) this.hoverState = null;
  24244. },
  24245. updateScrollY: function updateScrollY() {
  24246. var changed = this.layout.updateScrollY();
  24247. if (changed) {
  24248. this.layout.notifyObservers('scrollable');
  24249. this.layout.updateColumnsWidth();
  24250. }
  24251. },
  24252. handleFixedMousewheel: function handleFixedMousewheel(event, data) {
  24253. var bodyWrapper = this.bodyWrapper;
  24254. if (Math.abs(data.spinY) > 0) {
  24255. var currentScrollTop = bodyWrapper.scrollTop;
  24256. if (data.pixelY < 0 && currentScrollTop !== 0) {
  24257. event.preventDefault();
  24258. }
  24259. if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) {
  24260. event.preventDefault();
  24261. }
  24262. bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5);
  24263. } else {
  24264. bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5);
  24265. }
  24266. },
  24267. handleHeaderFooterMousewheel: function handleHeaderFooterMousewheel(event, data) {
  24268. var pixelX = data.pixelX,
  24269. pixelY = data.pixelY;
  24270. if (Math.abs(pixelX) >= Math.abs(pixelY)) {
  24271. this.bodyWrapper.scrollLeft += data.pixelX / 5;
  24272. }
  24273. },
  24274. // TODO 使用 CSS transform
  24275. syncPostion: Object(external_throttle_debounce_["throttle"])(20, function () {
  24276. var _bodyWrapper = this.bodyWrapper,
  24277. scrollLeft = _bodyWrapper.scrollLeft,
  24278. scrollTop = _bodyWrapper.scrollTop,
  24279. offsetWidth = _bodyWrapper.offsetWidth,
  24280. scrollWidth = _bodyWrapper.scrollWidth;
  24281. var _$refs = this.$refs,
  24282. headerWrapper = _$refs.headerWrapper,
  24283. footerWrapper = _$refs.footerWrapper,
  24284. fixedBodyWrapper = _$refs.fixedBodyWrapper,
  24285. rightFixedBodyWrapper = _$refs.rightFixedBodyWrapper;
  24286. if (headerWrapper) headerWrapper.scrollLeft = scrollLeft;
  24287. if (footerWrapper) footerWrapper.scrollLeft = scrollLeft;
  24288. if (fixedBodyWrapper) fixedBodyWrapper.scrollTop = scrollTop;
  24289. if (rightFixedBodyWrapper) rightFixedBodyWrapper.scrollTop = scrollTop;
  24290. var maxScrollLeftPosition = scrollWidth - offsetWidth - 1;
  24291. if (scrollLeft >= maxScrollLeftPosition) {
  24292. this.scrollPosition = 'right';
  24293. } else if (scrollLeft === 0) {
  24294. this.scrollPosition = 'left';
  24295. } else {
  24296. this.scrollPosition = 'middle';
  24297. }
  24298. }),
  24299. bindEvents: function bindEvents() {
  24300. this.bodyWrapper.addEventListener('scroll', this.syncPostion, { passive: true });
  24301. if (this.fit) {
  24302. Object(resize_event_["addResizeListener"])(this.$el, this.resizeListener);
  24303. }
  24304. },
  24305. unbindEvents: function unbindEvents() {
  24306. this.bodyWrapper.removeEventListener('scroll', this.syncPostion, { passive: true });
  24307. if (this.fit) {
  24308. Object(resize_event_["removeResizeListener"])(this.$el, this.resizeListener);
  24309. }
  24310. },
  24311. resizeListener: function resizeListener() {
  24312. if (!this.$ready) return;
  24313. var shouldUpdateLayout = false;
  24314. var el = this.$el;
  24315. var _resizeState = this.resizeState,
  24316. oldWidth = _resizeState.width,
  24317. oldHeight = _resizeState.height;
  24318. var width = el.offsetWidth;
  24319. if (oldWidth !== width) {
  24320. shouldUpdateLayout = true;
  24321. }
  24322. var height = el.offsetHeight;
  24323. if ((this.height || this.shouldUpdateHeight) && oldHeight !== height) {
  24324. shouldUpdateLayout = true;
  24325. }
  24326. if (shouldUpdateLayout) {
  24327. this.resizeState.width = width;
  24328. this.resizeState.height = height;
  24329. this.doLayout();
  24330. }
  24331. },
  24332. doLayout: function doLayout() {
  24333. if (this.shouldUpdateHeight) {
  24334. this.layout.updateElsHeight();
  24335. }
  24336. this.layout.updateColumnsWidth();
  24337. },
  24338. sort: function sort(prop, order) {
  24339. this.store.commit('sort', { prop: prop, order: order });
  24340. },
  24341. toggleAllSelection: function toggleAllSelection() {
  24342. this.store.commit('toggleAllSelection');
  24343. }
  24344. },
  24345. computed: tablevue_type_script_lang_js_extends({
  24346. tableSize: function tableSize() {
  24347. return this.size || (this.$ELEMENT || {}).size;
  24348. },
  24349. bodyWrapper: function bodyWrapper() {
  24350. return this.$refs.bodyWrapper;
  24351. },
  24352. shouldUpdateHeight: function shouldUpdateHeight() {
  24353. return this.height || this.maxHeight || this.fixedColumns.length > 0 || this.rightFixedColumns.length > 0;
  24354. },
  24355. bodyWidth: function bodyWidth() {
  24356. var _layout = this.layout,
  24357. bodyWidth = _layout.bodyWidth,
  24358. scrollY = _layout.scrollY,
  24359. gutterWidth = _layout.gutterWidth;
  24360. return bodyWidth ? bodyWidth - (scrollY ? gutterWidth : 0) + 'px' : '';
  24361. },
  24362. bodyHeight: function bodyHeight() {
  24363. var _layout2 = this.layout,
  24364. _layout2$headerHeight = _layout2.headerHeight,
  24365. headerHeight = _layout2$headerHeight === undefined ? 0 : _layout2$headerHeight,
  24366. bodyHeight = _layout2.bodyHeight,
  24367. _layout2$footerHeight = _layout2.footerHeight,
  24368. footerHeight = _layout2$footerHeight === undefined ? 0 : _layout2$footerHeight;
  24369. if (this.height) {
  24370. return {
  24371. height: bodyHeight ? bodyHeight + 'px' : ''
  24372. };
  24373. } else if (this.maxHeight) {
  24374. var maxHeight = parseHeight(this.maxHeight);
  24375. if (typeof maxHeight === 'number') {
  24376. return {
  24377. 'max-height': maxHeight - footerHeight - (this.showHeader ? headerHeight : 0) + 'px'
  24378. };
  24379. }
  24380. }
  24381. return {};
  24382. },
  24383. fixedBodyHeight: function fixedBodyHeight() {
  24384. if (this.height) {
  24385. return {
  24386. height: this.layout.fixedBodyHeight ? this.layout.fixedBodyHeight + 'px' : ''
  24387. };
  24388. } else if (this.maxHeight) {
  24389. var maxHeight = parseHeight(this.maxHeight);
  24390. if (typeof maxHeight === 'number') {
  24391. maxHeight = this.layout.scrollX ? maxHeight - this.layout.gutterWidth : maxHeight;
  24392. if (this.showHeader) {
  24393. maxHeight -= this.layout.headerHeight;
  24394. }
  24395. maxHeight -= this.layout.footerHeight;
  24396. return {
  24397. 'max-height': maxHeight + 'px'
  24398. };
  24399. }
  24400. }
  24401. return {};
  24402. },
  24403. fixedHeight: function fixedHeight() {
  24404. if (this.maxHeight) {
  24405. if (this.showSummary) {
  24406. return {
  24407. bottom: 0
  24408. };
  24409. }
  24410. return {
  24411. bottom: this.layout.scrollX && this.data.length ? this.layout.gutterWidth + 'px' : ''
  24412. };
  24413. } else {
  24414. if (this.showSummary) {
  24415. return {
  24416. height: this.layout.tableHeight ? this.layout.tableHeight + 'px' : ''
  24417. };
  24418. }
  24419. return {
  24420. height: this.layout.viewportHeight ? this.layout.viewportHeight + 'px' : ''
  24421. };
  24422. }
  24423. },
  24424. emptyBlockStyle: function emptyBlockStyle() {
  24425. if (this.data && this.data.length) return null;
  24426. var height = '100%';
  24427. if (this.layout.appendHeight) {
  24428. height = 'calc(100% - ' + this.layout.appendHeight + 'px)';
  24429. }
  24430. return {
  24431. width: this.bodyWidth,
  24432. height: height
  24433. };
  24434. }
  24435. }, mapStates({
  24436. selection: 'selection',
  24437. columns: 'columns',
  24438. tableData: 'data',
  24439. fixedColumns: 'fixedColumns',
  24440. rightFixedColumns: 'rightFixedColumns'
  24441. })),
  24442. watch: {
  24443. height: {
  24444. immediate: true,
  24445. handler: function handler(value) {
  24446. this.layout.setHeight(value);
  24447. }
  24448. },
  24449. maxHeight: {
  24450. immediate: true,
  24451. handler: function handler(value) {
  24452. this.layout.setMaxHeight(value);
  24453. }
  24454. },
  24455. currentRowKey: {
  24456. immediate: true,
  24457. handler: function handler(value) {
  24458. if (!this.rowKey) return;
  24459. this.store.setCurrentRowKey(value);
  24460. }
  24461. },
  24462. data: {
  24463. immediate: true,
  24464. handler: function handler(value) {
  24465. this.store.commit('setData', value);
  24466. }
  24467. },
  24468. expandRowKeys: {
  24469. immediate: true,
  24470. handler: function handler(newVal) {
  24471. if (newVal) {
  24472. this.store.setExpandRowKeysAdapter(newVal);
  24473. }
  24474. }
  24475. }
  24476. },
  24477. created: function created() {
  24478. var _this = this;
  24479. this.tableId = 'el-table_' + tableIdSeed++;
  24480. this.debouncedUpdateLayout = Object(external_throttle_debounce_["debounce"])(50, function () {
  24481. return _this.doLayout();
  24482. });
  24483. },
  24484. mounted: function mounted() {
  24485. var _this2 = this;
  24486. this.bindEvents();
  24487. this.store.updateColumns();
  24488. this.doLayout();
  24489. this.resizeState = {
  24490. width: this.$el.offsetWidth,
  24491. height: this.$el.offsetHeight
  24492. };
  24493. // init filters
  24494. this.store.states.columns.forEach(function (column) {
  24495. if (column.filteredValue && column.filteredValue.length) {
  24496. _this2.store.commit('filterChange', {
  24497. column: column,
  24498. values: column.filteredValue,
  24499. silent: true
  24500. });
  24501. }
  24502. });
  24503. this.$ready = true;
  24504. },
  24505. destroyed: function destroyed() {
  24506. this.unbindEvents();
  24507. },
  24508. data: function data() {
  24509. var _treeProps = this.treeProps,
  24510. _treeProps$hasChildre = _treeProps.hasChildren,
  24511. hasChildren = _treeProps$hasChildre === undefined ? 'hasChildren' : _treeProps$hasChildre,
  24512. _treeProps$children = _treeProps.children,
  24513. children = _treeProps$children === undefined ? 'children' : _treeProps$children;
  24514. this.store = createStore(this, {
  24515. rowKey: this.rowKey,
  24516. defaultExpandAll: this.defaultExpandAll,
  24517. selectOnIndeterminate: this.selectOnIndeterminate,
  24518. // TreeTable 的相关配置
  24519. indent: this.indent,
  24520. lazy: this.lazy,
  24521. lazyColumnIdentifier: hasChildren,
  24522. childrenColumnName: children
  24523. });
  24524. var layout = new table_layout({
  24525. store: this.store,
  24526. table: this,
  24527. fit: this.fit,
  24528. showHeader: this.showHeader
  24529. });
  24530. return {
  24531. layout: layout,
  24532. isHidden: false,
  24533. renderExpanded: null,
  24534. resizeProxyVisible: false,
  24535. resizeState: {
  24536. width: null,
  24537. height: null
  24538. },
  24539. // 是否拥有多级表头
  24540. isGroup: false,
  24541. scrollPosition: 'left'
  24542. };
  24543. }
  24544. });
  24545. // CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=script&lang=js&
  24546. /* harmony default export */ var src_tablevue_type_script_lang_js_ = (tablevue_type_script_lang_js_);
  24547. // CONCATENATED MODULE: ./packages/table/src/table.vue
  24548. /* normalize component */
  24549. var table_component = normalizeComponent(
  24550. src_tablevue_type_script_lang_js_,
  24551. tablevue_type_template_id_493fe34e_render,
  24552. tablevue_type_template_id_493fe34e_staticRenderFns,
  24553. false,
  24554. null,
  24555. null,
  24556. null
  24557. )
  24558. /* hot reload */
  24559. if (false) { var table_api; }
  24560. table_component.options.__file = "packages/table/src/table.vue"
  24561. /* harmony default export */ var src_table = (table_component.exports);
  24562. // CONCATENATED MODULE: ./packages/table/index.js
  24563. /* istanbul ignore next */
  24564. src_table.install = function (Vue) {
  24565. Vue.component(src_table.name, src_table);
  24566. };
  24567. /* harmony default export */ var packages_table = (src_table);
  24568. // CONCATENATED MODULE: ./packages/table/src/config.js
  24569. var cellStarts = {
  24570. default: {
  24571. order: ''
  24572. },
  24573. selection: {
  24574. width: 48,
  24575. minWidth: 48,
  24576. realWidth: 48,
  24577. order: '',
  24578. className: 'el-table-column--selection'
  24579. },
  24580. expand: {
  24581. width: 48,
  24582. minWidth: 48,
  24583. realWidth: 48,
  24584. order: ''
  24585. },
  24586. index: {
  24587. width: 48,
  24588. minWidth: 48,
  24589. realWidth: 48,
  24590. order: ''
  24591. }
  24592. };
  24593. // 这些选项不应该被覆盖
  24594. var cellForced = {
  24595. selection: {
  24596. renderHeader: function renderHeader(h, _ref) {
  24597. var store = _ref.store;
  24598. return h('el-checkbox', {
  24599. attrs: {
  24600. disabled: store.states.data && store.states.data.length === 0,
  24601. indeterminate: store.states.selection.length > 0 && !this.isAllSelected,
  24602. value: this.isAllSelected },
  24603. on: {
  24604. 'input': this.toggleAllSelection
  24605. }
  24606. });
  24607. },
  24608. renderCell: function renderCell(h, _ref2) {
  24609. var row = _ref2.row,
  24610. column = _ref2.column,
  24611. isSelected = _ref2.isSelected,
  24612. store = _ref2.store,
  24613. $index = _ref2.$index;
  24614. return h('el-checkbox', {
  24615. nativeOn: {
  24616. 'click': function click(event) {
  24617. return event.stopPropagation();
  24618. }
  24619. },
  24620. attrs: {
  24621. value: isSelected,
  24622. disabled: column.selectable ? !column.selectable.call(null, row, $index) : false
  24623. },
  24624. on: {
  24625. 'input': function input() {
  24626. store.commit('rowSelectedChanged', row);
  24627. }
  24628. }
  24629. });
  24630. },
  24631. sortable: false,
  24632. resizable: false
  24633. },
  24634. index: {
  24635. renderHeader: function renderHeader(h, _ref3) {
  24636. var column = _ref3.column;
  24637. return column.label || '#';
  24638. },
  24639. renderCell: function renderCell(h, _ref4) {
  24640. var $index = _ref4.$index,
  24641. column = _ref4.column;
  24642. var i = $index + 1;
  24643. var index = column.index;
  24644. if (typeof index === 'number') {
  24645. i = $index + index;
  24646. } else if (typeof index === 'function') {
  24647. i = index($index);
  24648. }
  24649. return h('div', [i]);
  24650. },
  24651. sortable: false
  24652. },
  24653. expand: {
  24654. renderHeader: function renderHeader(h, _ref5) {
  24655. var column = _ref5.column;
  24656. return column.label || '';
  24657. },
  24658. renderCell: function renderCell(h, _ref6) {
  24659. var row = _ref6.row,
  24660. store = _ref6.store,
  24661. isExpanded = _ref6.isExpanded;
  24662. var classes = ['el-table__expand-icon'];
  24663. if (isExpanded) {
  24664. classes.push('el-table__expand-icon--expanded');
  24665. }
  24666. var callback = function callback(e) {
  24667. e.stopPropagation();
  24668. store.toggleRowExpansion(row);
  24669. };
  24670. return h(
  24671. 'div',
  24672. { 'class': classes,
  24673. on: {
  24674. 'click': callback
  24675. }
  24676. },
  24677. [h('i', { 'class': 'el-icon el-icon-arrow-right' })]
  24678. );
  24679. },
  24680. sortable: false,
  24681. resizable: false,
  24682. className: 'el-table__expand-column'
  24683. }
  24684. };
  24685. function defaultRenderCell(h, _ref7) {
  24686. var row = _ref7.row,
  24687. column = _ref7.column,
  24688. $index = _ref7.$index;
  24689. var property = column.property;
  24690. var value = property && Object(util_["getPropByPath"])(row, property).v;
  24691. if (column && column.formatter) {
  24692. return column.formatter(row, column, value, $index);
  24693. }
  24694. return value;
  24695. }
  24696. function treeCellPrefix(h, _ref8) {
  24697. var row = _ref8.row,
  24698. treeNode = _ref8.treeNode,
  24699. store = _ref8.store;
  24700. if (!treeNode) return null;
  24701. var ele = [];
  24702. var callback = function callback(e) {
  24703. e.stopPropagation();
  24704. store.loadOrToggle(row);
  24705. };
  24706. if (treeNode.indent) {
  24707. ele.push(h('span', { 'class': 'el-table__indent', style: { 'padding-left': treeNode.indent + 'px' } }));
  24708. }
  24709. if (typeof treeNode.expanded === 'boolean' && !treeNode.noLazyChildren) {
  24710. var expandClasses = ['el-table__expand-icon', treeNode.expanded ? 'el-table__expand-icon--expanded' : ''];
  24711. var iconClasses = ['el-icon-arrow-right'];
  24712. if (treeNode.loading) {
  24713. iconClasses = ['el-icon-loading'];
  24714. }
  24715. ele.push(h(
  24716. 'div',
  24717. { 'class': expandClasses,
  24718. on: {
  24719. 'click': callback
  24720. }
  24721. },
  24722. [h('i', { 'class': iconClasses })]
  24723. ));
  24724. } else {
  24725. ele.push(h('span', { 'class': 'el-table__placeholder' }));
  24726. }
  24727. return ele;
  24728. }
  24729. // CONCATENATED MODULE: ./packages/table/src/table-column.js
  24730. var table_column_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  24731. var columnIdSeed = 1;
  24732. /* harmony default export */ var table_column = ({
  24733. name: 'ElTableColumn',
  24734. props: {
  24735. type: {
  24736. type: String,
  24737. default: 'default'
  24738. },
  24739. label: String,
  24740. className: String,
  24741. labelClassName: String,
  24742. property: String,
  24743. prop: String,
  24744. width: {},
  24745. minWidth: {},
  24746. renderHeader: Function,
  24747. sortable: {
  24748. type: [Boolean, String],
  24749. default: false
  24750. },
  24751. sortMethod: Function,
  24752. sortBy: [String, Function, Array],
  24753. resizable: {
  24754. type: Boolean,
  24755. default: true
  24756. },
  24757. columnKey: String,
  24758. align: String,
  24759. headerAlign: String,
  24760. showTooltipWhenOverflow: Boolean,
  24761. showOverflowTooltip: Boolean,
  24762. fixed: [Boolean, String],
  24763. formatter: Function,
  24764. selectable: Function,
  24765. reserveSelection: Boolean,
  24766. filterMethod: Function,
  24767. filteredValue: Array,
  24768. filters: Array,
  24769. filterPlacement: String,
  24770. filterMultiple: {
  24771. type: Boolean,
  24772. default: true
  24773. },
  24774. index: [Number, Function],
  24775. sortOrders: {
  24776. type: Array,
  24777. default: function _default() {
  24778. return ['ascending', 'descending', null];
  24779. },
  24780. validator: function validator(val) {
  24781. return val.every(function (order) {
  24782. return ['ascending', 'descending', null].indexOf(order) > -1;
  24783. });
  24784. }
  24785. }
  24786. },
  24787. data: function data() {
  24788. return {
  24789. isSubColumn: false,
  24790. columns: []
  24791. };
  24792. },
  24793. computed: {
  24794. owner: function owner() {
  24795. var parent = this.$parent;
  24796. while (parent && !parent.tableId) {
  24797. parent = parent.$parent;
  24798. }
  24799. return parent;
  24800. },
  24801. columnOrTableParent: function columnOrTableParent() {
  24802. var parent = this.$parent;
  24803. while (parent && !parent.tableId && !parent.columnId) {
  24804. parent = parent.$parent;
  24805. }
  24806. return parent;
  24807. },
  24808. realWidth: function realWidth() {
  24809. return parseWidth(this.width);
  24810. },
  24811. realMinWidth: function realMinWidth() {
  24812. return parseMinWidth(this.minWidth);
  24813. },
  24814. realAlign: function realAlign() {
  24815. return this.align ? 'is-' + this.align : null;
  24816. },
  24817. realHeaderAlign: function realHeaderAlign() {
  24818. return this.headerAlign ? 'is-' + this.headerAlign : this.realAlign;
  24819. }
  24820. },
  24821. methods: {
  24822. getPropsData: function getPropsData() {
  24823. var _this = this;
  24824. for (var _len = arguments.length, props = Array(_len), _key = 0; _key < _len; _key++) {
  24825. props[_key] = arguments[_key];
  24826. }
  24827. return props.reduce(function (prev, cur) {
  24828. if (Array.isArray(cur)) {
  24829. cur.forEach(function (key) {
  24830. prev[key] = _this[key];
  24831. });
  24832. }
  24833. return prev;
  24834. }, {});
  24835. },
  24836. getColumnElIndex: function getColumnElIndex(children, child) {
  24837. return [].indexOf.call(children, child);
  24838. },
  24839. setColumnWidth: function setColumnWidth(column) {
  24840. if (this.realWidth) {
  24841. column.width = this.realWidth;
  24842. }
  24843. if (this.realMinWidth) {
  24844. column.minWidth = this.realMinWidth;
  24845. }
  24846. if (!column.minWidth) {
  24847. column.minWidth = 80;
  24848. }
  24849. column.realWidth = column.width === undefined ? column.minWidth : column.width;
  24850. return column;
  24851. },
  24852. setColumnForcedProps: function setColumnForcedProps(column) {
  24853. // 对于特定类型的 column,某些属性不允许设置
  24854. var type = column.type;
  24855. var source = cellForced[type] || {};
  24856. Object.keys(source).forEach(function (prop) {
  24857. var value = source[prop];
  24858. if (value !== undefined) {
  24859. column[prop] = prop === 'className' ? column[prop] + ' ' + value : value;
  24860. }
  24861. });
  24862. return column;
  24863. },
  24864. setColumnRenders: function setColumnRenders(column) {
  24865. var _this2 = this;
  24866. var h = this.$createElement;
  24867. // renderHeader 属性不推荐使用。
  24868. if (this.renderHeader) {
  24869. console.warn('[Element Warn][TableColumn]Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.');
  24870. } else if (column.type !== 'selection') {
  24871. column.renderHeader = function (h, scope) {
  24872. var renderHeader = _this2.$scopedSlots.header;
  24873. return renderHeader ? renderHeader(scope) : column.label;
  24874. };
  24875. }
  24876. var originRenderCell = column.renderCell;
  24877. // TODO: 这里的实现调整
  24878. if (column.type === 'expand') {
  24879. // 对于展开行,renderCell 不允许配置的。在上一步中已经设置过,这里需要简单封装一下。
  24880. column.renderCell = function (h, data) {
  24881. return h(
  24882. 'div',
  24883. { 'class': 'cell' },
  24884. [originRenderCell(h, data)]
  24885. );
  24886. };
  24887. this.owner.renderExpanded = function (h, data) {
  24888. return _this2.$scopedSlots.default ? _this2.$scopedSlots.default(data) : _this2.$slots.default;
  24889. };
  24890. } else {
  24891. originRenderCell = originRenderCell || defaultRenderCell;
  24892. // 对 renderCell 进行包装
  24893. column.renderCell = function (h, data) {
  24894. var children = null;
  24895. if (_this2.$scopedSlots.default) {
  24896. children = _this2.$scopedSlots.default(data);
  24897. } else {
  24898. children = originRenderCell(h, data);
  24899. }
  24900. var prefix = treeCellPrefix(h, data);
  24901. var props = {
  24902. class: 'cell',
  24903. style: {}
  24904. };
  24905. if (column.showOverflowTooltip) {
  24906. props.class += ' el-tooltip';
  24907. props.style = { width: (data.column.realWidth || data.column.width) - 1 + 'px' };
  24908. }
  24909. return h(
  24910. 'div',
  24911. props,
  24912. [prefix, children]
  24913. );
  24914. };
  24915. }
  24916. return column;
  24917. },
  24918. registerNormalWatchers: function registerNormalWatchers() {
  24919. var _this3 = this;
  24920. var props = ['label', 'property', 'filters', 'filterMultiple', 'sortable', 'index', 'formatter', 'className', 'labelClassName', 'showOverflowTooltip'];
  24921. // 一些属性具有别名
  24922. var aliases = {
  24923. prop: 'property',
  24924. realAlign: 'align',
  24925. realHeaderAlign: 'headerAlign',
  24926. realWidth: 'width'
  24927. };
  24928. var allAliases = props.reduce(function (prev, cur) {
  24929. prev[cur] = cur;
  24930. return prev;
  24931. }, aliases);
  24932. Object.keys(allAliases).forEach(function (key) {
  24933. var columnKey = aliases[key];
  24934. _this3.$watch(key, function (newVal) {
  24935. _this3.columnConfig[columnKey] = newVal;
  24936. });
  24937. });
  24938. },
  24939. registerComplexWatchers: function registerComplexWatchers() {
  24940. var _this4 = this;
  24941. var props = ['fixed'];
  24942. var aliases = {
  24943. realWidth: 'width',
  24944. realMinWidth: 'minWidth'
  24945. };
  24946. var allAliases = props.reduce(function (prev, cur) {
  24947. prev[cur] = cur;
  24948. return prev;
  24949. }, aliases);
  24950. Object.keys(allAliases).forEach(function (key) {
  24951. var columnKey = aliases[key];
  24952. _this4.$watch(key, function (newVal) {
  24953. _this4.columnConfig[columnKey] = newVal;
  24954. var updateColumns = columnKey === 'fixed';
  24955. _this4.owner.store.scheduleLayout(updateColumns);
  24956. });
  24957. });
  24958. }
  24959. },
  24960. components: {
  24961. ElCheckbox: checkbox_default.a
  24962. },
  24963. beforeCreate: function beforeCreate() {
  24964. this.row = {};
  24965. this.column = {};
  24966. this.$index = 0;
  24967. this.columnId = '';
  24968. },
  24969. created: function created() {
  24970. var parent = this.columnOrTableParent;
  24971. this.isSubColumn = this.owner !== parent;
  24972. this.columnId = (parent.tableId || parent.columnId) + '_column_' + columnIdSeed++;
  24973. var type = this.type || 'default';
  24974. var sortable = this.sortable === '' ? true : this.sortable;
  24975. var defaults = table_column_extends({}, cellStarts[type], {
  24976. id: this.columnId,
  24977. type: type,
  24978. property: this.prop || this.property,
  24979. align: this.realAlign,
  24980. headerAlign: this.realHeaderAlign,
  24981. showOverflowTooltip: this.showOverflowTooltip || this.showTooltipWhenOverflow,
  24982. // filter 相关属性
  24983. filterable: this.filters || this.filterMethod,
  24984. filteredValue: [],
  24985. filterPlacement: '',
  24986. isColumnGroup: false,
  24987. filterOpened: false,
  24988. // sort 相关属性
  24989. sortable: sortable,
  24990. // index 列
  24991. index: this.index
  24992. });
  24993. var basicProps = ['columnKey', 'label', 'className', 'labelClassName', 'type', 'renderHeader', 'formatter', 'fixed', 'resizable'];
  24994. var sortProps = ['sortMethod', 'sortBy', 'sortOrders'];
  24995. var selectProps = ['selectable', 'reserveSelection'];
  24996. var filterProps = ['filterMethod', 'filters', 'filterMultiple', 'filterOpened', 'filteredValue', 'filterPlacement'];
  24997. var column = this.getPropsData(basicProps, sortProps, selectProps, filterProps);
  24998. column = mergeOptions(defaults, column);
  24999. // 注意 compose 中函数执行的顺序是从右到左
  25000. var chains = compose(this.setColumnRenders, this.setColumnWidth, this.setColumnForcedProps);
  25001. column = chains(column);
  25002. this.columnConfig = column;
  25003. // 注册 watcher
  25004. this.registerNormalWatchers();
  25005. this.registerComplexWatchers();
  25006. },
  25007. mounted: function mounted() {
  25008. var owner = this.owner;
  25009. var parent = this.columnOrTableParent;
  25010. var children = this.isSubColumn ? parent.$el.children : parent.$refs.hiddenColumns.children;
  25011. var columnIndex = this.getColumnElIndex(children, this.$el);
  25012. owner.store.commit('insertColumn', this.columnConfig, columnIndex, this.isSubColumn ? parent.columnConfig : null);
  25013. },
  25014. destroyed: function destroyed() {
  25015. if (!this.$parent) return;
  25016. var parent = this.$parent;
  25017. this.owner.store.commit('removeColumn', this.columnConfig, this.isSubColumn ? parent.columnConfig : null);
  25018. },
  25019. render: function render(h) {
  25020. // slots 也要渲染,需要计算合并表头
  25021. return h('div', this.$slots.default);
  25022. }
  25023. });
  25024. // CONCATENATED MODULE: ./packages/table-column/index.js
  25025. /* istanbul ignore next */
  25026. table_column.install = function (Vue) {
  25027. Vue.component(table_column.name, table_column);
  25028. };
  25029. /* harmony default export */ var packages_table_column = (table_column);
  25030. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=79ae069f&
  25031. var pickervue_type_template_id_79ae069f_render = function() {
  25032. var _vm = this
  25033. var _h = _vm.$createElement
  25034. var _c = _vm._self._c || _h
  25035. return !_vm.ranged
  25036. ? _c(
  25037. "el-input",
  25038. _vm._b(
  25039. {
  25040. directives: [
  25041. {
  25042. name: "clickoutside",
  25043. rawName: "v-clickoutside",
  25044. value: _vm.handleClose,
  25045. expression: "handleClose"
  25046. }
  25047. ],
  25048. ref: "reference",
  25049. staticClass: "el-date-editor",
  25050. class: "el-date-editor--" + _vm.type,
  25051. attrs: {
  25052. readonly:
  25053. !_vm.editable ||
  25054. _vm.readonly ||
  25055. _vm.type === "dates" ||
  25056. _vm.type === "week",
  25057. disabled: _vm.pickerDisabled,
  25058. size: _vm.pickerSize,
  25059. name: _vm.name,
  25060. placeholder: _vm.placeholder,
  25061. value: _vm.displayValue,
  25062. validateEvent: false
  25063. },
  25064. on: {
  25065. focus: _vm.handleFocus,
  25066. input: function(value) {
  25067. return (_vm.userInput = value)
  25068. },
  25069. change: _vm.handleChange
  25070. },
  25071. nativeOn: {
  25072. keydown: function($event) {
  25073. return _vm.handleKeydown($event)
  25074. },
  25075. mouseenter: function($event) {
  25076. return _vm.handleMouseEnter($event)
  25077. },
  25078. mouseleave: function($event) {
  25079. _vm.showClose = false
  25080. }
  25081. }
  25082. },
  25083. "el-input",
  25084. _vm.firstInputId,
  25085. false
  25086. ),
  25087. [
  25088. _c("i", {
  25089. staticClass: "el-input__icon",
  25090. class: _vm.triggerClass,
  25091. attrs: { slot: "prefix" },
  25092. on: { click: _vm.handleFocus },
  25093. slot: "prefix"
  25094. }),
  25095. _vm.haveTrigger
  25096. ? _c("i", {
  25097. staticClass: "el-input__icon",
  25098. class: [_vm.showClose ? "" + _vm.clearIcon : ""],
  25099. attrs: { slot: "suffix" },
  25100. on: { click: _vm.handleClickIcon },
  25101. slot: "suffix"
  25102. })
  25103. : _vm._e()
  25104. ]
  25105. )
  25106. : _c(
  25107. "div",
  25108. {
  25109. directives: [
  25110. {
  25111. name: "clickoutside",
  25112. rawName: "v-clickoutside",
  25113. value: _vm.handleClose,
  25114. expression: "handleClose"
  25115. }
  25116. ],
  25117. ref: "reference",
  25118. staticClass: "el-date-editor el-range-editor el-input__inner",
  25119. class: [
  25120. "el-date-editor--" + _vm.type,
  25121. _vm.pickerSize ? "el-range-editor--" + _vm.pickerSize : "",
  25122. _vm.pickerDisabled ? "is-disabled" : "",
  25123. _vm.pickerVisible ? "is-active" : ""
  25124. ],
  25125. on: {
  25126. click: _vm.handleRangeClick,
  25127. mouseenter: _vm.handleMouseEnter,
  25128. mouseleave: function($event) {
  25129. _vm.showClose = false
  25130. },
  25131. keydown: _vm.handleKeydown
  25132. }
  25133. },
  25134. [
  25135. _c("i", {
  25136. class: ["el-input__icon", "el-range__icon", _vm.triggerClass]
  25137. }),
  25138. _c(
  25139. "input",
  25140. _vm._b(
  25141. {
  25142. staticClass: "el-range-input",
  25143. attrs: {
  25144. autocomplete: "off",
  25145. placeholder: _vm.startPlaceholder,
  25146. disabled: _vm.pickerDisabled,
  25147. readonly: !_vm.editable || _vm.readonly,
  25148. name: _vm.name && _vm.name[0]
  25149. },
  25150. domProps: { value: _vm.displayValue && _vm.displayValue[0] },
  25151. on: {
  25152. input: _vm.handleStartInput,
  25153. change: _vm.handleStartChange,
  25154. focus: _vm.handleFocus
  25155. }
  25156. },
  25157. "input",
  25158. _vm.firstInputId,
  25159. false
  25160. )
  25161. ),
  25162. _vm._t("range-separator", [
  25163. _c("span", { staticClass: "el-range-separator" }, [
  25164. _vm._v(_vm._s(_vm.rangeSeparator))
  25165. ])
  25166. ]),
  25167. _c(
  25168. "input",
  25169. _vm._b(
  25170. {
  25171. staticClass: "el-range-input",
  25172. attrs: {
  25173. autocomplete: "off",
  25174. placeholder: _vm.endPlaceholder,
  25175. disabled: _vm.pickerDisabled,
  25176. readonly: !_vm.editable || _vm.readonly,
  25177. name: _vm.name && _vm.name[1]
  25178. },
  25179. domProps: { value: _vm.displayValue && _vm.displayValue[1] },
  25180. on: {
  25181. input: _vm.handleEndInput,
  25182. change: _vm.handleEndChange,
  25183. focus: _vm.handleFocus
  25184. }
  25185. },
  25186. "input",
  25187. _vm.secondInputId,
  25188. false
  25189. )
  25190. ),
  25191. _vm.haveTrigger
  25192. ? _c("i", {
  25193. staticClass: "el-input__icon el-range__close-icon",
  25194. class: [_vm.showClose ? "" + _vm.clearIcon : ""],
  25195. on: { click: _vm.handleClickIcon }
  25196. })
  25197. : _vm._e()
  25198. ],
  25199. 2
  25200. )
  25201. }
  25202. var pickervue_type_template_id_79ae069f_staticRenderFns = []
  25203. pickervue_type_template_id_79ae069f_render._withStripped = true
  25204. // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=79ae069f&
  25205. // EXTERNAL MODULE: external "element-ui/lib/utils/date-util"
  25206. var date_util_ = __webpack_require__(0);
  25207. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=script&lang=js&
  25208. //
  25209. //
  25210. //
  25211. //
  25212. //
  25213. //
  25214. //
  25215. //
  25216. //
  25217. //
  25218. //
  25219. //
  25220. //
  25221. //
  25222. //
  25223. //
  25224. //
  25225. //
  25226. //
  25227. //
  25228. //
  25229. //
  25230. //
  25231. //
  25232. //
  25233. //
  25234. //
  25235. //
  25236. //
  25237. //
  25238. //
  25239. //
  25240. //
  25241. //
  25242. //
  25243. //
  25244. //
  25245. //
  25246. //
  25247. //
  25248. //
  25249. //
  25250. //
  25251. //
  25252. //
  25253. //
  25254. //
  25255. //
  25256. //
  25257. //
  25258. //
  25259. //
  25260. //
  25261. //
  25262. //
  25263. //
  25264. //
  25265. //
  25266. //
  25267. //
  25268. //
  25269. //
  25270. //
  25271. //
  25272. //
  25273. //
  25274. //
  25275. //
  25276. //
  25277. //
  25278. //
  25279. //
  25280. //
  25281. //
  25282. //
  25283. //
  25284. //
  25285. //
  25286. //
  25287. //
  25288. //
  25289. //
  25290. //
  25291. //
  25292. //
  25293. var NewPopper = {
  25294. props: {
  25295. appendToBody: vue_popper_default.a.props.appendToBody,
  25296. offset: vue_popper_default.a.props.offset,
  25297. boundariesPadding: vue_popper_default.a.props.boundariesPadding,
  25298. arrowOffset: vue_popper_default.a.props.arrowOffset
  25299. },
  25300. methods: vue_popper_default.a.methods,
  25301. data: function data() {
  25302. return merge_default()({ visibleArrow: true }, vue_popper_default.a.data);
  25303. },
  25304. beforeDestroy: vue_popper_default.a.beforeDestroy
  25305. };
  25306. var DEFAULT_FORMATS = {
  25307. date: 'yyyy-MM-dd',
  25308. month: 'yyyy-MM',
  25309. datetime: 'yyyy-MM-dd HH:mm:ss',
  25310. time: 'HH:mm:ss',
  25311. week: 'yyyywWW',
  25312. timerange: 'HH:mm:ss',
  25313. daterange: 'yyyy-MM-dd',
  25314. monthrange: 'yyyy-MM',
  25315. datetimerange: 'yyyy-MM-dd HH:mm:ss',
  25316. year: 'yyyy'
  25317. };
  25318. var HAVE_TRIGGER_TYPES = ['date', 'datetime', 'time', 'time-select', 'week', 'month', 'year', 'daterange', 'monthrange', 'timerange', 'datetimerange', 'dates'];
  25319. var pickervue_type_script_lang_js_DATE_FORMATTER = function DATE_FORMATTER(value, format) {
  25320. if (format === 'timestamp') return value.getTime();
  25321. return Object(date_util_["formatDate"])(value, format);
  25322. };
  25323. var pickervue_type_script_lang_js_DATE_PARSER = function DATE_PARSER(text, format) {
  25324. if (format === 'timestamp') return new Date(Number(text));
  25325. return Object(date_util_["parseDate"])(text, format);
  25326. };
  25327. var RANGE_FORMATTER = function RANGE_FORMATTER(value, format) {
  25328. if (Array.isArray(value) && value.length === 2) {
  25329. var start = value[0];
  25330. var end = value[1];
  25331. if (start && end) {
  25332. return [pickervue_type_script_lang_js_DATE_FORMATTER(start, format), pickervue_type_script_lang_js_DATE_FORMATTER(end, format)];
  25333. }
  25334. }
  25335. return '';
  25336. };
  25337. var RANGE_PARSER = function RANGE_PARSER(array, format, separator) {
  25338. if (!Array.isArray(array)) {
  25339. array = array.split(separator);
  25340. }
  25341. if (array.length === 2) {
  25342. var range1 = array[0];
  25343. var range2 = array[1];
  25344. return [pickervue_type_script_lang_js_DATE_PARSER(range1, format), pickervue_type_script_lang_js_DATE_PARSER(range2, format)];
  25345. }
  25346. return [];
  25347. };
  25348. var TYPE_VALUE_RESOLVER_MAP = {
  25349. default: {
  25350. formatter: function formatter(value) {
  25351. if (!value) return '';
  25352. return '' + value;
  25353. },
  25354. parser: function parser(text) {
  25355. if (text === undefined || text === '') return null;
  25356. return text;
  25357. }
  25358. },
  25359. week: {
  25360. formatter: function formatter(value, format) {
  25361. var week = Object(date_util_["getWeekNumber"])(value);
  25362. var month = value.getMonth();
  25363. var trueDate = new Date(value);
  25364. if (week === 1 && month === 11) {
  25365. trueDate.setHours(0, 0, 0, 0);
  25366. trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
  25367. }
  25368. var date = Object(date_util_["formatDate"])(trueDate, format);
  25369. date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? '0' + week : week) : date.replace(/W/, week);
  25370. return date;
  25371. },
  25372. parser: function parser(text, format) {
  25373. // parse as if a normal date
  25374. return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
  25375. }
  25376. },
  25377. date: {
  25378. formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
  25379. parser: pickervue_type_script_lang_js_DATE_PARSER
  25380. },
  25381. datetime: {
  25382. formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
  25383. parser: pickervue_type_script_lang_js_DATE_PARSER
  25384. },
  25385. daterange: {
  25386. formatter: RANGE_FORMATTER,
  25387. parser: RANGE_PARSER
  25388. },
  25389. monthrange: {
  25390. formatter: RANGE_FORMATTER,
  25391. parser: RANGE_PARSER
  25392. },
  25393. datetimerange: {
  25394. formatter: RANGE_FORMATTER,
  25395. parser: RANGE_PARSER
  25396. },
  25397. timerange: {
  25398. formatter: RANGE_FORMATTER,
  25399. parser: RANGE_PARSER
  25400. },
  25401. time: {
  25402. formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
  25403. parser: pickervue_type_script_lang_js_DATE_PARSER
  25404. },
  25405. month: {
  25406. formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
  25407. parser: pickervue_type_script_lang_js_DATE_PARSER
  25408. },
  25409. year: {
  25410. formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
  25411. parser: pickervue_type_script_lang_js_DATE_PARSER
  25412. },
  25413. number: {
  25414. formatter: function formatter(value) {
  25415. if (!value) return '';
  25416. return '' + value;
  25417. },
  25418. parser: function parser(text) {
  25419. var result = Number(text);
  25420. if (!isNaN(text)) {
  25421. return result;
  25422. } else {
  25423. return null;
  25424. }
  25425. }
  25426. },
  25427. dates: {
  25428. formatter: function formatter(value, format) {
  25429. return value.map(function (date) {
  25430. return pickervue_type_script_lang_js_DATE_FORMATTER(date, format);
  25431. });
  25432. },
  25433. parser: function parser(value, format) {
  25434. return (typeof value === 'string' ? value.split(', ') : value).map(function (date) {
  25435. return date instanceof Date ? date : pickervue_type_script_lang_js_DATE_PARSER(date, format);
  25436. });
  25437. }
  25438. }
  25439. };
  25440. var PLACEMENT_MAP = {
  25441. left: 'bottom-start',
  25442. center: 'bottom',
  25443. right: 'bottom-end'
  25444. };
  25445. var parseAsFormatAndType = function parseAsFormatAndType(value, customFormat, type) {
  25446. var rangeSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '-';
  25447. if (!value) return null;
  25448. var parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).parser;
  25449. var format = customFormat || DEFAULT_FORMATS[type];
  25450. return parser(value, format, rangeSeparator);
  25451. };
  25452. var formatAsFormatAndType = function formatAsFormatAndType(value, customFormat, type) {
  25453. if (!value) return null;
  25454. var formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).formatter;
  25455. var format = customFormat || DEFAULT_FORMATS[type];
  25456. return formatter(value, format);
  25457. };
  25458. /*
  25459. * Considers:
  25460. * 1. Date object
  25461. * 2. date string
  25462. * 3. array of 1 or 2
  25463. */
  25464. var valueEquals = function valueEquals(a, b) {
  25465. // considers Date object and string
  25466. var dateEquals = function dateEquals(a, b) {
  25467. var aIsDate = a instanceof Date;
  25468. var bIsDate = b instanceof Date;
  25469. if (aIsDate && bIsDate) {
  25470. return a.getTime() === b.getTime();
  25471. }
  25472. if (!aIsDate && !bIsDate) {
  25473. return a === b;
  25474. }
  25475. return false;
  25476. };
  25477. var aIsArray = a instanceof Array;
  25478. var bIsArray = b instanceof Array;
  25479. if (aIsArray && bIsArray) {
  25480. if (a.length !== b.length) {
  25481. return false;
  25482. }
  25483. return a.every(function (item, index) {
  25484. return dateEquals(item, b[index]);
  25485. });
  25486. }
  25487. if (!aIsArray && !bIsArray) {
  25488. return dateEquals(a, b);
  25489. }
  25490. return false;
  25491. };
  25492. var isString = function isString(val) {
  25493. return typeof val === 'string' || val instanceof String;
  25494. };
  25495. var pickervue_type_script_lang_js_validator = function validator(val) {
  25496. // either: String, Array of String, null / undefined
  25497. return val === null || val === undefined || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
  25498. };
  25499. /* harmony default export */ var pickervue_type_script_lang_js_ = ({
  25500. mixins: [emitter_default.a, NewPopper],
  25501. inject: {
  25502. elForm: {
  25503. default: ''
  25504. },
  25505. elFormItem: {
  25506. default: ''
  25507. }
  25508. },
  25509. props: {
  25510. size: String,
  25511. format: String,
  25512. valueFormat: String,
  25513. readonly: Boolean,
  25514. placeholder: String,
  25515. startPlaceholder: String,
  25516. endPlaceholder: String,
  25517. prefixIcon: String,
  25518. clearIcon: {
  25519. type: String,
  25520. default: 'el-icon-circle-close'
  25521. },
  25522. name: {
  25523. default: '',
  25524. validator: pickervue_type_script_lang_js_validator
  25525. },
  25526. disabled: Boolean,
  25527. clearable: {
  25528. type: Boolean,
  25529. default: true
  25530. },
  25531. id: {
  25532. default: '',
  25533. validator: pickervue_type_script_lang_js_validator
  25534. },
  25535. popperClass: String,
  25536. editable: {
  25537. type: Boolean,
  25538. default: true
  25539. },
  25540. align: {
  25541. type: String,
  25542. default: 'left'
  25543. },
  25544. value: {},
  25545. defaultValue: {},
  25546. defaultTime: {},
  25547. rangeSeparator: {
  25548. default: '-'
  25549. },
  25550. pickerOptions: {},
  25551. unlinkPanels: Boolean,
  25552. validateEvent: {
  25553. type: Boolean,
  25554. default: true
  25555. }
  25556. },
  25557. components: { ElInput: input_default.a },
  25558. directives: { Clickoutside: clickoutside_default.a },
  25559. data: function data() {
  25560. return {
  25561. pickerVisible: false,
  25562. showClose: false,
  25563. userInput: null,
  25564. valueOnOpen: null, // value when picker opens, used to determine whether to emit change
  25565. unwatchPickerOptions: null
  25566. };
  25567. },
  25568. watch: {
  25569. pickerVisible: function pickerVisible(val) {
  25570. if (this.readonly || this.pickerDisabled) return;
  25571. if (val) {
  25572. this.showPicker();
  25573. this.valueOnOpen = Array.isArray(this.value) ? [].concat(this.value) : this.value;
  25574. } else {
  25575. this.hidePicker();
  25576. this.emitChange(this.value);
  25577. this.userInput = null;
  25578. if (this.validateEvent) {
  25579. this.dispatch('ElFormItem', 'el.form.blur');
  25580. }
  25581. this.$emit('blur', this);
  25582. this.blur();
  25583. }
  25584. },
  25585. parsedValue: {
  25586. immediate: true,
  25587. handler: function handler(val) {
  25588. if (this.picker) {
  25589. this.picker.value = val;
  25590. }
  25591. }
  25592. },
  25593. defaultValue: function defaultValue(val) {
  25594. // NOTE: should eventually move to jsx style picker + panel ?
  25595. if (this.picker) {
  25596. this.picker.defaultValue = val;
  25597. }
  25598. },
  25599. value: function value(val, oldVal) {
  25600. if (!valueEquals(val, oldVal) && !this.pickerVisible && this.validateEvent) {
  25601. this.dispatch('ElFormItem', 'el.form.change', val);
  25602. }
  25603. }
  25604. },
  25605. computed: {
  25606. ranged: function ranged() {
  25607. return this.type.indexOf('range') > -1;
  25608. },
  25609. reference: function reference() {
  25610. var reference = this.$refs.reference;
  25611. return reference.$el || reference;
  25612. },
  25613. refInput: function refInput() {
  25614. if (this.reference) {
  25615. return [].slice.call(this.reference.querySelectorAll('input'));
  25616. }
  25617. return [];
  25618. },
  25619. valueIsEmpty: function valueIsEmpty() {
  25620. var val = this.value;
  25621. if (Array.isArray(val)) {
  25622. for (var i = 0, len = val.length; i < len; i++) {
  25623. if (val[i]) {
  25624. return false;
  25625. }
  25626. }
  25627. } else {
  25628. if (val) {
  25629. return false;
  25630. }
  25631. }
  25632. return true;
  25633. },
  25634. triggerClass: function triggerClass() {
  25635. return this.prefixIcon || (this.type.indexOf('time') !== -1 ? 'el-icon-time' : 'el-icon-date');
  25636. },
  25637. selectionMode: function selectionMode() {
  25638. if (this.type === 'week') {
  25639. return 'week';
  25640. } else if (this.type === 'month') {
  25641. return 'month';
  25642. } else if (this.type === 'year') {
  25643. return 'year';
  25644. } else if (this.type === 'dates') {
  25645. return 'dates';
  25646. }
  25647. return 'day';
  25648. },
  25649. haveTrigger: function haveTrigger() {
  25650. if (typeof this.showTrigger !== 'undefined') {
  25651. return this.showTrigger;
  25652. }
  25653. return HAVE_TRIGGER_TYPES.indexOf(this.type) !== -1;
  25654. },
  25655. displayValue: function displayValue() {
  25656. var formattedValue = formatAsFormatAndType(this.parsedValue, this.format, this.type, this.rangeSeparator);
  25657. if (Array.isArray(this.userInput)) {
  25658. return [this.userInput[0] || formattedValue && formattedValue[0] || '', this.userInput[1] || formattedValue && formattedValue[1] || ''];
  25659. } else if (this.userInput !== null) {
  25660. return this.userInput;
  25661. } else if (formattedValue) {
  25662. return this.type === 'dates' ? formattedValue.join(', ') : formattedValue;
  25663. } else {
  25664. return '';
  25665. }
  25666. },
  25667. parsedValue: function parsedValue() {
  25668. if (!this.value) return this.value; // component value is not set
  25669. if (this.type === 'time-select') return this.value; // time-select does not require parsing, this might change in next major version
  25670. var valueIsDateObject = Object(date_util_["isDateObject"])(this.value) || Array.isArray(this.value) && this.value.every(date_util_["isDateObject"]);
  25671. if (valueIsDateObject) {
  25672. return this.value;
  25673. }
  25674. if (this.valueFormat) {
  25675. return parseAsFormatAndType(this.value, this.valueFormat, this.type, this.rangeSeparator) || this.value;
  25676. }
  25677. // NOTE: deal with common but incorrect usage, should remove in next major version
  25678. // user might provide string / timestamp without value-format, coerce them into date (or array of date)
  25679. return Array.isArray(this.value) ? this.value.map(function (val) {
  25680. return new Date(val);
  25681. }) : new Date(this.value);
  25682. },
  25683. _elFormItemSize: function _elFormItemSize() {
  25684. return (this.elFormItem || {}).elFormItemSize;
  25685. },
  25686. pickerSize: function pickerSize() {
  25687. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  25688. },
  25689. pickerDisabled: function pickerDisabled() {
  25690. return this.disabled || (this.elForm || {}).disabled;
  25691. },
  25692. firstInputId: function firstInputId() {
  25693. var obj = {};
  25694. var id = void 0;
  25695. if (this.ranged) {
  25696. id = this.id && this.id[0];
  25697. } else {
  25698. id = this.id;
  25699. }
  25700. if (id) obj.id = id;
  25701. return obj;
  25702. },
  25703. secondInputId: function secondInputId() {
  25704. var obj = {};
  25705. var id = void 0;
  25706. if (this.ranged) {
  25707. id = this.id && this.id[1];
  25708. }
  25709. if (id) obj.id = id;
  25710. return obj;
  25711. }
  25712. },
  25713. created: function created() {
  25714. // vue-popper
  25715. this.popperOptions = {
  25716. boundariesPadding: 0,
  25717. gpuAcceleration: false
  25718. };
  25719. this.placement = PLACEMENT_MAP[this.align] || PLACEMENT_MAP.left;
  25720. this.$on('fieldReset', this.handleFieldReset);
  25721. },
  25722. methods: {
  25723. focus: function focus() {
  25724. if (!this.ranged) {
  25725. this.$refs.reference.focus();
  25726. } else {
  25727. this.handleFocus();
  25728. }
  25729. },
  25730. blur: function blur() {
  25731. this.refInput.forEach(function (input) {
  25732. return input.blur();
  25733. });
  25734. },
  25735. // {parse, formatTo} Value deals maps component value with internal Date
  25736. parseValue: function parseValue(value) {
  25737. var isParsed = Object(date_util_["isDateObject"])(value) || Array.isArray(value) && value.every(date_util_["isDateObject"]);
  25738. if (this.valueFormat && !isParsed) {
  25739. return parseAsFormatAndType(value, this.valueFormat, this.type, this.rangeSeparator) || value;
  25740. } else {
  25741. return value;
  25742. }
  25743. },
  25744. formatToValue: function formatToValue(date) {
  25745. var isFormattable = Object(date_util_["isDateObject"])(date) || Array.isArray(date) && date.every(date_util_["isDateObject"]);
  25746. if (this.valueFormat && isFormattable) {
  25747. return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
  25748. } else {
  25749. return date;
  25750. }
  25751. },
  25752. // {parse, formatTo} String deals with user input
  25753. parseString: function parseString(value) {
  25754. var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
  25755. return parseAsFormatAndType(value, this.format, type);
  25756. },
  25757. formatToString: function formatToString(value) {
  25758. var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
  25759. return formatAsFormatAndType(value, this.format, type);
  25760. },
  25761. handleMouseEnter: function handleMouseEnter() {
  25762. if (this.readonly || this.pickerDisabled) return;
  25763. if (!this.valueIsEmpty && this.clearable) {
  25764. this.showClose = true;
  25765. }
  25766. },
  25767. handleChange: function handleChange() {
  25768. if (this.userInput) {
  25769. var value = this.parseString(this.displayValue);
  25770. if (value) {
  25771. this.picker.value = value;
  25772. if (this.isValidValue(value)) {
  25773. this.emitInput(value);
  25774. this.userInput = null;
  25775. }
  25776. }
  25777. }
  25778. if (this.userInput === '') {
  25779. this.emitInput(null);
  25780. this.emitChange(null);
  25781. this.userInput = null;
  25782. }
  25783. },
  25784. handleStartInput: function handleStartInput(event) {
  25785. if (this.userInput) {
  25786. this.userInput = [event.target.value, this.userInput[1]];
  25787. } else {
  25788. this.userInput = [event.target.value, null];
  25789. }
  25790. },
  25791. handleEndInput: function handleEndInput(event) {
  25792. if (this.userInput) {
  25793. this.userInput = [this.userInput[0], event.target.value];
  25794. } else {
  25795. this.userInput = [null, event.target.value];
  25796. }
  25797. },
  25798. handleStartChange: function handleStartChange(event) {
  25799. var value = this.parseString(this.userInput && this.userInput[0]);
  25800. if (value) {
  25801. this.userInput = [this.formatToString(value), this.displayValue[1]];
  25802. var newValue = [value, this.picker.value && this.picker.value[1]];
  25803. this.picker.value = newValue;
  25804. if (this.isValidValue(newValue)) {
  25805. this.emitInput(newValue);
  25806. this.userInput = null;
  25807. }
  25808. }
  25809. },
  25810. handleEndChange: function handleEndChange(event) {
  25811. var value = this.parseString(this.userInput && this.userInput[1]);
  25812. if (value) {
  25813. this.userInput = [this.displayValue[0], this.formatToString(value)];
  25814. var newValue = [this.picker.value && this.picker.value[0], value];
  25815. this.picker.value = newValue;
  25816. if (this.isValidValue(newValue)) {
  25817. this.emitInput(newValue);
  25818. this.userInput = null;
  25819. }
  25820. }
  25821. },
  25822. handleClickIcon: function handleClickIcon(event) {
  25823. if (this.readonly || this.pickerDisabled) return;
  25824. if (this.showClose) {
  25825. this.valueOnOpen = this.value;
  25826. event.stopPropagation();
  25827. this.emitInput(null);
  25828. this.emitChange(null);
  25829. this.showClose = false;
  25830. if (this.picker && typeof this.picker.handleClear === 'function') {
  25831. this.picker.handleClear();
  25832. }
  25833. } else {
  25834. this.pickerVisible = !this.pickerVisible;
  25835. }
  25836. },
  25837. handleClose: function handleClose() {
  25838. if (!this.pickerVisible) return;
  25839. this.pickerVisible = false;
  25840. if (this.type === 'dates') {
  25841. // restore to former value
  25842. var oldValue = parseAsFormatAndType(this.valueOnOpen, this.valueFormat, this.type, this.rangeSeparator) || this.valueOnOpen;
  25843. this.emitInput(oldValue);
  25844. }
  25845. },
  25846. handleFieldReset: function handleFieldReset(initialValue) {
  25847. this.userInput = initialValue === '' ? null : initialValue;
  25848. },
  25849. handleFocus: function handleFocus() {
  25850. var type = this.type;
  25851. if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
  25852. this.pickerVisible = true;
  25853. }
  25854. this.$emit('focus', this);
  25855. },
  25856. handleKeydown: function handleKeydown(event) {
  25857. var _this = this;
  25858. var keyCode = event.keyCode;
  25859. // ESC
  25860. if (keyCode === 27) {
  25861. this.pickerVisible = false;
  25862. event.stopPropagation();
  25863. return;
  25864. }
  25865. // Tab
  25866. if (keyCode === 9) {
  25867. if (!this.ranged) {
  25868. this.handleChange();
  25869. this.pickerVisible = this.picker.visible = false;
  25870. this.blur();
  25871. event.stopPropagation();
  25872. } else {
  25873. // user may change focus between two input
  25874. setTimeout(function () {
  25875. if (_this.refInput.indexOf(document.activeElement) === -1) {
  25876. _this.pickerVisible = false;
  25877. _this.blur();
  25878. event.stopPropagation();
  25879. }
  25880. }, 0);
  25881. }
  25882. return;
  25883. }
  25884. // Enter
  25885. if (keyCode === 13) {
  25886. if (this.userInput === '' || this.isValidValue(this.parseString(this.displayValue))) {
  25887. this.handleChange();
  25888. this.pickerVisible = this.picker.visible = false;
  25889. this.blur();
  25890. }
  25891. event.stopPropagation();
  25892. return;
  25893. }
  25894. // if user is typing, do not let picker handle key input
  25895. if (this.userInput) {
  25896. event.stopPropagation();
  25897. return;
  25898. }
  25899. // delegate other keys to panel
  25900. if (this.picker && this.picker.handleKeydown) {
  25901. this.picker.handleKeydown(event);
  25902. }
  25903. },
  25904. handleRangeClick: function handleRangeClick() {
  25905. var type = this.type;
  25906. if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
  25907. this.pickerVisible = true;
  25908. }
  25909. this.$emit('focus', this);
  25910. },
  25911. hidePicker: function hidePicker() {
  25912. if (this.picker) {
  25913. this.picker.resetView && this.picker.resetView();
  25914. this.pickerVisible = this.picker.visible = false;
  25915. this.destroyPopper();
  25916. }
  25917. },
  25918. showPicker: function showPicker() {
  25919. var _this2 = this;
  25920. if (this.$isServer) return;
  25921. if (!this.picker) {
  25922. this.mountPicker();
  25923. }
  25924. this.pickerVisible = this.picker.visible = true;
  25925. this.updatePopper();
  25926. this.picker.value = this.parsedValue;
  25927. this.picker.resetView && this.picker.resetView();
  25928. this.$nextTick(function () {
  25929. _this2.picker.adjustSpinners && _this2.picker.adjustSpinners();
  25930. });
  25931. },
  25932. mountPicker: function mountPicker() {
  25933. var _this3 = this;
  25934. this.picker = new external_vue_default.a(this.panel).$mount();
  25935. this.picker.defaultValue = this.defaultValue;
  25936. this.picker.defaultTime = this.defaultTime;
  25937. this.picker.popperClass = this.popperClass;
  25938. this.popperElm = this.picker.$el;
  25939. this.picker.width = this.reference.getBoundingClientRect().width;
  25940. this.picker.showTime = this.type === 'datetime' || this.type === 'datetimerange';
  25941. this.picker.selectionMode = this.selectionMode;
  25942. this.picker.unlinkPanels = this.unlinkPanels;
  25943. this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
  25944. this.$watch('format', function (format) {
  25945. _this3.picker.format = format;
  25946. });
  25947. var updateOptions = function updateOptions() {
  25948. var options = _this3.pickerOptions;
  25949. if (options && options.selectableRange) {
  25950. var ranges = options.selectableRange;
  25951. var parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
  25952. var format = DEFAULT_FORMATS.timerange;
  25953. ranges = Array.isArray(ranges) ? ranges : [ranges];
  25954. _this3.picker.selectableRange = ranges.map(function (range) {
  25955. return parser(range, format, _this3.rangeSeparator);
  25956. });
  25957. }
  25958. for (var option in options) {
  25959. if (options.hasOwnProperty(option) &&
  25960. // 忽略 time-picker 的该配置项
  25961. option !== 'selectableRange') {
  25962. _this3.picker[option] = options[option];
  25963. }
  25964. }
  25965. // main format must prevail over undocumented pickerOptions.format
  25966. if (_this3.format) {
  25967. _this3.picker.format = _this3.format;
  25968. }
  25969. };
  25970. updateOptions();
  25971. this.unwatchPickerOptions = this.$watch('pickerOptions', function () {
  25972. return updateOptions();
  25973. }, { deep: true });
  25974. this.$el.appendChild(this.picker.$el);
  25975. this.picker.resetView && this.picker.resetView();
  25976. this.picker.$on('dodestroy', this.doDestroy);
  25977. this.picker.$on('pick', function () {
  25978. var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  25979. var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  25980. _this3.userInput = null;
  25981. _this3.pickerVisible = _this3.picker.visible = visible;
  25982. _this3.emitInput(date);
  25983. _this3.picker.resetView && _this3.picker.resetView();
  25984. });
  25985. this.picker.$on('select-range', function (start, end, pos) {
  25986. if (_this3.refInput.length === 0) return;
  25987. if (!pos || pos === 'min') {
  25988. _this3.refInput[0].setSelectionRange(start, end);
  25989. _this3.refInput[0].focus();
  25990. } else if (pos === 'max') {
  25991. _this3.refInput[1].setSelectionRange(start, end);
  25992. _this3.refInput[1].focus();
  25993. }
  25994. });
  25995. },
  25996. unmountPicker: function unmountPicker() {
  25997. if (this.picker) {
  25998. this.picker.$destroy();
  25999. this.picker.$off();
  26000. if (typeof this.unwatchPickerOptions === 'function') {
  26001. this.unwatchPickerOptions();
  26002. }
  26003. this.picker.$el.parentNode.removeChild(this.picker.$el);
  26004. }
  26005. },
  26006. emitChange: function emitChange(val) {
  26007. // determine user real change only
  26008. if (!valueEquals(val, this.valueOnOpen)) {
  26009. this.$emit('change', val);
  26010. this.valueOnOpen = val;
  26011. if (this.validateEvent) {
  26012. this.dispatch('ElFormItem', 'el.form.change', val);
  26013. }
  26014. }
  26015. },
  26016. emitInput: function emitInput(val) {
  26017. var formatted = this.formatToValue(val);
  26018. if (!valueEquals(this.value, formatted)) {
  26019. this.$emit('input', formatted);
  26020. }
  26021. },
  26022. isValidValue: function isValidValue(value) {
  26023. if (!this.picker) {
  26024. this.mountPicker();
  26025. }
  26026. if (this.picker.isValidValue) {
  26027. return value && this.picker.isValidValue(value);
  26028. } else {
  26029. return true;
  26030. }
  26031. }
  26032. }
  26033. });
  26034. // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=script&lang=js&
  26035. /* harmony default export */ var src_pickervue_type_script_lang_js_ = (pickervue_type_script_lang_js_);
  26036. // CONCATENATED MODULE: ./packages/date-picker/src/picker.vue
  26037. /* normalize component */
  26038. var picker_component = normalizeComponent(
  26039. src_pickervue_type_script_lang_js_,
  26040. pickervue_type_template_id_79ae069f_render,
  26041. pickervue_type_template_id_79ae069f_staticRenderFns,
  26042. false,
  26043. null,
  26044. null,
  26045. null
  26046. )
  26047. /* hot reload */
  26048. if (false) { var picker_api; }
  26049. picker_component.options.__file = "packages/date-picker/src/picker.vue"
  26050. /* harmony default export */ var picker = (picker_component.exports);
  26051. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date.vue?vue&type=template&id=2440d4ea&
  26052. var datevue_type_template_id_2440d4ea_render = function() {
  26053. var _vm = this
  26054. var _h = _vm.$createElement
  26055. var _c = _vm._self._c || _h
  26056. return _c(
  26057. "transition",
  26058. {
  26059. attrs: { name: "el-zoom-in-top" },
  26060. on: { "after-enter": _vm.handleEnter, "after-leave": _vm.handleLeave }
  26061. },
  26062. [
  26063. _c(
  26064. "div",
  26065. {
  26066. directives: [
  26067. {
  26068. name: "show",
  26069. rawName: "v-show",
  26070. value: _vm.visible,
  26071. expression: "visible"
  26072. }
  26073. ],
  26074. staticClass: "el-picker-panel el-date-picker el-popper",
  26075. class: [
  26076. {
  26077. "has-sidebar": _vm.$slots.sidebar || _vm.shortcuts,
  26078. "has-time": _vm.showTime
  26079. },
  26080. _vm.popperClass
  26081. ]
  26082. },
  26083. [
  26084. _c(
  26085. "div",
  26086. { staticClass: "el-picker-panel__body-wrapper" },
  26087. [
  26088. _vm._t("sidebar"),
  26089. _vm.shortcuts
  26090. ? _c(
  26091. "div",
  26092. { staticClass: "el-picker-panel__sidebar" },
  26093. _vm._l(_vm.shortcuts, function(shortcut, key) {
  26094. return _c(
  26095. "button",
  26096. {
  26097. key: key,
  26098. staticClass: "el-picker-panel__shortcut",
  26099. attrs: { type: "button" },
  26100. on: {
  26101. click: function($event) {
  26102. _vm.handleShortcutClick(shortcut)
  26103. }
  26104. }
  26105. },
  26106. [_vm._v(_vm._s(shortcut.text))]
  26107. )
  26108. }),
  26109. 0
  26110. )
  26111. : _vm._e(),
  26112. _c("div", { staticClass: "el-picker-panel__body" }, [
  26113. _vm.showTime
  26114. ? _c("div", { staticClass: "el-date-picker__time-header" }, [
  26115. _c(
  26116. "span",
  26117. { staticClass: "el-date-picker__editor-wrap" },
  26118. [
  26119. _c("el-input", {
  26120. attrs: {
  26121. placeholder: _vm.t("el.datepicker.selectDate"),
  26122. value: _vm.visibleDate,
  26123. size: "small"
  26124. },
  26125. on: {
  26126. input: function(val) {
  26127. return (_vm.userInputDate = val)
  26128. },
  26129. change: _vm.handleVisibleDateChange
  26130. }
  26131. })
  26132. ],
  26133. 1
  26134. ),
  26135. _c(
  26136. "span",
  26137. {
  26138. directives: [
  26139. {
  26140. name: "clickoutside",
  26141. rawName: "v-clickoutside",
  26142. value: _vm.handleTimePickClose,
  26143. expression: "handleTimePickClose"
  26144. }
  26145. ],
  26146. staticClass: "el-date-picker__editor-wrap"
  26147. },
  26148. [
  26149. _c("el-input", {
  26150. ref: "input",
  26151. attrs: {
  26152. placeholder: _vm.t("el.datepicker.selectTime"),
  26153. value: _vm.visibleTime,
  26154. size: "small"
  26155. },
  26156. on: {
  26157. focus: function($event) {
  26158. _vm.timePickerVisible = true
  26159. },
  26160. input: function(val) {
  26161. return (_vm.userInputTime = val)
  26162. },
  26163. change: _vm.handleVisibleTimeChange
  26164. }
  26165. }),
  26166. _c("time-picker", {
  26167. ref: "timepicker",
  26168. attrs: {
  26169. "time-arrow-control": _vm.arrowControl,
  26170. visible: _vm.timePickerVisible
  26171. },
  26172. on: {
  26173. pick: _vm.handleTimePick,
  26174. mounted: _vm.proxyTimePickerDataProperties
  26175. }
  26176. })
  26177. ],
  26178. 1
  26179. )
  26180. ])
  26181. : _vm._e(),
  26182. _c(
  26183. "div",
  26184. {
  26185. directives: [
  26186. {
  26187. name: "show",
  26188. rawName: "v-show",
  26189. value: _vm.currentView !== "time",
  26190. expression: "currentView !== 'time'"
  26191. }
  26192. ],
  26193. staticClass: "el-date-picker__header",
  26194. class: {
  26195. "el-date-picker__header--bordered":
  26196. _vm.currentView === "year" ||
  26197. _vm.currentView === "month"
  26198. }
  26199. },
  26200. [
  26201. _c("button", {
  26202. staticClass:
  26203. "el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left",
  26204. attrs: {
  26205. type: "button",
  26206. "aria-label": _vm.t("el.datepicker.prevYear")
  26207. },
  26208. on: { click: _vm.prevYear }
  26209. }),
  26210. _c("button", {
  26211. directives: [
  26212. {
  26213. name: "show",
  26214. rawName: "v-show",
  26215. value: _vm.currentView === "date",
  26216. expression: "currentView === 'date'"
  26217. }
  26218. ],
  26219. staticClass:
  26220. "el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-arrow-left",
  26221. attrs: {
  26222. type: "button",
  26223. "aria-label": _vm.t("el.datepicker.prevMonth")
  26224. },
  26225. on: { click: _vm.prevMonth }
  26226. }),
  26227. _c(
  26228. "span",
  26229. {
  26230. staticClass: "el-date-picker__header-label",
  26231. attrs: { role: "button" },
  26232. on: { click: _vm.showYearPicker }
  26233. },
  26234. [_vm._v(_vm._s(_vm.yearLabel))]
  26235. ),
  26236. _c(
  26237. "span",
  26238. {
  26239. directives: [
  26240. {
  26241. name: "show",
  26242. rawName: "v-show",
  26243. value: _vm.currentView === "date",
  26244. expression: "currentView === 'date'"
  26245. }
  26246. ],
  26247. staticClass: "el-date-picker__header-label",
  26248. class: { active: _vm.currentView === "month" },
  26249. attrs: { role: "button" },
  26250. on: { click: _vm.showMonthPicker }
  26251. },
  26252. [
  26253. _vm._v(
  26254. _vm._s(_vm.t("el.datepicker.month" + (_vm.month + 1)))
  26255. )
  26256. ]
  26257. ),
  26258. _c("button", {
  26259. staticClass:
  26260. "el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right",
  26261. attrs: {
  26262. type: "button",
  26263. "aria-label": _vm.t("el.datepicker.nextYear")
  26264. },
  26265. on: { click: _vm.nextYear }
  26266. }),
  26267. _c("button", {
  26268. directives: [
  26269. {
  26270. name: "show",
  26271. rawName: "v-show",
  26272. value: _vm.currentView === "date",
  26273. expression: "currentView === 'date'"
  26274. }
  26275. ],
  26276. staticClass:
  26277. "el-picker-panel__icon-btn el-date-picker__next-btn el-icon-arrow-right",
  26278. attrs: {
  26279. type: "button",
  26280. "aria-label": _vm.t("el.datepicker.nextMonth")
  26281. },
  26282. on: { click: _vm.nextMonth }
  26283. })
  26284. ]
  26285. ),
  26286. _c(
  26287. "div",
  26288. { staticClass: "el-picker-panel__content" },
  26289. [
  26290. _c("date-table", {
  26291. directives: [
  26292. {
  26293. name: "show",
  26294. rawName: "v-show",
  26295. value: _vm.currentView === "date",
  26296. expression: "currentView === 'date'"
  26297. }
  26298. ],
  26299. attrs: {
  26300. "selection-mode": _vm.selectionMode,
  26301. "first-day-of-week": _vm.firstDayOfWeek,
  26302. value: _vm.value,
  26303. "default-value": _vm.defaultValue
  26304. ? new Date(_vm.defaultValue)
  26305. : null,
  26306. date: _vm.date,
  26307. "cell-class-name": _vm.cellClassName,
  26308. "disabled-date": _vm.disabledDate
  26309. },
  26310. on: { pick: _vm.handleDatePick }
  26311. }),
  26312. _c("year-table", {
  26313. directives: [
  26314. {
  26315. name: "show",
  26316. rawName: "v-show",
  26317. value: _vm.currentView === "year",
  26318. expression: "currentView === 'year'"
  26319. }
  26320. ],
  26321. attrs: {
  26322. value: _vm.value,
  26323. "default-value": _vm.defaultValue
  26324. ? new Date(_vm.defaultValue)
  26325. : null,
  26326. date: _vm.date,
  26327. "disabled-date": _vm.disabledDate
  26328. },
  26329. on: { pick: _vm.handleYearPick }
  26330. }),
  26331. _c("month-table", {
  26332. directives: [
  26333. {
  26334. name: "show",
  26335. rawName: "v-show",
  26336. value: _vm.currentView === "month",
  26337. expression: "currentView === 'month'"
  26338. }
  26339. ],
  26340. attrs: {
  26341. value: _vm.value,
  26342. "default-value": _vm.defaultValue
  26343. ? new Date(_vm.defaultValue)
  26344. : null,
  26345. date: _vm.date,
  26346. "disabled-date": _vm.disabledDate
  26347. },
  26348. on: { pick: _vm.handleMonthPick }
  26349. })
  26350. ],
  26351. 1
  26352. )
  26353. ])
  26354. ],
  26355. 2
  26356. ),
  26357. _c(
  26358. "div",
  26359. {
  26360. directives: [
  26361. {
  26362. name: "show",
  26363. rawName: "v-show",
  26364. value: _vm.footerVisible && _vm.currentView === "date",
  26365. expression: "footerVisible && currentView === 'date'"
  26366. }
  26367. ],
  26368. staticClass: "el-picker-panel__footer"
  26369. },
  26370. [
  26371. _c(
  26372. "el-button",
  26373. {
  26374. directives: [
  26375. {
  26376. name: "show",
  26377. rawName: "v-show",
  26378. value: _vm.selectionMode !== "dates",
  26379. expression: "selectionMode !== 'dates'"
  26380. }
  26381. ],
  26382. staticClass: "el-picker-panel__link-btn",
  26383. attrs: { size: "mini", type: "text" },
  26384. on: { click: _vm.changeToNow }
  26385. },
  26386. [
  26387. _vm._v(
  26388. "\n " +
  26389. _vm._s(_vm.t("el.datepicker.now")) +
  26390. "\n "
  26391. )
  26392. ]
  26393. ),
  26394. _c(
  26395. "el-button",
  26396. {
  26397. staticClass: "el-picker-panel__link-btn",
  26398. attrs: { plain: "", size: "mini" },
  26399. on: { click: _vm.confirm }
  26400. },
  26401. [
  26402. _vm._v(
  26403. "\n " +
  26404. _vm._s(_vm.t("el.datepicker.confirm")) +
  26405. "\n "
  26406. )
  26407. ]
  26408. )
  26409. ],
  26410. 1
  26411. )
  26412. ]
  26413. )
  26414. ]
  26415. )
  26416. }
  26417. var datevue_type_template_id_2440d4ea_staticRenderFns = []
  26418. datevue_type_template_id_2440d4ea_render._withStripped = true
  26419. // CONCATENATED MODULE: ./packages/date-picker/src/panel/date.vue?vue&type=template&id=2440d4ea&
  26420. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=template&id=3d939089&
  26421. var timevue_type_template_id_3d939089_render = function() {
  26422. var _vm = this
  26423. var _h = _vm.$createElement
  26424. var _c = _vm._self._c || _h
  26425. return _c(
  26426. "transition",
  26427. {
  26428. attrs: { name: "el-zoom-in-top" },
  26429. on: {
  26430. "after-leave": function($event) {
  26431. _vm.$emit("dodestroy")
  26432. }
  26433. }
  26434. },
  26435. [
  26436. _c(
  26437. "div",
  26438. {
  26439. directives: [
  26440. {
  26441. name: "show",
  26442. rawName: "v-show",
  26443. value: _vm.visible,
  26444. expression: "visible"
  26445. }
  26446. ],
  26447. staticClass: "el-time-panel el-popper",
  26448. class: _vm.popperClass
  26449. },
  26450. [
  26451. _c(
  26452. "div",
  26453. {
  26454. staticClass: "el-time-panel__content",
  26455. class: { "has-seconds": _vm.showSeconds }
  26456. },
  26457. [
  26458. _c("time-spinner", {
  26459. ref: "spinner",
  26460. attrs: {
  26461. "arrow-control": _vm.useArrow,
  26462. "show-seconds": _vm.showSeconds,
  26463. "am-pm-mode": _vm.amPmMode,
  26464. date: _vm.date
  26465. },
  26466. on: {
  26467. change: _vm.handleChange,
  26468. "select-range": _vm.setSelectionRange
  26469. }
  26470. })
  26471. ],
  26472. 1
  26473. ),
  26474. _c("div", { staticClass: "el-time-panel__footer" }, [
  26475. _c(
  26476. "button",
  26477. {
  26478. staticClass: "el-time-panel__btn cancel",
  26479. attrs: { type: "button" },
  26480. on: { click: _vm.handleCancel }
  26481. },
  26482. [_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]
  26483. ),
  26484. _c(
  26485. "button",
  26486. {
  26487. staticClass: "el-time-panel__btn",
  26488. class: { confirm: !_vm.disabled },
  26489. attrs: { type: "button" },
  26490. on: {
  26491. click: function($event) {
  26492. _vm.handleConfirm()
  26493. }
  26494. }
  26495. },
  26496. [_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))]
  26497. )
  26498. ])
  26499. ]
  26500. )
  26501. ]
  26502. )
  26503. }
  26504. var timevue_type_template_id_3d939089_staticRenderFns = []
  26505. timevue_type_template_id_3d939089_render._withStripped = true
  26506. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=template&id=3d939089&
  26507. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=1facadeb&
  26508. var time_spinnervue_type_template_id_1facadeb_render = function() {
  26509. var _vm = this
  26510. var _h = _vm.$createElement
  26511. var _c = _vm._self._c || _h
  26512. return _c(
  26513. "div",
  26514. {
  26515. staticClass: "el-time-spinner",
  26516. class: { "has-seconds": _vm.showSeconds }
  26517. },
  26518. [
  26519. !_vm.arrowControl
  26520. ? [
  26521. _c(
  26522. "el-scrollbar",
  26523. {
  26524. ref: "hours",
  26525. staticClass: "el-time-spinner__wrapper",
  26526. attrs: {
  26527. "wrap-style": "max-height: inherit;",
  26528. "view-class": "el-time-spinner__list",
  26529. noresize: "",
  26530. tag: "ul"
  26531. },
  26532. nativeOn: {
  26533. mouseenter: function($event) {
  26534. _vm.emitSelectRange("hours")
  26535. },
  26536. mousemove: function($event) {
  26537. _vm.adjustCurrentSpinner("hours")
  26538. }
  26539. }
  26540. },
  26541. _vm._l(_vm.hoursList, function(disabled, hour) {
  26542. return _c(
  26543. "li",
  26544. {
  26545. key: hour,
  26546. staticClass: "el-time-spinner__item",
  26547. class: { active: hour === _vm.hours, disabled: disabled },
  26548. on: {
  26549. click: function($event) {
  26550. _vm.handleClick("hours", {
  26551. value: hour,
  26552. disabled: disabled
  26553. })
  26554. }
  26555. }
  26556. },
  26557. [
  26558. _vm._v(
  26559. _vm._s(
  26560. ("0" + (_vm.amPmMode ? hour % 12 || 12 : hour)).slice(
  26561. -2
  26562. )
  26563. ) + _vm._s(_vm.amPm(hour))
  26564. )
  26565. ]
  26566. )
  26567. }),
  26568. 0
  26569. ),
  26570. _c(
  26571. "el-scrollbar",
  26572. {
  26573. ref: "minutes",
  26574. staticClass: "el-time-spinner__wrapper",
  26575. attrs: {
  26576. "wrap-style": "max-height: inherit;",
  26577. "view-class": "el-time-spinner__list",
  26578. noresize: "",
  26579. tag: "ul"
  26580. },
  26581. nativeOn: {
  26582. mouseenter: function($event) {
  26583. _vm.emitSelectRange("minutes")
  26584. },
  26585. mousemove: function($event) {
  26586. _vm.adjustCurrentSpinner("minutes")
  26587. }
  26588. }
  26589. },
  26590. _vm._l(_vm.minutesList, function(enabled, key) {
  26591. return _c(
  26592. "li",
  26593. {
  26594. key: key,
  26595. staticClass: "el-time-spinner__item",
  26596. class: { active: key === _vm.minutes, disabled: !enabled },
  26597. on: {
  26598. click: function($event) {
  26599. _vm.handleClick("minutes", {
  26600. value: key,
  26601. disabled: false
  26602. })
  26603. }
  26604. }
  26605. },
  26606. [_vm._v(_vm._s(("0" + key).slice(-2)))]
  26607. )
  26608. }),
  26609. 0
  26610. ),
  26611. _c(
  26612. "el-scrollbar",
  26613. {
  26614. directives: [
  26615. {
  26616. name: "show",
  26617. rawName: "v-show",
  26618. value: _vm.showSeconds,
  26619. expression: "showSeconds"
  26620. }
  26621. ],
  26622. ref: "seconds",
  26623. staticClass: "el-time-spinner__wrapper",
  26624. attrs: {
  26625. "wrap-style": "max-height: inherit;",
  26626. "view-class": "el-time-spinner__list",
  26627. noresize: "",
  26628. tag: "ul"
  26629. },
  26630. nativeOn: {
  26631. mouseenter: function($event) {
  26632. _vm.emitSelectRange("seconds")
  26633. },
  26634. mousemove: function($event) {
  26635. _vm.adjustCurrentSpinner("seconds")
  26636. }
  26637. }
  26638. },
  26639. _vm._l(60, function(second, key) {
  26640. return _c(
  26641. "li",
  26642. {
  26643. key: key,
  26644. staticClass: "el-time-spinner__item",
  26645. class: { active: key === _vm.seconds },
  26646. on: {
  26647. click: function($event) {
  26648. _vm.handleClick("seconds", {
  26649. value: key,
  26650. disabled: false
  26651. })
  26652. }
  26653. }
  26654. },
  26655. [_vm._v(_vm._s(("0" + key).slice(-2)))]
  26656. )
  26657. }),
  26658. 0
  26659. )
  26660. ]
  26661. : _vm._e(),
  26662. _vm.arrowControl
  26663. ? [
  26664. _c(
  26665. "div",
  26666. {
  26667. staticClass: "el-time-spinner__wrapper is-arrow",
  26668. on: {
  26669. mouseenter: function($event) {
  26670. _vm.emitSelectRange("hours")
  26671. }
  26672. }
  26673. },
  26674. [
  26675. _c("i", {
  26676. directives: [
  26677. {
  26678. name: "repeat-click",
  26679. rawName: "v-repeat-click",
  26680. value: _vm.decrease,
  26681. expression: "decrease"
  26682. }
  26683. ],
  26684. staticClass: "el-time-spinner__arrow el-icon-arrow-up"
  26685. }),
  26686. _c("i", {
  26687. directives: [
  26688. {
  26689. name: "repeat-click",
  26690. rawName: "v-repeat-click",
  26691. value: _vm.increase,
  26692. expression: "increase"
  26693. }
  26694. ],
  26695. staticClass: "el-time-spinner__arrow el-icon-arrow-down"
  26696. }),
  26697. _c(
  26698. "ul",
  26699. { ref: "hours", staticClass: "el-time-spinner__list" },
  26700. _vm._l(_vm.arrowHourList, function(hour, key) {
  26701. return _c(
  26702. "li",
  26703. {
  26704. key: key,
  26705. staticClass: "el-time-spinner__item",
  26706. class: {
  26707. active: hour === _vm.hours,
  26708. disabled: _vm.hoursList[hour]
  26709. }
  26710. },
  26711. [
  26712. _vm._v(
  26713. _vm._s(
  26714. hour === undefined
  26715. ? ""
  26716. : (
  26717. "0" + (_vm.amPmMode ? hour % 12 || 12 : hour)
  26718. ).slice(-2) + _vm.amPm(hour)
  26719. )
  26720. )
  26721. ]
  26722. )
  26723. }),
  26724. 0
  26725. )
  26726. ]
  26727. ),
  26728. _c(
  26729. "div",
  26730. {
  26731. staticClass: "el-time-spinner__wrapper is-arrow",
  26732. on: {
  26733. mouseenter: function($event) {
  26734. _vm.emitSelectRange("minutes")
  26735. }
  26736. }
  26737. },
  26738. [
  26739. _c("i", {
  26740. directives: [
  26741. {
  26742. name: "repeat-click",
  26743. rawName: "v-repeat-click",
  26744. value: _vm.decrease,
  26745. expression: "decrease"
  26746. }
  26747. ],
  26748. staticClass: "el-time-spinner__arrow el-icon-arrow-up"
  26749. }),
  26750. _c("i", {
  26751. directives: [
  26752. {
  26753. name: "repeat-click",
  26754. rawName: "v-repeat-click",
  26755. value: _vm.increase,
  26756. expression: "increase"
  26757. }
  26758. ],
  26759. staticClass: "el-time-spinner__arrow el-icon-arrow-down"
  26760. }),
  26761. _c(
  26762. "ul",
  26763. { ref: "minutes", staticClass: "el-time-spinner__list" },
  26764. _vm._l(_vm.arrowMinuteList, function(minute, key) {
  26765. return _c(
  26766. "li",
  26767. {
  26768. key: key,
  26769. staticClass: "el-time-spinner__item",
  26770. class: { active: minute === _vm.minutes }
  26771. },
  26772. [
  26773. _vm._v(
  26774. "\n " +
  26775. _vm._s(
  26776. minute === undefined
  26777. ? ""
  26778. : ("0" + minute).slice(-2)
  26779. ) +
  26780. "\n "
  26781. )
  26782. ]
  26783. )
  26784. }),
  26785. 0
  26786. )
  26787. ]
  26788. ),
  26789. _vm.showSeconds
  26790. ? _c(
  26791. "div",
  26792. {
  26793. staticClass: "el-time-spinner__wrapper is-arrow",
  26794. on: {
  26795. mouseenter: function($event) {
  26796. _vm.emitSelectRange("seconds")
  26797. }
  26798. }
  26799. },
  26800. [
  26801. _c("i", {
  26802. directives: [
  26803. {
  26804. name: "repeat-click",
  26805. rawName: "v-repeat-click",
  26806. value: _vm.decrease,
  26807. expression: "decrease"
  26808. }
  26809. ],
  26810. staticClass: "el-time-spinner__arrow el-icon-arrow-up"
  26811. }),
  26812. _c("i", {
  26813. directives: [
  26814. {
  26815. name: "repeat-click",
  26816. rawName: "v-repeat-click",
  26817. value: _vm.increase,
  26818. expression: "increase"
  26819. }
  26820. ],
  26821. staticClass: "el-time-spinner__arrow el-icon-arrow-down"
  26822. }),
  26823. _c(
  26824. "ul",
  26825. { ref: "seconds", staticClass: "el-time-spinner__list" },
  26826. _vm._l(_vm.arrowSecondList, function(second, key) {
  26827. return _c(
  26828. "li",
  26829. {
  26830. key: key,
  26831. staticClass: "el-time-spinner__item",
  26832. class: { active: second === _vm.seconds }
  26833. },
  26834. [
  26835. _vm._v(
  26836. "\n " +
  26837. _vm._s(
  26838. second === undefined
  26839. ? ""
  26840. : ("0" + second).slice(-2)
  26841. ) +
  26842. "\n "
  26843. )
  26844. ]
  26845. )
  26846. }),
  26847. 0
  26848. )
  26849. ]
  26850. )
  26851. : _vm._e()
  26852. ]
  26853. : _vm._e()
  26854. ],
  26855. 2
  26856. )
  26857. }
  26858. var time_spinnervue_type_template_id_1facadeb_staticRenderFns = []
  26859. time_spinnervue_type_template_id_1facadeb_render._withStripped = true
  26860. // CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=1facadeb&
  26861. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js&
  26862. //
  26863. //
  26864. //
  26865. //
  26866. //
  26867. //
  26868. //
  26869. //
  26870. //
  26871. //
  26872. //
  26873. //
  26874. //
  26875. //
  26876. //
  26877. //
  26878. //
  26879. //
  26880. //
  26881. //
  26882. //
  26883. //
  26884. //
  26885. //
  26886. //
  26887. //
  26888. //
  26889. //
  26890. //
  26891. //
  26892. //
  26893. //
  26894. //
  26895. //
  26896. //
  26897. //
  26898. //
  26899. //
  26900. //
  26901. //
  26902. //
  26903. //
  26904. //
  26905. //
  26906. //
  26907. //
  26908. //
  26909. //
  26910. //
  26911. //
  26912. //
  26913. //
  26914. //
  26915. //
  26916. //
  26917. //
  26918. //
  26919. //
  26920. //
  26921. //
  26922. //
  26923. //
  26924. //
  26925. //
  26926. //
  26927. //
  26928. //
  26929. //
  26930. //
  26931. //
  26932. //
  26933. //
  26934. //
  26935. //
  26936. //
  26937. //
  26938. //
  26939. //
  26940. //
  26941. //
  26942. //
  26943. //
  26944. //
  26945. //
  26946. //
  26947. //
  26948. //
  26949. //
  26950. //
  26951. //
  26952. //
  26953. //
  26954. //
  26955. //
  26956. //
  26957. //
  26958. //
  26959. //
  26960. //
  26961. //
  26962. //
  26963. //
  26964. /* harmony default export */ var time_spinnervue_type_script_lang_js_ = ({
  26965. components: { ElScrollbar: scrollbar_default.a },
  26966. directives: {
  26967. repeatClick: repeat_click
  26968. },
  26969. props: {
  26970. date: {},
  26971. defaultValue: {}, // reserved for future use
  26972. showSeconds: {
  26973. type: Boolean,
  26974. default: true
  26975. },
  26976. arrowControl: Boolean,
  26977. amPmMode: {
  26978. type: String,
  26979. default: '' // 'a': am/pm; 'A': AM/PM
  26980. }
  26981. },
  26982. computed: {
  26983. hours: function hours() {
  26984. return this.date.getHours();
  26985. },
  26986. minutes: function minutes() {
  26987. return this.date.getMinutes();
  26988. },
  26989. seconds: function seconds() {
  26990. return this.date.getSeconds();
  26991. },
  26992. hoursList: function hoursList() {
  26993. return Object(date_util_["getRangeHours"])(this.selectableRange);
  26994. },
  26995. minutesList: function minutesList() {
  26996. return Object(date_util_["getRangeMinutes"])(this.selectableRange, this.hours);
  26997. },
  26998. arrowHourList: function arrowHourList() {
  26999. var hours = this.hours;
  27000. return [hours > 0 ? hours - 1 : undefined, hours, hours < 23 ? hours + 1 : undefined];
  27001. },
  27002. arrowMinuteList: function arrowMinuteList() {
  27003. var minutes = this.minutes;
  27004. return [minutes > 0 ? minutes - 1 : undefined, minutes, minutes < 59 ? minutes + 1 : undefined];
  27005. },
  27006. arrowSecondList: function arrowSecondList() {
  27007. var seconds = this.seconds;
  27008. return [seconds > 0 ? seconds - 1 : undefined, seconds, seconds < 59 ? seconds + 1 : undefined];
  27009. }
  27010. },
  27011. data: function data() {
  27012. return {
  27013. selectableRange: [],
  27014. currentScrollbar: null
  27015. };
  27016. },
  27017. mounted: function mounted() {
  27018. var _this = this;
  27019. this.$nextTick(function () {
  27020. !_this.arrowControl && _this.bindScrollEvent();
  27021. });
  27022. },
  27023. methods: {
  27024. increase: function increase() {
  27025. this.scrollDown(1);
  27026. },
  27027. decrease: function decrease() {
  27028. this.scrollDown(-1);
  27029. },
  27030. modifyDateField: function modifyDateField(type, value) {
  27031. switch (type) {
  27032. case 'hours':
  27033. this.$emit('change', Object(date_util_["modifyTime"])(this.date, value, this.minutes, this.seconds));break;
  27034. case 'minutes':
  27035. this.$emit('change', Object(date_util_["modifyTime"])(this.date, this.hours, value, this.seconds));break;
  27036. case 'seconds':
  27037. this.$emit('change', Object(date_util_["modifyTime"])(this.date, this.hours, this.minutes, value));break;
  27038. }
  27039. },
  27040. handleClick: function handleClick(type, _ref) {
  27041. var value = _ref.value,
  27042. disabled = _ref.disabled;
  27043. if (!disabled) {
  27044. this.modifyDateField(type, value);
  27045. this.emitSelectRange(type);
  27046. this.adjustSpinner(type, value);
  27047. }
  27048. },
  27049. emitSelectRange: function emitSelectRange(type) {
  27050. if (type === 'hours') {
  27051. this.$emit('select-range', 0, 2);
  27052. } else if (type === 'minutes') {
  27053. this.$emit('select-range', 3, 5);
  27054. } else if (type === 'seconds') {
  27055. this.$emit('select-range', 6, 8);
  27056. }
  27057. this.currentScrollbar = type;
  27058. },
  27059. bindScrollEvent: function bindScrollEvent() {
  27060. var _this2 = this;
  27061. var bindFunction = function bindFunction(type) {
  27062. _this2.$refs[type].wrap.onscroll = function (e) {
  27063. // TODO: scroll is emitted when set scrollTop programatically
  27064. // should find better solutions in the future!
  27065. _this2.handleScroll(type, e);
  27066. };
  27067. };
  27068. bindFunction('hours');
  27069. bindFunction('minutes');
  27070. bindFunction('seconds');
  27071. },
  27072. handleScroll: function handleScroll(type) {
  27073. var value = Math.min(Math.round((this.$refs[type].wrap.scrollTop - (this.scrollBarHeight(type) * 0.5 - 10) / this.typeItemHeight(type) + 3) / this.typeItemHeight(type)), type === 'hours' ? 23 : 59);
  27074. this.modifyDateField(type, value);
  27075. },
  27076. // NOTE: used by datetime / date-range panel
  27077. // renamed from adjustScrollTop
  27078. // should try to refactory it
  27079. adjustSpinners: function adjustSpinners() {
  27080. this.adjustSpinner('hours', this.hours);
  27081. this.adjustSpinner('minutes', this.minutes);
  27082. this.adjustSpinner('seconds', this.seconds);
  27083. },
  27084. adjustCurrentSpinner: function adjustCurrentSpinner(type) {
  27085. this.adjustSpinner(type, this[type]);
  27086. },
  27087. adjustSpinner: function adjustSpinner(type, value) {
  27088. if (this.arrowControl) return;
  27089. var el = this.$refs[type].wrap;
  27090. if (el) {
  27091. el.scrollTop = Math.max(0, value * this.typeItemHeight(type));
  27092. }
  27093. },
  27094. scrollDown: function scrollDown(step) {
  27095. var _this3 = this;
  27096. if (!this.currentScrollbar) {
  27097. this.emitSelectRange('hours');
  27098. }
  27099. var label = this.currentScrollbar;
  27100. var hoursList = this.hoursList;
  27101. var now = this[label];
  27102. if (this.currentScrollbar === 'hours') {
  27103. var total = Math.abs(step);
  27104. step = step > 0 ? 1 : -1;
  27105. var length = hoursList.length;
  27106. while (length-- && total) {
  27107. now = (now + step + hoursList.length) % hoursList.length;
  27108. if (hoursList[now]) {
  27109. continue;
  27110. }
  27111. total--;
  27112. }
  27113. if (hoursList[now]) return;
  27114. } else {
  27115. now = (now + step + 60) % 60;
  27116. }
  27117. this.modifyDateField(label, now);
  27118. this.adjustSpinner(label, now);
  27119. this.$nextTick(function () {
  27120. return _this3.emitSelectRange(_this3.currentScrollbar);
  27121. });
  27122. },
  27123. amPm: function amPm(hour) {
  27124. var shouldShowAmPm = this.amPmMode.toLowerCase() === 'a';
  27125. if (!shouldShowAmPm) return '';
  27126. var isCapital = this.amPmMode === 'A';
  27127. var content = hour < 12 ? ' am' : ' pm';
  27128. if (isCapital) content = content.toUpperCase();
  27129. return content;
  27130. },
  27131. typeItemHeight: function typeItemHeight(type) {
  27132. return this.$refs[type].$el.querySelector('li').offsetHeight;
  27133. },
  27134. scrollBarHeight: function scrollBarHeight(type) {
  27135. return this.$refs[type].$el.offsetHeight;
  27136. }
  27137. }
  27138. });
  27139. // CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js&
  27140. /* harmony default export */ var basic_time_spinnervue_type_script_lang_js_ = (time_spinnervue_type_script_lang_js_);
  27141. // CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue
  27142. /* normalize component */
  27143. var time_spinner_component = normalizeComponent(
  27144. basic_time_spinnervue_type_script_lang_js_,
  27145. time_spinnervue_type_template_id_1facadeb_render,
  27146. time_spinnervue_type_template_id_1facadeb_staticRenderFns,
  27147. false,
  27148. null,
  27149. null,
  27150. null
  27151. )
  27152. /* hot reload */
  27153. if (false) { var time_spinner_api; }
  27154. time_spinner_component.options.__file = "packages/date-picker/src/basic/time-spinner.vue"
  27155. /* harmony default export */ var time_spinner = (time_spinner_component.exports);
  27156. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js&
  27157. //
  27158. //
  27159. //
  27160. //
  27161. //
  27162. //
  27163. //
  27164. //
  27165. //
  27166. //
  27167. //
  27168. //
  27169. //
  27170. //
  27171. //
  27172. //
  27173. //
  27174. //
  27175. //
  27176. //
  27177. //
  27178. //
  27179. //
  27180. //
  27181. //
  27182. //
  27183. //
  27184. //
  27185. //
  27186. //
  27187. //
  27188. //
  27189. /* harmony default export */ var timevue_type_script_lang_js_ = ({
  27190. mixins: [locale_default.a],
  27191. components: {
  27192. TimeSpinner: time_spinner
  27193. },
  27194. props: {
  27195. visible: Boolean,
  27196. timeArrowControl: Boolean
  27197. },
  27198. watch: {
  27199. visible: function visible(val) {
  27200. var _this = this;
  27201. if (val) {
  27202. this.oldValue = this.value;
  27203. this.$nextTick(function () {
  27204. return _this.$refs.spinner.emitSelectRange('hours');
  27205. });
  27206. } else {
  27207. this.needInitAdjust = true;
  27208. }
  27209. },
  27210. value: function value(newVal) {
  27211. var _this2 = this;
  27212. var date = void 0;
  27213. if (newVal instanceof Date) {
  27214. date = Object(date_util_["limitTimeRange"])(newVal, this.selectableRange, this.format);
  27215. } else if (!newVal) {
  27216. date = this.defaultValue ? new Date(this.defaultValue) : new Date();
  27217. }
  27218. this.date = date;
  27219. if (this.visible && this.needInitAdjust) {
  27220. this.$nextTick(function (_) {
  27221. return _this2.adjustSpinners();
  27222. });
  27223. this.needInitAdjust = false;
  27224. }
  27225. },
  27226. selectableRange: function selectableRange(val) {
  27227. this.$refs.spinner.selectableRange = val;
  27228. },
  27229. defaultValue: function defaultValue(val) {
  27230. if (!Object(date_util_["isDate"])(this.value)) {
  27231. this.date = val ? new Date(val) : new Date();
  27232. }
  27233. }
  27234. },
  27235. data: function data() {
  27236. return {
  27237. popperClass: '',
  27238. format: 'HH:mm:ss',
  27239. value: '',
  27240. defaultValue: null,
  27241. date: new Date(),
  27242. oldValue: new Date(),
  27243. selectableRange: [],
  27244. selectionRange: [0, 2],
  27245. disabled: false,
  27246. arrowControl: false,
  27247. needInitAdjust: true
  27248. };
  27249. },
  27250. computed: {
  27251. showSeconds: function showSeconds() {
  27252. return (this.format || '').indexOf('ss') !== -1;
  27253. },
  27254. useArrow: function useArrow() {
  27255. return this.arrowControl || this.timeArrowControl || false;
  27256. },
  27257. amPmMode: function amPmMode() {
  27258. if ((this.format || '').indexOf('A') !== -1) return 'A';
  27259. if ((this.format || '').indexOf('a') !== -1) return 'a';
  27260. return '';
  27261. }
  27262. },
  27263. methods: {
  27264. handleCancel: function handleCancel() {
  27265. this.$emit('pick', this.oldValue, false);
  27266. },
  27267. handleChange: function handleChange(date) {
  27268. // this.visible avoids edge cases, when use scrolls during panel closing animation
  27269. if (this.visible) {
  27270. this.date = Object(date_util_["clearMilliseconds"])(date);
  27271. // if date is out of range, do not emit
  27272. if (this.isValidValue(this.date)) {
  27273. this.$emit('pick', this.date, true);
  27274. }
  27275. }
  27276. },
  27277. setSelectionRange: function setSelectionRange(start, end) {
  27278. this.$emit('select-range', start, end);
  27279. this.selectionRange = [start, end];
  27280. },
  27281. handleConfirm: function handleConfirm() {
  27282. var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  27283. var first = arguments[1];
  27284. if (first) return;
  27285. var date = Object(date_util_["clearMilliseconds"])(Object(date_util_["limitTimeRange"])(this.date, this.selectableRange, this.format));
  27286. this.$emit('pick', date, visible, first);
  27287. },
  27288. handleKeydown: function handleKeydown(event) {
  27289. var keyCode = event.keyCode;
  27290. var mapping = { 38: -1, 40: 1, 37: -1, 39: 1 };
  27291. // Left or Right
  27292. if (keyCode === 37 || keyCode === 39) {
  27293. var step = mapping[keyCode];
  27294. this.changeSelectionRange(step);
  27295. event.preventDefault();
  27296. return;
  27297. }
  27298. // Up or Down
  27299. if (keyCode === 38 || keyCode === 40) {
  27300. var _step = mapping[keyCode];
  27301. this.$refs.spinner.scrollDown(_step);
  27302. event.preventDefault();
  27303. return;
  27304. }
  27305. },
  27306. isValidValue: function isValidValue(date) {
  27307. return Object(date_util_["timeWithinRange"])(date, this.selectableRange, this.format);
  27308. },
  27309. adjustSpinners: function adjustSpinners() {
  27310. return this.$refs.spinner.adjustSpinners();
  27311. },
  27312. changeSelectionRange: function changeSelectionRange(step) {
  27313. var list = [0, 3].concat(this.showSeconds ? [6] : []);
  27314. var mapping = ['hours', 'minutes'].concat(this.showSeconds ? ['seconds'] : []);
  27315. var index = list.indexOf(this.selectionRange[0]);
  27316. var next = (index + step + list.length) % list.length;
  27317. this.$refs.spinner.emitSelectRange(mapping[next]);
  27318. }
  27319. },
  27320. mounted: function mounted() {
  27321. var _this3 = this;
  27322. this.$nextTick(function () {
  27323. return _this3.handleConfirm(true, true);
  27324. });
  27325. this.$emit('mounted');
  27326. }
  27327. });
  27328. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js&
  27329. /* harmony default export */ var panel_timevue_type_script_lang_js_ = (timevue_type_script_lang_js_);
  27330. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue
  27331. /* normalize component */
  27332. var time_component = normalizeComponent(
  27333. panel_timevue_type_script_lang_js_,
  27334. timevue_type_template_id_3d939089_render,
  27335. timevue_type_template_id_3d939089_staticRenderFns,
  27336. false,
  27337. null,
  27338. null,
  27339. null
  27340. )
  27341. /* hot reload */
  27342. if (false) { var time_api; }
  27343. time_component.options.__file = "packages/date-picker/src/panel/time.vue"
  27344. /* harmony default export */ var panel_time = (time_component.exports);
  27345. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/year-table.vue?vue&type=template&id=c86ab5e0&
  27346. var year_tablevue_type_template_id_c86ab5e0_render = function() {
  27347. var _vm = this
  27348. var _h = _vm.$createElement
  27349. var _c = _vm._self._c || _h
  27350. return _c(
  27351. "table",
  27352. { staticClass: "el-year-table", on: { click: _vm.handleYearTableClick } },
  27353. [
  27354. _c("tbody", [
  27355. _c("tr", [
  27356. _c(
  27357. "td",
  27358. {
  27359. staticClass: "available",
  27360. class: _vm.getCellStyle(_vm.startYear + 0)
  27361. },
  27362. [_c("a", { staticClass: "cell" }, [_vm._v(_vm._s(_vm.startYear))])]
  27363. ),
  27364. _c(
  27365. "td",
  27366. {
  27367. staticClass: "available",
  27368. class: _vm.getCellStyle(_vm.startYear + 1)
  27369. },
  27370. [
  27371. _c("a", { staticClass: "cell" }, [
  27372. _vm._v(_vm._s(_vm.startYear + 1))
  27373. ])
  27374. ]
  27375. ),
  27376. _c(
  27377. "td",
  27378. {
  27379. staticClass: "available",
  27380. class: _vm.getCellStyle(_vm.startYear + 2)
  27381. },
  27382. [
  27383. _c("a", { staticClass: "cell" }, [
  27384. _vm._v(_vm._s(_vm.startYear + 2))
  27385. ])
  27386. ]
  27387. ),
  27388. _c(
  27389. "td",
  27390. {
  27391. staticClass: "available",
  27392. class: _vm.getCellStyle(_vm.startYear + 3)
  27393. },
  27394. [
  27395. _c("a", { staticClass: "cell" }, [
  27396. _vm._v(_vm._s(_vm.startYear + 3))
  27397. ])
  27398. ]
  27399. )
  27400. ]),
  27401. _c("tr", [
  27402. _c(
  27403. "td",
  27404. {
  27405. staticClass: "available",
  27406. class: _vm.getCellStyle(_vm.startYear + 4)
  27407. },
  27408. [
  27409. _c("a", { staticClass: "cell" }, [
  27410. _vm._v(_vm._s(_vm.startYear + 4))
  27411. ])
  27412. ]
  27413. ),
  27414. _c(
  27415. "td",
  27416. {
  27417. staticClass: "available",
  27418. class: _vm.getCellStyle(_vm.startYear + 5)
  27419. },
  27420. [
  27421. _c("a", { staticClass: "cell" }, [
  27422. _vm._v(_vm._s(_vm.startYear + 5))
  27423. ])
  27424. ]
  27425. ),
  27426. _c(
  27427. "td",
  27428. {
  27429. staticClass: "available",
  27430. class: _vm.getCellStyle(_vm.startYear + 6)
  27431. },
  27432. [
  27433. _c("a", { staticClass: "cell" }, [
  27434. _vm._v(_vm._s(_vm.startYear + 6))
  27435. ])
  27436. ]
  27437. ),
  27438. _c(
  27439. "td",
  27440. {
  27441. staticClass: "available",
  27442. class: _vm.getCellStyle(_vm.startYear + 7)
  27443. },
  27444. [
  27445. _c("a", { staticClass: "cell" }, [
  27446. _vm._v(_vm._s(_vm.startYear + 7))
  27447. ])
  27448. ]
  27449. )
  27450. ]),
  27451. _c("tr", [
  27452. _c(
  27453. "td",
  27454. {
  27455. staticClass: "available",
  27456. class: _vm.getCellStyle(_vm.startYear + 8)
  27457. },
  27458. [
  27459. _c("a", { staticClass: "cell" }, [
  27460. _vm._v(_vm._s(_vm.startYear + 8))
  27461. ])
  27462. ]
  27463. ),
  27464. _c(
  27465. "td",
  27466. {
  27467. staticClass: "available",
  27468. class: _vm.getCellStyle(_vm.startYear + 9)
  27469. },
  27470. [
  27471. _c("a", { staticClass: "cell" }, [
  27472. _vm._v(_vm._s(_vm.startYear + 9))
  27473. ])
  27474. ]
  27475. ),
  27476. _c("td"),
  27477. _c("td")
  27478. ])
  27479. ])
  27480. ]
  27481. )
  27482. }
  27483. var year_tablevue_type_template_id_c86ab5e0_staticRenderFns = []
  27484. year_tablevue_type_template_id_c86ab5e0_render._withStripped = true
  27485. // CONCATENATED MODULE: ./packages/date-picker/src/basic/year-table.vue?vue&type=template&id=c86ab5e0&
  27486. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/year-table.vue?vue&type=script&lang=js&
  27487. //
  27488. //
  27489. //
  27490. //
  27491. //
  27492. //
  27493. //
  27494. //
  27495. //
  27496. //
  27497. //
  27498. //
  27499. //
  27500. //
  27501. //
  27502. //
  27503. //
  27504. //
  27505. //
  27506. //
  27507. //
  27508. //
  27509. //
  27510. //
  27511. //
  27512. //
  27513. //
  27514. //
  27515. //
  27516. //
  27517. //
  27518. //
  27519. //
  27520. //
  27521. //
  27522. //
  27523. //
  27524. //
  27525. //
  27526. //
  27527. //
  27528. //
  27529. //
  27530. //
  27531. //
  27532. var year_tablevue_type_script_lang_js_datesInYear = function datesInYear(year) {
  27533. var numOfDays = Object(date_util_["getDayCountOfYear"])(year);
  27534. var firstDay = new Date(year, 0, 1);
  27535. return Object(date_util_["range"])(numOfDays).map(function (n) {
  27536. return Object(date_util_["nextDate"])(firstDay, n);
  27537. });
  27538. };
  27539. /* harmony default export */ var year_tablevue_type_script_lang_js_ = ({
  27540. props: {
  27541. disabledDate: {},
  27542. value: {},
  27543. defaultValue: {
  27544. validator: function validator(val) {
  27545. // null or valid Date Object
  27546. return val === null || val instanceof Date && Object(date_util_["isDate"])(val);
  27547. }
  27548. },
  27549. date: {}
  27550. },
  27551. computed: {
  27552. startYear: function startYear() {
  27553. return Math.floor(this.date.getFullYear() / 10) * 10;
  27554. }
  27555. },
  27556. methods: {
  27557. getCellStyle: function getCellStyle(year) {
  27558. var style = {};
  27559. var today = new Date();
  27560. style.disabled = typeof this.disabledDate === 'function' ? year_tablevue_type_script_lang_js_datesInYear(year).every(this.disabledDate) : false;
  27561. style.current = Object(util_["arrayFindIndex"])(Object(util_["coerceTruthyValueToArray"])(this.value), function (date) {
  27562. return date.getFullYear() === year;
  27563. }) >= 0;
  27564. style.today = today.getFullYear() === year;
  27565. style.default = this.defaultValue && this.defaultValue.getFullYear() === year;
  27566. return style;
  27567. },
  27568. handleYearTableClick: function handleYearTableClick(event) {
  27569. var target = event.target;
  27570. if (target.tagName === 'A') {
  27571. if (Object(dom_["hasClass"])(target.parentNode, 'disabled')) return;
  27572. var year = target.textContent || target.innerText;
  27573. this.$emit('pick', Number(year));
  27574. }
  27575. }
  27576. }
  27577. });
  27578. // CONCATENATED MODULE: ./packages/date-picker/src/basic/year-table.vue?vue&type=script&lang=js&
  27579. /* harmony default export */ var basic_year_tablevue_type_script_lang_js_ = (year_tablevue_type_script_lang_js_);
  27580. // CONCATENATED MODULE: ./packages/date-picker/src/basic/year-table.vue
  27581. /* normalize component */
  27582. var year_table_component = normalizeComponent(
  27583. basic_year_tablevue_type_script_lang_js_,
  27584. year_tablevue_type_template_id_c86ab5e0_render,
  27585. year_tablevue_type_template_id_c86ab5e0_staticRenderFns,
  27586. false,
  27587. null,
  27588. null,
  27589. null
  27590. )
  27591. /* hot reload */
  27592. if (false) { var year_table_api; }
  27593. year_table_component.options.__file = "packages/date-picker/src/basic/year-table.vue"
  27594. /* harmony default export */ var year_table = (year_table_component.exports);
  27595. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/month-table.vue?vue&type=template&id=654d4f42&
  27596. var month_tablevue_type_template_id_654d4f42_render = function() {
  27597. var _vm = this
  27598. var _h = _vm.$createElement
  27599. var _c = _vm._self._c || _h
  27600. return _c(
  27601. "table",
  27602. {
  27603. staticClass: "el-month-table",
  27604. on: { click: _vm.handleMonthTableClick, mousemove: _vm.handleMouseMove }
  27605. },
  27606. [
  27607. _c(
  27608. "tbody",
  27609. _vm._l(_vm.rows, function(row, key) {
  27610. return _c(
  27611. "tr",
  27612. { key: key },
  27613. _vm._l(row, function(cell, key) {
  27614. return _c("td", { key: key, class: _vm.getCellStyle(cell) }, [
  27615. _c("div", [
  27616. _c("a", { staticClass: "cell" }, [
  27617. _vm._v(
  27618. _vm._s(
  27619. _vm.t("el.datepicker.months." + _vm.months[cell.text])
  27620. )
  27621. )
  27622. ])
  27623. ])
  27624. ])
  27625. }),
  27626. 0
  27627. )
  27628. }),
  27629. 0
  27630. )
  27631. ]
  27632. )
  27633. }
  27634. var month_tablevue_type_template_id_654d4f42_staticRenderFns = []
  27635. month_tablevue_type_template_id_654d4f42_render._withStripped = true
  27636. // CONCATENATED MODULE: ./packages/date-picker/src/basic/month-table.vue?vue&type=template&id=654d4f42&
  27637. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/month-table.vue?vue&type=script&lang=js&
  27638. //
  27639. //
  27640. //
  27641. //
  27642. //
  27643. //
  27644. //
  27645. //
  27646. //
  27647. //
  27648. //
  27649. //
  27650. //
  27651. //
  27652. var month_tablevue_type_script_lang_js_datesInMonth = function datesInMonth(year, month) {
  27653. var numOfDays = Object(date_util_["getDayCountOfMonth"])(year, month);
  27654. var firstDay = new Date(year, month, 1);
  27655. return Object(date_util_["range"])(numOfDays).map(function (n) {
  27656. return Object(date_util_["nextDate"])(firstDay, n);
  27657. });
  27658. };
  27659. var clearDate = function clearDate(date) {
  27660. return new Date(date.getFullYear(), date.getMonth());
  27661. };
  27662. var getMonthTimestamp = function getMonthTimestamp(time) {
  27663. if (typeof time === 'number' || typeof time === 'string') {
  27664. return clearDate(new Date(time)).getTime();
  27665. } else if (time instanceof Date) {
  27666. return clearDate(time).getTime();
  27667. } else {
  27668. return NaN;
  27669. }
  27670. };
  27671. /* harmony default export */ var month_tablevue_type_script_lang_js_ = ({
  27672. props: {
  27673. disabledDate: {},
  27674. value: {},
  27675. selectionMode: {
  27676. default: 'month'
  27677. },
  27678. minDate: {},
  27679. maxDate: {},
  27680. defaultValue: {
  27681. validator: function validator(val) {
  27682. // null or valid Date Object
  27683. return val === null || Object(date_util_["isDate"])(val) || Array.isArray(val) && val.every(date_util_["isDate"]);
  27684. }
  27685. },
  27686. date: {},
  27687. rangeState: {
  27688. default: function _default() {
  27689. return {
  27690. endDate: null,
  27691. selecting: false
  27692. };
  27693. }
  27694. }
  27695. },
  27696. mixins: [locale_default.a],
  27697. watch: {
  27698. 'rangeState.endDate': function rangeStateEndDate(newVal) {
  27699. this.markRange(this.minDate, newVal);
  27700. },
  27701. minDate: function minDate(newVal, oldVal) {
  27702. if (getMonthTimestamp(newVal) !== getMonthTimestamp(oldVal)) {
  27703. this.markRange(this.minDate, this.maxDate);
  27704. }
  27705. },
  27706. maxDate: function maxDate(newVal, oldVal) {
  27707. if (getMonthTimestamp(newVal) !== getMonthTimestamp(oldVal)) {
  27708. this.markRange(this.minDate, this.maxDate);
  27709. }
  27710. }
  27711. },
  27712. data: function data() {
  27713. return {
  27714. months: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'],
  27715. tableRows: [[], [], []],
  27716. lastRow: null,
  27717. lastColumn: null
  27718. };
  27719. },
  27720. methods: {
  27721. cellMatchesDate: function cellMatchesDate(cell, date) {
  27722. var value = new Date(date);
  27723. return this.date.getFullYear() === value.getFullYear() && Number(cell.text) === value.getMonth();
  27724. },
  27725. getCellStyle: function getCellStyle(cell) {
  27726. var _this = this;
  27727. var style = {};
  27728. var year = this.date.getFullYear();
  27729. var today = new Date();
  27730. var month = cell.text;
  27731. var defaultValue = this.defaultValue ? Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue] : [];
  27732. style.disabled = typeof this.disabledDate === 'function' ? month_tablevue_type_script_lang_js_datesInMonth(year, month).every(this.disabledDate) : false;
  27733. style.current = Object(util_["arrayFindIndex"])(Object(util_["coerceTruthyValueToArray"])(this.value), function (date) {
  27734. return date.getFullYear() === year && date.getMonth() === month;
  27735. }) >= 0;
  27736. style.today = today.getFullYear() === year && today.getMonth() === month;
  27737. style.default = defaultValue.some(function (date) {
  27738. return _this.cellMatchesDate(cell, date);
  27739. });
  27740. if (cell.inRange) {
  27741. style['in-range'] = true;
  27742. if (cell.start) {
  27743. style['start-date'] = true;
  27744. }
  27745. if (cell.end) {
  27746. style['end-date'] = true;
  27747. }
  27748. }
  27749. return style;
  27750. },
  27751. getMonthOfCell: function getMonthOfCell(month) {
  27752. var year = this.date.getFullYear();
  27753. return new Date(year, month, 1);
  27754. },
  27755. markRange: function markRange(minDate, maxDate) {
  27756. minDate = getMonthTimestamp(minDate);
  27757. maxDate = getMonthTimestamp(maxDate) || minDate;
  27758. var _ref = [Math.min(minDate, maxDate), Math.max(minDate, maxDate)];
  27759. minDate = _ref[0];
  27760. maxDate = _ref[1];
  27761. var rows = this.rows;
  27762. for (var i = 0, k = rows.length; i < k; i++) {
  27763. var row = rows[i];
  27764. for (var j = 0, l = row.length; j < l; j++) {
  27765. var cell = row[j];
  27766. var index = i * 4 + j;
  27767. var time = new Date(this.date.getFullYear(), index).getTime();
  27768. cell.inRange = minDate && time >= minDate && time <= maxDate;
  27769. cell.start = minDate && time === minDate;
  27770. cell.end = maxDate && time === maxDate;
  27771. }
  27772. }
  27773. },
  27774. handleMouseMove: function handleMouseMove(event) {
  27775. if (!this.rangeState.selecting) return;
  27776. var target = event.target;
  27777. if (target.tagName === 'A') {
  27778. target = target.parentNode.parentNode;
  27779. }
  27780. if (target.tagName === 'DIV') {
  27781. target = target.parentNode;
  27782. }
  27783. if (target.tagName !== 'TD') return;
  27784. var row = target.parentNode.rowIndex;
  27785. var column = target.cellIndex;
  27786. // can not select disabled date
  27787. if (this.rows[row][column].disabled) return;
  27788. // only update rangeState when mouse moves to a new cell
  27789. // this avoids frequent Date object creation and improves performance
  27790. if (row !== this.lastRow || column !== this.lastColumn) {
  27791. this.lastRow = row;
  27792. this.lastColumn = column;
  27793. this.$emit('changerange', {
  27794. minDate: this.minDate,
  27795. maxDate: this.maxDate,
  27796. rangeState: {
  27797. selecting: true,
  27798. endDate: this.getMonthOfCell(row * 4 + column)
  27799. }
  27800. });
  27801. }
  27802. },
  27803. handleMonthTableClick: function handleMonthTableClick(event) {
  27804. var target = event.target;
  27805. if (target.tagName === 'A') {
  27806. target = target.parentNode.parentNode;
  27807. }
  27808. if (target.tagName === 'DIV') {
  27809. target = target.parentNode;
  27810. }
  27811. if (target.tagName !== 'TD') return;
  27812. if (Object(dom_["hasClass"])(target, 'disabled')) return;
  27813. var column = target.cellIndex;
  27814. var row = target.parentNode.rowIndex;
  27815. var month = row * 4 + column;
  27816. var newDate = this.getMonthOfCell(month);
  27817. if (this.selectionMode === 'range') {
  27818. if (!this.rangeState.selecting) {
  27819. this.$emit('pick', { minDate: newDate, maxDate: null });
  27820. this.rangeState.selecting = true;
  27821. } else {
  27822. if (newDate >= this.minDate) {
  27823. this.$emit('pick', { minDate: this.minDate, maxDate: newDate });
  27824. } else {
  27825. this.$emit('pick', { minDate: newDate, maxDate: this.minDate });
  27826. }
  27827. this.rangeState.selecting = false;
  27828. }
  27829. } else {
  27830. this.$emit('pick', month);
  27831. }
  27832. }
  27833. },
  27834. computed: {
  27835. rows: function rows() {
  27836. var _this2 = this;
  27837. // TODO: refactory rows / getCellClasses
  27838. var rows = this.tableRows;
  27839. var disabledDate = this.disabledDate;
  27840. var selectedDate = [];
  27841. var now = getMonthTimestamp(new Date());
  27842. for (var i = 0; i < 3; i++) {
  27843. var row = rows[i];
  27844. var _loop = function _loop(j) {
  27845. var cell = row[j];
  27846. if (!cell) {
  27847. cell = { row: i, column: j, type: 'normal', inRange: false, start: false, end: false };
  27848. }
  27849. cell.type = 'normal';
  27850. var index = i * 4 + j;
  27851. var time = new Date(_this2.date.getFullYear(), index).getTime();
  27852. cell.inRange = time >= getMonthTimestamp(_this2.minDate) && time <= getMonthTimestamp(_this2.maxDate);
  27853. cell.start = _this2.minDate && time === getMonthTimestamp(_this2.minDate);
  27854. cell.end = _this2.maxDate && time === getMonthTimestamp(_this2.maxDate);
  27855. var isToday = time === now;
  27856. if (isToday) {
  27857. cell.type = 'today';
  27858. }
  27859. cell.text = index;
  27860. var cellDate = new Date(time);
  27861. cell.disabled = typeof disabledDate === 'function' && disabledDate(cellDate);
  27862. cell.selected = Object(util_["arrayFind"])(selectedDate, function (date) {
  27863. return date.getTime() === cellDate.getTime();
  27864. });
  27865. _this2.$set(row, j, cell);
  27866. };
  27867. for (var j = 0; j < 4; j++) {
  27868. _loop(j);
  27869. }
  27870. }
  27871. return rows;
  27872. }
  27873. }
  27874. });
  27875. // CONCATENATED MODULE: ./packages/date-picker/src/basic/month-table.vue?vue&type=script&lang=js&
  27876. /* harmony default export */ var basic_month_tablevue_type_script_lang_js_ = (month_tablevue_type_script_lang_js_);
  27877. // CONCATENATED MODULE: ./packages/date-picker/src/basic/month-table.vue
  27878. /* normalize component */
  27879. var month_table_component = normalizeComponent(
  27880. basic_month_tablevue_type_script_lang_js_,
  27881. month_tablevue_type_template_id_654d4f42_render,
  27882. month_tablevue_type_template_id_654d4f42_staticRenderFns,
  27883. false,
  27884. null,
  27885. null,
  27886. null
  27887. )
  27888. /* hot reload */
  27889. if (false) { var month_table_api; }
  27890. month_table_component.options.__file = "packages/date-picker/src/basic/month-table.vue"
  27891. /* harmony default export */ var month_table = (month_table_component.exports);
  27892. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/date-table.vue?vue&type=template&id=5d1f3341&
  27893. var date_tablevue_type_template_id_5d1f3341_render = function() {
  27894. var _vm = this
  27895. var _h = _vm.$createElement
  27896. var _c = _vm._self._c || _h
  27897. return _c(
  27898. "table",
  27899. {
  27900. staticClass: "el-date-table",
  27901. class: { "is-week-mode": _vm.selectionMode === "week" },
  27902. attrs: { cellspacing: "0", cellpadding: "0" },
  27903. on: { click: _vm.handleClick, mousemove: _vm.handleMouseMove }
  27904. },
  27905. [
  27906. _c(
  27907. "tbody",
  27908. [
  27909. _c(
  27910. "tr",
  27911. [
  27912. _vm.showWeekNumber
  27913. ? _c("th", [_vm._v(_vm._s(_vm.t("el.datepicker.week")))])
  27914. : _vm._e(),
  27915. _vm._l(_vm.WEEKS, function(week, key) {
  27916. return _c("th", { key: key }, [
  27917. _vm._v(_vm._s(_vm.t("el.datepicker.weeks." + week)))
  27918. ])
  27919. })
  27920. ],
  27921. 2
  27922. ),
  27923. _vm._l(_vm.rows, function(row, key) {
  27924. return _c(
  27925. "tr",
  27926. {
  27927. key: key,
  27928. staticClass: "el-date-table__row",
  27929. class: { current: _vm.isWeekActive(row[1]) }
  27930. },
  27931. _vm._l(row, function(cell, key) {
  27932. return _c("td", { key: key, class: _vm.getCellClasses(cell) }, [
  27933. _c("div", [
  27934. _c("span", [
  27935. _vm._v("\n " + _vm._s(cell.text) + "\n ")
  27936. ])
  27937. ])
  27938. ])
  27939. }),
  27940. 0
  27941. )
  27942. })
  27943. ],
  27944. 2
  27945. )
  27946. ]
  27947. )
  27948. }
  27949. var date_tablevue_type_template_id_5d1f3341_staticRenderFns = []
  27950. date_tablevue_type_template_id_5d1f3341_render._withStripped = true
  27951. // CONCATENATED MODULE: ./packages/date-picker/src/basic/date-table.vue?vue&type=template&id=5d1f3341&
  27952. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/date-table.vue?vue&type=script&lang=js&
  27953. //
  27954. //
  27955. //
  27956. //
  27957. //
  27958. //
  27959. //
  27960. //
  27961. //
  27962. //
  27963. //
  27964. //
  27965. //
  27966. //
  27967. //
  27968. //
  27969. //
  27970. //
  27971. //
  27972. //
  27973. //
  27974. //
  27975. //
  27976. //
  27977. //
  27978. //
  27979. //
  27980. //
  27981. //
  27982. //
  27983. //
  27984. //
  27985. //
  27986. var _WEEKS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
  27987. var date_tablevue_type_script_lang_js_getDateTimestamp = function getDateTimestamp(time) {
  27988. if (typeof time === 'number' || typeof time === 'string') {
  27989. return Object(date_util_["clearTime"])(new Date(time)).getTime();
  27990. } else if (time instanceof Date) {
  27991. return Object(date_util_["clearTime"])(time).getTime();
  27992. } else {
  27993. return NaN;
  27994. }
  27995. };
  27996. // remove the first element that satisfies `pred` from arr
  27997. // return a new array if modification occurs
  27998. // return the original array otherwise
  27999. var date_tablevue_type_script_lang_js_removeFromArray = function removeFromArray(arr, pred) {
  28000. var idx = typeof pred === 'function' ? Object(util_["arrayFindIndex"])(arr, pred) : arr.indexOf(pred);
  28001. return idx >= 0 ? [].concat(arr.slice(0, idx), arr.slice(idx + 1)) : arr;
  28002. };
  28003. /* harmony default export */ var date_tablevue_type_script_lang_js_ = ({
  28004. mixins: [locale_default.a],
  28005. props: {
  28006. firstDayOfWeek: {
  28007. default: 7,
  28008. type: Number,
  28009. validator: function validator(val) {
  28010. return val >= 1 && val <= 7;
  28011. }
  28012. },
  28013. value: {},
  28014. defaultValue: {
  28015. validator: function validator(val) {
  28016. // either: null, valid Date object, Array of valid Date objects
  28017. return val === null || Object(date_util_["isDate"])(val) || Array.isArray(val) && val.every(date_util_["isDate"]);
  28018. }
  28019. },
  28020. date: {},
  28021. selectionMode: {
  28022. default: 'day'
  28023. },
  28024. showWeekNumber: {
  28025. type: Boolean,
  28026. default: false
  28027. },
  28028. disabledDate: {},
  28029. cellClassName: {},
  28030. minDate: {},
  28031. maxDate: {},
  28032. rangeState: {
  28033. default: function _default() {
  28034. return {
  28035. endDate: null,
  28036. selecting: false
  28037. };
  28038. }
  28039. }
  28040. },
  28041. computed: {
  28042. offsetDay: function offsetDay() {
  28043. var week = this.firstDayOfWeek;
  28044. // 周日为界限,左右偏移的天数,3217654 例如周一就是 -1,目的是调整前两行日期的位置
  28045. return week > 3 ? 7 - week : -week;
  28046. },
  28047. WEEKS: function WEEKS() {
  28048. var week = this.firstDayOfWeek;
  28049. return _WEEKS.concat(_WEEKS).slice(week, week + 7);
  28050. },
  28051. year: function year() {
  28052. return this.date.getFullYear();
  28053. },
  28054. month: function month() {
  28055. return this.date.getMonth();
  28056. },
  28057. startDate: function startDate() {
  28058. return Object(date_util_["getStartDateOfMonth"])(this.year, this.month);
  28059. },
  28060. rows: function rows() {
  28061. var _this = this;
  28062. // TODO: refactory rows / getCellClasses
  28063. var date = new Date(this.year, this.month, 1);
  28064. var day = Object(date_util_["getFirstDayOfMonth"])(date); // day of first day
  28065. var dateCountOfMonth = Object(date_util_["getDayCountOfMonth"])(date.getFullYear(), date.getMonth());
  28066. var dateCountOfLastMonth = Object(date_util_["getDayCountOfMonth"])(date.getFullYear(), date.getMonth() === 0 ? 11 : date.getMonth() - 1);
  28067. day = day === 0 ? 7 : day;
  28068. var offset = this.offsetDay;
  28069. var rows = this.tableRows;
  28070. var count = 1;
  28071. var startDate = this.startDate;
  28072. var disabledDate = this.disabledDate;
  28073. var cellClassName = this.cellClassName;
  28074. var selectedDate = this.selectionMode === 'dates' ? Object(util_["coerceTruthyValueToArray"])(this.value) : [];
  28075. var now = date_tablevue_type_script_lang_js_getDateTimestamp(new Date());
  28076. for (var i = 0; i < 6; i++) {
  28077. var row = rows[i];
  28078. if (this.showWeekNumber) {
  28079. if (!row[0]) {
  28080. row[0] = { type: 'week', text: Object(date_util_["getWeekNumber"])(Object(date_util_["nextDate"])(startDate, i * 7 + 1)) };
  28081. }
  28082. }
  28083. var _loop = function _loop(j) {
  28084. var cell = row[_this.showWeekNumber ? j + 1 : j];
  28085. if (!cell) {
  28086. cell = { row: i, column: j, type: 'normal', inRange: false, start: false, end: false };
  28087. }
  28088. cell.type = 'normal';
  28089. var index = i * 7 + j;
  28090. var time = Object(date_util_["nextDate"])(startDate, index - offset).getTime();
  28091. cell.inRange = time >= date_tablevue_type_script_lang_js_getDateTimestamp(_this.minDate) && time <= date_tablevue_type_script_lang_js_getDateTimestamp(_this.maxDate);
  28092. cell.start = _this.minDate && time === date_tablevue_type_script_lang_js_getDateTimestamp(_this.minDate);
  28093. cell.end = _this.maxDate && time === date_tablevue_type_script_lang_js_getDateTimestamp(_this.maxDate);
  28094. var isToday = time === now;
  28095. if (isToday) {
  28096. cell.type = 'today';
  28097. }
  28098. if (i >= 0 && i <= 1) {
  28099. var numberOfDaysFromPreviousMonth = day + offset < 0 ? 7 + day + offset : day + offset;
  28100. if (j + i * 7 >= numberOfDaysFromPreviousMonth) {
  28101. cell.text = count++;
  28102. } else {
  28103. cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - j % 7) + 1 + i * 7;
  28104. cell.type = 'prev-month';
  28105. }
  28106. } else {
  28107. if (count <= dateCountOfMonth) {
  28108. cell.text = count++;
  28109. } else {
  28110. cell.text = count++ - dateCountOfMonth;
  28111. cell.type = 'next-month';
  28112. }
  28113. }
  28114. var cellDate = new Date(time);
  28115. cell.disabled = typeof disabledDate === 'function' && disabledDate(cellDate);
  28116. cell.selected = Object(util_["arrayFind"])(selectedDate, function (date) {
  28117. return date.getTime() === cellDate.getTime();
  28118. });
  28119. cell.customClass = typeof cellClassName === 'function' && cellClassName(cellDate);
  28120. _this.$set(row, _this.showWeekNumber ? j + 1 : j, cell);
  28121. };
  28122. for (var j = 0; j < 7; j++) {
  28123. _loop(j);
  28124. }
  28125. if (this.selectionMode === 'week') {
  28126. var start = this.showWeekNumber ? 1 : 0;
  28127. var end = this.showWeekNumber ? 7 : 6;
  28128. var isWeekActive = this.isWeekActive(row[start + 1]);
  28129. row[start].inRange = isWeekActive;
  28130. row[start].start = isWeekActive;
  28131. row[end].inRange = isWeekActive;
  28132. row[end].end = isWeekActive;
  28133. }
  28134. }
  28135. return rows;
  28136. }
  28137. },
  28138. watch: {
  28139. 'rangeState.endDate': function rangeStateEndDate(newVal) {
  28140. this.markRange(this.minDate, newVal);
  28141. },
  28142. minDate: function minDate(newVal, oldVal) {
  28143. if (date_tablevue_type_script_lang_js_getDateTimestamp(newVal) !== date_tablevue_type_script_lang_js_getDateTimestamp(oldVal)) {
  28144. this.markRange(this.minDate, this.maxDate);
  28145. }
  28146. },
  28147. maxDate: function maxDate(newVal, oldVal) {
  28148. if (date_tablevue_type_script_lang_js_getDateTimestamp(newVal) !== date_tablevue_type_script_lang_js_getDateTimestamp(oldVal)) {
  28149. this.markRange(this.minDate, this.maxDate);
  28150. }
  28151. }
  28152. },
  28153. data: function data() {
  28154. return {
  28155. tableRows: [[], [], [], [], [], []],
  28156. lastRow: null,
  28157. lastColumn: null
  28158. };
  28159. },
  28160. methods: {
  28161. cellMatchesDate: function cellMatchesDate(cell, date) {
  28162. var value = new Date(date);
  28163. return this.year === value.getFullYear() && this.month === value.getMonth() && Number(cell.text) === value.getDate();
  28164. },
  28165. getCellClasses: function getCellClasses(cell) {
  28166. var _this2 = this;
  28167. var selectionMode = this.selectionMode;
  28168. var defaultValue = this.defaultValue ? Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue] : [];
  28169. var classes = [];
  28170. if ((cell.type === 'normal' || cell.type === 'today') && !cell.disabled) {
  28171. classes.push('available');
  28172. if (cell.type === 'today') {
  28173. classes.push('today');
  28174. }
  28175. } else {
  28176. classes.push(cell.type);
  28177. }
  28178. if (cell.type === 'normal' && defaultValue.some(function (date) {
  28179. return _this2.cellMatchesDate(cell, date);
  28180. })) {
  28181. classes.push('default');
  28182. }
  28183. if (selectionMode === 'day' && (cell.type === 'normal' || cell.type === 'today') && this.cellMatchesDate(cell, this.value)) {
  28184. classes.push('current');
  28185. }
  28186. if (cell.inRange && (cell.type === 'normal' || cell.type === 'today' || this.selectionMode === 'week')) {
  28187. classes.push('in-range');
  28188. if (cell.start) {
  28189. classes.push('start-date');
  28190. }
  28191. if (cell.end) {
  28192. classes.push('end-date');
  28193. }
  28194. }
  28195. if (cell.disabled) {
  28196. classes.push('disabled');
  28197. }
  28198. if (cell.selected) {
  28199. classes.push('selected');
  28200. }
  28201. if (cell.customClass) {
  28202. classes.push(cell.customClass);
  28203. }
  28204. return classes.join(' ');
  28205. },
  28206. getDateOfCell: function getDateOfCell(row, column) {
  28207. var offsetFromStart = row * 7 + (column - (this.showWeekNumber ? 1 : 0)) - this.offsetDay;
  28208. return Object(date_util_["nextDate"])(this.startDate, offsetFromStart);
  28209. },
  28210. isWeekActive: function isWeekActive(cell) {
  28211. if (this.selectionMode !== 'week') return false;
  28212. var newDate = new Date(this.year, this.month, 1);
  28213. var year = newDate.getFullYear();
  28214. var month = newDate.getMonth();
  28215. if (cell.type === 'prev-month') {
  28216. newDate.setMonth(month === 0 ? 11 : month - 1);
  28217. newDate.setFullYear(month === 0 ? year - 1 : year);
  28218. }
  28219. if (cell.type === 'next-month') {
  28220. newDate.setMonth(month === 11 ? 0 : month + 1);
  28221. newDate.setFullYear(month === 11 ? year + 1 : year);
  28222. }
  28223. newDate.setDate(parseInt(cell.text, 10));
  28224. if (Object(date_util_["isDate"])(this.value)) {
  28225. var dayOffset = (this.value.getDay() - this.firstDayOfWeek + 7) % 7 - 1;
  28226. var weekDate = Object(date_util_["prevDate"])(this.value, dayOffset);
  28227. return weekDate.getTime() === newDate.getTime();
  28228. }
  28229. return false;
  28230. },
  28231. markRange: function markRange(minDate, maxDate) {
  28232. minDate = date_tablevue_type_script_lang_js_getDateTimestamp(minDate);
  28233. maxDate = date_tablevue_type_script_lang_js_getDateTimestamp(maxDate) || minDate;
  28234. var _ref = [Math.min(minDate, maxDate), Math.max(minDate, maxDate)];
  28235. minDate = _ref[0];
  28236. maxDate = _ref[1];
  28237. var startDate = this.startDate;
  28238. var rows = this.rows;
  28239. for (var i = 0, k = rows.length; i < k; i++) {
  28240. var row = rows[i];
  28241. for (var j = 0, l = row.length; j < l; j++) {
  28242. if (this.showWeekNumber && j === 0) continue;
  28243. var _cell = row[j];
  28244. var index = i * 7 + j + (this.showWeekNumber ? -1 : 0);
  28245. var time = Object(date_util_["nextDate"])(startDate, index - this.offsetDay).getTime();
  28246. _cell.inRange = minDate && time >= minDate && time <= maxDate;
  28247. _cell.start = minDate && time === minDate;
  28248. _cell.end = maxDate && time === maxDate;
  28249. }
  28250. }
  28251. },
  28252. handleMouseMove: function handleMouseMove(event) {
  28253. if (!this.rangeState.selecting) return;
  28254. var target = event.target;
  28255. if (target.tagName === 'SPAN') {
  28256. target = target.parentNode.parentNode;
  28257. }
  28258. if (target.tagName === 'DIV') {
  28259. target = target.parentNode;
  28260. }
  28261. if (target.tagName !== 'TD') return;
  28262. var row = target.parentNode.rowIndex - 1;
  28263. var column = target.cellIndex;
  28264. // can not select disabled date
  28265. if (this.rows[row][column].disabled) return;
  28266. // only update rangeState when mouse moves to a new cell
  28267. // this avoids frequent Date object creation and improves performance
  28268. if (row !== this.lastRow || column !== this.lastColumn) {
  28269. this.lastRow = row;
  28270. this.lastColumn = column;
  28271. this.$emit('changerange', {
  28272. minDate: this.minDate,
  28273. maxDate: this.maxDate,
  28274. rangeState: {
  28275. selecting: true,
  28276. endDate: this.getDateOfCell(row, column)
  28277. }
  28278. });
  28279. }
  28280. },
  28281. handleClick: function handleClick(event) {
  28282. var target = event.target;
  28283. if (target.tagName === 'SPAN') {
  28284. target = target.parentNode.parentNode;
  28285. }
  28286. if (target.tagName === 'DIV') {
  28287. target = target.parentNode;
  28288. }
  28289. if (target.tagName !== 'TD') return;
  28290. var row = target.parentNode.rowIndex - 1;
  28291. var column = this.selectionMode === 'week' ? 1 : target.cellIndex;
  28292. var cell = this.rows[row][column];
  28293. if (cell.disabled || cell.type === 'week') return;
  28294. var newDate = this.getDateOfCell(row, column);
  28295. if (this.selectionMode === 'range') {
  28296. if (!this.rangeState.selecting) {
  28297. this.$emit('pick', { minDate: newDate, maxDate: null });
  28298. this.rangeState.selecting = true;
  28299. } else {
  28300. if (newDate >= this.minDate) {
  28301. this.$emit('pick', { minDate: this.minDate, maxDate: newDate });
  28302. } else {
  28303. this.$emit('pick', { minDate: newDate, maxDate: this.minDate });
  28304. }
  28305. this.rangeState.selecting = false;
  28306. }
  28307. } else if (this.selectionMode === 'day') {
  28308. this.$emit('pick', newDate);
  28309. } else if (this.selectionMode === 'week') {
  28310. var weekNumber = Object(date_util_["getWeekNumber"])(newDate);
  28311. var value = newDate.getFullYear() + 'w' + weekNumber;
  28312. this.$emit('pick', {
  28313. year: newDate.getFullYear(),
  28314. week: weekNumber,
  28315. value: value,
  28316. date: newDate
  28317. });
  28318. } else if (this.selectionMode === 'dates') {
  28319. var _value = this.value || [];
  28320. var newValue = cell.selected ? date_tablevue_type_script_lang_js_removeFromArray(_value, function (date) {
  28321. return date.getTime() === newDate.getTime();
  28322. }) : [].concat(_value, [newDate]);
  28323. this.$emit('pick', newValue);
  28324. }
  28325. }
  28326. }
  28327. });
  28328. // CONCATENATED MODULE: ./packages/date-picker/src/basic/date-table.vue?vue&type=script&lang=js&
  28329. /* harmony default export */ var basic_date_tablevue_type_script_lang_js_ = (date_tablevue_type_script_lang_js_);
  28330. // CONCATENATED MODULE: ./packages/date-picker/src/basic/date-table.vue
  28331. /* normalize component */
  28332. var date_table_component = normalizeComponent(
  28333. basic_date_tablevue_type_script_lang_js_,
  28334. date_tablevue_type_template_id_5d1f3341_render,
  28335. date_tablevue_type_template_id_5d1f3341_staticRenderFns,
  28336. false,
  28337. null,
  28338. null,
  28339. null
  28340. )
  28341. /* hot reload */
  28342. if (false) { var date_table_api; }
  28343. date_table_component.options.__file = "packages/date-picker/src/basic/date-table.vue"
  28344. /* harmony default export */ var date_table = (date_table_component.exports);
  28345. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date.vue?vue&type=script&lang=js&
  28346. //
  28347. //
  28348. //
  28349. //
  28350. //
  28351. //
  28352. //
  28353. //
  28354. //
  28355. //
  28356. //
  28357. //
  28358. //
  28359. //
  28360. //
  28361. //
  28362. //
  28363. //
  28364. //
  28365. //
  28366. //
  28367. //
  28368. //
  28369. //
  28370. //
  28371. //
  28372. //
  28373. //
  28374. //
  28375. //
  28376. //
  28377. //
  28378. //
  28379. //
  28380. //
  28381. //
  28382. //
  28383. //
  28384. //
  28385. //
  28386. //
  28387. //
  28388. //
  28389. //
  28390. //
  28391. //
  28392. //
  28393. //
  28394. //
  28395. //
  28396. //
  28397. //
  28398. //
  28399. //
  28400. //
  28401. //
  28402. //
  28403. //
  28404. //
  28405. //
  28406. //
  28407. //
  28408. //
  28409. //
  28410. //
  28411. //
  28412. //
  28413. //
  28414. //
  28415. //
  28416. //
  28417. //
  28418. //
  28419. //
  28420. //
  28421. //
  28422. //
  28423. //
  28424. //
  28425. //
  28426. //
  28427. //
  28428. //
  28429. //
  28430. //
  28431. //
  28432. //
  28433. //
  28434. //
  28435. //
  28436. //
  28437. //
  28438. //
  28439. //
  28440. //
  28441. //
  28442. //
  28443. //
  28444. //
  28445. //
  28446. //
  28447. //
  28448. //
  28449. //
  28450. //
  28451. //
  28452. //
  28453. //
  28454. //
  28455. //
  28456. //
  28457. //
  28458. //
  28459. //
  28460. //
  28461. //
  28462. //
  28463. //
  28464. //
  28465. //
  28466. //
  28467. //
  28468. //
  28469. //
  28470. //
  28471. //
  28472. //
  28473. //
  28474. //
  28475. //
  28476. //
  28477. //
  28478. //
  28479. //
  28480. //
  28481. //
  28482. //
  28483. //
  28484. //
  28485. //
  28486. //
  28487. //
  28488. //
  28489. //
  28490. /* harmony default export */ var datevue_type_script_lang_js_ = ({
  28491. mixins: [locale_default.a],
  28492. directives: { Clickoutside: clickoutside_default.a },
  28493. watch: {
  28494. showTime: function showTime(val) {
  28495. var _this = this;
  28496. /* istanbul ignore if */
  28497. if (!val) return;
  28498. this.$nextTick(function (_) {
  28499. var inputElm = _this.$refs.input.$el;
  28500. if (inputElm) {
  28501. _this.pickerWidth = inputElm.getBoundingClientRect().width + 10;
  28502. }
  28503. });
  28504. },
  28505. value: function value(val) {
  28506. if (this.selectionMode === 'dates' && this.value) return;
  28507. if (Object(date_util_["isDate"])(val)) {
  28508. this.date = new Date(val);
  28509. } else {
  28510. this.date = this.getDefaultValue();
  28511. }
  28512. },
  28513. defaultValue: function defaultValue(val) {
  28514. if (!Object(date_util_["isDate"])(this.value)) {
  28515. this.date = val ? new Date(val) : new Date();
  28516. }
  28517. },
  28518. timePickerVisible: function timePickerVisible(val) {
  28519. var _this2 = this;
  28520. if (val) this.$nextTick(function () {
  28521. return _this2.$refs.timepicker.adjustSpinners();
  28522. });
  28523. },
  28524. selectionMode: function selectionMode(newVal) {
  28525. if (newVal === 'month') {
  28526. /* istanbul ignore next */
  28527. if (this.currentView !== 'year' || this.currentView !== 'month') {
  28528. this.currentView = 'month';
  28529. }
  28530. } else if (newVal === 'dates') {
  28531. this.currentView = 'date';
  28532. }
  28533. }
  28534. },
  28535. methods: {
  28536. proxyTimePickerDataProperties: function proxyTimePickerDataProperties() {
  28537. var _this3 = this;
  28538. var format = function format(timeFormat) {
  28539. _this3.$refs.timepicker.format = timeFormat;
  28540. };
  28541. var value = function value(_value) {
  28542. _this3.$refs.timepicker.value = _value;
  28543. };
  28544. var date = function date(_date) {
  28545. _this3.$refs.timepicker.date = _date;
  28546. };
  28547. var selectableRange = function selectableRange(_selectableRange) {
  28548. _this3.$refs.timepicker.selectableRange = _selectableRange;
  28549. };
  28550. this.$watch('value', value);
  28551. this.$watch('date', date);
  28552. this.$watch('selectableRange', selectableRange);
  28553. format(this.timeFormat);
  28554. value(this.value);
  28555. date(this.date);
  28556. selectableRange(this.selectableRange);
  28557. },
  28558. handleClear: function handleClear() {
  28559. this.date = this.getDefaultValue();
  28560. this.$emit('pick', null);
  28561. },
  28562. emit: function emit(value) {
  28563. var _this4 = this;
  28564. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  28565. args[_key - 1] = arguments[_key];
  28566. }
  28567. if (!value) {
  28568. this.$emit.apply(this, ['pick', value].concat(args));
  28569. } else if (Array.isArray(value)) {
  28570. var dates = value.map(function (date) {
  28571. return _this4.showTime ? Object(date_util_["clearMilliseconds"])(date) : Object(date_util_["clearTime"])(date);
  28572. });
  28573. this.$emit.apply(this, ['pick', dates].concat(args));
  28574. } else {
  28575. this.$emit.apply(this, ['pick', this.showTime ? Object(date_util_["clearMilliseconds"])(value) : Object(date_util_["clearTime"])(value)].concat(args));
  28576. }
  28577. this.userInputDate = null;
  28578. this.userInputTime = null;
  28579. },
  28580. // resetDate() {
  28581. // this.date = new Date(this.date);
  28582. // },
  28583. showMonthPicker: function showMonthPicker() {
  28584. this.currentView = 'month';
  28585. },
  28586. showYearPicker: function showYearPicker() {
  28587. this.currentView = 'year';
  28588. },
  28589. // XXX: 没用到
  28590. // handleLabelClick() {
  28591. // if (this.currentView === 'date') {
  28592. // this.showMonthPicker();
  28593. // } else if (this.currentView === 'month') {
  28594. // this.showYearPicker();
  28595. // }
  28596. // },
  28597. prevMonth: function prevMonth() {
  28598. this.date = Object(date_util_["prevMonth"])(this.date);
  28599. },
  28600. nextMonth: function nextMonth() {
  28601. this.date = Object(date_util_["nextMonth"])(this.date);
  28602. },
  28603. prevYear: function prevYear() {
  28604. if (this.currentView === 'year') {
  28605. this.date = Object(date_util_["prevYear"])(this.date, 10);
  28606. } else {
  28607. this.date = Object(date_util_["prevYear"])(this.date);
  28608. }
  28609. },
  28610. nextYear: function nextYear() {
  28611. if (this.currentView === 'year') {
  28612. this.date = Object(date_util_["nextYear"])(this.date, 10);
  28613. } else {
  28614. this.date = Object(date_util_["nextYear"])(this.date);
  28615. }
  28616. },
  28617. handleShortcutClick: function handleShortcutClick(shortcut) {
  28618. if (shortcut.onClick) {
  28619. shortcut.onClick(this);
  28620. }
  28621. },
  28622. handleTimePick: function handleTimePick(value, visible, first) {
  28623. if (Object(date_util_["isDate"])(value)) {
  28624. var newDate = this.value ? Object(date_util_["modifyTime"])(this.value, value.getHours(), value.getMinutes(), value.getSeconds()) : Object(date_util_["modifyWithTimeString"])(this.getDefaultValue(), this.defaultTime);
  28625. this.date = newDate;
  28626. this.emit(this.date, true);
  28627. } else {
  28628. this.emit(value, true);
  28629. }
  28630. if (!first) {
  28631. this.timePickerVisible = visible;
  28632. }
  28633. },
  28634. handleTimePickClose: function handleTimePickClose() {
  28635. this.timePickerVisible = false;
  28636. },
  28637. handleMonthPick: function handleMonthPick(month) {
  28638. if (this.selectionMode === 'month') {
  28639. this.date = Object(date_util_["modifyDate"])(this.date, this.year, month, 1);
  28640. this.emit(this.date);
  28641. } else {
  28642. this.date = Object(date_util_["changeYearMonthAndClampDate"])(this.date, this.year, month);
  28643. // TODO: should emit intermediate value ??
  28644. // this.emit(this.date);
  28645. this.currentView = 'date';
  28646. }
  28647. },
  28648. handleDatePick: function handleDatePick(value) {
  28649. if (this.selectionMode === 'day') {
  28650. var newDate = this.value ? Object(date_util_["modifyDate"])(this.value, value.getFullYear(), value.getMonth(), value.getDate()) : Object(date_util_["modifyWithTimeString"])(value, this.defaultTime);
  28651. // change default time while out of selectableRange
  28652. if (!this.checkDateWithinRange(newDate)) {
  28653. newDate = Object(date_util_["modifyDate"])(this.selectableRange[0][0], value.getFullYear(), value.getMonth(), value.getDate());
  28654. }
  28655. this.date = newDate;
  28656. this.emit(this.date, this.showTime);
  28657. } else if (this.selectionMode === 'week') {
  28658. this.emit(value.date);
  28659. } else if (this.selectionMode === 'dates') {
  28660. this.emit(value, true); // set false to keep panel open
  28661. }
  28662. },
  28663. handleYearPick: function handleYearPick(year) {
  28664. if (this.selectionMode === 'year') {
  28665. this.date = Object(date_util_["modifyDate"])(this.date, year, 0, 1);
  28666. this.emit(this.date);
  28667. } else {
  28668. this.date = Object(date_util_["changeYearMonthAndClampDate"])(this.date, year, this.month);
  28669. // TODO: should emit intermediate value ??
  28670. // this.emit(this.date, true);
  28671. this.currentView = 'month';
  28672. }
  28673. },
  28674. changeToNow: function changeToNow() {
  28675. // NOTE: not a permanent solution
  28676. // consider disable "now" button in the future
  28677. if ((!this.disabledDate || !this.disabledDate(new Date())) && this.checkDateWithinRange(new Date())) {
  28678. this.date = new Date();
  28679. this.emit(this.date);
  28680. }
  28681. },
  28682. confirm: function confirm() {
  28683. if (this.selectionMode === 'dates') {
  28684. this.emit(this.value);
  28685. } else {
  28686. // value were emitted in handle{Date,Time}Pick, nothing to update here
  28687. // deal with the scenario where: user opens the picker, then confirm without doing anything
  28688. var value = this.value ? this.value : Object(date_util_["modifyWithTimeString"])(this.getDefaultValue(), this.defaultTime);
  28689. this.date = new Date(value); // refresh date
  28690. this.emit(value);
  28691. }
  28692. },
  28693. resetView: function resetView() {
  28694. if (this.selectionMode === 'month') {
  28695. this.currentView = 'month';
  28696. } else if (this.selectionMode === 'year') {
  28697. this.currentView = 'year';
  28698. } else {
  28699. this.currentView = 'date';
  28700. }
  28701. },
  28702. handleEnter: function handleEnter() {
  28703. document.body.addEventListener('keydown', this.handleKeydown);
  28704. },
  28705. handleLeave: function handleLeave() {
  28706. this.$emit('dodestroy');
  28707. document.body.removeEventListener('keydown', this.handleKeydown);
  28708. },
  28709. handleKeydown: function handleKeydown(event) {
  28710. var keyCode = event.keyCode;
  28711. var list = [38, 40, 37, 39];
  28712. if (this.visible && !this.timePickerVisible) {
  28713. if (list.indexOf(keyCode) !== -1) {
  28714. this.handleKeyControl(keyCode);
  28715. event.stopPropagation();
  28716. event.preventDefault();
  28717. }
  28718. if (keyCode === 13 && this.userInputDate === null && this.userInputTime === null) {
  28719. // Enter
  28720. this.emit(this.date, false);
  28721. }
  28722. }
  28723. },
  28724. handleKeyControl: function handleKeyControl(keyCode) {
  28725. var mapping = {
  28726. 'year': {
  28727. 38: -4, 40: 4, 37: -1, 39: 1, offset: function offset(date, step) {
  28728. return date.setFullYear(date.getFullYear() + step);
  28729. }
  28730. },
  28731. 'month': {
  28732. 38: -4, 40: 4, 37: -1, 39: 1, offset: function offset(date, step) {
  28733. return date.setMonth(date.getMonth() + step);
  28734. }
  28735. },
  28736. 'week': {
  28737. 38: -1, 40: 1, 37: -1, 39: 1, offset: function offset(date, step) {
  28738. return date.setDate(date.getDate() + step * 7);
  28739. }
  28740. },
  28741. 'day': {
  28742. 38: -7, 40: 7, 37: -1, 39: 1, offset: function offset(date, step) {
  28743. return date.setDate(date.getDate() + step);
  28744. }
  28745. }
  28746. };
  28747. var mode = this.selectionMode;
  28748. var year = 3.1536e10;
  28749. var now = this.date.getTime();
  28750. var newDate = new Date(this.date.getTime());
  28751. while (Math.abs(now - newDate.getTime()) <= year) {
  28752. var map = mapping[mode];
  28753. map.offset(newDate, map[keyCode]);
  28754. if (typeof this.disabledDate === 'function' && this.disabledDate(newDate)) {
  28755. continue;
  28756. }
  28757. this.date = newDate;
  28758. this.$emit('pick', newDate, true);
  28759. break;
  28760. }
  28761. },
  28762. handleVisibleTimeChange: function handleVisibleTimeChange(value) {
  28763. var time = Object(date_util_["parseDate"])(value, this.timeFormat);
  28764. if (time && this.checkDateWithinRange(time)) {
  28765. this.date = Object(date_util_["modifyDate"])(time, this.year, this.month, this.monthDate);
  28766. this.userInputTime = null;
  28767. this.$refs.timepicker.value = this.date;
  28768. this.timePickerVisible = false;
  28769. this.emit(this.date, true);
  28770. }
  28771. },
  28772. handleVisibleDateChange: function handleVisibleDateChange(value) {
  28773. var date = Object(date_util_["parseDate"])(value, this.dateFormat);
  28774. if (date) {
  28775. if (typeof this.disabledDate === 'function' && this.disabledDate(date)) {
  28776. return;
  28777. }
  28778. this.date = Object(date_util_["modifyTime"])(date, this.date.getHours(), this.date.getMinutes(), this.date.getSeconds());
  28779. this.userInputDate = null;
  28780. this.resetView();
  28781. this.emit(this.date, true);
  28782. }
  28783. },
  28784. isValidValue: function isValidValue(value) {
  28785. return value && !isNaN(value) && (typeof this.disabledDate === 'function' ? !this.disabledDate(value) : true) && this.checkDateWithinRange(value);
  28786. },
  28787. getDefaultValue: function getDefaultValue() {
  28788. // if default-value is set, return it
  28789. // otherwise, return now (the moment this method gets called)
  28790. return this.defaultValue ? new Date(this.defaultValue) : new Date();
  28791. },
  28792. checkDateWithinRange: function checkDateWithinRange(date) {
  28793. return this.selectableRange.length > 0 ? Object(date_util_["timeWithinRange"])(date, this.selectableRange, this.format || 'HH:mm:ss') : true;
  28794. }
  28795. },
  28796. components: {
  28797. TimePicker: panel_time, YearTable: year_table, MonthTable: month_table, DateTable: date_table, ElInput: input_default.a, ElButton: button_default.a
  28798. },
  28799. data: function data() {
  28800. return {
  28801. popperClass: '',
  28802. date: new Date(),
  28803. value: '',
  28804. defaultValue: null, // use getDefaultValue() for time computation
  28805. defaultTime: null,
  28806. showTime: false,
  28807. selectionMode: 'day',
  28808. shortcuts: '',
  28809. visible: false,
  28810. currentView: 'date',
  28811. disabledDate: '',
  28812. cellClassName: '',
  28813. selectableRange: [],
  28814. firstDayOfWeek: 7,
  28815. showWeekNumber: false,
  28816. timePickerVisible: false,
  28817. format: '',
  28818. arrowControl: false,
  28819. userInputDate: null,
  28820. userInputTime: null
  28821. };
  28822. },
  28823. computed: {
  28824. year: function year() {
  28825. return this.date.getFullYear();
  28826. },
  28827. month: function month() {
  28828. return this.date.getMonth();
  28829. },
  28830. week: function week() {
  28831. return Object(date_util_["getWeekNumber"])(this.date);
  28832. },
  28833. monthDate: function monthDate() {
  28834. return this.date.getDate();
  28835. },
  28836. footerVisible: function footerVisible() {
  28837. return this.showTime || this.selectionMode === 'dates';
  28838. },
  28839. visibleTime: function visibleTime() {
  28840. if (this.userInputTime !== null) {
  28841. return this.userInputTime;
  28842. } else {
  28843. return Object(date_util_["formatDate"])(this.value || this.defaultValue, this.timeFormat);
  28844. }
  28845. },
  28846. visibleDate: function visibleDate() {
  28847. if (this.userInputDate !== null) {
  28848. return this.userInputDate;
  28849. } else {
  28850. return Object(date_util_["formatDate"])(this.value || this.defaultValue, this.dateFormat);
  28851. }
  28852. },
  28853. yearLabel: function yearLabel() {
  28854. var yearTranslation = this.t('el.datepicker.year');
  28855. if (this.currentView === 'year') {
  28856. var startYear = Math.floor(this.year / 10) * 10;
  28857. if (yearTranslation) {
  28858. return startYear + ' ' + yearTranslation + ' - ' + (startYear + 9) + ' ' + yearTranslation;
  28859. }
  28860. return startYear + ' - ' + (startYear + 9);
  28861. }
  28862. return this.year + ' ' + yearTranslation;
  28863. },
  28864. timeFormat: function timeFormat() {
  28865. if (this.format) {
  28866. return Object(date_util_["extractTimeFormat"])(this.format);
  28867. } else {
  28868. return 'HH:mm:ss';
  28869. }
  28870. },
  28871. dateFormat: function dateFormat() {
  28872. if (this.format) {
  28873. return Object(date_util_["extractDateFormat"])(this.format);
  28874. } else {
  28875. return 'yyyy-MM-dd';
  28876. }
  28877. }
  28878. }
  28879. });
  28880. // CONCATENATED MODULE: ./packages/date-picker/src/panel/date.vue?vue&type=script&lang=js&
  28881. /* harmony default export */ var panel_datevue_type_script_lang_js_ = (datevue_type_script_lang_js_);
  28882. // CONCATENATED MODULE: ./packages/date-picker/src/panel/date.vue
  28883. /* normalize component */
  28884. var date_component = normalizeComponent(
  28885. panel_datevue_type_script_lang_js_,
  28886. datevue_type_template_id_2440d4ea_render,
  28887. datevue_type_template_id_2440d4ea_staticRenderFns,
  28888. false,
  28889. null,
  28890. null,
  28891. null
  28892. )
  28893. /* hot reload */
  28894. if (false) { var date_api; }
  28895. date_component.options.__file = "packages/date-picker/src/panel/date.vue"
  28896. /* harmony default export */ var panel_date = (date_component.exports);
  28897. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date-range.vue?vue&type=template&id=2652849a&
  28898. var date_rangevue_type_template_id_2652849a_render = function() {
  28899. var _vm = this
  28900. var _h = _vm.$createElement
  28901. var _c = _vm._self._c || _h
  28902. return _c(
  28903. "transition",
  28904. {
  28905. attrs: { name: "el-zoom-in-top" },
  28906. on: {
  28907. "after-leave": function($event) {
  28908. _vm.$emit("dodestroy")
  28909. }
  28910. }
  28911. },
  28912. [
  28913. _c(
  28914. "div",
  28915. {
  28916. directives: [
  28917. {
  28918. name: "show",
  28919. rawName: "v-show",
  28920. value: _vm.visible,
  28921. expression: "visible"
  28922. }
  28923. ],
  28924. staticClass: "el-picker-panel el-date-range-picker el-popper",
  28925. class: [
  28926. {
  28927. "has-sidebar": _vm.$slots.sidebar || _vm.shortcuts,
  28928. "has-time": _vm.showTime
  28929. },
  28930. _vm.popperClass
  28931. ]
  28932. },
  28933. [
  28934. _c(
  28935. "div",
  28936. { staticClass: "el-picker-panel__body-wrapper" },
  28937. [
  28938. _vm._t("sidebar"),
  28939. _vm.shortcuts
  28940. ? _c(
  28941. "div",
  28942. { staticClass: "el-picker-panel__sidebar" },
  28943. _vm._l(_vm.shortcuts, function(shortcut, key) {
  28944. return _c(
  28945. "button",
  28946. {
  28947. key: key,
  28948. staticClass: "el-picker-panel__shortcut",
  28949. attrs: { type: "button" },
  28950. on: {
  28951. click: function($event) {
  28952. _vm.handleShortcutClick(shortcut)
  28953. }
  28954. }
  28955. },
  28956. [_vm._v(_vm._s(shortcut.text))]
  28957. )
  28958. }),
  28959. 0
  28960. )
  28961. : _vm._e(),
  28962. _c("div", { staticClass: "el-picker-panel__body" }, [
  28963. _vm.showTime
  28964. ? _c(
  28965. "div",
  28966. { staticClass: "el-date-range-picker__time-header" },
  28967. [
  28968. _c(
  28969. "span",
  28970. { staticClass: "el-date-range-picker__editors-wrap" },
  28971. [
  28972. _c(
  28973. "span",
  28974. {
  28975. staticClass:
  28976. "el-date-range-picker__time-picker-wrap"
  28977. },
  28978. [
  28979. _c("el-input", {
  28980. ref: "minInput",
  28981. staticClass: "el-date-range-picker__editor",
  28982. attrs: {
  28983. size: "small",
  28984. disabled: _vm.rangeState.selecting,
  28985. placeholder: _vm.t(
  28986. "el.datepicker.startDate"
  28987. ),
  28988. value: _vm.minVisibleDate
  28989. },
  28990. on: {
  28991. input: function(val) {
  28992. return _vm.handleDateInput(val, "min")
  28993. },
  28994. change: function(val) {
  28995. return _vm.handleDateChange(val, "min")
  28996. }
  28997. }
  28998. })
  28999. ],
  29000. 1
  29001. ),
  29002. _c(
  29003. "span",
  29004. {
  29005. directives: [
  29006. {
  29007. name: "clickoutside",
  29008. rawName: "v-clickoutside",
  29009. value: _vm.handleMinTimeClose,
  29010. expression: "handleMinTimeClose"
  29011. }
  29012. ],
  29013. staticClass:
  29014. "el-date-range-picker__time-picker-wrap"
  29015. },
  29016. [
  29017. _c("el-input", {
  29018. staticClass: "el-date-range-picker__editor",
  29019. attrs: {
  29020. size: "small",
  29021. disabled: _vm.rangeState.selecting,
  29022. placeholder: _vm.t(
  29023. "el.datepicker.startTime"
  29024. ),
  29025. value: _vm.minVisibleTime
  29026. },
  29027. on: {
  29028. focus: function($event) {
  29029. _vm.minTimePickerVisible = true
  29030. },
  29031. input: function(val) {
  29032. return _vm.handleTimeInput(val, "min")
  29033. },
  29034. change: function(val) {
  29035. return _vm.handleTimeChange(val, "min")
  29036. }
  29037. }
  29038. }),
  29039. _c("time-picker", {
  29040. ref: "minTimePicker",
  29041. attrs: {
  29042. "time-arrow-control": _vm.arrowControl,
  29043. visible: _vm.minTimePickerVisible
  29044. },
  29045. on: {
  29046. pick: _vm.handleMinTimePick,
  29047. mounted: function($event) {
  29048. _vm.$refs.minTimePicker.format =
  29049. _vm.timeFormat
  29050. }
  29051. }
  29052. })
  29053. ],
  29054. 1
  29055. )
  29056. ]
  29057. ),
  29058. _c("span", { staticClass: "el-icon-arrow-right" }),
  29059. _c(
  29060. "span",
  29061. {
  29062. staticClass:
  29063. "el-date-range-picker__editors-wrap is-right"
  29064. },
  29065. [
  29066. _c(
  29067. "span",
  29068. {
  29069. staticClass:
  29070. "el-date-range-picker__time-picker-wrap"
  29071. },
  29072. [
  29073. _c("el-input", {
  29074. staticClass: "el-date-range-picker__editor",
  29075. attrs: {
  29076. size: "small",
  29077. disabled: _vm.rangeState.selecting,
  29078. placeholder: _vm.t("el.datepicker.endDate"),
  29079. value: _vm.maxVisibleDate,
  29080. readonly: !_vm.minDate
  29081. },
  29082. on: {
  29083. input: function(val) {
  29084. return _vm.handleDateInput(val, "max")
  29085. },
  29086. change: function(val) {
  29087. return _vm.handleDateChange(val, "max")
  29088. }
  29089. }
  29090. })
  29091. ],
  29092. 1
  29093. ),
  29094. _c(
  29095. "span",
  29096. {
  29097. directives: [
  29098. {
  29099. name: "clickoutside",
  29100. rawName: "v-clickoutside",
  29101. value: _vm.handleMaxTimeClose,
  29102. expression: "handleMaxTimeClose"
  29103. }
  29104. ],
  29105. staticClass:
  29106. "el-date-range-picker__time-picker-wrap"
  29107. },
  29108. [
  29109. _c("el-input", {
  29110. staticClass: "el-date-range-picker__editor",
  29111. attrs: {
  29112. size: "small",
  29113. disabled: _vm.rangeState.selecting,
  29114. placeholder: _vm.t("el.datepicker.endTime"),
  29115. value: _vm.maxVisibleTime,
  29116. readonly: !_vm.minDate
  29117. },
  29118. on: {
  29119. focus: function($event) {
  29120. _vm.minDate &&
  29121. (_vm.maxTimePickerVisible = true)
  29122. },
  29123. input: function(val) {
  29124. return _vm.handleTimeInput(val, "max")
  29125. },
  29126. change: function(val) {
  29127. return _vm.handleTimeChange(val, "max")
  29128. }
  29129. }
  29130. }),
  29131. _c("time-picker", {
  29132. ref: "maxTimePicker",
  29133. attrs: {
  29134. "time-arrow-control": _vm.arrowControl,
  29135. visible: _vm.maxTimePickerVisible
  29136. },
  29137. on: {
  29138. pick: _vm.handleMaxTimePick,
  29139. mounted: function($event) {
  29140. _vm.$refs.maxTimePicker.format =
  29141. _vm.timeFormat
  29142. }
  29143. }
  29144. })
  29145. ],
  29146. 1
  29147. )
  29148. ]
  29149. )
  29150. ]
  29151. )
  29152. : _vm._e(),
  29153. _c(
  29154. "div",
  29155. {
  29156. staticClass:
  29157. "el-picker-panel__content el-date-range-picker__content is-left"
  29158. },
  29159. [
  29160. _c("div", { staticClass: "el-date-range-picker__header" }, [
  29161. _c("button", {
  29162. staticClass:
  29163. "el-picker-panel__icon-btn el-icon-d-arrow-left",
  29164. attrs: { type: "button" },
  29165. on: { click: _vm.leftPrevYear }
  29166. }),
  29167. _c("button", {
  29168. staticClass:
  29169. "el-picker-panel__icon-btn el-icon-arrow-left",
  29170. attrs: { type: "button" },
  29171. on: { click: _vm.leftPrevMonth }
  29172. }),
  29173. _vm.unlinkPanels
  29174. ? _c("button", {
  29175. staticClass:
  29176. "el-picker-panel__icon-btn el-icon-d-arrow-right",
  29177. class: { "is-disabled": !_vm.enableYearArrow },
  29178. attrs: {
  29179. type: "button",
  29180. disabled: !_vm.enableYearArrow
  29181. },
  29182. on: { click: _vm.leftNextYear }
  29183. })
  29184. : _vm._e(),
  29185. _vm.unlinkPanels
  29186. ? _c("button", {
  29187. staticClass:
  29188. "el-picker-panel__icon-btn el-icon-arrow-right",
  29189. class: { "is-disabled": !_vm.enableMonthArrow },
  29190. attrs: {
  29191. type: "button",
  29192. disabled: !_vm.enableMonthArrow
  29193. },
  29194. on: { click: _vm.leftNextMonth }
  29195. })
  29196. : _vm._e(),
  29197. _c("div", [_vm._v(_vm._s(_vm.leftLabel))])
  29198. ]),
  29199. _c("date-table", {
  29200. attrs: {
  29201. "selection-mode": "range",
  29202. date: _vm.leftDate,
  29203. "default-value": _vm.defaultValue,
  29204. "min-date": _vm.minDate,
  29205. "max-date": _vm.maxDate,
  29206. "range-state": _vm.rangeState,
  29207. "disabled-date": _vm.disabledDate,
  29208. "cell-class-name": _vm.cellClassName,
  29209. "first-day-of-week": _vm.firstDayOfWeek
  29210. },
  29211. on: {
  29212. changerange: _vm.handleChangeRange,
  29213. pick: _vm.handleRangePick
  29214. }
  29215. })
  29216. ],
  29217. 1
  29218. ),
  29219. _c(
  29220. "div",
  29221. {
  29222. staticClass:
  29223. "el-picker-panel__content el-date-range-picker__content is-right"
  29224. },
  29225. [
  29226. _c("div", { staticClass: "el-date-range-picker__header" }, [
  29227. _vm.unlinkPanels
  29228. ? _c("button", {
  29229. staticClass:
  29230. "el-picker-panel__icon-btn el-icon-d-arrow-left",
  29231. class: { "is-disabled": !_vm.enableYearArrow },
  29232. attrs: {
  29233. type: "button",
  29234. disabled: !_vm.enableYearArrow
  29235. },
  29236. on: { click: _vm.rightPrevYear }
  29237. })
  29238. : _vm._e(),
  29239. _vm.unlinkPanels
  29240. ? _c("button", {
  29241. staticClass:
  29242. "el-picker-panel__icon-btn el-icon-arrow-left",
  29243. class: { "is-disabled": !_vm.enableMonthArrow },
  29244. attrs: {
  29245. type: "button",
  29246. disabled: !_vm.enableMonthArrow
  29247. },
  29248. on: { click: _vm.rightPrevMonth }
  29249. })
  29250. : _vm._e(),
  29251. _c("button", {
  29252. staticClass:
  29253. "el-picker-panel__icon-btn el-icon-d-arrow-right",
  29254. attrs: { type: "button" },
  29255. on: { click: _vm.rightNextYear }
  29256. }),
  29257. _c("button", {
  29258. staticClass:
  29259. "el-picker-panel__icon-btn el-icon-arrow-right",
  29260. attrs: { type: "button" },
  29261. on: { click: _vm.rightNextMonth }
  29262. }),
  29263. _c("div", [_vm._v(_vm._s(_vm.rightLabel))])
  29264. ]),
  29265. _c("date-table", {
  29266. attrs: {
  29267. "selection-mode": "range",
  29268. date: _vm.rightDate,
  29269. "default-value": _vm.defaultValue,
  29270. "min-date": _vm.minDate,
  29271. "max-date": _vm.maxDate,
  29272. "range-state": _vm.rangeState,
  29273. "disabled-date": _vm.disabledDate,
  29274. "cell-class-name": _vm.cellClassName,
  29275. "first-day-of-week": _vm.firstDayOfWeek
  29276. },
  29277. on: {
  29278. changerange: _vm.handleChangeRange,
  29279. pick: _vm.handleRangePick
  29280. }
  29281. })
  29282. ],
  29283. 1
  29284. )
  29285. ])
  29286. ],
  29287. 2
  29288. ),
  29289. _vm.showTime
  29290. ? _c(
  29291. "div",
  29292. { staticClass: "el-picker-panel__footer" },
  29293. [
  29294. _c(
  29295. "el-button",
  29296. {
  29297. staticClass: "el-picker-panel__link-btn",
  29298. attrs: { size: "mini", type: "text" },
  29299. on: { click: _vm.handleClear }
  29300. },
  29301. [
  29302. _vm._v(
  29303. "\n " +
  29304. _vm._s(_vm.t("el.datepicker.clear")) +
  29305. "\n "
  29306. )
  29307. ]
  29308. ),
  29309. _c(
  29310. "el-button",
  29311. {
  29312. staticClass: "el-picker-panel__link-btn",
  29313. attrs: {
  29314. plain: "",
  29315. size: "mini",
  29316. disabled: _vm.btnDisabled
  29317. },
  29318. on: {
  29319. click: function($event) {
  29320. _vm.handleConfirm(false)
  29321. }
  29322. }
  29323. },
  29324. [
  29325. _vm._v(
  29326. "\n " +
  29327. _vm._s(_vm.t("el.datepicker.confirm")) +
  29328. "\n "
  29329. )
  29330. ]
  29331. )
  29332. ],
  29333. 1
  29334. )
  29335. : _vm._e()
  29336. ]
  29337. )
  29338. ]
  29339. )
  29340. }
  29341. var date_rangevue_type_template_id_2652849a_staticRenderFns = []
  29342. date_rangevue_type_template_id_2652849a_render._withStripped = true
  29343. // CONCATENATED MODULE: ./packages/date-picker/src/panel/date-range.vue?vue&type=template&id=2652849a&
  29344. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date-range.vue?vue&type=script&lang=js&
  29345. //
  29346. //
  29347. //
  29348. //
  29349. //
  29350. //
  29351. //
  29352. //
  29353. //
  29354. //
  29355. //
  29356. //
  29357. //
  29358. //
  29359. //
  29360. //
  29361. //
  29362. //
  29363. //
  29364. //
  29365. //
  29366. //
  29367. //
  29368. //
  29369. //
  29370. //
  29371. //
  29372. //
  29373. //
  29374. //
  29375. //
  29376. //
  29377. //
  29378. //
  29379. //
  29380. //
  29381. //
  29382. //
  29383. //
  29384. //
  29385. //
  29386. //
  29387. //
  29388. //
  29389. //
  29390. //
  29391. //
  29392. //
  29393. //
  29394. //
  29395. //
  29396. //
  29397. //
  29398. //
  29399. //
  29400. //
  29401. //
  29402. //
  29403. //
  29404. //
  29405. //
  29406. //
  29407. //
  29408. //
  29409. //
  29410. //
  29411. //
  29412. //
  29413. //
  29414. //
  29415. //
  29416. //
  29417. //
  29418. //
  29419. //
  29420. //
  29421. //
  29422. //
  29423. //
  29424. //
  29425. //
  29426. //
  29427. //
  29428. //
  29429. //
  29430. //
  29431. //
  29432. //
  29433. //
  29434. //
  29435. //
  29436. //
  29437. //
  29438. //
  29439. //
  29440. //
  29441. //
  29442. //
  29443. //
  29444. //
  29445. //
  29446. //
  29447. //
  29448. //
  29449. //
  29450. //
  29451. //
  29452. //
  29453. //
  29454. //
  29455. //
  29456. //
  29457. //
  29458. //
  29459. //
  29460. //
  29461. //
  29462. //
  29463. //
  29464. //
  29465. //
  29466. //
  29467. //
  29468. //
  29469. //
  29470. //
  29471. //
  29472. //
  29473. //
  29474. //
  29475. //
  29476. //
  29477. //
  29478. //
  29479. //
  29480. //
  29481. //
  29482. //
  29483. //
  29484. //
  29485. //
  29486. //
  29487. //
  29488. //
  29489. //
  29490. //
  29491. //
  29492. //
  29493. //
  29494. //
  29495. //
  29496. //
  29497. //
  29498. //
  29499. //
  29500. //
  29501. //
  29502. //
  29503. //
  29504. //
  29505. //
  29506. //
  29507. //
  29508. //
  29509. //
  29510. //
  29511. //
  29512. //
  29513. //
  29514. //
  29515. //
  29516. //
  29517. //
  29518. //
  29519. //
  29520. //
  29521. //
  29522. //
  29523. //
  29524. //
  29525. //
  29526. //
  29527. //
  29528. //
  29529. //
  29530. //
  29531. //
  29532. //
  29533. //
  29534. var date_rangevue_type_script_lang_js_calcDefaultValue = function calcDefaultValue(defaultValue) {
  29535. if (Array.isArray(defaultValue)) {
  29536. return [new Date(defaultValue[0]), new Date(defaultValue[1])];
  29537. } else if (defaultValue) {
  29538. return [new Date(defaultValue), Object(date_util_["nextDate"])(new Date(defaultValue), 1)];
  29539. } else {
  29540. return [new Date(), Object(date_util_["nextDate"])(new Date(), 1)];
  29541. }
  29542. };
  29543. /* harmony default export */ var date_rangevue_type_script_lang_js_ = ({
  29544. mixins: [locale_default.a],
  29545. directives: { Clickoutside: clickoutside_default.a },
  29546. computed: {
  29547. btnDisabled: function btnDisabled() {
  29548. return !(this.minDate && this.maxDate && !this.selecting && this.isValidValue([this.minDate, this.maxDate]));
  29549. },
  29550. leftLabel: function leftLabel() {
  29551. return this.leftDate.getFullYear() + ' ' + this.t('el.datepicker.year') + ' ' + this.t('el.datepicker.month' + (this.leftDate.getMonth() + 1));
  29552. },
  29553. rightLabel: function rightLabel() {
  29554. return this.rightDate.getFullYear() + ' ' + this.t('el.datepicker.year') + ' ' + this.t('el.datepicker.month' + (this.rightDate.getMonth() + 1));
  29555. },
  29556. leftYear: function leftYear() {
  29557. return this.leftDate.getFullYear();
  29558. },
  29559. leftMonth: function leftMonth() {
  29560. return this.leftDate.getMonth();
  29561. },
  29562. leftMonthDate: function leftMonthDate() {
  29563. return this.leftDate.getDate();
  29564. },
  29565. rightYear: function rightYear() {
  29566. return this.rightDate.getFullYear();
  29567. },
  29568. rightMonth: function rightMonth() {
  29569. return this.rightDate.getMonth();
  29570. },
  29571. rightMonthDate: function rightMonthDate() {
  29572. return this.rightDate.getDate();
  29573. },
  29574. minVisibleDate: function minVisibleDate() {
  29575. if (this.dateUserInput.min !== null) return this.dateUserInput.min;
  29576. if (this.minDate) return Object(date_util_["formatDate"])(this.minDate, this.dateFormat);
  29577. return '';
  29578. },
  29579. maxVisibleDate: function maxVisibleDate() {
  29580. if (this.dateUserInput.max !== null) return this.dateUserInput.max;
  29581. if (this.maxDate || this.minDate) return Object(date_util_["formatDate"])(this.maxDate || this.minDate, this.dateFormat);
  29582. return '';
  29583. },
  29584. minVisibleTime: function minVisibleTime() {
  29585. if (this.timeUserInput.min !== null) return this.timeUserInput.min;
  29586. if (this.minDate) return Object(date_util_["formatDate"])(this.minDate, this.timeFormat);
  29587. return '';
  29588. },
  29589. maxVisibleTime: function maxVisibleTime() {
  29590. if (this.timeUserInput.max !== null) return this.timeUserInput.max;
  29591. if (this.maxDate || this.minDate) return Object(date_util_["formatDate"])(this.maxDate || this.minDate, this.timeFormat);
  29592. return '';
  29593. },
  29594. timeFormat: function timeFormat() {
  29595. if (this.format) {
  29596. return Object(date_util_["extractTimeFormat"])(this.format);
  29597. } else {
  29598. return 'HH:mm:ss';
  29599. }
  29600. },
  29601. dateFormat: function dateFormat() {
  29602. if (this.format) {
  29603. return Object(date_util_["extractDateFormat"])(this.format);
  29604. } else {
  29605. return 'yyyy-MM-dd';
  29606. }
  29607. },
  29608. enableMonthArrow: function enableMonthArrow() {
  29609. var nextMonth = (this.leftMonth + 1) % 12;
  29610. var yearOffset = this.leftMonth + 1 >= 12 ? 1 : 0;
  29611. return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth) < new Date(this.rightYear, this.rightMonth);
  29612. },
  29613. enableYearArrow: function enableYearArrow() {
  29614. return this.unlinkPanels && this.rightYear * 12 + this.rightMonth - (this.leftYear * 12 + this.leftMonth + 1) >= 12;
  29615. }
  29616. },
  29617. data: function data() {
  29618. return {
  29619. popperClass: '',
  29620. value: [],
  29621. defaultValue: null,
  29622. defaultTime: null,
  29623. minDate: '',
  29624. maxDate: '',
  29625. leftDate: new Date(),
  29626. rightDate: Object(date_util_["nextMonth"])(new Date()),
  29627. rangeState: {
  29628. endDate: null,
  29629. selecting: false,
  29630. row: null,
  29631. column: null
  29632. },
  29633. showTime: false,
  29634. shortcuts: '',
  29635. visible: '',
  29636. disabledDate: '',
  29637. cellClassName: '',
  29638. firstDayOfWeek: 7,
  29639. minTimePickerVisible: false,
  29640. maxTimePickerVisible: false,
  29641. format: '',
  29642. arrowControl: false,
  29643. unlinkPanels: false,
  29644. dateUserInput: {
  29645. min: null,
  29646. max: null
  29647. },
  29648. timeUserInput: {
  29649. min: null,
  29650. max: null
  29651. }
  29652. };
  29653. },
  29654. watch: {
  29655. minDate: function minDate(val) {
  29656. var _this = this;
  29657. this.dateUserInput.min = null;
  29658. this.timeUserInput.min = null;
  29659. this.$nextTick(function () {
  29660. if (_this.$refs.maxTimePicker && _this.maxDate && _this.maxDate < _this.minDate) {
  29661. var format = 'HH:mm:ss';
  29662. _this.$refs.maxTimePicker.selectableRange = [[Object(date_util_["parseDate"])(Object(date_util_["formatDate"])(_this.minDate, format), format), Object(date_util_["parseDate"])('23:59:59', format)]];
  29663. }
  29664. });
  29665. if (val && this.$refs.minTimePicker) {
  29666. this.$refs.minTimePicker.date = val;
  29667. this.$refs.minTimePicker.value = val;
  29668. }
  29669. },
  29670. maxDate: function maxDate(val) {
  29671. this.dateUserInput.max = null;
  29672. this.timeUserInput.max = null;
  29673. if (val && this.$refs.maxTimePicker) {
  29674. this.$refs.maxTimePicker.date = val;
  29675. this.$refs.maxTimePicker.value = val;
  29676. }
  29677. },
  29678. minTimePickerVisible: function minTimePickerVisible(val) {
  29679. var _this2 = this;
  29680. if (val) {
  29681. this.$nextTick(function () {
  29682. _this2.$refs.minTimePicker.date = _this2.minDate;
  29683. _this2.$refs.minTimePicker.value = _this2.minDate;
  29684. _this2.$refs.minTimePicker.adjustSpinners();
  29685. });
  29686. }
  29687. },
  29688. maxTimePickerVisible: function maxTimePickerVisible(val) {
  29689. var _this3 = this;
  29690. if (val) {
  29691. this.$nextTick(function () {
  29692. _this3.$refs.maxTimePicker.date = _this3.maxDate;
  29693. _this3.$refs.maxTimePicker.value = _this3.maxDate;
  29694. _this3.$refs.maxTimePicker.adjustSpinners();
  29695. });
  29696. }
  29697. },
  29698. value: function value(newVal) {
  29699. if (!newVal) {
  29700. this.minDate = null;
  29701. this.maxDate = null;
  29702. } else if (Array.isArray(newVal)) {
  29703. this.minDate = Object(date_util_["isDate"])(newVal[0]) ? new Date(newVal[0]) : null;
  29704. this.maxDate = Object(date_util_["isDate"])(newVal[1]) ? new Date(newVal[1]) : null;
  29705. if (this.minDate) {
  29706. this.leftDate = this.minDate;
  29707. if (this.unlinkPanels && this.maxDate) {
  29708. var minDateYear = this.minDate.getFullYear();
  29709. var minDateMonth = this.minDate.getMonth();
  29710. var maxDateYear = this.maxDate.getFullYear();
  29711. var maxDateMonth = this.maxDate.getMonth();
  29712. this.rightDate = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? Object(date_util_["nextMonth"])(this.maxDate) : this.maxDate;
  29713. } else {
  29714. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29715. }
  29716. } else {
  29717. this.leftDate = date_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];
  29718. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29719. }
  29720. }
  29721. },
  29722. defaultValue: function defaultValue(val) {
  29723. if (!Array.isArray(this.value)) {
  29724. var _calcDefaultValue = date_rangevue_type_script_lang_js_calcDefaultValue(val),
  29725. left = _calcDefaultValue[0],
  29726. right = _calcDefaultValue[1];
  29727. this.leftDate = left;
  29728. this.rightDate = val && val[1] && this.unlinkPanels ? right : Object(date_util_["nextMonth"])(this.leftDate);
  29729. }
  29730. }
  29731. },
  29732. methods: {
  29733. handleClear: function handleClear() {
  29734. this.minDate = null;
  29735. this.maxDate = null;
  29736. this.leftDate = date_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];
  29737. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29738. this.$emit('pick', null);
  29739. },
  29740. handleChangeRange: function handleChangeRange(val) {
  29741. this.minDate = val.minDate;
  29742. this.maxDate = val.maxDate;
  29743. this.rangeState = val.rangeState;
  29744. },
  29745. handleDateInput: function handleDateInput(value, type) {
  29746. this.dateUserInput[type] = value;
  29747. if (value.length !== this.dateFormat.length) return;
  29748. var parsedValue = Object(date_util_["parseDate"])(value, this.dateFormat);
  29749. if (parsedValue) {
  29750. if (typeof this.disabledDate === 'function' && this.disabledDate(new Date(parsedValue))) {
  29751. return;
  29752. }
  29753. if (type === 'min') {
  29754. this.minDate = Object(date_util_["modifyDate"])(this.minDate || new Date(), parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
  29755. this.leftDate = new Date(parsedValue);
  29756. if (!this.unlinkPanels) {
  29757. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29758. }
  29759. } else {
  29760. this.maxDate = Object(date_util_["modifyDate"])(this.maxDate || new Date(), parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
  29761. this.rightDate = new Date(parsedValue);
  29762. if (!this.unlinkPanels) {
  29763. this.leftDate = Object(date_util_["prevMonth"])(parsedValue);
  29764. }
  29765. }
  29766. }
  29767. },
  29768. handleDateChange: function handleDateChange(value, type) {
  29769. var parsedValue = Object(date_util_["parseDate"])(value, this.dateFormat);
  29770. if (parsedValue) {
  29771. if (type === 'min') {
  29772. this.minDate = Object(date_util_["modifyDate"])(this.minDate, parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
  29773. if (this.minDate > this.maxDate) {
  29774. this.maxDate = this.minDate;
  29775. }
  29776. } else {
  29777. this.maxDate = Object(date_util_["modifyDate"])(this.maxDate, parsedValue.getFullYear(), parsedValue.getMonth(), parsedValue.getDate());
  29778. if (this.maxDate < this.minDate) {
  29779. this.minDate = this.maxDate;
  29780. }
  29781. }
  29782. }
  29783. },
  29784. handleTimeInput: function handleTimeInput(value, type) {
  29785. var _this4 = this;
  29786. this.timeUserInput[type] = value;
  29787. if (value.length !== this.timeFormat.length) return;
  29788. var parsedValue = Object(date_util_["parseDate"])(value, this.timeFormat);
  29789. if (parsedValue) {
  29790. if (type === 'min') {
  29791. this.minDate = Object(date_util_["modifyTime"])(this.minDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
  29792. this.$nextTick(function (_) {
  29793. return _this4.$refs.minTimePicker.adjustSpinners();
  29794. });
  29795. } else {
  29796. this.maxDate = Object(date_util_["modifyTime"])(this.maxDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
  29797. this.$nextTick(function (_) {
  29798. return _this4.$refs.maxTimePicker.adjustSpinners();
  29799. });
  29800. }
  29801. }
  29802. },
  29803. handleTimeChange: function handleTimeChange(value, type) {
  29804. var parsedValue = Object(date_util_["parseDate"])(value, this.timeFormat);
  29805. if (parsedValue) {
  29806. if (type === 'min') {
  29807. this.minDate = Object(date_util_["modifyTime"])(this.minDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
  29808. if (this.minDate > this.maxDate) {
  29809. this.maxDate = this.minDate;
  29810. }
  29811. this.$refs.minTimePicker.value = this.minDate;
  29812. this.minTimePickerVisible = false;
  29813. } else {
  29814. this.maxDate = Object(date_util_["modifyTime"])(this.maxDate, parsedValue.getHours(), parsedValue.getMinutes(), parsedValue.getSeconds());
  29815. if (this.maxDate < this.minDate) {
  29816. this.minDate = this.maxDate;
  29817. }
  29818. this.$refs.maxTimePicker.value = this.minDate;
  29819. this.maxTimePickerVisible = false;
  29820. }
  29821. }
  29822. },
  29823. handleRangePick: function handleRangePick(val) {
  29824. var _this5 = this;
  29825. var close = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  29826. var defaultTime = this.defaultTime || [];
  29827. var minDate = Object(date_util_["modifyWithTimeString"])(val.minDate, defaultTime[0]);
  29828. var maxDate = Object(date_util_["modifyWithTimeString"])(val.maxDate, defaultTime[1]);
  29829. if (this.maxDate === maxDate && this.minDate === minDate) {
  29830. return;
  29831. }
  29832. this.onPick && this.onPick(val);
  29833. this.maxDate = maxDate;
  29834. this.minDate = minDate;
  29835. // workaround for https://github.com/ElemeFE/element/issues/7539, should remove this block when we don't have to care about Chromium 55 - 57
  29836. setTimeout(function () {
  29837. _this5.maxDate = maxDate;
  29838. _this5.minDate = minDate;
  29839. }, 10);
  29840. if (!close || this.showTime) return;
  29841. this.handleConfirm();
  29842. },
  29843. handleShortcutClick: function handleShortcutClick(shortcut) {
  29844. if (shortcut.onClick) {
  29845. shortcut.onClick(this);
  29846. }
  29847. },
  29848. handleMinTimePick: function handleMinTimePick(value, visible, first) {
  29849. this.minDate = this.minDate || new Date();
  29850. if (value) {
  29851. this.minDate = Object(date_util_["modifyTime"])(this.minDate, value.getHours(), value.getMinutes(), value.getSeconds());
  29852. }
  29853. if (!first) {
  29854. this.minTimePickerVisible = visible;
  29855. }
  29856. if (!this.maxDate || this.maxDate && this.maxDate.getTime() < this.minDate.getTime()) {
  29857. this.maxDate = new Date(this.minDate);
  29858. }
  29859. },
  29860. handleMinTimeClose: function handleMinTimeClose() {
  29861. this.minTimePickerVisible = false;
  29862. },
  29863. handleMaxTimePick: function handleMaxTimePick(value, visible, first) {
  29864. if (this.maxDate && value) {
  29865. this.maxDate = Object(date_util_["modifyTime"])(this.maxDate, value.getHours(), value.getMinutes(), value.getSeconds());
  29866. }
  29867. if (!first) {
  29868. this.maxTimePickerVisible = visible;
  29869. }
  29870. if (this.maxDate && this.minDate && this.minDate.getTime() > this.maxDate.getTime()) {
  29871. this.minDate = new Date(this.maxDate);
  29872. }
  29873. },
  29874. handleMaxTimeClose: function handleMaxTimeClose() {
  29875. this.maxTimePickerVisible = false;
  29876. },
  29877. // leftPrev*, rightNext* need to take care of `unlinkPanels`
  29878. leftPrevYear: function leftPrevYear() {
  29879. this.leftDate = Object(date_util_["prevYear"])(this.leftDate);
  29880. if (!this.unlinkPanels) {
  29881. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29882. }
  29883. },
  29884. leftPrevMonth: function leftPrevMonth() {
  29885. this.leftDate = Object(date_util_["prevMonth"])(this.leftDate);
  29886. if (!this.unlinkPanels) {
  29887. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29888. }
  29889. },
  29890. rightNextYear: function rightNextYear() {
  29891. if (!this.unlinkPanels) {
  29892. this.leftDate = Object(date_util_["nextYear"])(this.leftDate);
  29893. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29894. } else {
  29895. this.rightDate = Object(date_util_["nextYear"])(this.rightDate);
  29896. }
  29897. },
  29898. rightNextMonth: function rightNextMonth() {
  29899. if (!this.unlinkPanels) {
  29900. this.leftDate = Object(date_util_["nextMonth"])(this.leftDate);
  29901. this.rightDate = Object(date_util_["nextMonth"])(this.leftDate);
  29902. } else {
  29903. this.rightDate = Object(date_util_["nextMonth"])(this.rightDate);
  29904. }
  29905. },
  29906. // leftNext*, rightPrev* are called when `unlinkPanels` is true
  29907. leftNextYear: function leftNextYear() {
  29908. this.leftDate = Object(date_util_["nextYear"])(this.leftDate);
  29909. },
  29910. leftNextMonth: function leftNextMonth() {
  29911. this.leftDate = Object(date_util_["nextMonth"])(this.leftDate);
  29912. },
  29913. rightPrevYear: function rightPrevYear() {
  29914. this.rightDate = Object(date_util_["prevYear"])(this.rightDate);
  29915. },
  29916. rightPrevMonth: function rightPrevMonth() {
  29917. this.rightDate = Object(date_util_["prevMonth"])(this.rightDate);
  29918. },
  29919. handleConfirm: function handleConfirm() {
  29920. var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  29921. if (this.isValidValue([this.minDate, this.maxDate])) {
  29922. this.$emit('pick', [this.minDate, this.maxDate], visible);
  29923. }
  29924. },
  29925. isValidValue: function isValidValue(value) {
  29926. return Array.isArray(value) && value && value[0] && value[1] && Object(date_util_["isDate"])(value[0]) && Object(date_util_["isDate"])(value[1]) && value[0].getTime() <= value[1].getTime() && (typeof this.disabledDate === 'function' ? !this.disabledDate(value[0]) && !this.disabledDate(value[1]) : true);
  29927. },
  29928. resetView: function resetView() {
  29929. // NOTE: this is a hack to reset {min, max}Date on picker open.
  29930. // TODO: correct way of doing so is to refactor {min, max}Date to be dependent on value and internal selection state
  29931. // an alternative would be resetView whenever picker becomes visible, should also investigate date-panel's resetView
  29932. if (this.minDate && this.maxDate == null) this.rangeState.selecting = false;
  29933. this.minDate = this.value && Object(date_util_["isDate"])(this.value[0]) ? new Date(this.value[0]) : null;
  29934. this.maxDate = this.value && Object(date_util_["isDate"])(this.value[0]) ? new Date(this.value[1]) : null;
  29935. }
  29936. },
  29937. components: { TimePicker: panel_time, DateTable: date_table, ElInput: input_default.a, ElButton: button_default.a }
  29938. });
  29939. // CONCATENATED MODULE: ./packages/date-picker/src/panel/date-range.vue?vue&type=script&lang=js&
  29940. /* harmony default export */ var panel_date_rangevue_type_script_lang_js_ = (date_rangevue_type_script_lang_js_);
  29941. // CONCATENATED MODULE: ./packages/date-picker/src/panel/date-range.vue
  29942. /* normalize component */
  29943. var date_range_component = normalizeComponent(
  29944. panel_date_rangevue_type_script_lang_js_,
  29945. date_rangevue_type_template_id_2652849a_render,
  29946. date_rangevue_type_template_id_2652849a_staticRenderFns,
  29947. false,
  29948. null,
  29949. null,
  29950. null
  29951. )
  29952. /* hot reload */
  29953. if (false) { var date_range_api; }
  29954. date_range_component.options.__file = "packages/date-picker/src/panel/date-range.vue"
  29955. /* harmony default export */ var date_range = (date_range_component.exports);
  29956. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/month-range.vue?vue&type=template&id=f2645fb8&
  29957. var month_rangevue_type_template_id_f2645fb8_render = function() {
  29958. var _vm = this
  29959. var _h = _vm.$createElement
  29960. var _c = _vm._self._c || _h
  29961. return _c(
  29962. "transition",
  29963. {
  29964. attrs: { name: "el-zoom-in-top" },
  29965. on: {
  29966. "after-leave": function($event) {
  29967. _vm.$emit("dodestroy")
  29968. }
  29969. }
  29970. },
  29971. [
  29972. _c(
  29973. "div",
  29974. {
  29975. directives: [
  29976. {
  29977. name: "show",
  29978. rawName: "v-show",
  29979. value: _vm.visible,
  29980. expression: "visible"
  29981. }
  29982. ],
  29983. staticClass: "el-picker-panel el-date-range-picker el-popper",
  29984. class: [
  29985. {
  29986. "has-sidebar": _vm.$slots.sidebar || _vm.shortcuts
  29987. },
  29988. _vm.popperClass
  29989. ]
  29990. },
  29991. [
  29992. _c(
  29993. "div",
  29994. { staticClass: "el-picker-panel__body-wrapper" },
  29995. [
  29996. _vm._t("sidebar"),
  29997. _vm.shortcuts
  29998. ? _c(
  29999. "div",
  30000. { staticClass: "el-picker-panel__sidebar" },
  30001. _vm._l(_vm.shortcuts, function(shortcut, key) {
  30002. return _c(
  30003. "button",
  30004. {
  30005. key: key,
  30006. staticClass: "el-picker-panel__shortcut",
  30007. attrs: { type: "button" },
  30008. on: {
  30009. click: function($event) {
  30010. _vm.handleShortcutClick(shortcut)
  30011. }
  30012. }
  30013. },
  30014. [_vm._v(_vm._s(shortcut.text))]
  30015. )
  30016. }),
  30017. 0
  30018. )
  30019. : _vm._e(),
  30020. _c("div", { staticClass: "el-picker-panel__body" }, [
  30021. _c(
  30022. "div",
  30023. {
  30024. staticClass:
  30025. "el-picker-panel__content el-date-range-picker__content is-left"
  30026. },
  30027. [
  30028. _c("div", { staticClass: "el-date-range-picker__header" }, [
  30029. _c("button", {
  30030. staticClass:
  30031. "el-picker-panel__icon-btn el-icon-d-arrow-left",
  30032. attrs: { type: "button" },
  30033. on: { click: _vm.leftPrevYear }
  30034. }),
  30035. _vm.unlinkPanels
  30036. ? _c("button", {
  30037. staticClass:
  30038. "el-picker-panel__icon-btn el-icon-d-arrow-right",
  30039. class: { "is-disabled": !_vm.enableYearArrow },
  30040. attrs: {
  30041. type: "button",
  30042. disabled: !_vm.enableYearArrow
  30043. },
  30044. on: { click: _vm.leftNextYear }
  30045. })
  30046. : _vm._e(),
  30047. _c("div", [_vm._v(_vm._s(_vm.leftLabel))])
  30048. ]),
  30049. _c("month-table", {
  30050. attrs: {
  30051. "selection-mode": "range",
  30052. date: _vm.leftDate,
  30053. "default-value": _vm.defaultValue,
  30054. "min-date": _vm.minDate,
  30055. "max-date": _vm.maxDate,
  30056. "range-state": _vm.rangeState,
  30057. "disabled-date": _vm.disabledDate
  30058. },
  30059. on: {
  30060. changerange: _vm.handleChangeRange,
  30061. pick: _vm.handleRangePick
  30062. }
  30063. })
  30064. ],
  30065. 1
  30066. ),
  30067. _c(
  30068. "div",
  30069. {
  30070. staticClass:
  30071. "el-picker-panel__content el-date-range-picker__content is-right"
  30072. },
  30073. [
  30074. _c("div", { staticClass: "el-date-range-picker__header" }, [
  30075. _vm.unlinkPanels
  30076. ? _c("button", {
  30077. staticClass:
  30078. "el-picker-panel__icon-btn el-icon-d-arrow-left",
  30079. class: { "is-disabled": !_vm.enableYearArrow },
  30080. attrs: {
  30081. type: "button",
  30082. disabled: !_vm.enableYearArrow
  30083. },
  30084. on: { click: _vm.rightPrevYear }
  30085. })
  30086. : _vm._e(),
  30087. _c("button", {
  30088. staticClass:
  30089. "el-picker-panel__icon-btn el-icon-d-arrow-right",
  30090. attrs: { type: "button" },
  30091. on: { click: _vm.rightNextYear }
  30092. }),
  30093. _c("div", [_vm._v(_vm._s(_vm.rightLabel))])
  30094. ]),
  30095. _c("month-table", {
  30096. attrs: {
  30097. "selection-mode": "range",
  30098. date: _vm.rightDate,
  30099. "default-value": _vm.defaultValue,
  30100. "min-date": _vm.minDate,
  30101. "max-date": _vm.maxDate,
  30102. "range-state": _vm.rangeState,
  30103. "disabled-date": _vm.disabledDate
  30104. },
  30105. on: {
  30106. changerange: _vm.handleChangeRange,
  30107. pick: _vm.handleRangePick
  30108. }
  30109. })
  30110. ],
  30111. 1
  30112. )
  30113. ])
  30114. ],
  30115. 2
  30116. )
  30117. ]
  30118. )
  30119. ]
  30120. )
  30121. }
  30122. var month_rangevue_type_template_id_f2645fb8_staticRenderFns = []
  30123. month_rangevue_type_template_id_f2645fb8_render._withStripped = true
  30124. // CONCATENATED MODULE: ./packages/date-picker/src/panel/month-range.vue?vue&type=template&id=f2645fb8&
  30125. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/month-range.vue?vue&type=script&lang=js&
  30126. //
  30127. //
  30128. //
  30129. //
  30130. //
  30131. //
  30132. //
  30133. //
  30134. //
  30135. //
  30136. //
  30137. //
  30138. //
  30139. //
  30140. //
  30141. //
  30142. //
  30143. //
  30144. //
  30145. //
  30146. //
  30147. //
  30148. //
  30149. //
  30150. //
  30151. //
  30152. //
  30153. //
  30154. //
  30155. //
  30156. //
  30157. //
  30158. //
  30159. //
  30160. //
  30161. //
  30162. //
  30163. //
  30164. //
  30165. //
  30166. //
  30167. //
  30168. //
  30169. //
  30170. //
  30171. //
  30172. //
  30173. //
  30174. //
  30175. //
  30176. //
  30177. //
  30178. //
  30179. //
  30180. //
  30181. //
  30182. //
  30183. //
  30184. //
  30185. //
  30186. //
  30187. //
  30188. //
  30189. //
  30190. //
  30191. //
  30192. //
  30193. //
  30194. //
  30195. //
  30196. //
  30197. //
  30198. //
  30199. //
  30200. //
  30201. //
  30202. //
  30203. //
  30204. //
  30205. var month_rangevue_type_script_lang_js_calcDefaultValue = function calcDefaultValue(defaultValue) {
  30206. if (Array.isArray(defaultValue)) {
  30207. return [new Date(defaultValue[0]), new Date(defaultValue[1])];
  30208. } else if (defaultValue) {
  30209. return [new Date(defaultValue), Object(date_util_["nextMonth"])(new Date(defaultValue))];
  30210. } else {
  30211. return [new Date(), Object(date_util_["nextMonth"])(new Date())];
  30212. }
  30213. };
  30214. /* harmony default export */ var month_rangevue_type_script_lang_js_ = ({
  30215. mixins: [locale_default.a],
  30216. directives: { Clickoutside: clickoutside_default.a },
  30217. computed: {
  30218. btnDisabled: function btnDisabled() {
  30219. return !(this.minDate && this.maxDate && !this.selecting && this.isValidValue([this.minDate, this.maxDate]));
  30220. },
  30221. leftLabel: function leftLabel() {
  30222. return this.leftDate.getFullYear() + ' ' + this.t('el.datepicker.year');
  30223. },
  30224. rightLabel: function rightLabel() {
  30225. return this.rightDate.getFullYear() + ' ' + this.t('el.datepicker.year');
  30226. },
  30227. leftYear: function leftYear() {
  30228. return this.leftDate.getFullYear();
  30229. },
  30230. rightYear: function rightYear() {
  30231. return this.rightDate.getFullYear() === this.leftDate.getFullYear() ? this.leftDate.getFullYear() + 1 : this.rightDate.getFullYear();
  30232. },
  30233. enableYearArrow: function enableYearArrow() {
  30234. return this.unlinkPanels && this.rightYear > this.leftYear + 1;
  30235. }
  30236. },
  30237. data: function data() {
  30238. return {
  30239. popperClass: '',
  30240. value: [],
  30241. defaultValue: null,
  30242. defaultTime: null,
  30243. minDate: '',
  30244. maxDate: '',
  30245. leftDate: new Date(),
  30246. rightDate: Object(date_util_["nextYear"])(new Date()),
  30247. rangeState: {
  30248. endDate: null,
  30249. selecting: false,
  30250. row: null,
  30251. column: null
  30252. },
  30253. shortcuts: '',
  30254. visible: '',
  30255. disabledDate: '',
  30256. format: '',
  30257. arrowControl: false,
  30258. unlinkPanels: false
  30259. };
  30260. },
  30261. watch: {
  30262. value: function value(newVal) {
  30263. if (!newVal) {
  30264. this.minDate = null;
  30265. this.maxDate = null;
  30266. } else if (Array.isArray(newVal)) {
  30267. this.minDate = Object(date_util_["isDate"])(newVal[0]) ? new Date(newVal[0]) : null;
  30268. this.maxDate = Object(date_util_["isDate"])(newVal[1]) ? new Date(newVal[1]) : null;
  30269. if (this.minDate) {
  30270. this.leftDate = this.minDate;
  30271. if (this.unlinkPanels && this.maxDate) {
  30272. var minDateYear = this.minDate.getFullYear();
  30273. var maxDateYear = this.maxDate.getFullYear();
  30274. this.rightDate = minDateYear === maxDateYear ? Object(date_util_["nextYear"])(this.maxDate) : this.maxDate;
  30275. } else {
  30276. this.rightDate = Object(date_util_["nextYear"])(this.leftDate);
  30277. }
  30278. } else {
  30279. this.leftDate = month_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];
  30280. this.rightDate = Object(date_util_["nextYear"])(this.leftDate);
  30281. }
  30282. }
  30283. },
  30284. defaultValue: function defaultValue(val) {
  30285. if (!Array.isArray(this.value)) {
  30286. var _calcDefaultValue = month_rangevue_type_script_lang_js_calcDefaultValue(val),
  30287. left = _calcDefaultValue[0],
  30288. right = _calcDefaultValue[1];
  30289. this.leftDate = left;
  30290. this.rightDate = val && val[1] && left.getFullYear() !== right.getFullYear() && this.unlinkPanels ? right : Object(date_util_["nextYear"])(this.leftDate);
  30291. }
  30292. }
  30293. },
  30294. methods: {
  30295. handleClear: function handleClear() {
  30296. this.minDate = null;
  30297. this.maxDate = null;
  30298. this.leftDate = month_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];
  30299. this.rightDate = Object(date_util_["nextYear"])(this.leftDate);
  30300. this.$emit('pick', null);
  30301. },
  30302. handleChangeRange: function handleChangeRange(val) {
  30303. this.minDate = val.minDate;
  30304. this.maxDate = val.maxDate;
  30305. this.rangeState = val.rangeState;
  30306. },
  30307. handleRangePick: function handleRangePick(val) {
  30308. var _this = this;
  30309. var close = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  30310. var defaultTime = this.defaultTime || [];
  30311. var minDate = Object(date_util_["modifyWithTimeString"])(val.minDate, defaultTime[0]);
  30312. var maxDate = Object(date_util_["modifyWithTimeString"])(val.maxDate, defaultTime[1]);
  30313. if (this.maxDate === maxDate && this.minDate === minDate) {
  30314. return;
  30315. }
  30316. this.onPick && this.onPick(val);
  30317. this.maxDate = maxDate;
  30318. this.minDate = minDate;
  30319. // workaround for https://github.com/ElemeFE/element/issues/7539, should remove this block when we don't have to care about Chromium 55 - 57
  30320. setTimeout(function () {
  30321. _this.maxDate = maxDate;
  30322. _this.minDate = minDate;
  30323. }, 10);
  30324. if (!close) return;
  30325. this.handleConfirm();
  30326. },
  30327. handleShortcutClick: function handleShortcutClick(shortcut) {
  30328. if (shortcut.onClick) {
  30329. shortcut.onClick(this);
  30330. }
  30331. },
  30332. // leftPrev*, rightNext* need to take care of `unlinkPanels`
  30333. leftPrevYear: function leftPrevYear() {
  30334. this.leftDate = Object(date_util_["prevYear"])(this.leftDate);
  30335. if (!this.unlinkPanels) {
  30336. this.rightDate = Object(date_util_["prevYear"])(this.rightDate);
  30337. }
  30338. },
  30339. rightNextYear: function rightNextYear() {
  30340. if (!this.unlinkPanels) {
  30341. this.leftDate = Object(date_util_["nextYear"])(this.leftDate);
  30342. }
  30343. this.rightDate = Object(date_util_["nextYear"])(this.rightDate);
  30344. },
  30345. // leftNext*, rightPrev* are called when `unlinkPanels` is true
  30346. leftNextYear: function leftNextYear() {
  30347. this.leftDate = Object(date_util_["nextYear"])(this.leftDate);
  30348. },
  30349. rightPrevYear: function rightPrevYear() {
  30350. this.rightDate = Object(date_util_["prevYear"])(this.rightDate);
  30351. },
  30352. handleConfirm: function handleConfirm() {
  30353. var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  30354. if (this.isValidValue([this.minDate, this.maxDate])) {
  30355. this.$emit('pick', [this.minDate, this.maxDate], visible);
  30356. }
  30357. },
  30358. isValidValue: function isValidValue(value) {
  30359. return Array.isArray(value) && value && value[0] && value[1] && Object(date_util_["isDate"])(value[0]) && Object(date_util_["isDate"])(value[1]) && value[0].getTime() <= value[1].getTime() && (typeof this.disabledDate === 'function' ? !this.disabledDate(value[0]) && !this.disabledDate(value[1]) : true);
  30360. },
  30361. resetView: function resetView() {
  30362. // NOTE: this is a hack to reset {min, max}Date on picker open.
  30363. // TODO: correct way of doing so is to refactor {min, max}Date to be dependent on value and internal selection state
  30364. // an alternative would be resetView whenever picker becomes visible, should also investigate date-panel's resetView
  30365. this.minDate = this.value && Object(date_util_["isDate"])(this.value[0]) ? new Date(this.value[0]) : null;
  30366. this.maxDate = this.value && Object(date_util_["isDate"])(this.value[0]) ? new Date(this.value[1]) : null;
  30367. }
  30368. },
  30369. components: { MonthTable: month_table, ElInput: input_default.a, ElButton: button_default.a }
  30370. });
  30371. // CONCATENATED MODULE: ./packages/date-picker/src/panel/month-range.vue?vue&type=script&lang=js&
  30372. /* harmony default export */ var panel_month_rangevue_type_script_lang_js_ = (month_rangevue_type_script_lang_js_);
  30373. // CONCATENATED MODULE: ./packages/date-picker/src/panel/month-range.vue
  30374. /* normalize component */
  30375. var month_range_component = normalizeComponent(
  30376. panel_month_rangevue_type_script_lang_js_,
  30377. month_rangevue_type_template_id_f2645fb8_render,
  30378. month_rangevue_type_template_id_f2645fb8_staticRenderFns,
  30379. false,
  30380. null,
  30381. null,
  30382. null
  30383. )
  30384. /* hot reload */
  30385. if (false) { var month_range_api; }
  30386. month_range_component.options.__file = "packages/date-picker/src/panel/month-range.vue"
  30387. /* harmony default export */ var month_range = (month_range_component.exports);
  30388. // CONCATENATED MODULE: ./packages/date-picker/src/picker/date-picker.js
  30389. var date_picker_getPanel = function getPanel(type) {
  30390. if (type === 'daterange' || type === 'datetimerange') {
  30391. return date_range;
  30392. } else if (type === 'monthrange') {
  30393. return month_range;
  30394. }
  30395. return panel_date;
  30396. };
  30397. /* harmony default export */ var date_picker = ({
  30398. mixins: [picker],
  30399. name: 'ElDatePicker',
  30400. props: {
  30401. type: {
  30402. type: String,
  30403. default: 'date'
  30404. },
  30405. timeArrowControl: Boolean
  30406. },
  30407. watch: {
  30408. type: function type(_type) {
  30409. if (this.picker) {
  30410. this.unmountPicker();
  30411. this.panel = date_picker_getPanel(_type);
  30412. this.mountPicker();
  30413. } else {
  30414. this.panel = date_picker_getPanel(_type);
  30415. }
  30416. }
  30417. },
  30418. created: function created() {
  30419. this.panel = date_picker_getPanel(this.type);
  30420. }
  30421. });
  30422. // CONCATENATED MODULE: ./packages/date-picker/index.js
  30423. /* istanbul ignore next */
  30424. date_picker.install = function install(Vue) {
  30425. Vue.component(date_picker.name, date_picker);
  30426. };
  30427. /* harmony default export */ var packages_date_picker = (date_picker);
  30428. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-select.vue?vue&type=template&id=51ab9320&
  30429. var time_selectvue_type_template_id_51ab9320_render = function() {
  30430. var _vm = this
  30431. var _h = _vm.$createElement
  30432. var _c = _vm._self._c || _h
  30433. return _c(
  30434. "transition",
  30435. {
  30436. attrs: { name: "el-zoom-in-top" },
  30437. on: {
  30438. "before-enter": _vm.handleMenuEnter,
  30439. "after-leave": function($event) {
  30440. _vm.$emit("dodestroy")
  30441. }
  30442. }
  30443. },
  30444. [
  30445. _c(
  30446. "div",
  30447. {
  30448. directives: [
  30449. {
  30450. name: "show",
  30451. rawName: "v-show",
  30452. value: _vm.visible,
  30453. expression: "visible"
  30454. }
  30455. ],
  30456. ref: "popper",
  30457. staticClass: "el-picker-panel time-select el-popper",
  30458. class: _vm.popperClass,
  30459. style: { width: _vm.width + "px" }
  30460. },
  30461. [
  30462. _c(
  30463. "el-scrollbar",
  30464. {
  30465. attrs: { noresize: "", "wrap-class": "el-picker-panel__content" }
  30466. },
  30467. _vm._l(_vm.items, function(item) {
  30468. return _c(
  30469. "div",
  30470. {
  30471. key: item.value,
  30472. staticClass: "time-select-item",
  30473. class: {
  30474. selected: _vm.value === item.value,
  30475. disabled: item.disabled,
  30476. default: item.value === _vm.defaultValue
  30477. },
  30478. attrs: { disabled: item.disabled },
  30479. on: {
  30480. click: function($event) {
  30481. _vm.handleClick(item)
  30482. }
  30483. }
  30484. },
  30485. [_vm._v(_vm._s(item.value))]
  30486. )
  30487. }),
  30488. 0
  30489. )
  30490. ],
  30491. 1
  30492. )
  30493. ]
  30494. )
  30495. }
  30496. var time_selectvue_type_template_id_51ab9320_staticRenderFns = []
  30497. time_selectvue_type_template_id_51ab9320_render._withStripped = true
  30498. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time-select.vue?vue&type=template&id=51ab9320&
  30499. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-select.vue?vue&type=script&lang=js&
  30500. //
  30501. //
  30502. //
  30503. //
  30504. //
  30505. //
  30506. //
  30507. //
  30508. //
  30509. //
  30510. //
  30511. //
  30512. //
  30513. //
  30514. //
  30515. //
  30516. //
  30517. //
  30518. //
  30519. //
  30520. var parseTime = function parseTime(time) {
  30521. var values = (time || '').split(':');
  30522. if (values.length >= 2) {
  30523. var hours = parseInt(values[0], 10);
  30524. var minutes = parseInt(values[1], 10);
  30525. return {
  30526. hours: hours,
  30527. minutes: minutes
  30528. };
  30529. }
  30530. /* istanbul ignore next */
  30531. return null;
  30532. };
  30533. var compareTime = function compareTime(time1, time2) {
  30534. var value1 = parseTime(time1);
  30535. var value2 = parseTime(time2);
  30536. var minutes1 = value1.minutes + value1.hours * 60;
  30537. var minutes2 = value2.minutes + value2.hours * 60;
  30538. if (minutes1 === minutes2) {
  30539. return 0;
  30540. }
  30541. return minutes1 > minutes2 ? 1 : -1;
  30542. };
  30543. var formatTime = function formatTime(time) {
  30544. return (time.hours < 10 ? '0' + time.hours : time.hours) + ':' + (time.minutes < 10 ? '0' + time.minutes : time.minutes);
  30545. };
  30546. var nextTime = function nextTime(time, step) {
  30547. var timeValue = parseTime(time);
  30548. var stepValue = parseTime(step);
  30549. var next = {
  30550. hours: timeValue.hours,
  30551. minutes: timeValue.minutes
  30552. };
  30553. next.minutes += stepValue.minutes;
  30554. next.hours += stepValue.hours;
  30555. next.hours += Math.floor(next.minutes / 60);
  30556. next.minutes = next.minutes % 60;
  30557. return formatTime(next);
  30558. };
  30559. /* harmony default export */ var time_selectvue_type_script_lang_js_ = ({
  30560. components: { ElScrollbar: scrollbar_default.a },
  30561. watch: {
  30562. value: function value(val) {
  30563. var _this = this;
  30564. if (!val) return;
  30565. this.$nextTick(function () {
  30566. return _this.scrollToOption();
  30567. });
  30568. }
  30569. },
  30570. methods: {
  30571. handleClick: function handleClick(item) {
  30572. if (!item.disabled) {
  30573. this.$emit('pick', item.value);
  30574. }
  30575. },
  30576. handleClear: function handleClear() {
  30577. this.$emit('pick', null);
  30578. },
  30579. scrollToOption: function scrollToOption() {
  30580. var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.selected';
  30581. var menu = this.$refs.popper.querySelector('.el-picker-panel__content');
  30582. scroll_into_view_default()(menu, menu.querySelector(selector));
  30583. },
  30584. handleMenuEnter: function handleMenuEnter() {
  30585. var _this2 = this;
  30586. var selected = this.items.map(function (item) {
  30587. return item.value;
  30588. }).indexOf(this.value) !== -1;
  30589. var hasDefault = this.items.map(function (item) {
  30590. return item.value;
  30591. }).indexOf(this.defaultValue) !== -1;
  30592. var option = selected && '.selected' || hasDefault && '.default' || '.time-select-item:not(.disabled)';
  30593. this.$nextTick(function () {
  30594. return _this2.scrollToOption(option);
  30595. });
  30596. },
  30597. scrollDown: function scrollDown(step) {
  30598. var items = this.items;
  30599. var length = items.length;
  30600. var total = items.length;
  30601. var index = items.map(function (item) {
  30602. return item.value;
  30603. }).indexOf(this.value);
  30604. while (total--) {
  30605. index = (index + step + length) % length;
  30606. if (!items[index].disabled) {
  30607. this.$emit('pick', items[index].value, true);
  30608. return;
  30609. }
  30610. }
  30611. },
  30612. isValidValue: function isValidValue(date) {
  30613. return this.items.filter(function (item) {
  30614. return !item.disabled;
  30615. }).map(function (item) {
  30616. return item.value;
  30617. }).indexOf(date) !== -1;
  30618. },
  30619. handleKeydown: function handleKeydown(event) {
  30620. var keyCode = event.keyCode;
  30621. if (keyCode === 38 || keyCode === 40) {
  30622. var mapping = { 40: 1, 38: -1 };
  30623. var offset = mapping[keyCode.toString()];
  30624. this.scrollDown(offset);
  30625. event.stopPropagation();
  30626. return;
  30627. }
  30628. }
  30629. },
  30630. data: function data() {
  30631. return {
  30632. popperClass: '',
  30633. start: '09:00',
  30634. end: '18:00',
  30635. step: '00:30',
  30636. value: '',
  30637. defaultValue: '',
  30638. visible: false,
  30639. minTime: '',
  30640. maxTime: '',
  30641. width: 0
  30642. };
  30643. },
  30644. computed: {
  30645. items: function items() {
  30646. var start = this.start;
  30647. var end = this.end;
  30648. var step = this.step;
  30649. var result = [];
  30650. if (start && end && step) {
  30651. var current = start;
  30652. while (compareTime(current, end) <= 0) {
  30653. result.push({
  30654. value: current,
  30655. disabled: compareTime(current, this.minTime || '-1:-1') <= 0 || compareTime(current, this.maxTime || '100:100') >= 0
  30656. });
  30657. current = nextTime(current, step);
  30658. }
  30659. }
  30660. return result;
  30661. }
  30662. }
  30663. });
  30664. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time-select.vue?vue&type=script&lang=js&
  30665. /* harmony default export */ var panel_time_selectvue_type_script_lang_js_ = (time_selectvue_type_script_lang_js_);
  30666. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time-select.vue
  30667. /* normalize component */
  30668. var time_select_component = normalizeComponent(
  30669. panel_time_selectvue_type_script_lang_js_,
  30670. time_selectvue_type_template_id_51ab9320_render,
  30671. time_selectvue_type_template_id_51ab9320_staticRenderFns,
  30672. false,
  30673. null,
  30674. null,
  30675. null
  30676. )
  30677. /* hot reload */
  30678. if (false) { var time_select_api; }
  30679. time_select_component.options.__file = "packages/date-picker/src/panel/time-select.vue"
  30680. /* harmony default export */ var time_select = (time_select_component.exports);
  30681. // CONCATENATED MODULE: ./packages/date-picker/src/picker/time-select.js
  30682. /* harmony default export */ var picker_time_select = ({
  30683. mixins: [picker],
  30684. name: 'ElTimeSelect',
  30685. componentName: 'ElTimeSelect',
  30686. props: {
  30687. type: {
  30688. type: String,
  30689. default: 'time-select'
  30690. }
  30691. },
  30692. beforeCreate: function beforeCreate() {
  30693. this.panel = time_select;
  30694. }
  30695. });
  30696. // CONCATENATED MODULE: ./packages/time-select/index.js
  30697. /* istanbul ignore next */
  30698. picker_time_select.install = function (Vue) {
  30699. Vue.component(picker_time_select.name, picker_time_select);
  30700. };
  30701. /* harmony default export */ var packages_time_select = (picker_time_select);
  30702. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=fb28660e&
  30703. var time_rangevue_type_template_id_fb28660e_render = function() {
  30704. var _vm = this
  30705. var _h = _vm.$createElement
  30706. var _c = _vm._self._c || _h
  30707. return _c(
  30708. "transition",
  30709. {
  30710. attrs: { name: "el-zoom-in-top" },
  30711. on: {
  30712. "after-leave": function($event) {
  30713. _vm.$emit("dodestroy")
  30714. }
  30715. }
  30716. },
  30717. [
  30718. _c(
  30719. "div",
  30720. {
  30721. directives: [
  30722. {
  30723. name: "show",
  30724. rawName: "v-show",
  30725. value: _vm.visible,
  30726. expression: "visible"
  30727. }
  30728. ],
  30729. staticClass: "el-time-range-picker el-picker-panel el-popper",
  30730. class: _vm.popperClass
  30731. },
  30732. [
  30733. _c("div", { staticClass: "el-time-range-picker__content" }, [
  30734. _c("div", { staticClass: "el-time-range-picker__cell" }, [
  30735. _c("div", { staticClass: "el-time-range-picker__header" }, [
  30736. _vm._v(_vm._s(_vm.t("el.datepicker.startTime")))
  30737. ]),
  30738. _c(
  30739. "div",
  30740. {
  30741. staticClass:
  30742. "el-time-range-picker__body el-time-panel__content",
  30743. class: {
  30744. "has-seconds": _vm.showSeconds,
  30745. "is-arrow": _vm.arrowControl
  30746. }
  30747. },
  30748. [
  30749. _c("time-spinner", {
  30750. ref: "minSpinner",
  30751. attrs: {
  30752. "show-seconds": _vm.showSeconds,
  30753. "am-pm-mode": _vm.amPmMode,
  30754. "arrow-control": _vm.arrowControl,
  30755. date: _vm.minDate
  30756. },
  30757. on: {
  30758. change: _vm.handleMinChange,
  30759. "select-range": _vm.setMinSelectionRange
  30760. }
  30761. })
  30762. ],
  30763. 1
  30764. )
  30765. ]),
  30766. _c("div", { staticClass: "el-time-range-picker__cell" }, [
  30767. _c("div", { staticClass: "el-time-range-picker__header" }, [
  30768. _vm._v(_vm._s(_vm.t("el.datepicker.endTime")))
  30769. ]),
  30770. _c(
  30771. "div",
  30772. {
  30773. staticClass:
  30774. "el-time-range-picker__body el-time-panel__content",
  30775. class: {
  30776. "has-seconds": _vm.showSeconds,
  30777. "is-arrow": _vm.arrowControl
  30778. }
  30779. },
  30780. [
  30781. _c("time-spinner", {
  30782. ref: "maxSpinner",
  30783. attrs: {
  30784. "show-seconds": _vm.showSeconds,
  30785. "am-pm-mode": _vm.amPmMode,
  30786. "arrow-control": _vm.arrowControl,
  30787. date: _vm.maxDate
  30788. },
  30789. on: {
  30790. change: _vm.handleMaxChange,
  30791. "select-range": _vm.setMaxSelectionRange
  30792. }
  30793. })
  30794. ],
  30795. 1
  30796. )
  30797. ])
  30798. ]),
  30799. _c("div", { staticClass: "el-time-panel__footer" }, [
  30800. _c(
  30801. "button",
  30802. {
  30803. staticClass: "el-time-panel__btn cancel",
  30804. attrs: { type: "button" },
  30805. on: {
  30806. click: function($event) {
  30807. _vm.handleCancel()
  30808. }
  30809. }
  30810. },
  30811. [_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]
  30812. ),
  30813. _c(
  30814. "button",
  30815. {
  30816. staticClass: "el-time-panel__btn confirm",
  30817. attrs: { type: "button", disabled: _vm.btnDisabled },
  30818. on: {
  30819. click: function($event) {
  30820. _vm.handleConfirm()
  30821. }
  30822. }
  30823. },
  30824. [_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))]
  30825. )
  30826. ])
  30827. ]
  30828. )
  30829. ]
  30830. )
  30831. }
  30832. var time_rangevue_type_template_id_fb28660e_staticRenderFns = []
  30833. time_rangevue_type_template_id_fb28660e_render._withStripped = true
  30834. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=fb28660e&
  30835. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js&
  30836. //
  30837. //
  30838. //
  30839. //
  30840. //
  30841. //
  30842. //
  30843. //
  30844. //
  30845. //
  30846. //
  30847. //
  30848. //
  30849. //
  30850. //
  30851. //
  30852. //
  30853. //
  30854. //
  30855. //
  30856. //
  30857. //
  30858. //
  30859. //
  30860. //
  30861. //
  30862. //
  30863. //
  30864. //
  30865. //
  30866. //
  30867. //
  30868. //
  30869. //
  30870. //
  30871. //
  30872. //
  30873. //
  30874. //
  30875. //
  30876. //
  30877. //
  30878. //
  30879. //
  30880. //
  30881. //
  30882. //
  30883. //
  30884. //
  30885. //
  30886. //
  30887. //
  30888. //
  30889. //
  30890. //
  30891. //
  30892. //
  30893. var MIN_TIME = Object(date_util_["parseDate"])('00:00:00', 'HH:mm:ss');
  30894. var MAX_TIME = Object(date_util_["parseDate"])('23:59:59', 'HH:mm:ss');
  30895. var time_rangevue_type_script_lang_js_minTimeOfDay = function minTimeOfDay(date) {
  30896. return Object(date_util_["modifyDate"])(MIN_TIME, date.getFullYear(), date.getMonth(), date.getDate());
  30897. };
  30898. var time_rangevue_type_script_lang_js_maxTimeOfDay = function maxTimeOfDay(date) {
  30899. return Object(date_util_["modifyDate"])(MAX_TIME, date.getFullYear(), date.getMonth(), date.getDate());
  30900. };
  30901. // increase time by amount of milliseconds, but within the range of day
  30902. var advanceTime = function advanceTime(date, amount) {
  30903. return new Date(Math.min(date.getTime() + amount, time_rangevue_type_script_lang_js_maxTimeOfDay(date).getTime()));
  30904. };
  30905. /* harmony default export */ var time_rangevue_type_script_lang_js_ = ({
  30906. mixins: [locale_default.a],
  30907. components: { TimeSpinner: time_spinner },
  30908. computed: {
  30909. showSeconds: function showSeconds() {
  30910. return (this.format || '').indexOf('ss') !== -1;
  30911. },
  30912. offset: function offset() {
  30913. return this.showSeconds ? 11 : 8;
  30914. },
  30915. spinner: function spinner() {
  30916. return this.selectionRange[0] < this.offset ? this.$refs.minSpinner : this.$refs.maxSpinner;
  30917. },
  30918. btnDisabled: function btnDisabled() {
  30919. return this.minDate.getTime() > this.maxDate.getTime();
  30920. },
  30921. amPmMode: function amPmMode() {
  30922. if ((this.format || '').indexOf('A') !== -1) return 'A';
  30923. if ((this.format || '').indexOf('a') !== -1) return 'a';
  30924. return '';
  30925. }
  30926. },
  30927. data: function data() {
  30928. return {
  30929. popperClass: '',
  30930. minDate: new Date(),
  30931. maxDate: new Date(),
  30932. value: [],
  30933. oldValue: [new Date(), new Date()],
  30934. defaultValue: null,
  30935. format: 'HH:mm:ss',
  30936. visible: false,
  30937. selectionRange: [0, 2],
  30938. arrowControl: false
  30939. };
  30940. },
  30941. watch: {
  30942. value: function value(_value) {
  30943. if (Array.isArray(_value)) {
  30944. this.minDate = new Date(_value[0]);
  30945. this.maxDate = new Date(_value[1]);
  30946. } else {
  30947. if (Array.isArray(this.defaultValue)) {
  30948. this.minDate = new Date(this.defaultValue[0]);
  30949. this.maxDate = new Date(this.defaultValue[1]);
  30950. } else if (this.defaultValue) {
  30951. this.minDate = new Date(this.defaultValue);
  30952. this.maxDate = advanceTime(new Date(this.defaultValue), 60 * 60 * 1000);
  30953. } else {
  30954. this.minDate = new Date();
  30955. this.maxDate = advanceTime(new Date(), 60 * 60 * 1000);
  30956. }
  30957. }
  30958. },
  30959. visible: function visible(val) {
  30960. var _this = this;
  30961. if (val) {
  30962. this.oldValue = this.value;
  30963. this.$nextTick(function () {
  30964. return _this.$refs.minSpinner.emitSelectRange('hours');
  30965. });
  30966. }
  30967. }
  30968. },
  30969. methods: {
  30970. handleClear: function handleClear() {
  30971. this.$emit('pick', null);
  30972. },
  30973. handleCancel: function handleCancel() {
  30974. this.$emit('pick', this.oldValue);
  30975. },
  30976. handleMinChange: function handleMinChange(date) {
  30977. this.minDate = Object(date_util_["clearMilliseconds"])(date);
  30978. this.handleChange();
  30979. },
  30980. handleMaxChange: function handleMaxChange(date) {
  30981. this.maxDate = Object(date_util_["clearMilliseconds"])(date);
  30982. this.handleChange();
  30983. },
  30984. handleChange: function handleChange() {
  30985. if (this.isValidValue([this.minDate, this.maxDate])) {
  30986. this.$refs.minSpinner.selectableRange = [[time_rangevue_type_script_lang_js_minTimeOfDay(this.minDate), this.maxDate]];
  30987. this.$refs.maxSpinner.selectableRange = [[this.minDate, time_rangevue_type_script_lang_js_maxTimeOfDay(this.maxDate)]];
  30988. this.$emit('pick', [this.minDate, this.maxDate], true);
  30989. }
  30990. },
  30991. setMinSelectionRange: function setMinSelectionRange(start, end) {
  30992. this.$emit('select-range', start, end, 'min');
  30993. this.selectionRange = [start, end];
  30994. },
  30995. setMaxSelectionRange: function setMaxSelectionRange(start, end) {
  30996. this.$emit('select-range', start, end, 'max');
  30997. this.selectionRange = [start + this.offset, end + this.offset];
  30998. },
  30999. handleConfirm: function handleConfirm() {
  31000. var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  31001. var minSelectableRange = this.$refs.minSpinner.selectableRange;
  31002. var maxSelectableRange = this.$refs.maxSpinner.selectableRange;
  31003. this.minDate = Object(date_util_["limitTimeRange"])(this.minDate, minSelectableRange, this.format);
  31004. this.maxDate = Object(date_util_["limitTimeRange"])(this.maxDate, maxSelectableRange, this.format);
  31005. this.$emit('pick', [this.minDate, this.maxDate], visible);
  31006. },
  31007. adjustSpinners: function adjustSpinners() {
  31008. this.$refs.minSpinner.adjustSpinners();
  31009. this.$refs.maxSpinner.adjustSpinners();
  31010. },
  31011. changeSelectionRange: function changeSelectionRange(step) {
  31012. var list = this.showSeconds ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11];
  31013. var mapping = ['hours', 'minutes'].concat(this.showSeconds ? ['seconds'] : []);
  31014. var index = list.indexOf(this.selectionRange[0]);
  31015. var next = (index + step + list.length) % list.length;
  31016. var half = list.length / 2;
  31017. if (next < half) {
  31018. this.$refs.minSpinner.emitSelectRange(mapping[next]);
  31019. } else {
  31020. this.$refs.maxSpinner.emitSelectRange(mapping[next - half]);
  31021. }
  31022. },
  31023. isValidValue: function isValidValue(date) {
  31024. return Array.isArray(date) && Object(date_util_["timeWithinRange"])(this.minDate, this.$refs.minSpinner.selectableRange) && Object(date_util_["timeWithinRange"])(this.maxDate, this.$refs.maxSpinner.selectableRange);
  31025. },
  31026. handleKeydown: function handleKeydown(event) {
  31027. var keyCode = event.keyCode;
  31028. var mapping = { 38: -1, 40: 1, 37: -1, 39: 1 };
  31029. // Left or Right
  31030. if (keyCode === 37 || keyCode === 39) {
  31031. var step = mapping[keyCode];
  31032. this.changeSelectionRange(step);
  31033. event.preventDefault();
  31034. return;
  31035. }
  31036. // Up or Down
  31037. if (keyCode === 38 || keyCode === 40) {
  31038. var _step = mapping[keyCode];
  31039. this.spinner.scrollDown(_step);
  31040. event.preventDefault();
  31041. return;
  31042. }
  31043. }
  31044. }
  31045. });
  31046. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js&
  31047. /* harmony default export */ var panel_time_rangevue_type_script_lang_js_ = (time_rangevue_type_script_lang_js_);
  31048. // CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue
  31049. /* normalize component */
  31050. var time_range_component = normalizeComponent(
  31051. panel_time_rangevue_type_script_lang_js_,
  31052. time_rangevue_type_template_id_fb28660e_render,
  31053. time_rangevue_type_template_id_fb28660e_staticRenderFns,
  31054. false,
  31055. null,
  31056. null,
  31057. null
  31058. )
  31059. /* hot reload */
  31060. if (false) { var time_range_api; }
  31061. time_range_component.options.__file = "packages/date-picker/src/panel/time-range.vue"
  31062. /* harmony default export */ var time_range = (time_range_component.exports);
  31063. // CONCATENATED MODULE: ./packages/date-picker/src/picker/time-picker.js
  31064. /* harmony default export */ var time_picker = ({
  31065. mixins: [picker],
  31066. name: 'ElTimePicker',
  31067. props: {
  31068. isRange: Boolean,
  31069. arrowControl: Boolean
  31070. },
  31071. data: function data() {
  31072. return {
  31073. type: ''
  31074. };
  31075. },
  31076. watch: {
  31077. isRange: function isRange(_isRange) {
  31078. if (this.picker) {
  31079. this.unmountPicker();
  31080. this.type = _isRange ? 'timerange' : 'time';
  31081. this.panel = _isRange ? time_range : panel_time;
  31082. this.mountPicker();
  31083. } else {
  31084. this.type = _isRange ? 'timerange' : 'time';
  31085. this.panel = _isRange ? time_range : panel_time;
  31086. }
  31087. }
  31088. },
  31089. created: function created() {
  31090. this.type = this.isRange ? 'timerange' : 'time';
  31091. this.panel = this.isRange ? time_range : panel_time;
  31092. }
  31093. });
  31094. // CONCATENATED MODULE: ./packages/time-picker/index.js
  31095. /* istanbul ignore next */
  31096. time_picker.install = function (Vue) {
  31097. Vue.component(time_picker.name, time_picker);
  31098. };
  31099. /* harmony default export */ var packages_time_picker = (time_picker);
  31100. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=52060272&
  31101. var mainvue_type_template_id_52060272_render = function() {
  31102. var _vm = this
  31103. var _h = _vm.$createElement
  31104. var _c = _vm._self._c || _h
  31105. return _c(
  31106. "span",
  31107. [
  31108. _c(
  31109. "transition",
  31110. {
  31111. attrs: { name: _vm.transition },
  31112. on: {
  31113. "after-enter": _vm.handleAfterEnter,
  31114. "after-leave": _vm.handleAfterLeave
  31115. }
  31116. },
  31117. [
  31118. _c(
  31119. "div",
  31120. {
  31121. directives: [
  31122. {
  31123. name: "show",
  31124. rawName: "v-show",
  31125. value: !_vm.disabled && _vm.showPopper,
  31126. expression: "!disabled && showPopper"
  31127. }
  31128. ],
  31129. ref: "popper",
  31130. staticClass: "el-popover el-popper",
  31131. class: [_vm.popperClass, _vm.content && "el-popover--plain"],
  31132. style: { width: _vm.width + "px" },
  31133. attrs: {
  31134. role: "tooltip",
  31135. id: _vm.tooltipId,
  31136. "aria-hidden":
  31137. _vm.disabled || !_vm.showPopper ? "true" : "false"
  31138. }
  31139. },
  31140. [
  31141. _vm.title
  31142. ? _c("div", {
  31143. staticClass: "el-popover__title",
  31144. domProps: { textContent: _vm._s(_vm.title) }
  31145. })
  31146. : _vm._e(),
  31147. _vm._t("default", [_vm._v(_vm._s(_vm.content))])
  31148. ],
  31149. 2
  31150. )
  31151. ]
  31152. ),
  31153. _c(
  31154. "span",
  31155. { ref: "wrapper", staticClass: "el-popover__reference-wrapper" },
  31156. [_vm._t("reference")],
  31157. 2
  31158. )
  31159. ],
  31160. 1
  31161. )
  31162. }
  31163. var mainvue_type_template_id_52060272_staticRenderFns = []
  31164. mainvue_type_template_id_52060272_render._withStripped = true
  31165. // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=52060272&
  31166. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js&
  31167. //
  31168. //
  31169. //
  31170. //
  31171. //
  31172. //
  31173. //
  31174. //
  31175. //
  31176. //
  31177. //
  31178. //
  31179. //
  31180. //
  31181. //
  31182. //
  31183. //
  31184. //
  31185. //
  31186. //
  31187. //
  31188. //
  31189. //
  31190. //
  31191. //
  31192. /* harmony default export */ var mainvue_type_script_lang_js_ = ({
  31193. name: 'ElPopover',
  31194. mixins: [vue_popper_default.a],
  31195. props: {
  31196. trigger: {
  31197. type: String,
  31198. default: 'click',
  31199. validator: function validator(value) {
  31200. return ['click', 'focus', 'hover', 'manual'].indexOf(value) > -1;
  31201. }
  31202. },
  31203. openDelay: {
  31204. type: Number,
  31205. default: 0
  31206. },
  31207. closeDelay: {
  31208. type: Number,
  31209. default: 200
  31210. },
  31211. title: String,
  31212. disabled: Boolean,
  31213. content: String,
  31214. reference: {},
  31215. popperClass: String,
  31216. width: {},
  31217. visibleArrow: {
  31218. default: true
  31219. },
  31220. arrowOffset: {
  31221. type: Number,
  31222. default: 0
  31223. },
  31224. transition: {
  31225. type: String,
  31226. default: 'fade-in-linear'
  31227. },
  31228. tabindex: {
  31229. type: Number,
  31230. default: 0
  31231. }
  31232. },
  31233. computed: {
  31234. tooltipId: function tooltipId() {
  31235. return 'el-popover-' + Object(util_["generateId"])();
  31236. }
  31237. },
  31238. watch: {
  31239. showPopper: function showPopper(val) {
  31240. if (this.disabled) {
  31241. return;
  31242. }
  31243. val ? this.$emit('show') : this.$emit('hide');
  31244. }
  31245. },
  31246. mounted: function mounted() {
  31247. var _this = this;
  31248. var reference = this.referenceElm = this.reference || this.$refs.reference;
  31249. var popper = this.popper || this.$refs.popper;
  31250. if (!reference && this.$refs.wrapper.children) {
  31251. reference = this.referenceElm = this.$refs.wrapper.children[0];
  31252. }
  31253. // 可访问性
  31254. if (reference) {
  31255. Object(dom_["addClass"])(reference, 'el-popover__reference');
  31256. reference.setAttribute('aria-describedby', this.tooltipId);
  31257. reference.setAttribute('tabindex', this.tabindex); // tab序列
  31258. popper.setAttribute('tabindex', 0);
  31259. if (this.trigger !== 'click') {
  31260. Object(dom_["on"])(reference, 'focusin', function () {
  31261. _this.handleFocus();
  31262. var instance = reference.__vue__;
  31263. if (instance && typeof instance.focus === 'function') {
  31264. instance.focus();
  31265. }
  31266. });
  31267. Object(dom_["on"])(popper, 'focusin', this.handleFocus);
  31268. Object(dom_["on"])(reference, 'focusout', this.handleBlur);
  31269. Object(dom_["on"])(popper, 'focusout', this.handleBlur);
  31270. }
  31271. Object(dom_["on"])(reference, 'keydown', this.handleKeydown);
  31272. Object(dom_["on"])(reference, 'click', this.handleClick);
  31273. }
  31274. if (this.trigger === 'click') {
  31275. Object(dom_["on"])(reference, 'click', this.doToggle);
  31276. Object(dom_["on"])(document, 'click', this.handleDocumentClick);
  31277. } else if (this.trigger === 'hover') {
  31278. Object(dom_["on"])(reference, 'mouseenter', this.handleMouseEnter);
  31279. Object(dom_["on"])(popper, 'mouseenter', this.handleMouseEnter);
  31280. Object(dom_["on"])(reference, 'mouseleave', this.handleMouseLeave);
  31281. Object(dom_["on"])(popper, 'mouseleave', this.handleMouseLeave);
  31282. } else if (this.trigger === 'focus') {
  31283. if (this.tabindex < 0) {
  31284. console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');
  31285. }
  31286. if (reference.querySelector('input, textarea')) {
  31287. Object(dom_["on"])(reference, 'focusin', this.doShow);
  31288. Object(dom_["on"])(reference, 'focusout', this.doClose);
  31289. } else {
  31290. Object(dom_["on"])(reference, 'mousedown', this.doShow);
  31291. Object(dom_["on"])(reference, 'mouseup', this.doClose);
  31292. }
  31293. }
  31294. },
  31295. beforeDestroy: function beforeDestroy() {
  31296. this.cleanup();
  31297. },
  31298. deactivated: function deactivated() {
  31299. this.cleanup();
  31300. },
  31301. methods: {
  31302. doToggle: function doToggle() {
  31303. this.showPopper = !this.showPopper;
  31304. },
  31305. doShow: function doShow() {
  31306. this.showPopper = true;
  31307. },
  31308. doClose: function doClose() {
  31309. this.showPopper = false;
  31310. },
  31311. handleFocus: function handleFocus() {
  31312. Object(dom_["addClass"])(this.referenceElm, 'focusing');
  31313. if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = true;
  31314. },
  31315. handleClick: function handleClick() {
  31316. Object(dom_["removeClass"])(this.referenceElm, 'focusing');
  31317. },
  31318. handleBlur: function handleBlur() {
  31319. Object(dom_["removeClass"])(this.referenceElm, 'focusing');
  31320. if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = false;
  31321. },
  31322. handleMouseEnter: function handleMouseEnter() {
  31323. var _this2 = this;
  31324. clearTimeout(this._timer);
  31325. if (this.openDelay) {
  31326. this._timer = setTimeout(function () {
  31327. _this2.showPopper = true;
  31328. }, this.openDelay);
  31329. } else {
  31330. this.showPopper = true;
  31331. }
  31332. },
  31333. handleKeydown: function handleKeydown(ev) {
  31334. if (ev.keyCode === 27 && this.trigger !== 'manual') {
  31335. // esc
  31336. this.doClose();
  31337. }
  31338. },
  31339. handleMouseLeave: function handleMouseLeave() {
  31340. var _this3 = this;
  31341. clearTimeout(this._timer);
  31342. if (this.closeDelay) {
  31343. this._timer = setTimeout(function () {
  31344. _this3.showPopper = false;
  31345. }, this.closeDelay);
  31346. } else {
  31347. this.showPopper = false;
  31348. }
  31349. },
  31350. handleDocumentClick: function handleDocumentClick(e) {
  31351. var reference = this.reference || this.$refs.reference;
  31352. var popper = this.popper || this.$refs.popper;
  31353. if (!reference && this.$refs.wrapper.children) {
  31354. reference = this.referenceElm = this.$refs.wrapper.children[0];
  31355. }
  31356. if (!this.$el || !reference || this.$el.contains(e.target) || reference.contains(e.target) || !popper || popper.contains(e.target)) return;
  31357. this.showPopper = false;
  31358. },
  31359. handleAfterEnter: function handleAfterEnter() {
  31360. this.$emit('after-enter');
  31361. },
  31362. handleAfterLeave: function handleAfterLeave() {
  31363. this.$emit('after-leave');
  31364. this.doDestroy();
  31365. },
  31366. cleanup: function cleanup() {
  31367. if (this.openDelay || this.closeDelay) {
  31368. clearTimeout(this._timer);
  31369. }
  31370. }
  31371. },
  31372. destroyed: function destroyed() {
  31373. var reference = this.reference;
  31374. Object(dom_["off"])(reference, 'click', this.doToggle);
  31375. Object(dom_["off"])(reference, 'mouseup', this.doClose);
  31376. Object(dom_["off"])(reference, 'mousedown', this.doShow);
  31377. Object(dom_["off"])(reference, 'focusin', this.doShow);
  31378. Object(dom_["off"])(reference, 'focusout', this.doClose);
  31379. Object(dom_["off"])(reference, 'mousedown', this.doShow);
  31380. Object(dom_["off"])(reference, 'mouseup', this.doClose);
  31381. Object(dom_["off"])(reference, 'mouseleave', this.handleMouseLeave);
  31382. Object(dom_["off"])(reference, 'mouseenter', this.handleMouseEnter);
  31383. Object(dom_["off"])(document, 'click', this.handleDocumentClick);
  31384. }
  31385. });
  31386. // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js&
  31387. /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
  31388. // CONCATENATED MODULE: ./packages/popover/src/main.vue
  31389. /* normalize component */
  31390. var main_component = normalizeComponent(
  31391. src_mainvue_type_script_lang_js_,
  31392. mainvue_type_template_id_52060272_render,
  31393. mainvue_type_template_id_52060272_staticRenderFns,
  31394. false,
  31395. null,
  31396. null,
  31397. null
  31398. )
  31399. /* hot reload */
  31400. if (false) { var main_api; }
  31401. main_component.options.__file = "packages/popover/src/main.vue"
  31402. /* harmony default export */ var main = (main_component.exports);
  31403. // CONCATENATED MODULE: ./packages/popover/src/directive.js
  31404. var getReference = function getReference(el, binding, vnode) {
  31405. var _ref = binding.expression ? binding.value : binding.arg;
  31406. var popper = vnode.context.$refs[_ref];
  31407. if (popper) {
  31408. if (Array.isArray(popper)) {
  31409. popper[0].$refs.reference = el;
  31410. } else {
  31411. popper.$refs.reference = el;
  31412. }
  31413. }
  31414. };
  31415. /* harmony default export */ var directive = ({
  31416. bind: function bind(el, binding, vnode) {
  31417. getReference(el, binding, vnode);
  31418. },
  31419. inserted: function inserted(el, binding, vnode) {
  31420. getReference(el, binding, vnode);
  31421. }
  31422. });
  31423. // CONCATENATED MODULE: ./packages/popover/index.js
  31424. external_vue_default.a.directive('popover', directive);
  31425. /* istanbul ignore next */
  31426. main.install = function (Vue) {
  31427. Vue.directive('popover', directive);
  31428. Vue.component(main.name, main);
  31429. };
  31430. main.directive = directive;
  31431. /* harmony default export */ var popover = (main);
  31432. // CONCATENATED MODULE: ./packages/tooltip/src/main.js
  31433. /* harmony default export */ var src_main = ({
  31434. name: 'ElTooltip',
  31435. mixins: [vue_popper_default.a],
  31436. props: {
  31437. openDelay: {
  31438. type: Number,
  31439. default: 0
  31440. },
  31441. disabled: Boolean,
  31442. manual: Boolean,
  31443. effect: {
  31444. type: String,
  31445. default: 'dark'
  31446. },
  31447. arrowOffset: {
  31448. type: Number,
  31449. default: 0
  31450. },
  31451. popperClass: String,
  31452. content: String,
  31453. visibleArrow: {
  31454. default: true
  31455. },
  31456. transition: {
  31457. type: String,
  31458. default: 'el-fade-in-linear'
  31459. },
  31460. popperOptions: {
  31461. default: function _default() {
  31462. return {
  31463. boundariesPadding: 10,
  31464. gpuAcceleration: false
  31465. };
  31466. }
  31467. },
  31468. enterable: {
  31469. type: Boolean,
  31470. default: true
  31471. },
  31472. hideAfter: {
  31473. type: Number,
  31474. default: 0
  31475. },
  31476. tabindex: {
  31477. type: Number,
  31478. default: 0
  31479. }
  31480. },
  31481. data: function data() {
  31482. return {
  31483. tooltipId: 'el-tooltip-' + Object(util_["generateId"])(),
  31484. timeoutPending: null,
  31485. focusing: false
  31486. };
  31487. },
  31488. beforeCreate: function beforeCreate() {
  31489. var _this = this;
  31490. if (this.$isServer) return;
  31491. this.popperVM = new external_vue_default.a({
  31492. data: { node: '' },
  31493. render: function render(h) {
  31494. return this.node;
  31495. }
  31496. }).$mount();
  31497. this.debounceClose = debounce_default()(200, function () {
  31498. return _this.handleClosePopper();
  31499. });
  31500. },
  31501. render: function render(h) {
  31502. var _this2 = this;
  31503. if (this.popperVM) {
  31504. this.popperVM.node = h(
  31505. 'transition',
  31506. {
  31507. attrs: {
  31508. name: this.transition
  31509. },
  31510. on: {
  31511. 'afterLeave': this.doDestroy
  31512. }
  31513. },
  31514. [h(
  31515. 'div',
  31516. {
  31517. on: {
  31518. 'mouseleave': function mouseleave() {
  31519. _this2.setExpectedState(false);_this2.debounceClose();
  31520. },
  31521. 'mouseenter': function mouseenter() {
  31522. _this2.setExpectedState(true);
  31523. }
  31524. },
  31525. ref: 'popper',
  31526. attrs: { role: 'tooltip',
  31527. id: this.tooltipId,
  31528. 'aria-hidden': this.disabled || !this.showPopper ? 'true' : 'false'
  31529. },
  31530. directives: [{
  31531. name: 'show',
  31532. value: !this.disabled && this.showPopper
  31533. }],
  31534. 'class': ['el-tooltip__popper', 'is-' + this.effect, this.popperClass] },
  31535. [this.$slots.content || this.content]
  31536. )]
  31537. );
  31538. }
  31539. var firstElement = this.getFirstElement();
  31540. if (!firstElement) return null;
  31541. var data = firstElement.data = firstElement.data || {};
  31542. data.staticClass = this.addTooltipClass(data.staticClass);
  31543. return firstElement;
  31544. },
  31545. mounted: function mounted() {
  31546. var _this3 = this;
  31547. this.referenceElm = this.$el;
  31548. if (this.$el.nodeType === 1) {
  31549. this.$el.setAttribute('aria-describedby', this.tooltipId);
  31550. this.$el.setAttribute('tabindex', this.tabindex);
  31551. Object(dom_["on"])(this.referenceElm, 'mouseenter', this.show);
  31552. Object(dom_["on"])(this.referenceElm, 'mouseleave', this.hide);
  31553. Object(dom_["on"])(this.referenceElm, 'focus', function () {
  31554. if (!_this3.$slots.default || !_this3.$slots.default.length) {
  31555. _this3.handleFocus();
  31556. return;
  31557. }
  31558. var instance = _this3.$slots.default[0].componentInstance;
  31559. if (instance && instance.focus) {
  31560. instance.focus();
  31561. } else {
  31562. _this3.handleFocus();
  31563. }
  31564. });
  31565. Object(dom_["on"])(this.referenceElm, 'blur', this.handleBlur);
  31566. Object(dom_["on"])(this.referenceElm, 'click', this.removeFocusing);
  31567. }
  31568. // fix issue https://github.com/ElemeFE/element/issues/14424
  31569. if (this.value && this.popperVM) {
  31570. this.popperVM.$nextTick(function () {
  31571. if (_this3.value) {
  31572. _this3.updatePopper();
  31573. }
  31574. });
  31575. }
  31576. },
  31577. watch: {
  31578. focusing: function focusing(val) {
  31579. if (val) {
  31580. Object(dom_["addClass"])(this.referenceElm, 'focusing');
  31581. } else {
  31582. Object(dom_["removeClass"])(this.referenceElm, 'focusing');
  31583. }
  31584. }
  31585. },
  31586. methods: {
  31587. show: function show() {
  31588. this.setExpectedState(true);
  31589. this.handleShowPopper();
  31590. },
  31591. hide: function hide() {
  31592. this.setExpectedState(false);
  31593. this.debounceClose();
  31594. },
  31595. handleFocus: function handleFocus() {
  31596. this.focusing = true;
  31597. this.show();
  31598. },
  31599. handleBlur: function handleBlur() {
  31600. this.focusing = false;
  31601. this.hide();
  31602. },
  31603. removeFocusing: function removeFocusing() {
  31604. this.focusing = false;
  31605. },
  31606. addTooltipClass: function addTooltipClass(prev) {
  31607. if (!prev) {
  31608. return 'el-tooltip';
  31609. } else {
  31610. return 'el-tooltip ' + prev.replace('el-tooltip', '');
  31611. }
  31612. },
  31613. handleShowPopper: function handleShowPopper() {
  31614. var _this4 = this;
  31615. if (!this.expectedState || this.manual) return;
  31616. clearTimeout(this.timeout);
  31617. this.timeout = setTimeout(function () {
  31618. _this4.showPopper = true;
  31619. }, this.openDelay);
  31620. if (this.hideAfter > 0) {
  31621. this.timeoutPending = setTimeout(function () {
  31622. _this4.showPopper = false;
  31623. }, this.hideAfter);
  31624. }
  31625. },
  31626. handleClosePopper: function handleClosePopper() {
  31627. if (this.enterable && this.expectedState || this.manual) return;
  31628. clearTimeout(this.timeout);
  31629. if (this.timeoutPending) {
  31630. clearTimeout(this.timeoutPending);
  31631. }
  31632. this.showPopper = false;
  31633. if (this.disabled) {
  31634. this.doDestroy();
  31635. }
  31636. },
  31637. setExpectedState: function setExpectedState(expectedState) {
  31638. if (expectedState === false) {
  31639. clearTimeout(this.timeoutPending);
  31640. }
  31641. this.expectedState = expectedState;
  31642. },
  31643. getFirstElement: function getFirstElement() {
  31644. var slots = this.$slots.default;
  31645. if (!Array.isArray(slots)) return null;
  31646. var element = null;
  31647. for (var index = 0; index < slots.length; index++) {
  31648. if (slots[index] && slots[index].tag) {
  31649. element = slots[index];
  31650. };
  31651. }
  31652. return element;
  31653. }
  31654. },
  31655. beforeDestroy: function beforeDestroy() {
  31656. this.popperVM && this.popperVM.$destroy();
  31657. },
  31658. destroyed: function destroyed() {
  31659. var reference = this.referenceElm;
  31660. if (reference.nodeType === 1) {
  31661. Object(dom_["off"])(reference, 'mouseenter', this.show);
  31662. Object(dom_["off"])(reference, 'mouseleave', this.hide);
  31663. Object(dom_["off"])(reference, 'focus', this.handleFocus);
  31664. Object(dom_["off"])(reference, 'blur', this.handleBlur);
  31665. Object(dom_["off"])(reference, 'click', this.removeFocusing);
  31666. }
  31667. }
  31668. });
  31669. // CONCATENATED MODULE: ./packages/tooltip/index.js
  31670. /* istanbul ignore next */
  31671. src_main.install = function (Vue) {
  31672. Vue.component(src_main.name, src_main);
  31673. };
  31674. /* harmony default export */ var packages_tooltip = (src_main);
  31675. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=template&id=6b29b012&
  31676. var mainvue_type_template_id_6b29b012_render = function() {
  31677. var _vm = this
  31678. var _h = _vm.$createElement
  31679. var _c = _vm._self._c || _h
  31680. return _c("transition", { attrs: { name: "msgbox-fade" } }, [
  31681. _c(
  31682. "div",
  31683. {
  31684. directives: [
  31685. {
  31686. name: "show",
  31687. rawName: "v-show",
  31688. value: _vm.visible,
  31689. expression: "visible"
  31690. }
  31691. ],
  31692. staticClass: "el-message-box__wrapper",
  31693. attrs: {
  31694. tabindex: "-1",
  31695. role: "dialog",
  31696. "aria-modal": "true",
  31697. "aria-label": _vm.title || "dialog"
  31698. },
  31699. on: {
  31700. click: function($event) {
  31701. if ($event.target !== $event.currentTarget) {
  31702. return null
  31703. }
  31704. return _vm.handleWrapperClick($event)
  31705. }
  31706. }
  31707. },
  31708. [
  31709. _c(
  31710. "div",
  31711. {
  31712. staticClass: "el-message-box",
  31713. class: [_vm.customClass, _vm.center && "el-message-box--center"]
  31714. },
  31715. [
  31716. _vm.title !== null
  31717. ? _c("div", { staticClass: "el-message-box__header" }, [
  31718. _c("div", { staticClass: "el-message-box__title" }, [
  31719. _vm.icon && _vm.center
  31720. ? _c("div", {
  31721. class: ["el-message-box__status", _vm.icon]
  31722. })
  31723. : _vm._e(),
  31724. _c("span", [_vm._v(_vm._s(_vm.title))])
  31725. ]),
  31726. _vm.showClose
  31727. ? _c(
  31728. "button",
  31729. {
  31730. staticClass: "el-message-box__headerbtn",
  31731. attrs: { type: "button", "aria-label": "Close" },
  31732. on: {
  31733. click: function($event) {
  31734. _vm.handleAction(
  31735. _vm.distinguishCancelAndClose
  31736. ? "close"
  31737. : "cancel"
  31738. )
  31739. },
  31740. keydown: function($event) {
  31741. if (
  31742. !("button" in $event) &&
  31743. _vm._k(
  31744. $event.keyCode,
  31745. "enter",
  31746. 13,
  31747. $event.key,
  31748. "Enter"
  31749. )
  31750. ) {
  31751. return null
  31752. }
  31753. _vm.handleAction(
  31754. _vm.distinguishCancelAndClose
  31755. ? "close"
  31756. : "cancel"
  31757. )
  31758. }
  31759. }
  31760. },
  31761. [
  31762. _c("i", {
  31763. staticClass: "el-message-box__close el-icon-close"
  31764. })
  31765. ]
  31766. )
  31767. : _vm._e()
  31768. ])
  31769. : _vm._e(),
  31770. _c("div", { staticClass: "el-message-box__content" }, [
  31771. _c("div", { staticClass: "el-message-box__container" }, [
  31772. _vm.icon && !_vm.center && _vm.message !== ""
  31773. ? _c("div", { class: ["el-message-box__status", _vm.icon] })
  31774. : _vm._e(),
  31775. _vm.message !== ""
  31776. ? _c(
  31777. "div",
  31778. { staticClass: "el-message-box__message" },
  31779. [
  31780. _vm._t("default", [
  31781. !_vm.dangerouslyUseHTMLString
  31782. ? _c("p", [_vm._v(_vm._s(_vm.message))])
  31783. : _c("p", {
  31784. domProps: { innerHTML: _vm._s(_vm.message) }
  31785. })
  31786. ])
  31787. ],
  31788. 2
  31789. )
  31790. : _vm._e()
  31791. ]),
  31792. _c(
  31793. "div",
  31794. {
  31795. directives: [
  31796. {
  31797. name: "show",
  31798. rawName: "v-show",
  31799. value: _vm.showInput,
  31800. expression: "showInput"
  31801. }
  31802. ],
  31803. staticClass: "el-message-box__input"
  31804. },
  31805. [
  31806. _c("el-input", {
  31807. ref: "input",
  31808. attrs: {
  31809. type: _vm.inputType,
  31810. placeholder: _vm.inputPlaceholder
  31811. },
  31812. nativeOn: {
  31813. keydown: function($event) {
  31814. if (
  31815. !("button" in $event) &&
  31816. _vm._k(
  31817. $event.keyCode,
  31818. "enter",
  31819. 13,
  31820. $event.key,
  31821. "Enter"
  31822. )
  31823. ) {
  31824. return null
  31825. }
  31826. return _vm.handleInputEnter($event)
  31827. }
  31828. },
  31829. model: {
  31830. value: _vm.inputValue,
  31831. callback: function($$v) {
  31832. _vm.inputValue = $$v
  31833. },
  31834. expression: "inputValue"
  31835. }
  31836. }),
  31837. _c(
  31838. "div",
  31839. {
  31840. staticClass: "el-message-box__errormsg",
  31841. style: {
  31842. visibility: !!_vm.editorErrorMessage
  31843. ? "visible"
  31844. : "hidden"
  31845. }
  31846. },
  31847. [_vm._v(_vm._s(_vm.editorErrorMessage))]
  31848. )
  31849. ],
  31850. 1
  31851. )
  31852. ]),
  31853. _c(
  31854. "div",
  31855. { staticClass: "el-message-box__btns" },
  31856. [
  31857. _vm.showCancelButton
  31858. ? _c(
  31859. "el-button",
  31860. {
  31861. class: [_vm.cancelButtonClasses],
  31862. attrs: {
  31863. loading: _vm.cancelButtonLoading,
  31864. round: _vm.roundButton,
  31865. size: "small"
  31866. },
  31867. on: {
  31868. keydown: function($event) {
  31869. if (
  31870. !("button" in $event) &&
  31871. _vm._k(
  31872. $event.keyCode,
  31873. "enter",
  31874. 13,
  31875. $event.key,
  31876. "Enter"
  31877. )
  31878. ) {
  31879. return null
  31880. }
  31881. _vm.handleAction("cancel")
  31882. }
  31883. },
  31884. nativeOn: {
  31885. click: function($event) {
  31886. _vm.handleAction("cancel")
  31887. }
  31888. }
  31889. },
  31890. [
  31891. _vm._v(
  31892. "\n " +
  31893. _vm._s(
  31894. _vm.cancelButtonText ||
  31895. _vm.t("el.messagebox.cancel")
  31896. ) +
  31897. "\n "
  31898. )
  31899. ]
  31900. )
  31901. : _vm._e(),
  31902. _c(
  31903. "el-button",
  31904. {
  31905. directives: [
  31906. {
  31907. name: "show",
  31908. rawName: "v-show",
  31909. value: _vm.showConfirmButton,
  31910. expression: "showConfirmButton"
  31911. }
  31912. ],
  31913. ref: "confirm",
  31914. class: [_vm.confirmButtonClasses],
  31915. attrs: {
  31916. loading: _vm.confirmButtonLoading,
  31917. round: _vm.roundButton,
  31918. size: "small"
  31919. },
  31920. on: {
  31921. keydown: function($event) {
  31922. if (
  31923. !("button" in $event) &&
  31924. _vm._k(
  31925. $event.keyCode,
  31926. "enter",
  31927. 13,
  31928. $event.key,
  31929. "Enter"
  31930. )
  31931. ) {
  31932. return null
  31933. }
  31934. _vm.handleAction("confirm")
  31935. }
  31936. },
  31937. nativeOn: {
  31938. click: function($event) {
  31939. _vm.handleAction("confirm")
  31940. }
  31941. }
  31942. },
  31943. [
  31944. _vm._v(
  31945. "\n " +
  31946. _vm._s(
  31947. _vm.confirmButtonText ||
  31948. _vm.t("el.messagebox.confirm")
  31949. ) +
  31950. "\n "
  31951. )
  31952. ]
  31953. )
  31954. ],
  31955. 1
  31956. )
  31957. ]
  31958. )
  31959. ]
  31960. )
  31961. ])
  31962. }
  31963. var mainvue_type_template_id_6b29b012_staticRenderFns = []
  31964. mainvue_type_template_id_6b29b012_render._withStripped = true
  31965. // CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=template&id=6b29b012&
  31966. // EXTERNAL MODULE: external "element-ui/lib/locale"
  31967. var lib_locale_ = __webpack_require__(12);
  31968. var lib_locale_default = /*#__PURE__*/__webpack_require__.n(lib_locale_);
  31969. // EXTERNAL MODULE: external "element-ui/lib/utils/aria-dialog"
  31970. var aria_dialog_ = __webpack_require__(39);
  31971. var aria_dialog_default = /*#__PURE__*/__webpack_require__.n(aria_dialog_);
  31972. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=script&lang=js&
  31973. //
  31974. //
  31975. //
  31976. //
  31977. //
  31978. //
  31979. //
  31980. //
  31981. //
  31982. //
  31983. //
  31984. //
  31985. //
  31986. //
  31987. //
  31988. //
  31989. //
  31990. //
  31991. //
  31992. //
  31993. //
  31994. //
  31995. //
  31996. //
  31997. //
  31998. //
  31999. //
  32000. //
  32001. //
  32002. //
  32003. //
  32004. //
  32005. //
  32006. //
  32007. //
  32008. //
  32009. //
  32010. //
  32011. //
  32012. //
  32013. //
  32014. //
  32015. //
  32016. //
  32017. //
  32018. //
  32019. //
  32020. //
  32021. //
  32022. //
  32023. //
  32024. //
  32025. //
  32026. //
  32027. //
  32028. //
  32029. //
  32030. //
  32031. //
  32032. //
  32033. //
  32034. //
  32035. //
  32036. //
  32037. //
  32038. //
  32039. //
  32040. //
  32041. //
  32042. //
  32043. //
  32044. //
  32045. //
  32046. //
  32047. //
  32048. //
  32049. //
  32050. //
  32051. //
  32052. //
  32053. var messageBox = void 0;
  32054. var typeMap = {
  32055. success: 'success',
  32056. info: 'info',
  32057. warning: 'warning',
  32058. error: 'error'
  32059. };
  32060. /* harmony default export */ var message_box_src_mainvue_type_script_lang_js_ = ({
  32061. mixins: [popup_default.a, locale_default.a],
  32062. props: {
  32063. modal: {
  32064. default: true
  32065. },
  32066. lockScroll: {
  32067. default: true
  32068. },
  32069. showClose: {
  32070. type: Boolean,
  32071. default: true
  32072. },
  32073. closeOnClickModal: {
  32074. default: true
  32075. },
  32076. closeOnPressEscape: {
  32077. default: true
  32078. },
  32079. closeOnHashChange: {
  32080. default: true
  32081. },
  32082. center: {
  32083. default: false,
  32084. type: Boolean
  32085. },
  32086. roundButton: {
  32087. default: false,
  32088. type: Boolean
  32089. }
  32090. },
  32091. components: {
  32092. ElInput: input_default.a,
  32093. ElButton: button_default.a
  32094. },
  32095. computed: {
  32096. icon: function icon() {
  32097. var type = this.type,
  32098. iconClass = this.iconClass;
  32099. return iconClass || (type && typeMap[type] ? 'el-icon-' + typeMap[type] : '');
  32100. },
  32101. confirmButtonClasses: function confirmButtonClasses() {
  32102. return 'el-button--primary ' + this.confirmButtonClass;
  32103. },
  32104. cancelButtonClasses: function cancelButtonClasses() {
  32105. return '' + this.cancelButtonClass;
  32106. }
  32107. },
  32108. methods: {
  32109. getSafeClose: function getSafeClose() {
  32110. var _this = this;
  32111. var currentId = this.uid;
  32112. return function () {
  32113. _this.$nextTick(function () {
  32114. if (currentId === _this.uid) _this.doClose();
  32115. });
  32116. };
  32117. },
  32118. doClose: function doClose() {
  32119. var _this2 = this;
  32120. if (!this.visible) return;
  32121. this.visible = false;
  32122. this._closing = true;
  32123. this.onClose && this.onClose();
  32124. messageBox.closeDialog(); // 解绑
  32125. if (this.lockScroll) {
  32126. setTimeout(this.restoreBodyStyle, 200);
  32127. }
  32128. this.opened = false;
  32129. this.doAfterClose();
  32130. setTimeout(function () {
  32131. if (_this2.action) _this2.callback(_this2.action, _this2);
  32132. });
  32133. },
  32134. handleWrapperClick: function handleWrapperClick() {
  32135. if (this.closeOnClickModal) {
  32136. this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel');
  32137. }
  32138. },
  32139. handleInputEnter: function handleInputEnter() {
  32140. if (this.inputType !== 'textarea') {
  32141. return this.handleAction('confirm');
  32142. }
  32143. },
  32144. handleAction: function handleAction(action) {
  32145. if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) {
  32146. return;
  32147. }
  32148. this.action = action;
  32149. if (typeof this.beforeClose === 'function') {
  32150. this.close = this.getSafeClose();
  32151. this.beforeClose(action, this, this.close);
  32152. } else {
  32153. this.doClose();
  32154. }
  32155. },
  32156. validate: function validate() {
  32157. if (this.$type === 'prompt') {
  32158. var inputPattern = this.inputPattern;
  32159. if (inputPattern && !inputPattern.test(this.inputValue || '')) {
  32160. this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
  32161. Object(dom_["addClass"])(this.getInputElement(), 'invalid');
  32162. return false;
  32163. }
  32164. var inputValidator = this.inputValidator;
  32165. if (typeof inputValidator === 'function') {
  32166. var validateResult = inputValidator(this.inputValue);
  32167. if (validateResult === false) {
  32168. this.editorErrorMessage = this.inputErrorMessage || Object(lib_locale_["t"])('el.messagebox.error');
  32169. Object(dom_["addClass"])(this.getInputElement(), 'invalid');
  32170. return false;
  32171. }
  32172. if (typeof validateResult === 'string') {
  32173. this.editorErrorMessage = validateResult;
  32174. Object(dom_["addClass"])(this.getInputElement(), 'invalid');
  32175. return false;
  32176. }
  32177. }
  32178. }
  32179. this.editorErrorMessage = '';
  32180. Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
  32181. return true;
  32182. },
  32183. getFirstFocus: function getFirstFocus() {
  32184. var btn = this.$el.querySelector('.el-message-box__btns .el-button');
  32185. var title = this.$el.querySelector('.el-message-box__btns .el-message-box__title');
  32186. return btn || title;
  32187. },
  32188. getInputElement: function getInputElement() {
  32189. var inputRefs = this.$refs.input.$refs;
  32190. return inputRefs.input || inputRefs.textarea;
  32191. },
  32192. handleClose: function handleClose() {
  32193. this.handleAction('close');
  32194. }
  32195. },
  32196. watch: {
  32197. inputValue: {
  32198. immediate: true,
  32199. handler: function handler(val) {
  32200. var _this3 = this;
  32201. this.$nextTick(function (_) {
  32202. if (_this3.$type === 'prompt' && val !== null) {
  32203. _this3.validate();
  32204. }
  32205. });
  32206. }
  32207. },
  32208. visible: function visible(val) {
  32209. var _this4 = this;
  32210. if (val) {
  32211. this.uid++;
  32212. if (this.$type === 'alert' || this.$type === 'confirm') {
  32213. this.$nextTick(function () {
  32214. _this4.$refs.confirm.$el.focus();
  32215. });
  32216. }
  32217. this.focusAfterClosed = document.activeElement;
  32218. messageBox = new aria_dialog_default.a(this.$el, this.focusAfterClosed, this.getFirstFocus());
  32219. }
  32220. // prompt
  32221. if (this.$type !== 'prompt') return;
  32222. if (val) {
  32223. setTimeout(function () {
  32224. if (_this4.$refs.input && _this4.$refs.input.$el) {
  32225. _this4.getInputElement().focus();
  32226. }
  32227. }, 500);
  32228. } else {
  32229. this.editorErrorMessage = '';
  32230. Object(dom_["removeClass"])(this.getInputElement(), 'invalid');
  32231. }
  32232. }
  32233. },
  32234. mounted: function mounted() {
  32235. var _this5 = this;
  32236. this.$nextTick(function () {
  32237. if (_this5.closeOnHashChange) {
  32238. window.addEventListener('hashchange', _this5.close);
  32239. }
  32240. });
  32241. },
  32242. beforeDestroy: function beforeDestroy() {
  32243. if (this.closeOnHashChange) {
  32244. window.removeEventListener('hashchange', this.close);
  32245. }
  32246. setTimeout(function () {
  32247. messageBox.closeDialog();
  32248. });
  32249. },
  32250. data: function data() {
  32251. return {
  32252. uid: 1,
  32253. title: undefined,
  32254. message: '',
  32255. type: '',
  32256. iconClass: '',
  32257. customClass: '',
  32258. showInput: false,
  32259. inputValue: null,
  32260. inputPlaceholder: '',
  32261. inputType: 'text',
  32262. inputPattern: null,
  32263. inputValidator: null,
  32264. inputErrorMessage: '',
  32265. showConfirmButton: true,
  32266. showCancelButton: false,
  32267. action: '',
  32268. confirmButtonText: '',
  32269. cancelButtonText: '',
  32270. confirmButtonLoading: false,
  32271. cancelButtonLoading: false,
  32272. confirmButtonClass: '',
  32273. confirmButtonDisabled: false,
  32274. cancelButtonClass: '',
  32275. editorErrorMessage: null,
  32276. callback: null,
  32277. dangerouslyUseHTMLString: false,
  32278. focusAfterClosed: null,
  32279. isOnComposition: false,
  32280. distinguishCancelAndClose: false
  32281. };
  32282. }
  32283. });
  32284. // CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=script&lang=js&
  32285. /* harmony default export */ var packages_message_box_src_mainvue_type_script_lang_js_ = (message_box_src_mainvue_type_script_lang_js_);
  32286. // CONCATENATED MODULE: ./packages/message-box/src/main.vue
  32287. /* normalize component */
  32288. var src_main_component = normalizeComponent(
  32289. packages_message_box_src_mainvue_type_script_lang_js_,
  32290. mainvue_type_template_id_6b29b012_render,
  32291. mainvue_type_template_id_6b29b012_staticRenderFns,
  32292. false,
  32293. null,
  32294. null,
  32295. null
  32296. )
  32297. /* hot reload */
  32298. if (false) { var src_main_api; }
  32299. src_main_component.options.__file = "packages/message-box/src/main.vue"
  32300. /* harmony default export */ var message_box_src_main = (src_main_component.exports);
  32301. // EXTERNAL MODULE: external "element-ui/lib/utils/vdom"
  32302. var vdom_ = __webpack_require__(22);
  32303. // CONCATENATED MODULE: ./packages/message-box/src/main.js
  32304. var main_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  32305. var main_defaults = {
  32306. title: null,
  32307. message: '',
  32308. type: '',
  32309. iconClass: '',
  32310. showInput: false,
  32311. showClose: true,
  32312. modalFade: true,
  32313. lockScroll: true,
  32314. closeOnClickModal: true,
  32315. closeOnPressEscape: true,
  32316. closeOnHashChange: true,
  32317. inputValue: null,
  32318. inputPlaceholder: '',
  32319. inputType: 'text',
  32320. inputPattern: null,
  32321. inputValidator: null,
  32322. inputErrorMessage: '',
  32323. showConfirmButton: true,
  32324. showCancelButton: false,
  32325. confirmButtonPosition: 'right',
  32326. confirmButtonHighlight: false,
  32327. cancelButtonHighlight: false,
  32328. confirmButtonText: '',
  32329. cancelButtonText: '',
  32330. confirmButtonClass: '',
  32331. cancelButtonClass: '',
  32332. customClass: '',
  32333. beforeClose: null,
  32334. dangerouslyUseHTMLString: false,
  32335. center: false,
  32336. roundButton: false,
  32337. distinguishCancelAndClose: false
  32338. };
  32339. var MessageBoxConstructor = external_vue_default.a.extend(message_box_src_main);
  32340. var currentMsg = void 0,
  32341. main_instance = void 0;
  32342. var msgQueue = [];
  32343. var defaultCallback = function defaultCallback(action) {
  32344. if (currentMsg) {
  32345. var callback = currentMsg.callback;
  32346. if (typeof callback === 'function') {
  32347. if (main_instance.showInput) {
  32348. callback(main_instance.inputValue, action);
  32349. } else {
  32350. callback(action);
  32351. }
  32352. }
  32353. if (currentMsg.resolve) {
  32354. if (action === 'confirm') {
  32355. if (main_instance.showInput) {
  32356. currentMsg.resolve({ value: main_instance.inputValue, action: action });
  32357. } else {
  32358. currentMsg.resolve(action);
  32359. }
  32360. } else if (currentMsg.reject && (action === 'cancel' || action === 'close')) {
  32361. currentMsg.reject(action);
  32362. }
  32363. }
  32364. }
  32365. };
  32366. var initInstance = function initInstance() {
  32367. main_instance = new MessageBoxConstructor({
  32368. el: document.createElement('div')
  32369. });
  32370. main_instance.callback = defaultCallback;
  32371. };
  32372. var main_showNextMsg = function showNextMsg() {
  32373. if (!main_instance) {
  32374. initInstance();
  32375. }
  32376. main_instance.action = '';
  32377. if (!main_instance.visible || main_instance.closeTimer) {
  32378. if (msgQueue.length > 0) {
  32379. currentMsg = msgQueue.shift();
  32380. var options = currentMsg.options;
  32381. for (var prop in options) {
  32382. if (options.hasOwnProperty(prop)) {
  32383. main_instance[prop] = options[prop];
  32384. }
  32385. }
  32386. if (options.callback === undefined) {
  32387. main_instance.callback = defaultCallback;
  32388. }
  32389. var oldCb = main_instance.callback;
  32390. main_instance.callback = function (action, instance) {
  32391. oldCb(action, instance);
  32392. showNextMsg();
  32393. };
  32394. if (Object(vdom_["isVNode"])(main_instance.message)) {
  32395. main_instance.$slots.default = [main_instance.message];
  32396. main_instance.message = null;
  32397. } else {
  32398. delete main_instance.$slots.default;
  32399. }
  32400. ['modal', 'showClose', 'closeOnClickModal', 'closeOnPressEscape', 'closeOnHashChange'].forEach(function (prop) {
  32401. if (main_instance[prop] === undefined) {
  32402. main_instance[prop] = true;
  32403. }
  32404. });
  32405. document.body.appendChild(main_instance.$el);
  32406. external_vue_default.a.nextTick(function () {
  32407. main_instance.visible = true;
  32408. });
  32409. }
  32410. }
  32411. };
  32412. var main_MessageBox = function MessageBox(options, callback) {
  32413. if (external_vue_default.a.prototype.$isServer) return;
  32414. if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
  32415. options = {
  32416. message: options
  32417. };
  32418. if (typeof arguments[1] === 'string') {
  32419. options.title = arguments[1];
  32420. }
  32421. } else if (options.callback && !callback) {
  32422. callback = options.callback;
  32423. }
  32424. if (typeof Promise !== 'undefined') {
  32425. return new Promise(function (resolve, reject) {
  32426. // eslint-disable-line
  32427. msgQueue.push({
  32428. options: merge_default()({}, main_defaults, MessageBox.defaults, options),
  32429. callback: callback,
  32430. resolve: resolve,
  32431. reject: reject
  32432. });
  32433. main_showNextMsg();
  32434. });
  32435. } else {
  32436. msgQueue.push({
  32437. options: merge_default()({}, main_defaults, MessageBox.defaults, options),
  32438. callback: callback
  32439. });
  32440. main_showNextMsg();
  32441. }
  32442. };
  32443. main_MessageBox.setDefaults = function (defaults) {
  32444. main_MessageBox.defaults = defaults;
  32445. };
  32446. main_MessageBox.alert = function (message, title, options) {
  32447. if ((typeof title === 'undefined' ? 'undefined' : main_typeof(title)) === 'object') {
  32448. options = title;
  32449. title = '';
  32450. } else if (title === undefined) {
  32451. title = '';
  32452. }
  32453. return main_MessageBox(merge_default()({
  32454. title: title,
  32455. message: message,
  32456. $type: 'alert',
  32457. closeOnPressEscape: false,
  32458. closeOnClickModal: false
  32459. }, options));
  32460. };
  32461. main_MessageBox.confirm = function (message, title, options) {
  32462. if ((typeof title === 'undefined' ? 'undefined' : main_typeof(title)) === 'object') {
  32463. options = title;
  32464. title = '';
  32465. } else if (title === undefined) {
  32466. title = '';
  32467. }
  32468. return main_MessageBox(merge_default()({
  32469. title: title,
  32470. message: message,
  32471. $type: 'confirm',
  32472. showCancelButton: true
  32473. }, options));
  32474. };
  32475. main_MessageBox.prompt = function (message, title, options) {
  32476. if ((typeof title === 'undefined' ? 'undefined' : main_typeof(title)) === 'object') {
  32477. options = title;
  32478. title = '';
  32479. } else if (title === undefined) {
  32480. title = '';
  32481. }
  32482. return main_MessageBox(merge_default()({
  32483. title: title,
  32484. message: message,
  32485. showCancelButton: true,
  32486. showInput: true,
  32487. $type: 'prompt'
  32488. }, options));
  32489. };
  32490. main_MessageBox.close = function () {
  32491. main_instance.doClose();
  32492. main_instance.visible = false;
  32493. msgQueue = [];
  32494. currentMsg = null;
  32495. };
  32496. /* harmony default export */ var packages_message_box_src_main = (main_MessageBox);
  32497. // CONCATENATED MODULE: ./packages/message-box/index.js
  32498. /* harmony default export */ var message_box = (packages_message_box_src_main);
  32499. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb.vue?vue&type=template&id=4b464c06&
  32500. var breadcrumbvue_type_template_id_4b464c06_render = function() {
  32501. var _vm = this
  32502. var _h = _vm.$createElement
  32503. var _c = _vm._self._c || _h
  32504. return _c(
  32505. "div",
  32506. {
  32507. staticClass: "el-breadcrumb",
  32508. attrs: { "aria-label": "Breadcrumb", role: "navigation" }
  32509. },
  32510. [_vm._t("default")],
  32511. 2
  32512. )
  32513. }
  32514. var breadcrumbvue_type_template_id_4b464c06_staticRenderFns = []
  32515. breadcrumbvue_type_template_id_4b464c06_render._withStripped = true
  32516. // CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.vue?vue&type=template&id=4b464c06&
  32517. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb.vue?vue&type=script&lang=js&
  32518. //
  32519. //
  32520. //
  32521. //
  32522. //
  32523. /* harmony default export */ var breadcrumbvue_type_script_lang_js_ = ({
  32524. name: 'ElBreadcrumb',
  32525. props: {
  32526. separator: {
  32527. type: String,
  32528. default: '/'
  32529. },
  32530. separatorClass: {
  32531. type: String,
  32532. default: ''
  32533. }
  32534. },
  32535. provide: function provide() {
  32536. return {
  32537. elBreadcrumb: this
  32538. };
  32539. },
  32540. mounted: function mounted() {
  32541. var items = this.$el.querySelectorAll('.el-breadcrumb__item');
  32542. if (items.length) {
  32543. items[items.length - 1].setAttribute('aria-current', 'page');
  32544. }
  32545. }
  32546. });
  32547. // CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.vue?vue&type=script&lang=js&
  32548. /* harmony default export */ var src_breadcrumbvue_type_script_lang_js_ = (breadcrumbvue_type_script_lang_js_);
  32549. // CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.vue
  32550. /* normalize component */
  32551. var breadcrumb_component = normalizeComponent(
  32552. src_breadcrumbvue_type_script_lang_js_,
  32553. breadcrumbvue_type_template_id_4b464c06_render,
  32554. breadcrumbvue_type_template_id_4b464c06_staticRenderFns,
  32555. false,
  32556. null,
  32557. null,
  32558. null
  32559. )
  32560. /* hot reload */
  32561. if (false) { var breadcrumb_api; }
  32562. breadcrumb_component.options.__file = "packages/breadcrumb/src/breadcrumb.vue"
  32563. /* harmony default export */ var breadcrumb = (breadcrumb_component.exports);
  32564. // CONCATENATED MODULE: ./packages/breadcrumb/index.js
  32565. /* istanbul ignore next */
  32566. breadcrumb.install = function (Vue) {
  32567. Vue.component(breadcrumb.name, breadcrumb);
  32568. };
  32569. /* harmony default export */ var packages_breadcrumb = (breadcrumb);
  32570. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=template&id=fcf9eaac&
  32571. var breadcrumb_itemvue_type_template_id_fcf9eaac_render = function() {
  32572. var _vm = this
  32573. var _h = _vm.$createElement
  32574. var _c = _vm._self._c || _h
  32575. return _c("span", { staticClass: "el-breadcrumb__item" }, [
  32576. _c(
  32577. "span",
  32578. {
  32579. ref: "link",
  32580. class: ["el-breadcrumb__inner", _vm.to ? "is-link" : ""],
  32581. attrs: { role: "link" }
  32582. },
  32583. [_vm._t("default")],
  32584. 2
  32585. ),
  32586. _vm.separatorClass
  32587. ? _c("i", {
  32588. staticClass: "el-breadcrumb__separator",
  32589. class: _vm.separatorClass
  32590. })
  32591. : _c(
  32592. "span",
  32593. {
  32594. staticClass: "el-breadcrumb__separator",
  32595. attrs: { role: "presentation" }
  32596. },
  32597. [_vm._v(_vm._s(_vm.separator))]
  32598. )
  32599. ])
  32600. }
  32601. var breadcrumb_itemvue_type_template_id_fcf9eaac_staticRenderFns = []
  32602. breadcrumb_itemvue_type_template_id_fcf9eaac_render._withStripped = true
  32603. // CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=template&id=fcf9eaac&
  32604. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=script&lang=js&
  32605. //
  32606. //
  32607. //
  32608. //
  32609. //
  32610. //
  32611. //
  32612. //
  32613. //
  32614. //
  32615. //
  32616. //
  32617. /* harmony default export */ var breadcrumb_itemvue_type_script_lang_js_ = ({
  32618. name: 'ElBreadcrumbItem',
  32619. props: {
  32620. to: {},
  32621. replace: Boolean
  32622. },
  32623. data: function data() {
  32624. return {
  32625. separator: '',
  32626. separatorClass: ''
  32627. };
  32628. },
  32629. inject: ['elBreadcrumb'],
  32630. mounted: function mounted() {
  32631. var _this = this;
  32632. this.separator = this.elBreadcrumb.separator;
  32633. this.separatorClass = this.elBreadcrumb.separatorClass;
  32634. var link = this.$refs.link;
  32635. link.setAttribute('role', 'link');
  32636. link.addEventListener('click', function (_) {
  32637. var to = _this.to,
  32638. $router = _this.$router;
  32639. if (!to || !$router) return;
  32640. _this.replace ? $router.replace(to) : $router.push(to);
  32641. });
  32642. }
  32643. });
  32644. // CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=script&lang=js&
  32645. /* harmony default export */ var src_breadcrumb_itemvue_type_script_lang_js_ = (breadcrumb_itemvue_type_script_lang_js_);
  32646. // CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.vue
  32647. /* normalize component */
  32648. var breadcrumb_item_component = normalizeComponent(
  32649. src_breadcrumb_itemvue_type_script_lang_js_,
  32650. breadcrumb_itemvue_type_template_id_fcf9eaac_render,
  32651. breadcrumb_itemvue_type_template_id_fcf9eaac_staticRenderFns,
  32652. false,
  32653. null,
  32654. null,
  32655. null
  32656. )
  32657. /* hot reload */
  32658. if (false) { var breadcrumb_item_api; }
  32659. breadcrumb_item_component.options.__file = "packages/breadcrumb/src/breadcrumb-item.vue"
  32660. /* harmony default export */ var breadcrumb_item = (breadcrumb_item_component.exports);
  32661. // CONCATENATED MODULE: ./packages/breadcrumb-item/index.js
  32662. /* istanbul ignore next */
  32663. breadcrumb_item.install = function (Vue) {
  32664. Vue.component(breadcrumb_item.name, breadcrumb_item);
  32665. };
  32666. /* harmony default export */ var packages_breadcrumb_item = (breadcrumb_item);
  32667. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=template&id=a1b5ff34&
  32668. var formvue_type_template_id_a1b5ff34_render = function() {
  32669. var _vm = this
  32670. var _h = _vm.$createElement
  32671. var _c = _vm._self._c || _h
  32672. return _c(
  32673. "form",
  32674. {
  32675. staticClass: "el-form",
  32676. class: [
  32677. _vm.labelPosition ? "el-form--label-" + _vm.labelPosition : "",
  32678. { "el-form--inline": _vm.inline }
  32679. ]
  32680. },
  32681. [_vm._t("default")],
  32682. 2
  32683. )
  32684. }
  32685. var formvue_type_template_id_a1b5ff34_staticRenderFns = []
  32686. formvue_type_template_id_a1b5ff34_render._withStripped = true
  32687. // CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=template&id=a1b5ff34&
  32688. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=script&lang=js&
  32689. //
  32690. //
  32691. //
  32692. //
  32693. //
  32694. //
  32695. //
  32696. //
  32697. /* harmony default export */ var formvue_type_script_lang_js_ = ({
  32698. name: 'ElForm',
  32699. componentName: 'ElForm',
  32700. provide: function provide() {
  32701. return {
  32702. elForm: this
  32703. };
  32704. },
  32705. props: {
  32706. model: Object,
  32707. rules: Object,
  32708. labelPosition: String,
  32709. labelWidth: String,
  32710. labelSuffix: {
  32711. type: String,
  32712. default: ''
  32713. },
  32714. inline: Boolean,
  32715. inlineMessage: Boolean,
  32716. statusIcon: Boolean,
  32717. showMessage: {
  32718. type: Boolean,
  32719. default: true
  32720. },
  32721. size: String,
  32722. disabled: Boolean,
  32723. validateOnRuleChange: {
  32724. type: Boolean,
  32725. default: true
  32726. },
  32727. hideRequiredAsterisk: {
  32728. type: Boolean,
  32729. default: false
  32730. }
  32731. },
  32732. watch: {
  32733. rules: function rules() {
  32734. // remove then add event listeners on form-item after form rules change
  32735. this.fields.forEach(function (field) {
  32736. field.removeValidateEvents();
  32737. field.addValidateEvents();
  32738. });
  32739. if (this.validateOnRuleChange) {
  32740. this.validate(function () {});
  32741. }
  32742. }
  32743. },
  32744. computed: {
  32745. autoLabelWidth: function autoLabelWidth() {
  32746. if (!this.potentialLabelWidthArr.length) return 0;
  32747. var max = Math.max.apply(Math, this.potentialLabelWidthArr);
  32748. return max ? max + 'px' : '';
  32749. }
  32750. },
  32751. data: function data() {
  32752. return {
  32753. fields: [],
  32754. potentialLabelWidthArr: [] // use this array to calculate auto width
  32755. };
  32756. },
  32757. created: function created() {
  32758. var _this = this;
  32759. this.$on('el.form.addField', function (field) {
  32760. if (field) {
  32761. _this.fields.push(field);
  32762. }
  32763. });
  32764. /* istanbul ignore next */
  32765. this.$on('el.form.removeField', function (field) {
  32766. if (field.prop) {
  32767. _this.fields.splice(_this.fields.indexOf(field), 1);
  32768. }
  32769. });
  32770. },
  32771. methods: {
  32772. resetFields: function resetFields() {
  32773. if (!this.model) {
  32774. console.warn('[Element Warn][Form]model is required for resetFields to work.');
  32775. return;
  32776. }
  32777. this.fields.forEach(function (field) {
  32778. field.resetField();
  32779. });
  32780. },
  32781. clearValidate: function clearValidate() {
  32782. var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  32783. var fields = props.length ? typeof props === 'string' ? this.fields.filter(function (field) {
  32784. return props === field.prop;
  32785. }) : this.fields.filter(function (field) {
  32786. return props.indexOf(field.prop) > -1;
  32787. }) : this.fields;
  32788. fields.forEach(function (field) {
  32789. field.clearValidate();
  32790. });
  32791. },
  32792. validate: function validate(callback) {
  32793. var _this2 = this;
  32794. if (!this.model) {
  32795. console.warn('[Element Warn][Form]model is required for validate to work!');
  32796. return;
  32797. }
  32798. var promise = void 0;
  32799. // if no callback, return promise
  32800. if (typeof callback !== 'function' && window.Promise) {
  32801. promise = new window.Promise(function (resolve, reject) {
  32802. callback = function callback(valid, invalidFields) {
  32803. valid ? resolve(valid) : reject(invalidFields);
  32804. };
  32805. });
  32806. }
  32807. var valid = true;
  32808. var count = 0;
  32809. // 如果需要验证的fields为空,调用验证时立刻返回callback
  32810. if (this.fields.length === 0 && callback) {
  32811. callback(true);
  32812. }
  32813. var invalidFields = {};
  32814. this.fields.forEach(function (field) {
  32815. field.validate('', function (message, field) {
  32816. if (message) {
  32817. valid = false;
  32818. }
  32819. invalidFields = merge_default()({}, invalidFields, field);
  32820. if (typeof callback === 'function' && ++count === _this2.fields.length) {
  32821. callback(valid, invalidFields);
  32822. }
  32823. });
  32824. });
  32825. if (promise) {
  32826. return promise;
  32827. }
  32828. },
  32829. validateField: function validateField(props, cb) {
  32830. props = [].concat(props);
  32831. var fields = this.fields.filter(function (field) {
  32832. return props.indexOf(field.prop) !== -1;
  32833. });
  32834. if (!fields.length) {
  32835. console.warn('[Element Warn]please pass correct props!');
  32836. return;
  32837. }
  32838. fields.forEach(function (field) {
  32839. field.validate('', cb);
  32840. });
  32841. },
  32842. getLabelWidthIndex: function getLabelWidthIndex(width) {
  32843. var index = this.potentialLabelWidthArr.indexOf(width);
  32844. // it's impossible
  32845. if (index === -1) {
  32846. throw new Error('[ElementForm]unpected width ', width);
  32847. }
  32848. return index;
  32849. },
  32850. registerLabelWidth: function registerLabelWidth(val, oldVal) {
  32851. if (val && oldVal) {
  32852. var index = this.getLabelWidthIndex(oldVal);
  32853. this.potentialLabelWidthArr.splice(index, 1, val);
  32854. } else if (val) {
  32855. this.potentialLabelWidthArr.push(val);
  32856. }
  32857. },
  32858. deregisterLabelWidth: function deregisterLabelWidth(val) {
  32859. var index = this.getLabelWidthIndex(val);
  32860. this.potentialLabelWidthArr.splice(index, 1);
  32861. }
  32862. }
  32863. });
  32864. // CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=script&lang=js&
  32865. /* harmony default export */ var src_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_);
  32866. // CONCATENATED MODULE: ./packages/form/src/form.vue
  32867. /* normalize component */
  32868. var form_component = normalizeComponent(
  32869. src_formvue_type_script_lang_js_,
  32870. formvue_type_template_id_a1b5ff34_render,
  32871. formvue_type_template_id_a1b5ff34_staticRenderFns,
  32872. false,
  32873. null,
  32874. null,
  32875. null
  32876. )
  32877. /* hot reload */
  32878. if (false) { var form_api; }
  32879. form_component.options.__file = "packages/form/src/form.vue"
  32880. /* harmony default export */ var src_form = (form_component.exports);
  32881. // CONCATENATED MODULE: ./packages/form/index.js
  32882. /* istanbul ignore next */
  32883. src_form.install = function (Vue) {
  32884. Vue.component(src_form.name, src_form);
  32885. };
  32886. /* harmony default export */ var packages_form = (src_form);
  32887. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=template&id=b6f3db6c&
  32888. var form_itemvue_type_template_id_b6f3db6c_render = function() {
  32889. var _vm = this
  32890. var _h = _vm.$createElement
  32891. var _c = _vm._self._c || _h
  32892. return _c(
  32893. "div",
  32894. {
  32895. staticClass: "el-form-item",
  32896. class: [
  32897. {
  32898. "el-form-item--feedback": _vm.elForm && _vm.elForm.statusIcon,
  32899. "is-error": _vm.validateState === "error",
  32900. "is-validating": _vm.validateState === "validating",
  32901. "is-success": _vm.validateState === "success",
  32902. "is-required": _vm.isRequired || _vm.required,
  32903. "is-no-asterisk": _vm.elForm && _vm.elForm.hideRequiredAsterisk
  32904. },
  32905. _vm.sizeClass ? "el-form-item--" + _vm.sizeClass : ""
  32906. ]
  32907. },
  32908. [
  32909. _c(
  32910. "label-wrap",
  32911. {
  32912. attrs: {
  32913. "is-auto-width": _vm.labelStyle && _vm.labelStyle.width === "auto",
  32914. "update-all": _vm.form.labelWidth === "auto"
  32915. }
  32916. },
  32917. [
  32918. _vm.label || _vm.$slots.label
  32919. ? _c(
  32920. "label",
  32921. {
  32922. staticClass: "el-form-item__label",
  32923. style: _vm.labelStyle,
  32924. attrs: { for: _vm.labelFor }
  32925. },
  32926. [
  32927. _vm._t("label", [
  32928. _vm._v(_vm._s(_vm.label + _vm.form.labelSuffix))
  32929. ])
  32930. ],
  32931. 2
  32932. )
  32933. : _vm._e()
  32934. ]
  32935. ),
  32936. _c(
  32937. "div",
  32938. { staticClass: "el-form-item__content", style: _vm.contentStyle },
  32939. [
  32940. _vm._t("default"),
  32941. _c(
  32942. "transition",
  32943. { attrs: { name: "el-zoom-in-top" } },
  32944. [
  32945. _vm.validateState === "error" &&
  32946. _vm.showMessage &&
  32947. _vm.form.showMessage
  32948. ? _vm._t(
  32949. "error",
  32950. [
  32951. _c(
  32952. "div",
  32953. {
  32954. staticClass: "el-form-item__error",
  32955. class: {
  32956. "el-form-item__error--inline":
  32957. typeof _vm.inlineMessage === "boolean"
  32958. ? _vm.inlineMessage
  32959. : (_vm.elForm && _vm.elForm.inlineMessage) ||
  32960. false
  32961. }
  32962. },
  32963. [
  32964. _vm._v(
  32965. "\n " +
  32966. _vm._s(_vm.validateMessage) +
  32967. "\n "
  32968. )
  32969. ]
  32970. )
  32971. ],
  32972. { error: _vm.validateMessage }
  32973. )
  32974. : _vm._e()
  32975. ],
  32976. 2
  32977. )
  32978. ],
  32979. 2
  32980. )
  32981. ],
  32982. 1
  32983. )
  32984. }
  32985. var form_itemvue_type_template_id_b6f3db6c_staticRenderFns = []
  32986. form_itemvue_type_template_id_b6f3db6c_render._withStripped = true
  32987. // CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=template&id=b6f3db6c&
  32988. // EXTERNAL MODULE: external "async-validator"
  32989. var external_async_validator_ = __webpack_require__(40);
  32990. var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
  32991. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
  32992. /* harmony default export */ var label_wrapvue_type_script_lang_js_ = ({
  32993. props: {
  32994. isAutoWidth: Boolean,
  32995. updateAll: Boolean
  32996. },
  32997. inject: ['elForm', 'elFormItem'],
  32998. render: function render() {
  32999. var h = arguments[0];
  33000. var slots = this.$slots.default;
  33001. if (!slots) return null;
  33002. if (this.isAutoWidth) {
  33003. var autoLabelWidth = this.elForm.autoLabelWidth;
  33004. var style = {};
  33005. if (autoLabelWidth && autoLabelWidth !== 'auto') {
  33006. var marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth;
  33007. if (marginLeft) {
  33008. style.marginLeft = marginLeft + 'px';
  33009. }
  33010. }
  33011. return h(
  33012. 'div',
  33013. { 'class': 'el-form-item__label-wrap', style: style },
  33014. [slots]
  33015. );
  33016. } else {
  33017. return slots[0];
  33018. }
  33019. },
  33020. methods: {
  33021. getLabelWidth: function getLabelWidth() {
  33022. if (this.$el && this.$el.firstElementChild) {
  33023. var computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
  33024. return Math.ceil(parseFloat(computedWidth));
  33025. } else {
  33026. return 0;
  33027. }
  33028. },
  33029. updateLabelWidth: function updateLabelWidth() {
  33030. var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'update';
  33031. if (this.$slots.default && this.isAutoWidth && this.$el.firstElementChild) {
  33032. if (action === 'update') {
  33033. this.computedWidth = this.getLabelWidth();
  33034. } else if (action === 'remove') {
  33035. this.elForm.deregisterLabelWidth(this.computedWidth);
  33036. }
  33037. }
  33038. }
  33039. },
  33040. watch: {
  33041. computedWidth: function computedWidth(val, oldVal) {
  33042. if (this.updateAll) {
  33043. this.elForm.registerLabelWidth(val, oldVal);
  33044. this.elFormItem.updateComputedLabelWidth(val);
  33045. }
  33046. }
  33047. },
  33048. data: function data() {
  33049. return {
  33050. computedWidth: 0
  33051. };
  33052. },
  33053. mounted: function mounted() {
  33054. this.updateLabelWidth('update');
  33055. },
  33056. updated: function updated() {
  33057. this.updateLabelWidth('update');
  33058. },
  33059. beforeDestroy: function beforeDestroy() {
  33060. this.updateLabelWidth('remove');
  33061. }
  33062. });
  33063. // CONCATENATED MODULE: ./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
  33064. /* harmony default export */ var src_label_wrapvue_type_script_lang_js_ = (label_wrapvue_type_script_lang_js_);
  33065. // CONCATENATED MODULE: ./packages/form/src/label-wrap.vue
  33066. var label_wrap_render, label_wrap_staticRenderFns
  33067. /* normalize component */
  33068. var label_wrap_component = normalizeComponent(
  33069. src_label_wrapvue_type_script_lang_js_,
  33070. label_wrap_render,
  33071. label_wrap_staticRenderFns,
  33072. false,
  33073. null,
  33074. null,
  33075. null
  33076. )
  33077. /* hot reload */
  33078. if (false) { var label_wrap_api; }
  33079. label_wrap_component.options.__file = "packages/form/src/label-wrap.vue"
  33080. /* harmony default export */ var label_wrap = (label_wrap_component.exports);
  33081. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=script&lang=js&
  33082. //
  33083. //
  33084. //
  33085. //
  33086. //
  33087. //
  33088. //
  33089. //
  33090. //
  33091. //
  33092. //
  33093. //
  33094. //
  33095. //
  33096. //
  33097. //
  33098. //
  33099. //
  33100. //
  33101. //
  33102. //
  33103. //
  33104. //
  33105. //
  33106. //
  33107. //
  33108. //
  33109. //
  33110. //
  33111. //
  33112. //
  33113. //
  33114. //
  33115. //
  33116. //
  33117. //
  33118. //
  33119. //
  33120. //
  33121. //
  33122. /* harmony default export */ var form_itemvue_type_script_lang_js_ = ({
  33123. name: 'ElFormItem',
  33124. componentName: 'ElFormItem',
  33125. mixins: [emitter_default.a],
  33126. provide: function provide() {
  33127. return {
  33128. elFormItem: this
  33129. };
  33130. },
  33131. inject: ['elForm'],
  33132. props: {
  33133. label: String,
  33134. labelWidth: String,
  33135. prop: String,
  33136. required: {
  33137. type: Boolean,
  33138. default: undefined
  33139. },
  33140. rules: [Object, Array],
  33141. error: String,
  33142. validateStatus: String,
  33143. for: String,
  33144. inlineMessage: {
  33145. type: [String, Boolean],
  33146. default: ''
  33147. },
  33148. showMessage: {
  33149. type: Boolean,
  33150. default: true
  33151. },
  33152. size: String
  33153. },
  33154. components: {
  33155. // use this component to calculate auto width
  33156. LabelWrap: label_wrap
  33157. },
  33158. watch: {
  33159. error: {
  33160. immediate: true,
  33161. handler: function handler(value) {
  33162. this.validateMessage = value;
  33163. this.validateState = value ? 'error' : '';
  33164. }
  33165. },
  33166. validateStatus: function validateStatus(value) {
  33167. this.validateState = value;
  33168. }
  33169. },
  33170. computed: {
  33171. labelFor: function labelFor() {
  33172. return this.for || this.prop;
  33173. },
  33174. labelStyle: function labelStyle() {
  33175. var ret = {};
  33176. if (this.form.labelPosition === 'top') return ret;
  33177. var labelWidth = this.labelWidth || this.form.labelWidth;
  33178. if (labelWidth) {
  33179. ret.width = labelWidth;
  33180. }
  33181. return ret;
  33182. },
  33183. contentStyle: function contentStyle() {
  33184. var ret = {};
  33185. var label = this.label;
  33186. if (this.form.labelPosition === 'top' || this.form.inline) return ret;
  33187. if (!label && !this.labelWidth && this.isNested) return ret;
  33188. var labelWidth = this.labelWidth || this.form.labelWidth;
  33189. if (labelWidth === 'auto') {
  33190. if (this.labelWidth === 'auto') {
  33191. ret.marginLeft = this.computedLabelWidth;
  33192. } else if (this.form.labelWidth === 'auto') {
  33193. ret.marginLeft = this.elForm.autoLabelWidth;
  33194. }
  33195. } else {
  33196. ret.marginLeft = labelWidth;
  33197. }
  33198. return ret;
  33199. },
  33200. form: function form() {
  33201. var parent = this.$parent;
  33202. var parentName = parent.$options.componentName;
  33203. while (parentName !== 'ElForm') {
  33204. if (parentName === 'ElFormItem') {
  33205. this.isNested = true;
  33206. }
  33207. parent = parent.$parent;
  33208. parentName = parent.$options.componentName;
  33209. }
  33210. return parent;
  33211. },
  33212. fieldValue: function fieldValue() {
  33213. var model = this.form.model;
  33214. if (!model || !this.prop) {
  33215. return;
  33216. }
  33217. var path = this.prop;
  33218. if (path.indexOf(':') !== -1) {
  33219. path = path.replace(/:/, '.');
  33220. }
  33221. return Object(util_["getPropByPath"])(model, path, true).v;
  33222. },
  33223. isRequired: function isRequired() {
  33224. var rules = this.getRules();
  33225. var isRequired = false;
  33226. if (rules && rules.length) {
  33227. rules.every(function (rule) {
  33228. if (rule.required) {
  33229. isRequired = true;
  33230. return false;
  33231. }
  33232. return true;
  33233. });
  33234. }
  33235. return isRequired;
  33236. },
  33237. _formSize: function _formSize() {
  33238. return this.elForm.size;
  33239. },
  33240. elFormItemSize: function elFormItemSize() {
  33241. return this.size || this._formSize;
  33242. },
  33243. sizeClass: function sizeClass() {
  33244. return this.elFormItemSize || (this.$ELEMENT || {}).size;
  33245. }
  33246. },
  33247. data: function data() {
  33248. return {
  33249. validateState: '',
  33250. validateMessage: '',
  33251. validateDisabled: false,
  33252. validator: {},
  33253. isNested: false,
  33254. computedLabelWidth: ''
  33255. };
  33256. },
  33257. methods: {
  33258. validate: function validate(trigger) {
  33259. var _this = this;
  33260. var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : util_["noop"];
  33261. this.validateDisabled = false;
  33262. var rules = this.getFilteredRule(trigger);
  33263. if ((!rules || rules.length === 0) && this.required === undefined) {
  33264. callback();
  33265. return true;
  33266. }
  33267. this.validateState = 'validating';
  33268. var descriptor = {};
  33269. if (rules && rules.length > 0) {
  33270. rules.forEach(function (rule) {
  33271. delete rule.trigger;
  33272. });
  33273. }
  33274. descriptor[this.prop] = rules;
  33275. var validator = new external_async_validator_default.a(descriptor);
  33276. var model = {};
  33277. model[this.prop] = this.fieldValue;
  33278. validator.validate(model, { firstFields: true }, function (errors, invalidFields) {
  33279. _this.validateState = !errors ? 'success' : 'error';
  33280. _this.validateMessage = errors ? errors[0].message : '';
  33281. callback(_this.validateMessage, invalidFields);
  33282. _this.elForm && _this.elForm.$emit('validate', _this.prop, !errors, _this.validateMessage || null);
  33283. });
  33284. },
  33285. clearValidate: function clearValidate() {
  33286. this.validateState = '';
  33287. this.validateMessage = '';
  33288. this.validateDisabled = false;
  33289. },
  33290. resetField: function resetField() {
  33291. var _this2 = this;
  33292. this.validateState = '';
  33293. this.validateMessage = '';
  33294. var model = this.form.model;
  33295. var value = this.fieldValue;
  33296. var path = this.prop;
  33297. if (path.indexOf(':') !== -1) {
  33298. path = path.replace(/:/, '.');
  33299. }
  33300. var prop = Object(util_["getPropByPath"])(model, path, true);
  33301. this.validateDisabled = true;
  33302. if (Array.isArray(value)) {
  33303. prop.o[prop.k] = [].concat(this.initialValue);
  33304. } else {
  33305. prop.o[prop.k] = this.initialValue;
  33306. }
  33307. // reset validateDisabled after onFieldChange triggered
  33308. this.$nextTick(function () {
  33309. _this2.validateDisabled = false;
  33310. });
  33311. this.broadcast('ElTimeSelect', 'fieldReset', this.initialValue);
  33312. },
  33313. getRules: function getRules() {
  33314. var formRules = this.form.rules;
  33315. var selfRules = this.rules;
  33316. var requiredRule = this.required !== undefined ? { required: !!this.required } : [];
  33317. var prop = Object(util_["getPropByPath"])(formRules, this.prop || '');
  33318. formRules = formRules ? prop.o[this.prop || ''] || prop.v : [];
  33319. return [].concat(selfRules || formRules || []).concat(requiredRule);
  33320. },
  33321. getFilteredRule: function getFilteredRule(trigger) {
  33322. var rules = this.getRules();
  33323. return rules.filter(function (rule) {
  33324. if (!rule.trigger || trigger === '') return true;
  33325. if (Array.isArray(rule.trigger)) {
  33326. return rule.trigger.indexOf(trigger) > -1;
  33327. } else {
  33328. return rule.trigger === trigger;
  33329. }
  33330. }).map(function (rule) {
  33331. return merge_default()({}, rule);
  33332. });
  33333. },
  33334. onFieldBlur: function onFieldBlur() {
  33335. this.validate('blur');
  33336. },
  33337. onFieldChange: function onFieldChange() {
  33338. if (this.validateDisabled) {
  33339. this.validateDisabled = false;
  33340. return;
  33341. }
  33342. this.validate('change');
  33343. },
  33344. updateComputedLabelWidth: function updateComputedLabelWidth(width) {
  33345. this.computedLabelWidth = width ? width + 'px' : '';
  33346. },
  33347. addValidateEvents: function addValidateEvents() {
  33348. var rules = this.getRules();
  33349. if (rules.length || this.required !== undefined) {
  33350. this.$on('el.form.blur', this.onFieldBlur);
  33351. this.$on('el.form.change', this.onFieldChange);
  33352. }
  33353. },
  33354. removeValidateEvents: function removeValidateEvents() {
  33355. this.$off();
  33356. }
  33357. },
  33358. mounted: function mounted() {
  33359. if (this.prop) {
  33360. this.dispatch('ElForm', 'el.form.addField', [this]);
  33361. var initialValue = this.fieldValue;
  33362. if (Array.isArray(initialValue)) {
  33363. initialValue = [].concat(initialValue);
  33364. }
  33365. Object.defineProperty(this, 'initialValue', {
  33366. value: initialValue
  33367. });
  33368. this.addValidateEvents();
  33369. }
  33370. },
  33371. beforeDestroy: function beforeDestroy() {
  33372. this.dispatch('ElForm', 'el.form.removeField', [this]);
  33373. }
  33374. });
  33375. // CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=script&lang=js&
  33376. /* harmony default export */ var src_form_itemvue_type_script_lang_js_ = (form_itemvue_type_script_lang_js_);
  33377. // CONCATENATED MODULE: ./packages/form/src/form-item.vue
  33378. /* normalize component */
  33379. var form_item_component = normalizeComponent(
  33380. src_form_itemvue_type_script_lang_js_,
  33381. form_itemvue_type_template_id_b6f3db6c_render,
  33382. form_itemvue_type_template_id_b6f3db6c_staticRenderFns,
  33383. false,
  33384. null,
  33385. null,
  33386. null
  33387. )
  33388. /* hot reload */
  33389. if (false) { var form_item_api; }
  33390. form_item_component.options.__file = "packages/form/src/form-item.vue"
  33391. /* harmony default export */ var form_item = (form_item_component.exports);
  33392. // CONCATENATED MODULE: ./packages/form-item/index.js
  33393. /* istanbul ignore next */
  33394. form_item.install = function (Vue) {
  33395. Vue.component(form_item.name, form_item);
  33396. };
  33397. /* harmony default export */ var packages_form_item = (form_item);
  33398. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=template&id=2031f33a&
  33399. var tab_barvue_type_template_id_2031f33a_render = function() {
  33400. var _vm = this
  33401. var _h = _vm.$createElement
  33402. var _c = _vm._self._c || _h
  33403. return _c("div", {
  33404. staticClass: "el-tabs__active-bar",
  33405. class: "is-" + _vm.rootTabs.tabPosition,
  33406. style: _vm.barStyle
  33407. })
  33408. }
  33409. var tab_barvue_type_template_id_2031f33a_staticRenderFns = []
  33410. tab_barvue_type_template_id_2031f33a_render._withStripped = true
  33411. // CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue?vue&type=template&id=2031f33a&
  33412. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js&
  33413. //
  33414. //
  33415. //
  33416. /* harmony default export */ var tab_barvue_type_script_lang_js_ = ({
  33417. name: 'TabBar',
  33418. props: {
  33419. tabs: Array
  33420. },
  33421. inject: ['rootTabs'],
  33422. computed: {
  33423. barStyle: {
  33424. get: function get() {
  33425. var _this = this;
  33426. var style = {};
  33427. var offset = 0;
  33428. var tabSize = 0;
  33429. var sizeName = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';
  33430. var sizeDir = sizeName === 'width' ? 'x' : 'y';
  33431. var firstUpperCase = function firstUpperCase(str) {
  33432. return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
  33433. return L.toUpperCase();
  33434. });
  33435. };
  33436. this.tabs.every(function (tab, index) {
  33437. var $el = Object(util_["arrayFind"])(_this.$parent.$refs.tabs || [], function (t) {
  33438. return t.id.replace('tab-', '') === tab.paneName;
  33439. });
  33440. if (!$el) {
  33441. return false;
  33442. }
  33443. if (!tab.active) {
  33444. offset += $el['client' + firstUpperCase(sizeName)];
  33445. return true;
  33446. } else {
  33447. tabSize = $el['client' + firstUpperCase(sizeName)];
  33448. var tabStyles = window.getComputedStyle($el);
  33449. if (sizeName === 'width' && _this.tabs.length > 1) {
  33450. tabSize -= parseFloat(tabStyles.paddingLeft) + parseFloat(tabStyles.paddingRight);
  33451. }
  33452. if (sizeName === 'width') {
  33453. offset += parseFloat(tabStyles.paddingLeft);
  33454. }
  33455. return false;
  33456. }
  33457. });
  33458. var transform = 'translate' + firstUpperCase(sizeDir) + '(' + offset + 'px)';
  33459. style[sizeName] = tabSize + 'px';
  33460. style.transform = transform;
  33461. style.msTransform = transform;
  33462. style.webkitTransform = transform;
  33463. return style;
  33464. }
  33465. }
  33466. }
  33467. });
  33468. // CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js&
  33469. /* harmony default export */ var src_tab_barvue_type_script_lang_js_ = (tab_barvue_type_script_lang_js_);
  33470. // CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue
  33471. /* normalize component */
  33472. var tab_bar_component = normalizeComponent(
  33473. src_tab_barvue_type_script_lang_js_,
  33474. tab_barvue_type_template_id_2031f33a_render,
  33475. tab_barvue_type_template_id_2031f33a_staticRenderFns,
  33476. false,
  33477. null,
  33478. null,
  33479. null
  33480. )
  33481. /* hot reload */
  33482. if (false) { var tab_bar_api; }
  33483. tab_bar_component.options.__file = "packages/tabs/src/tab-bar.vue"
  33484. /* harmony default export */ var tab_bar = (tab_bar_component.exports);
  33485. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js&
  33486. function noop() {}
  33487. var tab_navvue_type_script_lang_js_firstUpperCase = function firstUpperCase(str) {
  33488. return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
  33489. return L.toUpperCase();
  33490. });
  33491. };
  33492. /* harmony default export */ var tab_navvue_type_script_lang_js_ = ({
  33493. name: 'TabNav',
  33494. components: {
  33495. TabBar: tab_bar
  33496. },
  33497. inject: ['rootTabs'],
  33498. props: {
  33499. panes: Array,
  33500. currentName: String,
  33501. editable: Boolean,
  33502. onTabClick: {
  33503. type: Function,
  33504. default: noop
  33505. },
  33506. onTabRemove: {
  33507. type: Function,
  33508. default: noop
  33509. },
  33510. type: String,
  33511. stretch: Boolean
  33512. },
  33513. data: function data() {
  33514. return {
  33515. scrollable: false,
  33516. navOffset: 0,
  33517. isFocus: false,
  33518. focusable: true
  33519. };
  33520. },
  33521. computed: {
  33522. navStyle: function navStyle() {
  33523. var dir = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'X' : 'Y';
  33524. return {
  33525. transform: 'translate' + dir + '(-' + this.navOffset + 'px)'
  33526. };
  33527. },
  33528. sizeName: function sizeName() {
  33529. return ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';
  33530. }
  33531. },
  33532. methods: {
  33533. scrollPrev: function scrollPrev() {
  33534. var containerSize = this.$refs.navScroll['offset' + tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName)];
  33535. var currentOffset = this.navOffset;
  33536. if (!currentOffset) return;
  33537. var newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0;
  33538. this.navOffset = newOffset;
  33539. },
  33540. scrollNext: function scrollNext() {
  33541. var navSize = this.$refs.nav['offset' + tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName)];
  33542. var containerSize = this.$refs.navScroll['offset' + tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName)];
  33543. var currentOffset = this.navOffset;
  33544. if (navSize - currentOffset <= containerSize) return;
  33545. var newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
  33546. this.navOffset = newOffset;
  33547. },
  33548. scrollToActiveTab: function scrollToActiveTab() {
  33549. if (!this.scrollable) return;
  33550. var nav = this.$refs.nav;
  33551. var activeTab = this.$el.querySelector('.is-active');
  33552. if (!activeTab) return;
  33553. var navScroll = this.$refs.navScroll;
  33554. var isHorizontal = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1;
  33555. var activeTabBounding = activeTab.getBoundingClientRect();
  33556. var navScrollBounding = navScroll.getBoundingClientRect();
  33557. var maxOffset = isHorizontal ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;
  33558. var currentOffset = this.navOffset;
  33559. var newOffset = currentOffset;
  33560. if (isHorizontal) {
  33561. if (activeTabBounding.left < navScrollBounding.left) {
  33562. newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
  33563. }
  33564. if (activeTabBounding.right > navScrollBounding.right) {
  33565. newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
  33566. }
  33567. } else {
  33568. if (activeTabBounding.top < navScrollBounding.top) {
  33569. newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
  33570. }
  33571. if (activeTabBounding.bottom > navScrollBounding.bottom) {
  33572. newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
  33573. }
  33574. }
  33575. newOffset = Math.max(newOffset, 0);
  33576. this.navOffset = Math.min(newOffset, maxOffset);
  33577. },
  33578. update: function update() {
  33579. if (!this.$refs.nav) return;
  33580. var sizeName = this.sizeName;
  33581. var navSize = this.$refs.nav['offset' + tab_navvue_type_script_lang_js_firstUpperCase(sizeName)];
  33582. var containerSize = this.$refs.navScroll['offset' + tab_navvue_type_script_lang_js_firstUpperCase(sizeName)];
  33583. var currentOffset = this.navOffset;
  33584. if (containerSize < navSize) {
  33585. var _currentOffset = this.navOffset;
  33586. this.scrollable = this.scrollable || {};
  33587. this.scrollable.prev = _currentOffset;
  33588. this.scrollable.next = _currentOffset + containerSize < navSize;
  33589. if (navSize - _currentOffset < containerSize) {
  33590. this.navOffset = navSize - containerSize;
  33591. }
  33592. } else {
  33593. this.scrollable = false;
  33594. if (currentOffset > 0) {
  33595. this.navOffset = 0;
  33596. }
  33597. }
  33598. },
  33599. changeTab: function changeTab(e) {
  33600. var keyCode = e.keyCode;
  33601. var nextIndex = void 0;
  33602. var currentIndex = void 0,
  33603. tabList = void 0;
  33604. if ([37, 38, 39, 40].indexOf(keyCode) !== -1) {
  33605. // 左右上下键更换tab
  33606. tabList = e.currentTarget.querySelectorAll('[role=tab]');
  33607. currentIndex = Array.prototype.indexOf.call(tabList, e.target);
  33608. } else {
  33609. return;
  33610. }
  33611. if (keyCode === 37 || keyCode === 38) {
  33612. // left
  33613. if (currentIndex === 0) {
  33614. // first
  33615. nextIndex = tabList.length - 1;
  33616. } else {
  33617. nextIndex = currentIndex - 1;
  33618. }
  33619. } else {
  33620. // right
  33621. if (currentIndex < tabList.length - 1) {
  33622. // not last
  33623. nextIndex = currentIndex + 1;
  33624. } else {
  33625. nextIndex = 0;
  33626. }
  33627. }
  33628. tabList[nextIndex].focus(); // 改变焦点元素
  33629. tabList[nextIndex].click(); // 选中下一个tab
  33630. this.setFocus();
  33631. },
  33632. setFocus: function setFocus() {
  33633. if (this.focusable) {
  33634. this.isFocus = true;
  33635. }
  33636. },
  33637. removeFocus: function removeFocus() {
  33638. this.isFocus = false;
  33639. },
  33640. visibilityChangeHandler: function visibilityChangeHandler() {
  33641. var _this = this;
  33642. var visibility = document.visibilityState;
  33643. if (visibility === 'hidden') {
  33644. this.focusable = false;
  33645. } else if (visibility === 'visible') {
  33646. setTimeout(function () {
  33647. _this.focusable = true;
  33648. }, 50);
  33649. }
  33650. },
  33651. windowBlurHandler: function windowBlurHandler() {
  33652. this.focusable = false;
  33653. },
  33654. windowFocusHandler: function windowFocusHandler() {
  33655. var _this2 = this;
  33656. setTimeout(function () {
  33657. _this2.focusable = true;
  33658. }, 50);
  33659. }
  33660. },
  33661. updated: function updated() {
  33662. this.update();
  33663. },
  33664. render: function render(h) {
  33665. var _this3 = this;
  33666. var type = this.type,
  33667. panes = this.panes,
  33668. editable = this.editable,
  33669. stretch = this.stretch,
  33670. onTabClick = this.onTabClick,
  33671. onTabRemove = this.onTabRemove,
  33672. navStyle = this.navStyle,
  33673. scrollable = this.scrollable,
  33674. scrollNext = this.scrollNext,
  33675. scrollPrev = this.scrollPrev,
  33676. changeTab = this.changeTab,
  33677. setFocus = this.setFocus,
  33678. removeFocus = this.removeFocus;
  33679. var scrollBtn = scrollable ? [h(
  33680. 'span',
  33681. { 'class': ['el-tabs__nav-prev', scrollable.prev ? '' : 'is-disabled'], on: {
  33682. 'click': scrollPrev
  33683. }
  33684. },
  33685. [h('i', { 'class': 'el-icon-arrow-left' })]
  33686. ), h(
  33687. 'span',
  33688. { 'class': ['el-tabs__nav-next', scrollable.next ? '' : 'is-disabled'], on: {
  33689. 'click': scrollNext
  33690. }
  33691. },
  33692. [h('i', { 'class': 'el-icon-arrow-right' })]
  33693. )] : null;
  33694. var tabs = this._l(panes, function (pane, index) {
  33695. var _ref;
  33696. var tabName = pane.name || pane.index || index;
  33697. var closable = pane.isClosable || editable;
  33698. pane.index = '' + index;
  33699. var btnClose = closable ? h('span', { 'class': 'el-icon-close', on: {
  33700. 'click': function click(ev) {
  33701. onTabRemove(pane, ev);
  33702. }
  33703. }
  33704. }) : null;
  33705. var tabLabelContent = pane.$slots.label || pane.label;
  33706. var tabindex = pane.active ? 0 : -1;
  33707. return h(
  33708. 'div',
  33709. {
  33710. 'class': (_ref = {
  33711. 'el-tabs__item': true
  33712. }, _ref['is-' + _this3.rootTabs.tabPosition] = true, _ref['is-active'] = pane.active, _ref['is-disabled'] = pane.disabled, _ref['is-closable'] = closable, _ref['is-focus'] = _this3.isFocus, _ref),
  33713. attrs: { id: 'tab-' + tabName,
  33714. 'aria-controls': 'pane-' + tabName,
  33715. role: 'tab',
  33716. 'aria-selected': pane.active,
  33717. tabindex: tabindex
  33718. },
  33719. key: 'tab-' + tabName, ref: 'tabs', refInFor: true,
  33720. on: {
  33721. 'focus': function focus() {
  33722. setFocus();
  33723. },
  33724. 'blur': function blur() {
  33725. removeFocus();
  33726. },
  33727. 'click': function click(ev) {
  33728. removeFocus();onTabClick(pane, tabName, ev);
  33729. },
  33730. 'keydown': function keydown(ev) {
  33731. if (closable && (ev.keyCode === 46 || ev.keyCode === 8)) {
  33732. onTabRemove(pane, ev);
  33733. }
  33734. }
  33735. }
  33736. },
  33737. [tabLabelContent, btnClose]
  33738. );
  33739. });
  33740. return h(
  33741. 'div',
  33742. { 'class': ['el-tabs__nav-wrap', scrollable ? 'is-scrollable' : '', 'is-' + this.rootTabs.tabPosition] },
  33743. [scrollBtn, h(
  33744. 'div',
  33745. { 'class': ['el-tabs__nav-scroll'], ref: 'navScroll' },
  33746. [h(
  33747. 'div',
  33748. {
  33749. 'class': ['el-tabs__nav', 'is-' + this.rootTabs.tabPosition, stretch && ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'is-stretch' : ''],
  33750. ref: 'nav',
  33751. style: navStyle,
  33752. attrs: { role: 'tablist'
  33753. },
  33754. on: {
  33755. 'keydown': changeTab
  33756. }
  33757. },
  33758. [!type ? h('tab-bar', {
  33759. attrs: { tabs: panes }
  33760. }) : null, tabs]
  33761. )]
  33762. )]
  33763. );
  33764. },
  33765. mounted: function mounted() {
  33766. var _this4 = this;
  33767. Object(resize_event_["addResizeListener"])(this.$el, this.update);
  33768. document.addEventListener('visibilitychange', this.visibilityChangeHandler);
  33769. window.addEventListener('blur', this.windowBlurHandler);
  33770. window.addEventListener('focus', this.windowFocusHandler);
  33771. setTimeout(function () {
  33772. _this4.scrollToActiveTab();
  33773. }, 0);
  33774. },
  33775. beforeDestroy: function beforeDestroy() {
  33776. if (this.$el && this.update) Object(resize_event_["removeResizeListener"])(this.$el, this.update);
  33777. document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
  33778. window.removeEventListener('blur', this.windowBlurHandler);
  33779. window.removeEventListener('focus', this.windowFocusHandler);
  33780. }
  33781. });
  33782. // CONCATENATED MODULE: ./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js&
  33783. /* harmony default export */ var src_tab_navvue_type_script_lang_js_ = (tab_navvue_type_script_lang_js_);
  33784. // CONCATENATED MODULE: ./packages/tabs/src/tab-nav.vue
  33785. var tab_nav_render, tab_nav_staticRenderFns
  33786. /* normalize component */
  33787. var tab_nav_component = normalizeComponent(
  33788. src_tab_navvue_type_script_lang_js_,
  33789. tab_nav_render,
  33790. tab_nav_staticRenderFns,
  33791. false,
  33792. null,
  33793. null,
  33794. null
  33795. )
  33796. /* hot reload */
  33797. if (false) { var tab_nav_api; }
  33798. tab_nav_component.options.__file = "packages/tabs/src/tab-nav.vue"
  33799. /* harmony default export */ var tab_nav = (tab_nav_component.exports);
  33800. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tabs.vue?vue&type=script&lang=js&
  33801. /* harmony default export */ var tabsvue_type_script_lang_js_ = ({
  33802. name: 'ElTabs',
  33803. components: {
  33804. TabNav: tab_nav
  33805. },
  33806. props: {
  33807. type: String,
  33808. activeName: String,
  33809. closable: Boolean,
  33810. addable: Boolean,
  33811. value: {},
  33812. editable: Boolean,
  33813. tabPosition: {
  33814. type: String,
  33815. default: 'top'
  33816. },
  33817. beforeLeave: Function,
  33818. stretch: Boolean
  33819. },
  33820. provide: function provide() {
  33821. return {
  33822. rootTabs: this
  33823. };
  33824. },
  33825. data: function data() {
  33826. return {
  33827. currentName: this.value || this.activeName,
  33828. panes: []
  33829. };
  33830. },
  33831. watch: {
  33832. activeName: function activeName(value) {
  33833. this.setCurrentName(value);
  33834. },
  33835. value: function value(_value) {
  33836. this.setCurrentName(_value);
  33837. },
  33838. currentName: function currentName(value) {
  33839. var _this = this;
  33840. if (this.$refs.nav) {
  33841. this.$nextTick(function () {
  33842. _this.$refs.nav.$nextTick(function (_) {
  33843. _this.$refs.nav.scrollToActiveTab();
  33844. });
  33845. });
  33846. }
  33847. }
  33848. },
  33849. methods: {
  33850. calcPaneInstances: function calcPaneInstances() {
  33851. var _this2 = this;
  33852. var isForceUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  33853. if (this.$slots.default) {
  33854. var paneSlots = this.$slots.default.filter(function (vnode) {
  33855. return vnode.tag && vnode.componentOptions && vnode.componentOptions.Ctor.options.name === 'ElTabPane';
  33856. });
  33857. // update indeed
  33858. var panes = paneSlots.map(function (_ref) {
  33859. var componentInstance = _ref.componentInstance;
  33860. return componentInstance;
  33861. });
  33862. var panesChanged = !(panes.length === this.panes.length && panes.every(function (pane, index) {
  33863. return pane === _this2.panes[index];
  33864. }));
  33865. if (isForceUpdate || panesChanged) {
  33866. this.panes = panes;
  33867. }
  33868. } else if (this.panes.length !== 0) {
  33869. this.panes = [];
  33870. }
  33871. },
  33872. handleTabClick: function handleTabClick(tab, tabName, event) {
  33873. if (tab.disabled) return;
  33874. this.setCurrentName(tabName);
  33875. this.$emit('tab-click', tab, event);
  33876. },
  33877. handleTabRemove: function handleTabRemove(pane, ev) {
  33878. if (pane.disabled) return;
  33879. ev.stopPropagation();
  33880. this.$emit('edit', pane.name, 'remove');
  33881. this.$emit('tab-remove', pane.name);
  33882. },
  33883. handleTabAdd: function handleTabAdd() {
  33884. this.$emit('edit', null, 'add');
  33885. this.$emit('tab-add');
  33886. },
  33887. setCurrentName: function setCurrentName(value) {
  33888. var _this3 = this;
  33889. var changeCurrentName = function changeCurrentName() {
  33890. _this3.currentName = value;
  33891. _this3.$emit('input', value);
  33892. };
  33893. if (this.currentName !== value && this.beforeLeave) {
  33894. var before = this.beforeLeave(value, this.currentName);
  33895. if (before && before.then) {
  33896. before.then(function () {
  33897. changeCurrentName();
  33898. _this3.$refs.nav && _this3.$refs.nav.removeFocus();
  33899. }, function () {
  33900. // https://github.com/ElemeFE/element/pull/14816
  33901. // ignore promise rejection in `before-leave` hook
  33902. });
  33903. } else if (before !== false) {
  33904. changeCurrentName();
  33905. }
  33906. } else {
  33907. changeCurrentName();
  33908. }
  33909. }
  33910. },
  33911. render: function render(h) {
  33912. var _ref2;
  33913. var type = this.type,
  33914. handleTabClick = this.handleTabClick,
  33915. handleTabRemove = this.handleTabRemove,
  33916. handleTabAdd = this.handleTabAdd,
  33917. currentName = this.currentName,
  33918. panes = this.panes,
  33919. editable = this.editable,
  33920. addable = this.addable,
  33921. tabPosition = this.tabPosition,
  33922. stretch = this.stretch;
  33923. var newButton = editable || addable ? h(
  33924. 'span',
  33925. {
  33926. 'class': 'el-tabs__new-tab',
  33927. on: {
  33928. 'click': handleTabAdd,
  33929. 'keydown': function keydown(ev) {
  33930. if (ev.keyCode === 13) {
  33931. handleTabAdd();
  33932. }
  33933. }
  33934. },
  33935. attrs: {
  33936. tabindex: '0'
  33937. }
  33938. },
  33939. [h('i', { 'class': 'el-icon-plus' })]
  33940. ) : null;
  33941. var navData = {
  33942. props: {
  33943. currentName: currentName,
  33944. onTabClick: handleTabClick,
  33945. onTabRemove: handleTabRemove,
  33946. editable: editable,
  33947. type: type,
  33948. panes: panes,
  33949. stretch: stretch
  33950. },
  33951. ref: 'nav'
  33952. };
  33953. var header = h(
  33954. 'div',
  33955. { 'class': ['el-tabs__header', 'is-' + tabPosition] },
  33956. [newButton, h('tab-nav', navData)]
  33957. );
  33958. var panels = h(
  33959. 'div',
  33960. { 'class': 'el-tabs__content' },
  33961. [this.$slots.default]
  33962. );
  33963. return h(
  33964. 'div',
  33965. { 'class': (_ref2 = {
  33966. 'el-tabs': true,
  33967. 'el-tabs--card': type === 'card'
  33968. }, _ref2['el-tabs--' + tabPosition] = true, _ref2['el-tabs--border-card'] = type === 'border-card', _ref2) },
  33969. [tabPosition !== 'bottom' ? [header, panels] : [panels, header]]
  33970. );
  33971. },
  33972. created: function created() {
  33973. if (!this.currentName) {
  33974. this.setCurrentName('0');
  33975. }
  33976. this.$on('tab-nav-update', this.calcPaneInstances.bind(null, true));
  33977. },
  33978. mounted: function mounted() {
  33979. this.calcPaneInstances();
  33980. },
  33981. updated: function updated() {
  33982. this.calcPaneInstances();
  33983. }
  33984. });
  33985. // CONCATENATED MODULE: ./packages/tabs/src/tabs.vue?vue&type=script&lang=js&
  33986. /* harmony default export */ var src_tabsvue_type_script_lang_js_ = (tabsvue_type_script_lang_js_);
  33987. // CONCATENATED MODULE: ./packages/tabs/src/tabs.vue
  33988. var tabs_render, tabs_staticRenderFns
  33989. /* normalize component */
  33990. var tabs_component = normalizeComponent(
  33991. src_tabsvue_type_script_lang_js_,
  33992. tabs_render,
  33993. tabs_staticRenderFns,
  33994. false,
  33995. null,
  33996. null,
  33997. null
  33998. )
  33999. /* hot reload */
  34000. if (false) { var tabs_api; }
  34001. tabs_component.options.__file = "packages/tabs/src/tabs.vue"
  34002. /* harmony default export */ var tabs = (tabs_component.exports);
  34003. // CONCATENATED MODULE: ./packages/tabs/index.js
  34004. /* istanbul ignore next */
  34005. tabs.install = function (Vue) {
  34006. Vue.component(tabs.name, tabs);
  34007. };
  34008. /* harmony default export */ var packages_tabs = (tabs);
  34009. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-pane.vue?vue&type=template&id=9145a070&
  34010. var tab_panevue_type_template_id_9145a070_render = function() {
  34011. var _vm = this
  34012. var _h = _vm.$createElement
  34013. var _c = _vm._self._c || _h
  34014. return !_vm.lazy || _vm.loaded || _vm.active
  34015. ? _c(
  34016. "div",
  34017. {
  34018. directives: [
  34019. {
  34020. name: "show",
  34021. rawName: "v-show",
  34022. value: _vm.active,
  34023. expression: "active"
  34024. }
  34025. ],
  34026. staticClass: "el-tab-pane",
  34027. attrs: {
  34028. role: "tabpanel",
  34029. "aria-hidden": !_vm.active,
  34030. id: "pane-" + _vm.paneName,
  34031. "aria-labelledby": "tab-" + _vm.paneName
  34032. }
  34033. },
  34034. [_vm._t("default")],
  34035. 2
  34036. )
  34037. : _vm._e()
  34038. }
  34039. var tab_panevue_type_template_id_9145a070_staticRenderFns = []
  34040. tab_panevue_type_template_id_9145a070_render._withStripped = true
  34041. // CONCATENATED MODULE: ./packages/tabs/src/tab-pane.vue?vue&type=template&id=9145a070&
  34042. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-pane.vue?vue&type=script&lang=js&
  34043. //
  34044. //
  34045. //
  34046. //
  34047. //
  34048. //
  34049. //
  34050. //
  34051. //
  34052. //
  34053. //
  34054. //
  34055. //
  34056. /* harmony default export */ var tab_panevue_type_script_lang_js_ = ({
  34057. name: 'ElTabPane',
  34058. componentName: 'ElTabPane',
  34059. props: {
  34060. label: String,
  34061. labelContent: Function,
  34062. name: String,
  34063. closable: Boolean,
  34064. disabled: Boolean,
  34065. lazy: Boolean
  34066. },
  34067. data: function data() {
  34068. return {
  34069. index: null,
  34070. loaded: false
  34071. };
  34072. },
  34073. computed: {
  34074. isClosable: function isClosable() {
  34075. return this.closable || this.$parent.closable;
  34076. },
  34077. active: function active() {
  34078. var active = this.$parent.currentName === (this.name || this.index);
  34079. if (active) {
  34080. this.loaded = true;
  34081. }
  34082. return active;
  34083. },
  34084. paneName: function paneName() {
  34085. return this.name || this.index;
  34086. }
  34087. },
  34088. updated: function updated() {
  34089. this.$parent.$emit('tab-nav-update');
  34090. }
  34091. });
  34092. // CONCATENATED MODULE: ./packages/tabs/src/tab-pane.vue?vue&type=script&lang=js&
  34093. /* harmony default export */ var src_tab_panevue_type_script_lang_js_ = (tab_panevue_type_script_lang_js_);
  34094. // CONCATENATED MODULE: ./packages/tabs/src/tab-pane.vue
  34095. /* normalize component */
  34096. var tab_pane_component = normalizeComponent(
  34097. src_tab_panevue_type_script_lang_js_,
  34098. tab_panevue_type_template_id_9145a070_render,
  34099. tab_panevue_type_template_id_9145a070_staticRenderFns,
  34100. false,
  34101. null,
  34102. null,
  34103. null
  34104. )
  34105. /* hot reload */
  34106. if (false) { var tab_pane_api; }
  34107. tab_pane_component.options.__file = "packages/tabs/src/tab-pane.vue"
  34108. /* harmony default export */ var tab_pane = (tab_pane_component.exports);
  34109. // CONCATENATED MODULE: ./packages/tab-pane/index.js
  34110. /* istanbul ignore next */
  34111. tab_pane.install = function (Vue) {
  34112. Vue.component(tab_pane.name, tab_pane);
  34113. };
  34114. /* harmony default export */ var packages_tab_pane = (tab_pane);
  34115. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js&
  34116. /* harmony default export */ var tagvue_type_script_lang_js_ = ({
  34117. name: 'ElTag',
  34118. props: {
  34119. text: String,
  34120. closable: Boolean,
  34121. type: String,
  34122. hit: Boolean,
  34123. disableTransitions: Boolean,
  34124. color: String,
  34125. size: String,
  34126. effect: {
  34127. type: String,
  34128. default: 'light',
  34129. validator: function validator(val) {
  34130. return ['dark', 'light', 'plain'].indexOf(val) !== -1;
  34131. }
  34132. }
  34133. },
  34134. methods: {
  34135. handleClose: function handleClose(event) {
  34136. event.stopPropagation();
  34137. this.$emit('close', event);
  34138. },
  34139. handleClick: function handleClick(event) {
  34140. this.$emit('click', event);
  34141. }
  34142. },
  34143. computed: {
  34144. tagSize: function tagSize() {
  34145. return this.size || (this.$ELEMENT || {}).size;
  34146. }
  34147. },
  34148. render: function render(h) {
  34149. var type = this.type,
  34150. tagSize = this.tagSize,
  34151. hit = this.hit,
  34152. effect = this.effect;
  34153. var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
  34154. var tagEl = h(
  34155. 'span',
  34156. {
  34157. 'class': classes,
  34158. style: { backgroundColor: this.color },
  34159. on: {
  34160. 'click': this.handleClick
  34161. }
  34162. },
  34163. [this.$slots.default, this.closable && h('i', { 'class': 'el-tag__close el-icon-close', on: {
  34164. 'click': this.handleClose
  34165. }
  34166. })]
  34167. );
  34168. return this.disableTransitions ? tagEl : h(
  34169. 'transition',
  34170. {
  34171. attrs: { name: 'el-zoom-in-center' }
  34172. },
  34173. [tagEl]
  34174. );
  34175. }
  34176. });
  34177. // CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js&
  34178. /* harmony default export */ var src_tagvue_type_script_lang_js_ = (tagvue_type_script_lang_js_);
  34179. // CONCATENATED MODULE: ./packages/tag/src/tag.vue
  34180. var tag_render, tag_staticRenderFns
  34181. /* normalize component */
  34182. var tag_component = normalizeComponent(
  34183. src_tagvue_type_script_lang_js_,
  34184. tag_render,
  34185. tag_staticRenderFns,
  34186. false,
  34187. null,
  34188. null,
  34189. null
  34190. )
  34191. /* hot reload */
  34192. if (false) { var tag_api; }
  34193. tag_component.options.__file = "packages/tag/src/tag.vue"
  34194. /* harmony default export */ var src_tag = (tag_component.exports);
  34195. // CONCATENATED MODULE: ./packages/tag/index.js
  34196. /* istanbul ignore next */
  34197. src_tag.install = function (Vue) {
  34198. Vue.component(src_tag.name, src_tag);
  34199. };
  34200. /* harmony default export */ var packages_tag = (src_tag);
  34201. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=template&id=547575a6&
  34202. var treevue_type_template_id_547575a6_render = function() {
  34203. var _vm = this
  34204. var _h = _vm.$createElement
  34205. var _c = _vm._self._c || _h
  34206. return _c(
  34207. "div",
  34208. {
  34209. staticClass: "el-tree",
  34210. class: {
  34211. "el-tree--highlight-current": _vm.highlightCurrent,
  34212. "is-dragging": !!_vm.dragState.draggingNode,
  34213. "is-drop-not-allow": !_vm.dragState.allowDrop,
  34214. "is-drop-inner": _vm.dragState.dropType === "inner"
  34215. },
  34216. attrs: { role: "tree" }
  34217. },
  34218. [
  34219. _vm._l(_vm.root.childNodes, function(child) {
  34220. return _c("el-tree-node", {
  34221. key: _vm.getNodeKey(child),
  34222. attrs: {
  34223. node: child,
  34224. props: _vm.props,
  34225. "render-after-expand": _vm.renderAfterExpand,
  34226. "show-checkbox": _vm.showCheckbox,
  34227. "render-content": _vm.renderContent
  34228. },
  34229. on: { "node-expand": _vm.handleNodeExpand }
  34230. })
  34231. }),
  34232. _vm.isEmpty
  34233. ? _c("div", { staticClass: "el-tree__empty-block" }, [
  34234. _c("span", { staticClass: "el-tree__empty-text" }, [
  34235. _vm._v(_vm._s(_vm.emptyText))
  34236. ])
  34237. ])
  34238. : _vm._e(),
  34239. _c("div", {
  34240. directives: [
  34241. {
  34242. name: "show",
  34243. rawName: "v-show",
  34244. value: _vm.dragState.showDropIndicator,
  34245. expression: "dragState.showDropIndicator"
  34246. }
  34247. ],
  34248. ref: "dropIndicator",
  34249. staticClass: "el-tree__drop-indicator"
  34250. })
  34251. ],
  34252. 2
  34253. )
  34254. }
  34255. var treevue_type_template_id_547575a6_staticRenderFns = []
  34256. treevue_type_template_id_547575a6_render._withStripped = true
  34257. // CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=template&id=547575a6&
  34258. // CONCATENATED MODULE: ./packages/tree/src/model/util.js
  34259. var NODE_KEY = '$treeNodeId';
  34260. var markNodeData = function markNodeData(node, data) {
  34261. if (!data || data[NODE_KEY]) return;
  34262. Object.defineProperty(data, NODE_KEY, {
  34263. value: node.id,
  34264. enumerable: false,
  34265. configurable: false,
  34266. writable: false
  34267. });
  34268. };
  34269. var util_getNodeKey = function getNodeKey(key, data) {
  34270. if (!key) return data[NODE_KEY];
  34271. return data[key];
  34272. };
  34273. var findNearestComponent = function findNearestComponent(element, componentName) {
  34274. var target = element;
  34275. while (target && target.tagName !== 'BODY') {
  34276. if (target.__vue__ && target.__vue__.$options.name === componentName) {
  34277. return target.__vue__;
  34278. }
  34279. target = target.parentNode;
  34280. }
  34281. return null;
  34282. };
  34283. // CONCATENATED MODULE: ./packages/tree/src/model/node.js
  34284. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  34285. function node_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34286. var getChildState = function getChildState(node) {
  34287. var all = true;
  34288. var none = true;
  34289. var allWithoutDisable = true;
  34290. for (var i = 0, j = node.length; i < j; i++) {
  34291. var n = node[i];
  34292. if (n.checked !== true || n.indeterminate) {
  34293. all = false;
  34294. if (!n.disabled) {
  34295. allWithoutDisable = false;
  34296. }
  34297. }
  34298. if (n.checked !== false || n.indeterminate) {
  34299. none = false;
  34300. }
  34301. }
  34302. return { all: all, none: none, allWithoutDisable: allWithoutDisable, half: !all && !none };
  34303. };
  34304. var reInitChecked = function reInitChecked(node) {
  34305. if (node.childNodes.length === 0) return;
  34306. var _getChildState = getChildState(node.childNodes),
  34307. all = _getChildState.all,
  34308. none = _getChildState.none,
  34309. half = _getChildState.half;
  34310. if (all) {
  34311. node.checked = true;
  34312. node.indeterminate = false;
  34313. } else if (half) {
  34314. node.checked = false;
  34315. node.indeterminate = true;
  34316. } else if (none) {
  34317. node.checked = false;
  34318. node.indeterminate = false;
  34319. }
  34320. var parent = node.parent;
  34321. if (!parent || parent.level === 0) return;
  34322. if (!node.store.checkStrictly) {
  34323. reInitChecked(parent);
  34324. }
  34325. };
  34326. var getPropertyFromData = function getPropertyFromData(node, prop) {
  34327. var props = node.store.props;
  34328. var data = node.data || {};
  34329. var config = props[prop];
  34330. if (typeof config === 'function') {
  34331. return config(data, node);
  34332. } else if (typeof config === 'string') {
  34333. return data[config];
  34334. } else if (typeof config === 'undefined') {
  34335. var dataProp = data[prop];
  34336. return dataProp === undefined ? '' : dataProp;
  34337. }
  34338. };
  34339. var nodeIdSeed = 0;
  34340. var node_Node = function () {
  34341. function Node(options) {
  34342. node_classCallCheck(this, Node);
  34343. this.id = nodeIdSeed++;
  34344. this.text = null;
  34345. this.checked = false;
  34346. this.indeterminate = false;
  34347. this.data = null;
  34348. this.expanded = false;
  34349. this.parent = null;
  34350. this.visible = true;
  34351. this.isCurrent = false;
  34352. for (var name in options) {
  34353. if (options.hasOwnProperty(name)) {
  34354. this[name] = options[name];
  34355. }
  34356. }
  34357. // internal
  34358. this.level = 0;
  34359. this.loaded = false;
  34360. this.childNodes = [];
  34361. this.loading = false;
  34362. if (this.parent) {
  34363. this.level = this.parent.level + 1;
  34364. }
  34365. var store = this.store;
  34366. if (!store) {
  34367. throw new Error('[Node]store is required!');
  34368. }
  34369. store.registerNode(this);
  34370. var props = store.props;
  34371. if (props && typeof props.isLeaf !== 'undefined') {
  34372. var isLeaf = getPropertyFromData(this, 'isLeaf');
  34373. if (typeof isLeaf === 'boolean') {
  34374. this.isLeafByUser = isLeaf;
  34375. }
  34376. }
  34377. if (store.lazy !== true && this.data) {
  34378. this.setData(this.data);
  34379. if (store.defaultExpandAll) {
  34380. this.expanded = true;
  34381. }
  34382. } else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
  34383. this.expand();
  34384. }
  34385. if (!Array.isArray(this.data)) {
  34386. markNodeData(this, this.data);
  34387. }
  34388. if (!this.data) return;
  34389. var defaultExpandedKeys = store.defaultExpandedKeys;
  34390. var key = store.key;
  34391. if (key && defaultExpandedKeys && defaultExpandedKeys.indexOf(this.key) !== -1) {
  34392. this.expand(null, store.autoExpandParent);
  34393. }
  34394. if (key && store.currentNodeKey !== undefined && this.key === store.currentNodeKey) {
  34395. store.currentNode = this;
  34396. store.currentNode.isCurrent = true;
  34397. }
  34398. if (store.lazy) {
  34399. store._initDefaultCheckedNode(this);
  34400. }
  34401. this.updateLeafState();
  34402. }
  34403. Node.prototype.setData = function setData(data) {
  34404. if (!Array.isArray(data)) {
  34405. markNodeData(this, data);
  34406. }
  34407. this.data = data;
  34408. this.childNodes = [];
  34409. var children = void 0;
  34410. if (this.level === 0 && this.data instanceof Array) {
  34411. children = this.data;
  34412. } else {
  34413. children = getPropertyFromData(this, 'children') || [];
  34414. }
  34415. for (var i = 0, j = children.length; i < j; i++) {
  34416. this.insertChild({ data: children[i] });
  34417. }
  34418. };
  34419. Node.prototype.contains = function contains(target) {
  34420. var deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  34421. var walk = function walk(parent) {
  34422. var children = parent.childNodes || [];
  34423. var result = false;
  34424. for (var i = 0, j = children.length; i < j; i++) {
  34425. var child = children[i];
  34426. if (child === target || deep && walk(child)) {
  34427. result = true;
  34428. break;
  34429. }
  34430. }
  34431. return result;
  34432. };
  34433. return walk(this);
  34434. };
  34435. Node.prototype.remove = function remove() {
  34436. var parent = this.parent;
  34437. if (parent) {
  34438. parent.removeChild(this);
  34439. }
  34440. };
  34441. Node.prototype.insertChild = function insertChild(child, index, batch) {
  34442. if (!child) throw new Error('insertChild error: child is required.');
  34443. if (!(child instanceof Node)) {
  34444. if (!batch) {
  34445. var children = this.getChildren(true) || [];
  34446. if (children.indexOf(child.data) === -1) {
  34447. if (typeof index === 'undefined' || index < 0) {
  34448. children.push(child.data);
  34449. } else {
  34450. children.splice(index, 0, child.data);
  34451. }
  34452. }
  34453. }
  34454. merge_default()(child, {
  34455. parent: this,
  34456. store: this.store
  34457. });
  34458. child = new Node(child);
  34459. }
  34460. child.level = this.level + 1;
  34461. if (typeof index === 'undefined' || index < 0) {
  34462. this.childNodes.push(child);
  34463. } else {
  34464. this.childNodes.splice(index, 0, child);
  34465. }
  34466. this.updateLeafState();
  34467. };
  34468. Node.prototype.insertBefore = function insertBefore(child, ref) {
  34469. var index = void 0;
  34470. if (ref) {
  34471. index = this.childNodes.indexOf(ref);
  34472. }
  34473. this.insertChild(child, index);
  34474. };
  34475. Node.prototype.insertAfter = function insertAfter(child, ref) {
  34476. var index = void 0;
  34477. if (ref) {
  34478. index = this.childNodes.indexOf(ref);
  34479. if (index !== -1) index += 1;
  34480. }
  34481. this.insertChild(child, index);
  34482. };
  34483. Node.prototype.removeChild = function removeChild(child) {
  34484. var children = this.getChildren() || [];
  34485. var dataIndex = children.indexOf(child.data);
  34486. if (dataIndex > -1) {
  34487. children.splice(dataIndex, 1);
  34488. }
  34489. var index = this.childNodes.indexOf(child);
  34490. if (index > -1) {
  34491. this.store && this.store.deregisterNode(child);
  34492. child.parent = null;
  34493. this.childNodes.splice(index, 1);
  34494. }
  34495. this.updateLeafState();
  34496. };
  34497. Node.prototype.removeChildByData = function removeChildByData(data) {
  34498. var targetNode = null;
  34499. for (var i = 0; i < this.childNodes.length; i++) {
  34500. if (this.childNodes[i].data === data) {
  34501. targetNode = this.childNodes[i];
  34502. break;
  34503. }
  34504. }
  34505. if (targetNode) {
  34506. this.removeChild(targetNode);
  34507. }
  34508. };
  34509. Node.prototype.expand = function expand(callback, expandParent) {
  34510. var _this = this;
  34511. var done = function done() {
  34512. if (expandParent) {
  34513. var parent = _this.parent;
  34514. while (parent.level > 0) {
  34515. parent.expanded = true;
  34516. parent = parent.parent;
  34517. }
  34518. }
  34519. _this.expanded = true;
  34520. if (callback) callback();
  34521. };
  34522. if (this.shouldLoadData()) {
  34523. this.loadData(function (data) {
  34524. if (data instanceof Array) {
  34525. if (_this.checked) {
  34526. _this.setChecked(true, true);
  34527. } else if (!_this.store.checkStrictly) {
  34528. reInitChecked(_this);
  34529. }
  34530. done();
  34531. }
  34532. });
  34533. } else {
  34534. done();
  34535. }
  34536. };
  34537. Node.prototype.doCreateChildren = function doCreateChildren(array) {
  34538. var _this2 = this;
  34539. var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34540. array.forEach(function (item) {
  34541. _this2.insertChild(merge_default()({ data: item }, defaultProps), undefined, true);
  34542. });
  34543. };
  34544. Node.prototype.collapse = function collapse() {
  34545. this.expanded = false;
  34546. };
  34547. Node.prototype.shouldLoadData = function shouldLoadData() {
  34548. return this.store.lazy === true && this.store.load && !this.loaded;
  34549. };
  34550. Node.prototype.updateLeafState = function updateLeafState() {
  34551. if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
  34552. this.isLeaf = this.isLeafByUser;
  34553. return;
  34554. }
  34555. var childNodes = this.childNodes;
  34556. if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
  34557. this.isLeaf = !childNodes || childNodes.length === 0;
  34558. return;
  34559. }
  34560. this.isLeaf = false;
  34561. };
  34562. Node.prototype.setChecked = function setChecked(value, deep, recursion, passValue) {
  34563. var _this3 = this;
  34564. this.indeterminate = value === 'half';
  34565. this.checked = value === true;
  34566. if (this.store.checkStrictly) return;
  34567. if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
  34568. var _getChildState2 = getChildState(this.childNodes),
  34569. all = _getChildState2.all,
  34570. allWithoutDisable = _getChildState2.allWithoutDisable;
  34571. if (!this.isLeaf && !all && allWithoutDisable) {
  34572. this.checked = false;
  34573. value = false;
  34574. }
  34575. var handleDescendants = function handleDescendants() {
  34576. if (deep) {
  34577. var childNodes = _this3.childNodes;
  34578. for (var i = 0, j = childNodes.length; i < j; i++) {
  34579. var child = childNodes[i];
  34580. passValue = passValue || value !== false;
  34581. var isCheck = child.disabled ? child.checked : passValue;
  34582. child.setChecked(isCheck, deep, true, passValue);
  34583. }
  34584. var _getChildState3 = getChildState(childNodes),
  34585. half = _getChildState3.half,
  34586. _all = _getChildState3.all;
  34587. if (!_all) {
  34588. _this3.checked = _all;
  34589. _this3.indeterminate = half;
  34590. }
  34591. }
  34592. };
  34593. if (this.shouldLoadData()) {
  34594. // Only work on lazy load data.
  34595. this.loadData(function () {
  34596. handleDescendants();
  34597. reInitChecked(_this3);
  34598. }, {
  34599. checked: value !== false
  34600. });
  34601. return;
  34602. } else {
  34603. handleDescendants();
  34604. }
  34605. }
  34606. var parent = this.parent;
  34607. if (!parent || parent.level === 0) return;
  34608. if (!recursion) {
  34609. reInitChecked(parent);
  34610. }
  34611. };
  34612. Node.prototype.getChildren = function getChildren() {
  34613. var forceInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  34614. // this is data
  34615. if (this.level === 0) return this.data;
  34616. var data = this.data;
  34617. if (!data) return null;
  34618. var props = this.store.props;
  34619. var children = 'children';
  34620. if (props) {
  34621. children = props.children || 'children';
  34622. }
  34623. if (data[children] === undefined) {
  34624. data[children] = null;
  34625. }
  34626. if (forceInit && !data[children]) {
  34627. data[children] = [];
  34628. }
  34629. return data[children];
  34630. };
  34631. Node.prototype.updateChildren = function updateChildren() {
  34632. var _this4 = this;
  34633. var newData = this.getChildren() || [];
  34634. var oldData = this.childNodes.map(function (node) {
  34635. return node.data;
  34636. });
  34637. var newDataMap = {};
  34638. var newNodes = [];
  34639. newData.forEach(function (item, index) {
  34640. var key = item[NODE_KEY];
  34641. var isNodeExists = !!key && Object(util_["arrayFindIndex"])(oldData, function (data) {
  34642. return data[NODE_KEY] === key;
  34643. }) >= 0;
  34644. if (isNodeExists) {
  34645. newDataMap[key] = { index: index, data: item };
  34646. } else {
  34647. newNodes.push({ index: index, data: item });
  34648. }
  34649. });
  34650. if (!this.store.lazy) {
  34651. oldData.forEach(function (item) {
  34652. if (!newDataMap[item[NODE_KEY]]) _this4.removeChildByData(item);
  34653. });
  34654. }
  34655. newNodes.forEach(function (_ref) {
  34656. var index = _ref.index,
  34657. data = _ref.data;
  34658. _this4.insertChild({ data: data }, index);
  34659. });
  34660. this.updateLeafState();
  34661. };
  34662. Node.prototype.loadData = function loadData(callback) {
  34663. var _this5 = this;
  34664. var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  34665. if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
  34666. this.loading = true;
  34667. var resolve = function resolve(children) {
  34668. _this5.loaded = true;
  34669. _this5.loading = false;
  34670. _this5.childNodes = [];
  34671. _this5.doCreateChildren(children, defaultProps);
  34672. _this5.updateLeafState();
  34673. if (callback) {
  34674. callback.call(_this5, children);
  34675. }
  34676. };
  34677. this.store.load(this, resolve);
  34678. } else {
  34679. if (callback) {
  34680. callback.call(this);
  34681. }
  34682. }
  34683. };
  34684. _createClass(Node, [{
  34685. key: 'label',
  34686. get: function get() {
  34687. return getPropertyFromData(this, 'label');
  34688. }
  34689. }, {
  34690. key: 'key',
  34691. get: function get() {
  34692. var nodeKey = this.store.key;
  34693. if (this.data) return this.data[nodeKey];
  34694. return null;
  34695. }
  34696. }, {
  34697. key: 'disabled',
  34698. get: function get() {
  34699. return getPropertyFromData(this, 'disabled');
  34700. }
  34701. }, {
  34702. key: 'nextSibling',
  34703. get: function get() {
  34704. var parent = this.parent;
  34705. if (parent) {
  34706. var index = parent.childNodes.indexOf(this);
  34707. if (index > -1) {
  34708. return parent.childNodes[index + 1];
  34709. }
  34710. }
  34711. return null;
  34712. }
  34713. }, {
  34714. key: 'previousSibling',
  34715. get: function get() {
  34716. var parent = this.parent;
  34717. if (parent) {
  34718. var index = parent.childNodes.indexOf(this);
  34719. if (index > -1) {
  34720. return index > 0 ? parent.childNodes[index - 1] : null;
  34721. }
  34722. }
  34723. return null;
  34724. }
  34725. }]);
  34726. return Node;
  34727. }();
  34728. /* harmony default export */ var model_node = (node_Node);
  34729. // CONCATENATED MODULE: ./packages/tree/src/model/tree-store.js
  34730. var tree_store_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  34731. function tree_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  34732. var tree_store_TreeStore = function () {
  34733. function TreeStore(options) {
  34734. var _this = this;
  34735. tree_store_classCallCheck(this, TreeStore);
  34736. this.currentNode = null;
  34737. this.currentNodeKey = null;
  34738. for (var option in options) {
  34739. if (options.hasOwnProperty(option)) {
  34740. this[option] = options[option];
  34741. }
  34742. }
  34743. this.nodesMap = {};
  34744. this.root = new model_node({
  34745. data: this.data,
  34746. store: this
  34747. });
  34748. if (this.lazy && this.load) {
  34749. var loadFn = this.load;
  34750. loadFn(this.root, function (data) {
  34751. _this.root.doCreateChildren(data);
  34752. _this._initDefaultCheckedNodes();
  34753. });
  34754. } else {
  34755. this._initDefaultCheckedNodes();
  34756. }
  34757. }
  34758. TreeStore.prototype.filter = function filter(value) {
  34759. var filterNodeMethod = this.filterNodeMethod;
  34760. var lazy = this.lazy;
  34761. var traverse = function traverse(node) {
  34762. var childNodes = node.root ? node.root.childNodes : node.childNodes;
  34763. childNodes.forEach(function (child) {
  34764. child.visible = filterNodeMethod.call(child, value, child.data, child);
  34765. traverse(child);
  34766. });
  34767. if (!node.visible && childNodes.length) {
  34768. var allHidden = true;
  34769. allHidden = !childNodes.some(function (child) {
  34770. return child.visible;
  34771. });
  34772. if (node.root) {
  34773. node.root.visible = allHidden === false;
  34774. } else {
  34775. node.visible = allHidden === false;
  34776. }
  34777. }
  34778. if (!value) return;
  34779. if (node.visible && !node.isLeaf && !lazy) node.expand();
  34780. };
  34781. traverse(this);
  34782. };
  34783. TreeStore.prototype.setData = function setData(newVal) {
  34784. var instanceChanged = newVal !== this.root.data;
  34785. if (instanceChanged) {
  34786. this.root.setData(newVal);
  34787. this._initDefaultCheckedNodes();
  34788. } else {
  34789. this.root.updateChildren();
  34790. }
  34791. };
  34792. TreeStore.prototype.getNode = function getNode(data) {
  34793. if (data instanceof model_node) return data;
  34794. var key = (typeof data === 'undefined' ? 'undefined' : tree_store_typeof(data)) !== 'object' ? data : util_getNodeKey(this.key, data);
  34795. return this.nodesMap[key] || null;
  34796. };
  34797. TreeStore.prototype.insertBefore = function insertBefore(data, refData) {
  34798. var refNode = this.getNode(refData);
  34799. refNode.parent.insertBefore({ data: data }, refNode);
  34800. };
  34801. TreeStore.prototype.insertAfter = function insertAfter(data, refData) {
  34802. var refNode = this.getNode(refData);
  34803. refNode.parent.insertAfter({ data: data }, refNode);
  34804. };
  34805. TreeStore.prototype.remove = function remove(data) {
  34806. var node = this.getNode(data);
  34807. if (node && node.parent) {
  34808. if (node === this.currentNode) {
  34809. this.currentNode = null;
  34810. }
  34811. node.parent.removeChild(node);
  34812. }
  34813. };
  34814. TreeStore.prototype.append = function append(data, parentData) {
  34815. var parentNode = parentData ? this.getNode(parentData) : this.root;
  34816. if (parentNode) {
  34817. parentNode.insertChild({ data: data });
  34818. }
  34819. };
  34820. TreeStore.prototype._initDefaultCheckedNodes = function _initDefaultCheckedNodes() {
  34821. var _this2 = this;
  34822. var defaultCheckedKeys = this.defaultCheckedKeys || [];
  34823. var nodesMap = this.nodesMap;
  34824. defaultCheckedKeys.forEach(function (checkedKey) {
  34825. var node = nodesMap[checkedKey];
  34826. if (node) {
  34827. node.setChecked(true, !_this2.checkStrictly);
  34828. }
  34829. });
  34830. };
  34831. TreeStore.prototype._initDefaultCheckedNode = function _initDefaultCheckedNode(node) {
  34832. var defaultCheckedKeys = this.defaultCheckedKeys || [];
  34833. if (defaultCheckedKeys.indexOf(node.key) !== -1) {
  34834. node.setChecked(true, !this.checkStrictly);
  34835. }
  34836. };
  34837. TreeStore.prototype.setDefaultCheckedKey = function setDefaultCheckedKey(newVal) {
  34838. if (newVal !== this.defaultCheckedKeys) {
  34839. this.defaultCheckedKeys = newVal;
  34840. this._initDefaultCheckedNodes();
  34841. }
  34842. };
  34843. TreeStore.prototype.registerNode = function registerNode(node) {
  34844. var key = this.key;
  34845. if (!key || !node || !node.data) return;
  34846. var nodeKey = node.key;
  34847. if (nodeKey !== undefined) this.nodesMap[node.key] = node;
  34848. };
  34849. TreeStore.prototype.deregisterNode = function deregisterNode(node) {
  34850. var _this3 = this;
  34851. var key = this.key;
  34852. if (!key || !node || !node.data) return;
  34853. node.childNodes.forEach(function (child) {
  34854. _this3.deregisterNode(child);
  34855. });
  34856. delete this.nodesMap[node.key];
  34857. };
  34858. TreeStore.prototype.getCheckedNodes = function getCheckedNodes() {
  34859. var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  34860. var includeHalfChecked = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  34861. var checkedNodes = [];
  34862. var traverse = function traverse(node) {
  34863. var childNodes = node.root ? node.root.childNodes : node.childNodes;
  34864. childNodes.forEach(function (child) {
  34865. if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) {
  34866. checkedNodes.push(child.data);
  34867. }
  34868. traverse(child);
  34869. });
  34870. };
  34871. traverse(this);
  34872. return checkedNodes;
  34873. };
  34874. TreeStore.prototype.getCheckedKeys = function getCheckedKeys() {
  34875. var _this4 = this;
  34876. var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  34877. return this.getCheckedNodes(leafOnly).map(function (data) {
  34878. return (data || {})[_this4.key];
  34879. });
  34880. };
  34881. TreeStore.prototype.getHalfCheckedNodes = function getHalfCheckedNodes() {
  34882. var nodes = [];
  34883. var traverse = function traverse(node) {
  34884. var childNodes = node.root ? node.root.childNodes : node.childNodes;
  34885. childNodes.forEach(function (child) {
  34886. if (child.indeterminate) {
  34887. nodes.push(child.data);
  34888. }
  34889. traverse(child);
  34890. });
  34891. };
  34892. traverse(this);
  34893. return nodes;
  34894. };
  34895. TreeStore.prototype.getHalfCheckedKeys = function getHalfCheckedKeys() {
  34896. var _this5 = this;
  34897. return this.getHalfCheckedNodes().map(function (data) {
  34898. return (data || {})[_this5.key];
  34899. });
  34900. };
  34901. TreeStore.prototype._getAllNodes = function _getAllNodes() {
  34902. var allNodes = [];
  34903. var nodesMap = this.nodesMap;
  34904. for (var nodeKey in nodesMap) {
  34905. if (nodesMap.hasOwnProperty(nodeKey)) {
  34906. allNodes.push(nodesMap[nodeKey]);
  34907. }
  34908. }
  34909. return allNodes;
  34910. };
  34911. TreeStore.prototype.updateChildren = function updateChildren(key, data) {
  34912. var node = this.nodesMap[key];
  34913. if (!node) return;
  34914. var childNodes = node.childNodes;
  34915. for (var i = childNodes.length - 1; i >= 0; i--) {
  34916. var child = childNodes[i];
  34917. this.remove(child.data);
  34918. }
  34919. for (var _i = 0, j = data.length; _i < j; _i++) {
  34920. var _child = data[_i];
  34921. this.append(_child, node.data);
  34922. }
  34923. };
  34924. TreeStore.prototype._setCheckedKeys = function _setCheckedKeys(key) {
  34925. var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  34926. var checkedKeys = arguments[2];
  34927. var allNodes = this._getAllNodes().sort(function (a, b) {
  34928. return b.level - a.level;
  34929. });
  34930. var cache = Object.create(null);
  34931. var keys = Object.keys(checkedKeys);
  34932. allNodes.forEach(function (node) {
  34933. return node.setChecked(false, false);
  34934. });
  34935. for (var i = 0, j = allNodes.length; i < j; i++) {
  34936. var node = allNodes[i];
  34937. var nodeKey = node.data[key].toString();
  34938. var checked = keys.indexOf(nodeKey) > -1;
  34939. if (!checked) {
  34940. if (node.checked && !cache[nodeKey]) {
  34941. node.setChecked(false, false);
  34942. }
  34943. continue;
  34944. }
  34945. var parent = node.parent;
  34946. while (parent && parent.level > 0) {
  34947. cache[parent.data[key]] = true;
  34948. parent = parent.parent;
  34949. }
  34950. if (node.isLeaf || this.checkStrictly) {
  34951. node.setChecked(true, false);
  34952. continue;
  34953. }
  34954. node.setChecked(true, true);
  34955. if (leafOnly) {
  34956. (function () {
  34957. node.setChecked(false, false);
  34958. var traverse = function traverse(node) {
  34959. var childNodes = node.childNodes;
  34960. childNodes.forEach(function (child) {
  34961. if (!child.isLeaf) {
  34962. child.setChecked(false, false);
  34963. }
  34964. traverse(child);
  34965. });
  34966. };
  34967. traverse(node);
  34968. })();
  34969. }
  34970. }
  34971. };
  34972. TreeStore.prototype.setCheckedNodes = function setCheckedNodes(array) {
  34973. var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  34974. var key = this.key;
  34975. var checkedKeys = {};
  34976. array.forEach(function (item) {
  34977. checkedKeys[(item || {})[key]] = true;
  34978. });
  34979. this._setCheckedKeys(key, leafOnly, checkedKeys);
  34980. };
  34981. TreeStore.prototype.setCheckedKeys = function setCheckedKeys(keys) {
  34982. var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  34983. this.defaultCheckedKeys = keys;
  34984. var key = this.key;
  34985. var checkedKeys = {};
  34986. keys.forEach(function (key) {
  34987. checkedKeys[key] = true;
  34988. });
  34989. this._setCheckedKeys(key, leafOnly, checkedKeys);
  34990. };
  34991. TreeStore.prototype.setDefaultExpandedKeys = function setDefaultExpandedKeys(keys) {
  34992. var _this6 = this;
  34993. keys = keys || [];
  34994. this.defaultExpandedKeys = keys;
  34995. keys.forEach(function (key) {
  34996. var node = _this6.getNode(key);
  34997. if (node) node.expand(null, _this6.autoExpandParent);
  34998. });
  34999. };
  35000. TreeStore.prototype.setChecked = function setChecked(data, checked, deep) {
  35001. var node = this.getNode(data);
  35002. if (node) {
  35003. node.setChecked(!!checked, deep);
  35004. }
  35005. };
  35006. TreeStore.prototype.getCurrentNode = function getCurrentNode() {
  35007. return this.currentNode;
  35008. };
  35009. TreeStore.prototype.setCurrentNode = function setCurrentNode(currentNode) {
  35010. var prevCurrentNode = this.currentNode;
  35011. if (prevCurrentNode) {
  35012. prevCurrentNode.isCurrent = false;
  35013. }
  35014. this.currentNode = currentNode;
  35015. this.currentNode.isCurrent = true;
  35016. };
  35017. TreeStore.prototype.setUserCurrentNode = function setUserCurrentNode(node) {
  35018. var key = node[this.key];
  35019. var currNode = this.nodesMap[key];
  35020. this.setCurrentNode(currNode);
  35021. };
  35022. TreeStore.prototype.setCurrentNodeKey = function setCurrentNodeKey(key) {
  35023. if (key === null || key === undefined) {
  35024. this.currentNode && (this.currentNode.isCurrent = false);
  35025. this.currentNode = null;
  35026. return;
  35027. }
  35028. var node = this.getNode(key);
  35029. if (node) {
  35030. this.setCurrentNode(node);
  35031. }
  35032. };
  35033. return TreeStore;
  35034. }();
  35035. /* harmony default export */ var tree_store = (tree_store_TreeStore);
  35036. ;
  35037. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=template&id=3ba3ef0e&
  35038. var tree_nodevue_type_template_id_3ba3ef0e_render = function() {
  35039. var this$1 = this
  35040. var _vm = this
  35041. var _h = _vm.$createElement
  35042. var _c = _vm._self._c || _h
  35043. return _c(
  35044. "div",
  35045. {
  35046. directives: [
  35047. {
  35048. name: "show",
  35049. rawName: "v-show",
  35050. value: _vm.node.visible,
  35051. expression: "node.visible"
  35052. }
  35053. ],
  35054. ref: "node",
  35055. staticClass: "el-tree-node",
  35056. class: {
  35057. "is-expanded": _vm.expanded,
  35058. "is-current": _vm.node.isCurrent,
  35059. "is-hidden": !_vm.node.visible,
  35060. "is-focusable": !_vm.node.disabled,
  35061. "is-checked": !_vm.node.disabled && _vm.node.checked
  35062. },
  35063. attrs: {
  35064. role: "treeitem",
  35065. tabindex: "-1",
  35066. "aria-expanded": _vm.expanded,
  35067. "aria-disabled": _vm.node.disabled,
  35068. "aria-checked": _vm.node.checked,
  35069. draggable: _vm.tree.draggable
  35070. },
  35071. on: {
  35072. click: function($event) {
  35073. $event.stopPropagation()
  35074. return _vm.handleClick($event)
  35075. },
  35076. contextmenu: function($event) {
  35077. return this$1.handleContextMenu($event)
  35078. },
  35079. dragstart: function($event) {
  35080. $event.stopPropagation()
  35081. return _vm.handleDragStart($event)
  35082. },
  35083. dragover: function($event) {
  35084. $event.stopPropagation()
  35085. return _vm.handleDragOver($event)
  35086. },
  35087. dragend: function($event) {
  35088. $event.stopPropagation()
  35089. return _vm.handleDragEnd($event)
  35090. },
  35091. drop: function($event) {
  35092. $event.stopPropagation()
  35093. return _vm.handleDrop($event)
  35094. }
  35095. }
  35096. },
  35097. [
  35098. _c(
  35099. "div",
  35100. {
  35101. staticClass: "el-tree-node__content",
  35102. style: {
  35103. "padding-left": (_vm.node.level - 1) * _vm.tree.indent + "px"
  35104. }
  35105. },
  35106. [
  35107. _c("span", {
  35108. class: [
  35109. {
  35110. "is-leaf": _vm.node.isLeaf,
  35111. expanded: !_vm.node.isLeaf && _vm.expanded
  35112. },
  35113. "el-tree-node__expand-icon",
  35114. _vm.tree.iconClass ? _vm.tree.iconClass : "el-icon-caret-right"
  35115. ],
  35116. on: {
  35117. click: function($event) {
  35118. $event.stopPropagation()
  35119. return _vm.handleExpandIconClick($event)
  35120. }
  35121. }
  35122. }),
  35123. _vm.showCheckbox
  35124. ? _c("el-checkbox", {
  35125. attrs: {
  35126. indeterminate: _vm.node.indeterminate,
  35127. disabled: !!_vm.node.disabled
  35128. },
  35129. on: { change: _vm.handleCheckChange },
  35130. nativeOn: {
  35131. click: function($event) {
  35132. $event.stopPropagation()
  35133. }
  35134. },
  35135. model: {
  35136. value: _vm.node.checked,
  35137. callback: function($$v) {
  35138. _vm.$set(_vm.node, "checked", $$v)
  35139. },
  35140. expression: "node.checked"
  35141. }
  35142. })
  35143. : _vm._e(),
  35144. _vm.node.loading
  35145. ? _c("span", {
  35146. staticClass: "el-tree-node__loading-icon el-icon-loading"
  35147. })
  35148. : _vm._e(),
  35149. _c("node-content", { attrs: { node: _vm.node } })
  35150. ],
  35151. 1
  35152. ),
  35153. _c("el-collapse-transition", [
  35154. !_vm.renderAfterExpand || _vm.childNodeRendered
  35155. ? _c(
  35156. "div",
  35157. {
  35158. directives: [
  35159. {
  35160. name: "show",
  35161. rawName: "v-show",
  35162. value: _vm.expanded,
  35163. expression: "expanded"
  35164. }
  35165. ],
  35166. staticClass: "el-tree-node__children",
  35167. attrs: { role: "group", "aria-expanded": _vm.expanded }
  35168. },
  35169. _vm._l(_vm.node.childNodes, function(child) {
  35170. return _c("el-tree-node", {
  35171. key: _vm.getNodeKey(child),
  35172. attrs: {
  35173. "render-content": _vm.renderContent,
  35174. "render-after-expand": _vm.renderAfterExpand,
  35175. "show-checkbox": _vm.showCheckbox,
  35176. node: child
  35177. },
  35178. on: { "node-expand": _vm.handleChildNodeExpand }
  35179. })
  35180. }),
  35181. 1
  35182. )
  35183. : _vm._e()
  35184. ])
  35185. ],
  35186. 1
  35187. )
  35188. }
  35189. var tree_nodevue_type_template_id_3ba3ef0e_staticRenderFns = []
  35190. tree_nodevue_type_template_id_3ba3ef0e_render._withStripped = true
  35191. // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=template&id=3ba3ef0e&
  35192. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=script&lang=js&
  35193. //
  35194. //
  35195. //
  35196. //
  35197. //
  35198. //
  35199. //
  35200. //
  35201. //
  35202. //
  35203. //
  35204. //
  35205. //
  35206. //
  35207. //
  35208. //
  35209. //
  35210. //
  35211. //
  35212. //
  35213. //
  35214. //
  35215. //
  35216. //
  35217. //
  35218. //
  35219. //
  35220. //
  35221. //
  35222. //
  35223. //
  35224. //
  35225. //
  35226. //
  35227. //
  35228. //
  35229. //
  35230. //
  35231. //
  35232. //
  35233. //
  35234. //
  35235. //
  35236. //
  35237. //
  35238. //
  35239. //
  35240. //
  35241. //
  35242. //
  35243. //
  35244. //
  35245. //
  35246. //
  35247. //
  35248. //
  35249. //
  35250. //
  35251. //
  35252. //
  35253. //
  35254. //
  35255. //
  35256. //
  35257. //
  35258. //
  35259. //
  35260. //
  35261. //
  35262. //
  35263. //
  35264. //
  35265. //
  35266. /* harmony default export */ var tree_nodevue_type_script_lang_js_ = ({
  35267. name: 'ElTreeNode',
  35268. componentName: 'ElTreeNode',
  35269. mixins: [emitter_default.a],
  35270. props: {
  35271. node: {
  35272. default: function _default() {
  35273. return {};
  35274. }
  35275. },
  35276. props: {},
  35277. renderContent: Function,
  35278. renderAfterExpand: {
  35279. type: Boolean,
  35280. default: true
  35281. },
  35282. showCheckbox: {
  35283. type: Boolean,
  35284. default: false
  35285. }
  35286. },
  35287. components: {
  35288. ElCollapseTransition: collapse_transition_default.a,
  35289. ElCheckbox: checkbox_default.a,
  35290. NodeContent: {
  35291. props: {
  35292. node: {
  35293. required: true
  35294. }
  35295. },
  35296. render: function render(h) {
  35297. var parent = this.$parent;
  35298. var tree = parent.tree;
  35299. var node = this.node;
  35300. var data = node.data,
  35301. store = node.store;
  35302. return parent.renderContent ? parent.renderContent.call(parent._renderProxy, h, { _self: tree.$vnode.context, node: node, data: data, store: store }) : tree.$scopedSlots.default ? tree.$scopedSlots.default({ node: node, data: data }) : h(
  35303. 'span',
  35304. { 'class': 'el-tree-node__label' },
  35305. [node.label]
  35306. );
  35307. }
  35308. }
  35309. },
  35310. data: function data() {
  35311. return {
  35312. tree: null,
  35313. expanded: false,
  35314. childNodeRendered: false,
  35315. oldChecked: null,
  35316. oldIndeterminate: null
  35317. };
  35318. },
  35319. watch: {
  35320. 'node.indeterminate': function nodeIndeterminate(val) {
  35321. this.handleSelectChange(this.node.checked, val);
  35322. },
  35323. 'node.checked': function nodeChecked(val) {
  35324. this.handleSelectChange(val, this.node.indeterminate);
  35325. },
  35326. 'node.expanded': function nodeExpanded(val) {
  35327. var _this = this;
  35328. this.$nextTick(function () {
  35329. return _this.expanded = val;
  35330. });
  35331. if (val) {
  35332. this.childNodeRendered = true;
  35333. }
  35334. }
  35335. },
  35336. methods: {
  35337. getNodeKey: function getNodeKey(node) {
  35338. return util_getNodeKey(this.tree.nodeKey, node.data);
  35339. },
  35340. handleSelectChange: function handleSelectChange(checked, indeterminate) {
  35341. if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
  35342. this.tree.$emit('check-change', this.node.data, checked, indeterminate);
  35343. }
  35344. this.oldChecked = checked;
  35345. this.indeterminate = indeterminate;
  35346. },
  35347. handleClick: function handleClick() {
  35348. var store = this.tree.store;
  35349. store.setCurrentNode(this.node);
  35350. this.tree.$emit('current-change', store.currentNode ? store.currentNode.data : null, store.currentNode);
  35351. this.tree.currentNode = this;
  35352. if (this.tree.expandOnClickNode) {
  35353. this.handleExpandIconClick();
  35354. }
  35355. if (this.tree.checkOnClickNode && !this.node.disabled) {
  35356. this.handleCheckChange(null, {
  35357. target: { checked: !this.node.checked }
  35358. });
  35359. }
  35360. this.tree.$emit('node-click', this.node.data, this.node, this);
  35361. },
  35362. handleContextMenu: function handleContextMenu(event) {
  35363. if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) {
  35364. event.stopPropagation();
  35365. event.preventDefault();
  35366. }
  35367. this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this);
  35368. },
  35369. handleExpandIconClick: function handleExpandIconClick() {
  35370. if (this.node.isLeaf) return;
  35371. if (this.expanded) {
  35372. this.tree.$emit('node-collapse', this.node.data, this.node, this);
  35373. this.node.collapse();
  35374. } else {
  35375. this.node.expand();
  35376. this.$emit('node-expand', this.node.data, this.node, this);
  35377. }
  35378. },
  35379. handleCheckChange: function handleCheckChange(value, ev) {
  35380. var _this2 = this;
  35381. this.node.setChecked(ev.target.checked, !this.tree.checkStrictly);
  35382. this.$nextTick(function () {
  35383. var store = _this2.tree.store;
  35384. _this2.tree.$emit('check', _this2.node.data, {
  35385. checkedNodes: store.getCheckedNodes(),
  35386. checkedKeys: store.getCheckedKeys(),
  35387. halfCheckedNodes: store.getHalfCheckedNodes(),
  35388. halfCheckedKeys: store.getHalfCheckedKeys()
  35389. });
  35390. });
  35391. },
  35392. handleChildNodeExpand: function handleChildNodeExpand(nodeData, node, instance) {
  35393. this.broadcast('ElTreeNode', 'tree-node-expand', node);
  35394. this.tree.$emit('node-expand', nodeData, node, instance);
  35395. },
  35396. handleDragStart: function handleDragStart(event) {
  35397. if (!this.tree.draggable) return;
  35398. this.tree.$emit('tree-node-drag-start', event, this);
  35399. },
  35400. handleDragOver: function handleDragOver(event) {
  35401. if (!this.tree.draggable) return;
  35402. this.tree.$emit('tree-node-drag-over', event, this);
  35403. event.preventDefault();
  35404. },
  35405. handleDrop: function handleDrop(event) {
  35406. event.preventDefault();
  35407. },
  35408. handleDragEnd: function handleDragEnd(event) {
  35409. if (!this.tree.draggable) return;
  35410. this.tree.$emit('tree-node-drag-end', event, this);
  35411. }
  35412. },
  35413. created: function created() {
  35414. var _this3 = this;
  35415. var parent = this.$parent;
  35416. if (parent.isTree) {
  35417. this.tree = parent;
  35418. } else {
  35419. this.tree = parent.tree;
  35420. }
  35421. var tree = this.tree;
  35422. if (!tree) {
  35423. console.warn('Can not find node\'s tree.');
  35424. }
  35425. var props = tree.props || {};
  35426. var childrenKey = props['children'] || 'children';
  35427. this.$watch('node.data.' + childrenKey, function () {
  35428. _this3.node.updateChildren();
  35429. });
  35430. if (this.node.expanded) {
  35431. this.expanded = true;
  35432. this.childNodeRendered = true;
  35433. }
  35434. if (this.tree.accordion) {
  35435. this.$on('tree-node-expand', function (node) {
  35436. if (_this3.node !== node) {
  35437. _this3.node.collapse();
  35438. }
  35439. });
  35440. }
  35441. }
  35442. });
  35443. // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=script&lang=js&
  35444. /* harmony default export */ var src_tree_nodevue_type_script_lang_js_ = (tree_nodevue_type_script_lang_js_);
  35445. // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue
  35446. /* normalize component */
  35447. var tree_node_component = normalizeComponent(
  35448. src_tree_nodevue_type_script_lang_js_,
  35449. tree_nodevue_type_template_id_3ba3ef0e_render,
  35450. tree_nodevue_type_template_id_3ba3ef0e_staticRenderFns,
  35451. false,
  35452. null,
  35453. null,
  35454. null
  35455. )
  35456. /* hot reload */
  35457. if (false) { var tree_node_api; }
  35458. tree_node_component.options.__file = "packages/tree/src/tree-node.vue"
  35459. /* harmony default export */ var tree_node = (tree_node_component.exports);
  35460. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=script&lang=js&
  35461. //
  35462. //
  35463. //
  35464. //
  35465. //
  35466. //
  35467. //
  35468. //
  35469. //
  35470. //
  35471. //
  35472. //
  35473. //
  35474. //
  35475. //
  35476. //
  35477. //
  35478. //
  35479. //
  35480. //
  35481. //
  35482. //
  35483. //
  35484. //
  35485. //
  35486. //
  35487. //
  35488. //
  35489. //
  35490. //
  35491. //
  35492. //
  35493. /* harmony default export */ var treevue_type_script_lang_js_ = ({
  35494. name: 'ElTree',
  35495. mixins: [emitter_default.a],
  35496. components: {
  35497. ElTreeNode: tree_node
  35498. },
  35499. data: function data() {
  35500. return {
  35501. store: null,
  35502. root: null,
  35503. currentNode: null,
  35504. treeItems: null,
  35505. checkboxItems: [],
  35506. dragState: {
  35507. showDropIndicator: false,
  35508. draggingNode: null,
  35509. dropNode: null,
  35510. allowDrop: true
  35511. }
  35512. };
  35513. },
  35514. props: {
  35515. data: {
  35516. type: Array
  35517. },
  35518. emptyText: {
  35519. type: String,
  35520. default: function _default() {
  35521. return Object(lib_locale_["t"])('el.tree.emptyText');
  35522. }
  35523. },
  35524. renderAfterExpand: {
  35525. type: Boolean,
  35526. default: true
  35527. },
  35528. nodeKey: String,
  35529. checkStrictly: Boolean,
  35530. defaultExpandAll: Boolean,
  35531. expandOnClickNode: {
  35532. type: Boolean,
  35533. default: true
  35534. },
  35535. checkOnClickNode: Boolean,
  35536. checkDescendants: {
  35537. type: Boolean,
  35538. default: false
  35539. },
  35540. autoExpandParent: {
  35541. type: Boolean,
  35542. default: true
  35543. },
  35544. defaultCheckedKeys: Array,
  35545. defaultExpandedKeys: Array,
  35546. currentNodeKey: [String, Number],
  35547. renderContent: Function,
  35548. showCheckbox: {
  35549. type: Boolean,
  35550. default: false
  35551. },
  35552. draggable: {
  35553. type: Boolean,
  35554. default: false
  35555. },
  35556. allowDrag: Function,
  35557. allowDrop: Function,
  35558. props: {
  35559. default: function _default() {
  35560. return {
  35561. children: 'children',
  35562. label: 'label',
  35563. disabled: 'disabled'
  35564. };
  35565. }
  35566. },
  35567. lazy: {
  35568. type: Boolean,
  35569. default: false
  35570. },
  35571. highlightCurrent: Boolean,
  35572. load: Function,
  35573. filterNodeMethod: Function,
  35574. accordion: Boolean,
  35575. indent: {
  35576. type: Number,
  35577. default: 18
  35578. },
  35579. iconClass: String
  35580. },
  35581. computed: {
  35582. children: {
  35583. set: function set(value) {
  35584. this.data = value;
  35585. },
  35586. get: function get() {
  35587. return this.data;
  35588. }
  35589. },
  35590. treeItemArray: function treeItemArray() {
  35591. return Array.prototype.slice.call(this.treeItems);
  35592. },
  35593. isEmpty: function isEmpty() {
  35594. var childNodes = this.root.childNodes;
  35595. return !childNodes || childNodes.length === 0 || childNodes.every(function (_ref) {
  35596. var visible = _ref.visible;
  35597. return !visible;
  35598. });
  35599. }
  35600. },
  35601. watch: {
  35602. defaultCheckedKeys: function defaultCheckedKeys(newVal) {
  35603. this.store.setDefaultCheckedKey(newVal);
  35604. },
  35605. defaultExpandedKeys: function defaultExpandedKeys(newVal) {
  35606. this.store.defaultExpandedKeys = newVal;
  35607. this.store.setDefaultExpandedKeys(newVal);
  35608. },
  35609. data: function data(newVal) {
  35610. this.store.setData(newVal);
  35611. },
  35612. checkboxItems: function checkboxItems(val) {
  35613. Array.prototype.forEach.call(val, function (checkbox) {
  35614. checkbox.setAttribute('tabindex', -1);
  35615. });
  35616. },
  35617. checkStrictly: function checkStrictly(newVal) {
  35618. this.store.checkStrictly = newVal;
  35619. }
  35620. },
  35621. methods: {
  35622. filter: function filter(value) {
  35623. if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
  35624. this.store.filter(value);
  35625. },
  35626. getNodeKey: function getNodeKey(node) {
  35627. return util_getNodeKey(this.nodeKey, node.data);
  35628. },
  35629. getNodePath: function getNodePath(data) {
  35630. if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath');
  35631. var node = this.store.getNode(data);
  35632. if (!node) return [];
  35633. var path = [node.data];
  35634. var parent = node.parent;
  35635. while (parent && parent !== this.root) {
  35636. path.push(parent.data);
  35637. parent = parent.parent;
  35638. }
  35639. return path.reverse();
  35640. },
  35641. getCheckedNodes: function getCheckedNodes(leafOnly, includeHalfChecked) {
  35642. return this.store.getCheckedNodes(leafOnly, includeHalfChecked);
  35643. },
  35644. getCheckedKeys: function getCheckedKeys(leafOnly) {
  35645. return this.store.getCheckedKeys(leafOnly);
  35646. },
  35647. getCurrentNode: function getCurrentNode() {
  35648. var currentNode = this.store.getCurrentNode();
  35649. return currentNode ? currentNode.data : null;
  35650. },
  35651. getCurrentKey: function getCurrentKey() {
  35652. if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey');
  35653. var currentNode = this.getCurrentNode();
  35654. return currentNode ? currentNode[this.nodeKey] : null;
  35655. },
  35656. setCheckedNodes: function setCheckedNodes(nodes, leafOnly) {
  35657. if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
  35658. this.store.setCheckedNodes(nodes, leafOnly);
  35659. },
  35660. setCheckedKeys: function setCheckedKeys(keys, leafOnly) {
  35661. if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys');
  35662. this.store.setCheckedKeys(keys, leafOnly);
  35663. },
  35664. setChecked: function setChecked(data, checked, deep) {
  35665. this.store.setChecked(data, checked, deep);
  35666. },
  35667. getHalfCheckedNodes: function getHalfCheckedNodes() {
  35668. return this.store.getHalfCheckedNodes();
  35669. },
  35670. getHalfCheckedKeys: function getHalfCheckedKeys() {
  35671. return this.store.getHalfCheckedKeys();
  35672. },
  35673. setCurrentNode: function setCurrentNode(node) {
  35674. if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode');
  35675. this.store.setUserCurrentNode(node);
  35676. },
  35677. setCurrentKey: function setCurrentKey(key) {
  35678. if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey');
  35679. this.store.setCurrentNodeKey(key);
  35680. },
  35681. getNode: function getNode(data) {
  35682. return this.store.getNode(data);
  35683. },
  35684. remove: function remove(data) {
  35685. this.store.remove(data);
  35686. },
  35687. append: function append(data, parentNode) {
  35688. this.store.append(data, parentNode);
  35689. },
  35690. insertBefore: function insertBefore(data, refNode) {
  35691. this.store.insertBefore(data, refNode);
  35692. },
  35693. insertAfter: function insertAfter(data, refNode) {
  35694. this.store.insertAfter(data, refNode);
  35695. },
  35696. handleNodeExpand: function handleNodeExpand(nodeData, node, instance) {
  35697. this.broadcast('ElTreeNode', 'tree-node-expand', node);
  35698. this.$emit('node-expand', nodeData, node, instance);
  35699. },
  35700. updateKeyChildren: function updateKeyChildren(key, data) {
  35701. if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild');
  35702. this.store.updateChildren(key, data);
  35703. },
  35704. initTabIndex: function initTabIndex() {
  35705. this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]');
  35706. this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]');
  35707. var checkedItem = this.$el.querySelectorAll('.is-checked[role=treeitem]');
  35708. if (checkedItem.length) {
  35709. checkedItem[0].setAttribute('tabindex', 0);
  35710. return;
  35711. }
  35712. this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0);
  35713. },
  35714. handleKeydown: function handleKeydown(ev) {
  35715. var currentItem = ev.target;
  35716. if (currentItem.className.indexOf('el-tree-node') === -1) return;
  35717. var keyCode = ev.keyCode;
  35718. this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]');
  35719. var currentIndex = this.treeItemArray.indexOf(currentItem);
  35720. var nextIndex = void 0;
  35721. if ([38, 40].indexOf(keyCode) > -1) {
  35722. // up、down
  35723. ev.preventDefault();
  35724. if (keyCode === 38) {
  35725. // up
  35726. nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0;
  35727. } else {
  35728. nextIndex = currentIndex < this.treeItemArray.length - 1 ? currentIndex + 1 : 0;
  35729. }
  35730. this.treeItemArray[nextIndex].focus(); // 选中
  35731. }
  35732. if ([37, 39].indexOf(keyCode) > -1) {
  35733. // left、right 展开
  35734. ev.preventDefault();
  35735. currentItem.click(); // 选中
  35736. }
  35737. var hasInput = currentItem.querySelector('[type="checkbox"]');
  35738. if ([13, 32].indexOf(keyCode) > -1 && hasInput) {
  35739. // space enter选中checkbox
  35740. ev.preventDefault();
  35741. hasInput.click();
  35742. }
  35743. }
  35744. },
  35745. created: function created() {
  35746. var _this = this;
  35747. this.isTree = true;
  35748. this.store = new tree_store({
  35749. key: this.nodeKey,
  35750. data: this.data,
  35751. lazy: this.lazy,
  35752. props: this.props,
  35753. load: this.load,
  35754. currentNodeKey: this.currentNodeKey,
  35755. checkStrictly: this.checkStrictly,
  35756. checkDescendants: this.checkDescendants,
  35757. defaultCheckedKeys: this.defaultCheckedKeys,
  35758. defaultExpandedKeys: this.defaultExpandedKeys,
  35759. autoExpandParent: this.autoExpandParent,
  35760. defaultExpandAll: this.defaultExpandAll,
  35761. filterNodeMethod: this.filterNodeMethod
  35762. });
  35763. this.root = this.store.root;
  35764. var dragState = this.dragState;
  35765. this.$on('tree-node-drag-start', function (event, treeNode) {
  35766. if (typeof _this.allowDrag === 'function' && !_this.allowDrag(treeNode.node)) {
  35767. event.preventDefault();
  35768. return false;
  35769. }
  35770. event.dataTransfer.effectAllowed = 'move';
  35771. // wrap in try catch to address IE's error when first param is 'text/plain'
  35772. try {
  35773. // setData is required for draggable to work in FireFox
  35774. // the content has to be '' so dragging a node out of the tree won't open a new tab in FireFox
  35775. event.dataTransfer.setData('text/plain', '');
  35776. } catch (e) {}
  35777. dragState.draggingNode = treeNode;
  35778. _this.$emit('node-drag-start', treeNode.node, event);
  35779. });
  35780. this.$on('tree-node-drag-over', function (event, treeNode) {
  35781. var dropNode = findNearestComponent(event.target, 'ElTreeNode');
  35782. var oldDropNode = dragState.dropNode;
  35783. if (oldDropNode && oldDropNode !== dropNode) {
  35784. Object(dom_["removeClass"])(oldDropNode.$el, 'is-drop-inner');
  35785. }
  35786. var draggingNode = dragState.draggingNode;
  35787. if (!draggingNode || !dropNode) return;
  35788. var dropPrev = true;
  35789. var dropInner = true;
  35790. var dropNext = true;
  35791. var userAllowDropInner = true;
  35792. if (typeof _this.allowDrop === 'function') {
  35793. dropPrev = _this.allowDrop(draggingNode.node, dropNode.node, 'prev');
  35794. userAllowDropInner = dropInner = _this.allowDrop(draggingNode.node, dropNode.node, 'inner');
  35795. dropNext = _this.allowDrop(draggingNode.node, dropNode.node, 'next');
  35796. }
  35797. event.dataTransfer.dropEffect = dropInner ? 'move' : 'none';
  35798. if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) {
  35799. if (oldDropNode) {
  35800. _this.$emit('node-drag-leave', draggingNode.node, oldDropNode.node, event);
  35801. }
  35802. _this.$emit('node-drag-enter', draggingNode.node, dropNode.node, event);
  35803. }
  35804. if (dropPrev || dropInner || dropNext) {
  35805. dragState.dropNode = dropNode;
  35806. }
  35807. if (dropNode.node.nextSibling === draggingNode.node) {
  35808. dropNext = false;
  35809. }
  35810. if (dropNode.node.previousSibling === draggingNode.node) {
  35811. dropPrev = false;
  35812. }
  35813. if (dropNode.node.contains(draggingNode.node, false)) {
  35814. dropInner = false;
  35815. }
  35816. if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
  35817. dropPrev = false;
  35818. dropInner = false;
  35819. dropNext = false;
  35820. }
  35821. var targetPosition = dropNode.$el.getBoundingClientRect();
  35822. var treePosition = _this.$el.getBoundingClientRect();
  35823. var dropType = void 0;
  35824. var prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1;
  35825. var nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1;
  35826. var indicatorTop = -9999;
  35827. var distance = event.clientY - targetPosition.top;
  35828. if (distance < targetPosition.height * prevPercent) {
  35829. dropType = 'before';
  35830. } else if (distance > targetPosition.height * nextPercent) {
  35831. dropType = 'after';
  35832. } else if (dropInner) {
  35833. dropType = 'inner';
  35834. } else {
  35835. dropType = 'none';
  35836. }
  35837. var iconPosition = dropNode.$el.querySelector('.el-tree-node__expand-icon').getBoundingClientRect();
  35838. var dropIndicator = _this.$refs.dropIndicator;
  35839. if (dropType === 'before') {
  35840. indicatorTop = iconPosition.top - treePosition.top;
  35841. } else if (dropType === 'after') {
  35842. indicatorTop = iconPosition.bottom - treePosition.top;
  35843. }
  35844. dropIndicator.style.top = indicatorTop + 'px';
  35845. dropIndicator.style.left = iconPosition.right - treePosition.left + 'px';
  35846. if (dropType === 'inner') {
  35847. Object(dom_["addClass"])(dropNode.$el, 'is-drop-inner');
  35848. } else {
  35849. Object(dom_["removeClass"])(dropNode.$el, 'is-drop-inner');
  35850. }
  35851. dragState.showDropIndicator = dropType === 'before' || dropType === 'after';
  35852. dragState.allowDrop = dragState.showDropIndicator || userAllowDropInner;
  35853. dragState.dropType = dropType;
  35854. _this.$emit('node-drag-over', draggingNode.node, dropNode.node, event);
  35855. });
  35856. this.$on('tree-node-drag-end', function (event) {
  35857. var draggingNode = dragState.draggingNode,
  35858. dropType = dragState.dropType,
  35859. dropNode = dragState.dropNode;
  35860. event.preventDefault();
  35861. event.dataTransfer.dropEffect = 'move';
  35862. if (draggingNode && dropNode) {
  35863. var draggingNodeCopy = { data: draggingNode.node.data };
  35864. if (dropType !== 'none') {
  35865. draggingNode.node.remove();
  35866. }
  35867. if (dropType === 'before') {
  35868. dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node);
  35869. } else if (dropType === 'after') {
  35870. dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node);
  35871. } else if (dropType === 'inner') {
  35872. dropNode.node.insertChild(draggingNodeCopy);
  35873. }
  35874. if (dropType !== 'none') {
  35875. _this.store.registerNode(draggingNodeCopy);
  35876. }
  35877. Object(dom_["removeClass"])(dropNode.$el, 'is-drop-inner');
  35878. _this.$emit('node-drag-end', draggingNode.node, dropNode.node, dropType, event);
  35879. if (dropType !== 'none') {
  35880. _this.$emit('node-drop', draggingNode.node, dropNode.node, dropType, event);
  35881. }
  35882. }
  35883. if (draggingNode && !dropNode) {
  35884. _this.$emit('node-drag-end', draggingNode.node, null, dropType, event);
  35885. }
  35886. dragState.showDropIndicator = false;
  35887. dragState.draggingNode = null;
  35888. dragState.dropNode = null;
  35889. dragState.allowDrop = true;
  35890. });
  35891. },
  35892. mounted: function mounted() {
  35893. this.initTabIndex();
  35894. this.$el.addEventListener('keydown', this.handleKeydown);
  35895. },
  35896. updated: function updated() {
  35897. this.treeItems = this.$el.querySelectorAll('[role=treeitem]');
  35898. this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]');
  35899. }
  35900. });
  35901. // CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=script&lang=js&
  35902. /* harmony default export */ var src_treevue_type_script_lang_js_ = (treevue_type_script_lang_js_);
  35903. // CONCATENATED MODULE: ./packages/tree/src/tree.vue
  35904. /* normalize component */
  35905. var tree_component = normalizeComponent(
  35906. src_treevue_type_script_lang_js_,
  35907. treevue_type_template_id_547575a6_render,
  35908. treevue_type_template_id_547575a6_staticRenderFns,
  35909. false,
  35910. null,
  35911. null,
  35912. null
  35913. )
  35914. /* hot reload */
  35915. if (false) { var tree_api; }
  35916. tree_component.options.__file = "packages/tree/src/tree.vue"
  35917. /* harmony default export */ var src_tree = (tree_component.exports);
  35918. // CONCATENATED MODULE: ./packages/tree/index.js
  35919. /* istanbul ignore next */
  35920. src_tree.install = function (Vue) {
  35921. Vue.component(src_tree.name, src_tree);
  35922. };
  35923. /* harmony default export */ var packages_tree = (src_tree);
  35924. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=template&id=6e53341b&
  35925. var mainvue_type_template_id_6e53341b_render = function() {
  35926. var _vm = this
  35927. var _h = _vm.$createElement
  35928. var _c = _vm._self._c || _h
  35929. return _c("transition", { attrs: { name: "el-alert-fade" } }, [
  35930. _c(
  35931. "div",
  35932. {
  35933. directives: [
  35934. {
  35935. name: "show",
  35936. rawName: "v-show",
  35937. value: _vm.visible,
  35938. expression: "visible"
  35939. }
  35940. ],
  35941. staticClass: "el-alert",
  35942. class: [
  35943. _vm.typeClass,
  35944. _vm.center ? "is-center" : "",
  35945. "is-" + _vm.effect
  35946. ],
  35947. attrs: { role: "alert" }
  35948. },
  35949. [
  35950. _vm.showIcon
  35951. ? _c("i", {
  35952. staticClass: "el-alert__icon",
  35953. class: [_vm.iconClass, _vm.isBigIcon]
  35954. })
  35955. : _vm._e(),
  35956. _c("div", { staticClass: "el-alert__content" }, [
  35957. _vm.title || _vm.$slots.title
  35958. ? _c(
  35959. "span",
  35960. { staticClass: "el-alert__title", class: [_vm.isBoldTitle] },
  35961. [_vm._t("title", [_vm._v(_vm._s(_vm.title))])],
  35962. 2
  35963. )
  35964. : _vm._e(),
  35965. _vm.$slots.default && !_vm.description
  35966. ? _c(
  35967. "p",
  35968. { staticClass: "el-alert__description" },
  35969. [_vm._t("default")],
  35970. 2
  35971. )
  35972. : _vm._e(),
  35973. _vm.description && !_vm.$slots.default
  35974. ? _c("p", { staticClass: "el-alert__description" }, [
  35975. _vm._v(_vm._s(_vm.description))
  35976. ])
  35977. : _vm._e(),
  35978. _c(
  35979. "i",
  35980. {
  35981. directives: [
  35982. {
  35983. name: "show",
  35984. rawName: "v-show",
  35985. value: _vm.closable,
  35986. expression: "closable"
  35987. }
  35988. ],
  35989. staticClass: "el-alert__closebtn",
  35990. class: {
  35991. "is-customed": _vm.closeText !== "",
  35992. "el-icon-close": _vm.closeText === ""
  35993. },
  35994. on: {
  35995. click: function($event) {
  35996. _vm.close()
  35997. }
  35998. }
  35999. },
  36000. [_vm._v(_vm._s(_vm.closeText))]
  36001. )
  36002. ])
  36003. ]
  36004. )
  36005. ])
  36006. }
  36007. var mainvue_type_template_id_6e53341b_staticRenderFns = []
  36008. mainvue_type_template_id_6e53341b_render._withStripped = true
  36009. // CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=template&id=6e53341b&
  36010. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=script&lang=js&
  36011. //
  36012. //
  36013. //
  36014. //
  36015. //
  36016. //
  36017. //
  36018. //
  36019. //
  36020. //
  36021. //
  36022. //
  36023. //
  36024. //
  36025. //
  36026. //
  36027. //
  36028. //
  36029. //
  36030. //
  36031. //
  36032. var TYPE_CLASSES_MAP = {
  36033. 'success': 'el-icon-success',
  36034. 'warning': 'el-icon-warning',
  36035. 'error': 'el-icon-error'
  36036. };
  36037. /* harmony default export */ var alert_src_mainvue_type_script_lang_js_ = ({
  36038. name: 'ElAlert',
  36039. props: {
  36040. title: {
  36041. type: String,
  36042. default: ''
  36043. },
  36044. description: {
  36045. type: String,
  36046. default: ''
  36047. },
  36048. type: {
  36049. type: String,
  36050. default: 'info'
  36051. },
  36052. closable: {
  36053. type: Boolean,
  36054. default: true
  36055. },
  36056. closeText: {
  36057. type: String,
  36058. default: ''
  36059. },
  36060. showIcon: Boolean,
  36061. center: Boolean,
  36062. effect: {
  36063. type: String,
  36064. default: 'light',
  36065. validator: function validator(value) {
  36066. return ['light', 'dark'].indexOf(value) !== -1;
  36067. }
  36068. }
  36069. },
  36070. data: function data() {
  36071. return {
  36072. visible: true
  36073. };
  36074. },
  36075. methods: {
  36076. close: function close() {
  36077. this.visible = false;
  36078. this.$emit('close');
  36079. }
  36080. },
  36081. computed: {
  36082. typeClass: function typeClass() {
  36083. return 'el-alert--' + this.type;
  36084. },
  36085. iconClass: function iconClass() {
  36086. return TYPE_CLASSES_MAP[this.type] || 'el-icon-info';
  36087. },
  36088. isBigIcon: function isBigIcon() {
  36089. return this.description || this.$slots.default ? 'is-big' : '';
  36090. },
  36091. isBoldTitle: function isBoldTitle() {
  36092. return this.description || this.$slots.default ? 'is-bold' : '';
  36093. }
  36094. }
  36095. });
  36096. // CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=script&lang=js&
  36097. /* harmony default export */ var packages_alert_src_mainvue_type_script_lang_js_ = (alert_src_mainvue_type_script_lang_js_);
  36098. // CONCATENATED MODULE: ./packages/alert/src/main.vue
  36099. /* normalize component */
  36100. var alert_src_main_component = normalizeComponent(
  36101. packages_alert_src_mainvue_type_script_lang_js_,
  36102. mainvue_type_template_id_6e53341b_render,
  36103. mainvue_type_template_id_6e53341b_staticRenderFns,
  36104. false,
  36105. null,
  36106. null,
  36107. null
  36108. )
  36109. /* hot reload */
  36110. if (false) { var alert_src_main_api; }
  36111. alert_src_main_component.options.__file = "packages/alert/src/main.vue"
  36112. /* harmony default export */ var alert_src_main = (alert_src_main_component.exports);
  36113. // CONCATENATED MODULE: ./packages/alert/index.js
  36114. /* istanbul ignore next */
  36115. alert_src_main.install = function (Vue) {
  36116. Vue.component(alert_src_main.name, alert_src_main);
  36117. };
  36118. /* harmony default export */ var packages_alert = (alert_src_main);
  36119. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=template&id=43dbc3d8&
  36120. var mainvue_type_template_id_43dbc3d8_render = function() {
  36121. var _vm = this
  36122. var _h = _vm.$createElement
  36123. var _c = _vm._self._c || _h
  36124. return _c("transition", { attrs: { name: "el-notification-fade" } }, [
  36125. _c(
  36126. "div",
  36127. {
  36128. directives: [
  36129. {
  36130. name: "show",
  36131. rawName: "v-show",
  36132. value: _vm.visible,
  36133. expression: "visible"
  36134. }
  36135. ],
  36136. class: ["el-notification", _vm.customClass, _vm.horizontalClass],
  36137. style: _vm.positionStyle,
  36138. attrs: { role: "alert" },
  36139. on: {
  36140. mouseenter: function($event) {
  36141. _vm.clearTimer()
  36142. },
  36143. mouseleave: function($event) {
  36144. _vm.startTimer()
  36145. },
  36146. click: _vm.click
  36147. }
  36148. },
  36149. [
  36150. _vm.type || _vm.iconClass
  36151. ? _c("i", {
  36152. staticClass: "el-notification__icon",
  36153. class: [_vm.typeClass, _vm.iconClass]
  36154. })
  36155. : _vm._e(),
  36156. _c(
  36157. "div",
  36158. {
  36159. staticClass: "el-notification__group",
  36160. class: { "is-with-icon": _vm.typeClass || _vm.iconClass }
  36161. },
  36162. [
  36163. _c("h2", {
  36164. staticClass: "el-notification__title",
  36165. domProps: { textContent: _vm._s(_vm.title) }
  36166. }),
  36167. _c(
  36168. "div",
  36169. {
  36170. directives: [
  36171. {
  36172. name: "show",
  36173. rawName: "v-show",
  36174. value: _vm.message,
  36175. expression: "message"
  36176. }
  36177. ],
  36178. staticClass: "el-notification__content"
  36179. },
  36180. [
  36181. _vm._t("default", [
  36182. !_vm.dangerouslyUseHTMLString
  36183. ? _c("p", [_vm._v(_vm._s(_vm.message))])
  36184. : _c("p", { domProps: { innerHTML: _vm._s(_vm.message) } })
  36185. ])
  36186. ],
  36187. 2
  36188. ),
  36189. _vm.showClose
  36190. ? _c("div", {
  36191. staticClass: "el-notification__closeBtn el-icon-close",
  36192. on: {
  36193. click: function($event) {
  36194. $event.stopPropagation()
  36195. return _vm.close($event)
  36196. }
  36197. }
  36198. })
  36199. : _vm._e()
  36200. ]
  36201. )
  36202. ]
  36203. )
  36204. ])
  36205. }
  36206. var mainvue_type_template_id_43dbc3d8_staticRenderFns = []
  36207. mainvue_type_template_id_43dbc3d8_render._withStripped = true
  36208. // CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=template&id=43dbc3d8&
  36209. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=script&lang=js&
  36210. //
  36211. //
  36212. //
  36213. //
  36214. //
  36215. //
  36216. //
  36217. //
  36218. //
  36219. //
  36220. //
  36221. //
  36222. //
  36223. //
  36224. //
  36225. //
  36226. //
  36227. //
  36228. //
  36229. //
  36230. //
  36231. //
  36232. //
  36233. //
  36234. //
  36235. //
  36236. //
  36237. //
  36238. //
  36239. //
  36240. //
  36241. //
  36242. //
  36243. var mainvue_type_script_lang_js_typeMap = {
  36244. success: 'success',
  36245. info: 'info',
  36246. warning: 'warning',
  36247. error: 'error'
  36248. };
  36249. /* harmony default export */ var notification_src_mainvue_type_script_lang_js_ = ({
  36250. data: function data() {
  36251. return {
  36252. visible: false,
  36253. title: '',
  36254. message: '',
  36255. duration: 4500,
  36256. type: '',
  36257. showClose: true,
  36258. customClass: '',
  36259. iconClass: '',
  36260. onClose: null,
  36261. onClick: null,
  36262. closed: false,
  36263. verticalOffset: 0,
  36264. timer: null,
  36265. dangerouslyUseHTMLString: false,
  36266. position: 'top-right'
  36267. };
  36268. },
  36269. computed: {
  36270. typeClass: function typeClass() {
  36271. return this.type && mainvue_type_script_lang_js_typeMap[this.type] ? 'el-icon-' + mainvue_type_script_lang_js_typeMap[this.type] : '';
  36272. },
  36273. horizontalClass: function horizontalClass() {
  36274. return this.position.indexOf('right') > -1 ? 'right' : 'left';
  36275. },
  36276. verticalProperty: function verticalProperty() {
  36277. return (/^top-/.test(this.position) ? 'top' : 'bottom'
  36278. );
  36279. },
  36280. positionStyle: function positionStyle() {
  36281. var _ref;
  36282. return _ref = {}, _ref[this.verticalProperty] = this.verticalOffset + 'px', _ref;
  36283. }
  36284. },
  36285. watch: {
  36286. closed: function closed(newVal) {
  36287. if (newVal) {
  36288. this.visible = false;
  36289. this.$el.addEventListener('transitionend', this.destroyElement);
  36290. }
  36291. }
  36292. },
  36293. methods: {
  36294. destroyElement: function destroyElement() {
  36295. this.$el.removeEventListener('transitionend', this.destroyElement);
  36296. this.$destroy(true);
  36297. this.$el.parentNode.removeChild(this.$el);
  36298. },
  36299. click: function click() {
  36300. if (typeof this.onClick === 'function') {
  36301. this.onClick();
  36302. }
  36303. },
  36304. close: function close() {
  36305. this.closed = true;
  36306. if (typeof this.onClose === 'function') {
  36307. this.onClose();
  36308. }
  36309. },
  36310. clearTimer: function clearTimer() {
  36311. clearTimeout(this.timer);
  36312. },
  36313. startTimer: function startTimer() {
  36314. var _this = this;
  36315. if (this.duration > 0) {
  36316. this.timer = setTimeout(function () {
  36317. if (!_this.closed) {
  36318. _this.close();
  36319. }
  36320. }, this.duration);
  36321. }
  36322. },
  36323. keydown: function keydown(e) {
  36324. if (e.keyCode === 46 || e.keyCode === 8) {
  36325. this.clearTimer(); // detele 取消倒计时
  36326. } else if (e.keyCode === 27) {
  36327. // esc关闭消息
  36328. if (!this.closed) {
  36329. this.close();
  36330. }
  36331. } else {
  36332. this.startTimer(); // 恢复倒计时
  36333. }
  36334. }
  36335. },
  36336. mounted: function mounted() {
  36337. var _this2 = this;
  36338. if (this.duration > 0) {
  36339. this.timer = setTimeout(function () {
  36340. if (!_this2.closed) {
  36341. _this2.close();
  36342. }
  36343. }, this.duration);
  36344. }
  36345. document.addEventListener('keydown', this.keydown);
  36346. },
  36347. beforeDestroy: function beforeDestroy() {
  36348. document.removeEventListener('keydown', this.keydown);
  36349. }
  36350. });
  36351. // CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=script&lang=js&
  36352. /* harmony default export */ var packages_notification_src_mainvue_type_script_lang_js_ = (notification_src_mainvue_type_script_lang_js_);
  36353. // CONCATENATED MODULE: ./packages/notification/src/main.vue
  36354. /* normalize component */
  36355. var notification_src_main_component = normalizeComponent(
  36356. packages_notification_src_mainvue_type_script_lang_js_,
  36357. mainvue_type_template_id_43dbc3d8_render,
  36358. mainvue_type_template_id_43dbc3d8_staticRenderFns,
  36359. false,
  36360. null,
  36361. null,
  36362. null
  36363. )
  36364. /* hot reload */
  36365. if (false) { var notification_src_main_api; }
  36366. notification_src_main_component.options.__file = "packages/notification/src/main.vue"
  36367. /* harmony default export */ var notification_src_main = (notification_src_main_component.exports);
  36368. // CONCATENATED MODULE: ./packages/notification/src/main.js
  36369. var NotificationConstructor = external_vue_default.a.extend(notification_src_main);
  36370. var src_main_instance = void 0;
  36371. var instances = [];
  36372. var seed = 1;
  36373. var main_Notification = function Notification(options) {
  36374. if (external_vue_default.a.prototype.$isServer) return;
  36375. options = merge_default()({}, options);
  36376. var userOnClose = options.onClose;
  36377. var id = 'notification_' + seed++;
  36378. var position = options.position || 'top-right';
  36379. options.onClose = function () {
  36380. Notification.close(id, userOnClose);
  36381. };
  36382. src_main_instance = new NotificationConstructor({
  36383. data: options
  36384. });
  36385. if (Object(vdom_["isVNode"])(options.message)) {
  36386. src_main_instance.$slots.default = [options.message];
  36387. options.message = 'REPLACED_BY_VNODE';
  36388. }
  36389. src_main_instance.id = id;
  36390. src_main_instance.$mount();
  36391. document.body.appendChild(src_main_instance.$el);
  36392. src_main_instance.visible = true;
  36393. src_main_instance.dom = src_main_instance.$el;
  36394. src_main_instance.dom.style.zIndex = popup_["PopupManager"].nextZIndex();
  36395. var verticalOffset = options.offset || 0;
  36396. instances.filter(function (item) {
  36397. return item.position === position;
  36398. }).forEach(function (item) {
  36399. verticalOffset += item.$el.offsetHeight + 16;
  36400. });
  36401. verticalOffset += 16;
  36402. src_main_instance.verticalOffset = verticalOffset;
  36403. instances.push(src_main_instance);
  36404. return src_main_instance;
  36405. };
  36406. ['success', 'warning', 'info', 'error'].forEach(function (type) {
  36407. main_Notification[type] = function (options) {
  36408. if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
  36409. options = {
  36410. message: options
  36411. };
  36412. }
  36413. options.type = type;
  36414. return main_Notification(options);
  36415. };
  36416. });
  36417. main_Notification.close = function (id, userOnClose) {
  36418. var index = -1;
  36419. var len = instances.length;
  36420. var instance = instances.filter(function (instance, i) {
  36421. if (instance.id === id) {
  36422. index = i;
  36423. return true;
  36424. }
  36425. return false;
  36426. })[0];
  36427. if (!instance) return;
  36428. if (typeof userOnClose === 'function') {
  36429. userOnClose(instance);
  36430. }
  36431. instances.splice(index, 1);
  36432. if (len <= 1) return;
  36433. var position = instance.position;
  36434. var removedHeight = instance.dom.offsetHeight;
  36435. for (var i = index; i < len - 1; i++) {
  36436. if (instances[i].position === position) {
  36437. instances[i].dom.style[instance.verticalProperty] = parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
  36438. }
  36439. }
  36440. };
  36441. main_Notification.closeAll = function () {
  36442. for (var i = instances.length - 1; i >= 0; i--) {
  36443. instances[i].close();
  36444. }
  36445. };
  36446. /* harmony default export */ var packages_notification_src_main = (main_Notification);
  36447. // CONCATENATED MODULE: ./packages/notification/index.js
  36448. /* harmony default export */ var notification = (packages_notification_src_main);
  36449. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/main.vue?vue&type=template&id=32708644&
  36450. var mainvue_type_template_id_32708644_render = function() {
  36451. var _vm = this
  36452. var _h = _vm.$createElement
  36453. var _c = _vm._self._c || _h
  36454. return _c(
  36455. "div",
  36456. {
  36457. staticClass: "el-slider",
  36458. class: {
  36459. "is-vertical": _vm.vertical,
  36460. "el-slider--with-input": _vm.showInput
  36461. },
  36462. attrs: {
  36463. role: "slider",
  36464. "aria-valuemin": _vm.min,
  36465. "aria-valuemax": _vm.max,
  36466. "aria-orientation": _vm.vertical ? "vertical" : "horizontal",
  36467. "aria-disabled": _vm.sliderDisabled
  36468. }
  36469. },
  36470. [
  36471. _vm.showInput && !_vm.range
  36472. ? _c("el-input-number", {
  36473. ref: "input",
  36474. staticClass: "el-slider__input",
  36475. attrs: {
  36476. step: _vm.step,
  36477. disabled: _vm.sliderDisabled,
  36478. controls: _vm.showInputControls,
  36479. min: _vm.min,
  36480. max: _vm.max,
  36481. debounce: _vm.debounce,
  36482. size: _vm.inputSize
  36483. },
  36484. on: { change: _vm.emitChange },
  36485. model: {
  36486. value: _vm.firstValue,
  36487. callback: function($$v) {
  36488. _vm.firstValue = $$v
  36489. },
  36490. expression: "firstValue"
  36491. }
  36492. })
  36493. : _vm._e(),
  36494. _c(
  36495. "div",
  36496. {
  36497. ref: "slider",
  36498. staticClass: "el-slider__runway",
  36499. class: { "show-input": _vm.showInput, disabled: _vm.sliderDisabled },
  36500. style: _vm.runwayStyle,
  36501. on: { click: _vm.onSliderClick }
  36502. },
  36503. [
  36504. _c("div", { staticClass: "el-slider__bar", style: _vm.barStyle }),
  36505. _c("slider-button", {
  36506. ref: "button1",
  36507. attrs: {
  36508. vertical: _vm.vertical,
  36509. "tooltip-class": _vm.tooltipClass
  36510. },
  36511. model: {
  36512. value: _vm.firstValue,
  36513. callback: function($$v) {
  36514. _vm.firstValue = $$v
  36515. },
  36516. expression: "firstValue"
  36517. }
  36518. }),
  36519. _vm.range
  36520. ? _c("slider-button", {
  36521. ref: "button2",
  36522. attrs: {
  36523. vertical: _vm.vertical,
  36524. "tooltip-class": _vm.tooltipClass
  36525. },
  36526. model: {
  36527. value: _vm.secondValue,
  36528. callback: function($$v) {
  36529. _vm.secondValue = $$v
  36530. },
  36531. expression: "secondValue"
  36532. }
  36533. })
  36534. : _vm._e(),
  36535. _vm._l(_vm.stops, function(item, key) {
  36536. return _vm.showStops
  36537. ? _c("div", {
  36538. key: key,
  36539. staticClass: "el-slider__stop",
  36540. style: _vm.getStopStyle(item)
  36541. })
  36542. : _vm._e()
  36543. }),
  36544. _vm.markList.length > 0
  36545. ? [
  36546. _c(
  36547. "div",
  36548. _vm._l(_vm.markList, function(item, key) {
  36549. return _c("div", {
  36550. key: key,
  36551. staticClass: "el-slider__stop el-slider__marks-stop",
  36552. style: _vm.getStopStyle(item.position)
  36553. })
  36554. }),
  36555. 0
  36556. ),
  36557. _c(
  36558. "div",
  36559. { staticClass: "el-slider__marks" },
  36560. _vm._l(_vm.markList, function(item, key) {
  36561. return _c("slider-marker", {
  36562. key: key,
  36563. style: _vm.getStopStyle(item.position),
  36564. attrs: { mark: item.mark }
  36565. })
  36566. }),
  36567. 1
  36568. )
  36569. ]
  36570. : _vm._e()
  36571. ],
  36572. 2
  36573. )
  36574. ],
  36575. 1
  36576. )
  36577. }
  36578. var mainvue_type_template_id_32708644_staticRenderFns = []
  36579. mainvue_type_template_id_32708644_render._withStripped = true
  36580. // CONCATENATED MODULE: ./packages/slider/src/main.vue?vue&type=template&id=32708644&
  36581. // EXTERNAL MODULE: external "element-ui/lib/input-number"
  36582. var input_number_ = __webpack_require__(41);
  36583. var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
  36584. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/button.vue?vue&type=template&id=e72d2ad2&
  36585. var buttonvue_type_template_id_e72d2ad2_render = function() {
  36586. var _vm = this
  36587. var _h = _vm.$createElement
  36588. var _c = _vm._self._c || _h
  36589. return _c(
  36590. "div",
  36591. {
  36592. ref: "button",
  36593. staticClass: "el-slider__button-wrapper",
  36594. class: { hover: _vm.hovering, dragging: _vm.dragging },
  36595. style: _vm.wrapperStyle,
  36596. attrs: { tabindex: "0" },
  36597. on: {
  36598. mouseenter: _vm.handleMouseEnter,
  36599. mouseleave: _vm.handleMouseLeave,
  36600. mousedown: _vm.onButtonDown,
  36601. touchstart: _vm.onButtonDown,
  36602. focus: _vm.handleMouseEnter,
  36603. blur: _vm.handleMouseLeave,
  36604. keydown: [
  36605. function($event) {
  36606. if (
  36607. !("button" in $event) &&
  36608. _vm._k($event.keyCode, "left", 37, $event.key, [
  36609. "Left",
  36610. "ArrowLeft"
  36611. ])
  36612. ) {
  36613. return null
  36614. }
  36615. if ("button" in $event && $event.button !== 0) {
  36616. return null
  36617. }
  36618. return _vm.onLeftKeyDown($event)
  36619. },
  36620. function($event) {
  36621. if (
  36622. !("button" in $event) &&
  36623. _vm._k($event.keyCode, "right", 39, $event.key, [
  36624. "Right",
  36625. "ArrowRight"
  36626. ])
  36627. ) {
  36628. return null
  36629. }
  36630. if ("button" in $event && $event.button !== 2) {
  36631. return null
  36632. }
  36633. return _vm.onRightKeyDown($event)
  36634. },
  36635. function($event) {
  36636. if (
  36637. !("button" in $event) &&
  36638. _vm._k($event.keyCode, "down", 40, $event.key, [
  36639. "Down",
  36640. "ArrowDown"
  36641. ])
  36642. ) {
  36643. return null
  36644. }
  36645. $event.preventDefault()
  36646. return _vm.onLeftKeyDown($event)
  36647. },
  36648. function($event) {
  36649. if (
  36650. !("button" in $event) &&
  36651. _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])
  36652. ) {
  36653. return null
  36654. }
  36655. $event.preventDefault()
  36656. return _vm.onRightKeyDown($event)
  36657. }
  36658. ]
  36659. }
  36660. },
  36661. [
  36662. _c(
  36663. "el-tooltip",
  36664. {
  36665. ref: "tooltip",
  36666. attrs: {
  36667. placement: "top",
  36668. "popper-class": _vm.tooltipClass,
  36669. disabled: !_vm.showTooltip
  36670. }
  36671. },
  36672. [
  36673. _c("span", { attrs: { slot: "content" }, slot: "content" }, [
  36674. _vm._v(_vm._s(_vm.formatValue))
  36675. ]),
  36676. _c("div", {
  36677. staticClass: "el-slider__button",
  36678. class: { hover: _vm.hovering, dragging: _vm.dragging }
  36679. })
  36680. ]
  36681. )
  36682. ],
  36683. 1
  36684. )
  36685. }
  36686. var buttonvue_type_template_id_e72d2ad2_staticRenderFns = []
  36687. buttonvue_type_template_id_e72d2ad2_render._withStripped = true
  36688. // CONCATENATED MODULE: ./packages/slider/src/button.vue?vue&type=template&id=e72d2ad2&
  36689. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/button.vue?vue&type=script&lang=js&
  36690. //
  36691. //
  36692. //
  36693. //
  36694. //
  36695. //
  36696. //
  36697. //
  36698. //
  36699. //
  36700. //
  36701. //
  36702. //
  36703. //
  36704. //
  36705. //
  36706. //
  36707. //
  36708. //
  36709. //
  36710. //
  36711. //
  36712. //
  36713. //
  36714. //
  36715. //
  36716. //
  36717. //
  36718. //
  36719. /* harmony default export */ var slider_src_buttonvue_type_script_lang_js_ = ({
  36720. name: 'ElSliderButton',
  36721. components: {
  36722. ElTooltip: tooltip_default.a
  36723. },
  36724. props: {
  36725. value: {
  36726. type: Number,
  36727. default: 0
  36728. },
  36729. vertical: {
  36730. type: Boolean,
  36731. default: false
  36732. },
  36733. tooltipClass: String
  36734. },
  36735. data: function data() {
  36736. return {
  36737. hovering: false,
  36738. dragging: false,
  36739. isClick: false,
  36740. startX: 0,
  36741. currentX: 0,
  36742. startY: 0,
  36743. currentY: 0,
  36744. startPosition: 0,
  36745. newPosition: null,
  36746. oldValue: this.value
  36747. };
  36748. },
  36749. computed: {
  36750. disabled: function disabled() {
  36751. return this.$parent.sliderDisabled;
  36752. },
  36753. max: function max() {
  36754. return this.$parent.max;
  36755. },
  36756. min: function min() {
  36757. return this.$parent.min;
  36758. },
  36759. step: function step() {
  36760. return this.$parent.step;
  36761. },
  36762. showTooltip: function showTooltip() {
  36763. return this.$parent.showTooltip;
  36764. },
  36765. precision: function precision() {
  36766. return this.$parent.precision;
  36767. },
  36768. currentPosition: function currentPosition() {
  36769. return (this.value - this.min) / (this.max - this.min) * 100 + '%';
  36770. },
  36771. enableFormat: function enableFormat() {
  36772. return this.$parent.formatTooltip instanceof Function;
  36773. },
  36774. formatValue: function formatValue() {
  36775. return this.enableFormat && this.$parent.formatTooltip(this.value) || this.value;
  36776. },
  36777. wrapperStyle: function wrapperStyle() {
  36778. return this.vertical ? { bottom: this.currentPosition } : { left: this.currentPosition };
  36779. }
  36780. },
  36781. watch: {
  36782. dragging: function dragging(val) {
  36783. this.$parent.dragging = val;
  36784. }
  36785. },
  36786. methods: {
  36787. displayTooltip: function displayTooltip() {
  36788. this.$refs.tooltip && (this.$refs.tooltip.showPopper = true);
  36789. },
  36790. hideTooltip: function hideTooltip() {
  36791. this.$refs.tooltip && (this.$refs.tooltip.showPopper = false);
  36792. },
  36793. handleMouseEnter: function handleMouseEnter() {
  36794. this.hovering = true;
  36795. this.displayTooltip();
  36796. },
  36797. handleMouseLeave: function handleMouseLeave() {
  36798. this.hovering = false;
  36799. this.hideTooltip();
  36800. },
  36801. onButtonDown: function onButtonDown(event) {
  36802. if (this.disabled) return;
  36803. event.preventDefault();
  36804. this.onDragStart(event);
  36805. window.addEventListener('mousemove', this.onDragging);
  36806. window.addEventListener('touchmove', this.onDragging);
  36807. window.addEventListener('mouseup', this.onDragEnd);
  36808. window.addEventListener('touchend', this.onDragEnd);
  36809. window.addEventListener('contextmenu', this.onDragEnd);
  36810. },
  36811. onLeftKeyDown: function onLeftKeyDown() {
  36812. if (this.disabled) return;
  36813. this.newPosition = parseFloat(this.currentPosition) - this.step / (this.max - this.min) * 100;
  36814. this.setPosition(this.newPosition);
  36815. this.$parent.emitChange();
  36816. },
  36817. onRightKeyDown: function onRightKeyDown() {
  36818. if (this.disabled) return;
  36819. this.newPosition = parseFloat(this.currentPosition) + this.step / (this.max - this.min) * 100;
  36820. this.setPosition(this.newPosition);
  36821. this.$parent.emitChange();
  36822. },
  36823. onDragStart: function onDragStart(event) {
  36824. this.dragging = true;
  36825. this.isClick = true;
  36826. if (event.type === 'touchstart') {
  36827. event.clientY = event.touches[0].clientY;
  36828. event.clientX = event.touches[0].clientX;
  36829. }
  36830. if (this.vertical) {
  36831. this.startY = event.clientY;
  36832. } else {
  36833. this.startX = event.clientX;
  36834. }
  36835. this.startPosition = parseFloat(this.currentPosition);
  36836. this.newPosition = this.startPosition;
  36837. },
  36838. onDragging: function onDragging(event) {
  36839. if (this.dragging) {
  36840. this.isClick = false;
  36841. this.displayTooltip();
  36842. this.$parent.resetSize();
  36843. var diff = 0;
  36844. if (event.type === 'touchmove') {
  36845. event.clientY = event.touches[0].clientY;
  36846. event.clientX = event.touches[0].clientX;
  36847. }
  36848. if (this.vertical) {
  36849. this.currentY = event.clientY;
  36850. diff = (this.startY - this.currentY) / this.$parent.sliderSize * 100;
  36851. } else {
  36852. this.currentX = event.clientX;
  36853. diff = (this.currentX - this.startX) / this.$parent.sliderSize * 100;
  36854. }
  36855. this.newPosition = this.startPosition + diff;
  36856. this.setPosition(this.newPosition);
  36857. }
  36858. },
  36859. onDragEnd: function onDragEnd() {
  36860. var _this = this;
  36861. if (this.dragging) {
  36862. /*
  36863. * 防止在 mouseup 后立即触发 click,导致滑块有几率产生一小段位移
  36864. * 不使用 preventDefault 是因为 mouseup 和 click 没有注册在同一个 DOM 上
  36865. */
  36866. setTimeout(function () {
  36867. _this.dragging = false;
  36868. _this.hideTooltip();
  36869. if (!_this.isClick) {
  36870. _this.setPosition(_this.newPosition);
  36871. _this.$parent.emitChange();
  36872. }
  36873. }, 0);
  36874. window.removeEventListener('mousemove', this.onDragging);
  36875. window.removeEventListener('touchmove', this.onDragging);
  36876. window.removeEventListener('mouseup', this.onDragEnd);
  36877. window.removeEventListener('touchend', this.onDragEnd);
  36878. window.removeEventListener('contextmenu', this.onDragEnd);
  36879. }
  36880. },
  36881. setPosition: function setPosition(newPosition) {
  36882. var _this2 = this;
  36883. if (newPosition === null || isNaN(newPosition)) return;
  36884. if (newPosition < 0) {
  36885. newPosition = 0;
  36886. } else if (newPosition > 100) {
  36887. newPosition = 100;
  36888. }
  36889. var lengthPerStep = 100 / ((this.max - this.min) / this.step);
  36890. var steps = Math.round(newPosition / lengthPerStep);
  36891. var value = steps * lengthPerStep * (this.max - this.min) * 0.01 + this.min;
  36892. value = parseFloat(value.toFixed(this.precision));
  36893. this.$emit('input', value);
  36894. this.$nextTick(function () {
  36895. _this2.displayTooltip();
  36896. _this2.$refs.tooltip && _this2.$refs.tooltip.updatePopper();
  36897. });
  36898. if (!this.dragging && this.value !== this.oldValue) {
  36899. this.oldValue = this.value;
  36900. }
  36901. }
  36902. }
  36903. });
  36904. // CONCATENATED MODULE: ./packages/slider/src/button.vue?vue&type=script&lang=js&
  36905. /* harmony default export */ var packages_slider_src_buttonvue_type_script_lang_js_ = (slider_src_buttonvue_type_script_lang_js_);
  36906. // CONCATENATED MODULE: ./packages/slider/src/button.vue
  36907. /* normalize component */
  36908. var src_button_component = normalizeComponent(
  36909. packages_slider_src_buttonvue_type_script_lang_js_,
  36910. buttonvue_type_template_id_e72d2ad2_render,
  36911. buttonvue_type_template_id_e72d2ad2_staticRenderFns,
  36912. false,
  36913. null,
  36914. null,
  36915. null
  36916. )
  36917. /* hot reload */
  36918. if (false) { var src_button_api; }
  36919. src_button_component.options.__file = "packages/slider/src/button.vue"
  36920. /* harmony default export */ var slider_src_button = (src_button_component.exports);
  36921. // CONCATENATED MODULE: ./packages/slider/src/marker.js
  36922. /* harmony default export */ var marker = ({
  36923. name: 'ElMarker',
  36924. props: {
  36925. mark: {
  36926. type: [String, Object]
  36927. }
  36928. },
  36929. render: function render() {
  36930. var h = arguments[0];
  36931. var label = typeof this.mark === 'string' ? this.mark : this.mark.label;
  36932. return h(
  36933. 'div',
  36934. { 'class': 'el-slider__marks-text', style: this.mark.style || {} },
  36935. [label]
  36936. );
  36937. }
  36938. });
  36939. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/main.vue?vue&type=script&lang=js&
  36940. //
  36941. //
  36942. //
  36943. //
  36944. //
  36945. //
  36946. //
  36947. //
  36948. //
  36949. //
  36950. //
  36951. //
  36952. //
  36953. //
  36954. //
  36955. //
  36956. //
  36957. //
  36958. //
  36959. //
  36960. //
  36961. //
  36962. //
  36963. //
  36964. //
  36965. //
  36966. //
  36967. //
  36968. //
  36969. //
  36970. //
  36971. //
  36972. //
  36973. //
  36974. //
  36975. //
  36976. //
  36977. //
  36978. //
  36979. //
  36980. //
  36981. //
  36982. //
  36983. //
  36984. //
  36985. //
  36986. //
  36987. //
  36988. //
  36989. //
  36990. //
  36991. //
  36992. //
  36993. //
  36994. //
  36995. //
  36996. //
  36997. //
  36998. //
  36999. //
  37000. //
  37001. //
  37002. //
  37003. //
  37004. //
  37005. //
  37006. //
  37007. //
  37008. //
  37009. //
  37010. //
  37011. //
  37012. //
  37013. //
  37014. //
  37015. /* harmony default export */ var slider_src_mainvue_type_script_lang_js_ = ({
  37016. name: 'ElSlider',
  37017. mixins: [emitter_default.a],
  37018. inject: {
  37019. elForm: {
  37020. default: ''
  37021. }
  37022. },
  37023. props: {
  37024. min: {
  37025. type: Number,
  37026. default: 0
  37027. },
  37028. max: {
  37029. type: Number,
  37030. default: 100
  37031. },
  37032. step: {
  37033. type: Number,
  37034. default: 1
  37035. },
  37036. value: {
  37037. type: [Number, Array],
  37038. default: 0
  37039. },
  37040. showInput: {
  37041. type: Boolean,
  37042. default: false
  37043. },
  37044. showInputControls: {
  37045. type: Boolean,
  37046. default: true
  37047. },
  37048. inputSize: {
  37049. type: String,
  37050. default: 'small'
  37051. },
  37052. showStops: {
  37053. type: Boolean,
  37054. default: false
  37055. },
  37056. showTooltip: {
  37057. type: Boolean,
  37058. default: true
  37059. },
  37060. formatTooltip: Function,
  37061. disabled: {
  37062. type: Boolean,
  37063. default: false
  37064. },
  37065. range: {
  37066. type: Boolean,
  37067. default: false
  37068. },
  37069. vertical: {
  37070. type: Boolean,
  37071. default: false
  37072. },
  37073. height: {
  37074. type: String
  37075. },
  37076. debounce: {
  37077. type: Number,
  37078. default: 300
  37079. },
  37080. label: {
  37081. type: String
  37082. },
  37083. tooltipClass: String,
  37084. marks: Object
  37085. },
  37086. components: {
  37087. ElInputNumber: input_number_default.a,
  37088. SliderButton: slider_src_button,
  37089. SliderMarker: marker
  37090. },
  37091. data: function data() {
  37092. return {
  37093. firstValue: null,
  37094. secondValue: null,
  37095. oldValue: null,
  37096. dragging: false,
  37097. sliderSize: 1
  37098. };
  37099. },
  37100. watch: {
  37101. value: function value(val, oldVal) {
  37102. if (this.dragging || Array.isArray(val) && Array.isArray(oldVal) && val.every(function (item, index) {
  37103. return item === oldVal[index];
  37104. })) {
  37105. return;
  37106. }
  37107. this.setValues();
  37108. },
  37109. dragging: function dragging(val) {
  37110. if (!val) {
  37111. this.setValues();
  37112. }
  37113. },
  37114. firstValue: function firstValue(val) {
  37115. if (this.range) {
  37116. this.$emit('input', [this.minValue, this.maxValue]);
  37117. } else {
  37118. this.$emit('input', val);
  37119. }
  37120. },
  37121. secondValue: function secondValue() {
  37122. if (this.range) {
  37123. this.$emit('input', [this.minValue, this.maxValue]);
  37124. }
  37125. },
  37126. min: function min() {
  37127. this.setValues();
  37128. },
  37129. max: function max() {
  37130. this.setValues();
  37131. }
  37132. },
  37133. methods: {
  37134. valueChanged: function valueChanged() {
  37135. var _this = this;
  37136. if (this.range) {
  37137. return ![this.minValue, this.maxValue].every(function (item, index) {
  37138. return item === _this.oldValue[index];
  37139. });
  37140. } else {
  37141. return this.value !== this.oldValue;
  37142. }
  37143. },
  37144. setValues: function setValues() {
  37145. if (this.min > this.max) {
  37146. console.error('[Element Error][Slider]min should not be greater than max.');
  37147. return;
  37148. }
  37149. var val = this.value;
  37150. if (this.range && Array.isArray(val)) {
  37151. if (val[1] < this.min) {
  37152. this.$emit('input', [this.min, this.min]);
  37153. } else if (val[0] > this.max) {
  37154. this.$emit('input', [this.max, this.max]);
  37155. } else if (val[0] < this.min) {
  37156. this.$emit('input', [this.min, val[1]]);
  37157. } else if (val[1] > this.max) {
  37158. this.$emit('input', [val[0], this.max]);
  37159. } else {
  37160. this.firstValue = val[0];
  37161. this.secondValue = val[1];
  37162. if (this.valueChanged()) {
  37163. this.dispatch('ElFormItem', 'el.form.change', [this.minValue, this.maxValue]);
  37164. this.oldValue = val.slice();
  37165. }
  37166. }
  37167. } else if (!this.range && typeof val === 'number' && !isNaN(val)) {
  37168. if (val < this.min) {
  37169. this.$emit('input', this.min);
  37170. } else if (val > this.max) {
  37171. this.$emit('input', this.max);
  37172. } else {
  37173. this.firstValue = val;
  37174. if (this.valueChanged()) {
  37175. this.dispatch('ElFormItem', 'el.form.change', val);
  37176. this.oldValue = val;
  37177. }
  37178. }
  37179. }
  37180. },
  37181. setPosition: function setPosition(percent) {
  37182. var targetValue = this.min + percent * (this.max - this.min) / 100;
  37183. if (!this.range) {
  37184. this.$refs.button1.setPosition(percent);
  37185. return;
  37186. }
  37187. var button = void 0;
  37188. if (Math.abs(this.minValue - targetValue) < Math.abs(this.maxValue - targetValue)) {
  37189. button = this.firstValue < this.secondValue ? 'button1' : 'button2';
  37190. } else {
  37191. button = this.firstValue > this.secondValue ? 'button1' : 'button2';
  37192. }
  37193. this.$refs[button].setPosition(percent);
  37194. },
  37195. onSliderClick: function onSliderClick(event) {
  37196. if (this.sliderDisabled || this.dragging) return;
  37197. this.resetSize();
  37198. if (this.vertical) {
  37199. var sliderOffsetBottom = this.$refs.slider.getBoundingClientRect().bottom;
  37200. this.setPosition((sliderOffsetBottom - event.clientY) / this.sliderSize * 100);
  37201. } else {
  37202. var sliderOffsetLeft = this.$refs.slider.getBoundingClientRect().left;
  37203. this.setPosition((event.clientX - sliderOffsetLeft) / this.sliderSize * 100);
  37204. }
  37205. this.emitChange();
  37206. },
  37207. resetSize: function resetSize() {
  37208. if (this.$refs.slider) {
  37209. this.sliderSize = this.$refs.slider['client' + (this.vertical ? 'Height' : 'Width')];
  37210. }
  37211. },
  37212. emitChange: function emitChange() {
  37213. var _this2 = this;
  37214. this.$nextTick(function () {
  37215. _this2.$emit('change', _this2.range ? [_this2.minValue, _this2.maxValue] : _this2.value);
  37216. });
  37217. },
  37218. getStopStyle: function getStopStyle(position) {
  37219. return this.vertical ? { 'bottom': position + '%' } : { 'left': position + '%' };
  37220. }
  37221. },
  37222. computed: {
  37223. stops: function stops() {
  37224. var _this3 = this;
  37225. if (!this.showStops || this.min > this.max) return [];
  37226. if (this.step === 0) {
  37227. false && false;
  37228. return [];
  37229. }
  37230. var stopCount = (this.max - this.min) / this.step;
  37231. var stepWidth = 100 * this.step / (this.max - this.min);
  37232. var result = [];
  37233. for (var i = 1; i < stopCount; i++) {
  37234. result.push(i * stepWidth);
  37235. }
  37236. if (this.range) {
  37237. return result.filter(function (step) {
  37238. return step < 100 * (_this3.minValue - _this3.min) / (_this3.max - _this3.min) || step > 100 * (_this3.maxValue - _this3.min) / (_this3.max - _this3.min);
  37239. });
  37240. } else {
  37241. return result.filter(function (step) {
  37242. return step > 100 * (_this3.firstValue - _this3.min) / (_this3.max - _this3.min);
  37243. });
  37244. }
  37245. },
  37246. markList: function markList() {
  37247. var _this4 = this;
  37248. if (!this.marks) {
  37249. return [];
  37250. }
  37251. var marksKeys = Object.keys(this.marks);
  37252. return marksKeys.map(parseFloat).sort(function (a, b) {
  37253. return a - b;
  37254. }).filter(function (point) {
  37255. return point <= _this4.max && point >= _this4.min;
  37256. }).map(function (point) {
  37257. return {
  37258. point: point,
  37259. position: (point - _this4.min) * 100 / (_this4.max - _this4.min),
  37260. mark: _this4.marks[point]
  37261. };
  37262. });
  37263. },
  37264. minValue: function minValue() {
  37265. return Math.min(this.firstValue, this.secondValue);
  37266. },
  37267. maxValue: function maxValue() {
  37268. return Math.max(this.firstValue, this.secondValue);
  37269. },
  37270. barSize: function barSize() {
  37271. return this.range ? 100 * (this.maxValue - this.minValue) / (this.max - this.min) + '%' : 100 * (this.firstValue - this.min) / (this.max - this.min) + '%';
  37272. },
  37273. barStart: function barStart() {
  37274. return this.range ? 100 * (this.minValue - this.min) / (this.max - this.min) + '%' : '0%';
  37275. },
  37276. precision: function precision() {
  37277. var precisions = [this.min, this.max, this.step].map(function (item) {
  37278. var decimal = ('' + item).split('.')[1];
  37279. return decimal ? decimal.length : 0;
  37280. });
  37281. return Math.max.apply(null, precisions);
  37282. },
  37283. runwayStyle: function runwayStyle() {
  37284. return this.vertical ? { height: this.height } : {};
  37285. },
  37286. barStyle: function barStyle() {
  37287. return this.vertical ? {
  37288. height: this.barSize,
  37289. bottom: this.barStart
  37290. } : {
  37291. width: this.barSize,
  37292. left: this.barStart
  37293. };
  37294. },
  37295. sliderDisabled: function sliderDisabled() {
  37296. return this.disabled || (this.elForm || {}).disabled;
  37297. }
  37298. },
  37299. mounted: function mounted() {
  37300. var valuetext = void 0;
  37301. if (this.range) {
  37302. if (Array.isArray(this.value)) {
  37303. this.firstValue = Math.max(this.min, this.value[0]);
  37304. this.secondValue = Math.min(this.max, this.value[1]);
  37305. } else {
  37306. this.firstValue = this.min;
  37307. this.secondValue = this.max;
  37308. }
  37309. this.oldValue = [this.firstValue, this.secondValue];
  37310. valuetext = this.firstValue + '-' + this.secondValue;
  37311. } else {
  37312. if (typeof this.value !== 'number' || isNaN(this.value)) {
  37313. this.firstValue = this.min;
  37314. } else {
  37315. this.firstValue = Math.min(this.max, Math.max(this.min, this.value));
  37316. }
  37317. this.oldValue = this.firstValue;
  37318. valuetext = this.firstValue;
  37319. }
  37320. this.$el.setAttribute('aria-valuetext', valuetext);
  37321. // label screen reader
  37322. this.$el.setAttribute('aria-label', this.label ? this.label : 'slider between ' + this.min + ' and ' + this.max);
  37323. this.resetSize();
  37324. window.addEventListener('resize', this.resetSize);
  37325. },
  37326. beforeDestroy: function beforeDestroy() {
  37327. window.removeEventListener('resize', this.resetSize);
  37328. }
  37329. });
  37330. // CONCATENATED MODULE: ./packages/slider/src/main.vue?vue&type=script&lang=js&
  37331. /* harmony default export */ var packages_slider_src_mainvue_type_script_lang_js_ = (slider_src_mainvue_type_script_lang_js_);
  37332. // CONCATENATED MODULE: ./packages/slider/src/main.vue
  37333. /* normalize component */
  37334. var slider_src_main_component = normalizeComponent(
  37335. packages_slider_src_mainvue_type_script_lang_js_,
  37336. mainvue_type_template_id_32708644_render,
  37337. mainvue_type_template_id_32708644_staticRenderFns,
  37338. false,
  37339. null,
  37340. null,
  37341. null
  37342. )
  37343. /* hot reload */
  37344. if (false) { var slider_src_main_api; }
  37345. slider_src_main_component.options.__file = "packages/slider/src/main.vue"
  37346. /* harmony default export */ var slider_src_main = (slider_src_main_component.exports);
  37347. // CONCATENATED MODULE: ./packages/slider/index.js
  37348. /* istanbul ignore next */
  37349. slider_src_main.install = function (Vue) {
  37350. Vue.component(slider_src_main.name, slider_src_main);
  37351. };
  37352. /* harmony default export */ var slider = (slider_src_main);
  37353. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/loading/src/loading.vue?vue&type=template&id=eee0a7ac&
  37354. var loadingvue_type_template_id_eee0a7ac_render = function() {
  37355. var _vm = this
  37356. var _h = _vm.$createElement
  37357. var _c = _vm._self._c || _h
  37358. return _c(
  37359. "transition",
  37360. {
  37361. attrs: { name: "el-loading-fade" },
  37362. on: { "after-leave": _vm.handleAfterLeave }
  37363. },
  37364. [
  37365. _c(
  37366. "div",
  37367. {
  37368. directives: [
  37369. {
  37370. name: "show",
  37371. rawName: "v-show",
  37372. value: _vm.visible,
  37373. expression: "visible"
  37374. }
  37375. ],
  37376. staticClass: "el-loading-mask",
  37377. class: [_vm.customClass, { "is-fullscreen": _vm.fullscreen }],
  37378. style: { backgroundColor: _vm.background || "" }
  37379. },
  37380. [
  37381. _c("div", { staticClass: "el-loading-spinner" }, [
  37382. !_vm.spinner
  37383. ? _c(
  37384. "svg",
  37385. {
  37386. staticClass: "circular",
  37387. attrs: { viewBox: "25 25 50 50" }
  37388. },
  37389. [
  37390. _c("circle", {
  37391. staticClass: "path",
  37392. attrs: { cx: "50", cy: "50", r: "20", fill: "none" }
  37393. })
  37394. ]
  37395. )
  37396. : _c("i", { class: _vm.spinner }),
  37397. _vm.text
  37398. ? _c("p", { staticClass: "el-loading-text" }, [
  37399. _vm._v(_vm._s(_vm.text))
  37400. ])
  37401. : _vm._e()
  37402. ])
  37403. ]
  37404. )
  37405. ]
  37406. )
  37407. }
  37408. var loadingvue_type_template_id_eee0a7ac_staticRenderFns = []
  37409. loadingvue_type_template_id_eee0a7ac_render._withStripped = true
  37410. // CONCATENATED MODULE: ./packages/loading/src/loading.vue?vue&type=template&id=eee0a7ac&
  37411. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/loading/src/loading.vue?vue&type=script&lang=js&
  37412. //
  37413. //
  37414. //
  37415. //
  37416. //
  37417. //
  37418. //
  37419. //
  37420. //
  37421. //
  37422. //
  37423. //
  37424. //
  37425. //
  37426. //
  37427. //
  37428. //
  37429. //
  37430. /* harmony default export */ var loadingvue_type_script_lang_js_ = ({
  37431. data: function data() {
  37432. return {
  37433. text: null,
  37434. spinner: null,
  37435. background: null,
  37436. fullscreen: true,
  37437. visible: false,
  37438. customClass: ''
  37439. };
  37440. },
  37441. methods: {
  37442. handleAfterLeave: function handleAfterLeave() {
  37443. this.$emit('after-leave');
  37444. },
  37445. setText: function setText(text) {
  37446. this.text = text;
  37447. }
  37448. }
  37449. });
  37450. // CONCATENATED MODULE: ./packages/loading/src/loading.vue?vue&type=script&lang=js&
  37451. /* harmony default export */ var src_loadingvue_type_script_lang_js_ = (loadingvue_type_script_lang_js_);
  37452. // CONCATENATED MODULE: ./packages/loading/src/loading.vue
  37453. /* normalize component */
  37454. var loading_component = normalizeComponent(
  37455. src_loadingvue_type_script_lang_js_,
  37456. loadingvue_type_template_id_eee0a7ac_render,
  37457. loadingvue_type_template_id_eee0a7ac_staticRenderFns,
  37458. false,
  37459. null,
  37460. null,
  37461. null
  37462. )
  37463. /* hot reload */
  37464. if (false) { var loading_api; }
  37465. loading_component.options.__file = "packages/loading/src/loading.vue"
  37466. /* harmony default export */ var loading = (loading_component.exports);
  37467. // EXTERNAL MODULE: external "element-ui/lib/utils/after-leave"
  37468. var after_leave_ = __webpack_require__(32);
  37469. var after_leave_default = /*#__PURE__*/__webpack_require__.n(after_leave_);
  37470. // CONCATENATED MODULE: ./packages/loading/src/directive.js
  37471. var Mask = external_vue_default.a.extend(loading);
  37472. var loadingDirective = {};
  37473. loadingDirective.install = function (Vue) {
  37474. if (Vue.prototype.$isServer) return;
  37475. var toggleLoading = function toggleLoading(el, binding) {
  37476. if (binding.value) {
  37477. Vue.nextTick(function () {
  37478. if (binding.modifiers.fullscreen) {
  37479. el.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
  37480. el.originalOverflow = Object(dom_["getStyle"])(document.body, 'overflow');
  37481. el.maskStyle.zIndex = popup_["PopupManager"].nextZIndex();
  37482. Object(dom_["addClass"])(el.mask, 'is-fullscreen');
  37483. insertDom(document.body, el, binding);
  37484. } else {
  37485. Object(dom_["removeClass"])(el.mask, 'is-fullscreen');
  37486. if (binding.modifiers.body) {
  37487. el.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
  37488. ['top', 'left'].forEach(function (property) {
  37489. var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
  37490. el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(Object(dom_["getStyle"])(document.body, 'margin-' + property), 10) + 'px';
  37491. });
  37492. ['height', 'width'].forEach(function (property) {
  37493. el.maskStyle[property] = el.getBoundingClientRect()[property] + 'px';
  37494. });
  37495. insertDom(document.body, el, binding);
  37496. } else {
  37497. el.originalPosition = Object(dom_["getStyle"])(el, 'position');
  37498. insertDom(el, el, binding);
  37499. }
  37500. }
  37501. });
  37502. } else {
  37503. after_leave_default()(el.instance, function (_) {
  37504. if (!el.instance.hiding) return;
  37505. el.domVisible = false;
  37506. var target = binding.modifiers.fullscreen || binding.modifiers.body ? document.body : el;
  37507. Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
  37508. Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
  37509. el.instance.hiding = false;
  37510. }, 300, true);
  37511. el.instance.visible = false;
  37512. el.instance.hiding = true;
  37513. }
  37514. };
  37515. var insertDom = function insertDom(parent, el, binding) {
  37516. if (!el.domVisible && Object(dom_["getStyle"])(el, 'display') !== 'none' && Object(dom_["getStyle"])(el, 'visibility') !== 'hidden') {
  37517. Object.keys(el.maskStyle).forEach(function (property) {
  37518. el.mask.style[property] = el.maskStyle[property];
  37519. });
  37520. if (el.originalPosition !== 'absolute' && el.originalPosition !== 'fixed') {
  37521. Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
  37522. }
  37523. if (binding.modifiers.fullscreen && binding.modifiers.lock) {
  37524. Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
  37525. }
  37526. el.domVisible = true;
  37527. parent.appendChild(el.mask);
  37528. Vue.nextTick(function () {
  37529. if (el.instance.hiding) {
  37530. el.instance.$emit('after-leave');
  37531. } else {
  37532. el.instance.visible = true;
  37533. }
  37534. });
  37535. el.domInserted = true;
  37536. } else if (el.domVisible && el.instance.hiding === true) {
  37537. el.instance.visible = true;
  37538. el.instance.hiding = false;
  37539. }
  37540. };
  37541. Vue.directive('loading', {
  37542. bind: function bind(el, binding, vnode) {
  37543. var textExr = el.getAttribute('element-loading-text');
  37544. var spinnerExr = el.getAttribute('element-loading-spinner');
  37545. var backgroundExr = el.getAttribute('element-loading-background');
  37546. var customClassExr = el.getAttribute('element-loading-custom-class');
  37547. var vm = vnode.context;
  37548. var mask = new Mask({
  37549. el: document.createElement('div'),
  37550. data: {
  37551. text: vm && vm[textExr] || textExr,
  37552. spinner: vm && vm[spinnerExr] || spinnerExr,
  37553. background: vm && vm[backgroundExr] || backgroundExr,
  37554. customClass: vm && vm[customClassExr] || customClassExr,
  37555. fullscreen: !!binding.modifiers.fullscreen
  37556. }
  37557. });
  37558. el.instance = mask;
  37559. el.mask = mask.$el;
  37560. el.maskStyle = {};
  37561. binding.value && toggleLoading(el, binding);
  37562. },
  37563. update: function update(el, binding) {
  37564. el.instance.setText(el.getAttribute('element-loading-text'));
  37565. if (binding.oldValue !== binding.value) {
  37566. toggleLoading(el, binding);
  37567. }
  37568. },
  37569. unbind: function unbind(el, binding) {
  37570. if (el.domInserted) {
  37571. el.mask && el.mask.parentNode && el.mask.parentNode.removeChild(el.mask);
  37572. toggleLoading(el, { value: false, modifiers: binding.modifiers });
  37573. }
  37574. el.instance && el.instance.$destroy();
  37575. }
  37576. });
  37577. };
  37578. /* harmony default export */ var src_directive = (loadingDirective);
  37579. // CONCATENATED MODULE: ./packages/loading/src/index.js
  37580. var LoadingConstructor = external_vue_default.a.extend(loading);
  37581. var src_defaults = {
  37582. text: null,
  37583. fullscreen: true,
  37584. body: false,
  37585. lock: false,
  37586. customClass: ''
  37587. };
  37588. var fullscreenLoading = void 0;
  37589. LoadingConstructor.prototype.originalPosition = '';
  37590. LoadingConstructor.prototype.originalOverflow = '';
  37591. LoadingConstructor.prototype.close = function () {
  37592. var _this = this;
  37593. if (this.fullscreen) {
  37594. fullscreenLoading = undefined;
  37595. }
  37596. after_leave_default()(this, function (_) {
  37597. var target = _this.fullscreen || _this.body ? document.body : _this.target;
  37598. Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
  37599. Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
  37600. if (_this.$el && _this.$el.parentNode) {
  37601. _this.$el.parentNode.removeChild(_this.$el);
  37602. }
  37603. _this.$destroy();
  37604. }, 300);
  37605. this.visible = false;
  37606. };
  37607. var src_addStyle = function addStyle(options, parent, instance) {
  37608. var maskStyle = {};
  37609. if (options.fullscreen) {
  37610. instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
  37611. instance.originalOverflow = Object(dom_["getStyle"])(document.body, 'overflow');
  37612. maskStyle.zIndex = popup_["PopupManager"].nextZIndex();
  37613. } else if (options.body) {
  37614. instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
  37615. ['top', 'left'].forEach(function (property) {
  37616. var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
  37617. maskStyle[property] = options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] + 'px';
  37618. });
  37619. ['height', 'width'].forEach(function (property) {
  37620. maskStyle[property] = options.target.getBoundingClientRect()[property] + 'px';
  37621. });
  37622. } else {
  37623. instance.originalPosition = Object(dom_["getStyle"])(parent, 'position');
  37624. }
  37625. Object.keys(maskStyle).forEach(function (property) {
  37626. instance.$el.style[property] = maskStyle[property];
  37627. });
  37628. };
  37629. var src_Loading = function Loading() {
  37630. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  37631. if (external_vue_default.a.prototype.$isServer) return;
  37632. options = merge_default()({}, src_defaults, options);
  37633. if (typeof options.target === 'string') {
  37634. options.target = document.querySelector(options.target);
  37635. }
  37636. options.target = options.target || document.body;
  37637. if (options.target !== document.body) {
  37638. options.fullscreen = false;
  37639. } else {
  37640. options.body = true;
  37641. }
  37642. if (options.fullscreen && fullscreenLoading) {
  37643. return fullscreenLoading;
  37644. }
  37645. var parent = options.body ? document.body : options.target;
  37646. var instance = new LoadingConstructor({
  37647. el: document.createElement('div'),
  37648. data: options
  37649. });
  37650. src_addStyle(options, parent, instance);
  37651. if (instance.originalPosition !== 'absolute' && instance.originalPosition !== 'fixed') {
  37652. Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
  37653. }
  37654. if (options.fullscreen && options.lock) {
  37655. Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
  37656. }
  37657. parent.appendChild(instance.$el);
  37658. external_vue_default.a.nextTick(function () {
  37659. instance.visible = true;
  37660. });
  37661. if (options.fullscreen) {
  37662. fullscreenLoading = instance;
  37663. }
  37664. return instance;
  37665. };
  37666. /* harmony default export */ var src = (src_Loading);
  37667. // CONCATENATED MODULE: ./packages/loading/index.js
  37668. /* harmony default export */ var packages_loading = ({
  37669. install: function install(Vue) {
  37670. Vue.use(src_directive);
  37671. Vue.prototype.$loading = src;
  37672. },
  37673. directive: src_directive,
  37674. service: src
  37675. });
  37676. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/icon/src/icon.vue?vue&type=template&id=cb3fe7f4&
  37677. var iconvue_type_template_id_cb3fe7f4_render = function() {
  37678. var _vm = this
  37679. var _h = _vm.$createElement
  37680. var _c = _vm._self._c || _h
  37681. return _c("i", { class: "el-icon-" + _vm.name })
  37682. }
  37683. var iconvue_type_template_id_cb3fe7f4_staticRenderFns = []
  37684. iconvue_type_template_id_cb3fe7f4_render._withStripped = true
  37685. // CONCATENATED MODULE: ./packages/icon/src/icon.vue?vue&type=template&id=cb3fe7f4&
  37686. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/icon/src/icon.vue?vue&type=script&lang=js&
  37687. //
  37688. //
  37689. //
  37690. //
  37691. /* harmony default export */ var iconvue_type_script_lang_js_ = ({
  37692. name: 'ElIcon',
  37693. props: {
  37694. name: String
  37695. }
  37696. });
  37697. // CONCATENATED MODULE: ./packages/icon/src/icon.vue?vue&type=script&lang=js&
  37698. /* harmony default export */ var src_iconvue_type_script_lang_js_ = (iconvue_type_script_lang_js_);
  37699. // CONCATENATED MODULE: ./packages/icon/src/icon.vue
  37700. /* normalize component */
  37701. var icon_component = normalizeComponent(
  37702. src_iconvue_type_script_lang_js_,
  37703. iconvue_type_template_id_cb3fe7f4_render,
  37704. iconvue_type_template_id_cb3fe7f4_staticRenderFns,
  37705. false,
  37706. null,
  37707. null,
  37708. null
  37709. )
  37710. /* hot reload */
  37711. if (false) { var icon_api; }
  37712. icon_component.options.__file = "packages/icon/src/icon.vue"
  37713. /* harmony default export */ var icon = (icon_component.exports);
  37714. // CONCATENATED MODULE: ./packages/icon/index.js
  37715. /* istanbul ignore next */
  37716. icon.install = function (Vue) {
  37717. Vue.component(icon.name, icon);
  37718. };
  37719. /* harmony default export */ var packages_icon = (icon);
  37720. // CONCATENATED MODULE: ./packages/row/src/row.js
  37721. /* harmony default export */ var src_row = ({
  37722. name: 'ElRow',
  37723. componentName: 'ElRow',
  37724. props: {
  37725. tag: {
  37726. type: String,
  37727. default: 'div'
  37728. },
  37729. gutter: Number,
  37730. type: String,
  37731. justify: {
  37732. type: String,
  37733. default: 'start'
  37734. },
  37735. align: String
  37736. },
  37737. computed: {
  37738. style: function style() {
  37739. var ret = {};
  37740. if (this.gutter) {
  37741. ret.marginLeft = '-' + this.gutter / 2 + 'px';
  37742. ret.marginRight = ret.marginLeft;
  37743. }
  37744. return ret;
  37745. }
  37746. },
  37747. render: function render(h) {
  37748. return h(this.tag, {
  37749. class: ['el-row', this.justify !== 'start' ? 'is-justify-' + this.justify : '', this.align ? 'is-align-' + this.align : '', { 'el-row--flex': this.type === 'flex' }],
  37750. style: this.style
  37751. }, this.$slots.default);
  37752. }
  37753. });
  37754. // CONCATENATED MODULE: ./packages/row/index.js
  37755. /* istanbul ignore next */
  37756. src_row.install = function (Vue) {
  37757. Vue.component(src_row.name, src_row);
  37758. };
  37759. /* harmony default export */ var packages_row = (src_row);
  37760. // CONCATENATED MODULE: ./packages/col/src/col.js
  37761. var col_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  37762. /* harmony default export */ var col = ({
  37763. name: 'ElCol',
  37764. props: {
  37765. span: {
  37766. type: Number,
  37767. default: 24
  37768. },
  37769. tag: {
  37770. type: String,
  37771. default: 'div'
  37772. },
  37773. offset: Number,
  37774. pull: Number,
  37775. push: Number,
  37776. xs: [Number, Object],
  37777. sm: [Number, Object],
  37778. md: [Number, Object],
  37779. lg: [Number, Object],
  37780. xl: [Number, Object]
  37781. },
  37782. computed: {
  37783. gutter: function gutter() {
  37784. var parent = this.$parent;
  37785. while (parent && parent.$options.componentName !== 'ElRow') {
  37786. parent = parent.$parent;
  37787. }
  37788. return parent ? parent.gutter : 0;
  37789. }
  37790. },
  37791. render: function render(h) {
  37792. var _this = this;
  37793. var classList = [];
  37794. var style = {};
  37795. if (this.gutter) {
  37796. style.paddingLeft = this.gutter / 2 + 'px';
  37797. style.paddingRight = style.paddingLeft;
  37798. }
  37799. ['span', 'offset', 'pull', 'push'].forEach(function (prop) {
  37800. if (_this[prop] || _this[prop] === 0) {
  37801. classList.push(prop !== 'span' ? 'el-col-' + prop + '-' + _this[prop] : 'el-col-' + _this[prop]);
  37802. }
  37803. });
  37804. ['xs', 'sm', 'md', 'lg', 'xl'].forEach(function (size) {
  37805. if (typeof _this[size] === 'number') {
  37806. classList.push('el-col-' + size + '-' + _this[size]);
  37807. } else if (col_typeof(_this[size]) === 'object') {
  37808. var props = _this[size];
  37809. Object.keys(props).forEach(function (prop) {
  37810. classList.push(prop !== 'span' ? 'el-col-' + size + '-' + prop + '-' + props[prop] : 'el-col-' + size + '-' + props[prop]);
  37811. });
  37812. }
  37813. });
  37814. return h(this.tag, {
  37815. class: ['el-col', classList],
  37816. style: style
  37817. }, this.$slots.default);
  37818. }
  37819. });
  37820. // CONCATENATED MODULE: ./packages/col/index.js
  37821. /* istanbul ignore next */
  37822. col.install = function (Vue) {
  37823. Vue.component(col.name, col);
  37824. };
  37825. /* harmony default export */ var packages_col = (col);
  37826. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-list.vue?vue&type=template&id=173fedf5&
  37827. var upload_listvue_type_template_id_173fedf5_render = function() {
  37828. var _vm = this
  37829. var _h = _vm.$createElement
  37830. var _c = _vm._self._c || _h
  37831. return _c(
  37832. "transition-group",
  37833. {
  37834. class: [
  37835. "el-upload-list",
  37836. "el-upload-list--" + _vm.listType,
  37837. { "is-disabled": _vm.disabled }
  37838. ],
  37839. attrs: { tag: "ul", name: "el-list" }
  37840. },
  37841. _vm._l(_vm.files, function(file) {
  37842. return _c(
  37843. "li",
  37844. {
  37845. key: file.uid,
  37846. class: [
  37847. "el-upload-list__item",
  37848. "is-" + file.status,
  37849. _vm.focusing ? "focusing" : ""
  37850. ],
  37851. attrs: { tabindex: "0" },
  37852. on: {
  37853. keydown: function($event) {
  37854. if (
  37855. !("button" in $event) &&
  37856. _vm._k($event.keyCode, "delete", [8, 46], $event.key, [
  37857. "Backspace",
  37858. "Delete",
  37859. "Del"
  37860. ])
  37861. ) {
  37862. return null
  37863. }
  37864. !_vm.disabled && _vm.$emit("remove", file)
  37865. },
  37866. focus: function($event) {
  37867. _vm.focusing = true
  37868. },
  37869. blur: function($event) {
  37870. _vm.focusing = false
  37871. },
  37872. click: function($event) {
  37873. _vm.focusing = false
  37874. }
  37875. }
  37876. },
  37877. [
  37878. _vm._t(
  37879. "default",
  37880. [
  37881. file.status !== "uploading" &&
  37882. ["picture-card", "picture"].indexOf(_vm.listType) > -1
  37883. ? _c("img", {
  37884. staticClass: "el-upload-list__item-thumbnail",
  37885. attrs: { src: file.url, alt: "" }
  37886. })
  37887. : _vm._e(),
  37888. _c(
  37889. "a",
  37890. {
  37891. staticClass: "el-upload-list__item-name",
  37892. on: {
  37893. click: function($event) {
  37894. _vm.handleClick(file)
  37895. }
  37896. }
  37897. },
  37898. [
  37899. _c("i", { staticClass: "el-icon-document" }),
  37900. _vm._v(_vm._s(file.name) + "\n ")
  37901. ]
  37902. ),
  37903. _c(
  37904. "label",
  37905. { staticClass: "el-upload-list__item-status-label" },
  37906. [
  37907. _c("i", {
  37908. class: {
  37909. "el-icon-upload-success": true,
  37910. "el-icon-circle-check": _vm.listType === "text",
  37911. "el-icon-check":
  37912. ["picture-card", "picture"].indexOf(_vm.listType) > -1
  37913. }
  37914. })
  37915. ]
  37916. ),
  37917. !_vm.disabled
  37918. ? _c("i", {
  37919. staticClass: "el-icon-close",
  37920. on: {
  37921. click: function($event) {
  37922. _vm.$emit("remove", file)
  37923. }
  37924. }
  37925. })
  37926. : _vm._e(),
  37927. !_vm.disabled
  37928. ? _c("i", { staticClass: "el-icon-close-tip" }, [
  37929. _vm._v(_vm._s(_vm.t("el.upload.deleteTip")))
  37930. ])
  37931. : _vm._e(),
  37932. file.status === "uploading"
  37933. ? _c("el-progress", {
  37934. attrs: {
  37935. type: _vm.listType === "picture-card" ? "circle" : "line",
  37936. "stroke-width": _vm.listType === "picture-card" ? 6 : 2,
  37937. percentage: _vm.parsePercentage(file.percentage)
  37938. }
  37939. })
  37940. : _vm._e(),
  37941. _vm.listType === "picture-card"
  37942. ? _c("span", { staticClass: "el-upload-list__item-actions" }, [
  37943. _vm.handlePreview && _vm.listType === "picture-card"
  37944. ? _c(
  37945. "span",
  37946. {
  37947. staticClass: "el-upload-list__item-preview",
  37948. on: {
  37949. click: function($event) {
  37950. _vm.handlePreview(file)
  37951. }
  37952. }
  37953. },
  37954. [_c("i", { staticClass: "el-icon-zoom-in" })]
  37955. )
  37956. : _vm._e(),
  37957. !_vm.disabled
  37958. ? _c(
  37959. "span",
  37960. {
  37961. staticClass: "el-upload-list__item-delete",
  37962. on: {
  37963. click: function($event) {
  37964. _vm.$emit("remove", file)
  37965. }
  37966. }
  37967. },
  37968. [_c("i", { staticClass: "el-icon-delete" })]
  37969. )
  37970. : _vm._e()
  37971. ])
  37972. : _vm._e()
  37973. ],
  37974. { file: file }
  37975. )
  37976. ],
  37977. 2
  37978. )
  37979. }),
  37980. 0
  37981. )
  37982. }
  37983. var upload_listvue_type_template_id_173fedf5_staticRenderFns = []
  37984. upload_listvue_type_template_id_173fedf5_render._withStripped = true
  37985. // CONCATENATED MODULE: ./packages/upload/src/upload-list.vue?vue&type=template&id=173fedf5&
  37986. // EXTERNAL MODULE: external "element-ui/lib/progress"
  37987. var progress_ = __webpack_require__(33);
  37988. var progress_default = /*#__PURE__*/__webpack_require__.n(progress_);
  37989. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-list.vue?vue&type=script&lang=js&
  37990. //
  37991. //
  37992. //
  37993. //
  37994. //
  37995. //
  37996. //
  37997. //
  37998. //
  37999. //
  38000. //
  38001. //
  38002. //
  38003. //
  38004. //
  38005. //
  38006. //
  38007. //
  38008. //
  38009. //
  38010. //
  38011. //
  38012. //
  38013. //
  38014. //
  38015. //
  38016. //
  38017. //
  38018. //
  38019. //
  38020. //
  38021. //
  38022. //
  38023. //
  38024. //
  38025. //
  38026. //
  38027. //
  38028. //
  38029. //
  38030. //
  38031. //
  38032. //
  38033. //
  38034. //
  38035. //
  38036. //
  38037. //
  38038. //
  38039. //
  38040. //
  38041. //
  38042. //
  38043. //
  38044. //
  38045. //
  38046. //
  38047. //
  38048. //
  38049. //
  38050. //
  38051. //
  38052. //
  38053. //
  38054. /* harmony default export */ var upload_listvue_type_script_lang_js_ = ({
  38055. name: 'ElUploadList',
  38056. mixins: [locale_default.a],
  38057. data: function data() {
  38058. return {
  38059. focusing: false
  38060. };
  38061. },
  38062. components: { ElProgress: progress_default.a },
  38063. props: {
  38064. files: {
  38065. type: Array,
  38066. default: function _default() {
  38067. return [];
  38068. }
  38069. },
  38070. disabled: {
  38071. type: Boolean,
  38072. default: false
  38073. },
  38074. handlePreview: Function,
  38075. listType: String
  38076. },
  38077. methods: {
  38078. parsePercentage: function parsePercentage(val) {
  38079. return parseInt(val, 10);
  38080. },
  38081. handleClick: function handleClick(file) {
  38082. this.handlePreview && this.handlePreview(file);
  38083. }
  38084. }
  38085. });
  38086. // CONCATENATED MODULE: ./packages/upload/src/upload-list.vue?vue&type=script&lang=js&
  38087. /* harmony default export */ var src_upload_listvue_type_script_lang_js_ = (upload_listvue_type_script_lang_js_);
  38088. // CONCATENATED MODULE: ./packages/upload/src/upload-list.vue
  38089. /* normalize component */
  38090. var upload_list_component = normalizeComponent(
  38091. src_upload_listvue_type_script_lang_js_,
  38092. upload_listvue_type_template_id_173fedf5_render,
  38093. upload_listvue_type_template_id_173fedf5_staticRenderFns,
  38094. false,
  38095. null,
  38096. null,
  38097. null
  38098. )
  38099. /* hot reload */
  38100. if (false) { var upload_list_api; }
  38101. upload_list_component.options.__file = "packages/upload/src/upload-list.vue"
  38102. /* harmony default export */ var upload_list = (upload_list_component.exports);
  38103. // EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"
  38104. var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(24);
  38105. var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);
  38106. // CONCATENATED MODULE: ./packages/upload/src/ajax.js
  38107. function getError(action, option, xhr) {
  38108. var msg = void 0;
  38109. if (xhr.response) {
  38110. msg = '' + (xhr.response.error || xhr.response);
  38111. } else if (xhr.responseText) {
  38112. msg = '' + xhr.responseText;
  38113. } else {
  38114. msg = 'fail to post ' + action + ' ' + xhr.status;
  38115. }
  38116. var err = new Error(msg);
  38117. err.status = xhr.status;
  38118. err.method = 'post';
  38119. err.url = action;
  38120. return err;
  38121. }
  38122. function getBody(xhr) {
  38123. var text = xhr.responseText || xhr.response;
  38124. if (!text) {
  38125. return text;
  38126. }
  38127. try {
  38128. return JSON.parse(text);
  38129. } catch (e) {
  38130. return text;
  38131. }
  38132. }
  38133. function upload(option) {
  38134. if (typeof XMLHttpRequest === 'undefined') {
  38135. return;
  38136. }
  38137. var xhr = new XMLHttpRequest();
  38138. var action = option.action;
  38139. if (xhr.upload) {
  38140. xhr.upload.onprogress = function progress(e) {
  38141. if (e.total > 0) {
  38142. e.percent = e.loaded / e.total * 100;
  38143. }
  38144. option.onProgress(e);
  38145. };
  38146. }
  38147. var formData = new FormData();
  38148. if (option.data) {
  38149. Object.keys(option.data).forEach(function (key) {
  38150. formData.append(key, option.data[key]);
  38151. });
  38152. }
  38153. formData.append(option.filename, option.file, option.file.name);
  38154. xhr.onerror = function error(e) {
  38155. option.onError(e);
  38156. };
  38157. xhr.onload = function onload() {
  38158. if (xhr.status < 200 || xhr.status >= 300) {
  38159. return option.onError(getError(action, option, xhr));
  38160. }
  38161. option.onSuccess(getBody(xhr));
  38162. };
  38163. xhr.open('post', action, true);
  38164. if (option.withCredentials && 'withCredentials' in xhr) {
  38165. xhr.withCredentials = true;
  38166. }
  38167. var headers = option.headers || {};
  38168. for (var item in headers) {
  38169. if (headers.hasOwnProperty(item) && headers[item] !== null) {
  38170. xhr.setRequestHeader(item, headers[item]);
  38171. }
  38172. }
  38173. xhr.send(formData);
  38174. return xhr;
  38175. }
  38176. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-dragger.vue?vue&type=template&id=7ebbf219&
  38177. var upload_draggervue_type_template_id_7ebbf219_render = function() {
  38178. var _vm = this
  38179. var _h = _vm.$createElement
  38180. var _c = _vm._self._c || _h
  38181. return _c(
  38182. "div",
  38183. {
  38184. staticClass: "el-upload-dragger",
  38185. class: {
  38186. "is-dragover": _vm.dragover
  38187. },
  38188. on: {
  38189. drop: function($event) {
  38190. $event.preventDefault()
  38191. return _vm.onDrop($event)
  38192. },
  38193. dragover: function($event) {
  38194. $event.preventDefault()
  38195. return _vm.onDragover($event)
  38196. },
  38197. dragleave: function($event) {
  38198. $event.preventDefault()
  38199. _vm.dragover = false
  38200. }
  38201. }
  38202. },
  38203. [_vm._t("default")],
  38204. 2
  38205. )
  38206. }
  38207. var upload_draggervue_type_template_id_7ebbf219_staticRenderFns = []
  38208. upload_draggervue_type_template_id_7ebbf219_render._withStripped = true
  38209. // CONCATENATED MODULE: ./packages/upload/src/upload-dragger.vue?vue&type=template&id=7ebbf219&
  38210. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-dragger.vue?vue&type=script&lang=js&
  38211. //
  38212. //
  38213. //
  38214. //
  38215. //
  38216. //
  38217. //
  38218. //
  38219. //
  38220. //
  38221. //
  38222. //
  38223. //
  38224. /* harmony default export */ var upload_draggervue_type_script_lang_js_ = ({
  38225. name: 'ElUploadDrag',
  38226. props: {
  38227. disabled: Boolean
  38228. },
  38229. inject: {
  38230. uploader: {
  38231. default: ''
  38232. }
  38233. },
  38234. data: function data() {
  38235. return {
  38236. dragover: false
  38237. };
  38238. },
  38239. methods: {
  38240. onDragover: function onDragover() {
  38241. if (!this.disabled) {
  38242. this.dragover = true;
  38243. }
  38244. },
  38245. onDrop: function onDrop(e) {
  38246. if (this.disabled || !this.uploader) return;
  38247. var accept = this.uploader.accept;
  38248. this.dragover = false;
  38249. if (!accept) {
  38250. this.$emit('file', e.dataTransfer.files);
  38251. return;
  38252. }
  38253. this.$emit('file', [].slice.call(e.dataTransfer.files).filter(function (file) {
  38254. var type = file.type,
  38255. name = file.name;
  38256. var extension = name.indexOf('.') > -1 ? '.' + name.split('.').pop() : '';
  38257. var baseType = type.replace(/\/.*$/, '');
  38258. return accept.split(',').map(function (type) {
  38259. return type.trim();
  38260. }).filter(function (type) {
  38261. return type;
  38262. }).some(function (acceptedType) {
  38263. if (/\..+$/.test(acceptedType)) {
  38264. return extension === acceptedType;
  38265. }
  38266. if (/\/\*$/.test(acceptedType)) {
  38267. return baseType === acceptedType.replace(/\/\*$/, '');
  38268. }
  38269. if (/^[^\/]+\/[^\/]+$/.test(acceptedType)) {
  38270. return type === acceptedType;
  38271. }
  38272. return false;
  38273. });
  38274. }));
  38275. }
  38276. }
  38277. });
  38278. // CONCATENATED MODULE: ./packages/upload/src/upload-dragger.vue?vue&type=script&lang=js&
  38279. /* harmony default export */ var src_upload_draggervue_type_script_lang_js_ = (upload_draggervue_type_script_lang_js_);
  38280. // CONCATENATED MODULE: ./packages/upload/src/upload-dragger.vue
  38281. /* normalize component */
  38282. var upload_dragger_component = normalizeComponent(
  38283. src_upload_draggervue_type_script_lang_js_,
  38284. upload_draggervue_type_template_id_7ebbf219_render,
  38285. upload_draggervue_type_template_id_7ebbf219_staticRenderFns,
  38286. false,
  38287. null,
  38288. null,
  38289. null
  38290. )
  38291. /* hot reload */
  38292. if (false) { var upload_dragger_api; }
  38293. upload_dragger_component.options.__file = "packages/upload/src/upload-dragger.vue"
  38294. /* harmony default export */ var upload_dragger = (upload_dragger_component.exports);
  38295. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload.vue?vue&type=script&lang=js&
  38296. /* harmony default export */ var uploadvue_type_script_lang_js_ = ({
  38297. inject: ['uploader'],
  38298. components: {
  38299. UploadDragger: upload_dragger
  38300. },
  38301. props: {
  38302. type: String,
  38303. action: {
  38304. type: String,
  38305. required: true
  38306. },
  38307. name: {
  38308. type: String,
  38309. default: 'file'
  38310. },
  38311. data: Object,
  38312. headers: Object,
  38313. withCredentials: Boolean,
  38314. multiple: Boolean,
  38315. accept: String,
  38316. onStart: Function,
  38317. onProgress: Function,
  38318. onSuccess: Function,
  38319. onError: Function,
  38320. beforeUpload: Function,
  38321. drag: Boolean,
  38322. onPreview: {
  38323. type: Function,
  38324. default: function _default() {}
  38325. },
  38326. onRemove: {
  38327. type: Function,
  38328. default: function _default() {}
  38329. },
  38330. fileList: Array,
  38331. autoUpload: Boolean,
  38332. listType: String,
  38333. httpRequest: {
  38334. type: Function,
  38335. default: upload
  38336. },
  38337. disabled: Boolean,
  38338. limit: Number,
  38339. onExceed: Function
  38340. },
  38341. data: function data() {
  38342. return {
  38343. mouseover: false,
  38344. reqs: {}
  38345. };
  38346. },
  38347. methods: {
  38348. isImage: function isImage(str) {
  38349. return str.indexOf('image') !== -1;
  38350. },
  38351. handleChange: function handleChange(ev) {
  38352. var files = ev.target.files;
  38353. if (!files) return;
  38354. this.uploadFiles(files);
  38355. },
  38356. uploadFiles: function uploadFiles(files) {
  38357. var _this = this;
  38358. if (this.limit && this.fileList.length + files.length > this.limit) {
  38359. this.onExceed && this.onExceed(files, this.fileList);
  38360. return;
  38361. }
  38362. var postFiles = Array.prototype.slice.call(files);
  38363. if (!this.multiple) {
  38364. postFiles = postFiles.slice(0, 1);
  38365. }
  38366. if (postFiles.length === 0) {
  38367. return;
  38368. }
  38369. postFiles.forEach(function (rawFile) {
  38370. _this.onStart(rawFile);
  38371. if (_this.autoUpload) _this.upload(rawFile);
  38372. });
  38373. },
  38374. upload: function upload(rawFile) {
  38375. var _this2 = this;
  38376. this.$refs.input.value = null;
  38377. if (!this.beforeUpload) {
  38378. return this.post(rawFile);
  38379. }
  38380. var before = this.beforeUpload(rawFile);
  38381. if (before && before.then) {
  38382. before.then(function (processedFile) {
  38383. var fileType = Object.prototype.toString.call(processedFile);
  38384. if (fileType === '[object File]' || fileType === '[object Blob]') {
  38385. if (fileType === '[object Blob]') {
  38386. processedFile = new File([processedFile], rawFile.name, {
  38387. type: rawFile.type
  38388. });
  38389. }
  38390. for (var p in rawFile) {
  38391. if (rawFile.hasOwnProperty(p)) {
  38392. processedFile[p] = rawFile[p];
  38393. }
  38394. }
  38395. _this2.post(processedFile);
  38396. } else {
  38397. _this2.post(rawFile);
  38398. }
  38399. }, function () {
  38400. _this2.onRemove(null, rawFile);
  38401. });
  38402. } else if (before !== false) {
  38403. this.post(rawFile);
  38404. } else {
  38405. this.onRemove(null, rawFile);
  38406. }
  38407. },
  38408. abort: function abort(file) {
  38409. var reqs = this.reqs;
  38410. if (file) {
  38411. var uid = file;
  38412. if (file.uid) uid = file.uid;
  38413. if (reqs[uid]) {
  38414. reqs[uid].abort();
  38415. }
  38416. } else {
  38417. Object.keys(reqs).forEach(function (uid) {
  38418. if (reqs[uid]) reqs[uid].abort();
  38419. delete reqs[uid];
  38420. });
  38421. }
  38422. },
  38423. post: function post(rawFile) {
  38424. var _this3 = this;
  38425. var uid = rawFile.uid;
  38426. var options = {
  38427. headers: this.headers,
  38428. withCredentials: this.withCredentials,
  38429. file: rawFile,
  38430. data: this.data,
  38431. filename: this.name,
  38432. action: this.action,
  38433. onProgress: function onProgress(e) {
  38434. _this3.onProgress(e, rawFile);
  38435. },
  38436. onSuccess: function onSuccess(res) {
  38437. _this3.onSuccess(res, rawFile);
  38438. delete _this3.reqs[uid];
  38439. },
  38440. onError: function onError(err) {
  38441. _this3.onError(err, rawFile);
  38442. delete _this3.reqs[uid];
  38443. }
  38444. };
  38445. var req = this.httpRequest(options);
  38446. this.reqs[uid] = req;
  38447. if (req && req.then) {
  38448. req.then(options.onSuccess, options.onError);
  38449. }
  38450. },
  38451. handleClick: function handleClick() {
  38452. if (!this.disabled) {
  38453. this.$refs.input.value = null;
  38454. this.$refs.input.click();
  38455. }
  38456. },
  38457. handleKeydown: function handleKeydown(e) {
  38458. if (e.target !== e.currentTarget) return;
  38459. if (e.keyCode === 13 || e.keyCode === 32) {
  38460. this.handleClick();
  38461. }
  38462. }
  38463. },
  38464. render: function render(h) {
  38465. var handleClick = this.handleClick,
  38466. drag = this.drag,
  38467. name = this.name,
  38468. handleChange = this.handleChange,
  38469. multiple = this.multiple,
  38470. accept = this.accept,
  38471. listType = this.listType,
  38472. uploadFiles = this.uploadFiles,
  38473. disabled = this.disabled,
  38474. handleKeydown = this.handleKeydown;
  38475. var data = {
  38476. class: {
  38477. 'el-upload': true
  38478. },
  38479. on: {
  38480. click: handleClick,
  38481. keydown: handleKeydown
  38482. }
  38483. };
  38484. data.class['el-upload--' + listType] = true;
  38485. return h(
  38486. 'div',
  38487. external_babel_helper_vue_jsx_merge_props_default()([data, {
  38488. attrs: { tabindex: '0' }
  38489. }]),
  38490. [drag ? h(
  38491. 'upload-dragger',
  38492. {
  38493. attrs: { disabled: disabled },
  38494. on: {
  38495. 'file': uploadFiles
  38496. }
  38497. },
  38498. [this.$slots.default]
  38499. ) : this.$slots.default, h('input', { 'class': 'el-upload__input', attrs: { type: 'file', name: name, multiple: multiple, accept: accept },
  38500. ref: 'input', on: {
  38501. 'change': handleChange
  38502. }
  38503. })]
  38504. );
  38505. }
  38506. });
  38507. // CONCATENATED MODULE: ./packages/upload/src/upload.vue?vue&type=script&lang=js&
  38508. /* harmony default export */ var src_uploadvue_type_script_lang_js_ = (uploadvue_type_script_lang_js_);
  38509. // CONCATENATED MODULE: ./packages/upload/src/upload.vue
  38510. var upload_render, upload_staticRenderFns
  38511. /* normalize component */
  38512. var upload_component = normalizeComponent(
  38513. src_uploadvue_type_script_lang_js_,
  38514. upload_render,
  38515. upload_staticRenderFns,
  38516. false,
  38517. null,
  38518. null,
  38519. null
  38520. )
  38521. /* hot reload */
  38522. if (false) { var upload_api; }
  38523. upload_component.options.__file = "packages/upload/src/upload.vue"
  38524. /* harmony default export */ var src_upload = (upload_component.exports);
  38525. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/index.vue?vue&type=script&lang=js&
  38526. function srcvue_type_script_lang_js_noop() {}
  38527. /* harmony default export */ var srcvue_type_script_lang_js_ = ({
  38528. name: 'ElUpload',
  38529. mixins: [migrating_default.a],
  38530. components: {
  38531. ElProgress: progress_default.a,
  38532. UploadList: upload_list,
  38533. Upload: src_upload
  38534. },
  38535. provide: function provide() {
  38536. return {
  38537. uploader: this
  38538. };
  38539. },
  38540. inject: {
  38541. elForm: {
  38542. default: ''
  38543. }
  38544. },
  38545. props: {
  38546. action: {
  38547. type: String,
  38548. required: true
  38549. },
  38550. headers: {
  38551. type: Object,
  38552. default: function _default() {
  38553. return {};
  38554. }
  38555. },
  38556. data: Object,
  38557. multiple: Boolean,
  38558. name: {
  38559. type: String,
  38560. default: 'file'
  38561. },
  38562. drag: Boolean,
  38563. dragger: Boolean,
  38564. withCredentials: Boolean,
  38565. showFileList: {
  38566. type: Boolean,
  38567. default: true
  38568. },
  38569. accept: String,
  38570. type: {
  38571. type: String,
  38572. default: 'select'
  38573. },
  38574. beforeUpload: Function,
  38575. beforeRemove: Function,
  38576. onRemove: {
  38577. type: Function,
  38578. default: srcvue_type_script_lang_js_noop
  38579. },
  38580. onChange: {
  38581. type: Function,
  38582. default: srcvue_type_script_lang_js_noop
  38583. },
  38584. onPreview: {
  38585. type: Function
  38586. },
  38587. onSuccess: {
  38588. type: Function,
  38589. default: srcvue_type_script_lang_js_noop
  38590. },
  38591. onProgress: {
  38592. type: Function,
  38593. default: srcvue_type_script_lang_js_noop
  38594. },
  38595. onError: {
  38596. type: Function,
  38597. default: srcvue_type_script_lang_js_noop
  38598. },
  38599. fileList: {
  38600. type: Array,
  38601. default: function _default() {
  38602. return [];
  38603. }
  38604. },
  38605. autoUpload: {
  38606. type: Boolean,
  38607. default: true
  38608. },
  38609. listType: {
  38610. type: String,
  38611. default: 'text' // text,picture,picture-card
  38612. },
  38613. httpRequest: Function,
  38614. disabled: Boolean,
  38615. limit: Number,
  38616. onExceed: {
  38617. type: Function,
  38618. default: srcvue_type_script_lang_js_noop
  38619. }
  38620. },
  38621. data: function data() {
  38622. return {
  38623. uploadFiles: [],
  38624. dragOver: false,
  38625. draging: false,
  38626. tempIndex: 1
  38627. };
  38628. },
  38629. computed: {
  38630. uploadDisabled: function uploadDisabled() {
  38631. return this.disabled || (this.elForm || {}).disabled;
  38632. }
  38633. },
  38634. watch: {
  38635. listType: function listType(type) {
  38636. if (type === 'picture-card' || type === 'picture') {
  38637. this.uploadFiles = this.uploadFiles.map(function (file) {
  38638. if (!file.url && file.raw) {
  38639. try {
  38640. file.url = URL.createObjectURL(file.raw);
  38641. } catch (err) {
  38642. console.error('[Element Error][Upload]', err);
  38643. }
  38644. }
  38645. return file;
  38646. });
  38647. }
  38648. },
  38649. fileList: {
  38650. immediate: true,
  38651. handler: function handler(fileList) {
  38652. var _this = this;
  38653. this.uploadFiles = fileList.map(function (item) {
  38654. item.uid = item.uid || Date.now() + _this.tempIndex++;
  38655. item.status = item.status || 'success';
  38656. return item;
  38657. });
  38658. }
  38659. }
  38660. },
  38661. methods: {
  38662. handleStart: function handleStart(rawFile) {
  38663. rawFile.uid = Date.now() + this.tempIndex++;
  38664. var file = {
  38665. status: 'ready',
  38666. name: rawFile.name,
  38667. size: rawFile.size,
  38668. percentage: 0,
  38669. uid: rawFile.uid,
  38670. raw: rawFile
  38671. };
  38672. if (this.listType === 'picture-card' || this.listType === 'picture') {
  38673. try {
  38674. file.url = URL.createObjectURL(rawFile);
  38675. } catch (err) {
  38676. console.error('[Element Error][Upload]', err);
  38677. return;
  38678. }
  38679. }
  38680. this.uploadFiles.push(file);
  38681. this.onChange(file, this.uploadFiles);
  38682. },
  38683. handleProgress: function handleProgress(ev, rawFile) {
  38684. var file = this.getFile(rawFile);
  38685. this.onProgress(ev, file, this.uploadFiles);
  38686. file.status = 'uploading';
  38687. file.percentage = ev.percent || 0;
  38688. },
  38689. handleSuccess: function handleSuccess(res, rawFile) {
  38690. var file = this.getFile(rawFile);
  38691. if (file) {
  38692. file.status = 'success';
  38693. file.response = res;
  38694. this.onSuccess(res, file, this.uploadFiles);
  38695. this.onChange(file, this.uploadFiles);
  38696. }
  38697. },
  38698. handleError: function handleError(err, rawFile) {
  38699. var file = this.getFile(rawFile);
  38700. var fileList = this.uploadFiles;
  38701. file.status = 'fail';
  38702. fileList.splice(fileList.indexOf(file), 1);
  38703. this.onError(err, file, this.uploadFiles);
  38704. this.onChange(file, this.uploadFiles);
  38705. },
  38706. handleRemove: function handleRemove(file, raw) {
  38707. var _this2 = this;
  38708. if (raw) {
  38709. file = this.getFile(raw);
  38710. }
  38711. var doRemove = function doRemove() {
  38712. _this2.abort(file);
  38713. var fileList = _this2.uploadFiles;
  38714. fileList.splice(fileList.indexOf(file), 1);
  38715. _this2.onRemove(file, fileList);
  38716. };
  38717. if (!this.beforeRemove) {
  38718. doRemove();
  38719. } else if (typeof this.beforeRemove === 'function') {
  38720. var before = this.beforeRemove(file, this.uploadFiles);
  38721. if (before && before.then) {
  38722. before.then(function () {
  38723. doRemove();
  38724. }, srcvue_type_script_lang_js_noop);
  38725. } else if (before !== false) {
  38726. doRemove();
  38727. }
  38728. }
  38729. },
  38730. getFile: function getFile(rawFile) {
  38731. var fileList = this.uploadFiles;
  38732. var target = void 0;
  38733. fileList.every(function (item) {
  38734. target = rawFile.uid === item.uid ? item : null;
  38735. return !target;
  38736. });
  38737. return target;
  38738. },
  38739. abort: function abort(file) {
  38740. this.$refs['upload-inner'].abort(file);
  38741. },
  38742. clearFiles: function clearFiles() {
  38743. this.uploadFiles = [];
  38744. },
  38745. submit: function submit() {
  38746. var _this3 = this;
  38747. this.uploadFiles.filter(function (file) {
  38748. return file.status === 'ready';
  38749. }).forEach(function (file) {
  38750. _this3.$refs['upload-inner'].upload(file.raw);
  38751. });
  38752. },
  38753. getMigratingConfig: function getMigratingConfig() {
  38754. return {
  38755. props: {
  38756. 'default-file-list': 'default-file-list is renamed to file-list.',
  38757. 'show-upload-list': 'show-upload-list is renamed to show-file-list.',
  38758. 'thumbnail-mode': 'thumbnail-mode has been deprecated, you can implement the same effect according to this case: http://element.eleme.io/#/zh-CN/component/upload#yong-hu-tou-xiang-shang-chuan'
  38759. }
  38760. };
  38761. }
  38762. },
  38763. beforeDestroy: function beforeDestroy() {
  38764. this.uploadFiles.forEach(function (file) {
  38765. if (file.url && file.url.indexOf('blob:') === 0) {
  38766. URL.revokeObjectURL(file.url);
  38767. }
  38768. });
  38769. },
  38770. render: function render(h) {
  38771. var _this4 = this;
  38772. var uploadList = void 0;
  38773. if (this.showFileList) {
  38774. uploadList = h(
  38775. upload_list,
  38776. {
  38777. attrs: {
  38778. disabled: this.uploadDisabled,
  38779. listType: this.listType,
  38780. files: this.uploadFiles,
  38781. handlePreview: this.onPreview },
  38782. on: {
  38783. 'remove': this.handleRemove
  38784. }
  38785. },
  38786. [function (props) {
  38787. if (_this4.$scopedSlots.file) {
  38788. return _this4.$scopedSlots.file({
  38789. file: props.file
  38790. });
  38791. }
  38792. }]
  38793. );
  38794. }
  38795. var uploadData = {
  38796. props: {
  38797. type: this.type,
  38798. drag: this.drag,
  38799. action: this.action,
  38800. multiple: this.multiple,
  38801. 'before-upload': this.beforeUpload,
  38802. 'with-credentials': this.withCredentials,
  38803. headers: this.headers,
  38804. name: this.name,
  38805. data: this.data,
  38806. accept: this.accept,
  38807. fileList: this.uploadFiles,
  38808. autoUpload: this.autoUpload,
  38809. listType: this.listType,
  38810. disabled: this.uploadDisabled,
  38811. limit: this.limit,
  38812. 'on-exceed': this.onExceed,
  38813. 'on-start': this.handleStart,
  38814. 'on-progress': this.handleProgress,
  38815. 'on-success': this.handleSuccess,
  38816. 'on-error': this.handleError,
  38817. 'on-preview': this.onPreview,
  38818. 'on-remove': this.handleRemove,
  38819. 'http-request': this.httpRequest
  38820. },
  38821. ref: 'upload-inner'
  38822. };
  38823. var trigger = this.$slots.trigger || this.$slots.default;
  38824. var uploadComponent = h(
  38825. 'upload',
  38826. uploadData,
  38827. [trigger]
  38828. );
  38829. return h('div', [this.listType === 'picture-card' ? uploadList : '', this.$slots.trigger ? [uploadComponent, this.$slots.default] : uploadComponent, this.$slots.tip, this.listType !== 'picture-card' ? uploadList : '']);
  38830. }
  38831. });
  38832. // CONCATENATED MODULE: ./packages/upload/src/index.vue?vue&type=script&lang=js&
  38833. /* harmony default export */ var upload_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
  38834. // CONCATENATED MODULE: ./packages/upload/src/index.vue
  38835. var src_render, src_staticRenderFns
  38836. /* normalize component */
  38837. var upload_src_component = normalizeComponent(
  38838. upload_srcvue_type_script_lang_js_,
  38839. src_render,
  38840. src_staticRenderFns,
  38841. false,
  38842. null,
  38843. null,
  38844. null
  38845. )
  38846. /* hot reload */
  38847. if (false) { var src_api; }
  38848. upload_src_component.options.__file = "packages/upload/src/index.vue"
  38849. /* harmony default export */ var upload_src = (upload_src_component.exports);
  38850. // CONCATENATED MODULE: ./packages/upload/index.js
  38851. /* istanbul ignore next */
  38852. upload_src.install = function (Vue) {
  38853. Vue.component(upload_src.name, upload_src);
  38854. };
  38855. /* harmony default export */ var packages_upload = (upload_src);
  38856. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
  38857. var progressvue_type_template_id_229ee406_render = function() {
  38858. var _vm = this
  38859. var _h = _vm.$createElement
  38860. var _c = _vm._self._c || _h
  38861. return _c(
  38862. "div",
  38863. {
  38864. staticClass: "el-progress",
  38865. class: [
  38866. "el-progress--" + _vm.type,
  38867. _vm.status ? "is-" + _vm.status : "",
  38868. {
  38869. "el-progress--without-text": !_vm.showText,
  38870. "el-progress--text-inside": _vm.textInside
  38871. }
  38872. ],
  38873. attrs: {
  38874. role: "progressbar",
  38875. "aria-valuenow": _vm.percentage,
  38876. "aria-valuemin": "0",
  38877. "aria-valuemax": "100"
  38878. }
  38879. },
  38880. [
  38881. _vm.type === "line"
  38882. ? _c("div", { staticClass: "el-progress-bar" }, [
  38883. _c(
  38884. "div",
  38885. {
  38886. staticClass: "el-progress-bar__outer",
  38887. style: { height: _vm.strokeWidth + "px" }
  38888. },
  38889. [
  38890. _c(
  38891. "div",
  38892. {
  38893. staticClass: "el-progress-bar__inner",
  38894. style: _vm.barStyle
  38895. },
  38896. [
  38897. _vm.showText && _vm.textInside
  38898. ? _c(
  38899. "div",
  38900. { staticClass: "el-progress-bar__innerText" },
  38901. [_vm._v(_vm._s(_vm.content))]
  38902. )
  38903. : _vm._e()
  38904. ]
  38905. )
  38906. ]
  38907. )
  38908. ])
  38909. : _c(
  38910. "div",
  38911. {
  38912. staticClass: "el-progress-circle",
  38913. style: { height: _vm.width + "px", width: _vm.width + "px" }
  38914. },
  38915. [
  38916. _c("svg", { attrs: { viewBox: "0 0 100 100" } }, [
  38917. _c("path", {
  38918. staticClass: "el-progress-circle__track",
  38919. style: _vm.trailPathStyle,
  38920. attrs: {
  38921. d: _vm.trackPath,
  38922. stroke: "#e5e9f2",
  38923. "stroke-width": _vm.relativeStrokeWidth,
  38924. fill: "none"
  38925. }
  38926. }),
  38927. _c("path", {
  38928. staticClass: "el-progress-circle__path",
  38929. style: _vm.circlePathStyle,
  38930. attrs: {
  38931. d: _vm.trackPath,
  38932. stroke: _vm.stroke,
  38933. fill: "none",
  38934. "stroke-linecap": _vm.strokeLinecap,
  38935. "stroke-width": _vm.percentage ? _vm.relativeStrokeWidth : 0
  38936. }
  38937. })
  38938. ])
  38939. ]
  38940. ),
  38941. _vm.showText && !_vm.textInside
  38942. ? _c(
  38943. "div",
  38944. {
  38945. staticClass: "el-progress__text",
  38946. style: { fontSize: _vm.progressTextSize + "px" }
  38947. },
  38948. [
  38949. !_vm.status
  38950. ? [_vm._v(_vm._s(_vm.content))]
  38951. : _c("i", { class: _vm.iconClass })
  38952. ],
  38953. 2
  38954. )
  38955. : _vm._e()
  38956. ]
  38957. )
  38958. }
  38959. var progressvue_type_template_id_229ee406_staticRenderFns = []
  38960. progressvue_type_template_id_229ee406_render._withStripped = true
  38961. // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
  38962. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=script&lang=js&
  38963. //
  38964. //
  38965. //
  38966. //
  38967. //
  38968. //
  38969. //
  38970. //
  38971. //
  38972. //
  38973. //
  38974. //
  38975. //
  38976. //
  38977. //
  38978. //
  38979. //
  38980. //
  38981. //
  38982. //
  38983. //
  38984. //
  38985. //
  38986. //
  38987. //
  38988. //
  38989. //
  38990. //
  38991. //
  38992. //
  38993. //
  38994. //
  38995. //
  38996. //
  38997. //
  38998. //
  38999. //
  39000. //
  39001. //
  39002. //
  39003. //
  39004. //
  39005. //
  39006. //
  39007. //
  39008. //
  39009. //
  39010. //
  39011. //
  39012. //
  39013. //
  39014. //
  39015. /* harmony default export */ var progressvue_type_script_lang_js_ = ({
  39016. name: 'ElProgress',
  39017. props: {
  39018. type: {
  39019. type: String,
  39020. default: 'line',
  39021. validator: function validator(val) {
  39022. return ['line', 'circle', 'dashboard'].indexOf(val) > -1;
  39023. }
  39024. },
  39025. percentage: {
  39026. type: Number,
  39027. default: 0,
  39028. required: true,
  39029. validator: function validator(val) {
  39030. return val >= 0 && val <= 100;
  39031. }
  39032. },
  39033. status: {
  39034. type: String,
  39035. validator: function validator(val) {
  39036. return ['success', 'exception', 'warning'].indexOf(val) > -1;
  39037. }
  39038. },
  39039. strokeWidth: {
  39040. type: Number,
  39041. default: 6
  39042. },
  39043. strokeLinecap: {
  39044. type: String,
  39045. default: 'round'
  39046. },
  39047. textInside: {
  39048. type: Boolean,
  39049. default: false
  39050. },
  39051. width: {
  39052. type: Number,
  39053. default: 126
  39054. },
  39055. showText: {
  39056. type: Boolean,
  39057. default: true
  39058. },
  39059. color: {
  39060. type: [String, Array, Function],
  39061. default: ''
  39062. },
  39063. format: Function
  39064. },
  39065. computed: {
  39066. barStyle: function barStyle() {
  39067. var style = {};
  39068. style.width = this.percentage + '%';
  39069. style.backgroundColor = this.getCurrentColor(this.percentage);
  39070. return style;
  39071. },
  39072. relativeStrokeWidth: function relativeStrokeWidth() {
  39073. return (this.strokeWidth / this.width * 100).toFixed(1);
  39074. },
  39075. radius: function radius() {
  39076. if (this.type === 'circle' || this.type === 'dashboard') {
  39077. return parseInt(50 - parseFloat(this.relativeStrokeWidth) / 2, 10);
  39078. } else {
  39079. return 0;
  39080. }
  39081. },
  39082. trackPath: function trackPath() {
  39083. var radius = this.radius;
  39084. var isDashboard = this.type === 'dashboard';
  39085. return '\n M 50 50\n m 0 ' + (isDashboard ? '' : '-') + radius + '\n a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '-' : '') + radius * 2 + '\n a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '' : '-') + radius * 2 + '\n ';
  39086. },
  39087. perimeter: function perimeter() {
  39088. return 2 * Math.PI * this.radius;
  39089. },
  39090. rate: function rate() {
  39091. return this.type === 'dashboard' ? 0.75 : 1;
  39092. },
  39093. strokeDashoffset: function strokeDashoffset() {
  39094. var offset = -1 * this.perimeter * (1 - this.rate) / 2;
  39095. return offset + 'px';
  39096. },
  39097. trailPathStyle: function trailPathStyle() {
  39098. return {
  39099. strokeDasharray: this.perimeter * this.rate + 'px, ' + this.perimeter + 'px',
  39100. strokeDashoffset: this.strokeDashoffset
  39101. };
  39102. },
  39103. circlePathStyle: function circlePathStyle() {
  39104. return {
  39105. strokeDasharray: this.perimeter * this.rate * (this.percentage / 100) + 'px, ' + this.perimeter + 'px',
  39106. strokeDashoffset: this.strokeDashoffset,
  39107. transition: 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease'
  39108. };
  39109. },
  39110. stroke: function stroke() {
  39111. var ret = void 0;
  39112. if (this.color) {
  39113. ret = this.getCurrentColor(this.percentage);
  39114. } else {
  39115. switch (this.status) {
  39116. case 'success':
  39117. ret = '#13ce66';
  39118. break;
  39119. case 'exception':
  39120. ret = '#ff4949';
  39121. break;
  39122. case 'warning':
  39123. ret = '#e6a23c';
  39124. break;
  39125. default:
  39126. ret = '#20a0ff';
  39127. }
  39128. }
  39129. return ret;
  39130. },
  39131. iconClass: function iconClass() {
  39132. if (this.status === 'warning') {
  39133. return 'el-icon-warning';
  39134. }
  39135. if (this.type === 'line') {
  39136. return this.status === 'success' ? 'el-icon-circle-check' : 'el-icon-circle-close';
  39137. } else {
  39138. return this.status === 'success' ? 'el-icon-check' : 'el-icon-close';
  39139. }
  39140. },
  39141. progressTextSize: function progressTextSize() {
  39142. return this.type === 'line' ? 12 + this.strokeWidth * 0.4 : this.width * 0.111111 + 2;
  39143. },
  39144. content: function content() {
  39145. if (typeof this.format === 'function') {
  39146. return this.format(this.percentage) || '';
  39147. } else {
  39148. return this.percentage + '%';
  39149. }
  39150. }
  39151. },
  39152. methods: {
  39153. getCurrentColor: function getCurrentColor(percentage) {
  39154. if (typeof this.color === 'function') {
  39155. return this.color(percentage);
  39156. } else if (typeof this.color === 'string') {
  39157. return this.color;
  39158. } else {
  39159. return this.getLevelColor(percentage);
  39160. }
  39161. },
  39162. getLevelColor: function getLevelColor(percentage) {
  39163. var colorArray = this.getColorArray().sort(function (a, b) {
  39164. return a.percentage - b.percentage;
  39165. });
  39166. for (var i = 0; i < colorArray.length; i++) {
  39167. if (colorArray[i].percentage > percentage) {
  39168. return colorArray[i].color;
  39169. }
  39170. }
  39171. return colorArray[colorArray.length - 1].color;
  39172. },
  39173. getColorArray: function getColorArray() {
  39174. var color = this.color;
  39175. var span = 100 / color.length;
  39176. return color.map(function (seriesColor, index) {
  39177. if (typeof seriesColor === 'string') {
  39178. return {
  39179. color: seriesColor,
  39180. percentage: (index + 1) * span
  39181. };
  39182. }
  39183. return seriesColor;
  39184. });
  39185. }
  39186. }
  39187. });
  39188. // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=script&lang=js&
  39189. /* harmony default export */ var src_progressvue_type_script_lang_js_ = (progressvue_type_script_lang_js_);
  39190. // CONCATENATED MODULE: ./packages/progress/src/progress.vue
  39191. /* normalize component */
  39192. var progress_component = normalizeComponent(
  39193. src_progressvue_type_script_lang_js_,
  39194. progressvue_type_template_id_229ee406_render,
  39195. progressvue_type_template_id_229ee406_staticRenderFns,
  39196. false,
  39197. null,
  39198. null,
  39199. null
  39200. )
  39201. /* hot reload */
  39202. if (false) { var progress_api; }
  39203. progress_component.options.__file = "packages/progress/src/progress.vue"
  39204. /* harmony default export */ var progress = (progress_component.exports);
  39205. // CONCATENATED MODULE: ./packages/progress/index.js
  39206. /* istanbul ignore next */
  39207. progress.install = function (Vue) {
  39208. Vue.component(progress.name, progress);
  39209. };
  39210. /* harmony default export */ var packages_progress = (progress);
  39211. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/spinner/src/spinner.vue?vue&type=template&id=697b8538&
  39212. var spinnervue_type_template_id_697b8538_render = function() {
  39213. var _vm = this
  39214. var _h = _vm.$createElement
  39215. var _c = _vm._self._c || _h
  39216. return _c("span", { staticClass: "el-spinner" }, [
  39217. _c(
  39218. "svg",
  39219. {
  39220. staticClass: "el-spinner-inner",
  39221. style: { width: _vm.radius / 2 + "px", height: _vm.radius / 2 + "px" },
  39222. attrs: { viewBox: "0 0 50 50" }
  39223. },
  39224. [
  39225. _c("circle", {
  39226. staticClass: "path",
  39227. attrs: {
  39228. cx: "25",
  39229. cy: "25",
  39230. r: "20",
  39231. fill: "none",
  39232. stroke: _vm.strokeColor,
  39233. "stroke-width": _vm.strokeWidth
  39234. }
  39235. })
  39236. ]
  39237. )
  39238. ])
  39239. }
  39240. var spinnervue_type_template_id_697b8538_staticRenderFns = []
  39241. spinnervue_type_template_id_697b8538_render._withStripped = true
  39242. // CONCATENATED MODULE: ./packages/spinner/src/spinner.vue?vue&type=template&id=697b8538&
  39243. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/spinner/src/spinner.vue?vue&type=script&lang=js&
  39244. //
  39245. //
  39246. //
  39247. //
  39248. //
  39249. //
  39250. //
  39251. /* harmony default export */ var spinnervue_type_script_lang_js_ = ({
  39252. name: 'ElSpinner',
  39253. props: {
  39254. type: String,
  39255. radius: {
  39256. type: Number,
  39257. default: 100
  39258. },
  39259. strokeWidth: {
  39260. type: Number,
  39261. default: 5
  39262. },
  39263. strokeColor: {
  39264. type: String,
  39265. default: '#efefef'
  39266. }
  39267. }
  39268. });
  39269. // CONCATENATED MODULE: ./packages/spinner/src/spinner.vue?vue&type=script&lang=js&
  39270. /* harmony default export */ var src_spinnervue_type_script_lang_js_ = (spinnervue_type_script_lang_js_);
  39271. // CONCATENATED MODULE: ./packages/spinner/src/spinner.vue
  39272. /* normalize component */
  39273. var spinner_component = normalizeComponent(
  39274. src_spinnervue_type_script_lang_js_,
  39275. spinnervue_type_template_id_697b8538_render,
  39276. spinnervue_type_template_id_697b8538_staticRenderFns,
  39277. false,
  39278. null,
  39279. null,
  39280. null
  39281. )
  39282. /* hot reload */
  39283. if (false) { var spinner_api; }
  39284. spinner_component.options.__file = "packages/spinner/src/spinner.vue"
  39285. /* harmony default export */ var spinner = (spinner_component.exports);
  39286. // CONCATENATED MODULE: ./packages/spinner/index.js
  39287. /* istanbul ignore next */
  39288. spinner.install = function (Vue) {
  39289. Vue.component(spinner.name, spinner);
  39290. };
  39291. /* harmony default export */ var packages_spinner = (spinner);
  39292. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/main.vue?vue&type=template&id=455b9f60&
  39293. var mainvue_type_template_id_455b9f60_render = function() {
  39294. var _vm = this
  39295. var _h = _vm.$createElement
  39296. var _c = _vm._self._c || _h
  39297. return _c(
  39298. "transition",
  39299. {
  39300. attrs: { name: "el-message-fade" },
  39301. on: { "after-leave": _vm.handleAfterLeave }
  39302. },
  39303. [
  39304. _c(
  39305. "div",
  39306. {
  39307. directives: [
  39308. {
  39309. name: "show",
  39310. rawName: "v-show",
  39311. value: _vm.visible,
  39312. expression: "visible"
  39313. }
  39314. ],
  39315. class: [
  39316. "el-message",
  39317. _vm.type && !_vm.iconClass ? "el-message--" + _vm.type : "",
  39318. _vm.center ? "is-center" : "",
  39319. _vm.showClose ? "is-closable" : "",
  39320. _vm.customClass
  39321. ],
  39322. style: _vm.positionStyle,
  39323. attrs: { role: "alert" },
  39324. on: { mouseenter: _vm.clearTimer, mouseleave: _vm.startTimer }
  39325. },
  39326. [
  39327. _vm.iconClass
  39328. ? _c("i", { class: _vm.iconClass })
  39329. : _c("i", { class: _vm.typeClass }),
  39330. _vm._t("default", [
  39331. !_vm.dangerouslyUseHTMLString
  39332. ? _c("p", { staticClass: "el-message__content" }, [
  39333. _vm._v(_vm._s(_vm.message))
  39334. ])
  39335. : _c("p", {
  39336. staticClass: "el-message__content",
  39337. domProps: { innerHTML: _vm._s(_vm.message) }
  39338. })
  39339. ]),
  39340. _vm.showClose
  39341. ? _c("i", {
  39342. staticClass: "el-message__closeBtn el-icon-close",
  39343. on: { click: _vm.close }
  39344. })
  39345. : _vm._e()
  39346. ],
  39347. 2
  39348. )
  39349. ]
  39350. )
  39351. }
  39352. var mainvue_type_template_id_455b9f60_staticRenderFns = []
  39353. mainvue_type_template_id_455b9f60_render._withStripped = true
  39354. // CONCATENATED MODULE: ./packages/message/src/main.vue?vue&type=template&id=455b9f60&
  39355. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/main.vue?vue&type=script&lang=js&
  39356. //
  39357. //
  39358. //
  39359. //
  39360. //
  39361. //
  39362. //
  39363. //
  39364. //
  39365. //
  39366. //
  39367. //
  39368. //
  39369. //
  39370. //
  39371. //
  39372. //
  39373. //
  39374. //
  39375. //
  39376. //
  39377. //
  39378. //
  39379. //
  39380. //
  39381. //
  39382. var src_mainvue_type_script_lang_js_typeMap = {
  39383. success: 'success',
  39384. info: 'info',
  39385. warning: 'warning',
  39386. error: 'error'
  39387. };
  39388. /* harmony default export */ var message_src_mainvue_type_script_lang_js_ = ({
  39389. data: function data() {
  39390. return {
  39391. visible: false,
  39392. message: '',
  39393. duration: 3000,
  39394. type: 'info',
  39395. iconClass: '',
  39396. customClass: '',
  39397. onClose: null,
  39398. showClose: false,
  39399. closed: false,
  39400. verticalOffset: 20,
  39401. timer: null,
  39402. dangerouslyUseHTMLString: false,
  39403. center: false
  39404. };
  39405. },
  39406. computed: {
  39407. typeClass: function typeClass() {
  39408. return this.type && !this.iconClass ? 'el-message__icon el-icon-' + src_mainvue_type_script_lang_js_typeMap[this.type] : '';
  39409. },
  39410. positionStyle: function positionStyle() {
  39411. return {
  39412. 'top': this.verticalOffset + 'px'
  39413. };
  39414. }
  39415. },
  39416. watch: {
  39417. closed: function closed(newVal) {
  39418. if (newVal) {
  39419. this.visible = false;
  39420. }
  39421. }
  39422. },
  39423. methods: {
  39424. handleAfterLeave: function handleAfterLeave() {
  39425. this.$destroy(true);
  39426. this.$el.parentNode.removeChild(this.$el);
  39427. },
  39428. close: function close() {
  39429. this.closed = true;
  39430. if (typeof this.onClose === 'function') {
  39431. this.onClose(this);
  39432. }
  39433. },
  39434. clearTimer: function clearTimer() {
  39435. clearTimeout(this.timer);
  39436. },
  39437. startTimer: function startTimer() {
  39438. var _this = this;
  39439. if (this.duration > 0) {
  39440. this.timer = setTimeout(function () {
  39441. if (!_this.closed) {
  39442. _this.close();
  39443. }
  39444. }, this.duration);
  39445. }
  39446. },
  39447. keydown: function keydown(e) {
  39448. if (e.keyCode === 27) {
  39449. // esc关闭消息
  39450. if (!this.closed) {
  39451. this.close();
  39452. }
  39453. }
  39454. }
  39455. },
  39456. mounted: function mounted() {
  39457. this.startTimer();
  39458. document.addEventListener('keydown', this.keydown);
  39459. },
  39460. beforeDestroy: function beforeDestroy() {
  39461. document.removeEventListener('keydown', this.keydown);
  39462. }
  39463. });
  39464. // CONCATENATED MODULE: ./packages/message/src/main.vue?vue&type=script&lang=js&
  39465. /* harmony default export */ var packages_message_src_mainvue_type_script_lang_js_ = (message_src_mainvue_type_script_lang_js_);
  39466. // CONCATENATED MODULE: ./packages/message/src/main.vue
  39467. /* normalize component */
  39468. var message_src_main_component = normalizeComponent(
  39469. packages_message_src_mainvue_type_script_lang_js_,
  39470. mainvue_type_template_id_455b9f60_render,
  39471. mainvue_type_template_id_455b9f60_staticRenderFns,
  39472. false,
  39473. null,
  39474. null,
  39475. null
  39476. )
  39477. /* hot reload */
  39478. if (false) { var message_src_main_api; }
  39479. message_src_main_component.options.__file = "packages/message/src/main.vue"
  39480. /* harmony default export */ var message_src_main = (message_src_main_component.exports);
  39481. // EXTERNAL MODULE: external "element-ui/lib/utils/types"
  39482. var types_ = __webpack_require__(15);
  39483. // CONCATENATED MODULE: ./packages/message/src/main.js
  39484. var main_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  39485. var MessageConstructor = external_vue_default.a.extend(message_src_main);
  39486. var message_src_main_instance = void 0;
  39487. var main_instances = [];
  39488. var main_seed = 1;
  39489. var main_Message = function Message(options) {
  39490. if (external_vue_default.a.prototype.$isServer) return;
  39491. options = options || {};
  39492. if (typeof options === 'string') {
  39493. options = {
  39494. message: options
  39495. };
  39496. }
  39497. var userOnClose = options.onClose;
  39498. var id = 'message_' + main_seed++;
  39499. options.onClose = function () {
  39500. Message.close(id, userOnClose);
  39501. };
  39502. message_src_main_instance = new MessageConstructor({
  39503. data: options
  39504. });
  39505. message_src_main_instance.id = id;
  39506. if (Object(vdom_["isVNode"])(message_src_main_instance.message)) {
  39507. message_src_main_instance.$slots.default = [message_src_main_instance.message];
  39508. message_src_main_instance.message = null;
  39509. }
  39510. message_src_main_instance.$mount();
  39511. document.body.appendChild(message_src_main_instance.$el);
  39512. var verticalOffset = options.offset || 20;
  39513. main_instances.forEach(function (item) {
  39514. verticalOffset += item.$el.offsetHeight + 16;
  39515. });
  39516. message_src_main_instance.verticalOffset = verticalOffset;
  39517. message_src_main_instance.visible = true;
  39518. message_src_main_instance.$el.style.zIndex = popup_["PopupManager"].nextZIndex();
  39519. main_instances.push(message_src_main_instance);
  39520. return message_src_main_instance;
  39521. };
  39522. ['success', 'warning', 'info', 'error'].forEach(function (type) {
  39523. main_Message[type] = function (options) {
  39524. if (Object(types_["isObject"])(options) && !Object(vdom_["isVNode"])(options)) {
  39525. return main_Message(main_extends({}, options, {
  39526. type: type
  39527. }));
  39528. }
  39529. return main_Message({
  39530. type: type,
  39531. message: options
  39532. });
  39533. };
  39534. });
  39535. main_Message.close = function (id, userOnClose) {
  39536. var len = main_instances.length;
  39537. var index = -1;
  39538. var removedHeight = void 0;
  39539. for (var i = 0; i < len; i++) {
  39540. if (id === main_instances[i].id) {
  39541. removedHeight = main_instances[i].$el.offsetHeight;
  39542. index = i;
  39543. if (typeof userOnClose === 'function') {
  39544. userOnClose(main_instances[i]);
  39545. }
  39546. main_instances.splice(i, 1);
  39547. break;
  39548. }
  39549. }
  39550. if (len <= 1 || index === -1 || index > main_instances.length - 1) return;
  39551. for (var _i = index; _i < len - 1; _i++) {
  39552. var dom = main_instances[_i].$el;
  39553. dom.style['top'] = parseInt(dom.style['top'], 10) - removedHeight - 16 + 'px';
  39554. }
  39555. };
  39556. main_Message.closeAll = function () {
  39557. for (var i = main_instances.length - 1; i >= 0; i--) {
  39558. main_instances[i].close();
  39559. }
  39560. };
  39561. /* harmony default export */ var packages_message_src_main = (main_Message);
  39562. // CONCATENATED MODULE: ./packages/message/index.js
  39563. /* harmony default export */ var packages_message = (packages_message_src_main);
  39564. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/badge/src/main.vue?vue&type=template&id=7ccb6598&
  39565. var mainvue_type_template_id_7ccb6598_render = function() {
  39566. var _vm = this
  39567. var _h = _vm.$createElement
  39568. var _c = _vm._self._c || _h
  39569. return _c(
  39570. "div",
  39571. { staticClass: "el-badge" },
  39572. [
  39573. _vm._t("default"),
  39574. _c("transition", { attrs: { name: "el-zoom-in-center" } }, [
  39575. _c("sup", {
  39576. directives: [
  39577. {
  39578. name: "show",
  39579. rawName: "v-show",
  39580. value:
  39581. !_vm.hidden && (_vm.content || _vm.content === 0 || _vm.isDot),
  39582. expression: "!hidden && (content || content === 0 || isDot)"
  39583. }
  39584. ],
  39585. staticClass: "el-badge__content",
  39586. class: [
  39587. _vm.type ? "el-badge__content--" + _vm.type : null,
  39588. {
  39589. "is-fixed": _vm.$slots.default,
  39590. "is-dot": _vm.isDot
  39591. }
  39592. ],
  39593. domProps: { textContent: _vm._s(_vm.content) }
  39594. })
  39595. ])
  39596. ],
  39597. 2
  39598. )
  39599. }
  39600. var mainvue_type_template_id_7ccb6598_staticRenderFns = []
  39601. mainvue_type_template_id_7ccb6598_render._withStripped = true
  39602. // CONCATENATED MODULE: ./packages/badge/src/main.vue?vue&type=template&id=7ccb6598&
  39603. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/badge/src/main.vue?vue&type=script&lang=js&
  39604. //
  39605. //
  39606. //
  39607. //
  39608. //
  39609. //
  39610. //
  39611. //
  39612. //
  39613. //
  39614. //
  39615. //
  39616. //
  39617. //
  39618. //
  39619. //
  39620. //
  39621. //
  39622. //
  39623. //
  39624. /* harmony default export */ var badge_src_mainvue_type_script_lang_js_ = ({
  39625. name: 'ElBadge',
  39626. props: {
  39627. value: [String, Number],
  39628. max: Number,
  39629. isDot: Boolean,
  39630. hidden: Boolean,
  39631. type: {
  39632. type: String,
  39633. validator: function validator(val) {
  39634. return ['primary', 'success', 'warning', 'info', 'danger'].indexOf(val) > -1;
  39635. }
  39636. }
  39637. },
  39638. computed: {
  39639. content: function content() {
  39640. if (this.isDot) return;
  39641. var value = this.value;
  39642. var max = this.max;
  39643. if (typeof value === 'number' && typeof max === 'number') {
  39644. return max < value ? max + '+' : value;
  39645. }
  39646. return value;
  39647. }
  39648. }
  39649. });
  39650. // CONCATENATED MODULE: ./packages/badge/src/main.vue?vue&type=script&lang=js&
  39651. /* harmony default export */ var packages_badge_src_mainvue_type_script_lang_js_ = (badge_src_mainvue_type_script_lang_js_);
  39652. // CONCATENATED MODULE: ./packages/badge/src/main.vue
  39653. /* normalize component */
  39654. var badge_src_main_component = normalizeComponent(
  39655. packages_badge_src_mainvue_type_script_lang_js_,
  39656. mainvue_type_template_id_7ccb6598_render,
  39657. mainvue_type_template_id_7ccb6598_staticRenderFns,
  39658. false,
  39659. null,
  39660. null,
  39661. null
  39662. )
  39663. /* hot reload */
  39664. if (false) { var badge_src_main_api; }
  39665. badge_src_main_component.options.__file = "packages/badge/src/main.vue"
  39666. /* harmony default export */ var badge_src_main = (badge_src_main_component.exports);
  39667. // CONCATENATED MODULE: ./packages/badge/index.js
  39668. /* istanbul ignore next */
  39669. badge_src_main.install = function (Vue) {
  39670. Vue.component(badge_src_main.name, badge_src_main);
  39671. };
  39672. /* harmony default export */ var badge = (badge_src_main);
  39673. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/card/src/main.vue?vue&type=template&id=59a4a40f&
  39674. var mainvue_type_template_id_59a4a40f_render = function() {
  39675. var _vm = this
  39676. var _h = _vm.$createElement
  39677. var _c = _vm._self._c || _h
  39678. return _c(
  39679. "div",
  39680. {
  39681. staticClass: "el-card",
  39682. class: _vm.shadow ? "is-" + _vm.shadow + "-shadow" : "is-always-shadow"
  39683. },
  39684. [
  39685. _vm.$slots.header || _vm.header
  39686. ? _c(
  39687. "div",
  39688. { staticClass: "el-card__header" },
  39689. [_vm._t("header", [_vm._v(_vm._s(_vm.header))])],
  39690. 2
  39691. )
  39692. : _vm._e(),
  39693. _c(
  39694. "div",
  39695. { staticClass: "el-card__body", style: _vm.bodyStyle },
  39696. [_vm._t("default")],
  39697. 2
  39698. )
  39699. ]
  39700. )
  39701. }
  39702. var mainvue_type_template_id_59a4a40f_staticRenderFns = []
  39703. mainvue_type_template_id_59a4a40f_render._withStripped = true
  39704. // CONCATENATED MODULE: ./packages/card/src/main.vue?vue&type=template&id=59a4a40f&
  39705. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/card/src/main.vue?vue&type=script&lang=js&
  39706. //
  39707. //
  39708. //
  39709. //
  39710. //
  39711. //
  39712. //
  39713. //
  39714. //
  39715. //
  39716. //
  39717. /* harmony default export */ var card_src_mainvue_type_script_lang_js_ = ({
  39718. name: 'ElCard',
  39719. props: {
  39720. header: {},
  39721. bodyStyle: {},
  39722. shadow: {
  39723. type: String
  39724. }
  39725. }
  39726. });
  39727. // CONCATENATED MODULE: ./packages/card/src/main.vue?vue&type=script&lang=js&
  39728. /* harmony default export */ var packages_card_src_mainvue_type_script_lang_js_ = (card_src_mainvue_type_script_lang_js_);
  39729. // CONCATENATED MODULE: ./packages/card/src/main.vue
  39730. /* normalize component */
  39731. var card_src_main_component = normalizeComponent(
  39732. packages_card_src_mainvue_type_script_lang_js_,
  39733. mainvue_type_template_id_59a4a40f_render,
  39734. mainvue_type_template_id_59a4a40f_staticRenderFns,
  39735. false,
  39736. null,
  39737. null,
  39738. null
  39739. )
  39740. /* hot reload */
  39741. if (false) { var card_src_main_api; }
  39742. card_src_main_component.options.__file = "packages/card/src/main.vue"
  39743. /* harmony default export */ var card_src_main = (card_src_main_component.exports);
  39744. // CONCATENATED MODULE: ./packages/card/index.js
  39745. /* istanbul ignore next */
  39746. card_src_main.install = function (Vue) {
  39747. Vue.component(card_src_main.name, card_src_main);
  39748. };
  39749. /* harmony default export */ var card = (card_src_main);
  39750. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/rate/src/main.vue?vue&type=template&id=ada57782&
  39751. var mainvue_type_template_id_ada57782_render = function() {
  39752. var _vm = this
  39753. var _h = _vm.$createElement
  39754. var _c = _vm._self._c || _h
  39755. return _c(
  39756. "div",
  39757. {
  39758. staticClass: "el-rate",
  39759. attrs: {
  39760. role: "slider",
  39761. "aria-valuenow": _vm.currentValue,
  39762. "aria-valuetext": _vm.text,
  39763. "aria-valuemin": "0",
  39764. "aria-valuemax": _vm.max,
  39765. tabindex: "0"
  39766. },
  39767. on: { keydown: _vm.handleKey }
  39768. },
  39769. [
  39770. _vm._l(_vm.max, function(item, key) {
  39771. return _c(
  39772. "span",
  39773. {
  39774. key: key,
  39775. staticClass: "el-rate__item",
  39776. style: { cursor: _vm.rateDisabled ? "auto" : "pointer" },
  39777. on: {
  39778. mousemove: function($event) {
  39779. _vm.setCurrentValue(item, $event)
  39780. },
  39781. mouseleave: _vm.resetCurrentValue,
  39782. click: function($event) {
  39783. _vm.selectValue(item)
  39784. }
  39785. }
  39786. },
  39787. [
  39788. _c(
  39789. "i",
  39790. {
  39791. staticClass: "el-rate__icon",
  39792. class: [
  39793. _vm.classes[item - 1],
  39794. { hover: _vm.hoverIndex === item }
  39795. ],
  39796. style: _vm.getIconStyle(item)
  39797. },
  39798. [
  39799. _vm.showDecimalIcon(item)
  39800. ? _c("i", {
  39801. staticClass: "el-rate__decimal",
  39802. class: _vm.decimalIconClass,
  39803. style: _vm.decimalStyle
  39804. })
  39805. : _vm._e()
  39806. ]
  39807. )
  39808. ]
  39809. )
  39810. }),
  39811. _vm.showText || _vm.showScore
  39812. ? _c(
  39813. "span",
  39814. { staticClass: "el-rate__text", style: { color: _vm.textColor } },
  39815. [_vm._v(_vm._s(_vm.text))]
  39816. )
  39817. : _vm._e()
  39818. ],
  39819. 2
  39820. )
  39821. }
  39822. var mainvue_type_template_id_ada57782_staticRenderFns = []
  39823. mainvue_type_template_id_ada57782_render._withStripped = true
  39824. // CONCATENATED MODULE: ./packages/rate/src/main.vue?vue&type=template&id=ada57782&
  39825. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/rate/src/main.vue?vue&type=script&lang=js&
  39826. //
  39827. //
  39828. //
  39829. //
  39830. //
  39831. //
  39832. //
  39833. //
  39834. //
  39835. //
  39836. //
  39837. //
  39838. //
  39839. //
  39840. //
  39841. //
  39842. //
  39843. //
  39844. //
  39845. //
  39846. //
  39847. //
  39848. //
  39849. //
  39850. //
  39851. //
  39852. //
  39853. //
  39854. //
  39855. //
  39856. //
  39857. //
  39858. //
  39859. //
  39860. /* harmony default export */ var rate_src_mainvue_type_script_lang_js_ = ({
  39861. name: 'ElRate',
  39862. mixins: [migrating_default.a],
  39863. inject: {
  39864. elForm: {
  39865. default: ''
  39866. }
  39867. },
  39868. data: function data() {
  39869. return {
  39870. pointerAtLeftHalf: true,
  39871. currentValue: this.value,
  39872. hoverIndex: -1
  39873. };
  39874. },
  39875. props: {
  39876. value: {
  39877. type: Number,
  39878. default: 0
  39879. },
  39880. lowThreshold: {
  39881. type: Number,
  39882. default: 2
  39883. },
  39884. highThreshold: {
  39885. type: Number,
  39886. default: 4
  39887. },
  39888. max: {
  39889. type: Number,
  39890. default: 5
  39891. },
  39892. colors: {
  39893. type: [Array, Object],
  39894. default: function _default() {
  39895. return ['#F7BA2A', '#F7BA2A', '#F7BA2A'];
  39896. }
  39897. },
  39898. voidColor: {
  39899. type: String,
  39900. default: '#C6D1DE'
  39901. },
  39902. disabledVoidColor: {
  39903. type: String,
  39904. default: '#EFF2F7'
  39905. },
  39906. iconClasses: {
  39907. type: [Array, Object],
  39908. default: function _default() {
  39909. return ['el-icon-star-on', 'el-icon-star-on', 'el-icon-star-on'];
  39910. }
  39911. },
  39912. voidIconClass: {
  39913. type: String,
  39914. default: 'el-icon-star-off'
  39915. },
  39916. disabledVoidIconClass: {
  39917. type: String,
  39918. default: 'el-icon-star-on'
  39919. },
  39920. disabled: {
  39921. type: Boolean,
  39922. default: false
  39923. },
  39924. allowHalf: {
  39925. type: Boolean,
  39926. default: false
  39927. },
  39928. showText: {
  39929. type: Boolean,
  39930. default: false
  39931. },
  39932. showScore: {
  39933. type: Boolean,
  39934. default: false
  39935. },
  39936. textColor: {
  39937. type: String,
  39938. default: '#1f2d3d'
  39939. },
  39940. texts: {
  39941. type: Array,
  39942. default: function _default() {
  39943. return ['极差', '失望', '一般', '满意', '惊喜'];
  39944. }
  39945. },
  39946. scoreTemplate: {
  39947. type: String,
  39948. default: '{value}'
  39949. }
  39950. },
  39951. computed: {
  39952. text: function text() {
  39953. var result = '';
  39954. if (this.showScore) {
  39955. result = this.scoreTemplate.replace(/\{\s*value\s*\}/, this.rateDisabled ? this.value : this.currentValue);
  39956. } else if (this.showText) {
  39957. result = this.texts[Math.ceil(this.currentValue) - 1];
  39958. }
  39959. return result;
  39960. },
  39961. decimalStyle: function decimalStyle() {
  39962. var width = '';
  39963. if (this.rateDisabled) {
  39964. width = this.valueDecimal + '%';
  39965. } else if (this.allowHalf) {
  39966. width = '50%';
  39967. }
  39968. return {
  39969. color: this.activeColor,
  39970. width: width
  39971. };
  39972. },
  39973. valueDecimal: function valueDecimal() {
  39974. return this.value * 100 - Math.floor(this.value) * 100;
  39975. },
  39976. classMap: function classMap() {
  39977. var _ref;
  39978. return Array.isArray(this.iconClasses) ? (_ref = {}, _ref[this.lowThreshold] = this.iconClasses[0], _ref[this.highThreshold] = { value: this.iconClasses[1], excluded: true }, _ref[this.max] = this.iconClasses[2], _ref) : this.iconClasses;
  39979. },
  39980. decimalIconClass: function decimalIconClass() {
  39981. return this.getValueFromMap(this.value, this.classMap);
  39982. },
  39983. voidClass: function voidClass() {
  39984. return this.rateDisabled ? this.disabledVoidIconClass : this.voidIconClass;
  39985. },
  39986. activeClass: function activeClass() {
  39987. return this.getValueFromMap(this.currentValue, this.classMap);
  39988. },
  39989. colorMap: function colorMap() {
  39990. var _ref2;
  39991. return Array.isArray(this.colors) ? (_ref2 = {}, _ref2[this.lowThreshold] = this.colors[0], _ref2[this.highThreshold] = { value: this.colors[1], excluded: true }, _ref2[this.max] = this.colors[2], _ref2) : this.colors;
  39992. },
  39993. activeColor: function activeColor() {
  39994. return this.getValueFromMap(this.currentValue, this.colorMap);
  39995. },
  39996. classes: function classes() {
  39997. var result = [];
  39998. var i = 0;
  39999. var threshold = this.currentValue;
  40000. if (this.allowHalf && this.currentValue !== Math.floor(this.currentValue)) {
  40001. threshold--;
  40002. }
  40003. for (; i < threshold; i++) {
  40004. result.push(this.activeClass);
  40005. }
  40006. for (; i < this.max; i++) {
  40007. result.push(this.voidClass);
  40008. }
  40009. return result;
  40010. },
  40011. rateDisabled: function rateDisabled() {
  40012. return this.disabled || (this.elForm || {}).disabled;
  40013. }
  40014. },
  40015. watch: {
  40016. value: function value(val) {
  40017. this.currentValue = val;
  40018. this.pointerAtLeftHalf = this.value !== Math.floor(this.value);
  40019. }
  40020. },
  40021. methods: {
  40022. getMigratingConfig: function getMigratingConfig() {
  40023. return {
  40024. props: {
  40025. 'text-template': 'text-template is renamed to score-template.'
  40026. }
  40027. };
  40028. },
  40029. getValueFromMap: function getValueFromMap(value, map) {
  40030. var matchedKeys = Object.keys(map).filter(function (key) {
  40031. var val = map[key];
  40032. var excluded = Object(types_["isObject"])(val) ? val.excluded : false;
  40033. return excluded ? value < key : value <= key;
  40034. }).sort(function (a, b) {
  40035. return a - b;
  40036. });
  40037. var matchedValue = map[matchedKeys[0]];
  40038. return Object(types_["isObject"])(matchedValue) ? matchedValue.value : matchedValue || '';
  40039. },
  40040. showDecimalIcon: function showDecimalIcon(item) {
  40041. var showWhenDisabled = this.rateDisabled && this.valueDecimal > 0 && item - 1 < this.value && item > this.value;
  40042. /* istanbul ignore next */
  40043. var showWhenAllowHalf = this.allowHalf && this.pointerAtLeftHalf && item - 0.5 <= this.currentValue && item > this.currentValue;
  40044. return showWhenDisabled || showWhenAllowHalf;
  40045. },
  40046. getIconStyle: function getIconStyle(item) {
  40047. var voidColor = this.rateDisabled ? this.disabledVoidColor : this.voidColor;
  40048. return {
  40049. color: item <= this.currentValue ? this.activeColor : voidColor
  40050. };
  40051. },
  40052. selectValue: function selectValue(value) {
  40053. if (this.rateDisabled) {
  40054. return;
  40055. }
  40056. if (this.allowHalf && this.pointerAtLeftHalf) {
  40057. this.$emit('input', this.currentValue);
  40058. this.$emit('change', this.currentValue);
  40059. } else {
  40060. this.$emit('input', value);
  40061. this.$emit('change', value);
  40062. }
  40063. },
  40064. handleKey: function handleKey(e) {
  40065. if (this.rateDisabled) {
  40066. return;
  40067. }
  40068. var currentValue = this.currentValue;
  40069. var keyCode = e.keyCode;
  40070. if (keyCode === 38 || keyCode === 39) {
  40071. // left / down
  40072. if (this.allowHalf) {
  40073. currentValue += 0.5;
  40074. } else {
  40075. currentValue += 1;
  40076. }
  40077. e.stopPropagation();
  40078. e.preventDefault();
  40079. } else if (keyCode === 37 || keyCode === 40) {
  40080. if (this.allowHalf) {
  40081. currentValue -= 0.5;
  40082. } else {
  40083. currentValue -= 1;
  40084. }
  40085. e.stopPropagation();
  40086. e.preventDefault();
  40087. }
  40088. currentValue = currentValue < 0 ? 0 : currentValue;
  40089. currentValue = currentValue > this.max ? this.max : currentValue;
  40090. this.$emit('input', currentValue);
  40091. this.$emit('change', currentValue);
  40092. },
  40093. setCurrentValue: function setCurrentValue(value, event) {
  40094. if (this.rateDisabled) {
  40095. return;
  40096. }
  40097. /* istanbul ignore if */
  40098. if (this.allowHalf) {
  40099. var target = event.target;
  40100. if (Object(dom_["hasClass"])(target, 'el-rate__item')) {
  40101. target = target.querySelector('.el-rate__icon');
  40102. }
  40103. if (Object(dom_["hasClass"])(target, 'el-rate__decimal')) {
  40104. target = target.parentNode;
  40105. }
  40106. this.pointerAtLeftHalf = event.offsetX * 2 <= target.clientWidth;
  40107. this.currentValue = this.pointerAtLeftHalf ? value - 0.5 : value;
  40108. } else {
  40109. this.currentValue = value;
  40110. }
  40111. this.hoverIndex = value;
  40112. },
  40113. resetCurrentValue: function resetCurrentValue() {
  40114. if (this.rateDisabled) {
  40115. return;
  40116. }
  40117. if (this.allowHalf) {
  40118. this.pointerAtLeftHalf = this.value !== Math.floor(this.value);
  40119. }
  40120. this.currentValue = this.value;
  40121. this.hoverIndex = -1;
  40122. }
  40123. },
  40124. created: function created() {
  40125. if (!this.value) {
  40126. this.$emit('input', 0);
  40127. }
  40128. }
  40129. });
  40130. // CONCATENATED MODULE: ./packages/rate/src/main.vue?vue&type=script&lang=js&
  40131. /* harmony default export */ var packages_rate_src_mainvue_type_script_lang_js_ = (rate_src_mainvue_type_script_lang_js_);
  40132. // CONCATENATED MODULE: ./packages/rate/src/main.vue
  40133. /* normalize component */
  40134. var rate_src_main_component = normalizeComponent(
  40135. packages_rate_src_mainvue_type_script_lang_js_,
  40136. mainvue_type_template_id_ada57782_render,
  40137. mainvue_type_template_id_ada57782_staticRenderFns,
  40138. false,
  40139. null,
  40140. null,
  40141. null
  40142. )
  40143. /* hot reload */
  40144. if (false) { var rate_src_main_api; }
  40145. rate_src_main_component.options.__file = "packages/rate/src/main.vue"
  40146. /* harmony default export */ var rate_src_main = (rate_src_main_component.exports);
  40147. // CONCATENATED MODULE: ./packages/rate/index.js
  40148. /* istanbul ignore next */
  40149. rate_src_main.install = function (Vue) {
  40150. Vue.component(rate_src_main.name, rate_src_main);
  40151. };
  40152. /* harmony default export */ var rate = (rate_src_main);
  40153. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/steps.vue?vue&type=template&id=3c6b6dc0&
  40154. var stepsvue_type_template_id_3c6b6dc0_render = function() {
  40155. var _vm = this
  40156. var _h = _vm.$createElement
  40157. var _c = _vm._self._c || _h
  40158. return _c(
  40159. "div",
  40160. {
  40161. staticClass: "el-steps",
  40162. class: [
  40163. !_vm.simple && "el-steps--" + _vm.direction,
  40164. _vm.simple && "el-steps--simple"
  40165. ]
  40166. },
  40167. [_vm._t("default")],
  40168. 2
  40169. )
  40170. }
  40171. var stepsvue_type_template_id_3c6b6dc0_staticRenderFns = []
  40172. stepsvue_type_template_id_3c6b6dc0_render._withStripped = true
  40173. // CONCATENATED MODULE: ./packages/steps/src/steps.vue?vue&type=template&id=3c6b6dc0&
  40174. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/steps.vue?vue&type=script&lang=js&
  40175. //
  40176. //
  40177. //
  40178. //
  40179. //
  40180. //
  40181. //
  40182. //
  40183. //
  40184. //
  40185. //
  40186. /* harmony default export */ var stepsvue_type_script_lang_js_ = ({
  40187. name: 'ElSteps',
  40188. mixins: [migrating_default.a],
  40189. props: {
  40190. space: [Number, String],
  40191. active: Number,
  40192. direction: {
  40193. type: String,
  40194. default: 'horizontal'
  40195. },
  40196. alignCenter: Boolean,
  40197. simple: Boolean,
  40198. finishStatus: {
  40199. type: String,
  40200. default: 'finish'
  40201. },
  40202. processStatus: {
  40203. type: String,
  40204. default: 'process'
  40205. }
  40206. },
  40207. data: function data() {
  40208. return {
  40209. steps: [],
  40210. stepOffset: 0
  40211. };
  40212. },
  40213. methods: {
  40214. getMigratingConfig: function getMigratingConfig() {
  40215. return {
  40216. props: {
  40217. 'center': 'center is removed.'
  40218. }
  40219. };
  40220. }
  40221. },
  40222. watch: {
  40223. active: function active(newVal, oldVal) {
  40224. this.$emit('change', newVal, oldVal);
  40225. },
  40226. steps: function steps(_steps) {
  40227. _steps.forEach(function (child, index) {
  40228. child.index = index;
  40229. });
  40230. }
  40231. }
  40232. });
  40233. // CONCATENATED MODULE: ./packages/steps/src/steps.vue?vue&type=script&lang=js&
  40234. /* harmony default export */ var src_stepsvue_type_script_lang_js_ = (stepsvue_type_script_lang_js_);
  40235. // CONCATENATED MODULE: ./packages/steps/src/steps.vue
  40236. /* normalize component */
  40237. var steps_component = normalizeComponent(
  40238. src_stepsvue_type_script_lang_js_,
  40239. stepsvue_type_template_id_3c6b6dc0_render,
  40240. stepsvue_type_template_id_3c6b6dc0_staticRenderFns,
  40241. false,
  40242. null,
  40243. null,
  40244. null
  40245. )
  40246. /* hot reload */
  40247. if (false) { var steps_api; }
  40248. steps_component.options.__file = "packages/steps/src/steps.vue"
  40249. /* harmony default export */ var steps = (steps_component.exports);
  40250. // CONCATENATED MODULE: ./packages/steps/index.js
  40251. /* istanbul ignore next */
  40252. steps.install = function (Vue) {
  40253. Vue.component(steps.name, steps);
  40254. };
  40255. /* harmony default export */ var packages_steps = (steps);
  40256. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/step.vue?vue&type=template&id=f414a87a&
  40257. var stepvue_type_template_id_f414a87a_render = function() {
  40258. var _vm = this
  40259. var _h = _vm.$createElement
  40260. var _c = _vm._self._c || _h
  40261. return _c(
  40262. "div",
  40263. {
  40264. staticClass: "el-step",
  40265. class: [
  40266. !_vm.isSimple && "is-" + _vm.$parent.direction,
  40267. _vm.isSimple && "is-simple",
  40268. _vm.isLast && !_vm.space && !_vm.isCenter && "is-flex",
  40269. _vm.isCenter && !_vm.isVertical && !_vm.isSimple && "is-center"
  40270. ],
  40271. style: _vm.style
  40272. },
  40273. [
  40274. _c(
  40275. "div",
  40276. { staticClass: "el-step__head", class: "is-" + _vm.currentStatus },
  40277. [
  40278. _c(
  40279. "div",
  40280. {
  40281. staticClass: "el-step__line",
  40282. style: _vm.isLast
  40283. ? ""
  40284. : { marginRight: _vm.$parent.stepOffset + "px" }
  40285. },
  40286. [
  40287. _c("i", {
  40288. staticClass: "el-step__line-inner",
  40289. style: _vm.lineStyle
  40290. })
  40291. ]
  40292. ),
  40293. _c(
  40294. "div",
  40295. {
  40296. staticClass: "el-step__icon",
  40297. class: "is-" + (_vm.icon ? "icon" : "text")
  40298. },
  40299. [
  40300. _vm.currentStatus !== "success" && _vm.currentStatus !== "error"
  40301. ? _vm._t("icon", [
  40302. _vm.icon
  40303. ? _c("i", {
  40304. staticClass: "el-step__icon-inner",
  40305. class: [_vm.icon]
  40306. })
  40307. : _vm._e(),
  40308. !_vm.icon && !_vm.isSimple
  40309. ? _c("div", { staticClass: "el-step__icon-inner" }, [
  40310. _vm._v(_vm._s(_vm.index + 1))
  40311. ])
  40312. : _vm._e()
  40313. ])
  40314. : _c("i", {
  40315. staticClass: "el-step__icon-inner is-status",
  40316. class: [
  40317. "el-icon-" +
  40318. (_vm.currentStatus === "success" ? "check" : "close")
  40319. ]
  40320. })
  40321. ],
  40322. 2
  40323. )
  40324. ]
  40325. ),
  40326. _c("div", { staticClass: "el-step__main" }, [
  40327. _c(
  40328. "div",
  40329. {
  40330. ref: "title",
  40331. staticClass: "el-step__title",
  40332. class: ["is-" + _vm.currentStatus]
  40333. },
  40334. [_vm._t("title", [_vm._v(_vm._s(_vm.title))])],
  40335. 2
  40336. ),
  40337. _vm.isSimple
  40338. ? _c("div", { staticClass: "el-step__arrow" })
  40339. : _c(
  40340. "div",
  40341. {
  40342. staticClass: "el-step__description",
  40343. class: ["is-" + _vm.currentStatus]
  40344. },
  40345. [_vm._t("description", [_vm._v(_vm._s(_vm.description))])],
  40346. 2
  40347. )
  40348. ])
  40349. ]
  40350. )
  40351. }
  40352. var stepvue_type_template_id_f414a87a_staticRenderFns = []
  40353. stepvue_type_template_id_f414a87a_render._withStripped = true
  40354. // CONCATENATED MODULE: ./packages/steps/src/step.vue?vue&type=template&id=f414a87a&
  40355. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/step.vue?vue&type=script&lang=js&
  40356. //
  40357. //
  40358. //
  40359. //
  40360. //
  40361. //
  40362. //
  40363. //
  40364. //
  40365. //
  40366. //
  40367. //
  40368. //
  40369. //
  40370. //
  40371. //
  40372. //
  40373. //
  40374. //
  40375. //
  40376. //
  40377. //
  40378. //
  40379. //
  40380. //
  40381. //
  40382. //
  40383. //
  40384. //
  40385. //
  40386. //
  40387. //
  40388. //
  40389. //
  40390. //
  40391. //
  40392. //
  40393. //
  40394. //
  40395. //
  40396. //
  40397. //
  40398. //
  40399. //
  40400. //
  40401. //
  40402. //
  40403. //
  40404. //
  40405. //
  40406. //
  40407. //
  40408. //
  40409. //
  40410. //
  40411. /* harmony default export */ var stepvue_type_script_lang_js_ = ({
  40412. name: 'ElStep',
  40413. props: {
  40414. title: String,
  40415. icon: String,
  40416. description: String,
  40417. status: String
  40418. },
  40419. data: function data() {
  40420. return {
  40421. index: -1,
  40422. lineStyle: {},
  40423. internalStatus: ''
  40424. };
  40425. },
  40426. beforeCreate: function beforeCreate() {
  40427. this.$parent.steps.push(this);
  40428. },
  40429. beforeDestroy: function beforeDestroy() {
  40430. var steps = this.$parent.steps;
  40431. var index = steps.indexOf(this);
  40432. if (index >= 0) {
  40433. steps.splice(index, 1);
  40434. }
  40435. },
  40436. computed: {
  40437. currentStatus: function currentStatus() {
  40438. return this.status || this.internalStatus;
  40439. },
  40440. prevStatus: function prevStatus() {
  40441. var prevStep = this.$parent.steps[this.index - 1];
  40442. return prevStep ? prevStep.currentStatus : 'wait';
  40443. },
  40444. isCenter: function isCenter() {
  40445. return this.$parent.alignCenter;
  40446. },
  40447. isVertical: function isVertical() {
  40448. return this.$parent.direction === 'vertical';
  40449. },
  40450. isSimple: function isSimple() {
  40451. return this.$parent.simple;
  40452. },
  40453. isLast: function isLast() {
  40454. var parent = this.$parent;
  40455. return parent.steps[parent.steps.length - 1] === this;
  40456. },
  40457. stepsCount: function stepsCount() {
  40458. return this.$parent.steps.length;
  40459. },
  40460. space: function space() {
  40461. var isSimple = this.isSimple,
  40462. space = this.$parent.space;
  40463. return isSimple ? '' : space;
  40464. },
  40465. style: function style() {
  40466. var style = {};
  40467. var parent = this.$parent;
  40468. var len = parent.steps.length;
  40469. var space = typeof this.space === 'number' ? this.space + 'px' : this.space ? this.space : 100 / (len - (this.isCenter ? 0 : 1)) + '%';
  40470. style.flexBasis = space;
  40471. if (this.isVertical) return style;
  40472. if (this.isLast) {
  40473. style.maxWidth = 100 / this.stepsCount + '%';
  40474. } else {
  40475. style.marginRight = -this.$parent.stepOffset + 'px';
  40476. }
  40477. return style;
  40478. }
  40479. },
  40480. methods: {
  40481. updateStatus: function updateStatus(val) {
  40482. var prevChild = this.$parent.$children[this.index - 1];
  40483. if (val > this.index) {
  40484. this.internalStatus = this.$parent.finishStatus;
  40485. } else if (val === this.index && this.prevStatus !== 'error') {
  40486. this.internalStatus = this.$parent.processStatus;
  40487. } else {
  40488. this.internalStatus = 'wait';
  40489. }
  40490. if (prevChild) prevChild.calcProgress(this.internalStatus);
  40491. },
  40492. calcProgress: function calcProgress(status) {
  40493. var step = 100;
  40494. var style = {};
  40495. style.transitionDelay = 150 * this.index + 'ms';
  40496. if (status === this.$parent.processStatus) {
  40497. step = this.currentStatus !== 'error' ? 0 : 0;
  40498. } else if (status === 'wait') {
  40499. step = 0;
  40500. style.transitionDelay = -150 * this.index + 'ms';
  40501. }
  40502. style.borderWidth = step && !this.isSimple ? '1px' : 0;
  40503. this.$parent.direction === 'vertical' ? style.height = step + '%' : style.width = step + '%';
  40504. this.lineStyle = style;
  40505. }
  40506. },
  40507. mounted: function mounted() {
  40508. var _this = this;
  40509. var unwatch = this.$watch('index', function (val) {
  40510. _this.$watch('$parent.active', _this.updateStatus, { immediate: true });
  40511. _this.$watch('$parent.processStatus', function () {
  40512. var activeIndex = _this.$parent.active;
  40513. _this.updateStatus(activeIndex);
  40514. }, { immediate: true });
  40515. unwatch();
  40516. });
  40517. }
  40518. });
  40519. // CONCATENATED MODULE: ./packages/steps/src/step.vue?vue&type=script&lang=js&
  40520. /* harmony default export */ var src_stepvue_type_script_lang_js_ = (stepvue_type_script_lang_js_);
  40521. // CONCATENATED MODULE: ./packages/steps/src/step.vue
  40522. /* normalize component */
  40523. var step_component = normalizeComponent(
  40524. src_stepvue_type_script_lang_js_,
  40525. stepvue_type_template_id_f414a87a_render,
  40526. stepvue_type_template_id_f414a87a_staticRenderFns,
  40527. false,
  40528. null,
  40529. null,
  40530. null
  40531. )
  40532. /* hot reload */
  40533. if (false) { var step_api; }
  40534. step_component.options.__file = "packages/steps/src/step.vue"
  40535. /* harmony default export */ var step = (step_component.exports);
  40536. // CONCATENATED MODULE: ./packages/step/index.js
  40537. /* istanbul ignore next */
  40538. step.install = function (Vue) {
  40539. Vue.component(step.name, step);
  40540. };
  40541. /* harmony default export */ var packages_step = (step);
  40542. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/main.vue?vue&type=template&id=5d5d1482&
  40543. var mainvue_type_template_id_5d5d1482_render = function() {
  40544. var _vm = this
  40545. var _h = _vm.$createElement
  40546. var _c = _vm._self._c || _h
  40547. return _c(
  40548. "div",
  40549. {
  40550. class: _vm.carouselClasses,
  40551. on: {
  40552. mouseenter: function($event) {
  40553. $event.stopPropagation()
  40554. return _vm.handleMouseEnter($event)
  40555. },
  40556. mouseleave: function($event) {
  40557. $event.stopPropagation()
  40558. return _vm.handleMouseLeave($event)
  40559. }
  40560. }
  40561. },
  40562. [
  40563. _c(
  40564. "div",
  40565. {
  40566. staticClass: "el-carousel__container",
  40567. style: { height: _vm.height }
  40568. },
  40569. [
  40570. _vm.arrowDisplay
  40571. ? _c("transition", { attrs: { name: "carousel-arrow-left" } }, [
  40572. _c(
  40573. "button",
  40574. {
  40575. directives: [
  40576. {
  40577. name: "show",
  40578. rawName: "v-show",
  40579. value:
  40580. (_vm.arrow === "always" || _vm.hover) &&
  40581. (_vm.loop || _vm.activeIndex > 0),
  40582. expression:
  40583. "(arrow === 'always' || hover) && (loop || activeIndex > 0)"
  40584. }
  40585. ],
  40586. staticClass: "el-carousel__arrow el-carousel__arrow--left",
  40587. attrs: { type: "button" },
  40588. on: {
  40589. mouseenter: function($event) {
  40590. _vm.handleButtonEnter("left")
  40591. },
  40592. mouseleave: _vm.handleButtonLeave,
  40593. click: function($event) {
  40594. $event.stopPropagation()
  40595. _vm.throttledArrowClick(_vm.activeIndex - 1)
  40596. }
  40597. }
  40598. },
  40599. [_c("i", { staticClass: "el-icon-arrow-left" })]
  40600. )
  40601. ])
  40602. : _vm._e(),
  40603. _vm.arrowDisplay
  40604. ? _c("transition", { attrs: { name: "carousel-arrow-right" } }, [
  40605. _c(
  40606. "button",
  40607. {
  40608. directives: [
  40609. {
  40610. name: "show",
  40611. rawName: "v-show",
  40612. value:
  40613. (_vm.arrow === "always" || _vm.hover) &&
  40614. (_vm.loop || _vm.activeIndex < _vm.items.length - 1),
  40615. expression:
  40616. "(arrow === 'always' || hover) && (loop || activeIndex < items.length - 1)"
  40617. }
  40618. ],
  40619. staticClass: "el-carousel__arrow el-carousel__arrow--right",
  40620. attrs: { type: "button" },
  40621. on: {
  40622. mouseenter: function($event) {
  40623. _vm.handleButtonEnter("right")
  40624. },
  40625. mouseleave: _vm.handleButtonLeave,
  40626. click: function($event) {
  40627. $event.stopPropagation()
  40628. _vm.throttledArrowClick(_vm.activeIndex + 1)
  40629. }
  40630. }
  40631. },
  40632. [_c("i", { staticClass: "el-icon-arrow-right" })]
  40633. )
  40634. ])
  40635. : _vm._e(),
  40636. _vm._t("default")
  40637. ],
  40638. 2
  40639. ),
  40640. _vm.indicatorPosition !== "none"
  40641. ? _c(
  40642. "ul",
  40643. { class: _vm.indicatorsClasses },
  40644. _vm._l(_vm.items, function(item, index) {
  40645. return _c(
  40646. "li",
  40647. {
  40648. key: index,
  40649. class: [
  40650. "el-carousel__indicator",
  40651. "el-carousel__indicator--" + _vm.direction,
  40652. { "is-active": index === _vm.activeIndex }
  40653. ],
  40654. on: {
  40655. mouseenter: function($event) {
  40656. _vm.throttledIndicatorHover(index)
  40657. },
  40658. click: function($event) {
  40659. $event.stopPropagation()
  40660. _vm.handleIndicatorClick(index)
  40661. }
  40662. }
  40663. },
  40664. [
  40665. _c("button", { staticClass: "el-carousel__button" }, [
  40666. _vm.hasLabel
  40667. ? _c("span", [_vm._v(_vm._s(item.label))])
  40668. : _vm._e()
  40669. ])
  40670. ]
  40671. )
  40672. }),
  40673. 0
  40674. )
  40675. : _vm._e()
  40676. ]
  40677. )
  40678. }
  40679. var mainvue_type_template_id_5d5d1482_staticRenderFns = []
  40680. mainvue_type_template_id_5d5d1482_render._withStripped = true
  40681. // CONCATENATED MODULE: ./packages/carousel/src/main.vue?vue&type=template&id=5d5d1482&
  40682. // EXTERNAL MODULE: external "throttle-debounce/throttle"
  40683. var throttle_ = __webpack_require__(25);
  40684. var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_);
  40685. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/main.vue?vue&type=script&lang=js&
  40686. //
  40687. //
  40688. //
  40689. //
  40690. //
  40691. //
  40692. //
  40693. //
  40694. //
  40695. //
  40696. //
  40697. //
  40698. //
  40699. //
  40700. //
  40701. //
  40702. //
  40703. //
  40704. //
  40705. //
  40706. //
  40707. //
  40708. //
  40709. //
  40710. //
  40711. //
  40712. //
  40713. //
  40714. //
  40715. //
  40716. //
  40717. //
  40718. //
  40719. //
  40720. //
  40721. //
  40722. //
  40723. //
  40724. //
  40725. //
  40726. //
  40727. //
  40728. //
  40729. //
  40730. //
  40731. //
  40732. //
  40733. //
  40734. //
  40735. //
  40736. //
  40737. //
  40738. //
  40739. //
  40740. //
  40741. //
  40742. /* harmony default export */ var carousel_src_mainvue_type_script_lang_js_ = ({
  40743. name: 'ElCarousel',
  40744. props: {
  40745. initialIndex: {
  40746. type: Number,
  40747. default: 0
  40748. },
  40749. height: String,
  40750. trigger: {
  40751. type: String,
  40752. default: 'hover'
  40753. },
  40754. autoplay: {
  40755. type: Boolean,
  40756. default: true
  40757. },
  40758. interval: {
  40759. type: Number,
  40760. default: 3000
  40761. },
  40762. indicatorPosition: String,
  40763. indicator: {
  40764. type: Boolean,
  40765. default: true
  40766. },
  40767. arrow: {
  40768. type: String,
  40769. default: 'hover'
  40770. },
  40771. type: String,
  40772. loop: {
  40773. type: Boolean,
  40774. default: true
  40775. },
  40776. direction: {
  40777. type: String,
  40778. default: 'horizontal',
  40779. validator: function validator(val) {
  40780. return ['horizontal', 'vertical'].indexOf(val) !== -1;
  40781. }
  40782. }
  40783. },
  40784. data: function data() {
  40785. return {
  40786. items: [],
  40787. activeIndex: -1,
  40788. containerWidth: 0,
  40789. timer: null,
  40790. hover: false
  40791. };
  40792. },
  40793. computed: {
  40794. arrowDisplay: function arrowDisplay() {
  40795. return this.arrow !== 'never' && this.direction !== 'vertical';
  40796. },
  40797. hasLabel: function hasLabel() {
  40798. return this.items.some(function (item) {
  40799. return item.label.toString().length > 0;
  40800. });
  40801. },
  40802. carouselClasses: function carouselClasses() {
  40803. var classes = ['el-carousel', 'el-carousel--' + this.direction];
  40804. if (this.type === 'card') {
  40805. classes.push('el-carousel--card');
  40806. }
  40807. return classes;
  40808. },
  40809. indicatorsClasses: function indicatorsClasses() {
  40810. var classes = ['el-carousel__indicators', 'el-carousel__indicators--' + this.direction];
  40811. if (this.hasLabel) {
  40812. classes.push('el-carousel__indicators--labels');
  40813. }
  40814. if (this.indicatorPosition === 'outside' || this.type === 'card') {
  40815. classes.push('el-carousel__indicators--outside');
  40816. }
  40817. return classes;
  40818. }
  40819. },
  40820. watch: {
  40821. items: function items(val) {
  40822. if (val.length > 0) this.setActiveItem(this.initialIndex);
  40823. },
  40824. activeIndex: function activeIndex(val, oldVal) {
  40825. this.resetItemPosition(oldVal);
  40826. if (oldVal > -1) {
  40827. this.$emit('change', val, oldVal);
  40828. }
  40829. },
  40830. autoplay: function autoplay(val) {
  40831. val ? this.startTimer() : this.pauseTimer();
  40832. },
  40833. loop: function loop() {
  40834. this.setActiveItem(this.activeIndex);
  40835. },
  40836. interval: function interval() {
  40837. this.pauseTimer();
  40838. this.startTimer();
  40839. }
  40840. },
  40841. methods: {
  40842. handleMouseEnter: function handleMouseEnter() {
  40843. this.hover = true;
  40844. this.pauseTimer();
  40845. },
  40846. handleMouseLeave: function handleMouseLeave() {
  40847. this.hover = false;
  40848. this.startTimer();
  40849. },
  40850. itemInStage: function itemInStage(item, index) {
  40851. var length = this.items.length;
  40852. if (index === length - 1 && item.inStage && this.items[0].active || item.inStage && this.items[index + 1] && this.items[index + 1].active) {
  40853. return 'left';
  40854. } else if (index === 0 && item.inStage && this.items[length - 1].active || item.inStage && this.items[index - 1] && this.items[index - 1].active) {
  40855. return 'right';
  40856. }
  40857. return false;
  40858. },
  40859. handleButtonEnter: function handleButtonEnter(arrow) {
  40860. var _this = this;
  40861. if (this.direction === 'vertical') return;
  40862. this.items.forEach(function (item, index) {
  40863. if (arrow === _this.itemInStage(item, index)) {
  40864. item.hover = true;
  40865. }
  40866. });
  40867. },
  40868. handleButtonLeave: function handleButtonLeave() {
  40869. if (this.direction === 'vertical') return;
  40870. this.items.forEach(function (item) {
  40871. item.hover = false;
  40872. });
  40873. },
  40874. updateItems: function updateItems() {
  40875. this.items = this.$children.filter(function (child) {
  40876. return child.$options.name === 'ElCarouselItem';
  40877. });
  40878. },
  40879. resetItemPosition: function resetItemPosition(oldIndex) {
  40880. var _this2 = this;
  40881. this.items.forEach(function (item, index) {
  40882. item.translateItem(index, _this2.activeIndex, oldIndex);
  40883. });
  40884. },
  40885. playSlides: function playSlides() {
  40886. if (this.activeIndex < this.items.length - 1) {
  40887. this.activeIndex++;
  40888. } else if (this.loop) {
  40889. this.activeIndex = 0;
  40890. }
  40891. },
  40892. pauseTimer: function pauseTimer() {
  40893. if (this.timer) {
  40894. clearInterval(this.timer);
  40895. this.timer = null;
  40896. }
  40897. },
  40898. startTimer: function startTimer() {
  40899. if (this.interval <= 0 || !this.autoplay || this.timer) return;
  40900. this.timer = setInterval(this.playSlides, this.interval);
  40901. },
  40902. resetTimer: function resetTimer() {
  40903. this.pauseTimer();
  40904. this.startTimer();
  40905. },
  40906. setActiveItem: function setActiveItem(index) {
  40907. if (typeof index === 'string') {
  40908. var filteredItems = this.items.filter(function (item) {
  40909. return item.name === index;
  40910. });
  40911. if (filteredItems.length > 0) {
  40912. index = this.items.indexOf(filteredItems[0]);
  40913. }
  40914. }
  40915. index = Number(index);
  40916. if (isNaN(index) || index !== Math.floor(index)) {
  40917. console.warn('[Element Warn][Carousel]index must be an integer.');
  40918. return;
  40919. }
  40920. var length = this.items.length;
  40921. var oldIndex = this.activeIndex;
  40922. if (index < 0) {
  40923. this.activeIndex = this.loop ? length - 1 : 0;
  40924. } else if (index >= length) {
  40925. this.activeIndex = this.loop ? 0 : length - 1;
  40926. } else {
  40927. this.activeIndex = index;
  40928. }
  40929. if (oldIndex === this.activeIndex) {
  40930. this.resetItemPosition(oldIndex);
  40931. }
  40932. this.resetTimer();
  40933. },
  40934. prev: function prev() {
  40935. this.setActiveItem(this.activeIndex - 1);
  40936. },
  40937. next: function next() {
  40938. this.setActiveItem(this.activeIndex + 1);
  40939. },
  40940. handleIndicatorClick: function handleIndicatorClick(index) {
  40941. this.activeIndex = index;
  40942. },
  40943. handleIndicatorHover: function handleIndicatorHover(index) {
  40944. if (this.trigger === 'hover' && index !== this.activeIndex) {
  40945. this.activeIndex = index;
  40946. }
  40947. }
  40948. },
  40949. created: function created() {
  40950. var _this3 = this;
  40951. this.throttledArrowClick = throttle_default()(300, true, function (index) {
  40952. _this3.setActiveItem(index);
  40953. });
  40954. this.throttledIndicatorHover = throttle_default()(300, function (index) {
  40955. _this3.handleIndicatorHover(index);
  40956. });
  40957. },
  40958. mounted: function mounted() {
  40959. var _this4 = this;
  40960. this.updateItems();
  40961. this.$nextTick(function () {
  40962. Object(resize_event_["addResizeListener"])(_this4.$el, _this4.resetItemPosition);
  40963. if (_this4.initialIndex < _this4.items.length && _this4.initialIndex >= 0) {
  40964. _this4.activeIndex = _this4.initialIndex;
  40965. }
  40966. _this4.startTimer();
  40967. });
  40968. },
  40969. beforeDestroy: function beforeDestroy() {
  40970. if (this.$el) Object(resize_event_["removeResizeListener"])(this.$el, this.resetItemPosition);
  40971. this.pauseTimer();
  40972. }
  40973. });
  40974. // CONCATENATED MODULE: ./packages/carousel/src/main.vue?vue&type=script&lang=js&
  40975. /* harmony default export */ var packages_carousel_src_mainvue_type_script_lang_js_ = (carousel_src_mainvue_type_script_lang_js_);
  40976. // CONCATENATED MODULE: ./packages/carousel/src/main.vue
  40977. /* normalize component */
  40978. var carousel_src_main_component = normalizeComponent(
  40979. packages_carousel_src_mainvue_type_script_lang_js_,
  40980. mainvue_type_template_id_5d5d1482_render,
  40981. mainvue_type_template_id_5d5d1482_staticRenderFns,
  40982. false,
  40983. null,
  40984. null,
  40985. null
  40986. )
  40987. /* hot reload */
  40988. if (false) { var carousel_src_main_api; }
  40989. carousel_src_main_component.options.__file = "packages/carousel/src/main.vue"
  40990. /* harmony default export */ var carousel_src_main = (carousel_src_main_component.exports);
  40991. // CONCATENATED MODULE: ./packages/carousel/index.js
  40992. /* istanbul ignore next */
  40993. carousel_src_main.install = function (Vue) {
  40994. Vue.component(carousel_src_main.name, carousel_src_main);
  40995. };
  40996. /* harmony default export */ var carousel = (carousel_src_main);
  40997. // CONCATENATED MODULE: ./packages/scrollbar/src/util.js
  40998. var BAR_MAP = {
  40999. vertical: {
  41000. offset: 'offsetHeight',
  41001. scroll: 'scrollTop',
  41002. scrollSize: 'scrollHeight',
  41003. size: 'height',
  41004. key: 'vertical',
  41005. axis: 'Y',
  41006. client: 'clientY',
  41007. direction: 'top'
  41008. },
  41009. horizontal: {
  41010. offset: 'offsetWidth',
  41011. scroll: 'scrollLeft',
  41012. scrollSize: 'scrollWidth',
  41013. size: 'width',
  41014. key: 'horizontal',
  41015. axis: 'X',
  41016. client: 'clientX',
  41017. direction: 'left'
  41018. }
  41019. };
  41020. function renderThumbStyle(_ref) {
  41021. var move = _ref.move,
  41022. size = _ref.size,
  41023. bar = _ref.bar;
  41024. var style = {};
  41025. var translate = 'translate' + bar.axis + '(' + move + '%)';
  41026. style[bar.size] = size;
  41027. style.transform = translate;
  41028. style.msTransform = translate;
  41029. style.webkitTransform = translate;
  41030. return style;
  41031. };
  41032. // CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
  41033. /* istanbul ignore next */
  41034. /* harmony default export */ var src_bar = ({
  41035. name: 'Bar',
  41036. props: {
  41037. vertical: Boolean,
  41038. size: String,
  41039. move: Number
  41040. },
  41041. computed: {
  41042. bar: function bar() {
  41043. return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
  41044. },
  41045. wrap: function wrap() {
  41046. return this.$parent.wrap;
  41047. }
  41048. },
  41049. render: function render(h) {
  41050. var size = this.size,
  41051. move = this.move,
  41052. bar = this.bar;
  41053. return h(
  41054. 'div',
  41055. {
  41056. 'class': ['el-scrollbar__bar', 'is-' + bar.key],
  41057. on: {
  41058. 'mousedown': this.clickTrackHandler
  41059. }
  41060. },
  41061. [h('div', {
  41062. ref: 'thumb',
  41063. 'class': 'el-scrollbar__thumb',
  41064. on: {
  41065. 'mousedown': this.clickThumbHandler
  41066. },
  41067. style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
  41068. );
  41069. },
  41070. methods: {
  41071. clickThumbHandler: function clickThumbHandler(e) {
  41072. // prevent click event of right button
  41073. if (e.ctrlKey || e.button === 2) {
  41074. return;
  41075. }
  41076. this.startDrag(e);
  41077. this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
  41078. },
  41079. clickTrackHandler: function clickTrackHandler(e) {
  41080. var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
  41081. var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
  41082. var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
  41083. this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
  41084. },
  41085. startDrag: function startDrag(e) {
  41086. e.stopImmediatePropagation();
  41087. this.cursorDown = true;
  41088. Object(dom_["on"])(document, 'mousemove', this.mouseMoveDocumentHandler);
  41089. Object(dom_["on"])(document, 'mouseup', this.mouseUpDocumentHandler);
  41090. document.onselectstart = function () {
  41091. return false;
  41092. };
  41093. },
  41094. mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
  41095. if (this.cursorDown === false) return;
  41096. var prevPage = this[this.bar.axis];
  41097. if (!prevPage) return;
  41098. var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
  41099. var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
  41100. var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
  41101. this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
  41102. },
  41103. mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
  41104. this.cursorDown = false;
  41105. this[this.bar.axis] = 0;
  41106. Object(dom_["off"])(document, 'mousemove', this.mouseMoveDocumentHandler);
  41107. document.onselectstart = null;
  41108. }
  41109. },
  41110. destroyed: function destroyed() {
  41111. Object(dom_["off"])(document, 'mouseup', this.mouseUpDocumentHandler);
  41112. }
  41113. });
  41114. // CONCATENATED MODULE: ./packages/scrollbar/src/main.js
  41115. // reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
  41116. /* istanbul ignore next */
  41117. /* harmony default export */ var scrollbar_src_main = ({
  41118. name: 'ElScrollbar',
  41119. components: { Bar: src_bar },
  41120. props: {
  41121. native: Boolean,
  41122. wrapStyle: {},
  41123. wrapClass: {},
  41124. viewClass: {},
  41125. viewStyle: {},
  41126. noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
  41127. tag: {
  41128. type: String,
  41129. default: 'div'
  41130. }
  41131. },
  41132. data: function data() {
  41133. return {
  41134. sizeWidth: '0',
  41135. sizeHeight: '0',
  41136. moveX: 0,
  41137. moveY: 0
  41138. };
  41139. },
  41140. computed: {
  41141. wrap: function wrap() {
  41142. return this.$refs.wrap;
  41143. }
  41144. },
  41145. render: function render(h) {
  41146. var gutter = scrollbar_width_default()();
  41147. var style = this.wrapStyle;
  41148. if (gutter) {
  41149. var gutterWith = '-' + gutter + 'px';
  41150. var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
  41151. if (Array.isArray(this.wrapStyle)) {
  41152. style = Object(util_["toObject"])(this.wrapStyle);
  41153. style.marginRight = style.marginBottom = gutterWith;
  41154. } else if (typeof this.wrapStyle === 'string') {
  41155. style += gutterStyle;
  41156. } else {
  41157. style = gutterStyle;
  41158. }
  41159. }
  41160. var view = h(this.tag, {
  41161. class: ['el-scrollbar__view', this.viewClass],
  41162. style: this.viewStyle,
  41163. ref: 'resize'
  41164. }, this.$slots.default);
  41165. var wrap = h(
  41166. 'div',
  41167. {
  41168. ref: 'wrap',
  41169. style: style,
  41170. on: {
  41171. 'scroll': this.handleScroll
  41172. },
  41173. 'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
  41174. [[view]]
  41175. );
  41176. var nodes = void 0;
  41177. if (!this.native) {
  41178. nodes = [wrap, h(src_bar, {
  41179. attrs: {
  41180. move: this.moveX,
  41181. size: this.sizeWidth }
  41182. }), h(src_bar, {
  41183. attrs: {
  41184. vertical: true,
  41185. move: this.moveY,
  41186. size: this.sizeHeight }
  41187. })];
  41188. } else {
  41189. nodes = [h(
  41190. 'div',
  41191. {
  41192. ref: 'wrap',
  41193. 'class': [this.wrapClass, 'el-scrollbar__wrap'],
  41194. style: style },
  41195. [[view]]
  41196. )];
  41197. }
  41198. return h('div', { class: 'el-scrollbar' }, nodes);
  41199. },
  41200. methods: {
  41201. handleScroll: function handleScroll() {
  41202. var wrap = this.wrap;
  41203. this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
  41204. this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
  41205. },
  41206. update: function update() {
  41207. var heightPercentage = void 0,
  41208. widthPercentage = void 0;
  41209. var wrap = this.wrap;
  41210. if (!wrap) return;
  41211. heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
  41212. widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
  41213. this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
  41214. this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
  41215. }
  41216. },
  41217. mounted: function mounted() {
  41218. if (this.native) return;
  41219. this.$nextTick(this.update);
  41220. !this.noresize && Object(resize_event_["addResizeListener"])(this.$refs.resize, this.update);
  41221. },
  41222. beforeDestroy: function beforeDestroy() {
  41223. if (this.native) return;
  41224. !this.noresize && Object(resize_event_["removeResizeListener"])(this.$refs.resize, this.update);
  41225. }
  41226. });
  41227. // CONCATENATED MODULE: ./packages/scrollbar/index.js
  41228. /* istanbul ignore next */
  41229. scrollbar_src_main.install = function (Vue) {
  41230. Vue.component(scrollbar_src_main.name, scrollbar_src_main);
  41231. };
  41232. /* harmony default export */ var scrollbar = (scrollbar_src_main);
  41233. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/item.vue?vue&type=template&id=1801ae19&
  41234. var itemvue_type_template_id_1801ae19_render = function() {
  41235. var _vm = this
  41236. var _h = _vm.$createElement
  41237. var _c = _vm._self._c || _h
  41238. return _c(
  41239. "div",
  41240. {
  41241. directives: [
  41242. {
  41243. name: "show",
  41244. rawName: "v-show",
  41245. value: _vm.ready,
  41246. expression: "ready"
  41247. }
  41248. ],
  41249. staticClass: "el-carousel__item",
  41250. class: {
  41251. "is-active": _vm.active,
  41252. "el-carousel__item--card": _vm.$parent.type === "card",
  41253. "is-in-stage": _vm.inStage,
  41254. "is-hover": _vm.hover,
  41255. "is-animating": _vm.animating
  41256. },
  41257. style: _vm.itemStyle,
  41258. on: { click: _vm.handleItemClick }
  41259. },
  41260. [
  41261. _vm.$parent.type === "card"
  41262. ? _c("div", {
  41263. directives: [
  41264. {
  41265. name: "show",
  41266. rawName: "v-show",
  41267. value: !_vm.active,
  41268. expression: "!active"
  41269. }
  41270. ],
  41271. staticClass: "el-carousel__mask"
  41272. })
  41273. : _vm._e(),
  41274. _vm._t("default")
  41275. ],
  41276. 2
  41277. )
  41278. }
  41279. var itemvue_type_template_id_1801ae19_staticRenderFns = []
  41280. itemvue_type_template_id_1801ae19_render._withStripped = true
  41281. // CONCATENATED MODULE: ./packages/carousel/src/item.vue?vue&type=template&id=1801ae19&
  41282. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/item.vue?vue&type=script&lang=js&
  41283. //
  41284. //
  41285. //
  41286. //
  41287. //
  41288. //
  41289. //
  41290. //
  41291. //
  41292. //
  41293. //
  41294. //
  41295. //
  41296. //
  41297. //
  41298. //
  41299. //
  41300. //
  41301. //
  41302. //
  41303. //
  41304. //
  41305. var CARD_SCALE = 0.83;
  41306. /* harmony default export */ var itemvue_type_script_lang_js_ = ({
  41307. name: 'ElCarouselItem',
  41308. props: {
  41309. name: String,
  41310. label: {
  41311. type: [String, Number],
  41312. default: ''
  41313. }
  41314. },
  41315. data: function data() {
  41316. return {
  41317. hover: false,
  41318. translate: 0,
  41319. scale: 1,
  41320. active: false,
  41321. ready: false,
  41322. inStage: false,
  41323. animating: false
  41324. };
  41325. },
  41326. methods: {
  41327. processIndex: function processIndex(index, activeIndex, length) {
  41328. if (activeIndex === 0 && index === length - 1) {
  41329. return -1;
  41330. } else if (activeIndex === length - 1 && index === 0) {
  41331. return length;
  41332. } else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
  41333. return length + 1;
  41334. } else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
  41335. return -2;
  41336. }
  41337. return index;
  41338. },
  41339. calcCardTranslate: function calcCardTranslate(index, activeIndex) {
  41340. var parentWidth = this.$parent.$el.offsetWidth;
  41341. if (this.inStage) {
  41342. return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
  41343. } else if (index < activeIndex) {
  41344. return -(1 + CARD_SCALE) * parentWidth / 4;
  41345. } else {
  41346. return (3 + CARD_SCALE) * parentWidth / 4;
  41347. }
  41348. },
  41349. calcTranslate: function calcTranslate(index, activeIndex, isVertical) {
  41350. var distance = this.$parent.$el[isVertical ? 'offsetHeight' : 'offsetWidth'];
  41351. return distance * (index - activeIndex);
  41352. },
  41353. translateItem: function translateItem(index, activeIndex, oldIndex) {
  41354. var parentType = this.$parent.type;
  41355. var parentDirection = this.parentDirection;
  41356. var length = this.$parent.items.length;
  41357. if (parentType !== 'card' && oldIndex !== undefined) {
  41358. this.animating = index === activeIndex || index === oldIndex;
  41359. }
  41360. if (index !== activeIndex && length > 2 && this.$parent.loop) {
  41361. index = this.processIndex(index, activeIndex, length);
  41362. }
  41363. if (parentType === 'card') {
  41364. if (parentDirection === 'vertical') {
  41365. console.warn('[Element Warn][Carousel]vertical direction is not supported in card mode');
  41366. }
  41367. this.inStage = Math.round(Math.abs(index - activeIndex)) <= 1;
  41368. this.active = index === activeIndex;
  41369. this.translate = this.calcCardTranslate(index, activeIndex);
  41370. this.scale = this.active ? 1 : CARD_SCALE;
  41371. } else {
  41372. this.active = index === activeIndex;
  41373. var isVertical = parentDirection === 'vertical';
  41374. this.translate = this.calcTranslate(index, activeIndex, isVertical);
  41375. this.scale = 1;
  41376. }
  41377. this.ready = true;
  41378. },
  41379. handleItemClick: function handleItemClick() {
  41380. var parent = this.$parent;
  41381. if (parent && parent.type === 'card') {
  41382. var index = parent.items.indexOf(this);
  41383. parent.setActiveItem(index);
  41384. }
  41385. }
  41386. },
  41387. computed: {
  41388. parentDirection: function parentDirection() {
  41389. return this.$parent.direction;
  41390. },
  41391. itemStyle: function itemStyle() {
  41392. var translateType = this.parentDirection === 'vertical' ? 'translateY' : 'translateX';
  41393. var value = translateType + '(' + this.translate + 'px) scale(' + this.scale + ')';
  41394. var style = {
  41395. transform: value
  41396. };
  41397. return Object(util_["autoprefixer"])(style);
  41398. }
  41399. },
  41400. created: function created() {
  41401. this.$parent && this.$parent.updateItems();
  41402. },
  41403. destroyed: function destroyed() {
  41404. this.$parent && this.$parent.updateItems();
  41405. }
  41406. });
  41407. // CONCATENATED MODULE: ./packages/carousel/src/item.vue?vue&type=script&lang=js&
  41408. /* harmony default export */ var src_itemvue_type_script_lang_js_ = (itemvue_type_script_lang_js_);
  41409. // CONCATENATED MODULE: ./packages/carousel/src/item.vue
  41410. /* normalize component */
  41411. var item_component = normalizeComponent(
  41412. src_itemvue_type_script_lang_js_,
  41413. itemvue_type_template_id_1801ae19_render,
  41414. itemvue_type_template_id_1801ae19_staticRenderFns,
  41415. false,
  41416. null,
  41417. null,
  41418. null
  41419. )
  41420. /* hot reload */
  41421. if (false) { var item_api; }
  41422. item_component.options.__file = "packages/carousel/src/item.vue"
  41423. /* harmony default export */ var src_item = (item_component.exports);
  41424. // CONCATENATED MODULE: ./packages/carousel-item/index.js
  41425. /* istanbul ignore next */
  41426. src_item.install = function (Vue) {
  41427. Vue.component(src_item.name, src_item);
  41428. };
  41429. /* harmony default export */ var carousel_item = (src_item);
  41430. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=template&id=461d57f4&
  41431. var collapsevue_type_template_id_461d57f4_render = function() {
  41432. var _vm = this
  41433. var _h = _vm.$createElement
  41434. var _c = _vm._self._c || _h
  41435. return _c(
  41436. "div",
  41437. {
  41438. staticClass: "el-collapse",
  41439. attrs: { role: "tablist", "aria-multiselectable": "true" }
  41440. },
  41441. [_vm._t("default")],
  41442. 2
  41443. )
  41444. }
  41445. var collapsevue_type_template_id_461d57f4_staticRenderFns = []
  41446. collapsevue_type_template_id_461d57f4_render._withStripped = true
  41447. // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=template&id=461d57f4&
  41448. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=script&lang=js&
  41449. //
  41450. //
  41451. //
  41452. //
  41453. //
  41454. /* harmony default export */ var collapsevue_type_script_lang_js_ = ({
  41455. name: 'ElCollapse',
  41456. componentName: 'ElCollapse',
  41457. props: {
  41458. accordion: Boolean,
  41459. value: {
  41460. type: [Array, String, Number],
  41461. default: function _default() {
  41462. return [];
  41463. }
  41464. }
  41465. },
  41466. data: function data() {
  41467. return {
  41468. activeNames: [].concat(this.value)
  41469. };
  41470. },
  41471. provide: function provide() {
  41472. return {
  41473. collapse: this
  41474. };
  41475. },
  41476. watch: {
  41477. value: function value(_value) {
  41478. this.activeNames = [].concat(_value);
  41479. }
  41480. },
  41481. methods: {
  41482. setActiveNames: function setActiveNames(activeNames) {
  41483. activeNames = [].concat(activeNames);
  41484. var value = this.accordion ? activeNames[0] : activeNames;
  41485. this.activeNames = activeNames;
  41486. this.$emit('input', value);
  41487. this.$emit('change', value);
  41488. },
  41489. handleItemClick: function handleItemClick(item) {
  41490. if (this.accordion) {
  41491. this.setActiveNames((this.activeNames[0] || this.activeNames[0] === 0) && this.activeNames[0] === item.name ? '' : item.name);
  41492. } else {
  41493. var activeNames = this.activeNames.slice(0);
  41494. var index = activeNames.indexOf(item.name);
  41495. if (index > -1) {
  41496. activeNames.splice(index, 1);
  41497. } else {
  41498. activeNames.push(item.name);
  41499. }
  41500. this.setActiveNames(activeNames);
  41501. }
  41502. }
  41503. },
  41504. created: function created() {
  41505. this.$on('item-click', this.handleItemClick);
  41506. }
  41507. });
  41508. // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=script&lang=js&
  41509. /* harmony default export */ var src_collapsevue_type_script_lang_js_ = (collapsevue_type_script_lang_js_);
  41510. // CONCATENATED MODULE: ./packages/collapse/src/collapse.vue
  41511. /* normalize component */
  41512. var collapse_component = normalizeComponent(
  41513. src_collapsevue_type_script_lang_js_,
  41514. collapsevue_type_template_id_461d57f4_render,
  41515. collapsevue_type_template_id_461d57f4_staticRenderFns,
  41516. false,
  41517. null,
  41518. null,
  41519. null
  41520. )
  41521. /* hot reload */
  41522. if (false) { var collapse_api; }
  41523. collapse_component.options.__file = "packages/collapse/src/collapse.vue"
  41524. /* harmony default export */ var collapse = (collapse_component.exports);
  41525. // CONCATENATED MODULE: ./packages/collapse/index.js
  41526. /* istanbul ignore next */
  41527. collapse.install = function (Vue) {
  41528. Vue.component(collapse.name, collapse);
  41529. };
  41530. /* harmony default export */ var packages_collapse = (collapse);
  41531. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
  41532. var collapse_itemvue_type_template_id_2d05faac_render = function() {
  41533. var _vm = this
  41534. var _h = _vm.$createElement
  41535. var _c = _vm._self._c || _h
  41536. return _c(
  41537. "div",
  41538. {
  41539. staticClass: "el-collapse-item",
  41540. class: { "is-active": _vm.isActive, "is-disabled": _vm.disabled }
  41541. },
  41542. [
  41543. _c(
  41544. "div",
  41545. {
  41546. attrs: {
  41547. role: "tab",
  41548. "aria-expanded": _vm.isActive,
  41549. "aria-controls": "el-collapse-content-" + _vm.id,
  41550. "aria-describedby": "el-collapse-content-" + _vm.id
  41551. }
  41552. },
  41553. [
  41554. _c(
  41555. "div",
  41556. {
  41557. staticClass: "el-collapse-item__header",
  41558. class: {
  41559. focusing: _vm.focusing,
  41560. "is-active": _vm.isActive
  41561. },
  41562. attrs: {
  41563. role: "button",
  41564. id: "el-collapse-head-" + _vm.id,
  41565. tabindex: _vm.disabled ? undefined : 0
  41566. },
  41567. on: {
  41568. click: _vm.handleHeaderClick,
  41569. keyup: function($event) {
  41570. if (
  41571. !("button" in $event) &&
  41572. _vm._k($event.keyCode, "space", 32, $event.key, [
  41573. " ",
  41574. "Spacebar"
  41575. ]) &&
  41576. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  41577. ) {
  41578. return null
  41579. }
  41580. $event.stopPropagation()
  41581. return _vm.handleEnterClick($event)
  41582. },
  41583. focus: _vm.handleFocus,
  41584. blur: function($event) {
  41585. _vm.focusing = false
  41586. }
  41587. }
  41588. },
  41589. [
  41590. _vm._t("title", [_vm._v(_vm._s(_vm.title))]),
  41591. _c("i", {
  41592. staticClass: "el-collapse-item__arrow el-icon-arrow-right",
  41593. class: { "is-active": _vm.isActive }
  41594. })
  41595. ],
  41596. 2
  41597. )
  41598. ]
  41599. ),
  41600. _c("el-collapse-transition", [
  41601. _c(
  41602. "div",
  41603. {
  41604. directives: [
  41605. {
  41606. name: "show",
  41607. rawName: "v-show",
  41608. value: _vm.isActive,
  41609. expression: "isActive"
  41610. }
  41611. ],
  41612. staticClass: "el-collapse-item__wrap",
  41613. attrs: {
  41614. role: "tabpanel",
  41615. "aria-hidden": !_vm.isActive,
  41616. "aria-labelledby": "el-collapse-head-" + _vm.id,
  41617. id: "el-collapse-content-" + _vm.id
  41618. }
  41619. },
  41620. [
  41621. _c(
  41622. "div",
  41623. { staticClass: "el-collapse-item__content" },
  41624. [_vm._t("default")],
  41625. 2
  41626. )
  41627. ]
  41628. )
  41629. ])
  41630. ],
  41631. 1
  41632. )
  41633. }
  41634. var collapse_itemvue_type_template_id_2d05faac_staticRenderFns = []
  41635. collapse_itemvue_type_template_id_2d05faac_render._withStripped = true
  41636. // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
  41637. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
  41638. //
  41639. //
  41640. //
  41641. //
  41642. //
  41643. //
  41644. //
  41645. //
  41646. //
  41647. //
  41648. //
  41649. //
  41650. //
  41651. //
  41652. //
  41653. //
  41654. //
  41655. //
  41656. //
  41657. //
  41658. //
  41659. //
  41660. //
  41661. //
  41662. //
  41663. //
  41664. //
  41665. //
  41666. //
  41667. //
  41668. //
  41669. //
  41670. //
  41671. //
  41672. //
  41673. //
  41674. //
  41675. //
  41676. //
  41677. //
  41678. //
  41679. //
  41680. //
  41681. //
  41682. //
  41683. //
  41684. /* harmony default export */ var collapse_itemvue_type_script_lang_js_ = ({
  41685. name: 'ElCollapseItem',
  41686. componentName: 'ElCollapseItem',
  41687. mixins: [emitter_default.a],
  41688. components: { ElCollapseTransition: collapse_transition_default.a },
  41689. data: function data() {
  41690. return {
  41691. contentWrapStyle: {
  41692. height: 'auto',
  41693. display: 'block'
  41694. },
  41695. contentHeight: 0,
  41696. focusing: false,
  41697. isClick: false,
  41698. id: Object(util_["generateId"])()
  41699. };
  41700. },
  41701. inject: ['collapse'],
  41702. props: {
  41703. title: String,
  41704. name: {
  41705. type: [String, Number],
  41706. default: function _default() {
  41707. return this._uid;
  41708. }
  41709. },
  41710. disabled: Boolean
  41711. },
  41712. computed: {
  41713. isActive: function isActive() {
  41714. return this.collapse.activeNames.indexOf(this.name) > -1;
  41715. }
  41716. },
  41717. methods: {
  41718. handleFocus: function handleFocus() {
  41719. var _this = this;
  41720. setTimeout(function () {
  41721. if (!_this.isClick) {
  41722. _this.focusing = true;
  41723. } else {
  41724. _this.isClick = false;
  41725. }
  41726. }, 50);
  41727. },
  41728. handleHeaderClick: function handleHeaderClick() {
  41729. if (this.disabled) return;
  41730. this.dispatch('ElCollapse', 'item-click', this);
  41731. this.focusing = false;
  41732. this.isClick = true;
  41733. },
  41734. handleEnterClick: function handleEnterClick() {
  41735. this.dispatch('ElCollapse', 'item-click', this);
  41736. }
  41737. }
  41738. });
  41739. // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
  41740. /* harmony default export */ var src_collapse_itemvue_type_script_lang_js_ = (collapse_itemvue_type_script_lang_js_);
  41741. // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue
  41742. /* normalize component */
  41743. var collapse_item_component = normalizeComponent(
  41744. src_collapse_itemvue_type_script_lang_js_,
  41745. collapse_itemvue_type_template_id_2d05faac_render,
  41746. collapse_itemvue_type_template_id_2d05faac_staticRenderFns,
  41747. false,
  41748. null,
  41749. null,
  41750. null
  41751. )
  41752. /* hot reload */
  41753. if (false) { var collapse_item_api; }
  41754. collapse_item_component.options.__file = "packages/collapse/src/collapse-item.vue"
  41755. /* harmony default export */ var collapse_item = (collapse_item_component.exports);
  41756. // CONCATENATED MODULE: ./packages/collapse-item/index.js
  41757. /* istanbul ignore next */
  41758. collapse_item.install = function (Vue) {
  41759. Vue.component(collapse_item.name, collapse_item);
  41760. };
  41761. /* harmony default export */ var packages_collapse_item = (collapse_item);
  41762. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=template&id=032537a6&
  41763. var cascadervue_type_template_id_032537a6_render = function() {
  41764. var _vm = this
  41765. var _h = _vm.$createElement
  41766. var _c = _vm._self._c || _h
  41767. return _c(
  41768. "div",
  41769. {
  41770. directives: [
  41771. {
  41772. name: "clickoutside",
  41773. rawName: "v-clickoutside",
  41774. value: function() {
  41775. return _vm.toggleDropDownVisible(false)
  41776. },
  41777. expression: "() => toggleDropDownVisible(false)"
  41778. }
  41779. ],
  41780. ref: "reference",
  41781. class: [
  41782. "el-cascader",
  41783. _vm.realSize && "el-cascader--" + _vm.realSize,
  41784. { "is-disabled": _vm.isDisabled }
  41785. ],
  41786. on: {
  41787. mouseenter: function($event) {
  41788. _vm.inputHover = true
  41789. },
  41790. mouseleave: function($event) {
  41791. _vm.inputHover = false
  41792. },
  41793. click: function() {
  41794. return _vm.toggleDropDownVisible(_vm.readonly ? undefined : true)
  41795. },
  41796. keydown: _vm.handleKeyDown
  41797. }
  41798. },
  41799. [
  41800. _c(
  41801. "el-input",
  41802. {
  41803. ref: "input",
  41804. class: { "is-focus": _vm.dropDownVisible },
  41805. attrs: {
  41806. size: _vm.realSize,
  41807. placeholder: _vm.placeholder,
  41808. readonly: _vm.readonly,
  41809. disabled: _vm.isDisabled,
  41810. "validate-event": false
  41811. },
  41812. on: {
  41813. focus: _vm.handleFocus,
  41814. blur: _vm.handleBlur,
  41815. input: _vm.handleInput
  41816. },
  41817. model: {
  41818. value: _vm.multiple ? _vm.presentText : _vm.inputValue,
  41819. callback: function($$v) {
  41820. _vm.multiple ? _vm.presentText : (_vm.inputValue = $$v)
  41821. },
  41822. expression: "multiple ? presentText : inputValue"
  41823. }
  41824. },
  41825. [
  41826. _c("template", { slot: "suffix" }, [
  41827. _vm.clearBtnVisible
  41828. ? _c("i", {
  41829. key: "clear",
  41830. staticClass: "el-input__icon el-icon-circle-close",
  41831. on: {
  41832. click: function($event) {
  41833. $event.stopPropagation()
  41834. return _vm.handleClear($event)
  41835. }
  41836. }
  41837. })
  41838. : _c("i", {
  41839. key: "arrow-down",
  41840. class: [
  41841. "el-input__icon",
  41842. "el-icon-arrow-down",
  41843. _vm.dropDownVisible && "is-reverse"
  41844. ],
  41845. on: {
  41846. click: function($event) {
  41847. $event.stopPropagation()
  41848. _vm.toggleDropDownVisible()
  41849. }
  41850. }
  41851. })
  41852. ])
  41853. ],
  41854. 2
  41855. ),
  41856. _vm.multiple
  41857. ? _c(
  41858. "div",
  41859. { staticClass: "el-cascader__tags" },
  41860. [
  41861. _vm._l(_vm.presentTags, function(tag) {
  41862. return _c(
  41863. "el-tag",
  41864. {
  41865. key: tag.key,
  41866. attrs: {
  41867. type: "info",
  41868. size: _vm.tagSize,
  41869. hit: tag.hitState,
  41870. closable: tag.closable,
  41871. "disable-transitions": ""
  41872. },
  41873. on: {
  41874. close: function($event) {
  41875. _vm.deleteTag(tag)
  41876. }
  41877. }
  41878. },
  41879. [_c("span", [_vm._v(_vm._s(tag.text))])]
  41880. )
  41881. }),
  41882. _vm.filterable && !_vm.isDisabled
  41883. ? _c("input", {
  41884. directives: [
  41885. {
  41886. name: "model",
  41887. rawName: "v-model.trim",
  41888. value: _vm.inputValue,
  41889. expression: "inputValue",
  41890. modifiers: { trim: true }
  41891. }
  41892. ],
  41893. staticClass: "el-cascader__search-input",
  41894. attrs: {
  41895. type: "text",
  41896. placeholder: _vm.presentTags.length ? "" : _vm.placeholder
  41897. },
  41898. domProps: { value: _vm.inputValue },
  41899. on: {
  41900. input: [
  41901. function($event) {
  41902. if ($event.target.composing) {
  41903. return
  41904. }
  41905. _vm.inputValue = $event.target.value.trim()
  41906. },
  41907. function(e) {
  41908. return _vm.handleInput(_vm.inputValue, e)
  41909. }
  41910. ],
  41911. click: function($event) {
  41912. $event.stopPropagation()
  41913. _vm.toggleDropDownVisible(true)
  41914. },
  41915. keydown: function($event) {
  41916. if (
  41917. !("button" in $event) &&
  41918. _vm._k(
  41919. $event.keyCode,
  41920. "delete",
  41921. [8, 46],
  41922. $event.key,
  41923. ["Backspace", "Delete", "Del"]
  41924. )
  41925. ) {
  41926. return null
  41927. }
  41928. return _vm.handleDelete($event)
  41929. },
  41930. blur: function($event) {
  41931. _vm.$forceUpdate()
  41932. }
  41933. }
  41934. })
  41935. : _vm._e()
  41936. ],
  41937. 2
  41938. )
  41939. : _vm._e(),
  41940. _c(
  41941. "transition",
  41942. {
  41943. attrs: { name: "el-zoom-in-top" },
  41944. on: { "after-leave": _vm.handleDropdownLeave }
  41945. },
  41946. [
  41947. _c(
  41948. "div",
  41949. {
  41950. directives: [
  41951. {
  41952. name: "show",
  41953. rawName: "v-show",
  41954. value: _vm.dropDownVisible,
  41955. expression: "dropDownVisible"
  41956. }
  41957. ],
  41958. ref: "popper",
  41959. class: ["el-popper", "el-cascader__dropdown", _vm.popperClass]
  41960. },
  41961. [
  41962. _c("el-cascader-panel", {
  41963. directives: [
  41964. {
  41965. name: "show",
  41966. rawName: "v-show",
  41967. value: !_vm.filtering,
  41968. expression: "!filtering"
  41969. }
  41970. ],
  41971. ref: "panel",
  41972. attrs: {
  41973. options: _vm.options,
  41974. props: _vm.config,
  41975. border: false,
  41976. "render-label": _vm.$scopedSlots.default
  41977. },
  41978. on: {
  41979. "expand-change": _vm.handleExpandChange,
  41980. close: function($event) {
  41981. _vm.toggleDropDownVisible(false)
  41982. }
  41983. },
  41984. model: {
  41985. value: _vm.checkedValue,
  41986. callback: function($$v) {
  41987. _vm.checkedValue = $$v
  41988. },
  41989. expression: "checkedValue"
  41990. }
  41991. }),
  41992. _vm.filterable
  41993. ? _c(
  41994. "el-scrollbar",
  41995. {
  41996. directives: [
  41997. {
  41998. name: "show",
  41999. rawName: "v-show",
  42000. value: _vm.filtering,
  42001. expression: "filtering"
  42002. }
  42003. ],
  42004. ref: "suggestionPanel",
  42005. staticClass: "el-cascader__suggestion-panel",
  42006. attrs: {
  42007. tag: "ul",
  42008. "view-class": "el-cascader__suggestion-list"
  42009. },
  42010. nativeOn: {
  42011. keydown: function($event) {
  42012. return _vm.handleSuggestionKeyDown($event)
  42013. }
  42014. }
  42015. },
  42016. [
  42017. _vm.suggestions.length
  42018. ? _vm._l(_vm.suggestions, function(item, index) {
  42019. return _c(
  42020. "li",
  42021. {
  42022. key: item.uid,
  42023. class: [
  42024. "el-cascader__suggestion-item",
  42025. item.checked && "is-checked"
  42026. ],
  42027. attrs: { tabindex: -1 },
  42028. on: {
  42029. click: function($event) {
  42030. _vm.handleSuggestionClick(index)
  42031. }
  42032. }
  42033. },
  42034. [
  42035. _c("span", [_vm._v(_vm._s(item.text))]),
  42036. item.checked
  42037. ? _c("i", { staticClass: "el-icon-check" })
  42038. : _vm._e()
  42039. ]
  42040. )
  42041. })
  42042. : _vm._t("empty", [
  42043. _c(
  42044. "li",
  42045. { staticClass: "el-cascader__empty-text" },
  42046. [_vm._v(_vm._s(_vm.t("el.cascader.noMatch")))]
  42047. )
  42048. ])
  42049. ],
  42050. 2
  42051. )
  42052. : _vm._e()
  42053. ],
  42054. 1
  42055. )
  42056. ]
  42057. )
  42058. ],
  42059. 1
  42060. )
  42061. }
  42062. var cascadervue_type_template_id_032537a6_staticRenderFns = []
  42063. cascadervue_type_template_id_032537a6_render._withStripped = true
  42064. // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=template&id=032537a6&
  42065. // EXTERNAL MODULE: external "element-ui/lib/cascader-panel"
  42066. var cascader_panel_ = __webpack_require__(42);
  42067. var cascader_panel_default = /*#__PURE__*/__webpack_require__.n(cascader_panel_);
  42068. // EXTERNAL MODULE: external "element-ui/lib/utils/aria-utils"
  42069. var aria_utils_ = __webpack_require__(34);
  42070. var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);
  42071. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
  42072. //
  42073. //
  42074. //
  42075. //
  42076. //
  42077. //
  42078. //
  42079. //
  42080. //
  42081. //
  42082. //
  42083. //
  42084. //
  42085. //
  42086. //
  42087. //
  42088. //
  42089. //
  42090. //
  42091. //
  42092. //
  42093. //
  42094. //
  42095. //
  42096. //
  42097. //
  42098. //
  42099. //
  42100. //
  42101. //
  42102. //
  42103. //
  42104. //
  42105. //
  42106. //
  42107. //
  42108. //
  42109. //
  42110. //
  42111. //
  42112. //
  42113. //
  42114. //
  42115. //
  42116. //
  42117. //
  42118. //
  42119. //
  42120. //
  42121. //
  42122. //
  42123. //
  42124. //
  42125. //
  42126. //
  42127. //
  42128. //
  42129. //
  42130. //
  42131. //
  42132. //
  42133. //
  42134. //
  42135. //
  42136. //
  42137. //
  42138. //
  42139. //
  42140. //
  42141. //
  42142. //
  42143. //
  42144. //
  42145. //
  42146. //
  42147. //
  42148. //
  42149. //
  42150. //
  42151. //
  42152. //
  42153. //
  42154. //
  42155. //
  42156. //
  42157. //
  42158. //
  42159. //
  42160. //
  42161. //
  42162. //
  42163. //
  42164. //
  42165. //
  42166. //
  42167. //
  42168. //
  42169. //
  42170. //
  42171. //
  42172. //
  42173. //
  42174. //
  42175. //
  42176. //
  42177. //
  42178. //
  42179. //
  42180. //
  42181. //
  42182. //
  42183. //
  42184. //
  42185. var KeyCode = aria_utils_default.a.keys;
  42186. var MigratingProps = {
  42187. expandTrigger: {
  42188. newProp: 'expandTrigger',
  42189. type: String
  42190. },
  42191. changeOnSelect: {
  42192. newProp: 'checkStrictly',
  42193. type: Boolean
  42194. },
  42195. hoverThreshold: {
  42196. newProp: 'hoverThreshold',
  42197. type: Number
  42198. }
  42199. };
  42200. var PopperMixin = {
  42201. props: {
  42202. placement: {
  42203. type: String,
  42204. default: 'bottom-start'
  42205. },
  42206. appendToBody: vue_popper_default.a.props.appendToBody,
  42207. visibleArrow: {
  42208. type: Boolean,
  42209. default: true
  42210. },
  42211. arrowOffset: vue_popper_default.a.props.arrowOffset,
  42212. offset: vue_popper_default.a.props.offset,
  42213. boundariesPadding: vue_popper_default.a.props.boundariesPadding,
  42214. popperOptions: vue_popper_default.a.props.popperOptions
  42215. },
  42216. methods: vue_popper_default.a.methods,
  42217. data: vue_popper_default.a.data,
  42218. beforeDestroy: vue_popper_default.a.beforeDestroy
  42219. };
  42220. var InputSizeMap = {
  42221. medium: 36,
  42222. small: 32,
  42223. mini: 28
  42224. };
  42225. /* harmony default export */ var cascadervue_type_script_lang_js_ = ({
  42226. name: 'ElCascader',
  42227. directives: { Clickoutside: clickoutside_default.a },
  42228. mixins: [PopperMixin, emitter_default.a, locale_default.a, migrating_default.a],
  42229. inject: {
  42230. elForm: {
  42231. default: ''
  42232. },
  42233. elFormItem: {
  42234. default: ''
  42235. }
  42236. },
  42237. components: {
  42238. ElInput: input_default.a,
  42239. ElTag: tag_default.a,
  42240. ElScrollbar: scrollbar_default.a,
  42241. ElCascaderPanel: cascader_panel_default.a
  42242. },
  42243. props: {
  42244. value: {},
  42245. options: Array,
  42246. props: Object,
  42247. size: String,
  42248. placeholder: {
  42249. type: String,
  42250. default: function _default() {
  42251. return Object(lib_locale_["t"])('el.cascader.placeholder');
  42252. }
  42253. },
  42254. disabled: Boolean,
  42255. clearable: Boolean,
  42256. filterable: Boolean,
  42257. filterMethod: Function,
  42258. separator: {
  42259. type: String,
  42260. default: ' / '
  42261. },
  42262. showAllLevels: {
  42263. type: Boolean,
  42264. default: true
  42265. },
  42266. collapseTags: Boolean,
  42267. debounce: {
  42268. type: Number,
  42269. default: 300
  42270. },
  42271. beforeFilter: {
  42272. type: Function,
  42273. default: function _default() {
  42274. return function () {};
  42275. }
  42276. },
  42277. popperClass: String
  42278. },
  42279. data: function data() {
  42280. return {
  42281. dropDownVisible: false,
  42282. checkedValue: this.value,
  42283. inputHover: false,
  42284. inputValue: null,
  42285. presentText: null,
  42286. presentTags: [],
  42287. checkedNodes: [],
  42288. filtering: false,
  42289. suggestions: [],
  42290. inputInitialHeight: 0,
  42291. pressDeleteCount: 0
  42292. };
  42293. },
  42294. computed: {
  42295. realSize: function realSize() {
  42296. var _elFormItemSize = (this.elFormItem || {}).elFormItemSize;
  42297. return this.size || _elFormItemSize || (this.$ELEMENT || {}).size;
  42298. },
  42299. tagSize: function tagSize() {
  42300. return ['small', 'mini'].indexOf(this.realSize) > -1 ? 'mini' : 'small';
  42301. },
  42302. isDisabled: function isDisabled() {
  42303. return this.disabled || (this.elForm || {}).disabled;
  42304. },
  42305. config: function config() {
  42306. var config = this.props || {};
  42307. var $attrs = this.$attrs;
  42308. Object.keys(MigratingProps).forEach(function (oldProp) {
  42309. var _MigratingProps$oldPr = MigratingProps[oldProp],
  42310. newProp = _MigratingProps$oldPr.newProp,
  42311. type = _MigratingProps$oldPr.type;
  42312. var oldValue = $attrs[oldProp] || $attrs[Object(util_["kebabCase"])(oldProp)];
  42313. if (Object(shared_["isDef"])(oldProp) && !Object(shared_["isDef"])(config[newProp])) {
  42314. if (type === Boolean && oldValue === '') {
  42315. oldValue = true;
  42316. }
  42317. config[newProp] = oldValue;
  42318. }
  42319. });
  42320. return config;
  42321. },
  42322. multiple: function multiple() {
  42323. return this.config.multiple;
  42324. },
  42325. leafOnly: function leafOnly() {
  42326. return !this.config.checkStrictly;
  42327. },
  42328. readonly: function readonly() {
  42329. return !this.filterable || this.multiple;
  42330. },
  42331. clearBtnVisible: function clearBtnVisible() {
  42332. if (!this.clearable || this.isDisabled || this.filtering || !this.inputHover) {
  42333. return false;
  42334. }
  42335. return this.multiple ? !!this.checkedNodes.filter(function (node) {
  42336. return !node.isDisabled;
  42337. }).length : !!this.presentText;
  42338. },
  42339. panel: function panel() {
  42340. return this.$refs.panel;
  42341. }
  42342. },
  42343. watch: {
  42344. disabled: function disabled() {
  42345. this.computePresentContent();
  42346. },
  42347. value: function value(val) {
  42348. if (!Object(util_["isEqual"])(val, this.checkedValue)) {
  42349. this.checkedValue = val;
  42350. this.computePresentContent();
  42351. }
  42352. },
  42353. checkedValue: function checkedValue(val) {
  42354. var value = this.value,
  42355. dropDownVisible = this.dropDownVisible;
  42356. var _config = this.config,
  42357. checkStrictly = _config.checkStrictly,
  42358. multiple = _config.multiple;
  42359. if (!Object(util_["isEqual"])(val, value) || Object(types_["isUndefined"])(value)) {
  42360. this.computePresentContent();
  42361. // hide dropdown when single mode
  42362. if (!multiple && !checkStrictly && dropDownVisible) {
  42363. this.toggleDropDownVisible(false);
  42364. }
  42365. this.$emit('input', val);
  42366. this.$emit('change', val);
  42367. this.dispatch('ElFormItem', 'el.form.change', [val]);
  42368. }
  42369. },
  42370. options: {
  42371. handler: function handler() {
  42372. this.$nextTick(this.computePresentContent);
  42373. },
  42374. deep: true
  42375. },
  42376. presentText: function presentText(val) {
  42377. this.inputValue = val;
  42378. },
  42379. presentTags: function presentTags(val, oldVal) {
  42380. if (this.multiple && (val.length || oldVal.length)) {
  42381. this.$nextTick(this.updateStyle);
  42382. }
  42383. },
  42384. filtering: function filtering(val) {
  42385. this.$nextTick(this.updatePopper);
  42386. }
  42387. },
  42388. mounted: function mounted() {
  42389. var _this = this;
  42390. var input = this.$refs.input;
  42391. if (input && input.$el) {
  42392. this.inputInitialHeight = input.$el.offsetHeight || InputSizeMap[this.realSize] || 40;
  42393. }
  42394. if (!this.isEmptyValue(this.value)) {
  42395. this.computePresentContent();
  42396. }
  42397. this.filterHandler = debounce_default()(this.debounce, function () {
  42398. var inputValue = _this.inputValue;
  42399. if (!inputValue) {
  42400. _this.filtering = false;
  42401. return;
  42402. }
  42403. var before = _this.beforeFilter(inputValue);
  42404. if (before && before.then) {
  42405. before.then(_this.getSuggestions);
  42406. } else if (before !== false) {
  42407. _this.getSuggestions();
  42408. } else {
  42409. _this.filtering = false;
  42410. }
  42411. });
  42412. Object(resize_event_["addResizeListener"])(this.$el, this.updateStyle);
  42413. },
  42414. beforeDestroy: function beforeDestroy() {
  42415. Object(resize_event_["removeResizeListener"])(this.$el, this.updateStyle);
  42416. },
  42417. methods: {
  42418. getMigratingConfig: function getMigratingConfig() {
  42419. return {
  42420. props: {
  42421. 'expand-trigger': 'expand-trigger is removed, use `props.expandTrigger` instead.',
  42422. 'change-on-select': 'change-on-select is removed, use `props.checkStrictly` instead.',
  42423. 'hover-threshold': 'hover-threshold is removed, use `props.hoverThreshold` instead'
  42424. },
  42425. events: {
  42426. 'active-item-change': 'active-item-change is renamed to expand-change'
  42427. }
  42428. };
  42429. },
  42430. toggleDropDownVisible: function toggleDropDownVisible(visible) {
  42431. var _this2 = this;
  42432. if (this.isDisabled) return;
  42433. var dropDownVisible = this.dropDownVisible;
  42434. var input = this.$refs.input;
  42435. visible = Object(shared_["isDef"])(visible) ? visible : !dropDownVisible;
  42436. if (visible !== dropDownVisible) {
  42437. this.dropDownVisible = visible;
  42438. if (visible) {
  42439. this.$nextTick(function () {
  42440. _this2.updatePopper();
  42441. _this2.panel.scrollIntoView();
  42442. });
  42443. }
  42444. input.$refs.input.setAttribute('aria-expanded', visible);
  42445. this.$emit('visible-change', visible);
  42446. }
  42447. },
  42448. handleDropdownLeave: function handleDropdownLeave() {
  42449. this.filtering = false;
  42450. this.inputValue = this.presentText;
  42451. this.doDestroy();
  42452. },
  42453. handleKeyDown: function handleKeyDown(event) {
  42454. switch (event.keyCode) {
  42455. case KeyCode.enter:
  42456. this.toggleDropDownVisible();
  42457. break;
  42458. case KeyCode.down:
  42459. this.toggleDropDownVisible(true);
  42460. this.focusFirstNode();
  42461. event.preventDefault();
  42462. break;
  42463. case KeyCode.esc:
  42464. case KeyCode.tab:
  42465. this.toggleDropDownVisible(false);
  42466. break;
  42467. }
  42468. },
  42469. handleFocus: function handleFocus(e) {
  42470. this.$emit('focus', e);
  42471. },
  42472. handleBlur: function handleBlur(e) {
  42473. this.$emit('blur', e);
  42474. },
  42475. handleInput: function handleInput(val, event) {
  42476. !this.dropDownVisible && this.toggleDropDownVisible(true);
  42477. if (event && event.isComposing) return;
  42478. if (val) {
  42479. this.filterHandler();
  42480. } else {
  42481. this.filtering = false;
  42482. }
  42483. },
  42484. handleClear: function handleClear() {
  42485. this.presentText = '';
  42486. this.panel.clearCheckedNodes();
  42487. },
  42488. handleExpandChange: function handleExpandChange(value) {
  42489. this.$nextTick(this.updatePopper.bind(this));
  42490. this.$emit('expand-change', value);
  42491. this.$emit('active-item-change', value); // Deprecated
  42492. },
  42493. focusFirstNode: function focusFirstNode() {
  42494. var _this3 = this;
  42495. this.$nextTick(function () {
  42496. var filtering = _this3.filtering;
  42497. var _$refs = _this3.$refs,
  42498. popper = _$refs.popper,
  42499. suggestionPanel = _$refs.suggestionPanel;
  42500. var firstNode = null;
  42501. if (filtering && suggestionPanel) {
  42502. firstNode = suggestionPanel.$el.querySelector('.el-cascader__suggestion-item');
  42503. } else {
  42504. var firstMenu = popper.querySelector('.el-cascader-menu');
  42505. firstNode = firstMenu.querySelector('.el-cascader-node[tabindex="-1"]');
  42506. }
  42507. if (firstNode) {
  42508. firstNode.focus();
  42509. !filtering && firstNode.click();
  42510. }
  42511. });
  42512. },
  42513. computePresentContent: function computePresentContent() {
  42514. var _this4 = this;
  42515. // nextTick is required, because checked nodes may not change right now
  42516. this.$nextTick(function () {
  42517. if (_this4.config.multiple) {
  42518. _this4.computePresentTags();
  42519. _this4.presentText = _this4.presentTags.length ? ' ' : null;
  42520. } else {
  42521. _this4.computePresentText();
  42522. }
  42523. });
  42524. },
  42525. isEmptyValue: function isEmptyValue(val) {
  42526. var multiple = this.multiple;
  42527. var emitPath = this.panel.config.emitPath;
  42528. if (multiple || emitPath) {
  42529. return Object(util_["isEmpty"])(val);
  42530. }
  42531. return false;
  42532. },
  42533. computePresentText: function computePresentText() {
  42534. var checkedValue = this.checkedValue,
  42535. config = this.config;
  42536. if (!this.isEmptyValue(checkedValue)) {
  42537. var node = this.panel.getNodeByValue(checkedValue);
  42538. if (node && (config.checkStrictly || node.isLeaf)) {
  42539. this.presentText = node.getText(this.showAllLevels, this.separator);
  42540. return;
  42541. }
  42542. }
  42543. this.presentText = null;
  42544. },
  42545. computePresentTags: function computePresentTags() {
  42546. var isDisabled = this.isDisabled,
  42547. leafOnly = this.leafOnly,
  42548. showAllLevels = this.showAllLevels,
  42549. separator = this.separator,
  42550. collapseTags = this.collapseTags;
  42551. var checkedNodes = this.getCheckedNodes(leafOnly);
  42552. var tags = [];
  42553. var genTag = function genTag(node) {
  42554. return {
  42555. node: node,
  42556. key: node.uid,
  42557. text: node.getText(showAllLevels, separator),
  42558. hitState: false,
  42559. closable: !isDisabled && !node.isDisabled
  42560. };
  42561. };
  42562. if (checkedNodes.length) {
  42563. var first = checkedNodes[0],
  42564. rest = checkedNodes.slice(1);
  42565. var restCount = rest.length;
  42566. tags.push(genTag(first));
  42567. if (restCount) {
  42568. if (collapseTags) {
  42569. tags.push({
  42570. key: -1,
  42571. text: '+ ' + restCount,
  42572. closable: false
  42573. });
  42574. } else {
  42575. rest.forEach(function (node) {
  42576. return tags.push(genTag(node));
  42577. });
  42578. }
  42579. }
  42580. }
  42581. this.checkedNodes = checkedNodes;
  42582. this.presentTags = tags;
  42583. },
  42584. getSuggestions: function getSuggestions() {
  42585. var _this5 = this;
  42586. var filterMethod = this.filterMethod;
  42587. if (!Object(types_["isFunction"])(filterMethod)) {
  42588. filterMethod = function filterMethod(node, keyword) {
  42589. return node.text.includes(keyword);
  42590. };
  42591. }
  42592. var suggestions = this.panel.getFlattedNodes(this.leafOnly).filter(function (node) {
  42593. if (node.isDisabled) return false;
  42594. node.text = node.getText(_this5.showAllLevels, _this5.separator) || '';
  42595. return filterMethod(node, _this5.inputValue);
  42596. });
  42597. if (this.multiple) {
  42598. this.presentTags.forEach(function (tag) {
  42599. tag.hitState = false;
  42600. });
  42601. } else {
  42602. suggestions.forEach(function (node) {
  42603. node.checked = Object(util_["isEqual"])(_this5.checkedValue, node.getValueByOption());
  42604. });
  42605. }
  42606. this.filtering = true;
  42607. this.suggestions = suggestions;
  42608. this.$nextTick(this.updatePopper);
  42609. },
  42610. handleSuggestionKeyDown: function handleSuggestionKeyDown(event) {
  42611. var keyCode = event.keyCode,
  42612. target = event.target;
  42613. switch (keyCode) {
  42614. case KeyCode.enter:
  42615. target.click();
  42616. break;
  42617. case KeyCode.up:
  42618. var prev = target.previousElementSibling;
  42619. prev && prev.focus();
  42620. break;
  42621. case KeyCode.down:
  42622. var next = target.nextElementSibling;
  42623. next && next.focus();
  42624. break;
  42625. case KeyCode.esc:
  42626. case KeyCode.tab:
  42627. this.toggleDropDownVisible(false);
  42628. break;
  42629. }
  42630. },
  42631. handleDelete: function handleDelete() {
  42632. var inputValue = this.inputValue,
  42633. pressDeleteCount = this.pressDeleteCount,
  42634. presentTags = this.presentTags;
  42635. var lastIndex = presentTags.length - 1;
  42636. var lastTag = presentTags[lastIndex];
  42637. this.pressDeleteCount = inputValue ? 0 : pressDeleteCount + 1;
  42638. if (!lastTag) return;
  42639. if (this.pressDeleteCount) {
  42640. if (lastTag.hitState) {
  42641. this.deleteTag(lastTag);
  42642. } else {
  42643. lastTag.hitState = true;
  42644. }
  42645. }
  42646. },
  42647. handleSuggestionClick: function handleSuggestionClick(index) {
  42648. var multiple = this.multiple;
  42649. var targetNode = this.suggestions[index];
  42650. if (multiple) {
  42651. var checked = targetNode.checked;
  42652. targetNode.doCheck(!checked);
  42653. this.panel.calculateMultiCheckedValue();
  42654. } else {
  42655. this.checkedValue = targetNode.getValueByOption();
  42656. this.toggleDropDownVisible(false);
  42657. }
  42658. },
  42659. deleteTag: function deleteTag(tag) {
  42660. var checkedValue = this.checkedValue;
  42661. var current = tag.node.getValueByOption();
  42662. var val = checkedValue.find(function (n) {
  42663. return Object(util_["isEqual"])(n, current);
  42664. });
  42665. this.checkedValue = checkedValue.filter(function (n) {
  42666. return !Object(util_["isEqual"])(n, current);
  42667. });
  42668. this.$emit('remove-tag', val);
  42669. },
  42670. updateStyle: function updateStyle() {
  42671. var $el = this.$el,
  42672. inputInitialHeight = this.inputInitialHeight;
  42673. if (this.$isServer || !$el) return;
  42674. var suggestionPanel = this.$refs.suggestionPanel;
  42675. var inputInner = $el.querySelector('.el-input__inner');
  42676. if (!inputInner) return;
  42677. var tags = $el.querySelector('.el-cascader__tags');
  42678. var suggestionPanelEl = null;
  42679. if (suggestionPanel && (suggestionPanelEl = suggestionPanel.$el)) {
  42680. var suggestionList = suggestionPanelEl.querySelector('.el-cascader__suggestion-list');
  42681. suggestionList.style.minWidth = inputInner.offsetWidth + 'px';
  42682. }
  42683. if (tags) {
  42684. var offsetHeight = Math.round(tags.getBoundingClientRect().height);
  42685. var height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px';
  42686. inputInner.style.height = height;
  42687. if (this.dropDownVisible) {
  42688. this.updatePopper();
  42689. }
  42690. }
  42691. },
  42692. /**
  42693. * public methods
  42694. */
  42695. getCheckedNodes: function getCheckedNodes(leafOnly) {
  42696. return this.panel.getCheckedNodes(leafOnly);
  42697. }
  42698. }
  42699. });
  42700. // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
  42701. /* harmony default export */ var src_cascadervue_type_script_lang_js_ = (cascadervue_type_script_lang_js_);
  42702. // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue
  42703. /* normalize component */
  42704. var cascader_component = normalizeComponent(
  42705. src_cascadervue_type_script_lang_js_,
  42706. cascadervue_type_template_id_032537a6_render,
  42707. cascadervue_type_template_id_032537a6_staticRenderFns,
  42708. false,
  42709. null,
  42710. null,
  42711. null
  42712. )
  42713. /* hot reload */
  42714. if (false) { var cascader_api; }
  42715. cascader_component.options.__file = "packages/cascader/src/cascader.vue"
  42716. /* harmony default export */ var cascader = (cascader_component.exports);
  42717. // CONCATENATED MODULE: ./packages/cascader/index.js
  42718. /* istanbul ignore next */
  42719. cascader.install = function (Vue) {
  42720. Vue.component(cascader.name, cascader);
  42721. };
  42722. /* harmony default export */ var packages_cascader = (cascader);
  42723. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/main.vue?vue&type=template&id=55c8ade7&
  42724. var mainvue_type_template_id_55c8ade7_render = function() {
  42725. var _vm = this
  42726. var _h = _vm.$createElement
  42727. var _c = _vm._self._c || _h
  42728. return _c(
  42729. "div",
  42730. {
  42731. directives: [
  42732. {
  42733. name: "clickoutside",
  42734. rawName: "v-clickoutside",
  42735. value: _vm.hide,
  42736. expression: "hide"
  42737. }
  42738. ],
  42739. class: [
  42740. "el-color-picker",
  42741. _vm.colorDisabled ? "is-disabled" : "",
  42742. _vm.colorSize ? "el-color-picker--" + _vm.colorSize : ""
  42743. ]
  42744. },
  42745. [
  42746. _vm.colorDisabled
  42747. ? _c("div", { staticClass: "el-color-picker__mask" })
  42748. : _vm._e(),
  42749. _c(
  42750. "div",
  42751. {
  42752. staticClass: "el-color-picker__trigger",
  42753. on: { click: _vm.handleTrigger }
  42754. },
  42755. [
  42756. _c(
  42757. "span",
  42758. {
  42759. staticClass: "el-color-picker__color",
  42760. class: { "is-alpha": _vm.showAlpha }
  42761. },
  42762. [
  42763. _c("span", {
  42764. staticClass: "el-color-picker__color-inner",
  42765. style: {
  42766. backgroundColor: _vm.displayedColor
  42767. }
  42768. }),
  42769. !_vm.value && !_vm.showPanelColor
  42770. ? _c("span", {
  42771. staticClass: "el-color-picker__empty el-icon-close"
  42772. })
  42773. : _vm._e()
  42774. ]
  42775. ),
  42776. _c("span", {
  42777. directives: [
  42778. {
  42779. name: "show",
  42780. rawName: "v-show",
  42781. value: _vm.value || _vm.showPanelColor,
  42782. expression: "value || showPanelColor"
  42783. }
  42784. ],
  42785. staticClass: "el-color-picker__icon el-icon-arrow-down"
  42786. })
  42787. ]
  42788. ),
  42789. _c("picker-dropdown", {
  42790. ref: "dropdown",
  42791. class: ["el-color-picker__panel", _vm.popperClass || ""],
  42792. attrs: {
  42793. color: _vm.color,
  42794. "show-alpha": _vm.showAlpha,
  42795. predefine: _vm.predefine
  42796. },
  42797. on: { pick: _vm.confirmValue, clear: _vm.clearValue },
  42798. model: {
  42799. value: _vm.showPicker,
  42800. callback: function($$v) {
  42801. _vm.showPicker = $$v
  42802. },
  42803. expression: "showPicker"
  42804. }
  42805. })
  42806. ],
  42807. 1
  42808. )
  42809. }
  42810. var mainvue_type_template_id_55c8ade7_staticRenderFns = []
  42811. mainvue_type_template_id_55c8ade7_render._withStripped = true
  42812. // CONCATENATED MODULE: ./packages/color-picker/src/main.vue?vue&type=template&id=55c8ade7&
  42813. // CONCATENATED MODULE: ./packages/color-picker/src/color.js
  42814. var color_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  42815. function color_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  42816. var hsv2hsl = function hsv2hsl(hue, sat, val) {
  42817. return [hue, sat * val / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0, hue / 2];
  42818. };
  42819. // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
  42820. // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
  42821. var isOnePointZero = function isOnePointZero(n) {
  42822. return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;
  42823. };
  42824. var isPercentage = function isPercentage(n) {
  42825. return typeof n === 'string' && n.indexOf('%') !== -1;
  42826. };
  42827. // Take input from [0, n] and return it as [0, 1]
  42828. var bound01 = function bound01(value, max) {
  42829. if (isOnePointZero(value)) value = '100%';
  42830. var processPercent = isPercentage(value);
  42831. value = Math.min(max, Math.max(0, parseFloat(value)));
  42832. // Automatically convert percentage into number
  42833. if (processPercent) {
  42834. value = parseInt(value * max, 10) / 100;
  42835. }
  42836. // Handle floating point rounding errors
  42837. if (Math.abs(value - max) < 0.000001) {
  42838. return 1;
  42839. }
  42840. // Convert into [0, 1] range if it isn't already
  42841. return value % max / parseFloat(max);
  42842. };
  42843. var INT_HEX_MAP = { 10: 'A', 11: 'B', 12: 'C', 13: 'D', 14: 'E', 15: 'F' };
  42844. var toHex = function toHex(_ref) {
  42845. var r = _ref.r,
  42846. g = _ref.g,
  42847. b = _ref.b;
  42848. var hexOne = function hexOne(value) {
  42849. value = Math.min(Math.round(value), 255);
  42850. var high = Math.floor(value / 16);
  42851. var low = value % 16;
  42852. return '' + (INT_HEX_MAP[high] || high) + (INT_HEX_MAP[low] || low);
  42853. };
  42854. if (isNaN(r) || isNaN(g) || isNaN(b)) return '';
  42855. return '#' + hexOne(r) + hexOne(g) + hexOne(b);
  42856. };
  42857. var HEX_INT_MAP = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 };
  42858. var parseHexChannel = function parseHexChannel(hex) {
  42859. if (hex.length === 2) {
  42860. return (HEX_INT_MAP[hex[0].toUpperCase()] || +hex[0]) * 16 + (HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1]);
  42861. }
  42862. return HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1];
  42863. };
  42864. var hsl2hsv = function hsl2hsv(hue, sat, light) {
  42865. sat = sat / 100;
  42866. light = light / 100;
  42867. var smin = sat;
  42868. var lmin = Math.max(light, 0.01);
  42869. var sv = void 0;
  42870. var v = void 0;
  42871. light *= 2;
  42872. sat *= light <= 1 ? light : 2 - light;
  42873. smin *= lmin <= 1 ? lmin : 2 - lmin;
  42874. v = (light + sat) / 2;
  42875. sv = light === 0 ? 2 * smin / (lmin + smin) : 2 * sat / (light + sat);
  42876. return {
  42877. h: hue,
  42878. s: sv * 100,
  42879. v: v * 100
  42880. };
  42881. };
  42882. // `rgbToHsv`
  42883. // Converts an RGB color value to HSV
  42884. // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
  42885. // *Returns:* { h, s, v } in [0,1]
  42886. var rgb2hsv = function rgb2hsv(r, g, b) {
  42887. r = bound01(r, 255);
  42888. g = bound01(g, 255);
  42889. b = bound01(b, 255);
  42890. var max = Math.max(r, g, b);
  42891. var min = Math.min(r, g, b);
  42892. var h = void 0,
  42893. s = void 0;
  42894. var v = max;
  42895. var d = max - min;
  42896. s = max === 0 ? 0 : d / max;
  42897. if (max === min) {
  42898. h = 0; // achromatic
  42899. } else {
  42900. switch (max) {
  42901. case r:
  42902. h = (g - b) / d + (g < b ? 6 : 0);
  42903. break;
  42904. case g:
  42905. h = (b - r) / d + 2;
  42906. break;
  42907. case b:
  42908. h = (r - g) / d + 4;
  42909. break;
  42910. }
  42911. h /= 6;
  42912. }
  42913. return { h: h * 360, s: s * 100, v: v * 100 };
  42914. };
  42915. // `hsvToRgb`
  42916. // Converts an HSV color value to RGB.
  42917. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
  42918. // *Returns:* { r, g, b } in the set [0, 255]
  42919. var hsv2rgb = function hsv2rgb(h, s, v) {
  42920. h = bound01(h, 360) * 6;
  42921. s = bound01(s, 100);
  42922. v = bound01(v, 100);
  42923. var i = Math.floor(h);
  42924. var f = h - i;
  42925. var p = v * (1 - s);
  42926. var q = v * (1 - f * s);
  42927. var t = v * (1 - (1 - f) * s);
  42928. var mod = i % 6;
  42929. var r = [v, q, p, p, t, v][mod];
  42930. var g = [t, v, v, q, p, p][mod];
  42931. var b = [p, p, t, v, v, q][mod];
  42932. return {
  42933. r: Math.round(r * 255),
  42934. g: Math.round(g * 255),
  42935. b: Math.round(b * 255)
  42936. };
  42937. };
  42938. var Color = function () {
  42939. function Color(options) {
  42940. color_classCallCheck(this, Color);
  42941. this._hue = 0;
  42942. this._saturation = 100;
  42943. this._value = 100;
  42944. this._alpha = 100;
  42945. this.enableAlpha = false;
  42946. this.format = 'hex';
  42947. this.value = '';
  42948. options = options || {};
  42949. for (var option in options) {
  42950. if (options.hasOwnProperty(option)) {
  42951. this[option] = options[option];
  42952. }
  42953. }
  42954. this.doOnChange();
  42955. }
  42956. Color.prototype.set = function set(prop, value) {
  42957. if (arguments.length === 1 && (typeof prop === 'undefined' ? 'undefined' : color_typeof(prop)) === 'object') {
  42958. for (var p in prop) {
  42959. if (prop.hasOwnProperty(p)) {
  42960. this.set(p, prop[p]);
  42961. }
  42962. }
  42963. return;
  42964. }
  42965. this['_' + prop] = value;
  42966. this.doOnChange();
  42967. };
  42968. Color.prototype.get = function get(prop) {
  42969. return this['_' + prop];
  42970. };
  42971. Color.prototype.toRgb = function toRgb() {
  42972. return hsv2rgb(this._hue, this._saturation, this._value);
  42973. };
  42974. Color.prototype.fromString = function fromString(value) {
  42975. var _this = this;
  42976. if (!value) {
  42977. this._hue = 0;
  42978. this._saturation = 100;
  42979. this._value = 100;
  42980. this.doOnChange();
  42981. return;
  42982. }
  42983. var fromHSV = function fromHSV(h, s, v) {
  42984. _this._hue = Math.max(0, Math.min(360, h));
  42985. _this._saturation = Math.max(0, Math.min(100, s));
  42986. _this._value = Math.max(0, Math.min(100, v));
  42987. _this.doOnChange();
  42988. };
  42989. if (value.indexOf('hsl') !== -1) {
  42990. var parts = value.replace(/hsla|hsl|\(|\)/gm, '').split(/\s|,/g).filter(function (val) {
  42991. return val !== '';
  42992. }).map(function (val, index) {
  42993. return index > 2 ? parseFloat(val) : parseInt(val, 10);
  42994. });
  42995. if (parts.length === 4) {
  42996. this._alpha = Math.floor(parseFloat(parts[3]) * 100);
  42997. } else if (parts.length === 3) {
  42998. this._alpha = 100;
  42999. }
  43000. if (parts.length >= 3) {
  43001. var _hsl2hsv = hsl2hsv(parts[0], parts[1], parts[2]),
  43002. h = _hsl2hsv.h,
  43003. s = _hsl2hsv.s,
  43004. v = _hsl2hsv.v;
  43005. fromHSV(h, s, v);
  43006. }
  43007. } else if (value.indexOf('hsv') !== -1) {
  43008. var _parts = value.replace(/hsva|hsv|\(|\)/gm, '').split(/\s|,/g).filter(function (val) {
  43009. return val !== '';
  43010. }).map(function (val, index) {
  43011. return index > 2 ? parseFloat(val) : parseInt(val, 10);
  43012. });
  43013. if (_parts.length === 4) {
  43014. this._alpha = Math.floor(parseFloat(_parts[3]) * 100);
  43015. } else if (_parts.length === 3) {
  43016. this._alpha = 100;
  43017. }
  43018. if (_parts.length >= 3) {
  43019. fromHSV(_parts[0], _parts[1], _parts[2]);
  43020. }
  43021. } else if (value.indexOf('rgb') !== -1) {
  43022. var _parts2 = value.replace(/rgba|rgb|\(|\)/gm, '').split(/\s|,/g).filter(function (val) {
  43023. return val !== '';
  43024. }).map(function (val, index) {
  43025. return index > 2 ? parseFloat(val) : parseInt(val, 10);
  43026. });
  43027. if (_parts2.length === 4) {
  43028. this._alpha = Math.floor(parseFloat(_parts2[3]) * 100);
  43029. } else if (_parts2.length === 3) {
  43030. this._alpha = 100;
  43031. }
  43032. if (_parts2.length >= 3) {
  43033. var _rgb2hsv = rgb2hsv(_parts2[0], _parts2[1], _parts2[2]),
  43034. _h = _rgb2hsv.h,
  43035. _s = _rgb2hsv.s,
  43036. _v = _rgb2hsv.v;
  43037. fromHSV(_h, _s, _v);
  43038. }
  43039. } else if (value.indexOf('#') !== -1) {
  43040. var hex = value.replace('#', '').trim();
  43041. if (!/^(?:[0-9a-fA-F]{3}){1,2}|[0-9a-fA-F]{8}$/.test(hex)) return;
  43042. var r = void 0,
  43043. g = void 0,
  43044. b = void 0;
  43045. if (hex.length === 3) {
  43046. r = parseHexChannel(hex[0] + hex[0]);
  43047. g = parseHexChannel(hex[1] + hex[1]);
  43048. b = parseHexChannel(hex[2] + hex[2]);
  43049. } else if (hex.length === 6 || hex.length === 8) {
  43050. r = parseHexChannel(hex.substring(0, 2));
  43051. g = parseHexChannel(hex.substring(2, 4));
  43052. b = parseHexChannel(hex.substring(4, 6));
  43053. }
  43054. if (hex.length === 8) {
  43055. this._alpha = Math.floor(parseHexChannel(hex.substring(6)) / 255 * 100);
  43056. } else if (hex.length === 3 || hex.length === 6) {
  43057. this._alpha = 100;
  43058. }
  43059. var _rgb2hsv2 = rgb2hsv(r, g, b),
  43060. _h2 = _rgb2hsv2.h,
  43061. _s2 = _rgb2hsv2.s,
  43062. _v2 = _rgb2hsv2.v;
  43063. fromHSV(_h2, _s2, _v2);
  43064. }
  43065. };
  43066. Color.prototype.compare = function compare(color) {
  43067. return Math.abs(color._hue - this._hue) < 2 && Math.abs(color._saturation - this._saturation) < 1 && Math.abs(color._value - this._value) < 1 && Math.abs(color._alpha - this._alpha) < 1;
  43068. };
  43069. Color.prototype.doOnChange = function doOnChange() {
  43070. var _hue = this._hue,
  43071. _saturation = this._saturation,
  43072. _value = this._value,
  43073. _alpha = this._alpha,
  43074. format = this.format;
  43075. if (this.enableAlpha) {
  43076. switch (format) {
  43077. case 'hsl':
  43078. var hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
  43079. this.value = 'hsla(' + _hue + ', ' + Math.round(hsl[1] * 100) + '%, ' + Math.round(hsl[2] * 100) + '%, ' + _alpha / 100 + ')';
  43080. break;
  43081. case 'hsv':
  43082. this.value = 'hsva(' + _hue + ', ' + Math.round(_saturation) + '%, ' + Math.round(_value) + '%, ' + _alpha / 100 + ')';
  43083. break;
  43084. default:
  43085. var _hsv2rgb = hsv2rgb(_hue, _saturation, _value),
  43086. r = _hsv2rgb.r,
  43087. g = _hsv2rgb.g,
  43088. b = _hsv2rgb.b;
  43089. this.value = 'rgba(' + r + ', ' + g + ', ' + b + ', ' + _alpha / 100 + ')';
  43090. }
  43091. } else {
  43092. switch (format) {
  43093. case 'hsl':
  43094. var _hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
  43095. this.value = 'hsl(' + _hue + ', ' + Math.round(_hsl[1] * 100) + '%, ' + Math.round(_hsl[2] * 100) + '%)';
  43096. break;
  43097. case 'hsv':
  43098. this.value = 'hsv(' + _hue + ', ' + Math.round(_saturation) + '%, ' + Math.round(_value) + '%)';
  43099. break;
  43100. case 'rgb':
  43101. var _hsv2rgb2 = hsv2rgb(_hue, _saturation, _value),
  43102. _r = _hsv2rgb2.r,
  43103. _g = _hsv2rgb2.g,
  43104. _b = _hsv2rgb2.b;
  43105. this.value = 'rgb(' + _r + ', ' + _g + ', ' + _b + ')';
  43106. break;
  43107. default:
  43108. this.value = toHex(hsv2rgb(_hue, _saturation, _value));
  43109. }
  43110. }
  43111. };
  43112. return Color;
  43113. }();
  43114. /* harmony default export */ var src_color = (Color);
  43115. ;
  43116. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/picker-dropdown.vue?vue&type=template&id=06601625&
  43117. var picker_dropdownvue_type_template_id_06601625_render = function() {
  43118. var _vm = this
  43119. var _h = _vm.$createElement
  43120. var _c = _vm._self._c || _h
  43121. return _c(
  43122. "transition",
  43123. { attrs: { name: "el-zoom-in-top" }, on: { "after-leave": _vm.doDestroy } },
  43124. [
  43125. _c(
  43126. "div",
  43127. {
  43128. directives: [
  43129. {
  43130. name: "show",
  43131. rawName: "v-show",
  43132. value: _vm.showPopper,
  43133. expression: "showPopper"
  43134. }
  43135. ],
  43136. staticClass: "el-color-dropdown"
  43137. },
  43138. [
  43139. _c(
  43140. "div",
  43141. { staticClass: "el-color-dropdown__main-wrapper" },
  43142. [
  43143. _c("hue-slider", {
  43144. ref: "hue",
  43145. staticStyle: { float: "right" },
  43146. attrs: { color: _vm.color, vertical: "" }
  43147. }),
  43148. _c("sv-panel", { ref: "sl", attrs: { color: _vm.color } })
  43149. ],
  43150. 1
  43151. ),
  43152. _vm.showAlpha
  43153. ? _c("alpha-slider", { ref: "alpha", attrs: { color: _vm.color } })
  43154. : _vm._e(),
  43155. _vm.predefine
  43156. ? _c("predefine", {
  43157. attrs: { color: _vm.color, colors: _vm.predefine }
  43158. })
  43159. : _vm._e(),
  43160. _c(
  43161. "div",
  43162. { staticClass: "el-color-dropdown__btns" },
  43163. [
  43164. _c(
  43165. "span",
  43166. { staticClass: "el-color-dropdown__value" },
  43167. [
  43168. _c("el-input", {
  43169. attrs: { "validate-event": false, size: "mini" },
  43170. on: { blur: _vm.handleConfirm },
  43171. nativeOn: {
  43172. keyup: function($event) {
  43173. if (
  43174. !("button" in $event) &&
  43175. _vm._k(
  43176. $event.keyCode,
  43177. "enter",
  43178. 13,
  43179. $event.key,
  43180. "Enter"
  43181. )
  43182. ) {
  43183. return null
  43184. }
  43185. return _vm.handleConfirm($event)
  43186. }
  43187. },
  43188. model: {
  43189. value: _vm.customInput,
  43190. callback: function($$v) {
  43191. _vm.customInput = $$v
  43192. },
  43193. expression: "customInput"
  43194. }
  43195. })
  43196. ],
  43197. 1
  43198. ),
  43199. _c(
  43200. "el-button",
  43201. {
  43202. staticClass: "el-color-dropdown__link-btn",
  43203. attrs: { size: "mini", type: "text" },
  43204. on: {
  43205. click: function($event) {
  43206. _vm.$emit("clear")
  43207. }
  43208. }
  43209. },
  43210. [
  43211. _vm._v(
  43212. "\n " +
  43213. _vm._s(_vm.t("el.colorpicker.clear")) +
  43214. "\n "
  43215. )
  43216. ]
  43217. ),
  43218. _c(
  43219. "el-button",
  43220. {
  43221. staticClass: "el-color-dropdown__btn",
  43222. attrs: { plain: "", size: "mini" },
  43223. on: { click: _vm.confirmValue }
  43224. },
  43225. [
  43226. _vm._v(
  43227. "\n " +
  43228. _vm._s(_vm.t("el.colorpicker.confirm")) +
  43229. "\n "
  43230. )
  43231. ]
  43232. )
  43233. ],
  43234. 1
  43235. )
  43236. ],
  43237. 1
  43238. )
  43239. ]
  43240. )
  43241. }
  43242. var picker_dropdownvue_type_template_id_06601625_staticRenderFns = []
  43243. picker_dropdownvue_type_template_id_06601625_render._withStripped = true
  43244. // CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue?vue&type=template&id=06601625&
  43245. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/sv-panel.vue?vue&type=template&id=d8583596&
  43246. var sv_panelvue_type_template_id_d8583596_render = function() {
  43247. var _vm = this
  43248. var _h = _vm.$createElement
  43249. var _c = _vm._self._c || _h
  43250. return _c(
  43251. "div",
  43252. {
  43253. staticClass: "el-color-svpanel",
  43254. style: {
  43255. backgroundColor: _vm.background
  43256. }
  43257. },
  43258. [
  43259. _c("div", { staticClass: "el-color-svpanel__white" }),
  43260. _c("div", { staticClass: "el-color-svpanel__black" }),
  43261. _c(
  43262. "div",
  43263. {
  43264. staticClass: "el-color-svpanel__cursor",
  43265. style: {
  43266. top: _vm.cursorTop + "px",
  43267. left: _vm.cursorLeft + "px"
  43268. }
  43269. },
  43270. [_c("div")]
  43271. )
  43272. ]
  43273. )
  43274. }
  43275. var sv_panelvue_type_template_id_d8583596_staticRenderFns = []
  43276. sv_panelvue_type_template_id_d8583596_render._withStripped = true
  43277. // CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=template&id=d8583596&
  43278. // CONCATENATED MODULE: ./packages/color-picker/src/draggable.js
  43279. var isDragging = false;
  43280. /* harmony default export */ var draggable = (function (element, options) {
  43281. if (external_vue_default.a.prototype.$isServer) return;
  43282. var moveFn = function moveFn(event) {
  43283. if (options.drag) {
  43284. options.drag(event);
  43285. }
  43286. };
  43287. var upFn = function upFn(event) {
  43288. document.removeEventListener('mousemove', moveFn);
  43289. document.removeEventListener('mouseup', upFn);
  43290. document.onselectstart = null;
  43291. document.ondragstart = null;
  43292. isDragging = false;
  43293. if (options.end) {
  43294. options.end(event);
  43295. }
  43296. };
  43297. element.addEventListener('mousedown', function (event) {
  43298. if (isDragging) return;
  43299. document.onselectstart = function () {
  43300. return false;
  43301. };
  43302. document.ondragstart = function () {
  43303. return false;
  43304. };
  43305. document.addEventListener('mousemove', moveFn);
  43306. document.addEventListener('mouseup', upFn);
  43307. isDragging = true;
  43308. if (options.start) {
  43309. options.start(event);
  43310. }
  43311. });
  43312. });
  43313. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/sv-panel.vue?vue&type=script&lang=js&
  43314. //
  43315. //
  43316. //
  43317. //
  43318. //
  43319. //
  43320. //
  43321. //
  43322. //
  43323. //
  43324. //
  43325. //
  43326. //
  43327. //
  43328. //
  43329. //
  43330. //
  43331. /* harmony default export */ var sv_panelvue_type_script_lang_js_ = ({
  43332. name: 'el-sl-panel',
  43333. props: {
  43334. color: {
  43335. required: true
  43336. }
  43337. },
  43338. computed: {
  43339. colorValue: function colorValue() {
  43340. var hue = this.color.get('hue');
  43341. var value = this.color.get('value');
  43342. return { hue: hue, value: value };
  43343. }
  43344. },
  43345. watch: {
  43346. colorValue: function colorValue() {
  43347. this.update();
  43348. }
  43349. },
  43350. methods: {
  43351. update: function update() {
  43352. var saturation = this.color.get('saturation');
  43353. var value = this.color.get('value');
  43354. var el = this.$el;
  43355. var width = el.clientWidth,
  43356. height = el.clientHeight;
  43357. this.cursorLeft = saturation * width / 100;
  43358. this.cursorTop = (100 - value) * height / 100;
  43359. this.background = 'hsl(' + this.color.get('hue') + ', 100%, 50%)';
  43360. },
  43361. handleDrag: function handleDrag(event) {
  43362. var el = this.$el;
  43363. var rect = el.getBoundingClientRect();
  43364. var left = event.clientX - rect.left;
  43365. var top = event.clientY - rect.top;
  43366. left = Math.max(0, left);
  43367. left = Math.min(left, rect.width);
  43368. top = Math.max(0, top);
  43369. top = Math.min(top, rect.height);
  43370. this.cursorLeft = left;
  43371. this.cursorTop = top;
  43372. this.color.set({
  43373. saturation: left / rect.width * 100,
  43374. value: 100 - top / rect.height * 100
  43375. });
  43376. }
  43377. },
  43378. mounted: function mounted() {
  43379. var _this = this;
  43380. draggable(this.$el, {
  43381. drag: function drag(event) {
  43382. _this.handleDrag(event);
  43383. },
  43384. end: function end(event) {
  43385. _this.handleDrag(event);
  43386. }
  43387. });
  43388. this.update();
  43389. },
  43390. data: function data() {
  43391. return {
  43392. cursorTop: 0,
  43393. cursorLeft: 0,
  43394. background: 'hsl(0, 100%, 50%)'
  43395. };
  43396. }
  43397. });
  43398. // CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=script&lang=js&
  43399. /* harmony default export */ var components_sv_panelvue_type_script_lang_js_ = (sv_panelvue_type_script_lang_js_);
  43400. // CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue
  43401. /* normalize component */
  43402. var sv_panel_component = normalizeComponent(
  43403. components_sv_panelvue_type_script_lang_js_,
  43404. sv_panelvue_type_template_id_d8583596_render,
  43405. sv_panelvue_type_template_id_d8583596_staticRenderFns,
  43406. false,
  43407. null,
  43408. null,
  43409. null
  43410. )
  43411. /* hot reload */
  43412. if (false) { var sv_panel_api; }
  43413. sv_panel_component.options.__file = "packages/color-picker/src/components/sv-panel.vue"
  43414. /* harmony default export */ var sv_panel = (sv_panel_component.exports);
  43415. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/hue-slider.vue?vue&type=template&id=5cdc43b1&
  43416. var hue_slidervue_type_template_id_5cdc43b1_render = function() {
  43417. var _vm = this
  43418. var _h = _vm.$createElement
  43419. var _c = _vm._self._c || _h
  43420. return _c(
  43421. "div",
  43422. {
  43423. staticClass: "el-color-hue-slider",
  43424. class: { "is-vertical": _vm.vertical }
  43425. },
  43426. [
  43427. _c("div", {
  43428. ref: "bar",
  43429. staticClass: "el-color-hue-slider__bar",
  43430. on: { click: _vm.handleClick }
  43431. }),
  43432. _c("div", {
  43433. ref: "thumb",
  43434. staticClass: "el-color-hue-slider__thumb",
  43435. style: {
  43436. left: _vm.thumbLeft + "px",
  43437. top: _vm.thumbTop + "px"
  43438. }
  43439. })
  43440. ]
  43441. )
  43442. }
  43443. var hue_slidervue_type_template_id_5cdc43b1_staticRenderFns = []
  43444. hue_slidervue_type_template_id_5cdc43b1_render._withStripped = true
  43445. // CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue?vue&type=template&id=5cdc43b1&
  43446. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/hue-slider.vue?vue&type=script&lang=js&
  43447. //
  43448. //
  43449. //
  43450. //
  43451. //
  43452. //
  43453. //
  43454. //
  43455. //
  43456. //
  43457. //
  43458. //
  43459. //
  43460. /* harmony default export */ var hue_slidervue_type_script_lang_js_ = ({
  43461. name: 'el-color-hue-slider',
  43462. props: {
  43463. color: {
  43464. required: true
  43465. },
  43466. vertical: Boolean
  43467. },
  43468. data: function data() {
  43469. return {
  43470. thumbLeft: 0,
  43471. thumbTop: 0
  43472. };
  43473. },
  43474. computed: {
  43475. hueValue: function hueValue() {
  43476. var hue = this.color.get('hue');
  43477. return hue;
  43478. }
  43479. },
  43480. watch: {
  43481. hueValue: function hueValue() {
  43482. this.update();
  43483. }
  43484. },
  43485. methods: {
  43486. handleClick: function handleClick(event) {
  43487. var thumb = this.$refs.thumb;
  43488. var target = event.target;
  43489. if (target !== thumb) {
  43490. this.handleDrag(event);
  43491. }
  43492. },
  43493. handleDrag: function handleDrag(event) {
  43494. var rect = this.$el.getBoundingClientRect();
  43495. var thumb = this.$refs.thumb;
  43496. var hue = void 0;
  43497. if (!this.vertical) {
  43498. var left = event.clientX - rect.left;
  43499. left = Math.min(left, rect.width - thumb.offsetWidth / 2);
  43500. left = Math.max(thumb.offsetWidth / 2, left);
  43501. hue = Math.round((left - thumb.offsetWidth / 2) / (rect.width - thumb.offsetWidth) * 360);
  43502. } else {
  43503. var top = event.clientY - rect.top;
  43504. top = Math.min(top, rect.height - thumb.offsetHeight / 2);
  43505. top = Math.max(thumb.offsetHeight / 2, top);
  43506. hue = Math.round((top - thumb.offsetHeight / 2) / (rect.height - thumb.offsetHeight) * 360);
  43507. }
  43508. this.color.set('hue', hue);
  43509. },
  43510. getThumbLeft: function getThumbLeft() {
  43511. if (this.vertical) return 0;
  43512. var el = this.$el;
  43513. var hue = this.color.get('hue');
  43514. if (!el) return 0;
  43515. var thumb = this.$refs.thumb;
  43516. return Math.round(hue * (el.offsetWidth - thumb.offsetWidth / 2) / 360);
  43517. },
  43518. getThumbTop: function getThumbTop() {
  43519. if (!this.vertical) return 0;
  43520. var el = this.$el;
  43521. var hue = this.color.get('hue');
  43522. if (!el) return 0;
  43523. var thumb = this.$refs.thumb;
  43524. return Math.round(hue * (el.offsetHeight - thumb.offsetHeight / 2) / 360);
  43525. },
  43526. update: function update() {
  43527. this.thumbLeft = this.getThumbLeft();
  43528. this.thumbTop = this.getThumbTop();
  43529. }
  43530. },
  43531. mounted: function mounted() {
  43532. var _this = this;
  43533. var _$refs = this.$refs,
  43534. bar = _$refs.bar,
  43535. thumb = _$refs.thumb;
  43536. var dragConfig = {
  43537. drag: function drag(event) {
  43538. _this.handleDrag(event);
  43539. },
  43540. end: function end(event) {
  43541. _this.handleDrag(event);
  43542. }
  43543. };
  43544. draggable(bar, dragConfig);
  43545. draggable(thumb, dragConfig);
  43546. this.update();
  43547. }
  43548. });
  43549. // CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue?vue&type=script&lang=js&
  43550. /* harmony default export */ var components_hue_slidervue_type_script_lang_js_ = (hue_slidervue_type_script_lang_js_);
  43551. // CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue
  43552. /* normalize component */
  43553. var hue_slider_component = normalizeComponent(
  43554. components_hue_slidervue_type_script_lang_js_,
  43555. hue_slidervue_type_template_id_5cdc43b1_render,
  43556. hue_slidervue_type_template_id_5cdc43b1_staticRenderFns,
  43557. false,
  43558. null,
  43559. null,
  43560. null
  43561. )
  43562. /* hot reload */
  43563. if (false) { var hue_slider_api; }
  43564. hue_slider_component.options.__file = "packages/color-picker/src/components/hue-slider.vue"
  43565. /* harmony default export */ var hue_slider = (hue_slider_component.exports);
  43566. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/alpha-slider.vue?vue&type=template&id=068c66cb&
  43567. var alpha_slidervue_type_template_id_068c66cb_render = function() {
  43568. var _vm = this
  43569. var _h = _vm.$createElement
  43570. var _c = _vm._self._c || _h
  43571. return _c(
  43572. "div",
  43573. {
  43574. staticClass: "el-color-alpha-slider",
  43575. class: { "is-vertical": _vm.vertical }
  43576. },
  43577. [
  43578. _c("div", {
  43579. ref: "bar",
  43580. staticClass: "el-color-alpha-slider__bar",
  43581. style: {
  43582. background: _vm.background
  43583. },
  43584. on: { click: _vm.handleClick }
  43585. }),
  43586. _c("div", {
  43587. ref: "thumb",
  43588. staticClass: "el-color-alpha-slider__thumb",
  43589. style: {
  43590. left: _vm.thumbLeft + "px",
  43591. top: _vm.thumbTop + "px"
  43592. }
  43593. })
  43594. ]
  43595. )
  43596. }
  43597. var alpha_slidervue_type_template_id_068c66cb_staticRenderFns = []
  43598. alpha_slidervue_type_template_id_068c66cb_render._withStripped = true
  43599. // CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue?vue&type=template&id=068c66cb&
  43600. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/alpha-slider.vue?vue&type=script&lang=js&
  43601. //
  43602. //
  43603. //
  43604. //
  43605. //
  43606. //
  43607. //
  43608. //
  43609. //
  43610. //
  43611. //
  43612. //
  43613. //
  43614. //
  43615. //
  43616. //
  43617. //
  43618. //
  43619. //
  43620. /* harmony default export */ var alpha_slidervue_type_script_lang_js_ = ({
  43621. name: 'el-color-alpha-slider',
  43622. props: {
  43623. color: {
  43624. required: true
  43625. },
  43626. vertical: Boolean
  43627. },
  43628. watch: {
  43629. 'color._alpha': function color_alpha() {
  43630. this.update();
  43631. },
  43632. 'color.value': function colorValue() {
  43633. this.update();
  43634. }
  43635. },
  43636. methods: {
  43637. handleClick: function handleClick(event) {
  43638. var thumb = this.$refs.thumb;
  43639. var target = event.target;
  43640. if (target !== thumb) {
  43641. this.handleDrag(event);
  43642. }
  43643. },
  43644. handleDrag: function handleDrag(event) {
  43645. var rect = this.$el.getBoundingClientRect();
  43646. var thumb = this.$refs.thumb;
  43647. if (!this.vertical) {
  43648. var left = event.clientX - rect.left;
  43649. left = Math.max(thumb.offsetWidth / 2, left);
  43650. left = Math.min(left, rect.width - thumb.offsetWidth / 2);
  43651. this.color.set('alpha', Math.round((left - thumb.offsetWidth / 2) / (rect.width - thumb.offsetWidth) * 100));
  43652. } else {
  43653. var top = event.clientY - rect.top;
  43654. top = Math.max(thumb.offsetHeight / 2, top);
  43655. top = Math.min(top, rect.height - thumb.offsetHeight / 2);
  43656. this.color.set('alpha', Math.round((top - thumb.offsetHeight / 2) / (rect.height - thumb.offsetHeight) * 100));
  43657. }
  43658. },
  43659. getThumbLeft: function getThumbLeft() {
  43660. if (this.vertical) return 0;
  43661. var el = this.$el;
  43662. var alpha = this.color._alpha;
  43663. if (!el) return 0;
  43664. var thumb = this.$refs.thumb;
  43665. return Math.round(alpha * (el.offsetWidth - thumb.offsetWidth / 2) / 100);
  43666. },
  43667. getThumbTop: function getThumbTop() {
  43668. if (!this.vertical) return 0;
  43669. var el = this.$el;
  43670. var alpha = this.color._alpha;
  43671. if (!el) return 0;
  43672. var thumb = this.$refs.thumb;
  43673. return Math.round(alpha * (el.offsetHeight - thumb.offsetHeight / 2) / 100);
  43674. },
  43675. getBackground: function getBackground() {
  43676. if (this.color && this.color.value) {
  43677. var _color$toRgb = this.color.toRgb(),
  43678. r = _color$toRgb.r,
  43679. g = _color$toRgb.g,
  43680. b = _color$toRgb.b;
  43681. return 'linear-gradient(to right, rgba(' + r + ', ' + g + ', ' + b + ', 0) 0%, rgba(' + r + ', ' + g + ', ' + b + ', 1) 100%)';
  43682. }
  43683. return null;
  43684. },
  43685. update: function update() {
  43686. this.thumbLeft = this.getThumbLeft();
  43687. this.thumbTop = this.getThumbTop();
  43688. this.background = this.getBackground();
  43689. }
  43690. },
  43691. data: function data() {
  43692. return {
  43693. thumbLeft: 0,
  43694. thumbTop: 0,
  43695. background: null
  43696. };
  43697. },
  43698. mounted: function mounted() {
  43699. var _this = this;
  43700. var _$refs = this.$refs,
  43701. bar = _$refs.bar,
  43702. thumb = _$refs.thumb;
  43703. var dragConfig = {
  43704. drag: function drag(event) {
  43705. _this.handleDrag(event);
  43706. },
  43707. end: function end(event) {
  43708. _this.handleDrag(event);
  43709. }
  43710. };
  43711. draggable(bar, dragConfig);
  43712. draggable(thumb, dragConfig);
  43713. this.update();
  43714. }
  43715. });
  43716. // CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue?vue&type=script&lang=js&
  43717. /* harmony default export */ var components_alpha_slidervue_type_script_lang_js_ = (alpha_slidervue_type_script_lang_js_);
  43718. // CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue
  43719. /* normalize component */
  43720. var alpha_slider_component = normalizeComponent(
  43721. components_alpha_slidervue_type_script_lang_js_,
  43722. alpha_slidervue_type_template_id_068c66cb_render,
  43723. alpha_slidervue_type_template_id_068c66cb_staticRenderFns,
  43724. false,
  43725. null,
  43726. null,
  43727. null
  43728. )
  43729. /* hot reload */
  43730. if (false) { var alpha_slider_api; }
  43731. alpha_slider_component.options.__file = "packages/color-picker/src/components/alpha-slider.vue"
  43732. /* harmony default export */ var alpha_slider = (alpha_slider_component.exports);
  43733. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/predefine.vue?vue&type=template&id=06e03093&
  43734. var predefinevue_type_template_id_06e03093_render = function() {
  43735. var _vm = this
  43736. var _h = _vm.$createElement
  43737. var _c = _vm._self._c || _h
  43738. return _c("div", { staticClass: "el-color-predefine" }, [
  43739. _c(
  43740. "div",
  43741. { staticClass: "el-color-predefine__colors" },
  43742. _vm._l(_vm.rgbaColors, function(item, index) {
  43743. return _c(
  43744. "div",
  43745. {
  43746. key: _vm.colors[index],
  43747. staticClass: "el-color-predefine__color-selector",
  43748. class: { selected: item.selected, "is-alpha": item._alpha < 100 },
  43749. on: {
  43750. click: function($event) {
  43751. _vm.handleSelect(index)
  43752. }
  43753. }
  43754. },
  43755. [_c("div", { style: { "background-color": item.value } })]
  43756. )
  43757. }),
  43758. 0
  43759. )
  43760. ])
  43761. }
  43762. var predefinevue_type_template_id_06e03093_staticRenderFns = []
  43763. predefinevue_type_template_id_06e03093_render._withStripped = true
  43764. // CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue?vue&type=template&id=06e03093&
  43765. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/predefine.vue?vue&type=script&lang=js&
  43766. //
  43767. //
  43768. //
  43769. //
  43770. //
  43771. //
  43772. //
  43773. //
  43774. //
  43775. //
  43776. //
  43777. //
  43778. //
  43779. //
  43780. //
  43781. /* harmony default export */ var predefinevue_type_script_lang_js_ = ({
  43782. props: {
  43783. colors: { type: Array, required: true },
  43784. color: { required: true }
  43785. },
  43786. data: function data() {
  43787. return {
  43788. rgbaColors: this.parseColors(this.colors, this.color)
  43789. };
  43790. },
  43791. methods: {
  43792. handleSelect: function handleSelect(index) {
  43793. this.color.fromString(this.colors[index]);
  43794. },
  43795. parseColors: function parseColors(colors, color) {
  43796. return colors.map(function (value) {
  43797. var c = new src_color();
  43798. c.enableAlpha = true;
  43799. c.format = 'rgba';
  43800. c.fromString(value);
  43801. c.selected = c.value === color.value;
  43802. return c;
  43803. });
  43804. }
  43805. },
  43806. watch: {
  43807. '$parent.currentColor': function $parentCurrentColor(val) {
  43808. var color = new src_color();
  43809. color.fromString(val);
  43810. this.rgbaColors.forEach(function (item) {
  43811. item.selected = color.compare(item);
  43812. });
  43813. },
  43814. colors: function colors(newVal) {
  43815. this.rgbaColors = this.parseColors(newVal, this.color);
  43816. },
  43817. color: function color(newVal) {
  43818. this.rgbaColors = this.parseColors(this.colors, newVal);
  43819. }
  43820. }
  43821. });
  43822. // CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue?vue&type=script&lang=js&
  43823. /* harmony default export */ var components_predefinevue_type_script_lang_js_ = (predefinevue_type_script_lang_js_);
  43824. // CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue
  43825. /* normalize component */
  43826. var predefine_component = normalizeComponent(
  43827. components_predefinevue_type_script_lang_js_,
  43828. predefinevue_type_template_id_06e03093_render,
  43829. predefinevue_type_template_id_06e03093_staticRenderFns,
  43830. false,
  43831. null,
  43832. null,
  43833. null
  43834. )
  43835. /* hot reload */
  43836. if (false) { var predefine_api; }
  43837. predefine_component.options.__file = "packages/color-picker/src/components/predefine.vue"
  43838. /* harmony default export */ var predefine = (predefine_component.exports);
  43839. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/picker-dropdown.vue?vue&type=script&lang=js&
  43840. //
  43841. //
  43842. //
  43843. //
  43844. //
  43845. //
  43846. //
  43847. //
  43848. //
  43849. //
  43850. //
  43851. //
  43852. //
  43853. //
  43854. //
  43855. //
  43856. //
  43857. //
  43858. //
  43859. //
  43860. //
  43861. //
  43862. //
  43863. //
  43864. //
  43865. //
  43866. //
  43867. //
  43868. //
  43869. //
  43870. //
  43871. //
  43872. //
  43873. //
  43874. //
  43875. //
  43876. //
  43877. //
  43878. //
  43879. //
  43880. /* harmony default export */ var picker_dropdownvue_type_script_lang_js_ = ({
  43881. name: 'el-color-picker-dropdown',
  43882. mixins: [vue_popper_default.a, locale_default.a],
  43883. components: {
  43884. SvPanel: sv_panel,
  43885. HueSlider: hue_slider,
  43886. AlphaSlider: alpha_slider,
  43887. ElInput: input_default.a,
  43888. ElButton: button_default.a,
  43889. Predefine: predefine
  43890. },
  43891. props: {
  43892. color: {
  43893. required: true
  43894. },
  43895. showAlpha: Boolean,
  43896. predefine: Array
  43897. },
  43898. data: function data() {
  43899. return {
  43900. customInput: ''
  43901. };
  43902. },
  43903. computed: {
  43904. currentColor: function currentColor() {
  43905. var parent = this.$parent;
  43906. return !parent.value && !parent.showPanelColor ? '' : parent.color.value;
  43907. }
  43908. },
  43909. methods: {
  43910. confirmValue: function confirmValue() {
  43911. this.$emit('pick');
  43912. },
  43913. handleConfirm: function handleConfirm() {
  43914. this.color.fromString(this.customInput);
  43915. }
  43916. },
  43917. mounted: function mounted() {
  43918. this.$parent.popperElm = this.popperElm = this.$el;
  43919. this.referenceElm = this.$parent.$el;
  43920. },
  43921. watch: {
  43922. showPopper: function showPopper(val) {
  43923. var _this = this;
  43924. if (val === true) {
  43925. this.$nextTick(function () {
  43926. var _$refs = _this.$refs,
  43927. sl = _$refs.sl,
  43928. hue = _$refs.hue,
  43929. alpha = _$refs.alpha;
  43930. sl && sl.update();
  43931. hue && hue.update();
  43932. alpha && alpha.update();
  43933. });
  43934. }
  43935. },
  43936. currentColor: {
  43937. immediate: true,
  43938. handler: function handler(val) {
  43939. this.customInput = val;
  43940. }
  43941. }
  43942. }
  43943. });
  43944. // CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue?vue&type=script&lang=js&
  43945. /* harmony default export */ var components_picker_dropdownvue_type_script_lang_js_ = (picker_dropdownvue_type_script_lang_js_);
  43946. // CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue
  43947. /* normalize component */
  43948. var picker_dropdown_component = normalizeComponent(
  43949. components_picker_dropdownvue_type_script_lang_js_,
  43950. picker_dropdownvue_type_template_id_06601625_render,
  43951. picker_dropdownvue_type_template_id_06601625_staticRenderFns,
  43952. false,
  43953. null,
  43954. null,
  43955. null
  43956. )
  43957. /* hot reload */
  43958. if (false) { var picker_dropdown_api; }
  43959. picker_dropdown_component.options.__file = "packages/color-picker/src/components/picker-dropdown.vue"
  43960. /* harmony default export */ var picker_dropdown = (picker_dropdown_component.exports);
  43961. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/main.vue?vue&type=script&lang=js&
  43962. //
  43963. //
  43964. //
  43965. //
  43966. //
  43967. //
  43968. //
  43969. //
  43970. //
  43971. //
  43972. //
  43973. //
  43974. //
  43975. //
  43976. //
  43977. //
  43978. //
  43979. //
  43980. //
  43981. //
  43982. //
  43983. //
  43984. //
  43985. //
  43986. //
  43987. //
  43988. //
  43989. //
  43990. //
  43991. //
  43992. //
  43993. //
  43994. /* harmony default export */ var color_picker_src_mainvue_type_script_lang_js_ = ({
  43995. name: 'ElColorPicker',
  43996. mixins: [emitter_default.a],
  43997. props: {
  43998. value: String,
  43999. showAlpha: Boolean,
  44000. colorFormat: String,
  44001. disabled: Boolean,
  44002. size: String,
  44003. popperClass: String,
  44004. predefine: Array
  44005. },
  44006. inject: {
  44007. elForm: {
  44008. default: ''
  44009. },
  44010. elFormItem: {
  44011. default: ''
  44012. }
  44013. },
  44014. directives: { Clickoutside: clickoutside_default.a },
  44015. computed: {
  44016. displayedColor: function displayedColor() {
  44017. if (!this.value && !this.showPanelColor) {
  44018. return 'transparent';
  44019. }
  44020. return this.displayedRgb(this.color, this.showAlpha);
  44021. },
  44022. _elFormItemSize: function _elFormItemSize() {
  44023. return (this.elFormItem || {}).elFormItemSize;
  44024. },
  44025. colorSize: function colorSize() {
  44026. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  44027. },
  44028. colorDisabled: function colorDisabled() {
  44029. return this.disabled || (this.elForm || {}).disabled;
  44030. }
  44031. },
  44032. watch: {
  44033. value: function value(val) {
  44034. if (!val) {
  44035. this.showPanelColor = false;
  44036. } else if (val && val !== this.color.value) {
  44037. this.color.fromString(val);
  44038. }
  44039. },
  44040. color: {
  44041. deep: true,
  44042. handler: function handler() {
  44043. this.showPanelColor = true;
  44044. }
  44045. },
  44046. displayedColor: function displayedColor(val) {
  44047. if (!this.showPicker) return;
  44048. var currentValueColor = new src_color({
  44049. enableAlpha: this.showAlpha,
  44050. format: this.colorFormat
  44051. });
  44052. currentValueColor.fromString(this.value);
  44053. var currentValueColorRgb = this.displayedRgb(currentValueColor, this.showAlpha);
  44054. if (val !== currentValueColorRgb) {
  44055. this.$emit('active-change', val);
  44056. }
  44057. }
  44058. },
  44059. methods: {
  44060. handleTrigger: function handleTrigger() {
  44061. if (this.colorDisabled) return;
  44062. this.showPicker = !this.showPicker;
  44063. },
  44064. confirmValue: function confirmValue() {
  44065. var value = this.color.value;
  44066. this.$emit('input', value);
  44067. this.$emit('change', value);
  44068. this.dispatch('ElFormItem', 'el.form.change', value);
  44069. this.showPicker = false;
  44070. },
  44071. clearValue: function clearValue() {
  44072. this.$emit('input', null);
  44073. this.$emit('change', null);
  44074. if (this.value !== null) {
  44075. this.dispatch('ElFormItem', 'el.form.change', null);
  44076. }
  44077. this.showPanelColor = false;
  44078. this.showPicker = false;
  44079. this.resetColor();
  44080. },
  44081. hide: function hide() {
  44082. this.showPicker = false;
  44083. this.resetColor();
  44084. },
  44085. resetColor: function resetColor() {
  44086. var _this = this;
  44087. this.$nextTick(function (_) {
  44088. if (_this.value) {
  44089. _this.color.fromString(_this.value);
  44090. } else {
  44091. _this.showPanelColor = false;
  44092. }
  44093. });
  44094. },
  44095. displayedRgb: function displayedRgb(color, showAlpha) {
  44096. if (!(color instanceof src_color)) {
  44097. throw Error('color should be instance of Color Class');
  44098. }
  44099. var _color$toRgb = color.toRgb(),
  44100. r = _color$toRgb.r,
  44101. g = _color$toRgb.g,
  44102. b = _color$toRgb.b;
  44103. return showAlpha ? 'rgba(' + r + ', ' + g + ', ' + b + ', ' + color.get('alpha') / 100 + ')' : 'rgb(' + r + ', ' + g + ', ' + b + ')';
  44104. }
  44105. },
  44106. mounted: function mounted() {
  44107. var value = this.value;
  44108. if (value) {
  44109. this.color.fromString(value);
  44110. }
  44111. this.popperElm = this.$refs.dropdown.$el;
  44112. },
  44113. data: function data() {
  44114. var color = new src_color({
  44115. enableAlpha: this.showAlpha,
  44116. format: this.colorFormat
  44117. });
  44118. return {
  44119. color: color,
  44120. showPicker: false,
  44121. showPanelColor: false
  44122. };
  44123. },
  44124. components: {
  44125. PickerDropdown: picker_dropdown
  44126. }
  44127. });
  44128. // CONCATENATED MODULE: ./packages/color-picker/src/main.vue?vue&type=script&lang=js&
  44129. /* harmony default export */ var packages_color_picker_src_mainvue_type_script_lang_js_ = (color_picker_src_mainvue_type_script_lang_js_);
  44130. // CONCATENATED MODULE: ./packages/color-picker/src/main.vue
  44131. /* normalize component */
  44132. var color_picker_src_main_component = normalizeComponent(
  44133. packages_color_picker_src_mainvue_type_script_lang_js_,
  44134. mainvue_type_template_id_55c8ade7_render,
  44135. mainvue_type_template_id_55c8ade7_staticRenderFns,
  44136. false,
  44137. null,
  44138. null,
  44139. null
  44140. )
  44141. /* hot reload */
  44142. if (false) { var color_picker_src_main_api; }
  44143. color_picker_src_main_component.options.__file = "packages/color-picker/src/main.vue"
  44144. /* harmony default export */ var color_picker_src_main = (color_picker_src_main_component.exports);
  44145. // CONCATENATED MODULE: ./packages/color-picker/index.js
  44146. /* istanbul ignore next */
  44147. color_picker_src_main.install = function (Vue) {
  44148. Vue.component(color_picker_src_main.name, color_picker_src_main);
  44149. };
  44150. /* harmony default export */ var color_picker = (color_picker_src_main);
  44151. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/main.vue?vue&type=template&id=5c654dd8&
  44152. var mainvue_type_template_id_5c654dd8_render = function() {
  44153. var _vm = this
  44154. var _h = _vm.$createElement
  44155. var _c = _vm._self._c || _h
  44156. return _c(
  44157. "div",
  44158. { staticClass: "el-transfer" },
  44159. [
  44160. _c(
  44161. "transfer-panel",
  44162. _vm._b(
  44163. {
  44164. ref: "leftPanel",
  44165. attrs: {
  44166. data: _vm.sourceData,
  44167. title: _vm.titles[0] || _vm.t("el.transfer.titles.0"),
  44168. "default-checked": _vm.leftDefaultChecked,
  44169. placeholder:
  44170. _vm.filterPlaceholder || _vm.t("el.transfer.filterPlaceholder")
  44171. },
  44172. on: { "checked-change": _vm.onSourceCheckedChange }
  44173. },
  44174. "transfer-panel",
  44175. _vm.$props,
  44176. false
  44177. ),
  44178. [_vm._t("left-footer")],
  44179. 2
  44180. ),
  44181. _c(
  44182. "div",
  44183. { staticClass: "el-transfer__buttons" },
  44184. [
  44185. _c(
  44186. "el-button",
  44187. {
  44188. class: [
  44189. "el-transfer__button",
  44190. _vm.hasButtonTexts ? "is-with-texts" : ""
  44191. ],
  44192. attrs: {
  44193. type: "primary",
  44194. disabled: _vm.rightChecked.length === 0
  44195. },
  44196. nativeOn: {
  44197. click: function($event) {
  44198. return _vm.addToLeft($event)
  44199. }
  44200. }
  44201. },
  44202. [
  44203. _c("i", { staticClass: "el-icon-arrow-left" }),
  44204. _vm.buttonTexts[0] !== undefined
  44205. ? _c("span", [_vm._v(_vm._s(_vm.buttonTexts[0]))])
  44206. : _vm._e()
  44207. ]
  44208. ),
  44209. _c(
  44210. "el-button",
  44211. {
  44212. class: [
  44213. "el-transfer__button",
  44214. _vm.hasButtonTexts ? "is-with-texts" : ""
  44215. ],
  44216. attrs: {
  44217. type: "primary",
  44218. disabled: _vm.leftChecked.length === 0
  44219. },
  44220. nativeOn: {
  44221. click: function($event) {
  44222. return _vm.addToRight($event)
  44223. }
  44224. }
  44225. },
  44226. [
  44227. _vm.buttonTexts[1] !== undefined
  44228. ? _c("span", [_vm._v(_vm._s(_vm.buttonTexts[1]))])
  44229. : _vm._e(),
  44230. _c("i", { staticClass: "el-icon-arrow-right" })
  44231. ]
  44232. )
  44233. ],
  44234. 1
  44235. ),
  44236. _c(
  44237. "transfer-panel",
  44238. _vm._b(
  44239. {
  44240. ref: "rightPanel",
  44241. attrs: {
  44242. data: _vm.targetData,
  44243. title: _vm.titles[1] || _vm.t("el.transfer.titles.1"),
  44244. "default-checked": _vm.rightDefaultChecked,
  44245. placeholder:
  44246. _vm.filterPlaceholder || _vm.t("el.transfer.filterPlaceholder")
  44247. },
  44248. on: { "checked-change": _vm.onTargetCheckedChange }
  44249. },
  44250. "transfer-panel",
  44251. _vm.$props,
  44252. false
  44253. ),
  44254. [_vm._t("right-footer")],
  44255. 2
  44256. )
  44257. ],
  44258. 1
  44259. )
  44260. }
  44261. var mainvue_type_template_id_5c654dd8_staticRenderFns = []
  44262. mainvue_type_template_id_5c654dd8_render._withStripped = true
  44263. // CONCATENATED MODULE: ./packages/transfer/src/main.vue?vue&type=template&id=5c654dd8&
  44264. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/transfer-panel.vue?vue&type=template&id=2ddab8bd&
  44265. var transfer_panelvue_type_template_id_2ddab8bd_render = function() {
  44266. var _vm = this
  44267. var _h = _vm.$createElement
  44268. var _c = _vm._self._c || _h
  44269. return _c("div", { staticClass: "el-transfer-panel" }, [
  44270. _c(
  44271. "p",
  44272. { staticClass: "el-transfer-panel__header" },
  44273. [
  44274. _c(
  44275. "el-checkbox",
  44276. {
  44277. attrs: { indeterminate: _vm.isIndeterminate },
  44278. on: { change: _vm.handleAllCheckedChange },
  44279. model: {
  44280. value: _vm.allChecked,
  44281. callback: function($$v) {
  44282. _vm.allChecked = $$v
  44283. },
  44284. expression: "allChecked"
  44285. }
  44286. },
  44287. [
  44288. _vm._v("\n " + _vm._s(_vm.title) + "\n "),
  44289. _c("span", [_vm._v(_vm._s(_vm.checkedSummary))])
  44290. ]
  44291. )
  44292. ],
  44293. 1
  44294. ),
  44295. _c(
  44296. "div",
  44297. {
  44298. class: [
  44299. "el-transfer-panel__body",
  44300. _vm.hasFooter ? "is-with-footer" : ""
  44301. ]
  44302. },
  44303. [
  44304. _vm.filterable
  44305. ? _c(
  44306. "el-input",
  44307. {
  44308. staticClass: "el-transfer-panel__filter",
  44309. attrs: { size: "small", placeholder: _vm.placeholder },
  44310. nativeOn: {
  44311. mouseenter: function($event) {
  44312. _vm.inputHover = true
  44313. },
  44314. mouseleave: function($event) {
  44315. _vm.inputHover = false
  44316. }
  44317. },
  44318. model: {
  44319. value: _vm.query,
  44320. callback: function($$v) {
  44321. _vm.query = $$v
  44322. },
  44323. expression: "query"
  44324. }
  44325. },
  44326. [
  44327. _c("i", {
  44328. class: ["el-input__icon", "el-icon-" + _vm.inputIcon],
  44329. attrs: { slot: "prefix" },
  44330. on: { click: _vm.clearQuery },
  44331. slot: "prefix"
  44332. })
  44333. ]
  44334. )
  44335. : _vm._e(),
  44336. _c(
  44337. "el-checkbox-group",
  44338. {
  44339. directives: [
  44340. {
  44341. name: "show",
  44342. rawName: "v-show",
  44343. value: !_vm.hasNoMatch && _vm.data.length > 0,
  44344. expression: "!hasNoMatch && data.length > 0"
  44345. }
  44346. ],
  44347. staticClass: "el-transfer-panel__list",
  44348. class: { "is-filterable": _vm.filterable },
  44349. model: {
  44350. value: _vm.checked,
  44351. callback: function($$v) {
  44352. _vm.checked = $$v
  44353. },
  44354. expression: "checked"
  44355. }
  44356. },
  44357. _vm._l(_vm.filteredData, function(item) {
  44358. return _c(
  44359. "el-checkbox",
  44360. {
  44361. key: item[_vm.keyProp],
  44362. staticClass: "el-transfer-panel__item",
  44363. attrs: {
  44364. label: item[_vm.keyProp],
  44365. disabled: item[_vm.disabledProp]
  44366. }
  44367. },
  44368. [_c("option-content", { attrs: { option: item } })],
  44369. 1
  44370. )
  44371. }),
  44372. 1
  44373. ),
  44374. _c(
  44375. "p",
  44376. {
  44377. directives: [
  44378. {
  44379. name: "show",
  44380. rawName: "v-show",
  44381. value: _vm.hasNoMatch,
  44382. expression: "hasNoMatch"
  44383. }
  44384. ],
  44385. staticClass: "el-transfer-panel__empty"
  44386. },
  44387. [_vm._v(_vm._s(_vm.t("el.transfer.noMatch")))]
  44388. ),
  44389. _c(
  44390. "p",
  44391. {
  44392. directives: [
  44393. {
  44394. name: "show",
  44395. rawName: "v-show",
  44396. value: _vm.data.length === 0 && !_vm.hasNoMatch,
  44397. expression: "data.length === 0 && !hasNoMatch"
  44398. }
  44399. ],
  44400. staticClass: "el-transfer-panel__empty"
  44401. },
  44402. [_vm._v(_vm._s(_vm.t("el.transfer.noData")))]
  44403. )
  44404. ],
  44405. 1
  44406. ),
  44407. _vm.hasFooter
  44408. ? _c(
  44409. "p",
  44410. { staticClass: "el-transfer-panel__footer" },
  44411. [_vm._t("default")],
  44412. 2
  44413. )
  44414. : _vm._e()
  44415. ])
  44416. }
  44417. var transfer_panelvue_type_template_id_2ddab8bd_staticRenderFns = []
  44418. transfer_panelvue_type_template_id_2ddab8bd_render._withStripped = true
  44419. // CONCATENATED MODULE: ./packages/transfer/src/transfer-panel.vue?vue&type=template&id=2ddab8bd&
  44420. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/transfer-panel.vue?vue&type=script&lang=js&
  44421. //
  44422. //
  44423. //
  44424. //
  44425. //
  44426. //
  44427. //
  44428. //
  44429. //
  44430. //
  44431. //
  44432. //
  44433. //
  44434. //
  44435. //
  44436. //
  44437. //
  44438. //
  44439. //
  44440. //
  44441. //
  44442. //
  44443. //
  44444. //
  44445. //
  44446. //
  44447. //
  44448. //
  44449. //
  44450. //
  44451. //
  44452. //
  44453. //
  44454. //
  44455. //
  44456. //
  44457. //
  44458. //
  44459. //
  44460. //
  44461. //
  44462. //
  44463. //
  44464. //
  44465. //
  44466. //
  44467. //
  44468. //
  44469. //
  44470. //
  44471. //
  44472. //
  44473. //
  44474. /* harmony default export */ var transfer_panelvue_type_script_lang_js_ = ({
  44475. mixins: [locale_default.a],
  44476. name: 'ElTransferPanel',
  44477. componentName: 'ElTransferPanel',
  44478. components: {
  44479. ElCheckboxGroup: checkbox_group_default.a,
  44480. ElCheckbox: checkbox_default.a,
  44481. ElInput: input_default.a,
  44482. OptionContent: {
  44483. props: {
  44484. option: Object
  44485. },
  44486. render: function render(h) {
  44487. var getParent = function getParent(vm) {
  44488. if (vm.$options.componentName === 'ElTransferPanel') {
  44489. return vm;
  44490. } else if (vm.$parent) {
  44491. return getParent(vm.$parent);
  44492. } else {
  44493. return vm;
  44494. }
  44495. };
  44496. var panel = getParent(this);
  44497. var transfer = panel.$parent || panel;
  44498. return panel.renderContent ? panel.renderContent(h, this.option) : transfer.$scopedSlots.default ? transfer.$scopedSlots.default({ option: this.option }) : h('span', [this.option[panel.labelProp] || this.option[panel.keyProp]]);
  44499. }
  44500. }
  44501. },
  44502. props: {
  44503. data: {
  44504. type: Array,
  44505. default: function _default() {
  44506. return [];
  44507. }
  44508. },
  44509. renderContent: Function,
  44510. placeholder: String,
  44511. title: String,
  44512. filterable: Boolean,
  44513. format: Object,
  44514. filterMethod: Function,
  44515. defaultChecked: Array,
  44516. props: Object
  44517. },
  44518. data: function data() {
  44519. return {
  44520. checked: [],
  44521. allChecked: false,
  44522. query: '',
  44523. inputHover: false,
  44524. checkChangeByUser: true
  44525. };
  44526. },
  44527. watch: {
  44528. checked: function checked(val, oldVal) {
  44529. this.updateAllChecked();
  44530. if (this.checkChangeByUser) {
  44531. var movedKeys = val.concat(oldVal).filter(function (v) {
  44532. return val.indexOf(v) === -1 || oldVal.indexOf(v) === -1;
  44533. });
  44534. this.$emit('checked-change', val, movedKeys);
  44535. } else {
  44536. this.$emit('checked-change', val);
  44537. this.checkChangeByUser = true;
  44538. }
  44539. },
  44540. data: function data() {
  44541. var _this = this;
  44542. var checked = [];
  44543. var filteredDataKeys = this.filteredData.map(function (item) {
  44544. return item[_this.keyProp];
  44545. });
  44546. this.checked.forEach(function (item) {
  44547. if (filteredDataKeys.indexOf(item) > -1) {
  44548. checked.push(item);
  44549. }
  44550. });
  44551. this.checkChangeByUser = false;
  44552. this.checked = checked;
  44553. },
  44554. checkableData: function checkableData() {
  44555. this.updateAllChecked();
  44556. },
  44557. defaultChecked: {
  44558. immediate: true,
  44559. handler: function handler(val, oldVal) {
  44560. var _this2 = this;
  44561. if (oldVal && val.length === oldVal.length && val.every(function (item) {
  44562. return oldVal.indexOf(item) > -1;
  44563. })) return;
  44564. var checked = [];
  44565. var checkableDataKeys = this.checkableData.map(function (item) {
  44566. return item[_this2.keyProp];
  44567. });
  44568. val.forEach(function (item) {
  44569. if (checkableDataKeys.indexOf(item) > -1) {
  44570. checked.push(item);
  44571. }
  44572. });
  44573. this.checkChangeByUser = false;
  44574. this.checked = checked;
  44575. }
  44576. }
  44577. },
  44578. computed: {
  44579. filteredData: function filteredData() {
  44580. var _this3 = this;
  44581. return this.data.filter(function (item) {
  44582. if (typeof _this3.filterMethod === 'function') {
  44583. return _this3.filterMethod(_this3.query, item);
  44584. } else {
  44585. var label = item[_this3.labelProp] || item[_this3.keyProp].toString();
  44586. return label.toLowerCase().indexOf(_this3.query.toLowerCase()) > -1;
  44587. }
  44588. });
  44589. },
  44590. checkableData: function checkableData() {
  44591. var _this4 = this;
  44592. return this.filteredData.filter(function (item) {
  44593. return !item[_this4.disabledProp];
  44594. });
  44595. },
  44596. checkedSummary: function checkedSummary() {
  44597. var checkedLength = this.checked.length;
  44598. var dataLength = this.data.length;
  44599. var _format = this.format,
  44600. noChecked = _format.noChecked,
  44601. hasChecked = _format.hasChecked;
  44602. if (noChecked && hasChecked) {
  44603. return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength).replace(/\${total}/g, dataLength) : noChecked.replace(/\${total}/g, dataLength);
  44604. } else {
  44605. return checkedLength + '/' + dataLength;
  44606. }
  44607. },
  44608. isIndeterminate: function isIndeterminate() {
  44609. var checkedLength = this.checked.length;
  44610. return checkedLength > 0 && checkedLength < this.checkableData.length;
  44611. },
  44612. hasNoMatch: function hasNoMatch() {
  44613. return this.query.length > 0 && this.filteredData.length === 0;
  44614. },
  44615. inputIcon: function inputIcon() {
  44616. return this.query.length > 0 && this.inputHover ? 'circle-close' : 'search';
  44617. },
  44618. labelProp: function labelProp() {
  44619. return this.props.label || 'label';
  44620. },
  44621. keyProp: function keyProp() {
  44622. return this.props.key || 'key';
  44623. },
  44624. disabledProp: function disabledProp() {
  44625. return this.props.disabled || 'disabled';
  44626. },
  44627. hasFooter: function hasFooter() {
  44628. return !!this.$slots.default;
  44629. }
  44630. },
  44631. methods: {
  44632. updateAllChecked: function updateAllChecked() {
  44633. var _this5 = this;
  44634. var checkableDataKeys = this.checkableData.map(function (item) {
  44635. return item[_this5.keyProp];
  44636. });
  44637. this.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every(function (item) {
  44638. return _this5.checked.indexOf(item) > -1;
  44639. });
  44640. },
  44641. handleAllCheckedChange: function handleAllCheckedChange(value) {
  44642. var _this6 = this;
  44643. this.checked = value ? this.checkableData.map(function (item) {
  44644. return item[_this6.keyProp];
  44645. }) : [];
  44646. },
  44647. clearQuery: function clearQuery() {
  44648. if (this.inputIcon === 'circle-close') {
  44649. this.query = '';
  44650. }
  44651. }
  44652. }
  44653. });
  44654. // CONCATENATED MODULE: ./packages/transfer/src/transfer-panel.vue?vue&type=script&lang=js&
  44655. /* harmony default export */ var src_transfer_panelvue_type_script_lang_js_ = (transfer_panelvue_type_script_lang_js_);
  44656. // CONCATENATED MODULE: ./packages/transfer/src/transfer-panel.vue
  44657. /* normalize component */
  44658. var transfer_panel_component = normalizeComponent(
  44659. src_transfer_panelvue_type_script_lang_js_,
  44660. transfer_panelvue_type_template_id_2ddab8bd_render,
  44661. transfer_panelvue_type_template_id_2ddab8bd_staticRenderFns,
  44662. false,
  44663. null,
  44664. null,
  44665. null
  44666. )
  44667. /* hot reload */
  44668. if (false) { var transfer_panel_api; }
  44669. transfer_panel_component.options.__file = "packages/transfer/src/transfer-panel.vue"
  44670. /* harmony default export */ var transfer_panel = (transfer_panel_component.exports);
  44671. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/main.vue?vue&type=script&lang=js&
  44672. //
  44673. //
  44674. //
  44675. //
  44676. //
  44677. //
  44678. //
  44679. //
  44680. //
  44681. //
  44682. //
  44683. //
  44684. //
  44685. //
  44686. //
  44687. //
  44688. //
  44689. //
  44690. //
  44691. //
  44692. //
  44693. //
  44694. //
  44695. //
  44696. //
  44697. //
  44698. //
  44699. //
  44700. //
  44701. //
  44702. //
  44703. //
  44704. //
  44705. //
  44706. //
  44707. //
  44708. //
  44709. //
  44710. //
  44711. //
  44712. //
  44713. //
  44714. //
  44715. /* harmony default export */ var transfer_src_mainvue_type_script_lang_js_ = ({
  44716. name: 'ElTransfer',
  44717. mixins: [emitter_default.a, locale_default.a, migrating_default.a],
  44718. components: {
  44719. TransferPanel: transfer_panel,
  44720. ElButton: button_default.a
  44721. },
  44722. props: {
  44723. data: {
  44724. type: Array,
  44725. default: function _default() {
  44726. return [];
  44727. }
  44728. },
  44729. titles: {
  44730. type: Array,
  44731. default: function _default() {
  44732. return [];
  44733. }
  44734. },
  44735. buttonTexts: {
  44736. type: Array,
  44737. default: function _default() {
  44738. return [];
  44739. }
  44740. },
  44741. filterPlaceholder: {
  44742. type: String,
  44743. default: ''
  44744. },
  44745. filterMethod: Function,
  44746. leftDefaultChecked: {
  44747. type: Array,
  44748. default: function _default() {
  44749. return [];
  44750. }
  44751. },
  44752. rightDefaultChecked: {
  44753. type: Array,
  44754. default: function _default() {
  44755. return [];
  44756. }
  44757. },
  44758. renderContent: Function,
  44759. value: {
  44760. type: Array,
  44761. default: function _default() {
  44762. return [];
  44763. }
  44764. },
  44765. format: {
  44766. type: Object,
  44767. default: function _default() {
  44768. return {};
  44769. }
  44770. },
  44771. filterable: Boolean,
  44772. props: {
  44773. type: Object,
  44774. default: function _default() {
  44775. return {
  44776. label: 'label',
  44777. key: 'key',
  44778. disabled: 'disabled'
  44779. };
  44780. }
  44781. },
  44782. targetOrder: {
  44783. type: String,
  44784. default: 'original'
  44785. }
  44786. },
  44787. data: function data() {
  44788. return {
  44789. leftChecked: [],
  44790. rightChecked: []
  44791. };
  44792. },
  44793. computed: {
  44794. dataObj: function dataObj() {
  44795. var key = this.props.key;
  44796. return this.data.reduce(function (o, cur) {
  44797. return (o[cur[key]] = cur) && o;
  44798. }, {});
  44799. },
  44800. sourceData: function sourceData() {
  44801. var _this = this;
  44802. return this.data.filter(function (item) {
  44803. return _this.value.indexOf(item[_this.props.key]) === -1;
  44804. });
  44805. },
  44806. targetData: function targetData() {
  44807. var _this2 = this;
  44808. if (this.targetOrder === 'original') {
  44809. return this.data.filter(function (item) {
  44810. return _this2.value.indexOf(item[_this2.props.key]) > -1;
  44811. });
  44812. } else {
  44813. return this.value.reduce(function (arr, cur) {
  44814. var val = _this2.dataObj[cur];
  44815. if (val) {
  44816. arr.push(val);
  44817. }
  44818. return arr;
  44819. }, []);
  44820. }
  44821. },
  44822. hasButtonTexts: function hasButtonTexts() {
  44823. return this.buttonTexts.length === 2;
  44824. }
  44825. },
  44826. watch: {
  44827. value: function value(val) {
  44828. this.dispatch('ElFormItem', 'el.form.change', val);
  44829. }
  44830. },
  44831. methods: {
  44832. getMigratingConfig: function getMigratingConfig() {
  44833. return {
  44834. props: {
  44835. 'footer-format': 'footer-format is renamed to format.'
  44836. }
  44837. };
  44838. },
  44839. onSourceCheckedChange: function onSourceCheckedChange(val, movedKeys) {
  44840. this.leftChecked = val;
  44841. if (movedKeys === undefined) return;
  44842. this.$emit('left-check-change', val, movedKeys);
  44843. },
  44844. onTargetCheckedChange: function onTargetCheckedChange(val, movedKeys) {
  44845. this.rightChecked = val;
  44846. if (movedKeys === undefined) return;
  44847. this.$emit('right-check-change', val, movedKeys);
  44848. },
  44849. addToLeft: function addToLeft() {
  44850. var currentValue = this.value.slice();
  44851. this.rightChecked.forEach(function (item) {
  44852. var index = currentValue.indexOf(item);
  44853. if (index > -1) {
  44854. currentValue.splice(index, 1);
  44855. }
  44856. });
  44857. this.$emit('input', currentValue);
  44858. this.$emit('change', currentValue, 'left', this.rightChecked);
  44859. },
  44860. addToRight: function addToRight() {
  44861. var _this3 = this;
  44862. var currentValue = this.value.slice();
  44863. var itemsToBeMoved = [];
  44864. var key = this.props.key;
  44865. this.data.forEach(function (item) {
  44866. var itemKey = item[key];
  44867. if (_this3.leftChecked.indexOf(itemKey) > -1 && _this3.value.indexOf(itemKey) === -1) {
  44868. itemsToBeMoved.push(itemKey);
  44869. }
  44870. });
  44871. currentValue = this.targetOrder === 'unshift' ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);
  44872. this.$emit('input', currentValue);
  44873. this.$emit('change', currentValue, 'right', this.leftChecked);
  44874. },
  44875. clearQuery: function clearQuery(which) {
  44876. if (which === 'left') {
  44877. this.$refs.leftPanel.query = '';
  44878. } else if (which === 'right') {
  44879. this.$refs.rightPanel.query = '';
  44880. }
  44881. }
  44882. }
  44883. });
  44884. // CONCATENATED MODULE: ./packages/transfer/src/main.vue?vue&type=script&lang=js&
  44885. /* harmony default export */ var packages_transfer_src_mainvue_type_script_lang_js_ = (transfer_src_mainvue_type_script_lang_js_);
  44886. // CONCATENATED MODULE: ./packages/transfer/src/main.vue
  44887. /* normalize component */
  44888. var transfer_src_main_component = normalizeComponent(
  44889. packages_transfer_src_mainvue_type_script_lang_js_,
  44890. mainvue_type_template_id_5c654dd8_render,
  44891. mainvue_type_template_id_5c654dd8_staticRenderFns,
  44892. false,
  44893. null,
  44894. null,
  44895. null
  44896. )
  44897. /* hot reload */
  44898. if (false) { var transfer_src_main_api; }
  44899. transfer_src_main_component.options.__file = "packages/transfer/src/main.vue"
  44900. /* harmony default export */ var transfer_src_main = (transfer_src_main_component.exports);
  44901. // CONCATENATED MODULE: ./packages/transfer/index.js
  44902. /* istanbul ignore next */
  44903. transfer_src_main.install = function (Vue) {
  44904. Vue.component(transfer_src_main.name, transfer_src_main);
  44905. };
  44906. /* harmony default export */ var transfer = (transfer_src_main);
  44907. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/container/src/main.vue?vue&type=template&id=5bf181d4&
  44908. var mainvue_type_template_id_5bf181d4_render = function() {
  44909. var _vm = this
  44910. var _h = _vm.$createElement
  44911. var _c = _vm._self._c || _h
  44912. return _c(
  44913. "section",
  44914. { staticClass: "el-container", class: { "is-vertical": _vm.isVertical } },
  44915. [_vm._t("default")],
  44916. 2
  44917. )
  44918. }
  44919. var mainvue_type_template_id_5bf181d4_staticRenderFns = []
  44920. mainvue_type_template_id_5bf181d4_render._withStripped = true
  44921. // CONCATENATED MODULE: ./packages/container/src/main.vue?vue&type=template&id=5bf181d4&
  44922. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/container/src/main.vue?vue&type=script&lang=js&
  44923. //
  44924. //
  44925. //
  44926. //
  44927. //
  44928. //
  44929. /* harmony default export */ var container_src_mainvue_type_script_lang_js_ = ({
  44930. name: 'ElContainer',
  44931. componentName: 'ElContainer',
  44932. props: {
  44933. direction: String
  44934. },
  44935. computed: {
  44936. isVertical: function isVertical() {
  44937. if (this.direction === 'vertical') {
  44938. return true;
  44939. } else if (this.direction === 'horizontal') {
  44940. return false;
  44941. }
  44942. return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) {
  44943. var tag = vnode.componentOptions && vnode.componentOptions.tag;
  44944. return tag === 'el-header' || tag === 'el-footer';
  44945. }) : false;
  44946. }
  44947. }
  44948. });
  44949. // CONCATENATED MODULE: ./packages/container/src/main.vue?vue&type=script&lang=js&
  44950. /* harmony default export */ var packages_container_src_mainvue_type_script_lang_js_ = (container_src_mainvue_type_script_lang_js_);
  44951. // CONCATENATED MODULE: ./packages/container/src/main.vue
  44952. /* normalize component */
  44953. var container_src_main_component = normalizeComponent(
  44954. packages_container_src_mainvue_type_script_lang_js_,
  44955. mainvue_type_template_id_5bf181d4_render,
  44956. mainvue_type_template_id_5bf181d4_staticRenderFns,
  44957. false,
  44958. null,
  44959. null,
  44960. null
  44961. )
  44962. /* hot reload */
  44963. if (false) { var container_src_main_api; }
  44964. container_src_main_component.options.__file = "packages/container/src/main.vue"
  44965. /* harmony default export */ var container_src_main = (container_src_main_component.exports);
  44966. // CONCATENATED MODULE: ./packages/container/index.js
  44967. /* istanbul ignore next */
  44968. container_src_main.install = function (Vue) {
  44969. Vue.component(container_src_main.name, container_src_main);
  44970. };
  44971. /* harmony default export */ var packages_container = (container_src_main);
  44972. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/header/src/main.vue?vue&type=template&id=2b296ab2&
  44973. var mainvue_type_template_id_2b296ab2_render = function() {
  44974. var _vm = this
  44975. var _h = _vm.$createElement
  44976. var _c = _vm._self._c || _h
  44977. return _c(
  44978. "header",
  44979. { staticClass: "el-header", style: { height: _vm.height } },
  44980. [_vm._t("default")],
  44981. 2
  44982. )
  44983. }
  44984. var mainvue_type_template_id_2b296ab2_staticRenderFns = []
  44985. mainvue_type_template_id_2b296ab2_render._withStripped = true
  44986. // CONCATENATED MODULE: ./packages/header/src/main.vue?vue&type=template&id=2b296ab2&
  44987. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/header/src/main.vue?vue&type=script&lang=js&
  44988. //
  44989. //
  44990. //
  44991. //
  44992. //
  44993. //
  44994. /* harmony default export */ var header_src_mainvue_type_script_lang_js_ = ({
  44995. name: 'ElHeader',
  44996. componentName: 'ElHeader',
  44997. props: {
  44998. height: {
  44999. type: String,
  45000. default: '60px'
  45001. }
  45002. }
  45003. });
  45004. // CONCATENATED MODULE: ./packages/header/src/main.vue?vue&type=script&lang=js&
  45005. /* harmony default export */ var packages_header_src_mainvue_type_script_lang_js_ = (header_src_mainvue_type_script_lang_js_);
  45006. // CONCATENATED MODULE: ./packages/header/src/main.vue
  45007. /* normalize component */
  45008. var header_src_main_component = normalizeComponent(
  45009. packages_header_src_mainvue_type_script_lang_js_,
  45010. mainvue_type_template_id_2b296ab2_render,
  45011. mainvue_type_template_id_2b296ab2_staticRenderFns,
  45012. false,
  45013. null,
  45014. null,
  45015. null
  45016. )
  45017. /* hot reload */
  45018. if (false) { var header_src_main_api; }
  45019. header_src_main_component.options.__file = "packages/header/src/main.vue"
  45020. /* harmony default export */ var header_src_main = (header_src_main_component.exports);
  45021. // CONCATENATED MODULE: ./packages/header/index.js
  45022. /* istanbul ignore next */
  45023. header_src_main.install = function (Vue) {
  45024. Vue.component(header_src_main.name, header_src_main);
  45025. };
  45026. /* harmony default export */ var header = (header_src_main);
  45027. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/aside/src/main.vue?vue&type=template&id=03411dbf&
  45028. var mainvue_type_template_id_03411dbf_render = function() {
  45029. var _vm = this
  45030. var _h = _vm.$createElement
  45031. var _c = _vm._self._c || _h
  45032. return _c(
  45033. "aside",
  45034. { staticClass: "el-aside", style: { width: _vm.width } },
  45035. [_vm._t("default")],
  45036. 2
  45037. )
  45038. }
  45039. var mainvue_type_template_id_03411dbf_staticRenderFns = []
  45040. mainvue_type_template_id_03411dbf_render._withStripped = true
  45041. // CONCATENATED MODULE: ./packages/aside/src/main.vue?vue&type=template&id=03411dbf&
  45042. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/aside/src/main.vue?vue&type=script&lang=js&
  45043. //
  45044. //
  45045. //
  45046. //
  45047. //
  45048. //
  45049. /* harmony default export */ var aside_src_mainvue_type_script_lang_js_ = ({
  45050. name: 'ElAside',
  45051. componentName: 'ElAside',
  45052. props: {
  45053. width: {
  45054. type: String,
  45055. default: '300px'
  45056. }
  45057. }
  45058. });
  45059. // CONCATENATED MODULE: ./packages/aside/src/main.vue?vue&type=script&lang=js&
  45060. /* harmony default export */ var packages_aside_src_mainvue_type_script_lang_js_ = (aside_src_mainvue_type_script_lang_js_);
  45061. // CONCATENATED MODULE: ./packages/aside/src/main.vue
  45062. /* normalize component */
  45063. var aside_src_main_component = normalizeComponent(
  45064. packages_aside_src_mainvue_type_script_lang_js_,
  45065. mainvue_type_template_id_03411dbf_render,
  45066. mainvue_type_template_id_03411dbf_staticRenderFns,
  45067. false,
  45068. null,
  45069. null,
  45070. null
  45071. )
  45072. /* hot reload */
  45073. if (false) { var aside_src_main_api; }
  45074. aside_src_main_component.options.__file = "packages/aside/src/main.vue"
  45075. /* harmony default export */ var aside_src_main = (aside_src_main_component.exports);
  45076. // CONCATENATED MODULE: ./packages/aside/index.js
  45077. /* istanbul ignore next */
  45078. aside_src_main.install = function (Vue) {
  45079. Vue.component(aside_src_main.name, aside_src_main);
  45080. };
  45081. /* harmony default export */ var aside = (aside_src_main);
  45082. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=2a3a7406&
  45083. var mainvue_type_template_id_2a3a7406_render = function() {
  45084. var _vm = this
  45085. var _h = _vm.$createElement
  45086. var _c = _vm._self._c || _h
  45087. return _c("main", { staticClass: "el-main" }, [_vm._t("default")], 2)
  45088. }
  45089. var mainvue_type_template_id_2a3a7406_staticRenderFns = []
  45090. mainvue_type_template_id_2a3a7406_render._withStripped = true
  45091. // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=2a3a7406&
  45092. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=script&lang=js&
  45093. //
  45094. //
  45095. //
  45096. //
  45097. //
  45098. //
  45099. /* harmony default export */ var main_src_mainvue_type_script_lang_js_ = ({
  45100. name: 'ElMain',
  45101. componentName: 'ElMain'
  45102. });
  45103. // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=script&lang=js&
  45104. /* harmony default export */ var packages_main_src_mainvue_type_script_lang_js_ = (main_src_mainvue_type_script_lang_js_);
  45105. // CONCATENATED MODULE: ./packages/main/src/main.vue
  45106. /* normalize component */
  45107. var main_src_main_component = normalizeComponent(
  45108. packages_main_src_mainvue_type_script_lang_js_,
  45109. mainvue_type_template_id_2a3a7406_render,
  45110. mainvue_type_template_id_2a3a7406_staticRenderFns,
  45111. false,
  45112. null,
  45113. null,
  45114. null
  45115. )
  45116. /* hot reload */
  45117. if (false) { var main_src_main_api; }
  45118. main_src_main_component.options.__file = "packages/main/src/main.vue"
  45119. /* harmony default export */ var main_src_main = (main_src_main_component.exports);
  45120. // CONCATENATED MODULE: ./packages/main/index.js
  45121. /* istanbul ignore next */
  45122. main_src_main.install = function (Vue) {
  45123. Vue.component(main_src_main.name, main_src_main);
  45124. };
  45125. /* harmony default export */ var packages_main = (main_src_main);
  45126. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/footer/src/main.vue?vue&type=template&id=80210338&
  45127. var mainvue_type_template_id_80210338_render = function() {
  45128. var _vm = this
  45129. var _h = _vm.$createElement
  45130. var _c = _vm._self._c || _h
  45131. return _c(
  45132. "footer",
  45133. { staticClass: "el-footer", style: { height: _vm.height } },
  45134. [_vm._t("default")],
  45135. 2
  45136. )
  45137. }
  45138. var mainvue_type_template_id_80210338_staticRenderFns = []
  45139. mainvue_type_template_id_80210338_render._withStripped = true
  45140. // CONCATENATED MODULE: ./packages/footer/src/main.vue?vue&type=template&id=80210338&
  45141. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/footer/src/main.vue?vue&type=script&lang=js&
  45142. //
  45143. //
  45144. //
  45145. //
  45146. //
  45147. //
  45148. /* harmony default export */ var footer_src_mainvue_type_script_lang_js_ = ({
  45149. name: 'ElFooter',
  45150. componentName: 'ElFooter',
  45151. props: {
  45152. height: {
  45153. type: String,
  45154. default: '60px'
  45155. }
  45156. }
  45157. });
  45158. // CONCATENATED MODULE: ./packages/footer/src/main.vue?vue&type=script&lang=js&
  45159. /* harmony default export */ var packages_footer_src_mainvue_type_script_lang_js_ = (footer_src_mainvue_type_script_lang_js_);
  45160. // CONCATENATED MODULE: ./packages/footer/src/main.vue
  45161. /* normalize component */
  45162. var footer_src_main_component = normalizeComponent(
  45163. packages_footer_src_mainvue_type_script_lang_js_,
  45164. mainvue_type_template_id_80210338_render,
  45165. mainvue_type_template_id_80210338_staticRenderFns,
  45166. false,
  45167. null,
  45168. null,
  45169. null
  45170. )
  45171. /* hot reload */
  45172. if (false) { var footer_src_main_api; }
  45173. footer_src_main_component.options.__file = "packages/footer/src/main.vue"
  45174. /* harmony default export */ var footer_src_main = (footer_src_main_component.exports);
  45175. // CONCATENATED MODULE: ./packages/footer/index.js
  45176. /* istanbul ignore next */
  45177. footer_src_main.install = function (Vue) {
  45178. Vue.component(footer_src_main.name, footer_src_main);
  45179. };
  45180. /* harmony default export */ var footer = (footer_src_main);
  45181. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/timeline/src/main.vue?vue&type=script&lang=js&
  45182. /* harmony default export */ var timeline_src_mainvue_type_script_lang_js_ = ({
  45183. name: 'ElTimeline',
  45184. props: {
  45185. reverse: {
  45186. type: Boolean,
  45187. default: false
  45188. }
  45189. },
  45190. provide: function provide() {
  45191. return {
  45192. timeline: this
  45193. };
  45194. },
  45195. render: function render() {
  45196. var h = arguments[0];
  45197. var reverse = this.reverse;
  45198. var classes = {
  45199. 'el-timeline': true,
  45200. 'is-reverse': reverse
  45201. };
  45202. var slots = this.$slots.default || [];
  45203. if (reverse) {
  45204. slots = slots.reverse();
  45205. }
  45206. return h(
  45207. 'ul',
  45208. { 'class': classes },
  45209. [slots]
  45210. );
  45211. }
  45212. });
  45213. // CONCATENATED MODULE: ./packages/timeline/src/main.vue?vue&type=script&lang=js&
  45214. /* harmony default export */ var packages_timeline_src_mainvue_type_script_lang_js_ = (timeline_src_mainvue_type_script_lang_js_);
  45215. // CONCATENATED MODULE: ./packages/timeline/src/main.vue
  45216. var main_render, main_staticRenderFns
  45217. /* normalize component */
  45218. var timeline_src_main_component = normalizeComponent(
  45219. packages_timeline_src_mainvue_type_script_lang_js_,
  45220. main_render,
  45221. main_staticRenderFns,
  45222. false,
  45223. null,
  45224. null,
  45225. null
  45226. )
  45227. /* hot reload */
  45228. if (false) { var timeline_src_main_api; }
  45229. timeline_src_main_component.options.__file = "packages/timeline/src/main.vue"
  45230. /* harmony default export */ var timeline_src_main = (timeline_src_main_component.exports);
  45231. // CONCATENATED MODULE: ./packages/timeline/index.js
  45232. /* istanbul ignore next */
  45233. timeline_src_main.install = function (Vue) {
  45234. Vue.component(timeline_src_main.name, timeline_src_main);
  45235. };
  45236. /* harmony default export */ var timeline = (timeline_src_main);
  45237. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/timeline/src/item.vue?vue&type=template&id=61a69e50&
  45238. var itemvue_type_template_id_61a69e50_render = function() {
  45239. var _vm = this
  45240. var _h = _vm.$createElement
  45241. var _c = _vm._self._c || _h
  45242. return _c("li", { staticClass: "el-timeline-item" }, [
  45243. _c("div", { staticClass: "el-timeline-item__tail" }),
  45244. !_vm.$slots.dot
  45245. ? _c(
  45246. "div",
  45247. {
  45248. staticClass: "el-timeline-item__node",
  45249. class: [
  45250. "el-timeline-item__node--" + (_vm.size || ""),
  45251. "el-timeline-item__node--" + (_vm.type || "")
  45252. ],
  45253. style: {
  45254. backgroundColor: _vm.color
  45255. }
  45256. },
  45257. [
  45258. _vm.icon
  45259. ? _c("i", {
  45260. staticClass: "el-timeline-item__icon",
  45261. class: _vm.icon
  45262. })
  45263. : _vm._e()
  45264. ]
  45265. )
  45266. : _vm._e(),
  45267. _vm.$slots.dot
  45268. ? _c("div", { staticClass: "el-timeline-item__dot" }, [_vm._t("dot")], 2)
  45269. : _vm._e(),
  45270. _c("div", { staticClass: "el-timeline-item__wrapper" }, [
  45271. !_vm.hideTimestamp && _vm.placement === "top"
  45272. ? _c("div", { staticClass: "el-timeline-item__timestamp is-top" }, [
  45273. _vm._v("\n " + _vm._s(_vm.timestamp) + "\n ")
  45274. ])
  45275. : _vm._e(),
  45276. _c(
  45277. "div",
  45278. { staticClass: "el-timeline-item__content" },
  45279. [_vm._t("default")],
  45280. 2
  45281. ),
  45282. !_vm.hideTimestamp && _vm.placement === "bottom"
  45283. ? _c("div", { staticClass: "el-timeline-item__timestamp is-bottom" }, [
  45284. _vm._v("\n " + _vm._s(_vm.timestamp) + "\n ")
  45285. ])
  45286. : _vm._e()
  45287. ])
  45288. ])
  45289. }
  45290. var itemvue_type_template_id_61a69e50_staticRenderFns = []
  45291. itemvue_type_template_id_61a69e50_render._withStripped = true
  45292. // CONCATENATED MODULE: ./packages/timeline/src/item.vue?vue&type=template&id=61a69e50&
  45293. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/timeline/src/item.vue?vue&type=script&lang=js&
  45294. //
  45295. //
  45296. //
  45297. //
  45298. //
  45299. //
  45300. //
  45301. //
  45302. //
  45303. //
  45304. //
  45305. //
  45306. //
  45307. //
  45308. //
  45309. //
  45310. //
  45311. //
  45312. //
  45313. //
  45314. //
  45315. //
  45316. //
  45317. //
  45318. //
  45319. //
  45320. //
  45321. //
  45322. //
  45323. //
  45324. //
  45325. //
  45326. //
  45327. //
  45328. //
  45329. //
  45330. //
  45331. //
  45332. //
  45333. //
  45334. //
  45335. /* harmony default export */ var timeline_src_itemvue_type_script_lang_js_ = ({
  45336. name: 'ElTimelineItem',
  45337. inject: ['timeline'],
  45338. props: {
  45339. timestamp: String,
  45340. hideTimestamp: {
  45341. type: Boolean,
  45342. default: false
  45343. },
  45344. placement: {
  45345. type: String,
  45346. default: 'bottom'
  45347. },
  45348. type: String,
  45349. color: String,
  45350. size: {
  45351. type: String,
  45352. default: 'normal'
  45353. },
  45354. icon: String
  45355. }
  45356. });
  45357. // CONCATENATED MODULE: ./packages/timeline/src/item.vue?vue&type=script&lang=js&
  45358. /* harmony default export */ var packages_timeline_src_itemvue_type_script_lang_js_ = (timeline_src_itemvue_type_script_lang_js_);
  45359. // CONCATENATED MODULE: ./packages/timeline/src/item.vue
  45360. /* normalize component */
  45361. var src_item_component = normalizeComponent(
  45362. packages_timeline_src_itemvue_type_script_lang_js_,
  45363. itemvue_type_template_id_61a69e50_render,
  45364. itemvue_type_template_id_61a69e50_staticRenderFns,
  45365. false,
  45366. null,
  45367. null,
  45368. null
  45369. )
  45370. /* hot reload */
  45371. if (false) { var src_item_api; }
  45372. src_item_component.options.__file = "packages/timeline/src/item.vue"
  45373. /* harmony default export */ var timeline_src_item = (src_item_component.exports);
  45374. // CONCATENATED MODULE: ./packages/timeline-item/index.js
  45375. /* istanbul ignore next */
  45376. timeline_src_item.install = function (Vue) {
  45377. Vue.component(timeline_src_item.name, timeline_src_item);
  45378. };
  45379. /* harmony default export */ var timeline_item = (timeline_src_item);
  45380. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/link/src/main.vue?vue&type=template&id=01cf3b65&
  45381. var mainvue_type_template_id_01cf3b65_render = function() {
  45382. var _vm = this
  45383. var _h = _vm.$createElement
  45384. var _c = _vm._self._c || _h
  45385. return _c(
  45386. "a",
  45387. _vm._b(
  45388. {
  45389. class: [
  45390. "el-link",
  45391. _vm.type ? "el-link--" + _vm.type : "",
  45392. _vm.disabled && "is-disabled",
  45393. _vm.underline && !_vm.disabled && "is-underline"
  45394. ],
  45395. attrs: { href: _vm.disabled ? null : _vm.href },
  45396. on: { click: _vm.handleClick }
  45397. },
  45398. "a",
  45399. _vm.$attrs,
  45400. false
  45401. ),
  45402. [
  45403. _vm.icon ? _c("i", { class: _vm.icon }) : _vm._e(),
  45404. _vm.$slots.default
  45405. ? _c("span", { staticClass: "el-link--inner" }, [_vm._t("default")], 2)
  45406. : _vm._e(),
  45407. _vm.$slots.icon ? [_vm.$slots.icon ? _vm._t("icon") : _vm._e()] : _vm._e()
  45408. ],
  45409. 2
  45410. )
  45411. }
  45412. var mainvue_type_template_id_01cf3b65_staticRenderFns = []
  45413. mainvue_type_template_id_01cf3b65_render._withStripped = true
  45414. // CONCATENATED MODULE: ./packages/link/src/main.vue?vue&type=template&id=01cf3b65&
  45415. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/link/src/main.vue?vue&type=script&lang=js&
  45416. //
  45417. //
  45418. //
  45419. //
  45420. //
  45421. //
  45422. //
  45423. //
  45424. //
  45425. //
  45426. //
  45427. //
  45428. //
  45429. //
  45430. //
  45431. //
  45432. //
  45433. //
  45434. //
  45435. //
  45436. //
  45437. //
  45438. //
  45439. /* harmony default export */ var link_src_mainvue_type_script_lang_js_ = ({
  45440. name: 'ElLink',
  45441. props: {
  45442. type: {
  45443. type: String,
  45444. default: 'default'
  45445. },
  45446. underline: {
  45447. type: Boolean,
  45448. default: true
  45449. },
  45450. disabled: Boolean,
  45451. href: String,
  45452. icon: String
  45453. },
  45454. methods: {
  45455. handleClick: function handleClick(event) {
  45456. if (!this.disabled) {
  45457. if (!this.href) {
  45458. this.$emit('click', event);
  45459. }
  45460. }
  45461. }
  45462. }
  45463. });
  45464. // CONCATENATED MODULE: ./packages/link/src/main.vue?vue&type=script&lang=js&
  45465. /* harmony default export */ var packages_link_src_mainvue_type_script_lang_js_ = (link_src_mainvue_type_script_lang_js_);
  45466. // CONCATENATED MODULE: ./packages/link/src/main.vue
  45467. /* normalize component */
  45468. var link_src_main_component = normalizeComponent(
  45469. packages_link_src_mainvue_type_script_lang_js_,
  45470. mainvue_type_template_id_01cf3b65_render,
  45471. mainvue_type_template_id_01cf3b65_staticRenderFns,
  45472. false,
  45473. null,
  45474. null,
  45475. null
  45476. )
  45477. /* hot reload */
  45478. if (false) { var link_src_main_api; }
  45479. link_src_main_component.options.__file = "packages/link/src/main.vue"
  45480. /* harmony default export */ var link_src_main = (link_src_main_component.exports);
  45481. // CONCATENATED MODULE: ./packages/link/index.js
  45482. /* istanbul ignore next */
  45483. link_src_main.install = function (Vue) {
  45484. Vue.component(link_src_main.name, link_src_main);
  45485. };
  45486. /* harmony default export */ var packages_link = (link_src_main);
  45487. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/divider/src/main.vue?vue&type=template&id=7fa02a7e&functional=true&
  45488. var mainvue_type_template_id_7fa02a7e_functional_true_render = function(_h, _vm) {
  45489. var _c = _vm._c
  45490. return _c(
  45491. "div",
  45492. _vm._g(
  45493. _vm._b(
  45494. {
  45495. class: [
  45496. _vm.data.staticClass,
  45497. "el-divider",
  45498. "el-divider--" + _vm.props.direction
  45499. ]
  45500. },
  45501. "div",
  45502. _vm.data.attrs,
  45503. false
  45504. ),
  45505. _vm.listeners
  45506. ),
  45507. [
  45508. _vm.slots().default && _vm.props.direction !== "vertical"
  45509. ? _c(
  45510. "div",
  45511. { class: ["el-divider__text", "is-" + _vm.props.contentPosition] },
  45512. [_vm._t("default")],
  45513. 2
  45514. )
  45515. : _vm._e()
  45516. ]
  45517. )
  45518. }
  45519. var mainvue_type_template_id_7fa02a7e_functional_true_staticRenderFns = []
  45520. mainvue_type_template_id_7fa02a7e_functional_true_render._withStripped = true
  45521. // CONCATENATED MODULE: ./packages/divider/src/main.vue?vue&type=template&id=7fa02a7e&functional=true&
  45522. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/divider/src/main.vue?vue&type=script&lang=js&
  45523. //
  45524. //
  45525. //
  45526. //
  45527. //
  45528. //
  45529. //
  45530. //
  45531. //
  45532. //
  45533. //
  45534. //
  45535. //
  45536. //
  45537. //
  45538. /* harmony default export */ var divider_src_mainvue_type_script_lang_js_ = ({
  45539. name: 'ElDivider',
  45540. props: {
  45541. direction: {
  45542. type: String,
  45543. default: 'horizontal',
  45544. validator: function validator(val) {
  45545. return ['horizontal', 'vertical'].indexOf(val) !== -1;
  45546. }
  45547. },
  45548. contentPosition: {
  45549. type: String,
  45550. default: 'center',
  45551. validator: function validator(val) {
  45552. return ['left', 'center', 'right'].indexOf(val) !== -1;
  45553. }
  45554. }
  45555. }
  45556. });
  45557. // CONCATENATED MODULE: ./packages/divider/src/main.vue?vue&type=script&lang=js&
  45558. /* harmony default export */ var packages_divider_src_mainvue_type_script_lang_js_ = (divider_src_mainvue_type_script_lang_js_);
  45559. // CONCATENATED MODULE: ./packages/divider/src/main.vue
  45560. /* normalize component */
  45561. var divider_src_main_component = normalizeComponent(
  45562. packages_divider_src_mainvue_type_script_lang_js_,
  45563. mainvue_type_template_id_7fa02a7e_functional_true_render,
  45564. mainvue_type_template_id_7fa02a7e_functional_true_staticRenderFns,
  45565. true,
  45566. null,
  45567. null,
  45568. null
  45569. )
  45570. /* hot reload */
  45571. if (false) { var divider_src_main_api; }
  45572. divider_src_main_component.options.__file = "packages/divider/src/main.vue"
  45573. /* harmony default export */ var divider_src_main = (divider_src_main_component.exports);
  45574. // CONCATENATED MODULE: ./packages/divider/index.js
  45575. /* istanbul ignore next */
  45576. divider_src_main.install = function (Vue) {
  45577. Vue.component(divider_src_main.name, divider_src_main);
  45578. };
  45579. /* harmony default export */ var divider = (divider_src_main);
  45580. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/main.vue?vue&type=template&id=44d84a7c&
  45581. var mainvue_type_template_id_44d84a7c_render = function() {
  45582. var _vm = this
  45583. var _h = _vm.$createElement
  45584. var _c = _vm._self._c || _h
  45585. return _c(
  45586. "div",
  45587. { staticClass: "el-image" },
  45588. [
  45589. _vm.loading
  45590. ? _vm._t("placeholder", [
  45591. _c("div", { staticClass: "el-image__placeholder" })
  45592. ])
  45593. : _vm.error
  45594. ? _vm._t("error", [
  45595. _c("div", { staticClass: "el-image__error" }, [
  45596. _vm._v(_vm._s(_vm.t("el.image.error")))
  45597. ])
  45598. ])
  45599. : _c(
  45600. "img",
  45601. _vm._g(
  45602. _vm._b(
  45603. {
  45604. staticClass: "el-image__inner",
  45605. class: {
  45606. "el-image__inner--center": _vm.alignCenter,
  45607. "el-image__preview": _vm.preview
  45608. },
  45609. style: _vm.imageStyle,
  45610. attrs: { src: _vm.src },
  45611. on: { click: _vm.clickHandler }
  45612. },
  45613. "img",
  45614. _vm.$attrs,
  45615. false
  45616. ),
  45617. _vm.$listeners
  45618. )
  45619. ),
  45620. _vm.preview
  45621. ? [
  45622. _vm.showViewer
  45623. ? _c("image-viewer", {
  45624. attrs: {
  45625. "z-index": _vm.zIndex,
  45626. "initial-index": _vm.imageIndex,
  45627. "on-close": _vm.closeViewer,
  45628. "url-list": _vm.previewSrcList
  45629. }
  45630. })
  45631. : _vm._e()
  45632. ]
  45633. : _vm._e()
  45634. ],
  45635. 2
  45636. )
  45637. }
  45638. var mainvue_type_template_id_44d84a7c_staticRenderFns = []
  45639. mainvue_type_template_id_44d84a7c_render._withStripped = true
  45640. // CONCATENATED MODULE: ./packages/image/src/main.vue?vue&type=template&id=44d84a7c&
  45641. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/image-viewer.vue?vue&type=template&id=5e73b307&
  45642. var image_viewervue_type_template_id_5e73b307_render = function() {
  45643. var _vm = this
  45644. var _h = _vm.$createElement
  45645. var _c = _vm._self._c || _h
  45646. return _c("transition", { attrs: { name: "viewer-fade" } }, [
  45647. _c(
  45648. "div",
  45649. {
  45650. ref: "el-image-viewer__wrapper",
  45651. staticClass: "el-image-viewer__wrapper",
  45652. style: { "z-index": _vm.viewerZIndex },
  45653. attrs: { tabindex: "-1" }
  45654. },
  45655. [
  45656. _c("div", {
  45657. staticClass: "el-image-viewer__mask",
  45658. on: {
  45659. click: function($event) {
  45660. if ($event.target !== $event.currentTarget) {
  45661. return null
  45662. }
  45663. return _vm.handleMaskClick($event)
  45664. }
  45665. }
  45666. }),
  45667. _c(
  45668. "span",
  45669. {
  45670. staticClass: "el-image-viewer__btn el-image-viewer__close",
  45671. on: { click: _vm.hide }
  45672. },
  45673. [_c("i", { staticClass: "el-icon-close" })]
  45674. ),
  45675. !_vm.isSingle
  45676. ? [
  45677. _c(
  45678. "span",
  45679. {
  45680. staticClass: "el-image-viewer__btn el-image-viewer__prev",
  45681. class: { "is-disabled": !_vm.infinite && _vm.isFirst },
  45682. on: { click: _vm.prev }
  45683. },
  45684. [_c("i", { staticClass: "el-icon-arrow-left" })]
  45685. ),
  45686. _c(
  45687. "span",
  45688. {
  45689. staticClass: "el-image-viewer__btn el-image-viewer__next",
  45690. class: { "is-disabled": !_vm.infinite && _vm.isLast },
  45691. on: { click: _vm.next }
  45692. },
  45693. [_c("i", { staticClass: "el-icon-arrow-right" })]
  45694. )
  45695. ]
  45696. : _vm._e(),
  45697. _c(
  45698. "div",
  45699. { staticClass: "el-image-viewer__btn el-image-viewer__actions" },
  45700. [
  45701. _c("div", { staticClass: "el-image-viewer__actions__inner" }, [
  45702. _c("i", {
  45703. staticClass: "el-icon-zoom-out",
  45704. on: {
  45705. click: function($event) {
  45706. _vm.handleActions("zoomOut")
  45707. }
  45708. }
  45709. }),
  45710. _c("i", {
  45711. staticClass: "el-icon-zoom-in",
  45712. on: {
  45713. click: function($event) {
  45714. _vm.handleActions("zoomIn")
  45715. }
  45716. }
  45717. }),
  45718. _c("i", { staticClass: "el-image-viewer__actions__divider" }),
  45719. _c("i", { class: _vm.mode.icon, on: { click: _vm.toggleMode } }),
  45720. _c("i", { staticClass: "el-image-viewer__actions__divider" }),
  45721. _c("i", {
  45722. staticClass: "el-icon-refresh-left",
  45723. on: {
  45724. click: function($event) {
  45725. _vm.handleActions("anticlocelise")
  45726. }
  45727. }
  45728. }),
  45729. _c("i", {
  45730. staticClass: "el-icon-refresh-right",
  45731. on: {
  45732. click: function($event) {
  45733. _vm.handleActions("clocelise")
  45734. }
  45735. }
  45736. })
  45737. ])
  45738. ]
  45739. ),
  45740. _c(
  45741. "div",
  45742. { staticClass: "el-image-viewer__canvas" },
  45743. _vm._l(_vm.urlList, function(url, i) {
  45744. return i === _vm.index
  45745. ? _c("img", {
  45746. key: url,
  45747. ref: "img",
  45748. refInFor: true,
  45749. staticClass: "el-image-viewer__img",
  45750. style: _vm.imgStyle,
  45751. attrs: { src: _vm.currentImg },
  45752. on: {
  45753. load: _vm.handleImgLoad,
  45754. error: _vm.handleImgError,
  45755. mousedown: _vm.handleMouseDown
  45756. }
  45757. })
  45758. : _vm._e()
  45759. }),
  45760. 0
  45761. )
  45762. ],
  45763. 2
  45764. )
  45765. ])
  45766. }
  45767. var image_viewervue_type_template_id_5e73b307_staticRenderFns = []
  45768. image_viewervue_type_template_id_5e73b307_render._withStripped = true
  45769. // CONCATENATED MODULE: ./packages/image/src/image-viewer.vue?vue&type=template&id=5e73b307&
  45770. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/image-viewer.vue?vue&type=script&lang=js&
  45771. var image_viewervue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  45772. //
  45773. //
  45774. //
  45775. //
  45776. //
  45777. //
  45778. //
  45779. //
  45780. //
  45781. //
  45782. //
  45783. //
  45784. //
  45785. //
  45786. //
  45787. //
  45788. //
  45789. //
  45790. //
  45791. //
  45792. //
  45793. //
  45794. //
  45795. //
  45796. //
  45797. //
  45798. //
  45799. //
  45800. //
  45801. //
  45802. //
  45803. //
  45804. //
  45805. //
  45806. //
  45807. //
  45808. //
  45809. //
  45810. //
  45811. //
  45812. //
  45813. //
  45814. //
  45815. //
  45816. //
  45817. //
  45818. //
  45819. //
  45820. //
  45821. //
  45822. //
  45823. //
  45824. //
  45825. var Mode = {
  45826. CONTAIN: {
  45827. name: 'contain',
  45828. icon: 'el-icon-full-screen'
  45829. },
  45830. ORIGINAL: {
  45831. name: 'original',
  45832. icon: 'el-icon-c-scale-to-original'
  45833. }
  45834. };
  45835. var mousewheelEventName = Object(util_["isFirefox"])() ? 'DOMMouseScroll' : 'mousewheel';
  45836. /* harmony default export */ var image_viewervue_type_script_lang_js_ = ({
  45837. name: 'elImageViewer',
  45838. props: {
  45839. urlList: {
  45840. type: Array,
  45841. default: function _default() {
  45842. return [];
  45843. }
  45844. },
  45845. zIndex: {
  45846. type: Number,
  45847. default: 2000
  45848. },
  45849. onSwitch: {
  45850. type: Function,
  45851. default: function _default() {}
  45852. },
  45853. onClose: {
  45854. type: Function,
  45855. default: function _default() {}
  45856. },
  45857. initialIndex: {
  45858. type: Number,
  45859. default: 0
  45860. },
  45861. appendToBody: {
  45862. type: Boolean,
  45863. default: true
  45864. },
  45865. maskClosable: {
  45866. type: Boolean,
  45867. default: true
  45868. }
  45869. },
  45870. data: function data() {
  45871. return {
  45872. index: this.initialIndex,
  45873. isShow: false,
  45874. infinite: true,
  45875. loading: false,
  45876. mode: Mode.CONTAIN,
  45877. transform: {
  45878. scale: 1,
  45879. deg: 0,
  45880. offsetX: 0,
  45881. offsetY: 0,
  45882. enableTransition: false
  45883. }
  45884. };
  45885. },
  45886. computed: {
  45887. isSingle: function isSingle() {
  45888. return this.urlList.length <= 1;
  45889. },
  45890. isFirst: function isFirst() {
  45891. return this.index === 0;
  45892. },
  45893. isLast: function isLast() {
  45894. return this.index === this.urlList.length - 1;
  45895. },
  45896. currentImg: function currentImg() {
  45897. return this.urlList[this.index];
  45898. },
  45899. imgStyle: function imgStyle() {
  45900. var _transform = this.transform,
  45901. scale = _transform.scale,
  45902. deg = _transform.deg,
  45903. offsetX = _transform.offsetX,
  45904. offsetY = _transform.offsetY,
  45905. enableTransition = _transform.enableTransition;
  45906. var style = {
  45907. transform: 'scale(' + scale + ') rotate(' + deg + 'deg)',
  45908. transition: enableTransition ? 'transform .3s' : '',
  45909. 'margin-left': offsetX + 'px',
  45910. 'margin-top': offsetY + 'px'
  45911. };
  45912. if (this.mode === Mode.CONTAIN) {
  45913. style.maxWidth = style.maxHeight = '100%';
  45914. }
  45915. return style;
  45916. },
  45917. viewerZIndex: function viewerZIndex() {
  45918. var nextZIndex = popup_["PopupManager"].nextZIndex();
  45919. return this.zIndex > nextZIndex ? this.zIndex : nextZIndex;
  45920. }
  45921. },
  45922. watch: {
  45923. index: {
  45924. handler: function handler(val) {
  45925. this.reset();
  45926. this.onSwitch(val);
  45927. }
  45928. },
  45929. currentImg: function currentImg(val) {
  45930. var _this = this;
  45931. this.$nextTick(function (_) {
  45932. var $img = _this.$refs.img[0];
  45933. if (!$img.complete) {
  45934. _this.loading = true;
  45935. }
  45936. });
  45937. }
  45938. },
  45939. methods: {
  45940. hide: function hide() {
  45941. this.deviceSupportUninstall();
  45942. this.onClose();
  45943. },
  45944. deviceSupportInstall: function deviceSupportInstall() {
  45945. var _this2 = this;
  45946. this._keyDownHandler = function (e) {
  45947. e.stopPropagation();
  45948. var keyCode = e.keyCode;
  45949. switch (keyCode) {
  45950. // ESC
  45951. case 27:
  45952. _this2.hide();
  45953. break;
  45954. // SPACE
  45955. case 32:
  45956. _this2.toggleMode();
  45957. break;
  45958. // LEFT_ARROW
  45959. case 37:
  45960. _this2.prev();
  45961. break;
  45962. // UP_ARROW
  45963. case 38:
  45964. _this2.handleActions('zoomIn');
  45965. break;
  45966. // RIGHT_ARROW
  45967. case 39:
  45968. _this2.next();
  45969. break;
  45970. // DOWN_ARROW
  45971. case 40:
  45972. _this2.handleActions('zoomOut');
  45973. break;
  45974. }
  45975. };
  45976. this._mouseWheelHandler = Object(util_["rafThrottle"])(function (e) {
  45977. var delta = e.wheelDelta ? e.wheelDelta : -e.detail;
  45978. if (delta > 0) {
  45979. _this2.handleActions('zoomIn', {
  45980. zoomRate: 0.015,
  45981. enableTransition: false
  45982. });
  45983. } else {
  45984. _this2.handleActions('zoomOut', {
  45985. zoomRate: 0.015,
  45986. enableTransition: false
  45987. });
  45988. }
  45989. });
  45990. Object(dom_["on"])(document, 'keydown', this._keyDownHandler);
  45991. Object(dom_["on"])(document, mousewheelEventName, this._mouseWheelHandler);
  45992. },
  45993. deviceSupportUninstall: function deviceSupportUninstall() {
  45994. Object(dom_["off"])(document, 'keydown', this._keyDownHandler);
  45995. Object(dom_["off"])(document, mousewheelEventName, this._mouseWheelHandler);
  45996. this._keyDownHandler = null;
  45997. this._mouseWheelHandler = null;
  45998. },
  45999. handleImgLoad: function handleImgLoad(e) {
  46000. this.loading = false;
  46001. },
  46002. handleImgError: function handleImgError(e) {
  46003. this.loading = false;
  46004. e.target.alt = '加载失败';
  46005. },
  46006. handleMouseDown: function handleMouseDown(e) {
  46007. var _this3 = this;
  46008. if (this.loading || e.button !== 0) return;
  46009. var _transform2 = this.transform,
  46010. offsetX = _transform2.offsetX,
  46011. offsetY = _transform2.offsetY;
  46012. var startX = e.pageX;
  46013. var startY = e.pageY;
  46014. this._dragHandler = Object(util_["rafThrottle"])(function (ev) {
  46015. _this3.transform.offsetX = offsetX + ev.pageX - startX;
  46016. _this3.transform.offsetY = offsetY + ev.pageY - startY;
  46017. });
  46018. Object(dom_["on"])(document, 'mousemove', this._dragHandler);
  46019. Object(dom_["on"])(document, 'mouseup', function (ev) {
  46020. Object(dom_["off"])(document, 'mousemove', _this3._dragHandler);
  46021. });
  46022. e.preventDefault();
  46023. },
  46024. handleMaskClick: function handleMaskClick() {
  46025. if (this.maskClosable) {
  46026. this.hide();
  46027. }
  46028. },
  46029. reset: function reset() {
  46030. this.transform = {
  46031. scale: 1,
  46032. deg: 0,
  46033. offsetX: 0,
  46034. offsetY: 0,
  46035. enableTransition: false
  46036. };
  46037. },
  46038. toggleMode: function toggleMode() {
  46039. if (this.loading) return;
  46040. var modeNames = Object.keys(Mode);
  46041. var modeValues = Object.values(Mode);
  46042. var index = modeValues.indexOf(this.mode);
  46043. var nextIndex = (index + 1) % modeNames.length;
  46044. this.mode = Mode[modeNames[nextIndex]];
  46045. this.reset();
  46046. },
  46047. prev: function prev() {
  46048. if (this.isFirst && !this.infinite) return;
  46049. var len = this.urlList.length;
  46050. this.index = (this.index - 1 + len) % len;
  46051. },
  46052. next: function next() {
  46053. if (this.isLast && !this.infinite) return;
  46054. var len = this.urlList.length;
  46055. this.index = (this.index + 1) % len;
  46056. },
  46057. handleActions: function handleActions(action) {
  46058. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  46059. if (this.loading) return;
  46060. var _zoomRate$rotateDeg$e = image_viewervue_type_script_lang_js_extends({
  46061. zoomRate: 0.2,
  46062. rotateDeg: 90,
  46063. enableTransition: true
  46064. }, options),
  46065. zoomRate = _zoomRate$rotateDeg$e.zoomRate,
  46066. rotateDeg = _zoomRate$rotateDeg$e.rotateDeg,
  46067. enableTransition = _zoomRate$rotateDeg$e.enableTransition;
  46068. var transform = this.transform;
  46069. switch (action) {
  46070. case 'zoomOut':
  46071. if (transform.scale > 0.2) {
  46072. transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3));
  46073. }
  46074. break;
  46075. case 'zoomIn':
  46076. transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3));
  46077. break;
  46078. case 'clocelise':
  46079. transform.deg += rotateDeg;
  46080. break;
  46081. case 'anticlocelise':
  46082. transform.deg -= rotateDeg;
  46083. break;
  46084. }
  46085. transform.enableTransition = enableTransition;
  46086. }
  46087. },
  46088. mounted: function mounted() {
  46089. this.deviceSupportInstall();
  46090. if (this.appendToBody) {
  46091. document.body.appendChild(this.$el);
  46092. }
  46093. // add tabindex then wrapper can be focusable via Javascript
  46094. // focus wrapper so arrow key can't cause inner scroll behavior underneath
  46095. this.$refs['el-image-viewer__wrapper'].focus();
  46096. },
  46097. destroyed: function destroyed() {
  46098. // if appendToBody is true, remove DOM node after destroy
  46099. if (this.appendToBody && this.$el && this.$el.parentNode) {
  46100. this.$el.parentNode.removeChild(this.$el);
  46101. }
  46102. }
  46103. });
  46104. // CONCATENATED MODULE: ./packages/image/src/image-viewer.vue?vue&type=script&lang=js&
  46105. /* harmony default export */ var src_image_viewervue_type_script_lang_js_ = (image_viewervue_type_script_lang_js_);
  46106. // CONCATENATED MODULE: ./packages/image/src/image-viewer.vue
  46107. /* normalize component */
  46108. var image_viewer_component = normalizeComponent(
  46109. src_image_viewervue_type_script_lang_js_,
  46110. image_viewervue_type_template_id_5e73b307_render,
  46111. image_viewervue_type_template_id_5e73b307_staticRenderFns,
  46112. false,
  46113. null,
  46114. null,
  46115. null
  46116. )
  46117. /* hot reload */
  46118. if (false) { var image_viewer_api; }
  46119. image_viewer_component.options.__file = "packages/image/src/image-viewer.vue"
  46120. /* harmony default export */ var image_viewer = (image_viewer_component.exports);
  46121. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/main.vue?vue&type=script&lang=js&
  46122. //
  46123. //
  46124. //
  46125. //
  46126. //
  46127. //
  46128. //
  46129. //
  46130. //
  46131. //
  46132. //
  46133. //
  46134. //
  46135. //
  46136. //
  46137. //
  46138. //
  46139. //
  46140. //
  46141. //
  46142. //
  46143. //
  46144. //
  46145. var isSupportObjectFit = function isSupportObjectFit() {
  46146. return document.documentElement.style.objectFit !== undefined;
  46147. };
  46148. var ObjectFit = {
  46149. NONE: 'none',
  46150. CONTAIN: 'contain',
  46151. COVER: 'cover',
  46152. FILL: 'fill',
  46153. SCALE_DOWN: 'scale-down'
  46154. };
  46155. var prevOverflow = '';
  46156. /* harmony default export */ var image_src_mainvue_type_script_lang_js_ = ({
  46157. name: 'ElImage',
  46158. mixins: [locale_default.a],
  46159. inheritAttrs: false,
  46160. components: {
  46161. ImageViewer: image_viewer
  46162. },
  46163. props: {
  46164. src: String,
  46165. fit: String,
  46166. lazy: Boolean,
  46167. scrollContainer: {},
  46168. previewSrcList: {
  46169. type: Array,
  46170. default: function _default() {
  46171. return [];
  46172. }
  46173. },
  46174. zIndex: {
  46175. type: Number,
  46176. default: 2000
  46177. }
  46178. },
  46179. data: function data() {
  46180. return {
  46181. loading: true,
  46182. error: false,
  46183. show: !this.lazy,
  46184. imageWidth: 0,
  46185. imageHeight: 0,
  46186. showViewer: false
  46187. };
  46188. },
  46189. computed: {
  46190. imageStyle: function imageStyle() {
  46191. var fit = this.fit;
  46192. if (!this.$isServer && fit) {
  46193. return isSupportObjectFit() ? { 'object-fit': fit } : this.getImageStyle(fit);
  46194. }
  46195. return {};
  46196. },
  46197. alignCenter: function alignCenter() {
  46198. return !this.$isServer && !isSupportObjectFit() && this.fit !== ObjectFit.FILL;
  46199. },
  46200. preview: function preview() {
  46201. var previewSrcList = this.previewSrcList;
  46202. return Array.isArray(previewSrcList) && previewSrcList.length > 0;
  46203. },
  46204. imageIndex: function imageIndex() {
  46205. var previewIndex = 0;
  46206. var srcIndex = this.previewSrcList.indexOf(this.src);
  46207. if (srcIndex >= 0) {
  46208. previewIndex = srcIndex;
  46209. }
  46210. return previewIndex;
  46211. }
  46212. },
  46213. watch: {
  46214. src: function src(val) {
  46215. this.show && this.loadImage();
  46216. },
  46217. show: function show(val) {
  46218. val && this.loadImage();
  46219. }
  46220. },
  46221. mounted: function mounted() {
  46222. if (this.lazy) {
  46223. this.addLazyLoadListener();
  46224. } else {
  46225. this.loadImage();
  46226. }
  46227. },
  46228. beforeDestroy: function beforeDestroy() {
  46229. this.lazy && this.removeLazyLoadListener();
  46230. },
  46231. methods: {
  46232. loadImage: function loadImage() {
  46233. var _this = this;
  46234. if (this.$isServer) return;
  46235. // reset status
  46236. this.loading = true;
  46237. this.error = false;
  46238. var img = new Image();
  46239. img.onload = function (e) {
  46240. return _this.handleLoad(e, img);
  46241. };
  46242. img.onerror = this.handleError.bind(this);
  46243. // bind html attrs
  46244. // so it can behave consistently
  46245. Object.keys(this.$attrs).forEach(function (key) {
  46246. var value = _this.$attrs[key];
  46247. img.setAttribute(key, value);
  46248. });
  46249. img.src = this.src;
  46250. },
  46251. handleLoad: function handleLoad(e, img) {
  46252. this.imageWidth = img.width;
  46253. this.imageHeight = img.height;
  46254. this.loading = false;
  46255. this.error = false;
  46256. },
  46257. handleError: function handleError(e) {
  46258. this.loading = false;
  46259. this.error = true;
  46260. this.$emit('error', e);
  46261. },
  46262. handleLazyLoad: function handleLazyLoad() {
  46263. if (Object(dom_["isInContainer"])(this.$el, this._scrollContainer)) {
  46264. this.show = true;
  46265. this.removeLazyLoadListener();
  46266. }
  46267. },
  46268. addLazyLoadListener: function addLazyLoadListener() {
  46269. if (this.$isServer) return;
  46270. var scrollContainer = this.scrollContainer;
  46271. var _scrollContainer = null;
  46272. if (Object(types_["isHtmlElement"])(scrollContainer)) {
  46273. _scrollContainer = scrollContainer;
  46274. } else if (Object(types_["isString"])(scrollContainer)) {
  46275. _scrollContainer = document.querySelector(scrollContainer);
  46276. } else {
  46277. _scrollContainer = Object(dom_["getScrollContainer"])(this.$el);
  46278. }
  46279. if (_scrollContainer) {
  46280. this._scrollContainer = _scrollContainer;
  46281. this._lazyLoadHandler = throttle_default()(200, this.handleLazyLoad);
  46282. Object(dom_["on"])(_scrollContainer, 'scroll', this._lazyLoadHandler);
  46283. this.handleLazyLoad();
  46284. }
  46285. },
  46286. removeLazyLoadListener: function removeLazyLoadListener() {
  46287. var _scrollContainer = this._scrollContainer,
  46288. _lazyLoadHandler = this._lazyLoadHandler;
  46289. if (this.$isServer || !_scrollContainer || !_lazyLoadHandler) return;
  46290. Object(dom_["off"])(_scrollContainer, 'scroll', _lazyLoadHandler);
  46291. this._scrollContainer = null;
  46292. this._lazyLoadHandler = null;
  46293. },
  46294. /**
  46295. * simulate object-fit behavior to compatible with IE11 and other browsers which not support object-fit
  46296. */
  46297. getImageStyle: function getImageStyle(fit) {
  46298. var imageWidth = this.imageWidth,
  46299. imageHeight = this.imageHeight;
  46300. var _$el = this.$el,
  46301. containerWidth = _$el.clientWidth,
  46302. containerHeight = _$el.clientHeight;
  46303. if (!imageWidth || !imageHeight || !containerWidth || !containerHeight) return {};
  46304. var imageAspectRatio = imageWidth / imageHeight;
  46305. var containerAspectRatio = containerWidth / containerHeight;
  46306. if (fit === ObjectFit.SCALE_DOWN) {
  46307. var isSmaller = imageWidth < containerWidth && imageHeight < containerHeight;
  46308. fit = isSmaller ? ObjectFit.NONE : ObjectFit.CONTAIN;
  46309. }
  46310. switch (fit) {
  46311. case ObjectFit.NONE:
  46312. return { width: 'auto', height: 'auto' };
  46313. case ObjectFit.CONTAIN:
  46314. return imageAspectRatio < containerAspectRatio ? { width: 'auto' } : { height: 'auto' };
  46315. case ObjectFit.COVER:
  46316. return imageAspectRatio < containerAspectRatio ? { height: 'auto' } : { width: 'auto' };
  46317. default:
  46318. return {};
  46319. }
  46320. },
  46321. clickHandler: function clickHandler() {
  46322. // don't show viewer when preview is false
  46323. if (!this.preview) {
  46324. return;
  46325. }
  46326. // prevent body scroll
  46327. prevOverflow = document.body.style.overflow;
  46328. document.body.style.overflow = 'hidden';
  46329. this.showViewer = true;
  46330. },
  46331. closeViewer: function closeViewer() {
  46332. document.body.style.overflow = prevOverflow;
  46333. this.showViewer = false;
  46334. }
  46335. }
  46336. });
  46337. // CONCATENATED MODULE: ./packages/image/src/main.vue?vue&type=script&lang=js&
  46338. /* harmony default export */ var packages_image_src_mainvue_type_script_lang_js_ = (image_src_mainvue_type_script_lang_js_);
  46339. // CONCATENATED MODULE: ./packages/image/src/main.vue
  46340. /* normalize component */
  46341. var image_src_main_component = normalizeComponent(
  46342. packages_image_src_mainvue_type_script_lang_js_,
  46343. mainvue_type_template_id_44d84a7c_render,
  46344. mainvue_type_template_id_44d84a7c_staticRenderFns,
  46345. false,
  46346. null,
  46347. null,
  46348. null
  46349. )
  46350. /* hot reload */
  46351. if (false) { var image_src_main_api; }
  46352. image_src_main_component.options.__file = "packages/image/src/main.vue"
  46353. /* harmony default export */ var image_src_main = (image_src_main_component.exports);
  46354. // CONCATENATED MODULE: ./packages/image/index.js
  46355. /* istanbul ignore next */
  46356. image_src_main.install = function (Vue) {
  46357. Vue.component(image_src_main.name, image_src_main);
  46358. };
  46359. /* harmony default export */ var packages_image = (image_src_main);
  46360. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=template&id=6d9756be&
  46361. var mainvue_type_template_id_6d9756be_render = function() {
  46362. var _vm = this
  46363. var _h = _vm.$createElement
  46364. var _c = _vm._self._c || _h
  46365. return _c("div", { staticClass: "el-calendar" }, [
  46366. _c("div", { staticClass: "el-calendar__header" }, [
  46367. _c("div", { staticClass: "el-calendar__title" }, [
  46368. _vm._v("\n " + _vm._s(_vm.i18nDate) + "\n ")
  46369. ]),
  46370. _vm.validatedRange.length === 0
  46371. ? _c(
  46372. "div",
  46373. { staticClass: "el-calendar__button-group" },
  46374. [
  46375. _c(
  46376. "el-button-group",
  46377. [
  46378. _c(
  46379. "el-button",
  46380. {
  46381. attrs: { type: "plain", size: "mini" },
  46382. on: {
  46383. click: function($event) {
  46384. _vm.selectDate("prev-month")
  46385. }
  46386. }
  46387. },
  46388. [
  46389. _vm._v(
  46390. "\n " +
  46391. _vm._s(_vm.t("el.datepicker.prevMonth")) +
  46392. "\n "
  46393. )
  46394. ]
  46395. ),
  46396. _c(
  46397. "el-button",
  46398. {
  46399. attrs: { type: "plain", size: "mini" },
  46400. on: {
  46401. click: function($event) {
  46402. _vm.selectDate("today")
  46403. }
  46404. }
  46405. },
  46406. [
  46407. _vm._v(
  46408. "\n " +
  46409. _vm._s(_vm.t("el.datepicker.today")) +
  46410. "\n "
  46411. )
  46412. ]
  46413. ),
  46414. _c(
  46415. "el-button",
  46416. {
  46417. attrs: { type: "plain", size: "mini" },
  46418. on: {
  46419. click: function($event) {
  46420. _vm.selectDate("next-month")
  46421. }
  46422. }
  46423. },
  46424. [
  46425. _vm._v(
  46426. "\n " +
  46427. _vm._s(_vm.t("el.datepicker.nextMonth")) +
  46428. "\n "
  46429. )
  46430. ]
  46431. )
  46432. ],
  46433. 1
  46434. )
  46435. ],
  46436. 1
  46437. )
  46438. : _vm._e()
  46439. ]),
  46440. _vm.validatedRange.length === 0
  46441. ? _c(
  46442. "div",
  46443. { key: "no-range", staticClass: "el-calendar__body" },
  46444. [
  46445. _c("date-table", {
  46446. attrs: {
  46447. date: _vm.date,
  46448. "selected-day": _vm.realSelectedDay,
  46449. "first-day-of-week": _vm.realFirstDayOfWeek
  46450. },
  46451. on: { pick: _vm.pickDay }
  46452. })
  46453. ],
  46454. 1
  46455. )
  46456. : _c(
  46457. "div",
  46458. { key: "has-range", staticClass: "el-calendar__body" },
  46459. _vm._l(_vm.validatedRange, function(range, index) {
  46460. return _c("date-table", {
  46461. key: index,
  46462. attrs: {
  46463. date: range[0],
  46464. "selected-day": _vm.realSelectedDay,
  46465. range: range,
  46466. "hide-header": index !== 0,
  46467. "first-day-of-week": _vm.realFirstDayOfWeek
  46468. },
  46469. on: { pick: _vm.pickDay }
  46470. })
  46471. }),
  46472. 1
  46473. )
  46474. ])
  46475. }
  46476. var mainvue_type_template_id_6d9756be_staticRenderFns = []
  46477. mainvue_type_template_id_6d9756be_render._withStripped = true
  46478. // CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=template&id=6d9756be&
  46479. // EXTERNAL MODULE: external "element-ui/lib/utils/date"
  46480. var date_ = __webpack_require__(20);
  46481. var date_default = /*#__PURE__*/__webpack_require__.n(date_);
  46482. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/date-table.vue?vue&type=script&lang=js&
  46483. /* harmony default export */ var src_date_tablevue_type_script_lang_js_ = ({
  46484. props: {
  46485. selectedDay: String, // formated date yyyy-MM-dd
  46486. range: {
  46487. type: Array,
  46488. validator: function validator(val) {
  46489. if (!(val && val.length)) return true;
  46490. var start = val[0],
  46491. end = val[1];
  46492. return Object(date_util_["validateRangeInOneMonth"])(start, end);
  46493. }
  46494. },
  46495. date: Date,
  46496. hideHeader: Boolean,
  46497. firstDayOfWeek: Number
  46498. },
  46499. inject: ['elCalendar'],
  46500. methods: {
  46501. toNestedArr: function toNestedArr(days) {
  46502. return Object(date_util_["range"])(days.length / 7).map(function (_, index) {
  46503. var start = index * 7;
  46504. return days.slice(start, start + 7);
  46505. });
  46506. },
  46507. getFormateDate: function getFormateDate(day, type) {
  46508. if (!day || ['prev', 'current', 'next'].indexOf(type) === -1) {
  46509. throw new Error('invalid day or type');
  46510. }
  46511. var prefix = this.curMonthDatePrefix;
  46512. if (type === 'prev') {
  46513. prefix = this.prevMonthDatePrefix;
  46514. } else if (type === 'next') {
  46515. prefix = this.nextMonthDatePrefix;
  46516. }
  46517. day = ('00' + day).slice(-2);
  46518. return prefix + '-' + day;
  46519. },
  46520. getCellClass: function getCellClass(_ref) {
  46521. var text = _ref.text,
  46522. type = _ref.type;
  46523. var classes = [type];
  46524. if (type === 'current') {
  46525. var date = this.getFormateDate(text, type);
  46526. if (date === this.selectedDay) {
  46527. classes.push('is-selected');
  46528. }
  46529. if (date === this.formatedToday) {
  46530. classes.push('is-today');
  46531. }
  46532. }
  46533. return classes;
  46534. },
  46535. pickDay: function pickDay(_ref2) {
  46536. var text = _ref2.text,
  46537. type = _ref2.type;
  46538. var date = this.getFormateDate(text, type);
  46539. this.$emit('pick', date);
  46540. },
  46541. cellRenderProxy: function cellRenderProxy(_ref3) {
  46542. var text = _ref3.text,
  46543. type = _ref3.type;
  46544. var h = this.$createElement;
  46545. var render = this.elCalendar.$scopedSlots.dateCell;
  46546. if (!render) return h('span', [text]);
  46547. var day = this.getFormateDate(text, type);
  46548. var date = new Date(day);
  46549. var data = {
  46550. isSelected: this.selectedDay === day,
  46551. type: type + '-month',
  46552. day: day
  46553. };
  46554. return render({ date: date, data: data });
  46555. }
  46556. },
  46557. computed: {
  46558. WEEK_DAYS: function WEEK_DAYS() {
  46559. return Object(date_util_["getI18nSettings"])().dayNames;
  46560. },
  46561. prevMonthDatePrefix: function prevMonthDatePrefix() {
  46562. var temp = new Date(this.date.getTime());
  46563. temp.setDate(0);
  46564. return date_default.a.format(temp, 'yyyy-MM');
  46565. },
  46566. curMonthDatePrefix: function curMonthDatePrefix() {
  46567. return date_default.a.format(this.date, 'yyyy-MM');
  46568. },
  46569. nextMonthDatePrefix: function nextMonthDatePrefix() {
  46570. var temp = new Date(this.date.getFullYear(), this.date.getMonth() + 1, 1);
  46571. return date_default.a.format(temp, 'yyyy-MM');
  46572. },
  46573. formatedToday: function formatedToday() {
  46574. return this.elCalendar.formatedToday;
  46575. },
  46576. isInRange: function isInRange() {
  46577. return this.range && this.range.length;
  46578. },
  46579. rows: function rows() {
  46580. var days = [];
  46581. // if range exists, should render days in range.
  46582. if (this.isInRange) {
  46583. var _range = this.range,
  46584. start = _range[0],
  46585. end = _range[1];
  46586. var currentMonthRange = Object(date_util_["range"])(end.getDate() - start.getDate() + 1).map(function (_, index) {
  46587. return {
  46588. text: start.getDate() + index,
  46589. type: 'current'
  46590. };
  46591. });
  46592. var remaining = currentMonthRange.length % 7;
  46593. remaining = remaining === 0 ? 0 : 7 - remaining;
  46594. var nextMonthRange = Object(date_util_["range"])(remaining).map(function (_, index) {
  46595. return {
  46596. text: index + 1,
  46597. type: 'next'
  46598. };
  46599. });
  46600. days = currentMonthRange.concat(nextMonthRange);
  46601. } else {
  46602. var date = this.date;
  46603. var firstDay = Object(date_util_["getFirstDayOfMonth"])(date);
  46604. firstDay = firstDay === 0 ? 7 : firstDay;
  46605. var firstDayOfWeek = typeof this.firstDayOfWeek === 'number' ? this.firstDayOfWeek : 1;
  46606. var offset = (7 + firstDay - firstDayOfWeek) % 7;
  46607. var prevMonthDays = Object(date_util_["getPrevMonthLastDays"])(date, offset).map(function (day) {
  46608. return {
  46609. text: day,
  46610. type: 'prev'
  46611. };
  46612. });
  46613. var currentMonthDays = Object(date_util_["getMonthDays"])(date).map(function (day) {
  46614. return {
  46615. text: day,
  46616. type: 'current'
  46617. };
  46618. });
  46619. days = [].concat(prevMonthDays, currentMonthDays);
  46620. var nextMonthDays = Object(date_util_["range"])(42 - days.length).map(function (_, index) {
  46621. return {
  46622. text: index + 1,
  46623. type: 'next'
  46624. };
  46625. });
  46626. days = days.concat(nextMonthDays);
  46627. }
  46628. return this.toNestedArr(days);
  46629. },
  46630. weekDays: function weekDays() {
  46631. var start = this.firstDayOfWeek;
  46632. var WEEK_DAYS = this.WEEK_DAYS;
  46633. if (typeof start !== 'number' || start === 0) {
  46634. return WEEK_DAYS.slice();
  46635. } else {
  46636. return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start));
  46637. }
  46638. }
  46639. },
  46640. render: function render() {
  46641. var _this = this;
  46642. var h = arguments[0];
  46643. var thead = this.hideHeader ? null : h('thead', [this.weekDays.map(function (day) {
  46644. return h(
  46645. 'th',
  46646. { key: day },
  46647. [day]
  46648. );
  46649. })]);
  46650. return h(
  46651. 'table',
  46652. {
  46653. 'class': {
  46654. 'el-calendar-table': true,
  46655. 'is-range': this.isInRange
  46656. },
  46657. attrs: { cellspacing: '0',
  46658. cellpadding: '0' }
  46659. },
  46660. [thead, h('tbody', [this.rows.map(function (row, index) {
  46661. return h(
  46662. 'tr',
  46663. {
  46664. 'class': {
  46665. 'el-calendar-table__row': true,
  46666. 'el-calendar-table__row--hide-border': index === 0 && _this.hideHeader
  46667. },
  46668. key: index },
  46669. [row.map(function (cell, key) {
  46670. return h(
  46671. 'td',
  46672. { key: key,
  46673. 'class': _this.getCellClass(cell),
  46674. on: {
  46675. 'click': _this.pickDay.bind(_this, cell)
  46676. }
  46677. },
  46678. [h(
  46679. 'div',
  46680. { 'class': 'el-calendar-day' },
  46681. [_this.cellRenderProxy(cell)]
  46682. )]
  46683. );
  46684. })]
  46685. );
  46686. })])]
  46687. );
  46688. }
  46689. });
  46690. // CONCATENATED MODULE: ./packages/calendar/src/date-table.vue?vue&type=script&lang=js&
  46691. /* harmony default export */ var calendar_src_date_tablevue_type_script_lang_js_ = (src_date_tablevue_type_script_lang_js_);
  46692. // CONCATENATED MODULE: ./packages/calendar/src/date-table.vue
  46693. var date_table_render, date_table_staticRenderFns
  46694. /* normalize component */
  46695. var src_date_table_component = normalizeComponent(
  46696. calendar_src_date_tablevue_type_script_lang_js_,
  46697. date_table_render,
  46698. date_table_staticRenderFns,
  46699. false,
  46700. null,
  46701. null,
  46702. null
  46703. )
  46704. /* hot reload */
  46705. if (false) { var src_date_table_api; }
  46706. src_date_table_component.options.__file = "packages/calendar/src/date-table.vue"
  46707. /* harmony default export */ var src_date_table = (src_date_table_component.exports);
  46708. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=script&lang=js&
  46709. //
  46710. //
  46711. //
  46712. //
  46713. //
  46714. //
  46715. //
  46716. //
  46717. //
  46718. //
  46719. //
  46720. //
  46721. //
  46722. //
  46723. //
  46724. //
  46725. //
  46726. //
  46727. //
  46728. //
  46729. //
  46730. //
  46731. //
  46732. //
  46733. //
  46734. //
  46735. //
  46736. //
  46737. //
  46738. //
  46739. //
  46740. //
  46741. //
  46742. //
  46743. //
  46744. //
  46745. //
  46746. //
  46747. //
  46748. //
  46749. //
  46750. //
  46751. //
  46752. //
  46753. //
  46754. //
  46755. //
  46756. //
  46757. //
  46758. //
  46759. //
  46760. //
  46761. //
  46762. //
  46763. //
  46764. //
  46765. //
  46766. //
  46767. var validTypes = ['prev-month', 'today', 'next-month'];
  46768. var weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
  46769. var oneDay = 86400000;
  46770. /* harmony default export */ var calendar_src_mainvue_type_script_lang_js_ = ({
  46771. name: 'ElCalendar',
  46772. mixins: [locale_default.a],
  46773. components: {
  46774. DateTable: src_date_table,
  46775. ElButton: button_default.a,
  46776. ElButtonGroup: button_group_default.a
  46777. },
  46778. props: {
  46779. value: [Date, String, Number],
  46780. range: {
  46781. type: Array,
  46782. validator: function validator(range) {
  46783. if (Array.isArray(range)) {
  46784. return range.length === 2 && range.every(function (item) {
  46785. return typeof item === 'string' || typeof item === 'number' || item instanceof Date;
  46786. });
  46787. } else {
  46788. return true;
  46789. }
  46790. }
  46791. },
  46792. firstDayOfWeek: {
  46793. type: Number,
  46794. default: 1
  46795. }
  46796. },
  46797. provide: function provide() {
  46798. return {
  46799. elCalendar: this
  46800. };
  46801. },
  46802. methods: {
  46803. pickDay: function pickDay(day) {
  46804. this.realSelectedDay = day;
  46805. },
  46806. selectDate: function selectDate(type) {
  46807. if (validTypes.indexOf(type) === -1) {
  46808. throw new Error('invalid type ' + type);
  46809. }
  46810. var day = '';
  46811. if (type === 'prev-month') {
  46812. day = this.prevMonthDatePrefix + '-01';
  46813. } else if (type === 'next-month') {
  46814. day = this.nextMonthDatePrefix + '-01';
  46815. } else {
  46816. day = this.formatedToday;
  46817. }
  46818. if (day === this.formatedDate) return;
  46819. this.pickDay(day);
  46820. },
  46821. toDate: function toDate(val) {
  46822. if (!val) {
  46823. throw new Error('invalid val');
  46824. }
  46825. return val instanceof Date ? val : new Date(val);
  46826. },
  46827. rangeValidator: function rangeValidator(date, isStart) {
  46828. var firstDayOfWeek = this.realFirstDayOfWeek;
  46829. var expected = isStart ? firstDayOfWeek : firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1;
  46830. var message = (isStart ? 'start' : 'end') + ' of range should be ' + weekDays[expected] + '.';
  46831. if (date.getDay() !== expected) {
  46832. console.warn('[ElementCalendar]', message, 'Invalid range will be ignored.');
  46833. return false;
  46834. }
  46835. return true;
  46836. }
  46837. },
  46838. computed: {
  46839. prevMonthDatePrefix: function prevMonthDatePrefix() {
  46840. var temp = new Date(this.date.getTime());
  46841. temp.setDate(0);
  46842. return date_default.a.format(temp, 'yyyy-MM');
  46843. },
  46844. curMonthDatePrefix: function curMonthDatePrefix() {
  46845. return date_default.a.format(this.date, 'yyyy-MM');
  46846. },
  46847. nextMonthDatePrefix: function nextMonthDatePrefix() {
  46848. var temp = new Date(this.date.getFullYear(), this.date.getMonth() + 1, 1);
  46849. return date_default.a.format(temp, 'yyyy-MM');
  46850. },
  46851. formatedDate: function formatedDate() {
  46852. return date_default.a.format(this.date, 'yyyy-MM-dd');
  46853. },
  46854. i18nDate: function i18nDate() {
  46855. var year = this.date.getFullYear();
  46856. var month = this.date.getMonth() + 1;
  46857. return year + ' ' + this.t('el.datepicker.year') + ' ' + this.t('el.datepicker.month' + month);
  46858. },
  46859. formatedToday: function formatedToday() {
  46860. return date_default.a.format(this.now, 'yyyy-MM-dd');
  46861. },
  46862. realSelectedDay: {
  46863. get: function get() {
  46864. if (!this.value) return this.selectedDay;
  46865. return this.formatedDate;
  46866. },
  46867. set: function set(val) {
  46868. this.selectedDay = val;
  46869. var date = new Date(val);
  46870. this.$emit('input', date);
  46871. }
  46872. },
  46873. date: function date() {
  46874. if (!this.value) {
  46875. if (this.realSelectedDay) {
  46876. var d = this.selectedDay.split('-');
  46877. return new Date(d[0], d[1] - 1, d[2]);
  46878. } else if (this.validatedRange.length) {
  46879. return this.validatedRange[0][0];
  46880. }
  46881. return this.now;
  46882. } else {
  46883. return this.toDate(this.value);
  46884. }
  46885. },
  46886. // if range is valid, we get a two-digit array
  46887. validatedRange: function validatedRange() {
  46888. var _this = this;
  46889. var range = this.range;
  46890. if (!range) return [];
  46891. range = range.reduce(function (prev, val, index) {
  46892. var date = _this.toDate(val);
  46893. if (_this.rangeValidator(date, index === 0)) {
  46894. prev = prev.concat(date);
  46895. }
  46896. return prev;
  46897. }, []);
  46898. if (range.length === 2) {
  46899. var _range = range,
  46900. start = _range[0],
  46901. end = _range[1];
  46902. if (start > end) {
  46903. console.warn('[ElementCalendar]end time should be greater than start time');
  46904. return [];
  46905. }
  46906. // start time and end time in one month
  46907. if (Object(date_util_["validateRangeInOneMonth"])(start, end)) {
  46908. return [[start, end]];
  46909. }
  46910. var data = [];
  46911. var startDay = new Date(start.getFullYear(), start.getMonth() + 1, 1);
  46912. var lastDay = this.toDate(startDay.getTime() - oneDay);
  46913. if (!Object(date_util_["validateRangeInOneMonth"])(startDay, end)) {
  46914. console.warn('[ElementCalendar]start time and end time interval must not exceed two months');
  46915. return [];
  46916. }
  46917. // 第一个月的时间范围
  46918. data.push([start, lastDay]);
  46919. // 下一月的时间范围,需要计算一下该月的第一个周起始日
  46920. var firstDayOfWeek = this.realFirstDayOfWeek;
  46921. var nextMontFirstDay = startDay.getDay();
  46922. var interval = 0;
  46923. if (nextMontFirstDay !== firstDayOfWeek) {
  46924. if (firstDayOfWeek === 0) {
  46925. interval = 7 - nextMontFirstDay;
  46926. } else {
  46927. interval = firstDayOfWeek - nextMontFirstDay;
  46928. interval = interval > 0 ? interval : 7 + interval;
  46929. }
  46930. }
  46931. startDay = this.toDate(startDay.getTime() + interval * oneDay);
  46932. if (startDay.getDate() < end.getDate()) {
  46933. data.push([startDay, end]);
  46934. }
  46935. return data;
  46936. }
  46937. return [];
  46938. },
  46939. realFirstDayOfWeek: function realFirstDayOfWeek() {
  46940. if (this.firstDayOfWeek < 1 || this.firstDayOfWeek > 6) {
  46941. return 0;
  46942. }
  46943. return Math.floor(this.firstDayOfWeek);
  46944. }
  46945. },
  46946. data: function data() {
  46947. return {
  46948. selectedDay: '',
  46949. now: new Date()
  46950. };
  46951. }
  46952. });
  46953. // CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=script&lang=js&
  46954. /* harmony default export */ var packages_calendar_src_mainvue_type_script_lang_js_ = (calendar_src_mainvue_type_script_lang_js_);
  46955. // CONCATENATED MODULE: ./packages/calendar/src/main.vue
  46956. /* normalize component */
  46957. var calendar_src_main_component = normalizeComponent(
  46958. packages_calendar_src_mainvue_type_script_lang_js_,
  46959. mainvue_type_template_id_6d9756be_render,
  46960. mainvue_type_template_id_6d9756be_staticRenderFns,
  46961. false,
  46962. null,
  46963. null,
  46964. null
  46965. )
  46966. /* hot reload */
  46967. if (false) { var calendar_src_main_api; }
  46968. calendar_src_main_component.options.__file = "packages/calendar/src/main.vue"
  46969. /* harmony default export */ var calendar_src_main = (calendar_src_main_component.exports);
  46970. // CONCATENATED MODULE: ./packages/calendar/index.js
  46971. /* istanbul ignore next */
  46972. calendar_src_main.install = function (Vue) {
  46973. Vue.component(calendar_src_main.name, calendar_src_main);
  46974. };
  46975. /* harmony default export */ var calendar = (calendar_src_main);
  46976. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/backtop/src/main.vue?vue&type=template&id=257dd4a9&
  46977. var mainvue_type_template_id_257dd4a9_render = function() {
  46978. var _vm = this
  46979. var _h = _vm.$createElement
  46980. var _c = _vm._self._c || _h
  46981. return _c("transition", { attrs: { name: "el-fade-in" } }, [
  46982. _vm.visible
  46983. ? _c(
  46984. "div",
  46985. {
  46986. staticClass: "el-backtop",
  46987. style: {
  46988. right: _vm.styleRight,
  46989. bottom: _vm.styleBottom
  46990. },
  46991. on: {
  46992. click: function($event) {
  46993. $event.stopPropagation()
  46994. return _vm.handleClick($event)
  46995. }
  46996. }
  46997. },
  46998. [
  46999. _vm._t("default", [_c("el-icon", { attrs: { name: "caret-top" } })])
  47000. ],
  47001. 2
  47002. )
  47003. : _vm._e()
  47004. ])
  47005. }
  47006. var mainvue_type_template_id_257dd4a9_staticRenderFns = []
  47007. mainvue_type_template_id_257dd4a9_render._withStripped = true
  47008. // CONCATENATED MODULE: ./packages/backtop/src/main.vue?vue&type=template&id=257dd4a9&
  47009. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/backtop/src/main.vue?vue&type=script&lang=js&
  47010. //
  47011. //
  47012. //
  47013. //
  47014. //
  47015. //
  47016. //
  47017. //
  47018. //
  47019. //
  47020. //
  47021. //
  47022. //
  47023. //
  47024. //
  47025. //
  47026. //
  47027. var cubic = function cubic(value) {
  47028. return Math.pow(value, 3);
  47029. };
  47030. var easeInOutCubic = function easeInOutCubic(value) {
  47031. return value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2;
  47032. };
  47033. /* harmony default export */ var backtop_src_mainvue_type_script_lang_js_ = ({
  47034. name: 'ElBacktop',
  47035. props: {
  47036. visibilityHeight: {
  47037. type: Number,
  47038. default: 200
  47039. },
  47040. target: [String],
  47041. right: {
  47042. type: Number,
  47043. default: 40
  47044. },
  47045. bottom: {
  47046. type: Number,
  47047. default: 40
  47048. }
  47049. },
  47050. data: function data() {
  47051. return {
  47052. el: null,
  47053. container: null,
  47054. visible: false
  47055. };
  47056. },
  47057. computed: {
  47058. styleBottom: function styleBottom() {
  47059. return this.bottom + 'px';
  47060. },
  47061. styleRight: function styleRight() {
  47062. return this.right + 'px';
  47063. }
  47064. },
  47065. mounted: function mounted() {
  47066. this.init();
  47067. this.throttledScrollHandler = throttle_default()(300, this.onScroll);
  47068. this.container.addEventListener('scroll', this.throttledScrollHandler);
  47069. },
  47070. methods: {
  47071. init: function init() {
  47072. this.container = document;
  47073. this.el = document.documentElement;
  47074. if (this.target) {
  47075. this.el = document.querySelector(this.target);
  47076. if (!this.el) {
  47077. throw new Error('target is not existed: ' + this.target);
  47078. }
  47079. this.container = this.el;
  47080. }
  47081. },
  47082. onScroll: function onScroll() {
  47083. var scrollTop = this.el.scrollTop;
  47084. this.visible = scrollTop >= this.visibilityHeight;
  47085. },
  47086. handleClick: function handleClick(e) {
  47087. this.scrollToTop();
  47088. this.$emit('click', e);
  47089. },
  47090. scrollToTop: function scrollToTop() {
  47091. var el = this.el;
  47092. var beginTime = Date.now();
  47093. var beginValue = el.scrollTop;
  47094. var rAF = window.requestAnimationFrame || function (func) {
  47095. return setTimeout(func, 16);
  47096. };
  47097. var frameFunc = function frameFunc() {
  47098. var progress = (Date.now() - beginTime) / 500;
  47099. if (progress < 1) {
  47100. el.scrollTop = beginValue * (1 - easeInOutCubic(progress));
  47101. rAF(frameFunc);
  47102. } else {
  47103. el.scrollTop = 0;
  47104. }
  47105. };
  47106. rAF(frameFunc);
  47107. }
  47108. },
  47109. beforeDestroy: function beforeDestroy() {
  47110. this.container.removeEventListener('scroll', this.throttledScrollHandler);
  47111. }
  47112. });
  47113. // CONCATENATED MODULE: ./packages/backtop/src/main.vue?vue&type=script&lang=js&
  47114. /* harmony default export */ var packages_backtop_src_mainvue_type_script_lang_js_ = (backtop_src_mainvue_type_script_lang_js_);
  47115. // CONCATENATED MODULE: ./packages/backtop/src/main.vue
  47116. /* normalize component */
  47117. var backtop_src_main_component = normalizeComponent(
  47118. packages_backtop_src_mainvue_type_script_lang_js_,
  47119. mainvue_type_template_id_257dd4a9_render,
  47120. mainvue_type_template_id_257dd4a9_staticRenderFns,
  47121. false,
  47122. null,
  47123. null,
  47124. null
  47125. )
  47126. /* hot reload */
  47127. if (false) { var backtop_src_main_api; }
  47128. backtop_src_main_component.options.__file = "packages/backtop/src/main.vue"
  47129. /* harmony default export */ var backtop_src_main = (backtop_src_main_component.exports);
  47130. // CONCATENATED MODULE: ./packages/backtop/index.js
  47131. /* istanbul ignore next */
  47132. backtop_src_main.install = function (Vue) {
  47133. Vue.component(backtop_src_main.name, backtop_src_main);
  47134. };
  47135. /* harmony default export */ var backtop = (backtop_src_main);
  47136. // CONCATENATED MODULE: ./packages/infinite-scroll/src/main.js
  47137. var getStyleComputedProperty = function getStyleComputedProperty(element, property) {
  47138. if (element === window) {
  47139. element = document.documentElement;
  47140. }
  47141. if (element.nodeType !== 1) {
  47142. return [];
  47143. }
  47144. // NOTE: 1 DOM access here
  47145. var css = window.getComputedStyle(element, null);
  47146. return property ? css[property] : css;
  47147. };
  47148. var entries = function entries(obj) {
  47149. return Object.keys(obj || {}).map(function (key) {
  47150. return [key, obj[key]];
  47151. });
  47152. };
  47153. var getPositionSize = function getPositionSize(el, prop) {
  47154. return el === window || el === document ? document.documentElement[prop] : el[prop];
  47155. };
  47156. var getOffsetHeight = function getOffsetHeight(el) {
  47157. return getPositionSize(el, 'offsetHeight');
  47158. };
  47159. var getClientHeight = function getClientHeight(el) {
  47160. return getPositionSize(el, 'clientHeight');
  47161. };
  47162. var scope = 'ElInfiniteScroll';
  47163. var attributes = {
  47164. delay: {
  47165. type: Number,
  47166. default: 200
  47167. },
  47168. distance: {
  47169. type: Number,
  47170. default: 0
  47171. },
  47172. disabled: {
  47173. type: Boolean,
  47174. default: false
  47175. },
  47176. immediate: {
  47177. type: Boolean,
  47178. default: true
  47179. }
  47180. };
  47181. var main_getScrollOptions = function getScrollOptions(el, vm) {
  47182. if (!Object(types_["isHtmlElement"])(el)) return {};
  47183. return entries(attributes).reduce(function (map, _ref) {
  47184. var key = _ref[0],
  47185. option = _ref[1];
  47186. var type = option.type,
  47187. defaultValue = option.default;
  47188. var value = el.getAttribute('infinite-scroll-' + key);
  47189. value = Object(types_["isUndefined"])(vm[value]) ? value : vm[value];
  47190. switch (type) {
  47191. case Number:
  47192. value = Number(value);
  47193. value = Number.isNaN(value) ? defaultValue : value;
  47194. break;
  47195. case Boolean:
  47196. value = Object(types_["isDefined"])(value) ? value === 'false' ? false : Boolean(value) : defaultValue;
  47197. break;
  47198. default:
  47199. value = type(value);
  47200. }
  47201. map[key] = value;
  47202. return map;
  47203. }, {});
  47204. };
  47205. var getElementTop = function getElementTop(el) {
  47206. return el.getBoundingClientRect().top;
  47207. };
  47208. var main_handleScroll = function handleScroll(cb) {
  47209. var _scope = this[scope],
  47210. el = _scope.el,
  47211. vm = _scope.vm,
  47212. container = _scope.container,
  47213. observer = _scope.observer;
  47214. var _getScrollOptions = main_getScrollOptions(el, vm),
  47215. distance = _getScrollOptions.distance,
  47216. disabled = _getScrollOptions.disabled;
  47217. if (disabled) return;
  47218. var containerInfo = container.getBoundingClientRect();
  47219. if (!containerInfo.width && !containerInfo.height) return;
  47220. var shouldTrigger = false;
  47221. if (container === el) {
  47222. // be aware of difference between clientHeight & offsetHeight & window.getComputedStyle().height
  47223. var scrollBottom = container.scrollTop + getClientHeight(container);
  47224. shouldTrigger = container.scrollHeight - scrollBottom <= distance;
  47225. } else {
  47226. var heightBelowTop = getOffsetHeight(el) + getElementTop(el) - getElementTop(container);
  47227. var offsetHeight = getOffsetHeight(container);
  47228. var borderBottom = Number.parseFloat(getStyleComputedProperty(container, 'borderBottomWidth'));
  47229. shouldTrigger = heightBelowTop - offsetHeight + borderBottom <= distance;
  47230. }
  47231. if (shouldTrigger && Object(types_["isFunction"])(cb)) {
  47232. cb.call(vm);
  47233. } else if (observer) {
  47234. observer.disconnect();
  47235. this[scope].observer = null;
  47236. }
  47237. };
  47238. /* harmony default export */ var infinite_scroll_src_main = ({
  47239. name: 'InfiniteScroll',
  47240. inserted: function inserted(el, binding, vnode) {
  47241. var cb = binding.value;
  47242. var vm = vnode.context;
  47243. // only include vertical scroll
  47244. var container = Object(dom_["getScrollContainer"])(el, true);
  47245. var _getScrollOptions2 = main_getScrollOptions(el, vm),
  47246. delay = _getScrollOptions2.delay,
  47247. immediate = _getScrollOptions2.immediate;
  47248. var onScroll = debounce_default()(delay, main_handleScroll.bind(el, cb));
  47249. el[scope] = { el: el, vm: vm, container: container, onScroll: onScroll };
  47250. if (container) {
  47251. container.addEventListener('scroll', onScroll);
  47252. if (immediate) {
  47253. var observer = el[scope].observer = new MutationObserver(onScroll);
  47254. observer.observe(container, { childList: true, subtree: true });
  47255. onScroll();
  47256. }
  47257. }
  47258. },
  47259. unbind: function unbind(el) {
  47260. var _el$scope = el[scope],
  47261. container = _el$scope.container,
  47262. onScroll = _el$scope.onScroll;
  47263. if (container) {
  47264. container.removeEventListener('scroll', onScroll);
  47265. }
  47266. }
  47267. });
  47268. // CONCATENATED MODULE: ./packages/infinite-scroll/index.js
  47269. /* istanbul ignore next */
  47270. infinite_scroll_src_main.install = function (Vue) {
  47271. Vue.directive(infinite_scroll_src_main.name, infinite_scroll_src_main);
  47272. };
  47273. /* harmony default export */ var infinite_scroll = (infinite_scroll_src_main);
  47274. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/page-header/src/main.vue?vue&type=template&id=5070954c&
  47275. var mainvue_type_template_id_5070954c_render = function() {
  47276. var _vm = this
  47277. var _h = _vm.$createElement
  47278. var _c = _vm._self._c || _h
  47279. return _c("div", { staticClass: "el-page-header" }, [
  47280. _c(
  47281. "div",
  47282. {
  47283. staticClass: "el-page-header__left",
  47284. on: {
  47285. click: function($event) {
  47286. _vm.$emit("back")
  47287. }
  47288. }
  47289. },
  47290. [
  47291. _c("i", { staticClass: "el-icon-back" }),
  47292. _c(
  47293. "div",
  47294. { staticClass: "el-page-header__title" },
  47295. [_vm._t("title", [_vm._v(_vm._s(_vm.title))])],
  47296. 2
  47297. )
  47298. ]
  47299. ),
  47300. _c(
  47301. "div",
  47302. { staticClass: "el-page-header__content" },
  47303. [_vm._t("content", [_vm._v(_vm._s(_vm.content))])],
  47304. 2
  47305. )
  47306. ])
  47307. }
  47308. var mainvue_type_template_id_5070954c_staticRenderFns = []
  47309. mainvue_type_template_id_5070954c_render._withStripped = true
  47310. // CONCATENATED MODULE: ./packages/page-header/src/main.vue?vue&type=template&id=5070954c&
  47311. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/page-header/src/main.vue?vue&type=script&lang=js&
  47312. //
  47313. //
  47314. //
  47315. //
  47316. //
  47317. //
  47318. //
  47319. //
  47320. //
  47321. //
  47322. //
  47323. //
  47324. //
  47325. //
  47326. /* harmony default export */ var page_header_src_mainvue_type_script_lang_js_ = ({
  47327. name: 'ElPageHeader',
  47328. props: {
  47329. title: {
  47330. type: String,
  47331. default: function _default() {
  47332. return Object(lib_locale_["t"])('el.pageHeader.title');
  47333. }
  47334. },
  47335. content: String
  47336. }
  47337. });
  47338. // CONCATENATED MODULE: ./packages/page-header/src/main.vue?vue&type=script&lang=js&
  47339. /* harmony default export */ var packages_page_header_src_mainvue_type_script_lang_js_ = (page_header_src_mainvue_type_script_lang_js_);
  47340. // CONCATENATED MODULE: ./packages/page-header/src/main.vue
  47341. /* normalize component */
  47342. var page_header_src_main_component = normalizeComponent(
  47343. packages_page_header_src_mainvue_type_script_lang_js_,
  47344. mainvue_type_template_id_5070954c_render,
  47345. mainvue_type_template_id_5070954c_staticRenderFns,
  47346. false,
  47347. null,
  47348. null,
  47349. null
  47350. )
  47351. /* hot reload */
  47352. if (false) { var page_header_src_main_api; }
  47353. page_header_src_main_component.options.__file = "packages/page-header/src/main.vue"
  47354. /* harmony default export */ var page_header_src_main = (page_header_src_main_component.exports);
  47355. // CONCATENATED MODULE: ./packages/page-header/index.js
  47356. /* istanbul ignore next */
  47357. page_header_src_main.install = function (Vue) {
  47358. Vue.component(page_header_src_main.name, page_header_src_main);
  47359. };
  47360. /* harmony default export */ var page_header = (page_header_src_main);
  47361. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
  47362. var cascader_panelvue_type_template_id_34932346_render = function() {
  47363. var _vm = this
  47364. var _h = _vm.$createElement
  47365. var _c = _vm._self._c || _h
  47366. return _c(
  47367. "div",
  47368. {
  47369. class: ["el-cascader-panel", _vm.border && "is-bordered"],
  47370. on: { keydown: _vm.handleKeyDown }
  47371. },
  47372. _vm._l(_vm.menus, function(menu, index) {
  47373. return _c("cascader-menu", {
  47374. key: index,
  47375. ref: "menu",
  47376. refInFor: true,
  47377. attrs: { index: index, nodes: menu }
  47378. })
  47379. }),
  47380. 1
  47381. )
  47382. }
  47383. var cascader_panelvue_type_template_id_34932346_staticRenderFns = []
  47384. cascader_panelvue_type_template_id_34932346_render._withStripped = true
  47385. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
  47386. // EXTERNAL MODULE: external "element-ui/lib/radio"
  47387. var radio_ = __webpack_require__(43);
  47388. var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
  47389. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
  47390. var stopPropagation = function stopPropagation(e) {
  47391. return e.stopPropagation();
  47392. };
  47393. /* harmony default export */ var cascader_nodevue_type_script_lang_js_ = ({
  47394. inject: ['panel'],
  47395. components: {
  47396. ElCheckbox: checkbox_default.a,
  47397. ElRadio: radio_default.a
  47398. },
  47399. props: {
  47400. node: {
  47401. required: true
  47402. },
  47403. nodeId: String
  47404. },
  47405. computed: {
  47406. config: function config() {
  47407. return this.panel.config;
  47408. },
  47409. isLeaf: function isLeaf() {
  47410. return this.node.isLeaf;
  47411. },
  47412. isDisabled: function isDisabled() {
  47413. return this.node.isDisabled;
  47414. },
  47415. checkedValue: function checkedValue() {
  47416. return this.panel.checkedValue;
  47417. },
  47418. isChecked: function isChecked() {
  47419. return this.node.isSameNode(this.checkedValue);
  47420. },
  47421. inActivePath: function inActivePath() {
  47422. return this.isInPath(this.panel.activePath);
  47423. },
  47424. inCheckedPath: function inCheckedPath() {
  47425. var _this = this;
  47426. if (!this.config.checkStrictly) return false;
  47427. return this.panel.checkedNodePaths.some(function (checkedPath) {
  47428. return _this.isInPath(checkedPath);
  47429. });
  47430. },
  47431. value: function value() {
  47432. return this.node.getValueByOption();
  47433. }
  47434. },
  47435. methods: {
  47436. handleExpand: function handleExpand() {
  47437. var _this2 = this;
  47438. var panel = this.panel,
  47439. node = this.node,
  47440. isDisabled = this.isDisabled,
  47441. config = this.config;
  47442. var multiple = config.multiple,
  47443. checkStrictly = config.checkStrictly;
  47444. if (!checkStrictly && isDisabled || node.loading) return;
  47445. if (config.lazy && !node.loaded) {
  47446. panel.lazyLoad(node, function () {
  47447. // do not use cached leaf value here, invoke this.isLeaf to get new value.
  47448. var isLeaf = _this2.isLeaf;
  47449. if (!isLeaf) _this2.handleExpand();
  47450. if (multiple) {
  47451. // if leaf sync checked state, else clear checked state
  47452. var checked = isLeaf ? node.checked : false;
  47453. _this2.handleMultiCheckChange(checked);
  47454. }
  47455. });
  47456. } else {
  47457. panel.handleExpand(node);
  47458. }
  47459. },
  47460. handleCheckChange: function handleCheckChange() {
  47461. var panel = this.panel,
  47462. value = this.value,
  47463. node = this.node;
  47464. panel.handleCheckChange(value);
  47465. panel.handleExpand(node);
  47466. },
  47467. handleMultiCheckChange: function handleMultiCheckChange(checked) {
  47468. this.node.doCheck(checked);
  47469. this.panel.calculateMultiCheckedValue();
  47470. },
  47471. isInPath: function isInPath(pathNodes) {
  47472. var node = this.node;
  47473. var selectedPathNode = pathNodes[node.level - 1] || {};
  47474. return selectedPathNode.uid === node.uid;
  47475. },
  47476. renderPrefix: function renderPrefix(h) {
  47477. var isLeaf = this.isLeaf,
  47478. isChecked = this.isChecked,
  47479. config = this.config;
  47480. var checkStrictly = config.checkStrictly,
  47481. multiple = config.multiple;
  47482. if (multiple) {
  47483. return this.renderCheckbox(h);
  47484. } else if (checkStrictly) {
  47485. return this.renderRadio(h);
  47486. } else if (isLeaf && isChecked) {
  47487. return this.renderCheckIcon(h);
  47488. }
  47489. return null;
  47490. },
  47491. renderPostfix: function renderPostfix(h) {
  47492. var node = this.node,
  47493. isLeaf = this.isLeaf;
  47494. if (node.loading) {
  47495. return this.renderLoadingIcon(h);
  47496. } else if (!isLeaf) {
  47497. return this.renderExpandIcon(h);
  47498. }
  47499. return null;
  47500. },
  47501. renderCheckbox: function renderCheckbox(h) {
  47502. var node = this.node,
  47503. config = this.config,
  47504. isDisabled = this.isDisabled;
  47505. var events = {
  47506. on: { change: this.handleMultiCheckChange },
  47507. nativeOn: {}
  47508. };
  47509. if (config.checkStrictly) {
  47510. // when every node is selectable, click event should not trigger expand event.
  47511. events.nativeOn.click = stopPropagation;
  47512. }
  47513. return h('el-checkbox', external_babel_helper_vue_jsx_merge_props_default()([{
  47514. attrs: {
  47515. value: node.checked,
  47516. indeterminate: node.indeterminate,
  47517. disabled: isDisabled
  47518. }
  47519. }, events]));
  47520. },
  47521. renderRadio: function renderRadio(h) {
  47522. var checkedValue = this.checkedValue,
  47523. value = this.value,
  47524. isDisabled = this.isDisabled;
  47525. // to keep same reference if value cause radio's checked state is calculated by reference comparision;
  47526. if (Object(util_["isEqual"])(value, checkedValue)) {
  47527. value = checkedValue;
  47528. }
  47529. return h(
  47530. 'el-radio',
  47531. {
  47532. attrs: {
  47533. value: checkedValue,
  47534. label: value,
  47535. disabled: isDisabled
  47536. },
  47537. on: {
  47538. 'change': this.handleCheckChange
  47539. },
  47540. nativeOn: {
  47541. 'click': stopPropagation
  47542. }
  47543. },
  47544. [h('span')]
  47545. );
  47546. },
  47547. renderCheckIcon: function renderCheckIcon(h) {
  47548. return h('i', { 'class': 'el-icon-check el-cascader-node__prefix' });
  47549. },
  47550. renderLoadingIcon: function renderLoadingIcon(h) {
  47551. return h('i', { 'class': 'el-icon-loading el-cascader-node__postfix' });
  47552. },
  47553. renderExpandIcon: function renderExpandIcon(h) {
  47554. return h('i', { 'class': 'el-icon-arrow-right el-cascader-node__postfix' });
  47555. },
  47556. renderContent: function renderContent(h) {
  47557. var panel = this.panel,
  47558. node = this.node;
  47559. var render = panel.renderLabelFn;
  47560. var vnode = render ? render({ node: node, data: node.data }) : null;
  47561. return h(
  47562. 'span',
  47563. { 'class': 'el-cascader-node__label' },
  47564. [vnode || node.label]
  47565. );
  47566. }
  47567. },
  47568. render: function render(h) {
  47569. var _this3 = this;
  47570. var inActivePath = this.inActivePath,
  47571. inCheckedPath = this.inCheckedPath,
  47572. isChecked = this.isChecked,
  47573. isLeaf = this.isLeaf,
  47574. isDisabled = this.isDisabled,
  47575. config = this.config,
  47576. nodeId = this.nodeId;
  47577. var expandTrigger = config.expandTrigger,
  47578. checkStrictly = config.checkStrictly,
  47579. multiple = config.multiple;
  47580. var disabled = !checkStrictly && isDisabled;
  47581. var events = { on: {} };
  47582. if (expandTrigger === 'click') {
  47583. events.on.click = this.handleExpand;
  47584. } else {
  47585. events.on.mouseenter = function (e) {
  47586. _this3.handleExpand();
  47587. _this3.$emit('expand', e);
  47588. };
  47589. events.on.focus = function (e) {
  47590. _this3.handleExpand();
  47591. _this3.$emit('expand', e);
  47592. };
  47593. }
  47594. if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
  47595. events.on.click = this.handleCheckChange;
  47596. }
  47597. return h(
  47598. 'li',
  47599. external_babel_helper_vue_jsx_merge_props_default()([{
  47600. attrs: {
  47601. role: 'menuitem',
  47602. id: nodeId,
  47603. 'aria-expanded': inActivePath,
  47604. tabindex: disabled ? null : -1
  47605. },
  47606. 'class': {
  47607. 'el-cascader-node': true,
  47608. 'is-selectable': checkStrictly,
  47609. 'in-active-path': inActivePath,
  47610. 'in-checked-path': inCheckedPath,
  47611. 'is-active': isChecked,
  47612. 'is-disabled': disabled
  47613. }
  47614. }, events]),
  47615. [this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]
  47616. );
  47617. }
  47618. });
  47619. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
  47620. /* harmony default export */ var src_cascader_nodevue_type_script_lang_js_ = (cascader_nodevue_type_script_lang_js_);
  47621. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue
  47622. var cascader_node_render, cascader_node_staticRenderFns
  47623. /* normalize component */
  47624. var cascader_node_component = normalizeComponent(
  47625. src_cascader_nodevue_type_script_lang_js_,
  47626. cascader_node_render,
  47627. cascader_node_staticRenderFns,
  47628. false,
  47629. null,
  47630. null,
  47631. null
  47632. )
  47633. /* hot reload */
  47634. if (false) { var cascader_node_api; }
  47635. cascader_node_component.options.__file = "packages/cascader-panel/src/cascader-node.vue"
  47636. /* harmony default export */ var cascader_node = (cascader_node_component.exports);
  47637. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
  47638. /* harmony default export */ var cascader_menuvue_type_script_lang_js_ = ({
  47639. name: 'ElCascaderMenu',
  47640. mixins: [locale_default.a],
  47641. inject: ['panel'],
  47642. components: {
  47643. ElScrollbar: scrollbar_default.a,
  47644. CascaderNode: cascader_node
  47645. },
  47646. props: {
  47647. nodes: {
  47648. type: Array,
  47649. required: true
  47650. },
  47651. index: Number
  47652. },
  47653. data: function data() {
  47654. return {
  47655. activeNode: null,
  47656. hoverTimer: null,
  47657. id: Object(util_["generateId"])()
  47658. };
  47659. },
  47660. computed: {
  47661. isEmpty: function isEmpty() {
  47662. return !this.nodes.length;
  47663. },
  47664. menuId: function menuId() {
  47665. return 'cascader-menu-' + this.id + '-' + this.index;
  47666. }
  47667. },
  47668. methods: {
  47669. handleExpand: function handleExpand(e) {
  47670. this.activeNode = e.target;
  47671. },
  47672. handleMouseMove: function handleMouseMove(e) {
  47673. var activeNode = this.activeNode,
  47674. hoverTimer = this.hoverTimer;
  47675. var hoverZone = this.$refs.hoverZone;
  47676. if (!activeNode || !hoverZone) return;
  47677. if (activeNode.contains(e.target)) {
  47678. clearTimeout(hoverTimer);
  47679. var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
  47680. left = _$el$getBoundingClien.left;
  47681. var startX = e.clientX - left;
  47682. var _$el = this.$el,
  47683. offsetWidth = _$el.offsetWidth,
  47684. offsetHeight = _$el.offsetHeight;
  47685. var top = activeNode.offsetTop;
  47686. var bottom = top + activeNode.offsetHeight;
  47687. hoverZone.innerHTML = '\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + top + ' L' + offsetWidth + ' 0 V' + top + ' Z" />\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + bottom + ' L' + offsetWidth + ' ' + offsetHeight + ' V' + bottom + ' Z" />\n ';
  47688. } else if (!hoverTimer) {
  47689. this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);
  47690. }
  47691. },
  47692. clearHoverZone: function clearHoverZone() {
  47693. var hoverZone = this.$refs.hoverZone;
  47694. if (!hoverZone) return;
  47695. hoverZone.innerHTML = '';
  47696. },
  47697. renderEmptyText: function renderEmptyText(h) {
  47698. return h(
  47699. 'div',
  47700. { 'class': 'el-cascader-menu__empty-text' },
  47701. [this.t('el.cascader.noData')]
  47702. );
  47703. },
  47704. renderNodeList: function renderNodeList(h) {
  47705. var menuId = this.menuId;
  47706. var isHoverMenu = this.panel.isHoverMenu;
  47707. var events = { on: {} };
  47708. if (isHoverMenu) {
  47709. events.on.expand = this.handleExpand;
  47710. }
  47711. var nodes = this.nodes.map(function (node, index) {
  47712. var hasChildren = node.hasChildren;
  47713. return h('cascader-node', external_babel_helper_vue_jsx_merge_props_default()([{
  47714. key: node.uid,
  47715. attrs: { node: node,
  47716. 'node-id': menuId + '-' + index,
  47717. 'aria-haspopup': hasChildren,
  47718. 'aria-owns': hasChildren ? menuId : null
  47719. }
  47720. }, events]));
  47721. });
  47722. return [].concat(nodes, [isHoverMenu ? h('svg', { ref: 'hoverZone', 'class': 'el-cascader-menu__hover-zone' }) : null]);
  47723. }
  47724. },
  47725. render: function render(h) {
  47726. var isEmpty = this.isEmpty,
  47727. menuId = this.menuId;
  47728. var events = { nativeOn: {} };
  47729. // optimize hover to expand experience (#8010)
  47730. if (this.panel.isHoverMenu) {
  47731. events.nativeOn.mousemove = this.handleMouseMove;
  47732. // events.nativeOn.mouseleave = this.clearHoverZone;
  47733. }
  47734. return h(
  47735. 'el-scrollbar',
  47736. external_babel_helper_vue_jsx_merge_props_default()([{
  47737. attrs: {
  47738. tag: 'ul',
  47739. role: 'menu',
  47740. id: menuId,
  47741. 'wrap-class': 'el-cascader-menu__wrap',
  47742. 'view-class': {
  47743. 'el-cascader-menu__list': true,
  47744. 'is-empty': isEmpty
  47745. }
  47746. },
  47747. 'class': 'el-cascader-menu' }, events]),
  47748. [isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]
  47749. );
  47750. }
  47751. });
  47752. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
  47753. /* harmony default export */ var src_cascader_menuvue_type_script_lang_js_ = (cascader_menuvue_type_script_lang_js_);
  47754. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue
  47755. var cascader_menu_render, cascader_menu_staticRenderFns
  47756. /* normalize component */
  47757. var cascader_menu_component = normalizeComponent(
  47758. src_cascader_menuvue_type_script_lang_js_,
  47759. cascader_menu_render,
  47760. cascader_menu_staticRenderFns,
  47761. false,
  47762. null,
  47763. null,
  47764. null
  47765. )
  47766. /* hot reload */
  47767. if (false) { var cascader_menu_api; }
  47768. cascader_menu_component.options.__file = "packages/cascader-panel/src/cascader-menu.vue"
  47769. /* harmony default export */ var cascader_menu = (cascader_menu_component.exports);
  47770. // CONCATENATED MODULE: ./packages/cascader-panel/src/node.js
  47771. var node_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  47772. function src_node_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  47773. var uid = 0;
  47774. var src_node_Node = function () {
  47775. function Node(data, config, parentNode) {
  47776. src_node_classCallCheck(this, Node);
  47777. this.data = data;
  47778. this.config = config;
  47779. this.parent = parentNode || null;
  47780. this.level = !this.parent ? 1 : this.parent.level + 1;
  47781. this.uid = uid++;
  47782. this.initState();
  47783. this.initChildren();
  47784. }
  47785. Node.prototype.initState = function initState() {
  47786. var _config = this.config,
  47787. valueKey = _config.value,
  47788. labelKey = _config.label;
  47789. this.value = this.data[valueKey];
  47790. this.label = this.data[labelKey];
  47791. this.pathNodes = this.calculatePathNodes();
  47792. this.path = this.pathNodes.map(function (node) {
  47793. return node.value;
  47794. });
  47795. this.pathLabels = this.pathNodes.map(function (node) {
  47796. return node.label;
  47797. });
  47798. // lazy load
  47799. this.loading = false;
  47800. this.loaded = false;
  47801. };
  47802. Node.prototype.initChildren = function initChildren() {
  47803. var _this = this;
  47804. var config = this.config;
  47805. var childrenKey = config.children;
  47806. var childrenData = this.data[childrenKey];
  47807. this.hasChildren = Array.isArray(childrenData);
  47808. this.children = (childrenData || []).map(function (child) {
  47809. return new Node(child, config, _this);
  47810. });
  47811. };
  47812. Node.prototype.calculatePathNodes = function calculatePathNodes() {
  47813. var nodes = [this];
  47814. var parent = this.parent;
  47815. while (parent) {
  47816. nodes.unshift(parent);
  47817. parent = parent.parent;
  47818. }
  47819. return nodes;
  47820. };
  47821. Node.prototype.getPath = function getPath() {
  47822. return this.path;
  47823. };
  47824. Node.prototype.getValue = function getValue() {
  47825. return this.value;
  47826. };
  47827. Node.prototype.getValueByOption = function getValueByOption() {
  47828. return this.config.emitPath ? this.getPath() : this.getValue();
  47829. };
  47830. Node.prototype.getText = function getText(allLevels, separator) {
  47831. return allLevels ? this.pathLabels.join(separator) : this.label;
  47832. };
  47833. Node.prototype.isSameNode = function isSameNode(checkedValue) {
  47834. var value = this.getValueByOption();
  47835. return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(function (val) {
  47836. return Object(util_["isEqual"])(val, value);
  47837. }) : Object(util_["isEqual"])(checkedValue, value);
  47838. };
  47839. Node.prototype.broadcast = function broadcast(event) {
  47840. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  47841. args[_key - 1] = arguments[_key];
  47842. }
  47843. var handlerName = 'onParent' + Object(util_["capitalize"])(event);
  47844. this.children.forEach(function (child) {
  47845. if (child) {
  47846. // bottom up
  47847. child.broadcast.apply(child, [event].concat(args));
  47848. child[handlerName] && child[handlerName].apply(child, args);
  47849. }
  47850. });
  47851. };
  47852. Node.prototype.emit = function emit(event) {
  47853. var parent = this.parent;
  47854. var handlerName = 'onChild' + Object(util_["capitalize"])(event);
  47855. if (parent) {
  47856. for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  47857. args[_key2 - 1] = arguments[_key2];
  47858. }
  47859. parent[handlerName] && parent[handlerName].apply(parent, args);
  47860. parent.emit.apply(parent, [event].concat(args));
  47861. }
  47862. };
  47863. Node.prototype.onParentCheck = function onParentCheck(checked) {
  47864. if (!this.isDisabled) {
  47865. this.setCheckState(checked);
  47866. }
  47867. };
  47868. Node.prototype.onChildCheck = function onChildCheck() {
  47869. var children = this.children;
  47870. var validChildren = children.filter(function (child) {
  47871. return !child.isDisabled;
  47872. });
  47873. var checked = validChildren.length ? validChildren.every(function (child) {
  47874. return child.checked;
  47875. }) : false;
  47876. this.setCheckState(checked);
  47877. };
  47878. Node.prototype.setCheckState = function setCheckState(checked) {
  47879. var totalNum = this.children.length;
  47880. var checkedNum = this.children.reduce(function (c, p) {
  47881. var num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
  47882. return c + num;
  47883. }, 0);
  47884. this.checked = checked;
  47885. this.indeterminate = checkedNum !== totalNum && checkedNum > 0;
  47886. };
  47887. Node.prototype.syncCheckState = function syncCheckState(checkedValue) {
  47888. var value = this.getValueByOption();
  47889. var checked = this.isSameNode(checkedValue, value);
  47890. this.doCheck(checked);
  47891. };
  47892. Node.prototype.doCheck = function doCheck(checked) {
  47893. if (this.checked !== checked) {
  47894. if (this.config.checkStrictly) {
  47895. this.checked = checked;
  47896. } else {
  47897. // bottom up to unify the calculation of the indeterminate state
  47898. this.broadcast('check', checked);
  47899. this.setCheckState(checked);
  47900. this.emit('check');
  47901. }
  47902. }
  47903. };
  47904. node_createClass(Node, [{
  47905. key: 'isDisabled',
  47906. get: function get() {
  47907. var data = this.data,
  47908. parent = this.parent,
  47909. config = this.config;
  47910. var disabledKey = config.disabled;
  47911. var checkStrictly = config.checkStrictly;
  47912. return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;
  47913. }
  47914. }, {
  47915. key: 'isLeaf',
  47916. get: function get() {
  47917. var data = this.data,
  47918. loaded = this.loaded,
  47919. hasChildren = this.hasChildren,
  47920. children = this.children;
  47921. var _config2 = this.config,
  47922. lazy = _config2.lazy,
  47923. leafKey = _config2.leaf;
  47924. if (lazy) {
  47925. var isLeaf = Object(shared_["isDef"])(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;
  47926. this.hasChildren = !isLeaf;
  47927. return isLeaf;
  47928. }
  47929. return !hasChildren;
  47930. }
  47931. }]);
  47932. return Node;
  47933. }();
  47934. /* harmony default export */ var src_node = (src_node_Node);
  47935. // CONCATENATED MODULE: ./packages/cascader-panel/src/store.js
  47936. function store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  47937. var flatNodes = function flatNodes(data, leafOnly) {
  47938. return data.reduce(function (res, node) {
  47939. if (node.isLeaf) {
  47940. res.push(node);
  47941. } else {
  47942. !leafOnly && res.push(node);
  47943. res = res.concat(flatNodes(node.children, leafOnly));
  47944. }
  47945. return res;
  47946. }, []);
  47947. };
  47948. var store_Store = function () {
  47949. function Store(data, config) {
  47950. store_classCallCheck(this, Store);
  47951. this.config = config;
  47952. this.initNodes(data);
  47953. }
  47954. Store.prototype.initNodes = function initNodes(data) {
  47955. var _this = this;
  47956. data = Object(util_["coerceTruthyValueToArray"])(data);
  47957. this.nodes = data.map(function (nodeData) {
  47958. return new src_node(nodeData, _this.config);
  47959. });
  47960. this.flattedNodes = this.getFlattedNodes(false, false);
  47961. this.leafNodes = this.getFlattedNodes(true, false);
  47962. };
  47963. Store.prototype.appendNode = function appendNode(nodeData, parentNode) {
  47964. var node = new src_node(nodeData, this.config, parentNode);
  47965. var children = parentNode ? parentNode.children : this.nodes;
  47966. children.push(node);
  47967. };
  47968. Store.prototype.appendNodes = function appendNodes(nodeDataList, parentNode) {
  47969. var _this2 = this;
  47970. nodeDataList = Object(util_["coerceTruthyValueToArray"])(nodeDataList);
  47971. nodeDataList.forEach(function (nodeData) {
  47972. return _this2.appendNode(nodeData, parentNode);
  47973. });
  47974. };
  47975. Store.prototype.getNodes = function getNodes() {
  47976. return this.nodes;
  47977. };
  47978. Store.prototype.getFlattedNodes = function getFlattedNodes(leafOnly) {
  47979. var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  47980. var cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;
  47981. return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);
  47982. };
  47983. Store.prototype.getNodeByValue = function getNodeByValue(value) {
  47984. var nodes = this.getFlattedNodes(false, !this.config.lazy).filter(function (node) {
  47985. return Object(util_["valueEquals"])(node.path, value) || node.value === value;
  47986. });
  47987. return nodes && nodes.length ? nodes[0] : null;
  47988. };
  47989. return Store;
  47990. }();
  47991. /* harmony default export */ var cascader_panel_src_store = (store_Store);
  47992. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
  47993. var cascader_panelvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  47994. //
  47995. //
  47996. //
  47997. //
  47998. //
  47999. //
  48000. //
  48001. //
  48002. //
  48003. //
  48004. //
  48005. //
  48006. //
  48007. //
  48008. //
  48009. //
  48010. var cascader_panelvue_type_script_lang_js_KeyCode = aria_utils_default.a.keys;
  48011. var DefaultProps = {
  48012. expandTrigger: 'click', // or hover
  48013. multiple: false,
  48014. checkStrictly: false, // whether all nodes can be selected
  48015. emitPath: true, // wether to emit an array of all levels value in which node is located
  48016. lazy: false,
  48017. lazyLoad: util_["noop"],
  48018. value: 'value',
  48019. label: 'label',
  48020. children: 'children',
  48021. leaf: 'leaf',
  48022. disabled: 'disabled',
  48023. hoverThreshold: 500
  48024. };
  48025. var cascader_panelvue_type_script_lang_js_isLeaf = function isLeaf(el) {
  48026. return !el.getAttribute('aria-owns');
  48027. };
  48028. var getSibling = function getSibling(el, distance) {
  48029. var parentNode = el.parentNode;
  48030. if (parentNode) {
  48031. var siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex="-1"]');
  48032. var index = Array.prototype.indexOf.call(siblings, el);
  48033. return siblings[index + distance] || null;
  48034. }
  48035. return null;
  48036. };
  48037. var getMenuIndex = function getMenuIndex(el, distance) {
  48038. if (!el) return;
  48039. var pieces = el.id.split('-');
  48040. return Number(pieces[pieces.length - 2]);
  48041. };
  48042. var focusNode = function focusNode(el) {
  48043. if (!el) return;
  48044. el.focus();
  48045. !cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();
  48046. };
  48047. var checkNode = function checkNode(el) {
  48048. if (!el) return;
  48049. var input = el.querySelector('input');
  48050. if (input) {
  48051. input.click();
  48052. } else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {
  48053. el.click();
  48054. }
  48055. };
  48056. /* harmony default export */ var cascader_panelvue_type_script_lang_js_ = ({
  48057. name: 'ElCascaderPanel',
  48058. components: {
  48059. CascaderMenu: cascader_menu
  48060. },
  48061. props: {
  48062. value: {},
  48063. options: Array,
  48064. props: Object,
  48065. border: {
  48066. type: Boolean,
  48067. default: true
  48068. },
  48069. renderLabel: Function
  48070. },
  48071. provide: function provide() {
  48072. return {
  48073. panel: this
  48074. };
  48075. },
  48076. data: function data() {
  48077. return {
  48078. checkedValue: null,
  48079. checkedNodePaths: [],
  48080. store: [],
  48081. menus: [],
  48082. activePath: [],
  48083. loadCount: 0
  48084. };
  48085. },
  48086. computed: {
  48087. config: function config() {
  48088. return merge_default()(cascader_panelvue_type_script_lang_js_extends({}, DefaultProps), this.props || {});
  48089. },
  48090. multiple: function multiple() {
  48091. return this.config.multiple;
  48092. },
  48093. checkStrictly: function checkStrictly() {
  48094. return this.config.checkStrictly;
  48095. },
  48096. leafOnly: function leafOnly() {
  48097. return !this.checkStrictly;
  48098. },
  48099. isHoverMenu: function isHoverMenu() {
  48100. return this.config.expandTrigger === 'hover';
  48101. },
  48102. renderLabelFn: function renderLabelFn() {
  48103. return this.renderLabel || this.$scopedSlots.default;
  48104. }
  48105. },
  48106. watch: {
  48107. options: {
  48108. handler: function handler() {
  48109. this.initStore();
  48110. },
  48111. immediate: true,
  48112. deep: true
  48113. },
  48114. value: function value() {
  48115. this.syncCheckedValue();
  48116. this.checkStrictly && this.calculateCheckedNodePaths();
  48117. },
  48118. checkedValue: function checkedValue(val) {
  48119. if (!Object(util_["isEqual"])(val, this.value)) {
  48120. this.checkStrictly && this.calculateCheckedNodePaths();
  48121. this.$emit('input', val);
  48122. this.$emit('change', val);
  48123. }
  48124. }
  48125. },
  48126. mounted: function mounted() {
  48127. if (!this.isEmptyValue(this.value)) {
  48128. this.syncCheckedValue();
  48129. }
  48130. },
  48131. methods: {
  48132. initStore: function initStore() {
  48133. var config = this.config,
  48134. options = this.options;
  48135. if (config.lazy && Object(util_["isEmpty"])(options)) {
  48136. this.lazyLoad();
  48137. } else {
  48138. this.store = new cascader_panel_src_store(options, config);
  48139. this.menus = [this.store.getNodes()];
  48140. this.syncMenuState();
  48141. }
  48142. },
  48143. syncCheckedValue: function syncCheckedValue() {
  48144. var value = this.value,
  48145. checkedValue = this.checkedValue;
  48146. if (!Object(util_["isEqual"])(value, checkedValue)) {
  48147. this.activePath = [];
  48148. this.checkedValue = value;
  48149. this.syncMenuState();
  48150. }
  48151. },
  48152. syncMenuState: function syncMenuState() {
  48153. var multiple = this.multiple,
  48154. checkStrictly = this.checkStrictly;
  48155. this.syncActivePath();
  48156. multiple && this.syncMultiCheckState();
  48157. checkStrictly && this.calculateCheckedNodePaths();
  48158. this.$nextTick(this.scrollIntoView);
  48159. },
  48160. syncMultiCheckState: function syncMultiCheckState() {
  48161. var _this = this;
  48162. var nodes = this.getFlattedNodes(this.leafOnly);
  48163. nodes.forEach(function (node) {
  48164. node.syncCheckState(_this.checkedValue);
  48165. });
  48166. },
  48167. isEmptyValue: function isEmptyValue(val) {
  48168. var multiple = this.multiple,
  48169. config = this.config;
  48170. var emitPath = config.emitPath;
  48171. if (multiple || emitPath) {
  48172. return Object(util_["isEmpty"])(val);
  48173. }
  48174. return false;
  48175. },
  48176. syncActivePath: function syncActivePath() {
  48177. var _this2 = this;
  48178. var store = this.store,
  48179. multiple = this.multiple,
  48180. activePath = this.activePath,
  48181. checkedValue = this.checkedValue;
  48182. if (!Object(util_["isEmpty"])(activePath)) {
  48183. var nodes = activePath.map(function (node) {
  48184. return _this2.getNodeByValue(node.getValue());
  48185. });
  48186. this.expandNodes(nodes);
  48187. } else if (!this.isEmptyValue(checkedValue)) {
  48188. var value = multiple ? checkedValue[0] : checkedValue;
  48189. var checkedNode = this.getNodeByValue(value) || {};
  48190. var _nodes = (checkedNode.pathNodes || []).slice(0, -1);
  48191. this.expandNodes(_nodes);
  48192. } else {
  48193. this.activePath = [];
  48194. this.menus = [store.getNodes()];
  48195. }
  48196. },
  48197. expandNodes: function expandNodes(nodes) {
  48198. var _this3 = this;
  48199. nodes.forEach(function (node) {
  48200. return _this3.handleExpand(node, true /* silent */);
  48201. });
  48202. },
  48203. calculateCheckedNodePaths: function calculateCheckedNodePaths() {
  48204. var _this4 = this;
  48205. var checkedValue = this.checkedValue,
  48206. multiple = this.multiple;
  48207. var checkedValues = multiple ? Object(util_["coerceTruthyValueToArray"])(checkedValue) : [checkedValue];
  48208. this.checkedNodePaths = checkedValues.map(function (v) {
  48209. var checkedNode = _this4.getNodeByValue(v);
  48210. return checkedNode ? checkedNode.pathNodes : [];
  48211. });
  48212. },
  48213. handleKeyDown: function handleKeyDown(e) {
  48214. var target = e.target,
  48215. keyCode = e.keyCode;
  48216. switch (keyCode) {
  48217. case cascader_panelvue_type_script_lang_js_KeyCode.up:
  48218. var prev = getSibling(target, -1);
  48219. focusNode(prev);
  48220. break;
  48221. case cascader_panelvue_type_script_lang_js_KeyCode.down:
  48222. var next = getSibling(target, 1);
  48223. focusNode(next);
  48224. break;
  48225. case cascader_panelvue_type_script_lang_js_KeyCode.left:
  48226. var preMenu = this.$refs.menu[getMenuIndex(target) - 1];
  48227. if (preMenu) {
  48228. var expandedNode = preMenu.$el.querySelector('.el-cascader-node[aria-expanded="true"]');
  48229. focusNode(expandedNode);
  48230. }
  48231. break;
  48232. case cascader_panelvue_type_script_lang_js_KeyCode.right:
  48233. var nextMenu = this.$refs.menu[getMenuIndex(target) + 1];
  48234. if (nextMenu) {
  48235. var firstNode = nextMenu.$el.querySelector('.el-cascader-node[tabindex="-1"]');
  48236. focusNode(firstNode);
  48237. }
  48238. break;
  48239. case cascader_panelvue_type_script_lang_js_KeyCode.enter:
  48240. checkNode(target);
  48241. break;
  48242. case cascader_panelvue_type_script_lang_js_KeyCode.esc:
  48243. case cascader_panelvue_type_script_lang_js_KeyCode.tab:
  48244. this.$emit('close');
  48245. break;
  48246. default:
  48247. return;
  48248. }
  48249. },
  48250. handleExpand: function handleExpand(node, silent) {
  48251. var activePath = this.activePath;
  48252. var level = node.level;
  48253. var path = activePath.slice(0, level - 1);
  48254. var menus = this.menus.slice(0, level);
  48255. if (!node.isLeaf) {
  48256. path.push(node);
  48257. menus.push(node.children);
  48258. }
  48259. this.activePath = path;
  48260. this.menus = menus;
  48261. if (!silent) {
  48262. var pathValues = path.map(function (node) {
  48263. return node.getValue();
  48264. });
  48265. var activePathValues = activePath.map(function (node) {
  48266. return node.getValue();
  48267. });
  48268. if (!Object(util_["valueEquals"])(pathValues, activePathValues)) {
  48269. this.$emit('active-item-change', pathValues); // Deprecated
  48270. this.$emit('expand-change', pathValues);
  48271. }
  48272. }
  48273. },
  48274. handleCheckChange: function handleCheckChange(value) {
  48275. this.checkedValue = value;
  48276. },
  48277. lazyLoad: function lazyLoad(node, onFullfiled) {
  48278. var _this5 = this;
  48279. var config = this.config;
  48280. if (!node) {
  48281. node = node || { root: true, level: 0 };
  48282. this.store = new cascader_panel_src_store([], config);
  48283. this.menus = [this.store.getNodes()];
  48284. }
  48285. node.loading = true;
  48286. var resolve = function resolve(dataList) {
  48287. var parent = node.root ? null : node;
  48288. dataList && dataList.length && _this5.store.appendNodes(dataList, parent);
  48289. node.loading = false;
  48290. node.loaded = true;
  48291. // dispose default value on lazy load mode
  48292. if (Array.isArray(_this5.checkedValue)) {
  48293. var nodeValue = _this5.checkedValue[_this5.loadCount++];
  48294. var valueKey = _this5.config.value;
  48295. var leafKey = _this5.config.leaf;
  48296. if (Array.isArray(dataList) && dataList.filter(function (item) {
  48297. return item[valueKey] === nodeValue;
  48298. }).length > 0) {
  48299. var checkedNode = _this5.store.getNodeByValue(nodeValue);
  48300. if (!checkedNode.data[leafKey]) {
  48301. _this5.lazyLoad(checkedNode, function () {
  48302. _this5.handleExpand(checkedNode);
  48303. });
  48304. }
  48305. if (_this5.loadCount === _this5.checkedValue.length) {
  48306. _this5.$parent.computePresentText();
  48307. }
  48308. }
  48309. }
  48310. onFullfiled && onFullfiled(dataList);
  48311. };
  48312. config.lazyLoad(node, resolve);
  48313. },
  48314. /**
  48315. * public methods
  48316. */
  48317. calculateMultiCheckedValue: function calculateMultiCheckedValue() {
  48318. this.checkedValue = this.getCheckedNodes(this.leafOnly).map(function (node) {
  48319. return node.getValueByOption();
  48320. });
  48321. },
  48322. scrollIntoView: function scrollIntoView() {
  48323. if (this.$isServer) return;
  48324. var menus = this.$refs.menu || [];
  48325. menus.forEach(function (menu) {
  48326. var menuElement = menu.$el;
  48327. if (menuElement) {
  48328. var container = menuElement.querySelector('.el-scrollbar__wrap');
  48329. var activeNode = menuElement.querySelector('.el-cascader-node.is-active') || menuElement.querySelector('.el-cascader-node.in-active-path');
  48330. scroll_into_view_default()(container, activeNode);
  48331. }
  48332. });
  48333. },
  48334. getNodeByValue: function getNodeByValue(val) {
  48335. return this.store.getNodeByValue(val);
  48336. },
  48337. getFlattedNodes: function getFlattedNodes(leafOnly) {
  48338. var cached = !this.config.lazy;
  48339. return this.store.getFlattedNodes(leafOnly, cached);
  48340. },
  48341. getCheckedNodes: function getCheckedNodes(leafOnly) {
  48342. var checkedValue = this.checkedValue,
  48343. multiple = this.multiple;
  48344. if (multiple) {
  48345. var nodes = this.getFlattedNodes(leafOnly);
  48346. return nodes.filter(function (node) {
  48347. return node.checked;
  48348. });
  48349. } else {
  48350. return this.isEmptyValue(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];
  48351. }
  48352. },
  48353. clearCheckedNodes: function clearCheckedNodes() {
  48354. var config = this.config,
  48355. leafOnly = this.leafOnly;
  48356. var multiple = config.multiple,
  48357. emitPath = config.emitPath;
  48358. if (multiple) {
  48359. this.getCheckedNodes(leafOnly).filter(function (node) {
  48360. return !node.isDisabled;
  48361. }).forEach(function (node) {
  48362. return node.doCheck(false);
  48363. });
  48364. this.calculateMultiCheckedValue();
  48365. } else {
  48366. this.checkedValue = emitPath ? [] : null;
  48367. }
  48368. }
  48369. }
  48370. });
  48371. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
  48372. /* harmony default export */ var src_cascader_panelvue_type_script_lang_js_ = (cascader_panelvue_type_script_lang_js_);
  48373. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue
  48374. /* normalize component */
  48375. var cascader_panel_component = normalizeComponent(
  48376. src_cascader_panelvue_type_script_lang_js_,
  48377. cascader_panelvue_type_template_id_34932346_render,
  48378. cascader_panelvue_type_template_id_34932346_staticRenderFns,
  48379. false,
  48380. null,
  48381. null,
  48382. null
  48383. )
  48384. /* hot reload */
  48385. if (false) { var cascader_panel_api; }
  48386. cascader_panel_component.options.__file = "packages/cascader-panel/src/cascader-panel.vue"
  48387. /* harmony default export */ var cascader_panel = (cascader_panel_component.exports);
  48388. // CONCATENATED MODULE: ./packages/cascader-panel/index.js
  48389. /* istanbul ignore next */
  48390. cascader_panel.install = function (Vue) {
  48391. Vue.component(cascader_panel.name, cascader_panel);
  48392. };
  48393. /* harmony default export */ var packages_cascader_panel = (cascader_panel);
  48394. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/avatar/src/main.vue?vue&type=script&lang=js&
  48395. /* harmony default export */ var avatar_src_mainvue_type_script_lang_js_ = ({
  48396. name: 'ElAvatar',
  48397. props: {
  48398. size: {
  48399. type: [Number, String],
  48400. validator: function validator(val) {
  48401. if (typeof val === 'string') {
  48402. return ['large', 'medium', 'small'].includes(val);
  48403. }
  48404. return typeof val === 'number';
  48405. }
  48406. },
  48407. shape: {
  48408. type: String,
  48409. default: 'circle',
  48410. validator: function validator(val) {
  48411. return ['circle', 'square'].includes(val);
  48412. }
  48413. },
  48414. icon: String,
  48415. src: String,
  48416. alt: String,
  48417. srcSet: String,
  48418. error: Function,
  48419. fit: {
  48420. type: String,
  48421. default: 'cover'
  48422. }
  48423. },
  48424. data: function data() {
  48425. return {
  48426. isImageExist: true
  48427. };
  48428. },
  48429. computed: {
  48430. avatarClass: function avatarClass() {
  48431. var size = this.size,
  48432. icon = this.icon,
  48433. shape = this.shape;
  48434. var classList = ['el-avatar'];
  48435. if (size && typeof size === 'string') {
  48436. classList.push('el-avatar--' + size);
  48437. }
  48438. if (icon) {
  48439. classList.push('el-avatar--icon');
  48440. }
  48441. if (shape) {
  48442. classList.push('el-avatar--' + shape);
  48443. }
  48444. return classList.join(' ');
  48445. }
  48446. },
  48447. methods: {
  48448. handleError: function handleError() {
  48449. var error = this.error;
  48450. var errorFlag = error ? error() : undefined;
  48451. if (errorFlag !== false) {
  48452. this.isImageExist = false;
  48453. }
  48454. },
  48455. renderAvatar: function renderAvatar() {
  48456. var h = this.$createElement;
  48457. var icon = this.icon,
  48458. src = this.src,
  48459. alt = this.alt,
  48460. isImageExist = this.isImageExist,
  48461. srcSet = this.srcSet,
  48462. fit = this.fit;
  48463. if (isImageExist && src) {
  48464. return h('img', {
  48465. attrs: {
  48466. src: src,
  48467. alt: alt,
  48468. srcSet: srcSet
  48469. },
  48470. on: {
  48471. 'error': this.handleError
  48472. },
  48473. style: { 'object-fit': fit } });
  48474. }
  48475. if (icon) {
  48476. return h('i', { 'class': icon });
  48477. }
  48478. return this.$slots.default;
  48479. }
  48480. },
  48481. render: function render() {
  48482. var h = arguments[0];
  48483. var avatarClass = this.avatarClass,
  48484. size = this.size;
  48485. var sizeStyle = typeof size === 'number' ? {
  48486. height: size + 'px',
  48487. width: size + 'px',
  48488. lineHeight: size + 'px'
  48489. } : {};
  48490. return h(
  48491. 'span',
  48492. { 'class': avatarClass, style: sizeStyle },
  48493. [this.renderAvatar()]
  48494. );
  48495. }
  48496. });
  48497. // CONCATENATED MODULE: ./packages/avatar/src/main.vue?vue&type=script&lang=js&
  48498. /* harmony default export */ var packages_avatar_src_mainvue_type_script_lang_js_ = (avatar_src_mainvue_type_script_lang_js_);
  48499. // CONCATENATED MODULE: ./packages/avatar/src/main.vue
  48500. var src_main_render, src_main_staticRenderFns
  48501. /* normalize component */
  48502. var avatar_src_main_component = normalizeComponent(
  48503. packages_avatar_src_mainvue_type_script_lang_js_,
  48504. src_main_render,
  48505. src_main_staticRenderFns,
  48506. false,
  48507. null,
  48508. null,
  48509. null
  48510. )
  48511. /* hot reload */
  48512. if (false) { var avatar_src_main_api; }
  48513. avatar_src_main_component.options.__file = "packages/avatar/src/main.vue"
  48514. /* harmony default export */ var avatar_src_main = (avatar_src_main_component.exports);
  48515. // CONCATENATED MODULE: ./packages/avatar/index.js
  48516. /* istanbul ignore next */
  48517. avatar_src_main.install = function (Vue) {
  48518. Vue.component(avatar_src_main.name, avatar_src_main);
  48519. };
  48520. /* harmony default export */ var avatar = (avatar_src_main);
  48521. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/drawer/src/main.vue?vue&type=template&id=a4885264&
  48522. var mainvue_type_template_id_a4885264_render = function() {
  48523. var _vm = this
  48524. var _h = _vm.$createElement
  48525. var _c = _vm._self._c || _h
  48526. return _c(
  48527. "transition",
  48528. {
  48529. attrs: { name: "el-drawer-fade" },
  48530. on: { "after-enter": _vm.afterEnter, "after-leave": _vm.afterLeave }
  48531. },
  48532. [
  48533. _c(
  48534. "div",
  48535. {
  48536. directives: [
  48537. {
  48538. name: "show",
  48539. rawName: "v-show",
  48540. value: _vm.visible,
  48541. expression: "visible"
  48542. }
  48543. ],
  48544. staticClass: "el-drawer__wrapper",
  48545. attrs: { tabindex: "-1" }
  48546. },
  48547. [
  48548. _c(
  48549. "div",
  48550. {
  48551. staticClass: "el-drawer__container",
  48552. class: _vm.visible && "el-drawer__open",
  48553. attrs: { role: "document", tabindex: "-1" },
  48554. on: {
  48555. click: function($event) {
  48556. if ($event.target !== $event.currentTarget) {
  48557. return null
  48558. }
  48559. return _vm.handleWrapperClick($event)
  48560. }
  48561. }
  48562. },
  48563. [
  48564. _c(
  48565. "div",
  48566. {
  48567. ref: "drawer",
  48568. staticClass: "el-drawer",
  48569. class: [_vm.direction, _vm.customClass],
  48570. style: _vm.isHorizontal
  48571. ? "width: " + _vm.drawerSize
  48572. : "height: " + _vm.drawerSize,
  48573. attrs: {
  48574. "aria-modal": "true",
  48575. "aria-labelledby": "el-drawer__title",
  48576. "aria-label": _vm.title,
  48577. role: "dialog",
  48578. tabindex: "-1"
  48579. }
  48580. },
  48581. [
  48582. _vm.withHeader
  48583. ? _c(
  48584. "header",
  48585. {
  48586. staticClass: "el-drawer__header",
  48587. attrs: { id: "el-drawer__title" }
  48588. },
  48589. [
  48590. _vm._t("title", [
  48591. _c(
  48592. "span",
  48593. { attrs: { role: "heading", title: _vm.title } },
  48594. [_vm._v(_vm._s(_vm.title))]
  48595. )
  48596. ]),
  48597. _vm.showClose
  48598. ? _c(
  48599. "button",
  48600. {
  48601. staticClass: "el-drawer__close-btn",
  48602. attrs: {
  48603. "aria-label":
  48604. "close " + (_vm.title || "drawer"),
  48605. type: "button"
  48606. },
  48607. on: { click: _vm.closeDrawer }
  48608. },
  48609. [
  48610. _c("i", {
  48611. staticClass:
  48612. "el-dialog__close el-icon el-icon-close"
  48613. })
  48614. ]
  48615. )
  48616. : _vm._e()
  48617. ],
  48618. 2
  48619. )
  48620. : _vm._e(),
  48621. _vm.rendered
  48622. ? _c(
  48623. "section",
  48624. { staticClass: "el-drawer__body" },
  48625. [_vm._t("default")],
  48626. 2
  48627. )
  48628. : _vm._e()
  48629. ]
  48630. )
  48631. ]
  48632. )
  48633. ]
  48634. )
  48635. ]
  48636. )
  48637. }
  48638. var mainvue_type_template_id_a4885264_staticRenderFns = []
  48639. mainvue_type_template_id_a4885264_render._withStripped = true
  48640. // CONCATENATED MODULE: ./packages/drawer/src/main.vue?vue&type=template&id=a4885264&
  48641. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/drawer/src/main.vue?vue&type=script&lang=js&
  48642. //
  48643. //
  48644. //
  48645. //
  48646. //
  48647. //
  48648. //
  48649. //
  48650. //
  48651. //
  48652. //
  48653. //
  48654. //
  48655. //
  48656. //
  48657. //
  48658. //
  48659. //
  48660. //
  48661. //
  48662. //
  48663. //
  48664. //
  48665. //
  48666. //
  48667. //
  48668. //
  48669. //
  48670. //
  48671. //
  48672. //
  48673. //
  48674. //
  48675. //
  48676. //
  48677. //
  48678. //
  48679. //
  48680. //
  48681. //
  48682. //
  48683. //
  48684. //
  48685. //
  48686. //
  48687. //
  48688. //
  48689. //
  48690. /* harmony default export */ var drawer_src_mainvue_type_script_lang_js_ = ({
  48691. name: 'ElDrawer',
  48692. mixins: [popup_default.a, emitter_default.a],
  48693. props: {
  48694. appendToBody: {
  48695. type: Boolean,
  48696. default: false
  48697. },
  48698. beforeClose: {
  48699. type: Function
  48700. },
  48701. customClass: {
  48702. type: String,
  48703. default: ''
  48704. },
  48705. closeOnPressEscape: {
  48706. type: Boolean,
  48707. default: true
  48708. },
  48709. destroyOnClose: {
  48710. type: Boolean,
  48711. default: false
  48712. },
  48713. modal: {
  48714. type: Boolean,
  48715. default: true
  48716. },
  48717. direction: {
  48718. type: String,
  48719. default: 'rtl',
  48720. validator: function validator(val) {
  48721. return ['ltr', 'rtl', 'ttb', 'btt'].indexOf(val) !== -1;
  48722. }
  48723. },
  48724. modalAppendToBody: {
  48725. type: Boolean,
  48726. default: true
  48727. },
  48728. showClose: {
  48729. type: Boolean,
  48730. default: true
  48731. },
  48732. size: {
  48733. type: [Number, String],
  48734. default: '30%'
  48735. },
  48736. title: {
  48737. type: String,
  48738. default: ''
  48739. },
  48740. visible: {
  48741. type: Boolean
  48742. },
  48743. wrapperClosable: {
  48744. type: Boolean,
  48745. default: true
  48746. },
  48747. withHeader: {
  48748. type: Boolean,
  48749. default: true
  48750. }
  48751. },
  48752. computed: {
  48753. isHorizontal: function isHorizontal() {
  48754. return this.direction === 'rtl' || this.direction === 'ltr';
  48755. },
  48756. drawerSize: function drawerSize() {
  48757. return typeof this.size === 'number' ? this.size + 'px' : this.size;
  48758. }
  48759. },
  48760. data: function data() {
  48761. return {
  48762. closed: false,
  48763. prevActiveElement: null
  48764. };
  48765. },
  48766. watch: {
  48767. visible: function visible(val) {
  48768. var _this = this;
  48769. if (val) {
  48770. this.closed = false;
  48771. this.$emit('open');
  48772. if (this.appendToBody) {
  48773. document.body.appendChild(this.$el);
  48774. }
  48775. this.prevActiveElement = document.activeElement;
  48776. } else {
  48777. if (!this.closed) {
  48778. this.$emit('close');
  48779. if (this.destroyOnClose === true) {
  48780. this.rendered = false;
  48781. }
  48782. }
  48783. this.$nextTick(function () {
  48784. if (_this.prevActiveElement) {
  48785. _this.prevActiveElement.focus();
  48786. }
  48787. });
  48788. }
  48789. }
  48790. },
  48791. methods: {
  48792. afterEnter: function afterEnter() {
  48793. this.$emit('opened');
  48794. },
  48795. afterLeave: function afterLeave() {
  48796. this.$emit('closed');
  48797. },
  48798. hide: function hide(cancel) {
  48799. if (cancel !== false) {
  48800. this.$emit('update:visible', false);
  48801. this.$emit('close');
  48802. if (this.destroyOnClose === true) {
  48803. this.rendered = false;
  48804. }
  48805. this.closed = true;
  48806. }
  48807. },
  48808. handleWrapperClick: function handleWrapperClick() {
  48809. if (this.wrapperClosable) {
  48810. this.closeDrawer();
  48811. }
  48812. },
  48813. closeDrawer: function closeDrawer() {
  48814. if (typeof this.beforeClose === 'function') {
  48815. this.beforeClose(this.hide);
  48816. } else {
  48817. this.hide();
  48818. }
  48819. },
  48820. handleClose: function handleClose() {
  48821. // This method here will be called by PopupManger, when the `closeOnPressEscape` was set to true
  48822. // pressing `ESC` will call this method, and also close the drawer.
  48823. // This method also calls `beforeClose` if there was one.
  48824. this.closeDrawer();
  48825. }
  48826. },
  48827. mounted: function mounted() {
  48828. if (this.visible) {
  48829. this.rendered = true;
  48830. this.open();
  48831. if (this.appendToBody) {
  48832. document.body.appendChild(this.$el);
  48833. }
  48834. }
  48835. },
  48836. destroyed: function destroyed() {
  48837. // if appendToBody is true, remove DOM node after destroy
  48838. if (this.appendToBody && this.$el && this.$el.parentNode) {
  48839. this.$el.parentNode.removeChild(this.$el);
  48840. }
  48841. }
  48842. });
  48843. // CONCATENATED MODULE: ./packages/drawer/src/main.vue?vue&type=script&lang=js&
  48844. /* harmony default export */ var packages_drawer_src_mainvue_type_script_lang_js_ = (drawer_src_mainvue_type_script_lang_js_);
  48845. // CONCATENATED MODULE: ./packages/drawer/src/main.vue
  48846. /* normalize component */
  48847. var drawer_src_main_component = normalizeComponent(
  48848. packages_drawer_src_mainvue_type_script_lang_js_,
  48849. mainvue_type_template_id_a4885264_render,
  48850. mainvue_type_template_id_a4885264_staticRenderFns,
  48851. false,
  48852. null,
  48853. null,
  48854. null
  48855. )
  48856. /* hot reload */
  48857. if (false) { var drawer_src_main_api; }
  48858. drawer_src_main_component.options.__file = "packages/drawer/src/main.vue"
  48859. /* harmony default export */ var drawer_src_main = (drawer_src_main_component.exports);
  48860. // CONCATENATED MODULE: ./packages/drawer/index.js
  48861. /* istanbul ignore next */
  48862. drawer_src_main.install = function (Vue) {
  48863. Vue.component(drawer_src_main.name, drawer_src_main);
  48864. };
  48865. /* harmony default export */ var drawer = (drawer_src_main);
  48866. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popconfirm/src/main.vue?vue&type=template&id=048de730&
  48867. var mainvue_type_template_id_048de730_render = function() {
  48868. var _vm = this
  48869. var _h = _vm.$createElement
  48870. var _c = _vm._self._c || _h
  48871. return _c(
  48872. "el-popover",
  48873. _vm._b(
  48874. {
  48875. attrs: { trigger: "click" },
  48876. model: {
  48877. value: _vm.visible,
  48878. callback: function($$v) {
  48879. _vm.visible = $$v
  48880. },
  48881. expression: "visible"
  48882. }
  48883. },
  48884. "el-popover",
  48885. _vm.$attrs,
  48886. false
  48887. ),
  48888. [
  48889. _c("div", { staticClass: "el-popconfirm" }, [
  48890. _c("p", { staticClass: "el-popconfirm__main" }, [
  48891. !_vm.hideIcon
  48892. ? _c("i", {
  48893. staticClass: "el-popconfirm__icon",
  48894. class: _vm.icon,
  48895. style: { color: _vm.iconColor }
  48896. })
  48897. : _vm._e(),
  48898. _vm._v("\n " + _vm._s(_vm.title) + "\n ")
  48899. ]),
  48900. _c(
  48901. "div",
  48902. { staticClass: "el-popconfirm__action" },
  48903. [
  48904. _c(
  48905. "el-button",
  48906. {
  48907. attrs: { size: "mini", type: _vm.cancelButtonType },
  48908. on: { click: _vm.cancel }
  48909. },
  48910. [
  48911. _vm._v(
  48912. "\n " +
  48913. _vm._s(_vm.displayCancelButtonText) +
  48914. "\n "
  48915. )
  48916. ]
  48917. ),
  48918. _c(
  48919. "el-button",
  48920. {
  48921. attrs: { size: "mini", type: _vm.confirmButtonType },
  48922. on: { click: _vm.confirm }
  48923. },
  48924. [
  48925. _vm._v(
  48926. "\n " +
  48927. _vm._s(_vm.displayConfirmButtonText) +
  48928. "\n "
  48929. )
  48930. ]
  48931. )
  48932. ],
  48933. 1
  48934. )
  48935. ]),
  48936. _vm._t("reference", null, { slot: "reference" })
  48937. ],
  48938. 2
  48939. )
  48940. }
  48941. var mainvue_type_template_id_048de730_staticRenderFns = []
  48942. mainvue_type_template_id_048de730_render._withStripped = true
  48943. // CONCATENATED MODULE: ./packages/popconfirm/src/main.vue?vue&type=template&id=048de730&
  48944. // EXTERNAL MODULE: external "element-ui/lib/popover"
  48945. var popover_ = __webpack_require__(44);
  48946. var popover_default = /*#__PURE__*/__webpack_require__.n(popover_);
  48947. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popconfirm/src/main.vue?vue&type=script&lang=js&
  48948. //
  48949. //
  48950. //
  48951. //
  48952. //
  48953. //
  48954. //
  48955. //
  48956. //
  48957. //
  48958. //
  48959. //
  48960. //
  48961. //
  48962. //
  48963. //
  48964. //
  48965. //
  48966. //
  48967. //
  48968. //
  48969. //
  48970. //
  48971. //
  48972. //
  48973. //
  48974. //
  48975. //
  48976. //
  48977. //
  48978. //
  48979. //
  48980. //
  48981. //
  48982. //
  48983. //
  48984. //
  48985. /* harmony default export */ var popconfirm_src_mainvue_type_script_lang_js_ = ({
  48986. name: 'ElPopconfirm',
  48987. props: {
  48988. title: {
  48989. type: String
  48990. },
  48991. confirmButtonText: {
  48992. type: String
  48993. },
  48994. cancelButtonText: {
  48995. type: String
  48996. },
  48997. confirmButtonType: {
  48998. type: String,
  48999. default: 'primary'
  49000. },
  49001. cancelButtonType: {
  49002. type: String,
  49003. default: 'text'
  49004. },
  49005. icon: {
  49006. type: String,
  49007. default: 'el-icon-question'
  49008. },
  49009. iconColor: {
  49010. type: String,
  49011. default: '#f90'
  49012. },
  49013. hideIcon: {
  49014. type: Boolean,
  49015. default: false
  49016. }
  49017. },
  49018. components: {
  49019. ElPopover: popover_default.a,
  49020. ElButton: button_default.a
  49021. },
  49022. data: function data() {
  49023. return {
  49024. visible: false
  49025. };
  49026. },
  49027. computed: {
  49028. displayConfirmButtonText: function displayConfirmButtonText() {
  49029. return this.confirmButtonText || Object(lib_locale_["t"])('el.popconfirm.confirmButtonText');
  49030. },
  49031. displayCancelButtonText: function displayCancelButtonText() {
  49032. return this.cancelButtonText || Object(lib_locale_["t"])('el.popconfirm.cancelButtonText');
  49033. }
  49034. },
  49035. methods: {
  49036. confirm: function confirm() {
  49037. this.visible = false;
  49038. this.$emit('confirm');
  49039. },
  49040. cancel: function cancel() {
  49041. this.visible = false;
  49042. this.$emit('cancel');
  49043. }
  49044. }
  49045. });
  49046. // CONCATENATED MODULE: ./packages/popconfirm/src/main.vue?vue&type=script&lang=js&
  49047. /* harmony default export */ var packages_popconfirm_src_mainvue_type_script_lang_js_ = (popconfirm_src_mainvue_type_script_lang_js_);
  49048. // CONCATENATED MODULE: ./packages/popconfirm/src/main.vue
  49049. /* normalize component */
  49050. var popconfirm_src_main_component = normalizeComponent(
  49051. packages_popconfirm_src_mainvue_type_script_lang_js_,
  49052. mainvue_type_template_id_048de730_render,
  49053. mainvue_type_template_id_048de730_staticRenderFns,
  49054. false,
  49055. null,
  49056. null,
  49057. null
  49058. )
  49059. /* hot reload */
  49060. if (false) { var popconfirm_src_main_api; }
  49061. popconfirm_src_main_component.options.__file = "packages/popconfirm/src/main.vue"
  49062. /* harmony default export */ var popconfirm_src_main = (popconfirm_src_main_component.exports);
  49063. // CONCATENATED MODULE: ./packages/popconfirm/index.js
  49064. /* istanbul ignore next */
  49065. popconfirm_src_main.install = function (Vue) {
  49066. Vue.component(popconfirm_src_main.name, popconfirm_src_main);
  49067. };
  49068. /* harmony default export */ var popconfirm = (popconfirm_src_main);
  49069. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/skeleton/src/index.vue?vue&type=template&id=7f659269&
  49070. var srcvue_type_template_id_7f659269_render = function() {
  49071. var _vm = this
  49072. var _h = _vm.$createElement
  49073. var _c = _vm._self._c || _h
  49074. return _c(
  49075. "div",
  49076. [
  49077. _vm.uiLoading
  49078. ? [
  49079. _c(
  49080. "div",
  49081. _vm._b(
  49082. { class: ["el-skeleton", _vm.animated ? "is-animated" : ""] },
  49083. "div",
  49084. _vm.$attrs,
  49085. false
  49086. ),
  49087. [
  49088. _vm._l(_vm.count, function(i) {
  49089. return [
  49090. _vm.loading
  49091. ? _vm._t(
  49092. "template",
  49093. _vm._l(_vm.rows, function(item) {
  49094. return _c("el-skeleton-item", {
  49095. key: i + "-" + item,
  49096. class: {
  49097. "el-skeleton__paragraph": item !== 1,
  49098. "is-first": item === 1,
  49099. "is-last": item === _vm.rows && _vm.rows > 1
  49100. },
  49101. attrs: { variant: "p" }
  49102. })
  49103. })
  49104. )
  49105. : _vm._e()
  49106. ]
  49107. })
  49108. ],
  49109. 2
  49110. )
  49111. ]
  49112. : [_vm._t("default", null, null, _vm.$attrs)]
  49113. ],
  49114. 2
  49115. )
  49116. }
  49117. var srcvue_type_template_id_7f659269_staticRenderFns = []
  49118. srcvue_type_template_id_7f659269_render._withStripped = true
  49119. // CONCATENATED MODULE: ./packages/skeleton/src/index.vue?vue&type=template&id=7f659269&
  49120. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/skeleton/src/index.vue?vue&type=script&lang=js&
  49121. //
  49122. //
  49123. //
  49124. //
  49125. //
  49126. //
  49127. //
  49128. //
  49129. //
  49130. //
  49131. //
  49132. //
  49133. //
  49134. //
  49135. //
  49136. //
  49137. //
  49138. //
  49139. //
  49140. //
  49141. //
  49142. //
  49143. //
  49144. //
  49145. //
  49146. /* harmony default export */ var skeleton_srcvue_type_script_lang_js_ = ({
  49147. name: 'ElSkeleton',
  49148. props: {
  49149. animated: {
  49150. type: Boolean,
  49151. default: false
  49152. },
  49153. count: {
  49154. type: Number,
  49155. default: 1
  49156. },
  49157. rows: {
  49158. type: Number,
  49159. default: 4
  49160. },
  49161. loading: {
  49162. type: Boolean,
  49163. default: true
  49164. },
  49165. throttle: {
  49166. type: Number,
  49167. default: 0
  49168. }
  49169. },
  49170. watch: {
  49171. loading: {
  49172. handler: function handler(loading) {
  49173. var _this = this;
  49174. if (this.throttle <= 0) {
  49175. this.uiLoading = loading;
  49176. return;
  49177. }
  49178. if (loading) {
  49179. clearTimeout(this.timeoutHandle);
  49180. this.timeoutHandle = setTimeout(function () {
  49181. _this.uiLoading = _this.loading;
  49182. }, this.throttle);
  49183. } else {
  49184. this.uiLoading = loading;
  49185. }
  49186. },
  49187. immediate: true
  49188. }
  49189. },
  49190. data: function data() {
  49191. return {
  49192. uiLoading: this.throttle <= 0 ? this.loading : false
  49193. };
  49194. }
  49195. });
  49196. // CONCATENATED MODULE: ./packages/skeleton/src/index.vue?vue&type=script&lang=js&
  49197. /* harmony default export */ var packages_skeleton_srcvue_type_script_lang_js_ = (skeleton_srcvue_type_script_lang_js_);
  49198. // CONCATENATED MODULE: ./packages/skeleton/src/index.vue
  49199. /* normalize component */
  49200. var skeleton_src_component = normalizeComponent(
  49201. packages_skeleton_srcvue_type_script_lang_js_,
  49202. srcvue_type_template_id_7f659269_render,
  49203. srcvue_type_template_id_7f659269_staticRenderFns,
  49204. false,
  49205. null,
  49206. null,
  49207. null
  49208. )
  49209. /* hot reload */
  49210. if (false) { var skeleton_src_api; }
  49211. skeleton_src_component.options.__file = "packages/skeleton/src/index.vue"
  49212. /* harmony default export */ var skeleton_src = (skeleton_src_component.exports);
  49213. // CONCATENATED MODULE: ./packages/skeleton/index.js
  49214. /* istanbul ignore next */
  49215. skeleton_src.install = function (Vue) {
  49216. Vue.component(skeleton_src.name, skeleton_src);
  49217. };
  49218. /* harmony default export */ var skeleton = (skeleton_src);
  49219. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/skeleton/src/item.vue?vue&type=template&id=4bc8804c&
  49220. var itemvue_type_template_id_4bc8804c_render = function() {
  49221. var _vm = this
  49222. var _h = _vm.$createElement
  49223. var _c = _vm._self._c || _h
  49224. return _c(
  49225. "div",
  49226. { class: ["el-skeleton__item", "el-skeleton__" + _vm.variant] },
  49227. [_vm.variant === "image" ? _c("img-placeholder") : _vm._e()],
  49228. 1
  49229. )
  49230. }
  49231. var itemvue_type_template_id_4bc8804c_staticRenderFns = []
  49232. itemvue_type_template_id_4bc8804c_render._withStripped = true
  49233. // CONCATENATED MODULE: ./packages/skeleton/src/item.vue?vue&type=template&id=4bc8804c&
  49234. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/skeleton/src/img-placeholder.vue?vue&type=template&id=1b2cb5c0&
  49235. var img_placeholdervue_type_template_id_1b2cb5c0_render = function() {
  49236. var _vm = this
  49237. var _h = _vm.$createElement
  49238. var _c = _vm._self._c || _h
  49239. return _c(
  49240. "svg",
  49241. {
  49242. attrs: { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }
  49243. },
  49244. [
  49245. _c("path", {
  49246. attrs: {
  49247. d:
  49248. "M64 896V128h896v768H64z m64-128l192-192 116.352 116.352L640 448l256 307.2V192H128v576z m224-480a96 96 0 1 1-0.064 192.064A96 96 0 0 1 352 288z"
  49249. }
  49250. })
  49251. ]
  49252. )
  49253. }
  49254. var img_placeholdervue_type_template_id_1b2cb5c0_staticRenderFns = []
  49255. img_placeholdervue_type_template_id_1b2cb5c0_render._withStripped = true
  49256. // CONCATENATED MODULE: ./packages/skeleton/src/img-placeholder.vue?vue&type=template&id=1b2cb5c0&
  49257. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/skeleton/src/img-placeholder.vue?vue&type=script&lang=js&
  49258. //
  49259. //
  49260. //
  49261. //
  49262. //
  49263. //
  49264. //
  49265. //
  49266. //
  49267. //
  49268. //
  49269. /* harmony default export */ var img_placeholdervue_type_script_lang_js_ = ({
  49270. name: 'ImgPlaceholder'
  49271. });
  49272. // CONCATENATED MODULE: ./packages/skeleton/src/img-placeholder.vue?vue&type=script&lang=js&
  49273. /* harmony default export */ var src_img_placeholdervue_type_script_lang_js_ = (img_placeholdervue_type_script_lang_js_);
  49274. // CONCATENATED MODULE: ./packages/skeleton/src/img-placeholder.vue
  49275. /* normalize component */
  49276. var img_placeholder_component = normalizeComponent(
  49277. src_img_placeholdervue_type_script_lang_js_,
  49278. img_placeholdervue_type_template_id_1b2cb5c0_render,
  49279. img_placeholdervue_type_template_id_1b2cb5c0_staticRenderFns,
  49280. false,
  49281. null,
  49282. null,
  49283. null
  49284. )
  49285. /* hot reload */
  49286. if (false) { var img_placeholder_api; }
  49287. img_placeholder_component.options.__file = "packages/skeleton/src/img-placeholder.vue"
  49288. /* harmony default export */ var img_placeholder = (img_placeholder_component.exports);
  49289. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/skeleton/src/item.vue?vue&type=script&lang=js&
  49290. var _components;
  49291. //
  49292. //
  49293. //
  49294. //
  49295. //
  49296. //
  49297. /* harmony default export */ var skeleton_src_itemvue_type_script_lang_js_ = ({
  49298. name: 'ElSkeletonItem',
  49299. props: {
  49300. variant: {
  49301. type: String,
  49302. default: 'text'
  49303. }
  49304. },
  49305. components: (_components = {}, _components[img_placeholder.name] = img_placeholder, _components)
  49306. });
  49307. // CONCATENATED MODULE: ./packages/skeleton/src/item.vue?vue&type=script&lang=js&
  49308. /* harmony default export */ var packages_skeleton_src_itemvue_type_script_lang_js_ = (skeleton_src_itemvue_type_script_lang_js_);
  49309. // CONCATENATED MODULE: ./packages/skeleton/src/item.vue
  49310. /* normalize component */
  49311. var skeleton_src_item_component = normalizeComponent(
  49312. packages_skeleton_src_itemvue_type_script_lang_js_,
  49313. itemvue_type_template_id_4bc8804c_render,
  49314. itemvue_type_template_id_4bc8804c_staticRenderFns,
  49315. false,
  49316. null,
  49317. null,
  49318. null
  49319. )
  49320. /* hot reload */
  49321. if (false) { var skeleton_src_item_api; }
  49322. skeleton_src_item_component.options.__file = "packages/skeleton/src/item.vue"
  49323. /* harmony default export */ var skeleton_src_item = (skeleton_src_item_component.exports);
  49324. // CONCATENATED MODULE: ./packages/skeleton-item/index.js
  49325. /* istanbul ignore next */
  49326. skeleton_src_item.install = function (Vue) {
  49327. Vue.component(skeleton_src_item.name, skeleton_src_item);
  49328. };
  49329. /* harmony default export */ var skeleton_item = (skeleton_src_item);
  49330. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/empty/src/index.vue?vue&type=template&id=347ced91&
  49331. var srcvue_type_template_id_347ced91_render = function() {
  49332. var _vm = this
  49333. var _h = _vm.$createElement
  49334. var _c = _vm._self._c || _h
  49335. return _c("div", { staticClass: "el-empty" }, [
  49336. _c(
  49337. "div",
  49338. { staticClass: "el-empty__image", style: _vm.imageStyle },
  49339. [
  49340. _vm.image
  49341. ? _c("img", {
  49342. attrs: { src: _vm.image, ondragstart: "return false" }
  49343. })
  49344. : _vm._t("image", [_c("img-empty")])
  49345. ],
  49346. 2
  49347. ),
  49348. _c(
  49349. "div",
  49350. { staticClass: "el-empty__description" },
  49351. [
  49352. _vm.$slots.description
  49353. ? _vm._t("description")
  49354. : _c("p", [_vm._v(_vm._s(_vm.emptyDescription))])
  49355. ],
  49356. 2
  49357. ),
  49358. _vm.$slots.default
  49359. ? _c("div", { staticClass: "el-empty__bottom" }, [_vm._t("default")], 2)
  49360. : _vm._e()
  49361. ])
  49362. }
  49363. var srcvue_type_template_id_347ced91_staticRenderFns = []
  49364. srcvue_type_template_id_347ced91_render._withStripped = true
  49365. // CONCATENATED MODULE: ./packages/empty/src/index.vue?vue&type=template&id=347ced91&
  49366. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/empty/src/img-empty.vue?vue&type=template&id=42918b82&
  49367. var img_emptyvue_type_template_id_42918b82_render = function() {
  49368. var _vm = this
  49369. var _h = _vm.$createElement
  49370. var _c = _vm._self._c || _h
  49371. return _c(
  49372. "svg",
  49373. {
  49374. attrs: {
  49375. viewBox: "0 0 79 86",
  49376. version: "1.1",
  49377. xmlns: "http://www.w3.org/2000/svg",
  49378. "xmlns:xlink": "http://www.w3.org/1999/xlink"
  49379. }
  49380. },
  49381. [
  49382. _c(
  49383. "defs",
  49384. [
  49385. _c(
  49386. "linearGradient",
  49387. {
  49388. attrs: {
  49389. id: "linearGradient-1-" + _vm.id,
  49390. x1: "38.8503086%",
  49391. y1: "0%",
  49392. x2: "61.1496914%",
  49393. y2: "100%"
  49394. }
  49395. },
  49396. [
  49397. _c("stop", { attrs: { "stop-color": "#FCFCFD", offset: "0%" } }),
  49398. _c("stop", { attrs: { "stop-color": "#EEEFF3", offset: "100%" } })
  49399. ],
  49400. 1
  49401. ),
  49402. _c(
  49403. "linearGradient",
  49404. {
  49405. attrs: {
  49406. id: "linearGradient-2-" + _vm.id,
  49407. x1: "0%",
  49408. y1: "9.5%",
  49409. x2: "100%",
  49410. y2: "90.5%"
  49411. }
  49412. },
  49413. [
  49414. _c("stop", { attrs: { "stop-color": "#FCFCFD", offset: "0%" } }),
  49415. _c("stop", { attrs: { "stop-color": "#E9EBEF", offset: "100%" } })
  49416. ],
  49417. 1
  49418. ),
  49419. _c("rect", {
  49420. attrs: {
  49421. id: "path-3-" + _vm.id,
  49422. x: "0",
  49423. y: "0",
  49424. width: "17",
  49425. height: "36"
  49426. }
  49427. })
  49428. ],
  49429. 1
  49430. ),
  49431. _c(
  49432. "g",
  49433. {
  49434. attrs: {
  49435. id: "Illustrations",
  49436. stroke: "none",
  49437. "stroke-width": "1",
  49438. fill: "none",
  49439. "fill-rule": "evenodd"
  49440. }
  49441. },
  49442. [
  49443. _c(
  49444. "g",
  49445. {
  49446. attrs: {
  49447. id: "B-type",
  49448. transform: "translate(-1268.000000, -535.000000)"
  49449. }
  49450. },
  49451. [
  49452. _c(
  49453. "g",
  49454. {
  49455. attrs: {
  49456. id: "Group-2",
  49457. transform: "translate(1268.000000, 535.000000)"
  49458. }
  49459. },
  49460. [
  49461. _c("path", {
  49462. attrs: {
  49463. id: "Oval-Copy-2",
  49464. d:
  49465. "M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",
  49466. fill: "#F7F8FC"
  49467. }
  49468. }),
  49469. _c("polygon", {
  49470. attrs: {
  49471. id: "Rectangle-Copy-14",
  49472. fill: "#E5E7E9",
  49473. transform:
  49474. "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
  49475. points: "13 58 53 58 42 45 2 45"
  49476. }
  49477. }),
  49478. _c(
  49479. "g",
  49480. {
  49481. attrs: {
  49482. id: "Group-Copy",
  49483. transform:
  49484. "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"
  49485. }
  49486. },
  49487. [
  49488. _c("polygon", {
  49489. attrs: {
  49490. id: "Rectangle-Copy-10",
  49491. fill: "#E5E7E9",
  49492. transform:
  49493. "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
  49494. points: "2.84078316e-14 3 18 3 23 7 5 7"
  49495. }
  49496. }),
  49497. _c("polygon", {
  49498. attrs: {
  49499. id: "Rectangle-Copy-11",
  49500. fill: "#EDEEF2",
  49501. points:
  49502. "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
  49503. }
  49504. }),
  49505. _c("rect", {
  49506. attrs: {
  49507. id: "Rectangle-Copy-12",
  49508. fill: "url(#linearGradient-1-" + _vm.id + ")",
  49509. transform:
  49510. "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
  49511. x: "38",
  49512. y: "7",
  49513. width: "17",
  49514. height: "36"
  49515. }
  49516. }),
  49517. _c("polygon", {
  49518. attrs: {
  49519. id: "Rectangle-Copy-13",
  49520. fill: "#F8F9FB",
  49521. transform:
  49522. "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
  49523. points:
  49524. "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
  49525. }
  49526. })
  49527. ]
  49528. ),
  49529. _c("rect", {
  49530. attrs: {
  49531. id: "Rectangle-Copy-15",
  49532. fill: "url(#linearGradient-2-" + _vm.id + ")",
  49533. x: "13",
  49534. y: "45",
  49535. width: "40",
  49536. height: "36"
  49537. }
  49538. }),
  49539. _c(
  49540. "g",
  49541. {
  49542. attrs: {
  49543. id: "Rectangle-Copy-17",
  49544. transform: "translate(53.000000, 45.000000)"
  49545. }
  49546. },
  49547. [
  49548. _c(
  49549. "mask",
  49550. { attrs: { id: "mask-4-" + _vm.id, fill: "white" } },
  49551. [
  49552. _c("use", {
  49553. attrs: { "xlink:href": "#path-3-" + _vm.id }
  49554. })
  49555. ]
  49556. ),
  49557. _c("use", {
  49558. attrs: {
  49559. id: "Mask",
  49560. fill: "#E0E3E9",
  49561. transform:
  49562. "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
  49563. "xlink:href": "#path-3-" + _vm.id
  49564. }
  49565. }),
  49566. _c("polygon", {
  49567. attrs: {
  49568. id: "Rectangle-Copy",
  49569. fill: "#D5D7DE",
  49570. mask: "url(#mask-4-" + _vm.id + ")",
  49571. transform:
  49572. "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
  49573. points: "7 0 24 0 20 18 -1.70530257e-13 16"
  49574. }
  49575. })
  49576. ]
  49577. ),
  49578. _c("polygon", {
  49579. attrs: {
  49580. id: "Rectangle-Copy-18",
  49581. fill: "#F8F9FB",
  49582. transform:
  49583. "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
  49584. points: "62 45 79 45 70 58 53 58"
  49585. }
  49586. })
  49587. ]
  49588. )
  49589. ]
  49590. )
  49591. ]
  49592. )
  49593. ]
  49594. )
  49595. }
  49596. var img_emptyvue_type_template_id_42918b82_staticRenderFns = []
  49597. img_emptyvue_type_template_id_42918b82_render._withStripped = true
  49598. // CONCATENATED MODULE: ./packages/empty/src/img-empty.vue?vue&type=template&id=42918b82&
  49599. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/empty/src/img-empty.vue?vue&type=script&lang=js&
  49600. //
  49601. //
  49602. //
  49603. //
  49604. //
  49605. //
  49606. //
  49607. //
  49608. //
  49609. //
  49610. //
  49611. //
  49612. //
  49613. //
  49614. //
  49615. //
  49616. //
  49617. //
  49618. //
  49619. //
  49620. //
  49621. //
  49622. //
  49623. //
  49624. //
  49625. //
  49626. //
  49627. //
  49628. //
  49629. //
  49630. //
  49631. //
  49632. //
  49633. //
  49634. //
  49635. //
  49636. //
  49637. //
  49638. //
  49639. //
  49640. //
  49641. //
  49642. //
  49643. //
  49644. //
  49645. //
  49646. //
  49647. //
  49648. //
  49649. //
  49650. //
  49651. //
  49652. //
  49653. //
  49654. //
  49655. //
  49656. //
  49657. //
  49658. //
  49659. //
  49660. //
  49661. //
  49662. //
  49663. //
  49664. //
  49665. //
  49666. //
  49667. //
  49668. //
  49669. //
  49670. //
  49671. //
  49672. //
  49673. //
  49674. //
  49675. //
  49676. //
  49677. //
  49678. //
  49679. //
  49680. //
  49681. //
  49682. //
  49683. //
  49684. //
  49685. //
  49686. //
  49687. //
  49688. //
  49689. //
  49690. //
  49691. //
  49692. //
  49693. //
  49694. //
  49695. //
  49696. //
  49697. //
  49698. //
  49699. //
  49700. //
  49701. //
  49702. //
  49703. //
  49704. //
  49705. //
  49706. //
  49707. //
  49708. //
  49709. //
  49710. //
  49711. //
  49712. //
  49713. //
  49714. //
  49715. //
  49716. //
  49717. //
  49718. //
  49719. //
  49720. //
  49721. var img_emptyvue_type_script_lang_js_id = 0;
  49722. /* harmony default export */ var img_emptyvue_type_script_lang_js_ = ({
  49723. name: 'ImgEmpty',
  49724. data: function data() {
  49725. return {
  49726. id: ++img_emptyvue_type_script_lang_js_id
  49727. };
  49728. }
  49729. });
  49730. // CONCATENATED MODULE: ./packages/empty/src/img-empty.vue?vue&type=script&lang=js&
  49731. /* harmony default export */ var src_img_emptyvue_type_script_lang_js_ = (img_emptyvue_type_script_lang_js_);
  49732. // CONCATENATED MODULE: ./packages/empty/src/img-empty.vue
  49733. /* normalize component */
  49734. var img_empty_component = normalizeComponent(
  49735. src_img_emptyvue_type_script_lang_js_,
  49736. img_emptyvue_type_template_id_42918b82_render,
  49737. img_emptyvue_type_template_id_42918b82_staticRenderFns,
  49738. false,
  49739. null,
  49740. null,
  49741. null
  49742. )
  49743. /* hot reload */
  49744. if (false) { var img_empty_api; }
  49745. img_empty_component.options.__file = "packages/empty/src/img-empty.vue"
  49746. /* harmony default export */ var img_empty = (img_empty_component.exports);
  49747. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/empty/src/index.vue?vue&type=script&lang=js&
  49748. var srcvue_type_script_lang_js_components;
  49749. //
  49750. //
  49751. //
  49752. //
  49753. //
  49754. //
  49755. //
  49756. //
  49757. //
  49758. //
  49759. //
  49760. //
  49761. //
  49762. //
  49763. //
  49764. //
  49765. //
  49766. //
  49767. /* harmony default export */ var empty_srcvue_type_script_lang_js_ = ({
  49768. name: 'ElEmpty',
  49769. components: (srcvue_type_script_lang_js_components = {}, srcvue_type_script_lang_js_components[img_empty.name] = img_empty, srcvue_type_script_lang_js_components),
  49770. props: {
  49771. image: {
  49772. type: String,
  49773. default: ''
  49774. },
  49775. imageSize: Number,
  49776. description: {
  49777. type: String,
  49778. default: ''
  49779. }
  49780. },
  49781. computed: {
  49782. emptyDescription: function emptyDescription() {
  49783. return this.description || Object(lib_locale_["t"])('el.empty.description');
  49784. },
  49785. imageStyle: function imageStyle() {
  49786. return {
  49787. width: this.imageSize ? this.imageSize + 'px' : ''
  49788. };
  49789. }
  49790. }
  49791. });
  49792. // CONCATENATED MODULE: ./packages/empty/src/index.vue?vue&type=script&lang=js&
  49793. /* harmony default export */ var packages_empty_srcvue_type_script_lang_js_ = (empty_srcvue_type_script_lang_js_);
  49794. // CONCATENATED MODULE: ./packages/empty/src/index.vue
  49795. /* normalize component */
  49796. var empty_src_component = normalizeComponent(
  49797. packages_empty_srcvue_type_script_lang_js_,
  49798. srcvue_type_template_id_347ced91_render,
  49799. srcvue_type_template_id_347ced91_staticRenderFns,
  49800. false,
  49801. null,
  49802. null,
  49803. null
  49804. )
  49805. /* hot reload */
  49806. if (false) { var empty_src_api; }
  49807. empty_src_component.options.__file = "packages/empty/src/index.vue"
  49808. /* harmony default export */ var empty_src = (empty_src_component.exports);
  49809. // CONCATENATED MODULE: ./packages/empty/index.js
  49810. empty_src.install = function (Vue) {
  49811. Vue.component(empty_src.name, empty_src);
  49812. };
  49813. /* harmony default export */ var empty = (empty_src);
  49814. // CONCATENATED MODULE: ./packages/descriptions/src/descriptions-row.js
  49815. var descriptions_row_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  49816. /* harmony default export */ var descriptions_row = ({
  49817. name: 'ElDescriptionsRow',
  49818. props: {
  49819. row: {
  49820. type: Array
  49821. }
  49822. },
  49823. inject: ['elDescriptions'],
  49824. render: function render(h) {
  49825. var elDescriptions = this.elDescriptions;
  49826. var row = (this.row || []).map(function (item) {
  49827. return descriptions_row_extends({}, item, {
  49828. label: item.slots.label || item.props.label
  49829. }, ['labelClassName', 'contentClassName', 'labelStyle', 'contentStyle'].reduce(function (res, key) {
  49830. res[key] = item.props[key] || elDescriptions[key];
  49831. return res;
  49832. }, {}));
  49833. });
  49834. if (elDescriptions.direction === 'vertical') {
  49835. return h('tbody', [h(
  49836. 'tr',
  49837. { 'class': 'el-descriptions-row' },
  49838. [row.map(function (item) {
  49839. var _ref;
  49840. return h(
  49841. 'th',
  49842. {
  49843. 'class': (_ref = {
  49844. 'el-descriptions-item__cell': true,
  49845. 'el-descriptions-item__label': true,
  49846. 'has-colon': elDescriptions.border ? false : elDescriptions.colon,
  49847. 'is-bordered-label': elDescriptions.border
  49848. }, _ref[item.labelClassName] = true, _ref),
  49849. style: item.labelStyle,
  49850. attrs: { colSpan: item.props.span
  49851. }
  49852. },
  49853. [item.label]
  49854. );
  49855. })]
  49856. ), h(
  49857. 'tr',
  49858. { 'class': 'el-descriptions-row' },
  49859. [row.map(function (item) {
  49860. return h(
  49861. 'td',
  49862. {
  49863. 'class': ['el-descriptions-item__cell', 'el-descriptions-item__content', item.contentClassName],
  49864. style: item.contentStyle,
  49865. attrs: { colSpan: item.props.span
  49866. }
  49867. },
  49868. [item.slots.default]
  49869. );
  49870. })]
  49871. )]);
  49872. }
  49873. if (elDescriptions.border) {
  49874. return h('tbody', [h(
  49875. 'tr',
  49876. { 'class': 'el-descriptions-row' },
  49877. [row.map(function (item) {
  49878. var _ref2;
  49879. return [h(
  49880. 'th',
  49881. {
  49882. 'class': (_ref2 = {
  49883. 'el-descriptions-item__cell': true,
  49884. 'el-descriptions-item__label': true,
  49885. 'is-bordered-label': elDescriptions.border
  49886. }, _ref2[item.labelClassName] = true, _ref2),
  49887. style: item.labelStyle,
  49888. attrs: { colSpan: '1'
  49889. }
  49890. },
  49891. [item.label]
  49892. ), h(
  49893. 'td',
  49894. {
  49895. 'class': ['el-descriptions-item__cell', 'el-descriptions-item__content', item.contentClassName],
  49896. style: item.contentStyle,
  49897. attrs: { colSpan: item.props.span * 2 - 1
  49898. }
  49899. },
  49900. [item.slots.default]
  49901. )];
  49902. })]
  49903. )]);
  49904. }
  49905. return h('tbody', [h(
  49906. 'tr',
  49907. { 'class': 'el-descriptions-row' },
  49908. [row.map(function (item) {
  49909. var _ref3;
  49910. return h(
  49911. 'td',
  49912. { 'class': 'el-descriptions-item el-descriptions-item__cell', attrs: { colSpan: item.props.span }
  49913. },
  49914. [h(
  49915. 'div',
  49916. { 'class': 'el-descriptions-item__container' },
  49917. [h(
  49918. 'span',
  49919. {
  49920. 'class': (_ref3 = {
  49921. 'el-descriptions-item__label': true,
  49922. 'has-colon': elDescriptions.colon
  49923. }, _ref3[item.labelClassName] = true, _ref3),
  49924. style: item.labelStyle
  49925. },
  49926. [item.label]
  49927. ), h(
  49928. 'span',
  49929. {
  49930. 'class': ['el-descriptions-item__content', item.contentClassName],
  49931. style: item.contentStyle
  49932. },
  49933. [item.slots.default]
  49934. )]
  49935. )]
  49936. );
  49937. })]
  49938. )]);
  49939. }
  49940. });
  49941. // CONCATENATED MODULE: ./packages/descriptions/src/index.js
  49942. var src_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  49943. var src_components;
  49944. /* harmony default export */ var descriptions_src = ({
  49945. name: 'ElDescriptions',
  49946. components: (src_components = {}, src_components[descriptions_row.name] = descriptions_row, src_components),
  49947. props: {
  49948. border: {
  49949. type: Boolean,
  49950. default: false
  49951. },
  49952. column: {
  49953. type: Number,
  49954. default: 3
  49955. },
  49956. direction: {
  49957. type: String,
  49958. default: 'horizontal'
  49959. },
  49960. size: {
  49961. type: String
  49962. // validator: isValidComponentSize,
  49963. },
  49964. title: {
  49965. type: String,
  49966. default: ''
  49967. },
  49968. extra: {
  49969. type: String,
  49970. default: ''
  49971. },
  49972. labelStyle: {
  49973. type: Object
  49974. },
  49975. contentStyle: {
  49976. type: Object
  49977. },
  49978. labelClassName: {
  49979. type: String,
  49980. default: ''
  49981. },
  49982. contentClassName: {
  49983. type: String,
  49984. default: ''
  49985. },
  49986. colon: {
  49987. type: Boolean,
  49988. default: true
  49989. }
  49990. },
  49991. computed: {
  49992. descriptionsSize: function descriptionsSize() {
  49993. return this.size || (this.$ELEMENT || {}).size;
  49994. }
  49995. },
  49996. provide: function provide() {
  49997. return {
  49998. elDescriptions: this
  49999. };
  50000. },
  50001. methods: {
  50002. getOptionProps: function getOptionProps(vnode) {
  50003. if (vnode.componentOptions) {
  50004. var componentOptions = vnode.componentOptions;
  50005. var _componentOptions$pro = componentOptions.propsData,
  50006. propsData = _componentOptions$pro === undefined ? {} : _componentOptions$pro,
  50007. _componentOptions$Cto = componentOptions.Ctor,
  50008. Ctor = _componentOptions$Cto === undefined ? {} : _componentOptions$Cto;
  50009. var props = (Ctor.options || {}).props || {};
  50010. var res = {};
  50011. for (var k in props) {
  50012. var v = props[k];
  50013. var defaultValue = v.default;
  50014. if (defaultValue !== undefined) {
  50015. res[k] = Object(types_["isFunction"])(defaultValue) ? defaultValue.call(vnode) : defaultValue;
  50016. }
  50017. }
  50018. return src_extends({}, res, propsData);
  50019. }
  50020. return {};
  50021. },
  50022. getSlots: function getSlots(vnode) {
  50023. var _this = this;
  50024. var componentOptions = vnode.componentOptions || {};
  50025. var children = vnode.children || componentOptions.children || [];
  50026. var slots = {};
  50027. children.forEach(function (child) {
  50028. if (!_this.isEmptyElement(child)) {
  50029. var name = child.data && child.data.slot || 'default';
  50030. slots[name] = slots[name] || [];
  50031. if (child.tag === 'template') {
  50032. slots[name].push(child.children);
  50033. } else {
  50034. slots[name].push(child);
  50035. }
  50036. }
  50037. });
  50038. return src_extends({}, slots);
  50039. },
  50040. isEmptyElement: function isEmptyElement(c) {
  50041. return !(c.tag || c.text && c.text.trim() !== '');
  50042. },
  50043. filledNode: function filledNode(node, span, count) {
  50044. var isLast = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  50045. if (!node.props) {
  50046. node.props = {};
  50047. }
  50048. if (span > count) {
  50049. node.props.span = count;
  50050. }
  50051. if (isLast) {
  50052. // set the max span, cause of the last td
  50053. node.props.span = count;
  50054. }
  50055. return node;
  50056. },
  50057. getRows: function getRows() {
  50058. var _this2 = this;
  50059. var children = (this.$slots.default || []).filter(function (vnode) {
  50060. return vnode.tag && vnode.componentOptions && vnode.componentOptions.Ctor.options.name === 'ElDescriptionsItem';
  50061. });
  50062. var nodes = children.map(function (vnode) {
  50063. return {
  50064. props: _this2.getOptionProps(vnode),
  50065. slots: _this2.getSlots(vnode),
  50066. vnode: vnode
  50067. };
  50068. });
  50069. var rows = [];
  50070. var temp = [];
  50071. var count = this.column;
  50072. nodes.forEach(function (node, index) {
  50073. var span = node.props.span || 1;
  50074. if (index === children.length - 1) {
  50075. temp.push(_this2.filledNode(node, span, count, true));
  50076. rows.push(temp);
  50077. return;
  50078. }
  50079. if (span < count) {
  50080. count -= span;
  50081. temp.push(node);
  50082. } else {
  50083. temp.push(_this2.filledNode(node, span, count));
  50084. rows.push(temp);
  50085. count = _this2.column;
  50086. temp = [];
  50087. }
  50088. });
  50089. return rows;
  50090. }
  50091. },
  50092. render: function render() {
  50093. var h = arguments[0];
  50094. var title = this.title,
  50095. extra = this.extra,
  50096. border = this.border,
  50097. descriptionsSize = this.descriptionsSize,
  50098. $slots = this.$slots;
  50099. var rows = this.getRows();
  50100. return h(
  50101. 'div',
  50102. { 'class': 'el-descriptions' },
  50103. [title || extra || $slots.title || $slots.extra ? h(
  50104. 'div',
  50105. { 'class': 'el-descriptions__header' },
  50106. [h(
  50107. 'div',
  50108. { 'class': 'el-descriptions__title' },
  50109. [$slots.title ? $slots.title : title]
  50110. ), h(
  50111. 'div',
  50112. { 'class': 'el-descriptions__extra' },
  50113. [$slots.extra ? $slots.extra : extra]
  50114. )]
  50115. ) : null, h(
  50116. 'div',
  50117. { 'class': 'el-descriptions__body' },
  50118. [h(
  50119. 'table',
  50120. { 'class': ['el-descriptions__table', { 'is-bordered': border }, descriptionsSize ? 'el-descriptions--' + descriptionsSize : ''] },
  50121. [rows.map(function (row) {
  50122. return h(descriptions_row, {
  50123. attrs: { row: row }
  50124. });
  50125. })]
  50126. )]
  50127. )]
  50128. );
  50129. }
  50130. });
  50131. // CONCATENATED MODULE: ./packages/descriptions/index.js
  50132. /* istanbul ignore next */
  50133. descriptions_src.install = function install(Vue) {
  50134. Vue.component(descriptions_src.name, descriptions_src);
  50135. };
  50136. /* harmony default export */ var descriptions = (descriptions_src);
  50137. // CONCATENATED MODULE: ./packages/descriptions/src/descriptions-item.js
  50138. /* harmony default export */ var descriptions_item = ({
  50139. name: 'ElDescriptionsItem',
  50140. props: {
  50141. label: {
  50142. type: String,
  50143. default: ''
  50144. },
  50145. span: {
  50146. type: Number,
  50147. default: 1
  50148. },
  50149. contentClassName: {
  50150. type: String,
  50151. default: ''
  50152. },
  50153. contentStyle: {
  50154. type: Object
  50155. },
  50156. labelClassName: {
  50157. type: String,
  50158. default: ''
  50159. },
  50160. labelStyle: {
  50161. type: Object
  50162. }
  50163. },
  50164. render: function render() {
  50165. return null;
  50166. }
  50167. });
  50168. // CONCATENATED MODULE: ./packages/descriptions-item/index.js
  50169. /* istanbul ignore next */
  50170. descriptions_item.install = function install(Vue) {
  50171. Vue.component(descriptions_item.name, descriptions_item);
  50172. };
  50173. /* harmony default export */ var packages_descriptions_item = (descriptions_item);
  50174. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/index.vue?vue&type=template&id=3408b139&
  50175. var srcvue_type_template_id_3408b139_render = function() {
  50176. var _vm = this
  50177. var _h = _vm.$createElement
  50178. var _c = _vm._self._c || _h
  50179. return _c("div", { staticClass: "el-result" }, [
  50180. _c(
  50181. "div",
  50182. { staticClass: "el-result__icon" },
  50183. [
  50184. _vm._t("icon", [
  50185. _c(_vm.iconElement, { tag: "component", class: _vm.iconElement })
  50186. ])
  50187. ],
  50188. 2
  50189. ),
  50190. _vm.title || _vm.$slots.title
  50191. ? _c(
  50192. "div",
  50193. { staticClass: "el-result__title" },
  50194. [_vm._t("title", [_c("p", [_vm._v(_vm._s(_vm.title))])])],
  50195. 2
  50196. )
  50197. : _vm._e(),
  50198. _vm.subTitle || _vm.$slots.subTitle
  50199. ? _c(
  50200. "div",
  50201. { staticClass: "el-result__subtitle" },
  50202. [_vm._t("subTitle", [_c("p", [_vm._v(_vm._s(_vm.subTitle))])])],
  50203. 2
  50204. )
  50205. : _vm._e(),
  50206. _vm.$slots.extra
  50207. ? _c("div", { staticClass: "el-result__extra" }, [_vm._t("extra")], 2)
  50208. : _vm._e()
  50209. ])
  50210. }
  50211. var srcvue_type_template_id_3408b139_staticRenderFns = []
  50212. srcvue_type_template_id_3408b139_render._withStripped = true
  50213. // CONCATENATED MODULE: ./packages/result/src/index.vue?vue&type=template&id=3408b139&
  50214. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-success.vue?vue&type=template&id=18119418&
  50215. var icon_successvue_type_template_id_18119418_render = function() {
  50216. var _vm = this
  50217. var _h = _vm.$createElement
  50218. var _c = _vm._self._c || _h
  50219. return _c(
  50220. "svg",
  50221. { attrs: { viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" } },
  50222. [
  50223. _c("path", {
  50224. attrs: {
  50225. d:
  50226. "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M34.5548098,16.4485711 C33.9612228,15.8504763 32.9988282,15.8504763 32.4052412,16.4485711 L32.4052412,16.4485711 L21.413757,27.5805811 L21.413757,27.5805811 L21.4034642,27.590855 C21.0097542,27.9781674 20.3766105,27.9729811 19.9892981,27.5792711 L19.9892981,27.5792711 L15.5947588,23.1121428 C15.0011718,22.514048 14.0387772,22.514048 13.4451902,23.1121428 C12.8516033,23.7102376 12.8516033,24.6799409 13.4451902,25.2780357 L13.4451902,25.2780357 L19.6260786,31.5514289 C20.2196656,32.1495237 21.1820602,32.1495237 21.7756472,31.5514289 L21.7756472,31.5514289 L34.5548098,18.614464 C35.1483967,18.0163692 35.1483967,17.0466659 34.5548098,16.4485711 Z"
  50227. }
  50228. })
  50229. ]
  50230. )
  50231. }
  50232. var icon_successvue_type_template_id_18119418_staticRenderFns = []
  50233. icon_successvue_type_template_id_18119418_render._withStripped = true
  50234. // CONCATENATED MODULE: ./packages/result/src/icon-success.vue?vue&type=template&id=18119418&
  50235. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-success.vue?vue&type=script&lang=js&
  50236. //
  50237. //
  50238. //
  50239. //
  50240. //
  50241. //
  50242. //
  50243. //
  50244. /* harmony default export */ var icon_successvue_type_script_lang_js_ = ({
  50245. name: 'IconSuccess'
  50246. });
  50247. // CONCATENATED MODULE: ./packages/result/src/icon-success.vue?vue&type=script&lang=js&
  50248. /* harmony default export */ var src_icon_successvue_type_script_lang_js_ = (icon_successvue_type_script_lang_js_);
  50249. // CONCATENATED MODULE: ./packages/result/src/icon-success.vue
  50250. /* normalize component */
  50251. var icon_success_component = normalizeComponent(
  50252. src_icon_successvue_type_script_lang_js_,
  50253. icon_successvue_type_template_id_18119418_render,
  50254. icon_successvue_type_template_id_18119418_staticRenderFns,
  50255. false,
  50256. null,
  50257. null,
  50258. null
  50259. )
  50260. /* hot reload */
  50261. if (false) { var icon_success_api; }
  50262. icon_success_component.options.__file = "packages/result/src/icon-success.vue"
  50263. /* harmony default export */ var icon_success = (icon_success_component.exports);
  50264. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-error.vue?vue&type=template&id=21199246&
  50265. var icon_errorvue_type_template_id_21199246_render = function() {
  50266. var _vm = this
  50267. var _h = _vm.$createElement
  50268. var _c = _vm._self._c || _h
  50269. return _c(
  50270. "svg",
  50271. { attrs: { viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" } },
  50272. [
  50273. _c("path", {
  50274. attrs: {
  50275. d:
  50276. "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.57818,15.42182 C32.0157534,14.8593933 31.1038797,14.8593933 30.541453,15.42182 L30.541453,15.42182 L24.0006789,21.9625941 L17.458547,15.42182 C16.8961203,14.8593933 15.9842466,14.8593933 15.42182,15.42182 C14.8593933,15.9842466 14.8593933,16.8961203 15.42182,17.458547 L15.42182,17.458547 L21.9639519,23.9993211 L15.42182,30.541453 C14.8593933,31.1038797 14.8593933,32.0157534 15.42182,32.57818 C15.9842466,33.1406067 16.8961203,33.1406067 17.458547,32.57818 L17.458547,32.57818 L24.0006789,26.0360481 L30.541453,32.57818 C31.1038797,33.1406067 32.0157534,33.1406067 32.57818,32.57818 C33.1406067,32.0157534 33.1406067,31.1038797 32.57818,30.541453 L32.57818,30.541453 L26.0374059,23.9993211 L32.57818,17.458547 C33.1406067,16.8961203 33.1406067,15.9842466 32.57818,15.42182 Z"
  50277. }
  50278. })
  50279. ]
  50280. )
  50281. }
  50282. var icon_errorvue_type_template_id_21199246_staticRenderFns = []
  50283. icon_errorvue_type_template_id_21199246_render._withStripped = true
  50284. // CONCATENATED MODULE: ./packages/result/src/icon-error.vue?vue&type=template&id=21199246&
  50285. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-error.vue?vue&type=script&lang=js&
  50286. //
  50287. //
  50288. //
  50289. //
  50290. //
  50291. //
  50292. //
  50293. //
  50294. /* harmony default export */ var icon_errorvue_type_script_lang_js_ = ({
  50295. name: 'IconError'
  50296. });
  50297. // CONCATENATED MODULE: ./packages/result/src/icon-error.vue?vue&type=script&lang=js&
  50298. /* harmony default export */ var src_icon_errorvue_type_script_lang_js_ = (icon_errorvue_type_script_lang_js_);
  50299. // CONCATENATED MODULE: ./packages/result/src/icon-error.vue
  50300. /* normalize component */
  50301. var icon_error_component = normalizeComponent(
  50302. src_icon_errorvue_type_script_lang_js_,
  50303. icon_errorvue_type_template_id_21199246_render,
  50304. icon_errorvue_type_template_id_21199246_staticRenderFns,
  50305. false,
  50306. null,
  50307. null,
  50308. null
  50309. )
  50310. /* hot reload */
  50311. if (false) { var icon_error_api; }
  50312. icon_error_component.options.__file = "packages/result/src/icon-error.vue"
  50313. /* harmony default export */ var icon_error = (icon_error_component.exports);
  50314. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-warning.vue?vue&type=template&id=46fe8f31&
  50315. var icon_warningvue_type_template_id_46fe8f31_render = function() {
  50316. var _vm = this
  50317. var _h = _vm.$createElement
  50318. var _c = _vm._self._c || _h
  50319. return _c(
  50320. "svg",
  50321. { attrs: { viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" } },
  50322. [
  50323. _c("path", {
  50324. attrs: {
  50325. d:
  50326. "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M24,31 C22.8954305,31 22,31.8954305 22,33 C22,34.1045695 22.8954305,35 24,35 C25.1045695,35 26,34.1045695 26,33 C26,31.8954305 25.1045695,31 24,31 Z M24,14 C23.1715729,14 22.5,14.6715729 22.5,15.5 L22.5,15.5 L22.5,27.5 C22.5,28.3284271 23.1715729,29 24,29 C24.8284271,29 25.5,28.3284271 25.5,27.5 L25.5,27.5 L25.5,15.5 C25.5,14.6715729 24.8284271,14 24,14 Z"
  50327. }
  50328. })
  50329. ]
  50330. )
  50331. }
  50332. var icon_warningvue_type_template_id_46fe8f31_staticRenderFns = []
  50333. icon_warningvue_type_template_id_46fe8f31_render._withStripped = true
  50334. // CONCATENATED MODULE: ./packages/result/src/icon-warning.vue?vue&type=template&id=46fe8f31&
  50335. // CONCATENATED MODULE: ./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-warning.vue?vue&type=script&lang=ts&
  50336. /* harmony default export */ var icon_warningvue_type_script_lang_ts_ = ({
  50337. name: 'IconWarning'
  50338. });
  50339. // CONCATENATED MODULE: ./packages/result/src/icon-warning.vue?vue&type=script&lang=ts&
  50340. /* harmony default export */ var src_icon_warningvue_type_script_lang_ts_ = (icon_warningvue_type_script_lang_ts_);
  50341. // CONCATENATED MODULE: ./packages/result/src/icon-warning.vue
  50342. /* normalize component */
  50343. var icon_warning_component = normalizeComponent(
  50344. src_icon_warningvue_type_script_lang_ts_,
  50345. icon_warningvue_type_template_id_46fe8f31_render,
  50346. icon_warningvue_type_template_id_46fe8f31_staticRenderFns,
  50347. false,
  50348. null,
  50349. null,
  50350. null
  50351. )
  50352. /* hot reload */
  50353. if (false) { var icon_warning_api; }
  50354. icon_warning_component.options.__file = "packages/result/src/icon-warning.vue"
  50355. /* harmony default export */ var icon_warning = (icon_warning_component.exports);
  50356. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-info.vue?vue&type=template&id=19e3de69&
  50357. var icon_infovue_type_template_id_19e3de69_render = function() {
  50358. var _vm = this
  50359. var _h = _vm.$createElement
  50360. var _c = _vm._self._c || _h
  50361. return _c(
  50362. "svg",
  50363. { attrs: { viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" } },
  50364. [
  50365. _c("path", {
  50366. attrs: {
  50367. d:
  50368. "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M24,19 L21,19 C20.1715729,19 19.5,19.6715729 19.5,20.5 C19.5,21.3284271 20.1715729,22 21,22 L21,22 L22.5,22 L22.5,31 L21,31 C20.1715729,31 19.5,31.6715729 19.5,32.5 C19.5,33.3284271 20.1715729,34 21,34 L21,34 L27,34 C27.8284271,34 28.5,33.3284271 28.5,32.5 C28.5,31.6715729 27.8284271,31 27,31 L27,31 L25.5,31 L25.5,20.5 C25.5,19.6715729 24.8284271,19 24,19 L24,19 Z M24,13 C22.8954305,13 22,13.8954305 22,15 C22,16.1045695 22.8954305,17 24,17 C25.1045695,17 26,16.1045695 26,15 C26,13.8954305 25.1045695,13 24,13 Z"
  50369. }
  50370. })
  50371. ]
  50372. )
  50373. }
  50374. var icon_infovue_type_template_id_19e3de69_staticRenderFns = []
  50375. icon_infovue_type_template_id_19e3de69_render._withStripped = true
  50376. // CONCATENATED MODULE: ./packages/result/src/icon-info.vue?vue&type=template&id=19e3de69&
  50377. // CONCATENATED MODULE: ./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/icon-info.vue?vue&type=script&lang=ts&
  50378. /* harmony default export */ var icon_infovue_type_script_lang_ts_ = ({
  50379. name: 'IconInfo'
  50380. });
  50381. // CONCATENATED MODULE: ./packages/result/src/icon-info.vue?vue&type=script&lang=ts&
  50382. /* harmony default export */ var src_icon_infovue_type_script_lang_ts_ = (icon_infovue_type_script_lang_ts_);
  50383. // CONCATENATED MODULE: ./packages/result/src/icon-info.vue
  50384. /* normalize component */
  50385. var icon_info_component = normalizeComponent(
  50386. src_icon_infovue_type_script_lang_ts_,
  50387. icon_infovue_type_template_id_19e3de69_render,
  50388. icon_infovue_type_template_id_19e3de69_staticRenderFns,
  50389. false,
  50390. null,
  50391. null,
  50392. null
  50393. )
  50394. /* hot reload */
  50395. if (false) { var icon_info_api; }
  50396. icon_info_component.options.__file = "packages/result/src/icon-info.vue"
  50397. /* harmony default export */ var icon_info = (icon_info_component.exports);
  50398. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/result/src/index.vue?vue&type=script&lang=js&
  50399. var result_srcvue_type_script_lang_js_components;
  50400. //
  50401. //
  50402. //
  50403. //
  50404. //
  50405. //
  50406. //
  50407. //
  50408. //
  50409. //
  50410. //
  50411. //
  50412. //
  50413. //
  50414. //
  50415. //
  50416. //
  50417. //
  50418. //
  50419. //
  50420. //
  50421. //
  50422. var IconMap = {
  50423. success: 'icon-success',
  50424. warning: 'icon-warning',
  50425. error: 'icon-error',
  50426. info: 'icon-info'
  50427. };
  50428. /* harmony default export */ var result_srcvue_type_script_lang_js_ = ({
  50429. name: 'ElResult',
  50430. components: (result_srcvue_type_script_lang_js_components = {}, result_srcvue_type_script_lang_js_components[icon_success.name] = icon_success, result_srcvue_type_script_lang_js_components[icon_error.name] = icon_error, result_srcvue_type_script_lang_js_components[icon_warning.name] = icon_warning, result_srcvue_type_script_lang_js_components[icon_info.name] = icon_info, result_srcvue_type_script_lang_js_components),
  50431. props: {
  50432. title: {
  50433. type: String,
  50434. default: ''
  50435. },
  50436. subTitle: {
  50437. type: String,
  50438. default: ''
  50439. },
  50440. icon: {
  50441. type: String,
  50442. default: 'info'
  50443. }
  50444. },
  50445. computed: {
  50446. iconElement: function iconElement() {
  50447. var icon = this.icon;
  50448. return icon && IconMap[icon] ? IconMap[icon] : 'icon-info';
  50449. }
  50450. }
  50451. });
  50452. // CONCATENATED MODULE: ./packages/result/src/index.vue?vue&type=script&lang=js&
  50453. /* harmony default export */ var packages_result_srcvue_type_script_lang_js_ = (result_srcvue_type_script_lang_js_);
  50454. // CONCATENATED MODULE: ./packages/result/src/index.vue
  50455. /* normalize component */
  50456. var result_src_component = normalizeComponent(
  50457. packages_result_srcvue_type_script_lang_js_,
  50458. srcvue_type_template_id_3408b139_render,
  50459. srcvue_type_template_id_3408b139_staticRenderFns,
  50460. false,
  50461. null,
  50462. null,
  50463. null
  50464. )
  50465. /* hot reload */
  50466. if (false) { var result_src_api; }
  50467. result_src_component.options.__file = "packages/result/src/index.vue"
  50468. /* harmony default export */ var result_src = (result_src_component.exports);
  50469. // CONCATENATED MODULE: ./packages/result/index.js
  50470. /* istanbul ignore next */
  50471. result_src.install = function (Vue) {
  50472. Vue.component(result_src.name, result_src);
  50473. };
  50474. /* harmony default export */ var result = (result_src);
  50475. // CONCATENATED MODULE: ./src/index.js
  50476. /* Automatically generated by './build/bin/build-entry.js' */
  50477. var components = [packages_pagination, dialog, packages_autocomplete, packages_dropdown, packages_dropdown_menu, packages_dropdown_item, packages_menu, packages_submenu, packages_menu_item, packages_menu_item_group, packages_input, packages_input_number, packages_radio, packages_radio_group, packages_radio_button, packages_checkbox, packages_checkbox_button, packages_checkbox_group, packages_switch, packages_select, packages_option, packages_option_group, packages_button, packages_button_group, packages_table, packages_table_column, packages_date_picker, packages_time_select, packages_time_picker, popover, packages_tooltip, packages_breadcrumb, packages_breadcrumb_item, packages_form, packages_form_item, packages_tabs, packages_tab_pane, packages_tag, packages_tree, packages_alert, slider, packages_icon, packages_row, packages_col, packages_upload, packages_progress, packages_spinner, badge, card, rate, packages_steps, packages_step, carousel, scrollbar, carousel_item, packages_collapse, packages_collapse_item, packages_cascader, color_picker, transfer, packages_container, header, aside, packages_main, footer, timeline, timeline_item, packages_link, divider, packages_image, calendar, backtop, page_header, packages_cascader_panel, avatar, drawer, popconfirm, skeleton, skeleton_item, empty, descriptions, packages_descriptions_item, result, collapse_transition_default.a];
  50478. var src_install = function install(Vue) {
  50479. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  50480. lib_locale_default.a.use(opts.locale);
  50481. lib_locale_default.a.i18n(opts.i18n);
  50482. components.forEach(function (component) {
  50483. Vue.component(component.name, component);
  50484. });
  50485. Vue.use(infinite_scroll);
  50486. Vue.use(packages_loading.directive);
  50487. Vue.prototype.$ELEMENT = {
  50488. size: opts.size || '',
  50489. zIndex: opts.zIndex || 2000
  50490. };
  50491. Vue.prototype.$loading = packages_loading.service;
  50492. Vue.prototype.$msgbox = message_box;
  50493. Vue.prototype.$alert = message_box.alert;
  50494. Vue.prototype.$confirm = message_box.confirm;
  50495. Vue.prototype.$prompt = message_box.prompt;
  50496. Vue.prototype.$notify = notification;
  50497. Vue.prototype.$message = packages_message;
  50498. };
  50499. /* istanbul ignore if */
  50500. if (typeof window !== 'undefined' && window.Vue) {
  50501. src_install(window.Vue);
  50502. }
  50503. /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
  50504. version: '2.15.8',
  50505. locale: lib_locale_default.a.use,
  50506. i18n: lib_locale_default.a.i18n,
  50507. install: src_install,
  50508. CollapseTransition: collapse_transition_default.a,
  50509. Loading: packages_loading,
  50510. Pagination: packages_pagination,
  50511. Dialog: dialog,
  50512. Autocomplete: packages_autocomplete,
  50513. Dropdown: packages_dropdown,
  50514. DropdownMenu: packages_dropdown_menu,
  50515. DropdownItem: packages_dropdown_item,
  50516. Menu: packages_menu,
  50517. Submenu: packages_submenu,
  50518. MenuItem: packages_menu_item,
  50519. MenuItemGroup: packages_menu_item_group,
  50520. Input: packages_input,
  50521. InputNumber: packages_input_number,
  50522. Radio: packages_radio,
  50523. RadioGroup: packages_radio_group,
  50524. RadioButton: packages_radio_button,
  50525. Checkbox: packages_checkbox,
  50526. CheckboxButton: packages_checkbox_button,
  50527. CheckboxGroup: packages_checkbox_group,
  50528. Switch: packages_switch,
  50529. Select: packages_select,
  50530. Option: packages_option,
  50531. OptionGroup: packages_option_group,
  50532. Button: packages_button,
  50533. ButtonGroup: packages_button_group,
  50534. Table: packages_table,
  50535. TableColumn: packages_table_column,
  50536. DatePicker: packages_date_picker,
  50537. TimeSelect: packages_time_select,
  50538. TimePicker: packages_time_picker,
  50539. Popover: popover,
  50540. Tooltip: packages_tooltip,
  50541. MessageBox: message_box,
  50542. Breadcrumb: packages_breadcrumb,
  50543. BreadcrumbItem: packages_breadcrumb_item,
  50544. Form: packages_form,
  50545. FormItem: packages_form_item,
  50546. Tabs: packages_tabs,
  50547. TabPane: packages_tab_pane,
  50548. Tag: packages_tag,
  50549. Tree: packages_tree,
  50550. Alert: packages_alert,
  50551. Notification: notification,
  50552. Slider: slider,
  50553. Icon: packages_icon,
  50554. Row: packages_row,
  50555. Col: packages_col,
  50556. Upload: packages_upload,
  50557. Progress: packages_progress,
  50558. Spinner: packages_spinner,
  50559. Message: packages_message,
  50560. Badge: badge,
  50561. Card: card,
  50562. Rate: rate,
  50563. Steps: packages_steps,
  50564. Step: packages_step,
  50565. Carousel: carousel,
  50566. Scrollbar: scrollbar,
  50567. CarouselItem: carousel_item,
  50568. Collapse: packages_collapse,
  50569. CollapseItem: packages_collapse_item,
  50570. Cascader: packages_cascader,
  50571. ColorPicker: color_picker,
  50572. Transfer: transfer,
  50573. Container: packages_container,
  50574. Header: header,
  50575. Aside: aside,
  50576. Main: packages_main,
  50577. Footer: footer,
  50578. Timeline: timeline,
  50579. TimelineItem: timeline_item,
  50580. Link: packages_link,
  50581. Divider: divider,
  50582. Image: packages_image,
  50583. Calendar: calendar,
  50584. Backtop: backtop,
  50585. InfiniteScroll: infinite_scroll,
  50586. PageHeader: page_header,
  50587. CascaderPanel: packages_cascader_panel,
  50588. Avatar: avatar,
  50589. Drawer: drawer,
  50590. Popconfirm: popconfirm,
  50591. Skeleton: skeleton,
  50592. SkeletonItem: skeleton_item,
  50593. Empty: empty,
  50594. Descriptions: descriptions,
  50595. DescriptionsItem: packages_descriptions_item,
  50596. Result: result
  50597. });
  50598. /***/ })
  50599. /******/ ])["default"];
  50600. /***/ }),
  50601. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/input-number.js":
  50602. /*!************************************************************************!*\
  50603. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/input-number.js ***!
  50604. \************************************************************************/
  50605. /*! no static exports found */
  50606. /***/ (function(module, exports, __webpack_require__) {
  50607. module.exports =
  50608. /******/ (function(modules) { // webpackBootstrap
  50609. /******/ // The module cache
  50610. /******/ var installedModules = {};
  50611. /******/
  50612. /******/ // The require function
  50613. /******/ function __webpack_require__(moduleId) {
  50614. /******/
  50615. /******/ // Check if module is in cache
  50616. /******/ if(installedModules[moduleId]) {
  50617. /******/ return installedModules[moduleId].exports;
  50618. /******/ }
  50619. /******/ // Create a new module (and put it into the cache)
  50620. /******/ var module = installedModules[moduleId] = {
  50621. /******/ i: moduleId,
  50622. /******/ l: false,
  50623. /******/ exports: {}
  50624. /******/ };
  50625. /******/
  50626. /******/ // Execute the module function
  50627. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  50628. /******/
  50629. /******/ // Flag the module as loaded
  50630. /******/ module.l = true;
  50631. /******/
  50632. /******/ // Return the exports of the module
  50633. /******/ return module.exports;
  50634. /******/ }
  50635. /******/
  50636. /******/
  50637. /******/ // expose the modules object (__webpack_modules__)
  50638. /******/ __webpack_require__.m = modules;
  50639. /******/
  50640. /******/ // expose the module cache
  50641. /******/ __webpack_require__.c = installedModules;
  50642. /******/
  50643. /******/ // define getter function for harmony exports
  50644. /******/ __webpack_require__.d = function(exports, name, getter) {
  50645. /******/ if(!__webpack_require__.o(exports, name)) {
  50646. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  50647. /******/ }
  50648. /******/ };
  50649. /******/
  50650. /******/ // define __esModule on exports
  50651. /******/ __webpack_require__.r = function(exports) {
  50652. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  50653. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  50654. /******/ }
  50655. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50656. /******/ };
  50657. /******/
  50658. /******/ // create a fake namespace object
  50659. /******/ // mode & 1: value is a module id, require it
  50660. /******/ // mode & 2: merge all properties of value into the ns
  50661. /******/ // mode & 4: return value when already ns object
  50662. /******/ // mode & 8|1: behave like require
  50663. /******/ __webpack_require__.t = function(value, mode) {
  50664. /******/ if(mode & 1) value = __webpack_require__(value);
  50665. /******/ if(mode & 8) return value;
  50666. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  50667. /******/ var ns = Object.create(null);
  50668. /******/ __webpack_require__.r(ns);
  50669. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  50670. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  50671. /******/ return ns;
  50672. /******/ };
  50673. /******/
  50674. /******/ // getDefaultExport function for compatibility with non-harmony modules
  50675. /******/ __webpack_require__.n = function(module) {
  50676. /******/ var getter = module && module.__esModule ?
  50677. /******/ function getDefault() { return module['default']; } :
  50678. /******/ function getModuleExports() { return module; };
  50679. /******/ __webpack_require__.d(getter, 'a', getter);
  50680. /******/ return getter;
  50681. /******/ };
  50682. /******/
  50683. /******/ // Object.prototype.hasOwnProperty.call
  50684. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  50685. /******/
  50686. /******/ // __webpack_public_path__
  50687. /******/ __webpack_require__.p = "/dist/";
  50688. /******/
  50689. /******/
  50690. /******/ // Load entry module and return exports
  50691. /******/ return __webpack_require__(__webpack_require__.s = 86);
  50692. /******/ })
  50693. /************************************************************************/
  50694. /******/ ({
  50695. /***/ 0:
  50696. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  50697. "use strict";
  50698. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  50699. /* globals __VUE_SSR_CONTEXT__ */
  50700. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  50701. // This module is a runtime utility for cleaner component module output and will
  50702. // be included in the final webpack user bundle.
  50703. function normalizeComponent (
  50704. scriptExports,
  50705. render,
  50706. staticRenderFns,
  50707. functionalTemplate,
  50708. injectStyles,
  50709. scopeId,
  50710. moduleIdentifier, /* server only */
  50711. shadowMode /* vue-cli only */
  50712. ) {
  50713. // Vue.extend constructor export interop
  50714. var options = typeof scriptExports === 'function'
  50715. ? scriptExports.options
  50716. : scriptExports
  50717. // render functions
  50718. if (render) {
  50719. options.render = render
  50720. options.staticRenderFns = staticRenderFns
  50721. options._compiled = true
  50722. }
  50723. // functional template
  50724. if (functionalTemplate) {
  50725. options.functional = true
  50726. }
  50727. // scopedId
  50728. if (scopeId) {
  50729. options._scopeId = 'data-v-' + scopeId
  50730. }
  50731. var hook
  50732. if (moduleIdentifier) { // server build
  50733. hook = function (context) {
  50734. // 2.3 injection
  50735. context =
  50736. context || // cached call
  50737. (this.$vnode && this.$vnode.ssrContext) || // stateful
  50738. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  50739. // 2.2 with runInNewContext: true
  50740. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  50741. context = __VUE_SSR_CONTEXT__
  50742. }
  50743. // inject component styles
  50744. if (injectStyles) {
  50745. injectStyles.call(this, context)
  50746. }
  50747. // register component module identifier for async chunk inferrence
  50748. if (context && context._registeredComponents) {
  50749. context._registeredComponents.add(moduleIdentifier)
  50750. }
  50751. }
  50752. // used by ssr in case component is cached and beforeCreate
  50753. // never gets called
  50754. options._ssrRegister = hook
  50755. } else if (injectStyles) {
  50756. hook = shadowMode
  50757. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  50758. : injectStyles
  50759. }
  50760. if (hook) {
  50761. if (options.functional) {
  50762. // for template-only hot-reload because in that case the render fn doesn't
  50763. // go through the normalizer
  50764. options._injectStyles = hook
  50765. // register for functioal component in vue file
  50766. var originalRender = options.render
  50767. options.render = function renderWithStyleInjection (h, context) {
  50768. hook.call(context)
  50769. return originalRender(h, context)
  50770. }
  50771. } else {
  50772. // inject component registration as beforeCreate hook
  50773. var existing = options.beforeCreate
  50774. options.beforeCreate = existing
  50775. ? [].concat(existing, hook)
  50776. : [hook]
  50777. }
  50778. }
  50779. return {
  50780. exports: scriptExports,
  50781. options: options
  50782. }
  50783. }
  50784. /***/ }),
  50785. /***/ 10:
  50786. /***/ (function(module, exports) {
  50787. module.exports = __webpack_require__(/*! element-ui/lib/input */ "./node_modules/_element-ui@2.15.8@element-ui/lib/input.js");
  50788. /***/ }),
  50789. /***/ 2:
  50790. /***/ (function(module, exports) {
  50791. module.exports = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  50792. /***/ }),
  50793. /***/ 22:
  50794. /***/ (function(module, exports) {
  50795. module.exports = __webpack_require__(/*! element-ui/lib/mixins/focus */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/focus.js");
  50796. /***/ }),
  50797. /***/ 30:
  50798. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  50799. "use strict";
  50800. /* harmony import */ var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
  50801. /* harmony import */ var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__);
  50802. /* harmony default export */ __webpack_exports__["a"] = ({
  50803. bind: function bind(el, binding, vnode) {
  50804. var interval = null;
  50805. var startTime = void 0;
  50806. var handler = function handler() {
  50807. return vnode.context[binding.expression].apply();
  50808. };
  50809. var clear = function clear() {
  50810. if (Date.now() - startTime < 100) {
  50811. handler();
  50812. }
  50813. clearInterval(interval);
  50814. interval = null;
  50815. };
  50816. Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["on"])(el, 'mousedown', function (e) {
  50817. if (e.button !== 0) return;
  50818. startTime = Date.now();
  50819. Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["once"])(document, 'mouseup', clear);
  50820. clearInterval(interval);
  50821. interval = setInterval(handler, 100);
  50822. });
  50823. }
  50824. });
  50825. /***/ }),
  50826. /***/ 86:
  50827. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  50828. "use strict";
  50829. __webpack_require__.r(__webpack_exports__);
  50830. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
  50831. var render = function() {
  50832. var _vm = this
  50833. var _h = _vm.$createElement
  50834. var _c = _vm._self._c || _h
  50835. return _c(
  50836. "div",
  50837. {
  50838. class: [
  50839. "el-input-number",
  50840. _vm.inputNumberSize ? "el-input-number--" + _vm.inputNumberSize : "",
  50841. { "is-disabled": _vm.inputNumberDisabled },
  50842. { "is-without-controls": !_vm.controls },
  50843. { "is-controls-right": _vm.controlsAtRight }
  50844. ],
  50845. on: {
  50846. dragstart: function($event) {
  50847. $event.preventDefault()
  50848. }
  50849. }
  50850. },
  50851. [
  50852. _vm.controls
  50853. ? _c(
  50854. "span",
  50855. {
  50856. directives: [
  50857. {
  50858. name: "repeat-click",
  50859. rawName: "v-repeat-click",
  50860. value: _vm.decrease,
  50861. expression: "decrease"
  50862. }
  50863. ],
  50864. staticClass: "el-input-number__decrease",
  50865. class: { "is-disabled": _vm.minDisabled },
  50866. attrs: { role: "button" },
  50867. on: {
  50868. keydown: function($event) {
  50869. if (
  50870. !("button" in $event) &&
  50871. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  50872. ) {
  50873. return null
  50874. }
  50875. return _vm.decrease($event)
  50876. }
  50877. }
  50878. },
  50879. [
  50880. _c("i", {
  50881. class:
  50882. "el-icon-" + (_vm.controlsAtRight ? "arrow-down" : "minus")
  50883. })
  50884. ]
  50885. )
  50886. : _vm._e(),
  50887. _vm.controls
  50888. ? _c(
  50889. "span",
  50890. {
  50891. directives: [
  50892. {
  50893. name: "repeat-click",
  50894. rawName: "v-repeat-click",
  50895. value: _vm.increase,
  50896. expression: "increase"
  50897. }
  50898. ],
  50899. staticClass: "el-input-number__increase",
  50900. class: { "is-disabled": _vm.maxDisabled },
  50901. attrs: { role: "button" },
  50902. on: {
  50903. keydown: function($event) {
  50904. if (
  50905. !("button" in $event) &&
  50906. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  50907. ) {
  50908. return null
  50909. }
  50910. return _vm.increase($event)
  50911. }
  50912. }
  50913. },
  50914. [
  50915. _c("i", {
  50916. class: "el-icon-" + (_vm.controlsAtRight ? "arrow-up" : "plus")
  50917. })
  50918. ]
  50919. )
  50920. : _vm._e(),
  50921. _c("el-input", {
  50922. ref: "input",
  50923. attrs: {
  50924. value: _vm.displayValue,
  50925. placeholder: _vm.placeholder,
  50926. disabled: _vm.inputNumberDisabled,
  50927. size: _vm.inputNumberSize,
  50928. max: _vm.max,
  50929. min: _vm.min,
  50930. name: _vm.name,
  50931. label: _vm.label
  50932. },
  50933. on: {
  50934. blur: _vm.handleBlur,
  50935. focus: _vm.handleFocus,
  50936. input: _vm.handleInput,
  50937. change: _vm.handleInputChange
  50938. },
  50939. nativeOn: {
  50940. keydown: [
  50941. function($event) {
  50942. if (
  50943. !("button" in $event) &&
  50944. _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])
  50945. ) {
  50946. return null
  50947. }
  50948. $event.preventDefault()
  50949. return _vm.increase($event)
  50950. },
  50951. function($event) {
  50952. if (
  50953. !("button" in $event) &&
  50954. _vm._k($event.keyCode, "down", 40, $event.key, [
  50955. "Down",
  50956. "ArrowDown"
  50957. ])
  50958. ) {
  50959. return null
  50960. }
  50961. $event.preventDefault()
  50962. return _vm.decrease($event)
  50963. }
  50964. ]
  50965. }
  50966. })
  50967. ],
  50968. 1
  50969. )
  50970. }
  50971. var staticRenderFns = []
  50972. render._withStripped = true
  50973. // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
  50974. // EXTERNAL MODULE: external "element-ui/lib/input"
  50975. var input_ = __webpack_require__(10);
  50976. var input_default = /*#__PURE__*/__webpack_require__.n(input_);
  50977. // EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
  50978. var focus_ = __webpack_require__(22);
  50979. var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
  50980. // EXTERNAL MODULE: ./src/directives/repeat-click.js
  50981. var repeat_click = __webpack_require__(30);
  50982. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
  50983. //
  50984. //
  50985. //
  50986. //
  50987. //
  50988. //
  50989. //
  50990. //
  50991. //
  50992. //
  50993. //
  50994. //
  50995. //
  50996. //
  50997. //
  50998. //
  50999. //
  51000. //
  51001. //
  51002. //
  51003. //
  51004. //
  51005. //
  51006. //
  51007. //
  51008. //
  51009. //
  51010. //
  51011. //
  51012. //
  51013. //
  51014. //
  51015. //
  51016. //
  51017. //
  51018. //
  51019. //
  51020. //
  51021. //
  51022. //
  51023. //
  51024. //
  51025. //
  51026. //
  51027. //
  51028. //
  51029. //
  51030. /* harmony default export */ var input_numbervue_type_script_lang_js_ = ({
  51031. name: 'ElInputNumber',
  51032. mixins: [focus_default()('input')],
  51033. inject: {
  51034. elForm: {
  51035. default: ''
  51036. },
  51037. elFormItem: {
  51038. default: ''
  51039. }
  51040. },
  51041. directives: {
  51042. repeatClick: repeat_click["a" /* default */]
  51043. },
  51044. components: {
  51045. ElInput: input_default.a
  51046. },
  51047. props: {
  51048. step: {
  51049. type: Number,
  51050. default: 1
  51051. },
  51052. stepStrictly: {
  51053. type: Boolean,
  51054. default: false
  51055. },
  51056. max: {
  51057. type: Number,
  51058. default: Infinity
  51059. },
  51060. min: {
  51061. type: Number,
  51062. default: -Infinity
  51063. },
  51064. value: {},
  51065. disabled: Boolean,
  51066. size: String,
  51067. controls: {
  51068. type: Boolean,
  51069. default: true
  51070. },
  51071. controlsPosition: {
  51072. type: String,
  51073. default: ''
  51074. },
  51075. name: String,
  51076. label: String,
  51077. placeholder: String,
  51078. precision: {
  51079. type: Number,
  51080. validator: function validator(val) {
  51081. return val >= 0 && val === parseInt(val, 10);
  51082. }
  51083. }
  51084. },
  51085. data: function data() {
  51086. return {
  51087. currentValue: 0,
  51088. userInput: null
  51089. };
  51090. },
  51091. watch: {
  51092. value: {
  51093. immediate: true,
  51094. handler: function handler(value) {
  51095. var newVal = value === undefined ? value : Number(value);
  51096. if (newVal !== undefined) {
  51097. if (isNaN(newVal)) {
  51098. return;
  51099. }
  51100. if (this.stepStrictly) {
  51101. var stepPrecision = this.getPrecision(this.step);
  51102. var precisionFactor = Math.pow(10, stepPrecision);
  51103. newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
  51104. }
  51105. if (this.precision !== undefined) {
  51106. newVal = this.toPrecision(newVal, this.precision);
  51107. }
  51108. }
  51109. if (newVal >= this.max) newVal = this.max;
  51110. if (newVal <= this.min) newVal = this.min;
  51111. this.currentValue = newVal;
  51112. this.userInput = null;
  51113. this.$emit('input', newVal);
  51114. }
  51115. }
  51116. },
  51117. computed: {
  51118. minDisabled: function minDisabled() {
  51119. return this._decrease(this.value, this.step) < this.min;
  51120. },
  51121. maxDisabled: function maxDisabled() {
  51122. return this._increase(this.value, this.step) > this.max;
  51123. },
  51124. numPrecision: function numPrecision() {
  51125. var value = this.value,
  51126. step = this.step,
  51127. getPrecision = this.getPrecision,
  51128. precision = this.precision;
  51129. var stepPrecision = getPrecision(step);
  51130. if (precision !== undefined) {
  51131. if (stepPrecision > precision) {
  51132. console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
  51133. }
  51134. return precision;
  51135. } else {
  51136. return Math.max(getPrecision(value), stepPrecision);
  51137. }
  51138. },
  51139. controlsAtRight: function controlsAtRight() {
  51140. return this.controls && this.controlsPosition === 'right';
  51141. },
  51142. _elFormItemSize: function _elFormItemSize() {
  51143. return (this.elFormItem || {}).elFormItemSize;
  51144. },
  51145. inputNumberSize: function inputNumberSize() {
  51146. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  51147. },
  51148. inputNumberDisabled: function inputNumberDisabled() {
  51149. return this.disabled || !!(this.elForm || {}).disabled;
  51150. },
  51151. displayValue: function displayValue() {
  51152. if (this.userInput !== null) {
  51153. return this.userInput;
  51154. }
  51155. var currentValue = this.currentValue;
  51156. if (typeof currentValue === 'number') {
  51157. if (this.stepStrictly) {
  51158. var stepPrecision = this.getPrecision(this.step);
  51159. var precisionFactor = Math.pow(10, stepPrecision);
  51160. currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
  51161. }
  51162. if (this.precision !== undefined) {
  51163. currentValue = currentValue.toFixed(this.precision);
  51164. }
  51165. }
  51166. return currentValue;
  51167. }
  51168. },
  51169. methods: {
  51170. toPrecision: function toPrecision(num, precision) {
  51171. if (precision === undefined) precision = this.numPrecision;
  51172. return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
  51173. },
  51174. getPrecision: function getPrecision(value) {
  51175. if (value === undefined) return 0;
  51176. var valueString = value.toString();
  51177. var dotPosition = valueString.indexOf('.');
  51178. var precision = 0;
  51179. if (dotPosition !== -1) {
  51180. precision = valueString.length - dotPosition - 1;
  51181. }
  51182. return precision;
  51183. },
  51184. _increase: function _increase(val, step) {
  51185. if (typeof val !== 'number' && val !== undefined) return this.currentValue;
  51186. var precisionFactor = Math.pow(10, this.numPrecision);
  51187. // Solve the accuracy problem of JS decimal calculation by converting the value to integer.
  51188. return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
  51189. },
  51190. _decrease: function _decrease(val, step) {
  51191. if (typeof val !== 'number' && val !== undefined) return this.currentValue;
  51192. var precisionFactor = Math.pow(10, this.numPrecision);
  51193. return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
  51194. },
  51195. increase: function increase() {
  51196. if (this.inputNumberDisabled || this.maxDisabled) return;
  51197. var value = this.value || 0;
  51198. var newVal = this._increase(value, this.step);
  51199. this.setCurrentValue(newVal);
  51200. },
  51201. decrease: function decrease() {
  51202. if (this.inputNumberDisabled || this.minDisabled) return;
  51203. var value = this.value || 0;
  51204. var newVal = this._decrease(value, this.step);
  51205. this.setCurrentValue(newVal);
  51206. },
  51207. handleBlur: function handleBlur(event) {
  51208. this.$emit('blur', event);
  51209. },
  51210. handleFocus: function handleFocus(event) {
  51211. this.$emit('focus', event);
  51212. },
  51213. setCurrentValue: function setCurrentValue(newVal) {
  51214. var oldVal = this.currentValue;
  51215. if (typeof newVal === 'number' && this.precision !== undefined) {
  51216. newVal = this.toPrecision(newVal, this.precision);
  51217. }
  51218. if (newVal >= this.max) newVal = this.max;
  51219. if (newVal <= this.min) newVal = this.min;
  51220. if (oldVal === newVal) return;
  51221. this.userInput = null;
  51222. this.$emit('input', newVal);
  51223. this.$emit('change', newVal, oldVal);
  51224. this.currentValue = newVal;
  51225. },
  51226. handleInput: function handleInput(value) {
  51227. this.userInput = value;
  51228. },
  51229. handleInputChange: function handleInputChange(value) {
  51230. var newVal = value === '' ? undefined : Number(value);
  51231. if (!isNaN(newVal) || value === '') {
  51232. this.setCurrentValue(newVal);
  51233. }
  51234. this.userInput = null;
  51235. },
  51236. select: function select() {
  51237. this.$refs.input.select();
  51238. }
  51239. },
  51240. mounted: function mounted() {
  51241. var innerInput = this.$refs.input.$refs.input;
  51242. innerInput.setAttribute('role', 'spinbutton');
  51243. innerInput.setAttribute('aria-valuemax', this.max);
  51244. innerInput.setAttribute('aria-valuemin', this.min);
  51245. innerInput.setAttribute('aria-valuenow', this.currentValue);
  51246. innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
  51247. },
  51248. updated: function updated() {
  51249. if (!this.$refs || !this.$refs.input) return;
  51250. var innerInput = this.$refs.input.$refs.input;
  51251. innerInput.setAttribute('aria-valuenow', this.currentValue);
  51252. }
  51253. });
  51254. // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
  51255. /* harmony default export */ var src_input_numbervue_type_script_lang_js_ = (input_numbervue_type_script_lang_js_);
  51256. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  51257. var componentNormalizer = __webpack_require__(0);
  51258. // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue
  51259. /* normalize component */
  51260. var component = Object(componentNormalizer["a" /* default */])(
  51261. src_input_numbervue_type_script_lang_js_,
  51262. render,
  51263. staticRenderFns,
  51264. false,
  51265. null,
  51266. null,
  51267. null
  51268. )
  51269. /* hot reload */
  51270. if (false) { var api; }
  51271. component.options.__file = "packages/input-number/src/input-number.vue"
  51272. /* harmony default export */ var input_number = (component.exports);
  51273. // CONCATENATED MODULE: ./packages/input-number/index.js
  51274. /* istanbul ignore next */
  51275. input_number.install = function (Vue) {
  51276. Vue.component(input_number.name, input_number);
  51277. };
  51278. /* harmony default export */ var packages_input_number = __webpack_exports__["default"] = (input_number);
  51279. /***/ })
  51280. /******/ });
  51281. /***/ }),
  51282. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/input.js":
  51283. /*!*****************************************************************!*\
  51284. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/input.js ***!
  51285. \*****************************************************************/
  51286. /*! no static exports found */
  51287. /***/ (function(module, exports, __webpack_require__) {
  51288. module.exports =
  51289. /******/ (function(modules) { // webpackBootstrap
  51290. /******/ // The module cache
  51291. /******/ var installedModules = {};
  51292. /******/
  51293. /******/ // The require function
  51294. /******/ function __webpack_require__(moduleId) {
  51295. /******/
  51296. /******/ // Check if module is in cache
  51297. /******/ if(installedModules[moduleId]) {
  51298. /******/ return installedModules[moduleId].exports;
  51299. /******/ }
  51300. /******/ // Create a new module (and put it into the cache)
  51301. /******/ var module = installedModules[moduleId] = {
  51302. /******/ i: moduleId,
  51303. /******/ l: false,
  51304. /******/ exports: {}
  51305. /******/ };
  51306. /******/
  51307. /******/ // Execute the module function
  51308. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  51309. /******/
  51310. /******/ // Flag the module as loaded
  51311. /******/ module.l = true;
  51312. /******/
  51313. /******/ // Return the exports of the module
  51314. /******/ return module.exports;
  51315. /******/ }
  51316. /******/
  51317. /******/
  51318. /******/ // expose the modules object (__webpack_modules__)
  51319. /******/ __webpack_require__.m = modules;
  51320. /******/
  51321. /******/ // expose the module cache
  51322. /******/ __webpack_require__.c = installedModules;
  51323. /******/
  51324. /******/ // define getter function for harmony exports
  51325. /******/ __webpack_require__.d = function(exports, name, getter) {
  51326. /******/ if(!__webpack_require__.o(exports, name)) {
  51327. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  51328. /******/ }
  51329. /******/ };
  51330. /******/
  51331. /******/ // define __esModule on exports
  51332. /******/ __webpack_require__.r = function(exports) {
  51333. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  51334. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  51335. /******/ }
  51336. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  51337. /******/ };
  51338. /******/
  51339. /******/ // create a fake namespace object
  51340. /******/ // mode & 1: value is a module id, require it
  51341. /******/ // mode & 2: merge all properties of value into the ns
  51342. /******/ // mode & 4: return value when already ns object
  51343. /******/ // mode & 8|1: behave like require
  51344. /******/ __webpack_require__.t = function(value, mode) {
  51345. /******/ if(mode & 1) value = __webpack_require__(value);
  51346. /******/ if(mode & 8) return value;
  51347. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  51348. /******/ var ns = Object.create(null);
  51349. /******/ __webpack_require__.r(ns);
  51350. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  51351. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  51352. /******/ return ns;
  51353. /******/ };
  51354. /******/
  51355. /******/ // getDefaultExport function for compatibility with non-harmony modules
  51356. /******/ __webpack_require__.n = function(module) {
  51357. /******/ var getter = module && module.__esModule ?
  51358. /******/ function getDefault() { return module['default']; } :
  51359. /******/ function getModuleExports() { return module; };
  51360. /******/ __webpack_require__.d(getter, 'a', getter);
  51361. /******/ return getter;
  51362. /******/ };
  51363. /******/
  51364. /******/ // Object.prototype.hasOwnProperty.call
  51365. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  51366. /******/
  51367. /******/ // __webpack_public_path__
  51368. /******/ __webpack_require__.p = "/dist/";
  51369. /******/
  51370. /******/
  51371. /******/ // Load entry module and return exports
  51372. /******/ return __webpack_require__(__webpack_require__.s = 74);
  51373. /******/ })
  51374. /************************************************************************/
  51375. /******/ ({
  51376. /***/ 0:
  51377. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  51378. "use strict";
  51379. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  51380. /* globals __VUE_SSR_CONTEXT__ */
  51381. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  51382. // This module is a runtime utility for cleaner component module output and will
  51383. // be included in the final webpack user bundle.
  51384. function normalizeComponent (
  51385. scriptExports,
  51386. render,
  51387. staticRenderFns,
  51388. functionalTemplate,
  51389. injectStyles,
  51390. scopeId,
  51391. moduleIdentifier, /* server only */
  51392. shadowMode /* vue-cli only */
  51393. ) {
  51394. // Vue.extend constructor export interop
  51395. var options = typeof scriptExports === 'function'
  51396. ? scriptExports.options
  51397. : scriptExports
  51398. // render functions
  51399. if (render) {
  51400. options.render = render
  51401. options.staticRenderFns = staticRenderFns
  51402. options._compiled = true
  51403. }
  51404. // functional template
  51405. if (functionalTemplate) {
  51406. options.functional = true
  51407. }
  51408. // scopedId
  51409. if (scopeId) {
  51410. options._scopeId = 'data-v-' + scopeId
  51411. }
  51412. var hook
  51413. if (moduleIdentifier) { // server build
  51414. hook = function (context) {
  51415. // 2.3 injection
  51416. context =
  51417. context || // cached call
  51418. (this.$vnode && this.$vnode.ssrContext) || // stateful
  51419. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  51420. // 2.2 with runInNewContext: true
  51421. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  51422. context = __VUE_SSR_CONTEXT__
  51423. }
  51424. // inject component styles
  51425. if (injectStyles) {
  51426. injectStyles.call(this, context)
  51427. }
  51428. // register component module identifier for async chunk inferrence
  51429. if (context && context._registeredComponents) {
  51430. context._registeredComponents.add(moduleIdentifier)
  51431. }
  51432. }
  51433. // used by ssr in case component is cached and beforeCreate
  51434. // never gets called
  51435. options._ssrRegister = hook
  51436. } else if (injectStyles) {
  51437. hook = shadowMode
  51438. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  51439. : injectStyles
  51440. }
  51441. if (hook) {
  51442. if (options.functional) {
  51443. // for template-only hot-reload because in that case the render fn doesn't
  51444. // go through the normalizer
  51445. options._injectStyles = hook
  51446. // register for functioal component in vue file
  51447. var originalRender = options.render
  51448. options.render = function renderWithStyleInjection (h, context) {
  51449. hook.call(context)
  51450. return originalRender(h, context)
  51451. }
  51452. } else {
  51453. // inject component registration as beforeCreate hook
  51454. var existing = options.beforeCreate
  51455. options.beforeCreate = existing
  51456. ? [].concat(existing, hook)
  51457. : [hook]
  51458. }
  51459. }
  51460. return {
  51461. exports: scriptExports,
  51462. options: options
  51463. }
  51464. }
  51465. /***/ }),
  51466. /***/ 11:
  51467. /***/ (function(module, exports) {
  51468. module.exports = __webpack_require__(/*! element-ui/lib/mixins/migrating */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/migrating.js");
  51469. /***/ }),
  51470. /***/ 21:
  51471. /***/ (function(module, exports) {
  51472. module.exports = __webpack_require__(/*! element-ui/lib/utils/shared */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/shared.js");
  51473. /***/ }),
  51474. /***/ 4:
  51475. /***/ (function(module, exports) {
  51476. module.exports = __webpack_require__(/*! element-ui/lib/mixins/emitter */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js");
  51477. /***/ }),
  51478. /***/ 74:
  51479. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  51480. "use strict";
  51481. __webpack_require__.r(__webpack_exports__);
  51482. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=343dd774&
  51483. var render = function() {
  51484. var _vm = this
  51485. var _h = _vm.$createElement
  51486. var _c = _vm._self._c || _h
  51487. return _c(
  51488. "div",
  51489. {
  51490. class: [
  51491. _vm.type === "textarea" ? "el-textarea" : "el-input",
  51492. _vm.inputSize ? "el-input--" + _vm.inputSize : "",
  51493. {
  51494. "is-disabled": _vm.inputDisabled,
  51495. "is-exceed": _vm.inputExceed,
  51496. "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
  51497. "el-input-group--append": _vm.$slots.append,
  51498. "el-input-group--prepend": _vm.$slots.prepend,
  51499. "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
  51500. "el-input--suffix":
  51501. _vm.$slots.suffix ||
  51502. _vm.suffixIcon ||
  51503. _vm.clearable ||
  51504. _vm.showPassword
  51505. }
  51506. ],
  51507. on: {
  51508. mouseenter: function($event) {
  51509. _vm.hovering = true
  51510. },
  51511. mouseleave: function($event) {
  51512. _vm.hovering = false
  51513. }
  51514. }
  51515. },
  51516. [
  51517. _vm.type !== "textarea"
  51518. ? [
  51519. _vm.$slots.prepend
  51520. ? _c(
  51521. "div",
  51522. { staticClass: "el-input-group__prepend" },
  51523. [_vm._t("prepend")],
  51524. 2
  51525. )
  51526. : _vm._e(),
  51527. _vm.type !== "textarea"
  51528. ? _c(
  51529. "input",
  51530. _vm._b(
  51531. {
  51532. ref: "input",
  51533. staticClass: "el-input__inner",
  51534. attrs: {
  51535. tabindex: _vm.tabindex,
  51536. type: _vm.showPassword
  51537. ? _vm.passwordVisible
  51538. ? "text"
  51539. : "password"
  51540. : _vm.type,
  51541. disabled: _vm.inputDisabled,
  51542. readonly: _vm.readonly,
  51543. autocomplete: _vm.autoComplete || _vm.autocomplete,
  51544. "aria-label": _vm.label
  51545. },
  51546. on: {
  51547. compositionstart: _vm.handleCompositionStart,
  51548. compositionupdate: _vm.handleCompositionUpdate,
  51549. compositionend: _vm.handleCompositionEnd,
  51550. input: _vm.handleInput,
  51551. focus: _vm.handleFocus,
  51552. blur: _vm.handleBlur,
  51553. change: _vm.handleChange
  51554. }
  51555. },
  51556. "input",
  51557. _vm.$attrs,
  51558. false
  51559. )
  51560. )
  51561. : _vm._e(),
  51562. _vm.$slots.prefix || _vm.prefixIcon
  51563. ? _c(
  51564. "span",
  51565. { staticClass: "el-input__prefix" },
  51566. [
  51567. _vm._t("prefix"),
  51568. _vm.prefixIcon
  51569. ? _c("i", {
  51570. staticClass: "el-input__icon",
  51571. class: _vm.prefixIcon
  51572. })
  51573. : _vm._e()
  51574. ],
  51575. 2
  51576. )
  51577. : _vm._e(),
  51578. _vm.getSuffixVisible()
  51579. ? _c("span", { staticClass: "el-input__suffix" }, [
  51580. _c(
  51581. "span",
  51582. { staticClass: "el-input__suffix-inner" },
  51583. [
  51584. !_vm.showClear ||
  51585. !_vm.showPwdVisible ||
  51586. !_vm.isWordLimitVisible
  51587. ? [
  51588. _vm._t("suffix"),
  51589. _vm.suffixIcon
  51590. ? _c("i", {
  51591. staticClass: "el-input__icon",
  51592. class: _vm.suffixIcon
  51593. })
  51594. : _vm._e()
  51595. ]
  51596. : _vm._e(),
  51597. _vm.showClear
  51598. ? _c("i", {
  51599. staticClass:
  51600. "el-input__icon el-icon-circle-close el-input__clear",
  51601. on: {
  51602. mousedown: function($event) {
  51603. $event.preventDefault()
  51604. },
  51605. click: _vm.clear
  51606. }
  51607. })
  51608. : _vm._e(),
  51609. _vm.showPwdVisible
  51610. ? _c("i", {
  51611. staticClass:
  51612. "el-input__icon el-icon-view el-input__clear",
  51613. on: { click: _vm.handlePasswordVisible }
  51614. })
  51615. : _vm._e(),
  51616. _vm.isWordLimitVisible
  51617. ? _c("span", { staticClass: "el-input__count" }, [
  51618. _c(
  51619. "span",
  51620. { staticClass: "el-input__count-inner" },
  51621. [
  51622. _vm._v(
  51623. "\n " +
  51624. _vm._s(_vm.textLength) +
  51625. "/" +
  51626. _vm._s(_vm.upperLimit) +
  51627. "\n "
  51628. )
  51629. ]
  51630. )
  51631. ])
  51632. : _vm._e()
  51633. ],
  51634. 2
  51635. ),
  51636. _vm.validateState
  51637. ? _c("i", {
  51638. staticClass: "el-input__icon",
  51639. class: ["el-input__validateIcon", _vm.validateIcon]
  51640. })
  51641. : _vm._e()
  51642. ])
  51643. : _vm._e(),
  51644. _vm.$slots.append
  51645. ? _c(
  51646. "div",
  51647. { staticClass: "el-input-group__append" },
  51648. [_vm._t("append")],
  51649. 2
  51650. )
  51651. : _vm._e()
  51652. ]
  51653. : _c(
  51654. "textarea",
  51655. _vm._b(
  51656. {
  51657. ref: "textarea",
  51658. staticClass: "el-textarea__inner",
  51659. style: _vm.textareaStyle,
  51660. attrs: {
  51661. tabindex: _vm.tabindex,
  51662. disabled: _vm.inputDisabled,
  51663. readonly: _vm.readonly,
  51664. autocomplete: _vm.autoComplete || _vm.autocomplete,
  51665. "aria-label": _vm.label
  51666. },
  51667. on: {
  51668. compositionstart: _vm.handleCompositionStart,
  51669. compositionupdate: _vm.handleCompositionUpdate,
  51670. compositionend: _vm.handleCompositionEnd,
  51671. input: _vm.handleInput,
  51672. focus: _vm.handleFocus,
  51673. blur: _vm.handleBlur,
  51674. change: _vm.handleChange
  51675. }
  51676. },
  51677. "textarea",
  51678. _vm.$attrs,
  51679. false
  51680. )
  51681. ),
  51682. _vm.isWordLimitVisible && _vm.type === "textarea"
  51683. ? _c("span", { staticClass: "el-input__count" }, [
  51684. _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))
  51685. ])
  51686. : _vm._e()
  51687. ],
  51688. 2
  51689. )
  51690. }
  51691. var staticRenderFns = []
  51692. render._withStripped = true
  51693. // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=343dd774&
  51694. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  51695. var emitter_ = __webpack_require__(4);
  51696. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  51697. // EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
  51698. var migrating_ = __webpack_require__(11);
  51699. var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
  51700. // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
  51701. var hiddenTextarea = void 0;
  51702. var HIDDEN_STYLE = '\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
  51703. var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
  51704. function calculateNodeStyling(targetElement) {
  51705. var style = window.getComputedStyle(targetElement);
  51706. var boxSizing = style.getPropertyValue('box-sizing');
  51707. var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
  51708. var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
  51709. var contextStyle = CONTEXT_STYLE.map(function (name) {
  51710. return name + ':' + style.getPropertyValue(name);
  51711. }).join(';');
  51712. return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
  51713. }
  51714. function calcTextareaHeight(targetElement) {
  51715. var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  51716. var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  51717. if (!hiddenTextarea) {
  51718. hiddenTextarea = document.createElement('textarea');
  51719. document.body.appendChild(hiddenTextarea);
  51720. }
  51721. var _calculateNodeStyling = calculateNodeStyling(targetElement),
  51722. paddingSize = _calculateNodeStyling.paddingSize,
  51723. borderSize = _calculateNodeStyling.borderSize,
  51724. boxSizing = _calculateNodeStyling.boxSizing,
  51725. contextStyle = _calculateNodeStyling.contextStyle;
  51726. hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
  51727. hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
  51728. var height = hiddenTextarea.scrollHeight;
  51729. var result = {};
  51730. if (boxSizing === 'border-box') {
  51731. height = height + borderSize;
  51732. } else if (boxSizing === 'content-box') {
  51733. height = height - paddingSize;
  51734. }
  51735. hiddenTextarea.value = '';
  51736. var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  51737. if (minRows !== null) {
  51738. var minHeight = singleRowHeight * minRows;
  51739. if (boxSizing === 'border-box') {
  51740. minHeight = minHeight + paddingSize + borderSize;
  51741. }
  51742. height = Math.max(minHeight, height);
  51743. result.minHeight = minHeight + 'px';
  51744. }
  51745. if (maxRows !== null) {
  51746. var maxHeight = singleRowHeight * maxRows;
  51747. if (boxSizing === 'border-box') {
  51748. maxHeight = maxHeight + paddingSize + borderSize;
  51749. }
  51750. height = Math.min(maxHeight, height);
  51751. }
  51752. result.height = height + 'px';
  51753. hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
  51754. hiddenTextarea = null;
  51755. return result;
  51756. };
  51757. // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
  51758. var merge_ = __webpack_require__(9);
  51759. var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
  51760. // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
  51761. var shared_ = __webpack_require__(21);
  51762. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&
  51763. //
  51764. //
  51765. //
  51766. //
  51767. //
  51768. //
  51769. //
  51770. //
  51771. //
  51772. //
  51773. //
  51774. //
  51775. //
  51776. //
  51777. //
  51778. //
  51779. //
  51780. //
  51781. //
  51782. //
  51783. //
  51784. //
  51785. //
  51786. //
  51787. //
  51788. //
  51789. //
  51790. //
  51791. //
  51792. //
  51793. //
  51794. //
  51795. //
  51796. //
  51797. //
  51798. //
  51799. //
  51800. //
  51801. //
  51802. //
  51803. //
  51804. //
  51805. //
  51806. //
  51807. //
  51808. //
  51809. //
  51810. //
  51811. //
  51812. //
  51813. //
  51814. //
  51815. //
  51816. //
  51817. //
  51818. //
  51819. //
  51820. //
  51821. //
  51822. //
  51823. //
  51824. //
  51825. //
  51826. //
  51827. //
  51828. //
  51829. //
  51830. //
  51831. //
  51832. //
  51833. //
  51834. //
  51835. //
  51836. //
  51837. //
  51838. //
  51839. //
  51840. //
  51841. //
  51842. //
  51843. //
  51844. //
  51845. //
  51846. //
  51847. //
  51848. //
  51849. //
  51850. //
  51851. //
  51852. //
  51853. //
  51854. //
  51855. //
  51856. //
  51857. //
  51858. //
  51859. //
  51860. //
  51861. //
  51862. //
  51863. //
  51864. //
  51865. //
  51866. //
  51867. //
  51868. //
  51869. //
  51870. //
  51871. //
  51872. /* harmony default export */ var inputvue_type_script_lang_js_ = ({
  51873. name: 'ElInput',
  51874. componentName: 'ElInput',
  51875. mixins: [emitter_default.a, migrating_default.a],
  51876. inheritAttrs: false,
  51877. inject: {
  51878. elForm: {
  51879. default: ''
  51880. },
  51881. elFormItem: {
  51882. default: ''
  51883. }
  51884. },
  51885. data: function data() {
  51886. return {
  51887. textareaCalcStyle: {},
  51888. hovering: false,
  51889. focused: false,
  51890. isComposing: false,
  51891. passwordVisible: false
  51892. };
  51893. },
  51894. props: {
  51895. value: [String, Number],
  51896. size: String,
  51897. resize: String,
  51898. form: String,
  51899. disabled: Boolean,
  51900. readonly: Boolean,
  51901. type: {
  51902. type: String,
  51903. default: 'text'
  51904. },
  51905. autosize: {
  51906. type: [Boolean, Object],
  51907. default: false
  51908. },
  51909. autocomplete: {
  51910. type: String,
  51911. default: 'off'
  51912. },
  51913. /** @Deprecated in next major version */
  51914. autoComplete: {
  51915. type: String,
  51916. validator: function validator(val) {
  51917. false && false;
  51918. return true;
  51919. }
  51920. },
  51921. validateEvent: {
  51922. type: Boolean,
  51923. default: true
  51924. },
  51925. suffixIcon: String,
  51926. prefixIcon: String,
  51927. label: String,
  51928. clearable: {
  51929. type: Boolean,
  51930. default: false
  51931. },
  51932. showPassword: {
  51933. type: Boolean,
  51934. default: false
  51935. },
  51936. showWordLimit: {
  51937. type: Boolean,
  51938. default: false
  51939. },
  51940. tabindex: String
  51941. },
  51942. computed: {
  51943. _elFormItemSize: function _elFormItemSize() {
  51944. return (this.elFormItem || {}).elFormItemSize;
  51945. },
  51946. validateState: function validateState() {
  51947. return this.elFormItem ? this.elFormItem.validateState : '';
  51948. },
  51949. needStatusIcon: function needStatusIcon() {
  51950. return this.elForm ? this.elForm.statusIcon : false;
  51951. },
  51952. validateIcon: function validateIcon() {
  51953. return {
  51954. validating: 'el-icon-loading',
  51955. success: 'el-icon-circle-check',
  51956. error: 'el-icon-circle-close'
  51957. }[this.validateState];
  51958. },
  51959. textareaStyle: function textareaStyle() {
  51960. return merge_default()({}, this.textareaCalcStyle, { resize: this.resize });
  51961. },
  51962. inputSize: function inputSize() {
  51963. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  51964. },
  51965. inputDisabled: function inputDisabled() {
  51966. return this.disabled || (this.elForm || {}).disabled;
  51967. },
  51968. nativeInputValue: function nativeInputValue() {
  51969. return this.value === null || this.value === undefined ? '' : String(this.value);
  51970. },
  51971. showClear: function showClear() {
  51972. return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
  51973. },
  51974. showPwdVisible: function showPwdVisible() {
  51975. return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
  51976. },
  51977. isWordLimitVisible: function isWordLimitVisible() {
  51978. return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
  51979. },
  51980. upperLimit: function upperLimit() {
  51981. return this.$attrs.maxlength;
  51982. },
  51983. textLength: function textLength() {
  51984. if (typeof this.value === 'number') {
  51985. return String(this.value).length;
  51986. }
  51987. return (this.value || '').length;
  51988. },
  51989. inputExceed: function inputExceed() {
  51990. // show exceed style if length of initial value greater then maxlength
  51991. return this.isWordLimitVisible && this.textLength > this.upperLimit;
  51992. }
  51993. },
  51994. watch: {
  51995. value: function value(val) {
  51996. this.$nextTick(this.resizeTextarea);
  51997. if (this.validateEvent) {
  51998. this.dispatch('ElFormItem', 'el.form.change', [val]);
  51999. }
  52000. },
  52001. // native input value is set explicitly
  52002. // do not use v-model / :value in template
  52003. // see: https://github.com/ElemeFE/element/issues/14521
  52004. nativeInputValue: function nativeInputValue() {
  52005. this.setNativeInputValue();
  52006. },
  52007. // when change between <input> and <textarea>,
  52008. // update DOM dependent value and styles
  52009. // https://github.com/ElemeFE/element/issues/14857
  52010. type: function type() {
  52011. var _this = this;
  52012. this.$nextTick(function () {
  52013. _this.setNativeInputValue();
  52014. _this.resizeTextarea();
  52015. _this.updateIconOffset();
  52016. });
  52017. }
  52018. },
  52019. methods: {
  52020. focus: function focus() {
  52021. this.getInput().focus();
  52022. },
  52023. blur: function blur() {
  52024. this.getInput().blur();
  52025. },
  52026. getMigratingConfig: function getMigratingConfig() {
  52027. return {
  52028. props: {
  52029. 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
  52030. 'on-icon-click': 'on-icon-click is removed.'
  52031. },
  52032. events: {
  52033. 'click': 'click is removed.'
  52034. }
  52035. };
  52036. },
  52037. handleBlur: function handleBlur(event) {
  52038. this.focused = false;
  52039. this.$emit('blur', event);
  52040. if (this.validateEvent) {
  52041. this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
  52042. }
  52043. },
  52044. select: function select() {
  52045. this.getInput().select();
  52046. },
  52047. resizeTextarea: function resizeTextarea() {
  52048. if (this.$isServer) return;
  52049. var autosize = this.autosize,
  52050. type = this.type;
  52051. if (type !== 'textarea') return;
  52052. if (!autosize) {
  52053. this.textareaCalcStyle = {
  52054. minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
  52055. };
  52056. return;
  52057. }
  52058. var minRows = autosize.minRows;
  52059. var maxRows = autosize.maxRows;
  52060. this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
  52061. },
  52062. setNativeInputValue: function setNativeInputValue() {
  52063. var input = this.getInput();
  52064. if (!input) return;
  52065. if (input.value === this.nativeInputValue) return;
  52066. input.value = this.nativeInputValue;
  52067. },
  52068. handleFocus: function handleFocus(event) {
  52069. this.focused = true;
  52070. this.$emit('focus', event);
  52071. },
  52072. handleCompositionStart: function handleCompositionStart(event) {
  52073. this.$emit('compositionstart', event);
  52074. this.isComposing = true;
  52075. },
  52076. handleCompositionUpdate: function handleCompositionUpdate(event) {
  52077. this.$emit('compositionupdate', event);
  52078. var text = event.target.value;
  52079. var lastCharacter = text[text.length - 1] || '';
  52080. this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
  52081. },
  52082. handleCompositionEnd: function handleCompositionEnd(event) {
  52083. this.$emit('compositionend', event);
  52084. if (this.isComposing) {
  52085. this.isComposing = false;
  52086. this.handleInput(event);
  52087. }
  52088. },
  52089. handleInput: function handleInput(event) {
  52090. // should not emit input during composition
  52091. // see: https://github.com/ElemeFE/element/issues/10516
  52092. if (this.isComposing) return;
  52093. // hack for https://github.com/ElemeFE/element/issues/8548
  52094. // should remove the following line when we don't support IE
  52095. if (event.target.value === this.nativeInputValue) return;
  52096. this.$emit('input', event.target.value);
  52097. // ensure native input value is controlled
  52098. // see: https://github.com/ElemeFE/element/issues/12850
  52099. this.$nextTick(this.setNativeInputValue);
  52100. },
  52101. handleChange: function handleChange(event) {
  52102. this.$emit('change', event.target.value);
  52103. },
  52104. calcIconOffset: function calcIconOffset(place) {
  52105. var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
  52106. if (!elList.length) return;
  52107. var el = null;
  52108. for (var i = 0; i < elList.length; i++) {
  52109. if (elList[i].parentNode === this.$el) {
  52110. el = elList[i];
  52111. break;
  52112. }
  52113. }
  52114. if (!el) return;
  52115. var pendantMap = {
  52116. suffix: 'append',
  52117. prefix: 'prepend'
  52118. };
  52119. var pendant = pendantMap[place];
  52120. if (this.$slots[pendant]) {
  52121. el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
  52122. } else {
  52123. el.removeAttribute('style');
  52124. }
  52125. },
  52126. updateIconOffset: function updateIconOffset() {
  52127. this.calcIconOffset('prefix');
  52128. this.calcIconOffset('suffix');
  52129. },
  52130. clear: function clear() {
  52131. this.$emit('input', '');
  52132. this.$emit('change', '');
  52133. this.$emit('clear');
  52134. },
  52135. handlePasswordVisible: function handlePasswordVisible() {
  52136. var _this2 = this;
  52137. this.passwordVisible = !this.passwordVisible;
  52138. this.$nextTick(function () {
  52139. _this2.focus();
  52140. });
  52141. },
  52142. getInput: function getInput() {
  52143. return this.$refs.input || this.$refs.textarea;
  52144. },
  52145. getSuffixVisible: function getSuffixVisible() {
  52146. return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
  52147. }
  52148. },
  52149. created: function created() {
  52150. this.$on('inputSelect', this.select);
  52151. },
  52152. mounted: function mounted() {
  52153. this.setNativeInputValue();
  52154. this.resizeTextarea();
  52155. this.updateIconOffset();
  52156. },
  52157. updated: function updated() {
  52158. this.$nextTick(this.updateIconOffset);
  52159. }
  52160. });
  52161. // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&
  52162. /* harmony default export */ var src_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
  52163. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  52164. var componentNormalizer = __webpack_require__(0);
  52165. // CONCATENATED MODULE: ./packages/input/src/input.vue
  52166. /* normalize component */
  52167. var component = Object(componentNormalizer["a" /* default */])(
  52168. src_inputvue_type_script_lang_js_,
  52169. render,
  52170. staticRenderFns,
  52171. false,
  52172. null,
  52173. null,
  52174. null
  52175. )
  52176. /* hot reload */
  52177. if (false) { var api; }
  52178. component.options.__file = "packages/input/src/input.vue"
  52179. /* harmony default export */ var input = (component.exports);
  52180. // CONCATENATED MODULE: ./packages/input/index.js
  52181. /* istanbul ignore next */
  52182. input.install = function (Vue) {
  52183. Vue.component(input.name, input);
  52184. };
  52185. /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
  52186. /***/ }),
  52187. /***/ 9:
  52188. /***/ (function(module, exports) {
  52189. module.exports = __webpack_require__(/*! element-ui/lib/utils/merge */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/merge.js");
  52190. /***/ })
  52191. /******/ });
  52192. /***/ }),
  52193. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/format.js":
  52194. /*!*************************************************************************!*\
  52195. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/locale/format.js ***!
  52196. \*************************************************************************/
  52197. /*! no static exports found */
  52198. /***/ (function(module, exports, __webpack_require__) {
  52199. "use strict";
  52200. exports.__esModule = true;
  52201. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  52202. exports.default = function (Vue) {
  52203. /**
  52204. * template
  52205. *
  52206. * @param {String} string
  52207. * @param {Array} ...args
  52208. * @return {String}
  52209. */
  52210. function template(string) {
  52211. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  52212. args[_key - 1] = arguments[_key];
  52213. }
  52214. if (args.length === 1 && _typeof(args[0]) === 'object') {
  52215. args = args[0];
  52216. }
  52217. if (!args || !args.hasOwnProperty) {
  52218. args = {};
  52219. }
  52220. return string.replace(RE_NARGS, function (match, prefix, i, index) {
  52221. var result = void 0;
  52222. if (string[index - 1] === '{' && string[index + match.length] === '}') {
  52223. return i;
  52224. } else {
  52225. result = (0, _util.hasOwn)(args, i) ? args[i] : null;
  52226. if (result === null || result === undefined) {
  52227. return '';
  52228. }
  52229. return result;
  52230. }
  52231. });
  52232. }
  52233. return template;
  52234. };
  52235. var _util = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  52236. var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
  52237. /**
  52238. * String format template
  52239. * - Inspired:
  52240. * https://github.com/Matt-Esch/string-template/index.js
  52241. */
  52242. /***/ }),
  52243. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/index.js":
  52244. /*!************************************************************************!*\
  52245. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/locale/index.js ***!
  52246. \************************************************************************/
  52247. /*! no static exports found */
  52248. /***/ (function(module, exports, __webpack_require__) {
  52249. "use strict";
  52250. exports.__esModule = true;
  52251. exports.i18n = exports.use = exports.t = undefined;
  52252. var _zhCN = __webpack_require__(/*! element-ui/lib/locale/lang/zh-CN */ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/lang/zh-CN.js");
  52253. var _zhCN2 = _interopRequireDefault(_zhCN);
  52254. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  52255. var _vue2 = _interopRequireDefault(_vue);
  52256. var _deepmerge = __webpack_require__(/*! deepmerge */ "./node_modules/_deepmerge@1.5.2@deepmerge/dist/cjs.js");
  52257. var _deepmerge2 = _interopRequireDefault(_deepmerge);
  52258. var _format = __webpack_require__(/*! ./format */ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/format.js");
  52259. var _format2 = _interopRequireDefault(_format);
  52260. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  52261. var format = (0, _format2.default)(_vue2.default);
  52262. var lang = _zhCN2.default;
  52263. var merged = false;
  52264. var i18nHandler = function i18nHandler() {
  52265. var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;
  52266. if (typeof vuei18n === 'function' && !!_vue2.default.locale) {
  52267. if (!merged) {
  52268. merged = true;
  52269. _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, { clone: true }));
  52270. }
  52271. return vuei18n.apply(this, arguments);
  52272. }
  52273. };
  52274. var t = exports.t = function t(path, options) {
  52275. var value = i18nHandler.apply(this, arguments);
  52276. if (value !== null && value !== undefined) return value;
  52277. var array = path.split('.');
  52278. var current = lang;
  52279. for (var i = 0, j = array.length; i < j; i++) {
  52280. var property = array[i];
  52281. value = current[property];
  52282. if (i === j - 1) return format(value, options);
  52283. if (!value) return '';
  52284. current = value;
  52285. }
  52286. return '';
  52287. };
  52288. var use = exports.use = function use(l) {
  52289. lang = l || lang;
  52290. };
  52291. var i18n = exports.i18n = function i18n(fn) {
  52292. i18nHandler = fn || i18nHandler;
  52293. };
  52294. exports.default = { use: use, t: t, i18n: i18n };
  52295. /***/ }),
  52296. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/lang/zh-CN.js":
  52297. /*!*****************************************************************************!*\
  52298. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/locale/lang/zh-CN.js ***!
  52299. \*****************************************************************************/
  52300. /*! no static exports found */
  52301. /***/ (function(module, exports, __webpack_require__) {
  52302. "use strict";
  52303. exports.__esModule = true;
  52304. exports.default = {
  52305. el: {
  52306. colorpicker: {
  52307. confirm: '确定',
  52308. clear: '清空'
  52309. },
  52310. datepicker: {
  52311. now: '此刻',
  52312. today: '今天',
  52313. cancel: '取消',
  52314. clear: '清空',
  52315. confirm: '确定',
  52316. selectDate: '选择日期',
  52317. selectTime: '选择时间',
  52318. startDate: '开始日期',
  52319. startTime: '开始时间',
  52320. endDate: '结束日期',
  52321. endTime: '结束时间',
  52322. prevYear: '前一年',
  52323. nextYear: '后一年',
  52324. prevMonth: '上个月',
  52325. nextMonth: '下个月',
  52326. year: '年',
  52327. month1: '1 月',
  52328. month2: '2 月',
  52329. month3: '3 月',
  52330. month4: '4 月',
  52331. month5: '5 月',
  52332. month6: '6 月',
  52333. month7: '7 月',
  52334. month8: '8 月',
  52335. month9: '9 月',
  52336. month10: '10 月',
  52337. month11: '11 月',
  52338. month12: '12 月',
  52339. // week: '周次',
  52340. weeks: {
  52341. sun: '日',
  52342. mon: '一',
  52343. tue: '二',
  52344. wed: '三',
  52345. thu: '四',
  52346. fri: '五',
  52347. sat: '六'
  52348. },
  52349. months: {
  52350. jan: '一月',
  52351. feb: '二月',
  52352. mar: '三月',
  52353. apr: '四月',
  52354. may: '五月',
  52355. jun: '六月',
  52356. jul: '七月',
  52357. aug: '八月',
  52358. sep: '九月',
  52359. oct: '十月',
  52360. nov: '十一月',
  52361. dec: '十二月'
  52362. }
  52363. },
  52364. select: {
  52365. loading: '加载中',
  52366. noMatch: '无匹配数据',
  52367. noData: '无数据',
  52368. placeholder: '请选择'
  52369. },
  52370. cascader: {
  52371. noMatch: '无匹配数据',
  52372. loading: '加载中',
  52373. placeholder: '请选择',
  52374. noData: '暂无数据'
  52375. },
  52376. pagination: {
  52377. goto: '前往',
  52378. pagesize: '条/页',
  52379. total: '共 {total} 条',
  52380. pageClassifier: '页'
  52381. },
  52382. messagebox: {
  52383. title: '提示',
  52384. confirm: '确定',
  52385. cancel: '取消',
  52386. error: '输入的数据不合法!'
  52387. },
  52388. upload: {
  52389. deleteTip: '按 delete 键可删除',
  52390. delete: '删除',
  52391. preview: '查看图片',
  52392. continue: '继续上传'
  52393. },
  52394. table: {
  52395. emptyText: '暂无数据',
  52396. confirmFilter: '筛选',
  52397. resetFilter: '重置',
  52398. clearFilter: '全部',
  52399. sumText: '合计'
  52400. },
  52401. tree: {
  52402. emptyText: '暂无数据'
  52403. },
  52404. transfer: {
  52405. noMatch: '无匹配数据',
  52406. noData: '无数据',
  52407. titles: ['列表 1', '列表 2'],
  52408. filterPlaceholder: '请输入搜索内容',
  52409. noCheckedFormat: '共 {total} 项',
  52410. hasCheckedFormat: '已选 {checked}/{total} 项'
  52411. },
  52412. image: {
  52413. error: '加载失败'
  52414. },
  52415. pageHeader: {
  52416. title: '返回'
  52417. },
  52418. popconfirm: {
  52419. confirmButtonText: '确定',
  52420. cancelButtonText: '取消'
  52421. },
  52422. empty: {
  52423. description: '暂无数据'
  52424. }
  52425. }
  52426. };
  52427. /***/ }),
  52428. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js":
  52429. /*!**************************************************************************!*\
  52430. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js ***!
  52431. \**************************************************************************/
  52432. /*! no static exports found */
  52433. /***/ (function(module, exports, __webpack_require__) {
  52434. "use strict";
  52435. exports.__esModule = true;
  52436. function _broadcast(componentName, eventName, params) {
  52437. this.$children.forEach(function (child) {
  52438. var name = child.$options.componentName;
  52439. if (name === componentName) {
  52440. child.$emit.apply(child, [eventName].concat(params));
  52441. } else {
  52442. _broadcast.apply(child, [componentName, eventName].concat([params]));
  52443. }
  52444. });
  52445. }
  52446. exports.default = {
  52447. methods: {
  52448. dispatch: function dispatch(componentName, eventName, params) {
  52449. var parent = this.$parent || this.$root;
  52450. var name = parent.$options.componentName;
  52451. while (parent && (!name || name !== componentName)) {
  52452. parent = parent.$parent;
  52453. if (parent) {
  52454. name = parent.$options.componentName;
  52455. }
  52456. }
  52457. if (parent) {
  52458. parent.$emit.apply(parent, [eventName].concat(params));
  52459. }
  52460. },
  52461. broadcast: function broadcast(componentName, eventName, params) {
  52462. _broadcast.call(this, componentName, eventName, params);
  52463. }
  52464. }
  52465. };
  52466. /***/ }),
  52467. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/focus.js":
  52468. /*!************************************************************************!*\
  52469. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/focus.js ***!
  52470. \************************************************************************/
  52471. /*! no static exports found */
  52472. /***/ (function(module, exports, __webpack_require__) {
  52473. "use strict";
  52474. exports.__esModule = true;
  52475. exports.default = function (ref) {
  52476. return {
  52477. methods: {
  52478. focus: function focus() {
  52479. this.$refs[ref].focus();
  52480. }
  52481. }
  52482. };
  52483. };
  52484. ;
  52485. /***/ }),
  52486. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/locale.js":
  52487. /*!*************************************************************************!*\
  52488. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/locale.js ***!
  52489. \*************************************************************************/
  52490. /*! no static exports found */
  52491. /***/ (function(module, exports, __webpack_require__) {
  52492. "use strict";
  52493. exports.__esModule = true;
  52494. var _locale = __webpack_require__(/*! element-ui/lib/locale */ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/index.js");
  52495. exports.default = {
  52496. methods: {
  52497. t: function t() {
  52498. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  52499. args[_key] = arguments[_key];
  52500. }
  52501. return _locale.t.apply(this, args);
  52502. }
  52503. }
  52504. };
  52505. /***/ }),
  52506. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/migrating.js":
  52507. /*!****************************************************************************!*\
  52508. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/migrating.js ***!
  52509. \****************************************************************************/
  52510. /*! no static exports found */
  52511. /***/ (function(module, exports, __webpack_require__) {
  52512. "use strict";
  52513. exports.__esModule = true;
  52514. var _util = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  52515. /**
  52516. * Show migrating guide in browser console.
  52517. *
  52518. * Usage:
  52519. * import Migrating from 'element-ui/src/mixins/migrating';
  52520. *
  52521. * mixins: [Migrating]
  52522. *
  52523. * add getMigratingConfig method for your component.
  52524. * getMigratingConfig() {
  52525. * return {
  52526. * props: {
  52527. * 'allow-no-selection': 'allow-no-selection is removed.',
  52528. * 'selection-mode': 'selection-mode is removed.'
  52529. * },
  52530. * events: {
  52531. * selectionchange: 'selectionchange is renamed to selection-change.'
  52532. * }
  52533. * };
  52534. * },
  52535. */
  52536. exports.default = {
  52537. mounted: function mounted() {
  52538. if (false) {}
  52539. if (!this.$vnode) return;
  52540. var _getMigratingConfig = this.getMigratingConfig(),
  52541. _getMigratingConfig$p = _getMigratingConfig.props,
  52542. props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
  52543. _getMigratingConfig$e = _getMigratingConfig.events,
  52544. events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
  52545. var _$vnode = this.$vnode,
  52546. data = _$vnode.data,
  52547. componentOptions = _$vnode.componentOptions;
  52548. var definedProps = data.attrs || {};
  52549. var definedEvents = componentOptions.listeners || {};
  52550. for (var propName in definedProps) {
  52551. propName = (0, _util.kebabCase)(propName); // compatible with camel case
  52552. if (props[propName]) {
  52553. console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
  52554. }
  52555. }
  52556. for (var eventName in definedEvents) {
  52557. eventName = (0, _util.kebabCase)(eventName); // compatible with camel case
  52558. if (events[eventName]) {
  52559. console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
  52560. }
  52561. }
  52562. },
  52563. methods: {
  52564. getMigratingConfig: function getMigratingConfig() {
  52565. return {
  52566. props: {},
  52567. events: {}
  52568. };
  52569. }
  52570. }
  52571. };
  52572. /***/ }),
  52573. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/option.js":
  52574. /*!******************************************************************!*\
  52575. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/option.js ***!
  52576. \******************************************************************/
  52577. /*! no static exports found */
  52578. /***/ (function(module, exports, __webpack_require__) {
  52579. module.exports =
  52580. /******/ (function(modules) { // webpackBootstrap
  52581. /******/ // The module cache
  52582. /******/ var installedModules = {};
  52583. /******/
  52584. /******/ // The require function
  52585. /******/ function __webpack_require__(moduleId) {
  52586. /******/
  52587. /******/ // Check if module is in cache
  52588. /******/ if(installedModules[moduleId]) {
  52589. /******/ return installedModules[moduleId].exports;
  52590. /******/ }
  52591. /******/ // Create a new module (and put it into the cache)
  52592. /******/ var module = installedModules[moduleId] = {
  52593. /******/ i: moduleId,
  52594. /******/ l: false,
  52595. /******/ exports: {}
  52596. /******/ };
  52597. /******/
  52598. /******/ // Execute the module function
  52599. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  52600. /******/
  52601. /******/ // Flag the module as loaded
  52602. /******/ module.l = true;
  52603. /******/
  52604. /******/ // Return the exports of the module
  52605. /******/ return module.exports;
  52606. /******/ }
  52607. /******/
  52608. /******/
  52609. /******/ // expose the modules object (__webpack_modules__)
  52610. /******/ __webpack_require__.m = modules;
  52611. /******/
  52612. /******/ // expose the module cache
  52613. /******/ __webpack_require__.c = installedModules;
  52614. /******/
  52615. /******/ // define getter function for harmony exports
  52616. /******/ __webpack_require__.d = function(exports, name, getter) {
  52617. /******/ if(!__webpack_require__.o(exports, name)) {
  52618. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  52619. /******/ }
  52620. /******/ };
  52621. /******/
  52622. /******/ // define __esModule on exports
  52623. /******/ __webpack_require__.r = function(exports) {
  52624. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  52625. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  52626. /******/ }
  52627. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  52628. /******/ };
  52629. /******/
  52630. /******/ // create a fake namespace object
  52631. /******/ // mode & 1: value is a module id, require it
  52632. /******/ // mode & 2: merge all properties of value into the ns
  52633. /******/ // mode & 4: return value when already ns object
  52634. /******/ // mode & 8|1: behave like require
  52635. /******/ __webpack_require__.t = function(value, mode) {
  52636. /******/ if(mode & 1) value = __webpack_require__(value);
  52637. /******/ if(mode & 8) return value;
  52638. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  52639. /******/ var ns = Object.create(null);
  52640. /******/ __webpack_require__.r(ns);
  52641. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  52642. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  52643. /******/ return ns;
  52644. /******/ };
  52645. /******/
  52646. /******/ // getDefaultExport function for compatibility with non-harmony modules
  52647. /******/ __webpack_require__.n = function(module) {
  52648. /******/ var getter = module && module.__esModule ?
  52649. /******/ function getDefault() { return module['default']; } :
  52650. /******/ function getModuleExports() { return module; };
  52651. /******/ __webpack_require__.d(getter, 'a', getter);
  52652. /******/ return getter;
  52653. /******/ };
  52654. /******/
  52655. /******/ // Object.prototype.hasOwnProperty.call
  52656. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  52657. /******/
  52658. /******/ // __webpack_public_path__
  52659. /******/ __webpack_require__.p = "/dist/";
  52660. /******/
  52661. /******/
  52662. /******/ // Load entry module and return exports
  52663. /******/ return __webpack_require__(__webpack_require__.s = 53);
  52664. /******/ })
  52665. /************************************************************************/
  52666. /******/ ({
  52667. /***/ 0:
  52668. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  52669. "use strict";
  52670. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  52671. /* globals __VUE_SSR_CONTEXT__ */
  52672. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  52673. // This module is a runtime utility for cleaner component module output and will
  52674. // be included in the final webpack user bundle.
  52675. function normalizeComponent (
  52676. scriptExports,
  52677. render,
  52678. staticRenderFns,
  52679. functionalTemplate,
  52680. injectStyles,
  52681. scopeId,
  52682. moduleIdentifier, /* server only */
  52683. shadowMode /* vue-cli only */
  52684. ) {
  52685. // Vue.extend constructor export interop
  52686. var options = typeof scriptExports === 'function'
  52687. ? scriptExports.options
  52688. : scriptExports
  52689. // render functions
  52690. if (render) {
  52691. options.render = render
  52692. options.staticRenderFns = staticRenderFns
  52693. options._compiled = true
  52694. }
  52695. // functional template
  52696. if (functionalTemplate) {
  52697. options.functional = true
  52698. }
  52699. // scopedId
  52700. if (scopeId) {
  52701. options._scopeId = 'data-v-' + scopeId
  52702. }
  52703. var hook
  52704. if (moduleIdentifier) { // server build
  52705. hook = function (context) {
  52706. // 2.3 injection
  52707. context =
  52708. context || // cached call
  52709. (this.$vnode && this.$vnode.ssrContext) || // stateful
  52710. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  52711. // 2.2 with runInNewContext: true
  52712. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  52713. context = __VUE_SSR_CONTEXT__
  52714. }
  52715. // inject component styles
  52716. if (injectStyles) {
  52717. injectStyles.call(this, context)
  52718. }
  52719. // register component module identifier for async chunk inferrence
  52720. if (context && context._registeredComponents) {
  52721. context._registeredComponents.add(moduleIdentifier)
  52722. }
  52723. }
  52724. // used by ssr in case component is cached and beforeCreate
  52725. // never gets called
  52726. options._ssrRegister = hook
  52727. } else if (injectStyles) {
  52728. hook = shadowMode
  52729. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  52730. : injectStyles
  52731. }
  52732. if (hook) {
  52733. if (options.functional) {
  52734. // for template-only hot-reload because in that case the render fn doesn't
  52735. // go through the normalizer
  52736. options._injectStyles = hook
  52737. // register for functioal component in vue file
  52738. var originalRender = options.render
  52739. options.render = function renderWithStyleInjection (h, context) {
  52740. hook.call(context)
  52741. return originalRender(h, context)
  52742. }
  52743. } else {
  52744. // inject component registration as beforeCreate hook
  52745. var existing = options.beforeCreate
  52746. options.beforeCreate = existing
  52747. ? [].concat(existing, hook)
  52748. : [hook]
  52749. }
  52750. }
  52751. return {
  52752. exports: scriptExports,
  52753. options: options
  52754. }
  52755. }
  52756. /***/ }),
  52757. /***/ 3:
  52758. /***/ (function(module, exports) {
  52759. module.exports = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  52760. /***/ }),
  52761. /***/ 33:
  52762. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  52763. "use strict";
  52764. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  52765. var render = function() {
  52766. var _vm = this
  52767. var _h = _vm.$createElement
  52768. var _c = _vm._self._c || _h
  52769. return _c(
  52770. "li",
  52771. {
  52772. directives: [
  52773. {
  52774. name: "show",
  52775. rawName: "v-show",
  52776. value: _vm.visible,
  52777. expression: "visible"
  52778. }
  52779. ],
  52780. staticClass: "el-select-dropdown__item",
  52781. class: {
  52782. selected: _vm.itemSelected,
  52783. "is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
  52784. hover: _vm.hover
  52785. },
  52786. on: {
  52787. mouseenter: _vm.hoverItem,
  52788. click: function($event) {
  52789. $event.stopPropagation()
  52790. return _vm.selectOptionClick($event)
  52791. }
  52792. }
  52793. },
  52794. [_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])],
  52795. 2
  52796. )
  52797. }
  52798. var staticRenderFns = []
  52799. render._withStripped = true
  52800. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  52801. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  52802. var emitter_ = __webpack_require__(4);
  52803. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  52804. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  52805. var util_ = __webpack_require__(3);
  52806. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&
  52807. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  52808. //
  52809. //
  52810. //
  52811. //
  52812. //
  52813. //
  52814. //
  52815. //
  52816. //
  52817. //
  52818. //
  52819. //
  52820. //
  52821. //
  52822. //
  52823. //
  52824. //
  52825. /* harmony default export */ var optionvue_type_script_lang_js_ = ({
  52826. mixins: [emitter_default.a],
  52827. name: 'ElOption',
  52828. componentName: 'ElOption',
  52829. inject: ['select'],
  52830. props: {
  52831. value: {
  52832. required: true
  52833. },
  52834. label: [String, Number],
  52835. created: Boolean,
  52836. disabled: {
  52837. type: Boolean,
  52838. default: false
  52839. }
  52840. },
  52841. data: function data() {
  52842. return {
  52843. index: -1,
  52844. groupDisabled: false,
  52845. visible: true,
  52846. hitState: false,
  52847. hover: false
  52848. };
  52849. },
  52850. computed: {
  52851. isObject: function isObject() {
  52852. return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
  52853. },
  52854. currentLabel: function currentLabel() {
  52855. return this.label || (this.isObject ? '' : this.value);
  52856. },
  52857. currentValue: function currentValue() {
  52858. return this.value || this.label || '';
  52859. },
  52860. itemSelected: function itemSelected() {
  52861. if (!this.select.multiple) {
  52862. return this.isEqual(this.value, this.select.value);
  52863. } else {
  52864. return this.contains(this.select.value, this.value);
  52865. }
  52866. },
  52867. limitReached: function limitReached() {
  52868. if (this.select.multiple) {
  52869. return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
  52870. } else {
  52871. return false;
  52872. }
  52873. }
  52874. },
  52875. watch: {
  52876. currentLabel: function currentLabel() {
  52877. if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
  52878. },
  52879. value: function value(val, oldVal) {
  52880. var _select = this.select,
  52881. remote = _select.remote,
  52882. valueKey = _select.valueKey;
  52883. if (!this.created && !remote) {
  52884. if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
  52885. return;
  52886. }
  52887. this.dispatch('ElSelect', 'setSelected');
  52888. }
  52889. }
  52890. },
  52891. methods: {
  52892. isEqual: function isEqual(a, b) {
  52893. if (!this.isObject) {
  52894. return a === b;
  52895. } else {
  52896. var valueKey = this.select.valueKey;
  52897. return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
  52898. }
  52899. },
  52900. contains: function contains() {
  52901. var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  52902. var target = arguments[1];
  52903. if (!this.isObject) {
  52904. return arr && arr.indexOf(target) > -1;
  52905. } else {
  52906. var valueKey = this.select.valueKey;
  52907. return arr && arr.some(function (item) {
  52908. return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
  52909. });
  52910. }
  52911. },
  52912. handleGroupDisabled: function handleGroupDisabled(val) {
  52913. this.groupDisabled = val;
  52914. },
  52915. hoverItem: function hoverItem() {
  52916. if (!this.disabled && !this.groupDisabled) {
  52917. this.select.hoverIndex = this.select.options.indexOf(this);
  52918. }
  52919. },
  52920. selectOptionClick: function selectOptionClick() {
  52921. if (this.disabled !== true && this.groupDisabled !== true) {
  52922. this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
  52923. }
  52924. },
  52925. queryChange: function queryChange(query) {
  52926. this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;
  52927. if (!this.visible) {
  52928. this.select.filteredOptionsCount--;
  52929. }
  52930. }
  52931. },
  52932. created: function created() {
  52933. this.select.options.push(this);
  52934. this.select.cachedOptions.push(this);
  52935. this.select.optionsCount++;
  52936. this.select.filteredOptionsCount++;
  52937. this.$on('queryChange', this.queryChange);
  52938. this.$on('handleGroupDisabled', this.handleGroupDisabled);
  52939. },
  52940. beforeDestroy: function beforeDestroy() {
  52941. var _select2 = this.select,
  52942. selected = _select2.selected,
  52943. multiple = _select2.multiple;
  52944. var selectedOptions = multiple ? selected : [selected];
  52945. var index = this.select.cachedOptions.indexOf(this);
  52946. var selectedIndex = selectedOptions.indexOf(this);
  52947. // if option is not selected, remove it from cache
  52948. if (index > -1 && selectedIndex < 0) {
  52949. this.select.cachedOptions.splice(index, 1);
  52950. }
  52951. this.select.onOptionDestroy(this.select.options.indexOf(this));
  52952. }
  52953. });
  52954. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&
  52955. /* harmony default export */ var src_optionvue_type_script_lang_js_ = (optionvue_type_script_lang_js_);
  52956. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  52957. var componentNormalizer = __webpack_require__(0);
  52958. // CONCATENATED MODULE: ./packages/select/src/option.vue
  52959. /* normalize component */
  52960. var component = Object(componentNormalizer["a" /* default */])(
  52961. src_optionvue_type_script_lang_js_,
  52962. render,
  52963. staticRenderFns,
  52964. false,
  52965. null,
  52966. null,
  52967. null
  52968. )
  52969. /* hot reload */
  52970. if (false) { var api; }
  52971. component.options.__file = "packages/select/src/option.vue"
  52972. /* harmony default export */ var src_option = __webpack_exports__["a"] = (component.exports);
  52973. /***/ }),
  52974. /***/ 4:
  52975. /***/ (function(module, exports) {
  52976. module.exports = __webpack_require__(/*! element-ui/lib/mixins/emitter */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js");
  52977. /***/ }),
  52978. /***/ 53:
  52979. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  52980. "use strict";
  52981. __webpack_require__.r(__webpack_exports__);
  52982. /* harmony import */ var _select_src_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33);
  52983. /* istanbul ignore next */
  52984. _select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function (Vue) {
  52985. Vue.component(_select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].name, _select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
  52986. };
  52987. /* harmony default export */ __webpack_exports__["default"] = (_select_src_option__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
  52988. /***/ })
  52989. /******/ });
  52990. /***/ }),
  52991. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/popover.js":
  52992. /*!*******************************************************************!*\
  52993. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/popover.js ***!
  52994. \*******************************************************************/
  52995. /*! no static exports found */
  52996. /***/ (function(module, exports, __webpack_require__) {
  52997. module.exports =
  52998. /******/ (function(modules) { // webpackBootstrap
  52999. /******/ // The module cache
  53000. /******/ var installedModules = {};
  53001. /******/
  53002. /******/ // The require function
  53003. /******/ function __webpack_require__(moduleId) {
  53004. /******/
  53005. /******/ // Check if module is in cache
  53006. /******/ if(installedModules[moduleId]) {
  53007. /******/ return installedModules[moduleId].exports;
  53008. /******/ }
  53009. /******/ // Create a new module (and put it into the cache)
  53010. /******/ var module = installedModules[moduleId] = {
  53011. /******/ i: moduleId,
  53012. /******/ l: false,
  53013. /******/ exports: {}
  53014. /******/ };
  53015. /******/
  53016. /******/ // Execute the module function
  53017. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  53018. /******/
  53019. /******/ // Flag the module as loaded
  53020. /******/ module.l = true;
  53021. /******/
  53022. /******/ // Return the exports of the module
  53023. /******/ return module.exports;
  53024. /******/ }
  53025. /******/
  53026. /******/
  53027. /******/ // expose the modules object (__webpack_modules__)
  53028. /******/ __webpack_require__.m = modules;
  53029. /******/
  53030. /******/ // expose the module cache
  53031. /******/ __webpack_require__.c = installedModules;
  53032. /******/
  53033. /******/ // define getter function for harmony exports
  53034. /******/ __webpack_require__.d = function(exports, name, getter) {
  53035. /******/ if(!__webpack_require__.o(exports, name)) {
  53036. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  53037. /******/ }
  53038. /******/ };
  53039. /******/
  53040. /******/ // define __esModule on exports
  53041. /******/ __webpack_require__.r = function(exports) {
  53042. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  53043. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  53044. /******/ }
  53045. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  53046. /******/ };
  53047. /******/
  53048. /******/ // create a fake namespace object
  53049. /******/ // mode & 1: value is a module id, require it
  53050. /******/ // mode & 2: merge all properties of value into the ns
  53051. /******/ // mode & 4: return value when already ns object
  53052. /******/ // mode & 8|1: behave like require
  53053. /******/ __webpack_require__.t = function(value, mode) {
  53054. /******/ if(mode & 1) value = __webpack_require__(value);
  53055. /******/ if(mode & 8) return value;
  53056. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  53057. /******/ var ns = Object.create(null);
  53058. /******/ __webpack_require__.r(ns);
  53059. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  53060. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  53061. /******/ return ns;
  53062. /******/ };
  53063. /******/
  53064. /******/ // getDefaultExport function for compatibility with non-harmony modules
  53065. /******/ __webpack_require__.n = function(module) {
  53066. /******/ var getter = module && module.__esModule ?
  53067. /******/ function getDefault() { return module['default']; } :
  53068. /******/ function getModuleExports() { return module; };
  53069. /******/ __webpack_require__.d(getter, 'a', getter);
  53070. /******/ return getter;
  53071. /******/ };
  53072. /******/
  53073. /******/ // Object.prototype.hasOwnProperty.call
  53074. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  53075. /******/
  53076. /******/ // __webpack_public_path__
  53077. /******/ __webpack_require__.p = "/dist/";
  53078. /******/
  53079. /******/
  53080. /******/ // Load entry module and return exports
  53081. /******/ return __webpack_require__(__webpack_require__.s = 77);
  53082. /******/ })
  53083. /************************************************************************/
  53084. /******/ ({
  53085. /***/ 0:
  53086. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53087. "use strict";
  53088. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  53089. /* globals __VUE_SSR_CONTEXT__ */
  53090. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  53091. // This module is a runtime utility for cleaner component module output and will
  53092. // be included in the final webpack user bundle.
  53093. function normalizeComponent (
  53094. scriptExports,
  53095. render,
  53096. staticRenderFns,
  53097. functionalTemplate,
  53098. injectStyles,
  53099. scopeId,
  53100. moduleIdentifier, /* server only */
  53101. shadowMode /* vue-cli only */
  53102. ) {
  53103. // Vue.extend constructor export interop
  53104. var options = typeof scriptExports === 'function'
  53105. ? scriptExports.options
  53106. : scriptExports
  53107. // render functions
  53108. if (render) {
  53109. options.render = render
  53110. options.staticRenderFns = staticRenderFns
  53111. options._compiled = true
  53112. }
  53113. // functional template
  53114. if (functionalTemplate) {
  53115. options.functional = true
  53116. }
  53117. // scopedId
  53118. if (scopeId) {
  53119. options._scopeId = 'data-v-' + scopeId
  53120. }
  53121. var hook
  53122. if (moduleIdentifier) { // server build
  53123. hook = function (context) {
  53124. // 2.3 injection
  53125. context =
  53126. context || // cached call
  53127. (this.$vnode && this.$vnode.ssrContext) || // stateful
  53128. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  53129. // 2.2 with runInNewContext: true
  53130. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  53131. context = __VUE_SSR_CONTEXT__
  53132. }
  53133. // inject component styles
  53134. if (injectStyles) {
  53135. injectStyles.call(this, context)
  53136. }
  53137. // register component module identifier for async chunk inferrence
  53138. if (context && context._registeredComponents) {
  53139. context._registeredComponents.add(moduleIdentifier)
  53140. }
  53141. }
  53142. // used by ssr in case component is cached and beforeCreate
  53143. // never gets called
  53144. options._ssrRegister = hook
  53145. } else if (injectStyles) {
  53146. hook = shadowMode
  53147. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  53148. : injectStyles
  53149. }
  53150. if (hook) {
  53151. if (options.functional) {
  53152. // for template-only hot-reload because in that case the render fn doesn't
  53153. // go through the normalizer
  53154. options._injectStyles = hook
  53155. // register for functioal component in vue file
  53156. var originalRender = options.render
  53157. options.render = function renderWithStyleInjection (h, context) {
  53158. hook.call(context)
  53159. return originalRender(h, context)
  53160. }
  53161. } else {
  53162. // inject component registration as beforeCreate hook
  53163. var existing = options.beforeCreate
  53164. options.beforeCreate = existing
  53165. ? [].concat(existing, hook)
  53166. : [hook]
  53167. }
  53168. }
  53169. return {
  53170. exports: scriptExports,
  53171. options: options
  53172. }
  53173. }
  53174. /***/ }),
  53175. /***/ 2:
  53176. /***/ (function(module, exports) {
  53177. module.exports = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  53178. /***/ }),
  53179. /***/ 3:
  53180. /***/ (function(module, exports) {
  53181. module.exports = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  53182. /***/ }),
  53183. /***/ 5:
  53184. /***/ (function(module, exports) {
  53185. module.exports = __webpack_require__(/*! element-ui/lib/utils/vue-popper */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vue-popper.js");
  53186. /***/ }),
  53187. /***/ 7:
  53188. /***/ (function(module, exports) {
  53189. module.exports = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  53190. /***/ }),
  53191. /***/ 77:
  53192. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53193. "use strict";
  53194. __webpack_require__.r(__webpack_exports__);
  53195. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=52060272&
  53196. var render = function() {
  53197. var _vm = this
  53198. var _h = _vm.$createElement
  53199. var _c = _vm._self._c || _h
  53200. return _c(
  53201. "span",
  53202. [
  53203. _c(
  53204. "transition",
  53205. {
  53206. attrs: { name: _vm.transition },
  53207. on: {
  53208. "after-enter": _vm.handleAfterEnter,
  53209. "after-leave": _vm.handleAfterLeave
  53210. }
  53211. },
  53212. [
  53213. _c(
  53214. "div",
  53215. {
  53216. directives: [
  53217. {
  53218. name: "show",
  53219. rawName: "v-show",
  53220. value: !_vm.disabled && _vm.showPopper,
  53221. expression: "!disabled && showPopper"
  53222. }
  53223. ],
  53224. ref: "popper",
  53225. staticClass: "el-popover el-popper",
  53226. class: [_vm.popperClass, _vm.content && "el-popover--plain"],
  53227. style: { width: _vm.width + "px" },
  53228. attrs: {
  53229. role: "tooltip",
  53230. id: _vm.tooltipId,
  53231. "aria-hidden":
  53232. _vm.disabled || !_vm.showPopper ? "true" : "false"
  53233. }
  53234. },
  53235. [
  53236. _vm.title
  53237. ? _c("div", {
  53238. staticClass: "el-popover__title",
  53239. domProps: { textContent: _vm._s(_vm.title) }
  53240. })
  53241. : _vm._e(),
  53242. _vm._t("default", [_vm._v(_vm._s(_vm.content))])
  53243. ],
  53244. 2
  53245. )
  53246. ]
  53247. ),
  53248. _c(
  53249. "span",
  53250. { ref: "wrapper", staticClass: "el-popover__reference-wrapper" },
  53251. [_vm._t("reference")],
  53252. 2
  53253. )
  53254. ],
  53255. 1
  53256. )
  53257. }
  53258. var staticRenderFns = []
  53259. render._withStripped = true
  53260. // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=52060272&
  53261. // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
  53262. var vue_popper_ = __webpack_require__(5);
  53263. var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
  53264. // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
  53265. var dom_ = __webpack_require__(2);
  53266. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  53267. var util_ = __webpack_require__(3);
  53268. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js&
  53269. //
  53270. //
  53271. //
  53272. //
  53273. //
  53274. //
  53275. //
  53276. //
  53277. //
  53278. //
  53279. //
  53280. //
  53281. //
  53282. //
  53283. //
  53284. //
  53285. //
  53286. //
  53287. //
  53288. //
  53289. //
  53290. //
  53291. //
  53292. //
  53293. //
  53294. /* harmony default export */ var mainvue_type_script_lang_js_ = ({
  53295. name: 'ElPopover',
  53296. mixins: [vue_popper_default.a],
  53297. props: {
  53298. trigger: {
  53299. type: String,
  53300. default: 'click',
  53301. validator: function validator(value) {
  53302. return ['click', 'focus', 'hover', 'manual'].indexOf(value) > -1;
  53303. }
  53304. },
  53305. openDelay: {
  53306. type: Number,
  53307. default: 0
  53308. },
  53309. closeDelay: {
  53310. type: Number,
  53311. default: 200
  53312. },
  53313. title: String,
  53314. disabled: Boolean,
  53315. content: String,
  53316. reference: {},
  53317. popperClass: String,
  53318. width: {},
  53319. visibleArrow: {
  53320. default: true
  53321. },
  53322. arrowOffset: {
  53323. type: Number,
  53324. default: 0
  53325. },
  53326. transition: {
  53327. type: String,
  53328. default: 'fade-in-linear'
  53329. },
  53330. tabindex: {
  53331. type: Number,
  53332. default: 0
  53333. }
  53334. },
  53335. computed: {
  53336. tooltipId: function tooltipId() {
  53337. return 'el-popover-' + Object(util_["generateId"])();
  53338. }
  53339. },
  53340. watch: {
  53341. showPopper: function showPopper(val) {
  53342. if (this.disabled) {
  53343. return;
  53344. }
  53345. val ? this.$emit('show') : this.$emit('hide');
  53346. }
  53347. },
  53348. mounted: function mounted() {
  53349. var _this = this;
  53350. var reference = this.referenceElm = this.reference || this.$refs.reference;
  53351. var popper = this.popper || this.$refs.popper;
  53352. if (!reference && this.$refs.wrapper.children) {
  53353. reference = this.referenceElm = this.$refs.wrapper.children[0];
  53354. }
  53355. // 可访问性
  53356. if (reference) {
  53357. Object(dom_["addClass"])(reference, 'el-popover__reference');
  53358. reference.setAttribute('aria-describedby', this.tooltipId);
  53359. reference.setAttribute('tabindex', this.tabindex); // tab序列
  53360. popper.setAttribute('tabindex', 0);
  53361. if (this.trigger !== 'click') {
  53362. Object(dom_["on"])(reference, 'focusin', function () {
  53363. _this.handleFocus();
  53364. var instance = reference.__vue__;
  53365. if (instance && typeof instance.focus === 'function') {
  53366. instance.focus();
  53367. }
  53368. });
  53369. Object(dom_["on"])(popper, 'focusin', this.handleFocus);
  53370. Object(dom_["on"])(reference, 'focusout', this.handleBlur);
  53371. Object(dom_["on"])(popper, 'focusout', this.handleBlur);
  53372. }
  53373. Object(dom_["on"])(reference, 'keydown', this.handleKeydown);
  53374. Object(dom_["on"])(reference, 'click', this.handleClick);
  53375. }
  53376. if (this.trigger === 'click') {
  53377. Object(dom_["on"])(reference, 'click', this.doToggle);
  53378. Object(dom_["on"])(document, 'click', this.handleDocumentClick);
  53379. } else if (this.trigger === 'hover') {
  53380. Object(dom_["on"])(reference, 'mouseenter', this.handleMouseEnter);
  53381. Object(dom_["on"])(popper, 'mouseenter', this.handleMouseEnter);
  53382. Object(dom_["on"])(reference, 'mouseleave', this.handleMouseLeave);
  53383. Object(dom_["on"])(popper, 'mouseleave', this.handleMouseLeave);
  53384. } else if (this.trigger === 'focus') {
  53385. if (this.tabindex < 0) {
  53386. console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');
  53387. }
  53388. if (reference.querySelector('input, textarea')) {
  53389. Object(dom_["on"])(reference, 'focusin', this.doShow);
  53390. Object(dom_["on"])(reference, 'focusout', this.doClose);
  53391. } else {
  53392. Object(dom_["on"])(reference, 'mousedown', this.doShow);
  53393. Object(dom_["on"])(reference, 'mouseup', this.doClose);
  53394. }
  53395. }
  53396. },
  53397. beforeDestroy: function beforeDestroy() {
  53398. this.cleanup();
  53399. },
  53400. deactivated: function deactivated() {
  53401. this.cleanup();
  53402. },
  53403. methods: {
  53404. doToggle: function doToggle() {
  53405. this.showPopper = !this.showPopper;
  53406. },
  53407. doShow: function doShow() {
  53408. this.showPopper = true;
  53409. },
  53410. doClose: function doClose() {
  53411. this.showPopper = false;
  53412. },
  53413. handleFocus: function handleFocus() {
  53414. Object(dom_["addClass"])(this.referenceElm, 'focusing');
  53415. if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = true;
  53416. },
  53417. handleClick: function handleClick() {
  53418. Object(dom_["removeClass"])(this.referenceElm, 'focusing');
  53419. },
  53420. handleBlur: function handleBlur() {
  53421. Object(dom_["removeClass"])(this.referenceElm, 'focusing');
  53422. if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = false;
  53423. },
  53424. handleMouseEnter: function handleMouseEnter() {
  53425. var _this2 = this;
  53426. clearTimeout(this._timer);
  53427. if (this.openDelay) {
  53428. this._timer = setTimeout(function () {
  53429. _this2.showPopper = true;
  53430. }, this.openDelay);
  53431. } else {
  53432. this.showPopper = true;
  53433. }
  53434. },
  53435. handleKeydown: function handleKeydown(ev) {
  53436. if (ev.keyCode === 27 && this.trigger !== 'manual') {
  53437. // esc
  53438. this.doClose();
  53439. }
  53440. },
  53441. handleMouseLeave: function handleMouseLeave() {
  53442. var _this3 = this;
  53443. clearTimeout(this._timer);
  53444. if (this.closeDelay) {
  53445. this._timer = setTimeout(function () {
  53446. _this3.showPopper = false;
  53447. }, this.closeDelay);
  53448. } else {
  53449. this.showPopper = false;
  53450. }
  53451. },
  53452. handleDocumentClick: function handleDocumentClick(e) {
  53453. var reference = this.reference || this.$refs.reference;
  53454. var popper = this.popper || this.$refs.popper;
  53455. if (!reference && this.$refs.wrapper.children) {
  53456. reference = this.referenceElm = this.$refs.wrapper.children[0];
  53457. }
  53458. if (!this.$el || !reference || this.$el.contains(e.target) || reference.contains(e.target) || !popper || popper.contains(e.target)) return;
  53459. this.showPopper = false;
  53460. },
  53461. handleAfterEnter: function handleAfterEnter() {
  53462. this.$emit('after-enter');
  53463. },
  53464. handleAfterLeave: function handleAfterLeave() {
  53465. this.$emit('after-leave');
  53466. this.doDestroy();
  53467. },
  53468. cleanup: function cleanup() {
  53469. if (this.openDelay || this.closeDelay) {
  53470. clearTimeout(this._timer);
  53471. }
  53472. }
  53473. },
  53474. destroyed: function destroyed() {
  53475. var reference = this.reference;
  53476. Object(dom_["off"])(reference, 'click', this.doToggle);
  53477. Object(dom_["off"])(reference, 'mouseup', this.doClose);
  53478. Object(dom_["off"])(reference, 'mousedown', this.doShow);
  53479. Object(dom_["off"])(reference, 'focusin', this.doShow);
  53480. Object(dom_["off"])(reference, 'focusout', this.doClose);
  53481. Object(dom_["off"])(reference, 'mousedown', this.doShow);
  53482. Object(dom_["off"])(reference, 'mouseup', this.doClose);
  53483. Object(dom_["off"])(reference, 'mouseleave', this.handleMouseLeave);
  53484. Object(dom_["off"])(reference, 'mouseenter', this.handleMouseEnter);
  53485. Object(dom_["off"])(document, 'click', this.handleDocumentClick);
  53486. }
  53487. });
  53488. // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js&
  53489. /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
  53490. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  53491. var componentNormalizer = __webpack_require__(0);
  53492. // CONCATENATED MODULE: ./packages/popover/src/main.vue
  53493. /* normalize component */
  53494. var component = Object(componentNormalizer["a" /* default */])(
  53495. src_mainvue_type_script_lang_js_,
  53496. render,
  53497. staticRenderFns,
  53498. false,
  53499. null,
  53500. null,
  53501. null
  53502. )
  53503. /* hot reload */
  53504. if (false) { var api; }
  53505. component.options.__file = "packages/popover/src/main.vue"
  53506. /* harmony default export */ var main = (component.exports);
  53507. // CONCATENATED MODULE: ./packages/popover/src/directive.js
  53508. var getReference = function getReference(el, binding, vnode) {
  53509. var _ref = binding.expression ? binding.value : binding.arg;
  53510. var popper = vnode.context.$refs[_ref];
  53511. if (popper) {
  53512. if (Array.isArray(popper)) {
  53513. popper[0].$refs.reference = el;
  53514. } else {
  53515. popper.$refs.reference = el;
  53516. }
  53517. }
  53518. };
  53519. /* harmony default export */ var directive = ({
  53520. bind: function bind(el, binding, vnode) {
  53521. getReference(el, binding, vnode);
  53522. },
  53523. inserted: function inserted(el, binding, vnode) {
  53524. getReference(el, binding, vnode);
  53525. }
  53526. });
  53527. // EXTERNAL MODULE: external "vue"
  53528. var external_vue_ = __webpack_require__(7);
  53529. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  53530. // CONCATENATED MODULE: ./packages/popover/index.js
  53531. external_vue_default.a.directive('popover', directive);
  53532. /* istanbul ignore next */
  53533. main.install = function (Vue) {
  53534. Vue.directive('popover', directive);
  53535. Vue.component(main.name, main);
  53536. };
  53537. main.directive = directive;
  53538. /* harmony default export */ var popover = __webpack_exports__["default"] = (main);
  53539. /***/ })
  53540. /******/ });
  53541. /***/ }),
  53542. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/progress.js":
  53543. /*!********************************************************************!*\
  53544. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/progress.js ***!
  53545. \********************************************************************/
  53546. /*! no static exports found */
  53547. /***/ (function(module, exports, __webpack_require__) {
  53548. module.exports =
  53549. /******/ (function(modules) { // webpackBootstrap
  53550. /******/ // The module cache
  53551. /******/ var installedModules = {};
  53552. /******/
  53553. /******/ // The require function
  53554. /******/ function __webpack_require__(moduleId) {
  53555. /******/
  53556. /******/ // Check if module is in cache
  53557. /******/ if(installedModules[moduleId]) {
  53558. /******/ return installedModules[moduleId].exports;
  53559. /******/ }
  53560. /******/ // Create a new module (and put it into the cache)
  53561. /******/ var module = installedModules[moduleId] = {
  53562. /******/ i: moduleId,
  53563. /******/ l: false,
  53564. /******/ exports: {}
  53565. /******/ };
  53566. /******/
  53567. /******/ // Execute the module function
  53568. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  53569. /******/
  53570. /******/ // Flag the module as loaded
  53571. /******/ module.l = true;
  53572. /******/
  53573. /******/ // Return the exports of the module
  53574. /******/ return module.exports;
  53575. /******/ }
  53576. /******/
  53577. /******/
  53578. /******/ // expose the modules object (__webpack_modules__)
  53579. /******/ __webpack_require__.m = modules;
  53580. /******/
  53581. /******/ // expose the module cache
  53582. /******/ __webpack_require__.c = installedModules;
  53583. /******/
  53584. /******/ // define getter function for harmony exports
  53585. /******/ __webpack_require__.d = function(exports, name, getter) {
  53586. /******/ if(!__webpack_require__.o(exports, name)) {
  53587. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  53588. /******/ }
  53589. /******/ };
  53590. /******/
  53591. /******/ // define __esModule on exports
  53592. /******/ __webpack_require__.r = function(exports) {
  53593. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  53594. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  53595. /******/ }
  53596. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  53597. /******/ };
  53598. /******/
  53599. /******/ // create a fake namespace object
  53600. /******/ // mode & 1: value is a module id, require it
  53601. /******/ // mode & 2: merge all properties of value into the ns
  53602. /******/ // mode & 4: return value when already ns object
  53603. /******/ // mode & 8|1: behave like require
  53604. /******/ __webpack_require__.t = function(value, mode) {
  53605. /******/ if(mode & 1) value = __webpack_require__(value);
  53606. /******/ if(mode & 8) return value;
  53607. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  53608. /******/ var ns = Object.create(null);
  53609. /******/ __webpack_require__.r(ns);
  53610. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  53611. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  53612. /******/ return ns;
  53613. /******/ };
  53614. /******/
  53615. /******/ // getDefaultExport function for compatibility with non-harmony modules
  53616. /******/ __webpack_require__.n = function(module) {
  53617. /******/ var getter = module && module.__esModule ?
  53618. /******/ function getDefault() { return module['default']; } :
  53619. /******/ function getModuleExports() { return module; };
  53620. /******/ __webpack_require__.d(getter, 'a', getter);
  53621. /******/ return getter;
  53622. /******/ };
  53623. /******/
  53624. /******/ // Object.prototype.hasOwnProperty.call
  53625. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  53626. /******/
  53627. /******/ // __webpack_public_path__
  53628. /******/ __webpack_require__.p = "/dist/";
  53629. /******/
  53630. /******/
  53631. /******/ // Load entry module and return exports
  53632. /******/ return __webpack_require__(__webpack_require__.s = 103);
  53633. /******/ })
  53634. /************************************************************************/
  53635. /******/ ({
  53636. /***/ 0:
  53637. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53638. "use strict";
  53639. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  53640. /* globals __VUE_SSR_CONTEXT__ */
  53641. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  53642. // This module is a runtime utility for cleaner component module output and will
  53643. // be included in the final webpack user bundle.
  53644. function normalizeComponent (
  53645. scriptExports,
  53646. render,
  53647. staticRenderFns,
  53648. functionalTemplate,
  53649. injectStyles,
  53650. scopeId,
  53651. moduleIdentifier, /* server only */
  53652. shadowMode /* vue-cli only */
  53653. ) {
  53654. // Vue.extend constructor export interop
  53655. var options = typeof scriptExports === 'function'
  53656. ? scriptExports.options
  53657. : scriptExports
  53658. // render functions
  53659. if (render) {
  53660. options.render = render
  53661. options.staticRenderFns = staticRenderFns
  53662. options._compiled = true
  53663. }
  53664. // functional template
  53665. if (functionalTemplate) {
  53666. options.functional = true
  53667. }
  53668. // scopedId
  53669. if (scopeId) {
  53670. options._scopeId = 'data-v-' + scopeId
  53671. }
  53672. var hook
  53673. if (moduleIdentifier) { // server build
  53674. hook = function (context) {
  53675. // 2.3 injection
  53676. context =
  53677. context || // cached call
  53678. (this.$vnode && this.$vnode.ssrContext) || // stateful
  53679. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  53680. // 2.2 with runInNewContext: true
  53681. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  53682. context = __VUE_SSR_CONTEXT__
  53683. }
  53684. // inject component styles
  53685. if (injectStyles) {
  53686. injectStyles.call(this, context)
  53687. }
  53688. // register component module identifier for async chunk inferrence
  53689. if (context && context._registeredComponents) {
  53690. context._registeredComponents.add(moduleIdentifier)
  53691. }
  53692. }
  53693. // used by ssr in case component is cached and beforeCreate
  53694. // never gets called
  53695. options._ssrRegister = hook
  53696. } else if (injectStyles) {
  53697. hook = shadowMode
  53698. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  53699. : injectStyles
  53700. }
  53701. if (hook) {
  53702. if (options.functional) {
  53703. // for template-only hot-reload because in that case the render fn doesn't
  53704. // go through the normalizer
  53705. options._injectStyles = hook
  53706. // register for functioal component in vue file
  53707. var originalRender = options.render
  53708. options.render = function renderWithStyleInjection (h, context) {
  53709. hook.call(context)
  53710. return originalRender(h, context)
  53711. }
  53712. } else {
  53713. // inject component registration as beforeCreate hook
  53714. var existing = options.beforeCreate
  53715. options.beforeCreate = existing
  53716. ? [].concat(existing, hook)
  53717. : [hook]
  53718. }
  53719. }
  53720. return {
  53721. exports: scriptExports,
  53722. options: options
  53723. }
  53724. }
  53725. /***/ }),
  53726. /***/ 103:
  53727. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53728. "use strict";
  53729. __webpack_require__.r(__webpack_exports__);
  53730. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
  53731. var render = function() {
  53732. var _vm = this
  53733. var _h = _vm.$createElement
  53734. var _c = _vm._self._c || _h
  53735. return _c(
  53736. "div",
  53737. {
  53738. staticClass: "el-progress",
  53739. class: [
  53740. "el-progress--" + _vm.type,
  53741. _vm.status ? "is-" + _vm.status : "",
  53742. {
  53743. "el-progress--without-text": !_vm.showText,
  53744. "el-progress--text-inside": _vm.textInside
  53745. }
  53746. ],
  53747. attrs: {
  53748. role: "progressbar",
  53749. "aria-valuenow": _vm.percentage,
  53750. "aria-valuemin": "0",
  53751. "aria-valuemax": "100"
  53752. }
  53753. },
  53754. [
  53755. _vm.type === "line"
  53756. ? _c("div", { staticClass: "el-progress-bar" }, [
  53757. _c(
  53758. "div",
  53759. {
  53760. staticClass: "el-progress-bar__outer",
  53761. style: { height: _vm.strokeWidth + "px" }
  53762. },
  53763. [
  53764. _c(
  53765. "div",
  53766. {
  53767. staticClass: "el-progress-bar__inner",
  53768. style: _vm.barStyle
  53769. },
  53770. [
  53771. _vm.showText && _vm.textInside
  53772. ? _c(
  53773. "div",
  53774. { staticClass: "el-progress-bar__innerText" },
  53775. [_vm._v(_vm._s(_vm.content))]
  53776. )
  53777. : _vm._e()
  53778. ]
  53779. )
  53780. ]
  53781. )
  53782. ])
  53783. : _c(
  53784. "div",
  53785. {
  53786. staticClass: "el-progress-circle",
  53787. style: { height: _vm.width + "px", width: _vm.width + "px" }
  53788. },
  53789. [
  53790. _c("svg", { attrs: { viewBox: "0 0 100 100" } }, [
  53791. _c("path", {
  53792. staticClass: "el-progress-circle__track",
  53793. style: _vm.trailPathStyle,
  53794. attrs: {
  53795. d: _vm.trackPath,
  53796. stroke: "#e5e9f2",
  53797. "stroke-width": _vm.relativeStrokeWidth,
  53798. fill: "none"
  53799. }
  53800. }),
  53801. _c("path", {
  53802. staticClass: "el-progress-circle__path",
  53803. style: _vm.circlePathStyle,
  53804. attrs: {
  53805. d: _vm.trackPath,
  53806. stroke: _vm.stroke,
  53807. fill: "none",
  53808. "stroke-linecap": _vm.strokeLinecap,
  53809. "stroke-width": _vm.percentage ? _vm.relativeStrokeWidth : 0
  53810. }
  53811. })
  53812. ])
  53813. ]
  53814. ),
  53815. _vm.showText && !_vm.textInside
  53816. ? _c(
  53817. "div",
  53818. {
  53819. staticClass: "el-progress__text",
  53820. style: { fontSize: _vm.progressTextSize + "px" }
  53821. },
  53822. [
  53823. !_vm.status
  53824. ? [_vm._v(_vm._s(_vm.content))]
  53825. : _c("i", { class: _vm.iconClass })
  53826. ],
  53827. 2
  53828. )
  53829. : _vm._e()
  53830. ]
  53831. )
  53832. }
  53833. var staticRenderFns = []
  53834. render._withStripped = true
  53835. // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
  53836. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=script&lang=js&
  53837. //
  53838. //
  53839. //
  53840. //
  53841. //
  53842. //
  53843. //
  53844. //
  53845. //
  53846. //
  53847. //
  53848. //
  53849. //
  53850. //
  53851. //
  53852. //
  53853. //
  53854. //
  53855. //
  53856. //
  53857. //
  53858. //
  53859. //
  53860. //
  53861. //
  53862. //
  53863. //
  53864. //
  53865. //
  53866. //
  53867. //
  53868. //
  53869. //
  53870. //
  53871. //
  53872. //
  53873. //
  53874. //
  53875. //
  53876. //
  53877. //
  53878. //
  53879. //
  53880. //
  53881. //
  53882. //
  53883. //
  53884. //
  53885. //
  53886. //
  53887. //
  53888. //
  53889. /* harmony default export */ var progressvue_type_script_lang_js_ = ({
  53890. name: 'ElProgress',
  53891. props: {
  53892. type: {
  53893. type: String,
  53894. default: 'line',
  53895. validator: function validator(val) {
  53896. return ['line', 'circle', 'dashboard'].indexOf(val) > -1;
  53897. }
  53898. },
  53899. percentage: {
  53900. type: Number,
  53901. default: 0,
  53902. required: true,
  53903. validator: function validator(val) {
  53904. return val >= 0 && val <= 100;
  53905. }
  53906. },
  53907. status: {
  53908. type: String,
  53909. validator: function validator(val) {
  53910. return ['success', 'exception', 'warning'].indexOf(val) > -1;
  53911. }
  53912. },
  53913. strokeWidth: {
  53914. type: Number,
  53915. default: 6
  53916. },
  53917. strokeLinecap: {
  53918. type: String,
  53919. default: 'round'
  53920. },
  53921. textInside: {
  53922. type: Boolean,
  53923. default: false
  53924. },
  53925. width: {
  53926. type: Number,
  53927. default: 126
  53928. },
  53929. showText: {
  53930. type: Boolean,
  53931. default: true
  53932. },
  53933. color: {
  53934. type: [String, Array, Function],
  53935. default: ''
  53936. },
  53937. format: Function
  53938. },
  53939. computed: {
  53940. barStyle: function barStyle() {
  53941. var style = {};
  53942. style.width = this.percentage + '%';
  53943. style.backgroundColor = this.getCurrentColor(this.percentage);
  53944. return style;
  53945. },
  53946. relativeStrokeWidth: function relativeStrokeWidth() {
  53947. return (this.strokeWidth / this.width * 100).toFixed(1);
  53948. },
  53949. radius: function radius() {
  53950. if (this.type === 'circle' || this.type === 'dashboard') {
  53951. return parseInt(50 - parseFloat(this.relativeStrokeWidth) / 2, 10);
  53952. } else {
  53953. return 0;
  53954. }
  53955. },
  53956. trackPath: function trackPath() {
  53957. var radius = this.radius;
  53958. var isDashboard = this.type === 'dashboard';
  53959. return '\n M 50 50\n m 0 ' + (isDashboard ? '' : '-') + radius + '\n a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '-' : '') + radius * 2 + '\n a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '' : '-') + radius * 2 + '\n ';
  53960. },
  53961. perimeter: function perimeter() {
  53962. return 2 * Math.PI * this.radius;
  53963. },
  53964. rate: function rate() {
  53965. return this.type === 'dashboard' ? 0.75 : 1;
  53966. },
  53967. strokeDashoffset: function strokeDashoffset() {
  53968. var offset = -1 * this.perimeter * (1 - this.rate) / 2;
  53969. return offset + 'px';
  53970. },
  53971. trailPathStyle: function trailPathStyle() {
  53972. return {
  53973. strokeDasharray: this.perimeter * this.rate + 'px, ' + this.perimeter + 'px',
  53974. strokeDashoffset: this.strokeDashoffset
  53975. };
  53976. },
  53977. circlePathStyle: function circlePathStyle() {
  53978. return {
  53979. strokeDasharray: this.perimeter * this.rate * (this.percentage / 100) + 'px, ' + this.perimeter + 'px',
  53980. strokeDashoffset: this.strokeDashoffset,
  53981. transition: 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease'
  53982. };
  53983. },
  53984. stroke: function stroke() {
  53985. var ret = void 0;
  53986. if (this.color) {
  53987. ret = this.getCurrentColor(this.percentage);
  53988. } else {
  53989. switch (this.status) {
  53990. case 'success':
  53991. ret = '#13ce66';
  53992. break;
  53993. case 'exception':
  53994. ret = '#ff4949';
  53995. break;
  53996. case 'warning':
  53997. ret = '#e6a23c';
  53998. break;
  53999. default:
  54000. ret = '#20a0ff';
  54001. }
  54002. }
  54003. return ret;
  54004. },
  54005. iconClass: function iconClass() {
  54006. if (this.status === 'warning') {
  54007. return 'el-icon-warning';
  54008. }
  54009. if (this.type === 'line') {
  54010. return this.status === 'success' ? 'el-icon-circle-check' : 'el-icon-circle-close';
  54011. } else {
  54012. return this.status === 'success' ? 'el-icon-check' : 'el-icon-close';
  54013. }
  54014. },
  54015. progressTextSize: function progressTextSize() {
  54016. return this.type === 'line' ? 12 + this.strokeWidth * 0.4 : this.width * 0.111111 + 2;
  54017. },
  54018. content: function content() {
  54019. if (typeof this.format === 'function') {
  54020. return this.format(this.percentage) || '';
  54021. } else {
  54022. return this.percentage + '%';
  54023. }
  54024. }
  54025. },
  54026. methods: {
  54027. getCurrentColor: function getCurrentColor(percentage) {
  54028. if (typeof this.color === 'function') {
  54029. return this.color(percentage);
  54030. } else if (typeof this.color === 'string') {
  54031. return this.color;
  54032. } else {
  54033. return this.getLevelColor(percentage);
  54034. }
  54035. },
  54036. getLevelColor: function getLevelColor(percentage) {
  54037. var colorArray = this.getColorArray().sort(function (a, b) {
  54038. return a.percentage - b.percentage;
  54039. });
  54040. for (var i = 0; i < colorArray.length; i++) {
  54041. if (colorArray[i].percentage > percentage) {
  54042. return colorArray[i].color;
  54043. }
  54044. }
  54045. return colorArray[colorArray.length - 1].color;
  54046. },
  54047. getColorArray: function getColorArray() {
  54048. var color = this.color;
  54049. var span = 100 / color.length;
  54050. return color.map(function (seriesColor, index) {
  54051. if (typeof seriesColor === 'string') {
  54052. return {
  54053. color: seriesColor,
  54054. percentage: (index + 1) * span
  54055. };
  54056. }
  54057. return seriesColor;
  54058. });
  54059. }
  54060. }
  54061. });
  54062. // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=script&lang=js&
  54063. /* harmony default export */ var src_progressvue_type_script_lang_js_ = (progressvue_type_script_lang_js_);
  54064. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  54065. var componentNormalizer = __webpack_require__(0);
  54066. // CONCATENATED MODULE: ./packages/progress/src/progress.vue
  54067. /* normalize component */
  54068. var component = Object(componentNormalizer["a" /* default */])(
  54069. src_progressvue_type_script_lang_js_,
  54070. render,
  54071. staticRenderFns,
  54072. false,
  54073. null,
  54074. null,
  54075. null
  54076. )
  54077. /* hot reload */
  54078. if (false) { var api; }
  54079. component.options.__file = "packages/progress/src/progress.vue"
  54080. /* harmony default export */ var progress = (component.exports);
  54081. // CONCATENATED MODULE: ./packages/progress/index.js
  54082. /* istanbul ignore next */
  54083. progress.install = function (Vue) {
  54084. Vue.component(progress.name, progress);
  54085. };
  54086. /* harmony default export */ var packages_progress = __webpack_exports__["default"] = (progress);
  54087. /***/ })
  54088. /******/ });
  54089. /***/ }),
  54090. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/radio.js":
  54091. /*!*****************************************************************!*\
  54092. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/radio.js ***!
  54093. \*****************************************************************/
  54094. /*! no static exports found */
  54095. /***/ (function(module, exports, __webpack_require__) {
  54096. module.exports =
  54097. /******/ (function(modules) { // webpackBootstrap
  54098. /******/ // The module cache
  54099. /******/ var installedModules = {};
  54100. /******/
  54101. /******/ // The require function
  54102. /******/ function __webpack_require__(moduleId) {
  54103. /******/
  54104. /******/ // Check if module is in cache
  54105. /******/ if(installedModules[moduleId]) {
  54106. /******/ return installedModules[moduleId].exports;
  54107. /******/ }
  54108. /******/ // Create a new module (and put it into the cache)
  54109. /******/ var module = installedModules[moduleId] = {
  54110. /******/ i: moduleId,
  54111. /******/ l: false,
  54112. /******/ exports: {}
  54113. /******/ };
  54114. /******/
  54115. /******/ // Execute the module function
  54116. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  54117. /******/
  54118. /******/ // Flag the module as loaded
  54119. /******/ module.l = true;
  54120. /******/
  54121. /******/ // Return the exports of the module
  54122. /******/ return module.exports;
  54123. /******/ }
  54124. /******/
  54125. /******/
  54126. /******/ // expose the modules object (__webpack_modules__)
  54127. /******/ __webpack_require__.m = modules;
  54128. /******/
  54129. /******/ // expose the module cache
  54130. /******/ __webpack_require__.c = installedModules;
  54131. /******/
  54132. /******/ // define getter function for harmony exports
  54133. /******/ __webpack_require__.d = function(exports, name, getter) {
  54134. /******/ if(!__webpack_require__.o(exports, name)) {
  54135. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  54136. /******/ }
  54137. /******/ };
  54138. /******/
  54139. /******/ // define __esModule on exports
  54140. /******/ __webpack_require__.r = function(exports) {
  54141. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  54142. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  54143. /******/ }
  54144. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  54145. /******/ };
  54146. /******/
  54147. /******/ // create a fake namespace object
  54148. /******/ // mode & 1: value is a module id, require it
  54149. /******/ // mode & 2: merge all properties of value into the ns
  54150. /******/ // mode & 4: return value when already ns object
  54151. /******/ // mode & 8|1: behave like require
  54152. /******/ __webpack_require__.t = function(value, mode) {
  54153. /******/ if(mode & 1) value = __webpack_require__(value);
  54154. /******/ if(mode & 8) return value;
  54155. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  54156. /******/ var ns = Object.create(null);
  54157. /******/ __webpack_require__.r(ns);
  54158. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  54159. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  54160. /******/ return ns;
  54161. /******/ };
  54162. /******/
  54163. /******/ // getDefaultExport function for compatibility with non-harmony modules
  54164. /******/ __webpack_require__.n = function(module) {
  54165. /******/ var getter = module && module.__esModule ?
  54166. /******/ function getDefault() { return module['default']; } :
  54167. /******/ function getModuleExports() { return module; };
  54168. /******/ __webpack_require__.d(getter, 'a', getter);
  54169. /******/ return getter;
  54170. /******/ };
  54171. /******/
  54172. /******/ // Object.prototype.hasOwnProperty.call
  54173. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  54174. /******/
  54175. /******/ // __webpack_public_path__
  54176. /******/ __webpack_require__.p = "/dist/";
  54177. /******/
  54178. /******/
  54179. /******/ // Load entry module and return exports
  54180. /******/ return __webpack_require__(__webpack_require__.s = 87);
  54181. /******/ })
  54182. /************************************************************************/
  54183. /******/ ({
  54184. /***/ 0:
  54185. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  54186. "use strict";
  54187. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  54188. /* globals __VUE_SSR_CONTEXT__ */
  54189. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  54190. // This module is a runtime utility for cleaner component module output and will
  54191. // be included in the final webpack user bundle.
  54192. function normalizeComponent (
  54193. scriptExports,
  54194. render,
  54195. staticRenderFns,
  54196. functionalTemplate,
  54197. injectStyles,
  54198. scopeId,
  54199. moduleIdentifier, /* server only */
  54200. shadowMode /* vue-cli only */
  54201. ) {
  54202. // Vue.extend constructor export interop
  54203. var options = typeof scriptExports === 'function'
  54204. ? scriptExports.options
  54205. : scriptExports
  54206. // render functions
  54207. if (render) {
  54208. options.render = render
  54209. options.staticRenderFns = staticRenderFns
  54210. options._compiled = true
  54211. }
  54212. // functional template
  54213. if (functionalTemplate) {
  54214. options.functional = true
  54215. }
  54216. // scopedId
  54217. if (scopeId) {
  54218. options._scopeId = 'data-v-' + scopeId
  54219. }
  54220. var hook
  54221. if (moduleIdentifier) { // server build
  54222. hook = function (context) {
  54223. // 2.3 injection
  54224. context =
  54225. context || // cached call
  54226. (this.$vnode && this.$vnode.ssrContext) || // stateful
  54227. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  54228. // 2.2 with runInNewContext: true
  54229. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  54230. context = __VUE_SSR_CONTEXT__
  54231. }
  54232. // inject component styles
  54233. if (injectStyles) {
  54234. injectStyles.call(this, context)
  54235. }
  54236. // register component module identifier for async chunk inferrence
  54237. if (context && context._registeredComponents) {
  54238. context._registeredComponents.add(moduleIdentifier)
  54239. }
  54240. }
  54241. // used by ssr in case component is cached and beforeCreate
  54242. // never gets called
  54243. options._ssrRegister = hook
  54244. } else if (injectStyles) {
  54245. hook = shadowMode
  54246. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  54247. : injectStyles
  54248. }
  54249. if (hook) {
  54250. if (options.functional) {
  54251. // for template-only hot-reload because in that case the render fn doesn't
  54252. // go through the normalizer
  54253. options._injectStyles = hook
  54254. // register for functioal component in vue file
  54255. var originalRender = options.render
  54256. options.render = function renderWithStyleInjection (h, context) {
  54257. hook.call(context)
  54258. return originalRender(h, context)
  54259. }
  54260. } else {
  54261. // inject component registration as beforeCreate hook
  54262. var existing = options.beforeCreate
  54263. options.beforeCreate = existing
  54264. ? [].concat(existing, hook)
  54265. : [hook]
  54266. }
  54267. }
  54268. return {
  54269. exports: scriptExports,
  54270. options: options
  54271. }
  54272. }
  54273. /***/ }),
  54274. /***/ 4:
  54275. /***/ (function(module, exports) {
  54276. module.exports = __webpack_require__(/*! element-ui/lib/mixins/emitter */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js");
  54277. /***/ }),
  54278. /***/ 87:
  54279. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  54280. "use strict";
  54281. __webpack_require__.r(__webpack_exports__);
  54282. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
  54283. var render = function() {
  54284. var _vm = this
  54285. var _h = _vm.$createElement
  54286. var _c = _vm._self._c || _h
  54287. return _c(
  54288. "label",
  54289. {
  54290. staticClass: "el-radio",
  54291. class: [
  54292. _vm.border && _vm.radioSize ? "el-radio--" + _vm.radioSize : "",
  54293. { "is-disabled": _vm.isDisabled },
  54294. { "is-focus": _vm.focus },
  54295. { "is-bordered": _vm.border },
  54296. { "is-checked": _vm.model === _vm.label }
  54297. ],
  54298. attrs: {
  54299. role: "radio",
  54300. "aria-checked": _vm.model === _vm.label,
  54301. "aria-disabled": _vm.isDisabled,
  54302. tabindex: _vm.tabIndex
  54303. },
  54304. on: {
  54305. keydown: function($event) {
  54306. if (
  54307. !("button" in $event) &&
  54308. _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])
  54309. ) {
  54310. return null
  54311. }
  54312. $event.stopPropagation()
  54313. $event.preventDefault()
  54314. _vm.model = _vm.isDisabled ? _vm.model : _vm.label
  54315. }
  54316. }
  54317. },
  54318. [
  54319. _c(
  54320. "span",
  54321. {
  54322. staticClass: "el-radio__input",
  54323. class: {
  54324. "is-disabled": _vm.isDisabled,
  54325. "is-checked": _vm.model === _vm.label
  54326. }
  54327. },
  54328. [
  54329. _c("span", { staticClass: "el-radio__inner" }),
  54330. _c("input", {
  54331. directives: [
  54332. {
  54333. name: "model",
  54334. rawName: "v-model",
  54335. value: _vm.model,
  54336. expression: "model"
  54337. }
  54338. ],
  54339. ref: "radio",
  54340. staticClass: "el-radio__original",
  54341. attrs: {
  54342. type: "radio",
  54343. "aria-hidden": "true",
  54344. name: _vm.name,
  54345. disabled: _vm.isDisabled,
  54346. tabindex: "-1",
  54347. autocomplete: "off"
  54348. },
  54349. domProps: {
  54350. value: _vm.label,
  54351. checked: _vm._q(_vm.model, _vm.label)
  54352. },
  54353. on: {
  54354. focus: function($event) {
  54355. _vm.focus = true
  54356. },
  54357. blur: function($event) {
  54358. _vm.focus = false
  54359. },
  54360. change: [
  54361. function($event) {
  54362. _vm.model = _vm.label
  54363. },
  54364. _vm.handleChange
  54365. ]
  54366. }
  54367. })
  54368. ]
  54369. ),
  54370. _c(
  54371. "span",
  54372. {
  54373. staticClass: "el-radio__label",
  54374. on: {
  54375. keydown: function($event) {
  54376. $event.stopPropagation()
  54377. }
  54378. }
  54379. },
  54380. [
  54381. _vm._t("default"),
  54382. !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
  54383. ],
  54384. 2
  54385. )
  54386. ]
  54387. )
  54388. }
  54389. var staticRenderFns = []
  54390. render._withStripped = true
  54391. // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
  54392. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  54393. var emitter_ = __webpack_require__(4);
  54394. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  54395. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
  54396. //
  54397. //
  54398. //
  54399. //
  54400. //
  54401. //
  54402. //
  54403. //
  54404. //
  54405. //
  54406. //
  54407. //
  54408. //
  54409. //
  54410. //
  54411. //
  54412. //
  54413. //
  54414. //
  54415. //
  54416. //
  54417. //
  54418. //
  54419. //
  54420. //
  54421. //
  54422. //
  54423. //
  54424. //
  54425. //
  54426. //
  54427. //
  54428. //
  54429. //
  54430. //
  54431. //
  54432. //
  54433. //
  54434. //
  54435. //
  54436. //
  54437. //
  54438. //
  54439. //
  54440. //
  54441. /* harmony default export */ var radiovue_type_script_lang_js_ = ({
  54442. name: 'ElRadio',
  54443. mixins: [emitter_default.a],
  54444. inject: {
  54445. elForm: {
  54446. default: ''
  54447. },
  54448. elFormItem: {
  54449. default: ''
  54450. }
  54451. },
  54452. componentName: 'ElRadio',
  54453. props: {
  54454. value: {},
  54455. label: {},
  54456. disabled: Boolean,
  54457. name: String,
  54458. border: Boolean,
  54459. size: String
  54460. },
  54461. data: function data() {
  54462. return {
  54463. focus: false
  54464. };
  54465. },
  54466. computed: {
  54467. isGroup: function isGroup() {
  54468. var parent = this.$parent;
  54469. while (parent) {
  54470. if (parent.$options.componentName !== 'ElRadioGroup') {
  54471. parent = parent.$parent;
  54472. } else {
  54473. this._radioGroup = parent;
  54474. return true;
  54475. }
  54476. }
  54477. return false;
  54478. },
  54479. model: {
  54480. get: function get() {
  54481. return this.isGroup ? this._radioGroup.value : this.value;
  54482. },
  54483. set: function set(val) {
  54484. if (this.isGroup) {
  54485. this.dispatch('ElRadioGroup', 'input', [val]);
  54486. } else {
  54487. this.$emit('input', val);
  54488. }
  54489. this.$refs.radio && (this.$refs.radio.checked = this.model === this.label);
  54490. }
  54491. },
  54492. _elFormItemSize: function _elFormItemSize() {
  54493. return (this.elFormItem || {}).elFormItemSize;
  54494. },
  54495. radioSize: function radioSize() {
  54496. var temRadioSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  54497. return this.isGroup ? this._radioGroup.radioGroupSize || temRadioSize : temRadioSize;
  54498. },
  54499. isDisabled: function isDisabled() {
  54500. return this.isGroup ? this._radioGroup.disabled || this.disabled || (this.elForm || {}).disabled : this.disabled || (this.elForm || {}).disabled;
  54501. },
  54502. tabIndex: function tabIndex() {
  54503. return this.isDisabled || this.isGroup && this.model !== this.label ? -1 : 0;
  54504. }
  54505. },
  54506. methods: {
  54507. handleChange: function handleChange() {
  54508. var _this = this;
  54509. this.$nextTick(function () {
  54510. _this.$emit('change', _this.model);
  54511. _this.isGroup && _this.dispatch('ElRadioGroup', 'handleChange', _this.model);
  54512. });
  54513. }
  54514. }
  54515. });
  54516. // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&
  54517. /* harmony default export */ var src_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_);
  54518. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  54519. var componentNormalizer = __webpack_require__(0);
  54520. // CONCATENATED MODULE: ./packages/radio/src/radio.vue
  54521. /* normalize component */
  54522. var component = Object(componentNormalizer["a" /* default */])(
  54523. src_radiovue_type_script_lang_js_,
  54524. render,
  54525. staticRenderFns,
  54526. false,
  54527. null,
  54528. null,
  54529. null
  54530. )
  54531. /* hot reload */
  54532. if (false) { var api; }
  54533. component.options.__file = "packages/radio/src/radio.vue"
  54534. /* harmony default export */ var src_radio = (component.exports);
  54535. // CONCATENATED MODULE: ./packages/radio/index.js
  54536. /* istanbul ignore next */
  54537. src_radio.install = function (Vue) {
  54538. Vue.component(src_radio.name, src_radio);
  54539. };
  54540. /* harmony default export */ var packages_radio = __webpack_exports__["default"] = (src_radio);
  54541. /***/ })
  54542. /******/ });
  54543. /***/ }),
  54544. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/scrollbar.js":
  54545. /*!*********************************************************************!*\
  54546. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/scrollbar.js ***!
  54547. \*********************************************************************/
  54548. /*! no static exports found */
  54549. /***/ (function(module, exports, __webpack_require__) {
  54550. module.exports =
  54551. /******/ (function(modules) { // webpackBootstrap
  54552. /******/ // The module cache
  54553. /******/ var installedModules = {};
  54554. /******/
  54555. /******/ // The require function
  54556. /******/ function __webpack_require__(moduleId) {
  54557. /******/
  54558. /******/ // Check if module is in cache
  54559. /******/ if(installedModules[moduleId]) {
  54560. /******/ return installedModules[moduleId].exports;
  54561. /******/ }
  54562. /******/ // Create a new module (and put it into the cache)
  54563. /******/ var module = installedModules[moduleId] = {
  54564. /******/ i: moduleId,
  54565. /******/ l: false,
  54566. /******/ exports: {}
  54567. /******/ };
  54568. /******/
  54569. /******/ // Execute the module function
  54570. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  54571. /******/
  54572. /******/ // Flag the module as loaded
  54573. /******/ module.l = true;
  54574. /******/
  54575. /******/ // Return the exports of the module
  54576. /******/ return module.exports;
  54577. /******/ }
  54578. /******/
  54579. /******/
  54580. /******/ // expose the modules object (__webpack_modules__)
  54581. /******/ __webpack_require__.m = modules;
  54582. /******/
  54583. /******/ // expose the module cache
  54584. /******/ __webpack_require__.c = installedModules;
  54585. /******/
  54586. /******/ // define getter function for harmony exports
  54587. /******/ __webpack_require__.d = function(exports, name, getter) {
  54588. /******/ if(!__webpack_require__.o(exports, name)) {
  54589. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  54590. /******/ }
  54591. /******/ };
  54592. /******/
  54593. /******/ // define __esModule on exports
  54594. /******/ __webpack_require__.r = function(exports) {
  54595. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  54596. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  54597. /******/ }
  54598. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  54599. /******/ };
  54600. /******/
  54601. /******/ // create a fake namespace object
  54602. /******/ // mode & 1: value is a module id, require it
  54603. /******/ // mode & 2: merge all properties of value into the ns
  54604. /******/ // mode & 4: return value when already ns object
  54605. /******/ // mode & 8|1: behave like require
  54606. /******/ __webpack_require__.t = function(value, mode) {
  54607. /******/ if(mode & 1) value = __webpack_require__(value);
  54608. /******/ if(mode & 8) return value;
  54609. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  54610. /******/ var ns = Object.create(null);
  54611. /******/ __webpack_require__.r(ns);
  54612. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  54613. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  54614. /******/ return ns;
  54615. /******/ };
  54616. /******/
  54617. /******/ // getDefaultExport function for compatibility with non-harmony modules
  54618. /******/ __webpack_require__.n = function(module) {
  54619. /******/ var getter = module && module.__esModule ?
  54620. /******/ function getDefault() { return module['default']; } :
  54621. /******/ function getModuleExports() { return module; };
  54622. /******/ __webpack_require__.d(getter, 'a', getter);
  54623. /******/ return getter;
  54624. /******/ };
  54625. /******/
  54626. /******/ // Object.prototype.hasOwnProperty.call
  54627. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  54628. /******/
  54629. /******/ // __webpack_public_path__
  54630. /******/ __webpack_require__.p = "/dist/";
  54631. /******/
  54632. /******/
  54633. /******/ // Load entry module and return exports
  54634. /******/ return __webpack_require__(__webpack_require__.s = 131);
  54635. /******/ })
  54636. /************************************************************************/
  54637. /******/ ({
  54638. /***/ 131:
  54639. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  54640. "use strict";
  54641. __webpack_require__.r(__webpack_exports__);
  54642. // EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
  54643. var resize_event_ = __webpack_require__(16);
  54644. // EXTERNAL MODULE: external "element-ui/lib/utils/scrollbar-width"
  54645. var scrollbar_width_ = __webpack_require__(38);
  54646. var scrollbar_width_default = /*#__PURE__*/__webpack_require__.n(scrollbar_width_);
  54647. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  54648. var util_ = __webpack_require__(3);
  54649. // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
  54650. var dom_ = __webpack_require__(2);
  54651. // CONCATENATED MODULE: ./packages/scrollbar/src/util.js
  54652. var BAR_MAP = {
  54653. vertical: {
  54654. offset: 'offsetHeight',
  54655. scroll: 'scrollTop',
  54656. scrollSize: 'scrollHeight',
  54657. size: 'height',
  54658. key: 'vertical',
  54659. axis: 'Y',
  54660. client: 'clientY',
  54661. direction: 'top'
  54662. },
  54663. horizontal: {
  54664. offset: 'offsetWidth',
  54665. scroll: 'scrollLeft',
  54666. scrollSize: 'scrollWidth',
  54667. size: 'width',
  54668. key: 'horizontal',
  54669. axis: 'X',
  54670. client: 'clientX',
  54671. direction: 'left'
  54672. }
  54673. };
  54674. function renderThumbStyle(_ref) {
  54675. var move = _ref.move,
  54676. size = _ref.size,
  54677. bar = _ref.bar;
  54678. var style = {};
  54679. var translate = 'translate' + bar.axis + '(' + move + '%)';
  54680. style[bar.size] = size;
  54681. style.transform = translate;
  54682. style.msTransform = translate;
  54683. style.webkitTransform = translate;
  54684. return style;
  54685. };
  54686. // CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
  54687. /* istanbul ignore next */
  54688. /* harmony default export */ var src_bar = ({
  54689. name: 'Bar',
  54690. props: {
  54691. vertical: Boolean,
  54692. size: String,
  54693. move: Number
  54694. },
  54695. computed: {
  54696. bar: function bar() {
  54697. return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
  54698. },
  54699. wrap: function wrap() {
  54700. return this.$parent.wrap;
  54701. }
  54702. },
  54703. render: function render(h) {
  54704. var size = this.size,
  54705. move = this.move,
  54706. bar = this.bar;
  54707. return h(
  54708. 'div',
  54709. {
  54710. 'class': ['el-scrollbar__bar', 'is-' + bar.key],
  54711. on: {
  54712. 'mousedown': this.clickTrackHandler
  54713. }
  54714. },
  54715. [h('div', {
  54716. ref: 'thumb',
  54717. 'class': 'el-scrollbar__thumb',
  54718. on: {
  54719. 'mousedown': this.clickThumbHandler
  54720. },
  54721. style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
  54722. );
  54723. },
  54724. methods: {
  54725. clickThumbHandler: function clickThumbHandler(e) {
  54726. // prevent click event of right button
  54727. if (e.ctrlKey || e.button === 2) {
  54728. return;
  54729. }
  54730. this.startDrag(e);
  54731. this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
  54732. },
  54733. clickTrackHandler: function clickTrackHandler(e) {
  54734. var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
  54735. var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
  54736. var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
  54737. this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
  54738. },
  54739. startDrag: function startDrag(e) {
  54740. e.stopImmediatePropagation();
  54741. this.cursorDown = true;
  54742. Object(dom_["on"])(document, 'mousemove', this.mouseMoveDocumentHandler);
  54743. Object(dom_["on"])(document, 'mouseup', this.mouseUpDocumentHandler);
  54744. document.onselectstart = function () {
  54745. return false;
  54746. };
  54747. },
  54748. mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
  54749. if (this.cursorDown === false) return;
  54750. var prevPage = this[this.bar.axis];
  54751. if (!prevPage) return;
  54752. var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
  54753. var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
  54754. var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
  54755. this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
  54756. },
  54757. mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
  54758. this.cursorDown = false;
  54759. this[this.bar.axis] = 0;
  54760. Object(dom_["off"])(document, 'mousemove', this.mouseMoveDocumentHandler);
  54761. document.onselectstart = null;
  54762. }
  54763. },
  54764. destroyed: function destroyed() {
  54765. Object(dom_["off"])(document, 'mouseup', this.mouseUpDocumentHandler);
  54766. }
  54767. });
  54768. // CONCATENATED MODULE: ./packages/scrollbar/src/main.js
  54769. // reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
  54770. /* istanbul ignore next */
  54771. /* harmony default export */ var main = ({
  54772. name: 'ElScrollbar',
  54773. components: { Bar: src_bar },
  54774. props: {
  54775. native: Boolean,
  54776. wrapStyle: {},
  54777. wrapClass: {},
  54778. viewClass: {},
  54779. viewStyle: {},
  54780. noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
  54781. tag: {
  54782. type: String,
  54783. default: 'div'
  54784. }
  54785. },
  54786. data: function data() {
  54787. return {
  54788. sizeWidth: '0',
  54789. sizeHeight: '0',
  54790. moveX: 0,
  54791. moveY: 0
  54792. };
  54793. },
  54794. computed: {
  54795. wrap: function wrap() {
  54796. return this.$refs.wrap;
  54797. }
  54798. },
  54799. render: function render(h) {
  54800. var gutter = scrollbar_width_default()();
  54801. var style = this.wrapStyle;
  54802. if (gutter) {
  54803. var gutterWith = '-' + gutter + 'px';
  54804. var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
  54805. if (Array.isArray(this.wrapStyle)) {
  54806. style = Object(util_["toObject"])(this.wrapStyle);
  54807. style.marginRight = style.marginBottom = gutterWith;
  54808. } else if (typeof this.wrapStyle === 'string') {
  54809. style += gutterStyle;
  54810. } else {
  54811. style = gutterStyle;
  54812. }
  54813. }
  54814. var view = h(this.tag, {
  54815. class: ['el-scrollbar__view', this.viewClass],
  54816. style: this.viewStyle,
  54817. ref: 'resize'
  54818. }, this.$slots.default);
  54819. var wrap = h(
  54820. 'div',
  54821. {
  54822. ref: 'wrap',
  54823. style: style,
  54824. on: {
  54825. 'scroll': this.handleScroll
  54826. },
  54827. 'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
  54828. [[view]]
  54829. );
  54830. var nodes = void 0;
  54831. if (!this.native) {
  54832. nodes = [wrap, h(src_bar, {
  54833. attrs: {
  54834. move: this.moveX,
  54835. size: this.sizeWidth }
  54836. }), h(src_bar, {
  54837. attrs: {
  54838. vertical: true,
  54839. move: this.moveY,
  54840. size: this.sizeHeight }
  54841. })];
  54842. } else {
  54843. nodes = [h(
  54844. 'div',
  54845. {
  54846. ref: 'wrap',
  54847. 'class': [this.wrapClass, 'el-scrollbar__wrap'],
  54848. style: style },
  54849. [[view]]
  54850. )];
  54851. }
  54852. return h('div', { class: 'el-scrollbar' }, nodes);
  54853. },
  54854. methods: {
  54855. handleScroll: function handleScroll() {
  54856. var wrap = this.wrap;
  54857. this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
  54858. this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
  54859. },
  54860. update: function update() {
  54861. var heightPercentage = void 0,
  54862. widthPercentage = void 0;
  54863. var wrap = this.wrap;
  54864. if (!wrap) return;
  54865. heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
  54866. widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
  54867. this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
  54868. this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
  54869. }
  54870. },
  54871. mounted: function mounted() {
  54872. if (this.native) return;
  54873. this.$nextTick(this.update);
  54874. !this.noresize && Object(resize_event_["addResizeListener"])(this.$refs.resize, this.update);
  54875. },
  54876. beforeDestroy: function beforeDestroy() {
  54877. if (this.native) return;
  54878. !this.noresize && Object(resize_event_["removeResizeListener"])(this.$refs.resize, this.update);
  54879. }
  54880. });
  54881. // CONCATENATED MODULE: ./packages/scrollbar/index.js
  54882. /* istanbul ignore next */
  54883. main.install = function (Vue) {
  54884. Vue.component(main.name, main);
  54885. };
  54886. /* harmony default export */ var scrollbar = __webpack_exports__["default"] = (main);
  54887. /***/ }),
  54888. /***/ 16:
  54889. /***/ (function(module, exports) {
  54890. module.exports = __webpack_require__(/*! element-ui/lib/utils/resize-event */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/resize-event.js");
  54891. /***/ }),
  54892. /***/ 2:
  54893. /***/ (function(module, exports) {
  54894. module.exports = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  54895. /***/ }),
  54896. /***/ 3:
  54897. /***/ (function(module, exports) {
  54898. module.exports = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  54899. /***/ }),
  54900. /***/ 38:
  54901. /***/ (function(module, exports) {
  54902. module.exports = __webpack_require__(/*! element-ui/lib/utils/scrollbar-width */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scrollbar-width.js");
  54903. /***/ })
  54904. /******/ });
  54905. /***/ }),
  54906. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/select.js":
  54907. /*!******************************************************************!*\
  54908. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/select.js ***!
  54909. \******************************************************************/
  54910. /*! no static exports found */
  54911. /***/ (function(module, exports, __webpack_require__) {
  54912. module.exports =
  54913. /******/ (function(modules) { // webpackBootstrap
  54914. /******/ // The module cache
  54915. /******/ var installedModules = {};
  54916. /******/
  54917. /******/ // The require function
  54918. /******/ function __webpack_require__(moduleId) {
  54919. /******/
  54920. /******/ // Check if module is in cache
  54921. /******/ if(installedModules[moduleId]) {
  54922. /******/ return installedModules[moduleId].exports;
  54923. /******/ }
  54924. /******/ // Create a new module (and put it into the cache)
  54925. /******/ var module = installedModules[moduleId] = {
  54926. /******/ i: moduleId,
  54927. /******/ l: false,
  54928. /******/ exports: {}
  54929. /******/ };
  54930. /******/
  54931. /******/ // Execute the module function
  54932. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  54933. /******/
  54934. /******/ // Flag the module as loaded
  54935. /******/ module.l = true;
  54936. /******/
  54937. /******/ // Return the exports of the module
  54938. /******/ return module.exports;
  54939. /******/ }
  54940. /******/
  54941. /******/
  54942. /******/ // expose the modules object (__webpack_modules__)
  54943. /******/ __webpack_require__.m = modules;
  54944. /******/
  54945. /******/ // expose the module cache
  54946. /******/ __webpack_require__.c = installedModules;
  54947. /******/
  54948. /******/ // define getter function for harmony exports
  54949. /******/ __webpack_require__.d = function(exports, name, getter) {
  54950. /******/ if(!__webpack_require__.o(exports, name)) {
  54951. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  54952. /******/ }
  54953. /******/ };
  54954. /******/
  54955. /******/ // define __esModule on exports
  54956. /******/ __webpack_require__.r = function(exports) {
  54957. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  54958. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  54959. /******/ }
  54960. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  54961. /******/ };
  54962. /******/
  54963. /******/ // create a fake namespace object
  54964. /******/ // mode & 1: value is a module id, require it
  54965. /******/ // mode & 2: merge all properties of value into the ns
  54966. /******/ // mode & 4: return value when already ns object
  54967. /******/ // mode & 8|1: behave like require
  54968. /******/ __webpack_require__.t = function(value, mode) {
  54969. /******/ if(mode & 1) value = __webpack_require__(value);
  54970. /******/ if(mode & 8) return value;
  54971. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  54972. /******/ var ns = Object.create(null);
  54973. /******/ __webpack_require__.r(ns);
  54974. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  54975. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  54976. /******/ return ns;
  54977. /******/ };
  54978. /******/
  54979. /******/ // getDefaultExport function for compatibility with non-harmony modules
  54980. /******/ __webpack_require__.n = function(module) {
  54981. /******/ var getter = module && module.__esModule ?
  54982. /******/ function getDefault() { return module['default']; } :
  54983. /******/ function getModuleExports() { return module; };
  54984. /******/ __webpack_require__.d(getter, 'a', getter);
  54985. /******/ return getter;
  54986. /******/ };
  54987. /******/
  54988. /******/ // Object.prototype.hasOwnProperty.call
  54989. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  54990. /******/
  54991. /******/ // __webpack_public_path__
  54992. /******/ __webpack_require__.p = "/dist/";
  54993. /******/
  54994. /******/
  54995. /******/ // Load entry module and return exports
  54996. /******/ return __webpack_require__(__webpack_require__.s = 61);
  54997. /******/ })
  54998. /************************************************************************/
  54999. /******/ ({
  55000. /***/ 0:
  55001. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  55002. "use strict";
  55003. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  55004. /* globals __VUE_SSR_CONTEXT__ */
  55005. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  55006. // This module is a runtime utility for cleaner component module output and will
  55007. // be included in the final webpack user bundle.
  55008. function normalizeComponent (
  55009. scriptExports,
  55010. render,
  55011. staticRenderFns,
  55012. functionalTemplate,
  55013. injectStyles,
  55014. scopeId,
  55015. moduleIdentifier, /* server only */
  55016. shadowMode /* vue-cli only */
  55017. ) {
  55018. // Vue.extend constructor export interop
  55019. var options = typeof scriptExports === 'function'
  55020. ? scriptExports.options
  55021. : scriptExports
  55022. // render functions
  55023. if (render) {
  55024. options.render = render
  55025. options.staticRenderFns = staticRenderFns
  55026. options._compiled = true
  55027. }
  55028. // functional template
  55029. if (functionalTemplate) {
  55030. options.functional = true
  55031. }
  55032. // scopedId
  55033. if (scopeId) {
  55034. options._scopeId = 'data-v-' + scopeId
  55035. }
  55036. var hook
  55037. if (moduleIdentifier) { // server build
  55038. hook = function (context) {
  55039. // 2.3 injection
  55040. context =
  55041. context || // cached call
  55042. (this.$vnode && this.$vnode.ssrContext) || // stateful
  55043. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  55044. // 2.2 with runInNewContext: true
  55045. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  55046. context = __VUE_SSR_CONTEXT__
  55047. }
  55048. // inject component styles
  55049. if (injectStyles) {
  55050. injectStyles.call(this, context)
  55051. }
  55052. // register component module identifier for async chunk inferrence
  55053. if (context && context._registeredComponents) {
  55054. context._registeredComponents.add(moduleIdentifier)
  55055. }
  55056. }
  55057. // used by ssr in case component is cached and beforeCreate
  55058. // never gets called
  55059. options._ssrRegister = hook
  55060. } else if (injectStyles) {
  55061. hook = shadowMode
  55062. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  55063. : injectStyles
  55064. }
  55065. if (hook) {
  55066. if (options.functional) {
  55067. // for template-only hot-reload because in that case the render fn doesn't
  55068. // go through the normalizer
  55069. options._injectStyles = hook
  55070. // register for functioal component in vue file
  55071. var originalRender = options.render
  55072. options.render = function renderWithStyleInjection (h, context) {
  55073. hook.call(context)
  55074. return originalRender(h, context)
  55075. }
  55076. } else {
  55077. // inject component registration as beforeCreate hook
  55078. var existing = options.beforeCreate
  55079. options.beforeCreate = existing
  55080. ? [].concat(existing, hook)
  55081. : [hook]
  55082. }
  55083. }
  55084. return {
  55085. exports: scriptExports,
  55086. options: options
  55087. }
  55088. }
  55089. /***/ }),
  55090. /***/ 10:
  55091. /***/ (function(module, exports) {
  55092. module.exports = __webpack_require__(/*! element-ui/lib/input */ "./node_modules/_element-ui@2.15.8@element-ui/lib/input.js");
  55093. /***/ }),
  55094. /***/ 12:
  55095. /***/ (function(module, exports) {
  55096. module.exports = __webpack_require__(/*! element-ui/lib/utils/clickoutside */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/clickoutside.js");
  55097. /***/ }),
  55098. /***/ 15:
  55099. /***/ (function(module, exports) {
  55100. module.exports = __webpack_require__(/*! element-ui/lib/scrollbar */ "./node_modules/_element-ui@2.15.8@element-ui/lib/scrollbar.js");
  55101. /***/ }),
  55102. /***/ 16:
  55103. /***/ (function(module, exports) {
  55104. module.exports = __webpack_require__(/*! element-ui/lib/utils/resize-event */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/resize-event.js");
  55105. /***/ }),
  55106. /***/ 18:
  55107. /***/ (function(module, exports) {
  55108. module.exports = __webpack_require__(/*! throttle-debounce/debounce */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/debounce.js");
  55109. /***/ }),
  55110. /***/ 21:
  55111. /***/ (function(module, exports) {
  55112. module.exports = __webpack_require__(/*! element-ui/lib/utils/shared */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/shared.js");
  55113. /***/ }),
  55114. /***/ 22:
  55115. /***/ (function(module, exports) {
  55116. module.exports = __webpack_require__(/*! element-ui/lib/mixins/focus */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/focus.js");
  55117. /***/ }),
  55118. /***/ 3:
  55119. /***/ (function(module, exports) {
  55120. module.exports = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  55121. /***/ }),
  55122. /***/ 31:
  55123. /***/ (function(module, exports) {
  55124. module.exports = __webpack_require__(/*! element-ui/lib/utils/scroll-into-view */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scroll-into-view.js");
  55125. /***/ }),
  55126. /***/ 33:
  55127. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  55128. "use strict";
  55129. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  55130. var render = function() {
  55131. var _vm = this
  55132. var _h = _vm.$createElement
  55133. var _c = _vm._self._c || _h
  55134. return _c(
  55135. "li",
  55136. {
  55137. directives: [
  55138. {
  55139. name: "show",
  55140. rawName: "v-show",
  55141. value: _vm.visible,
  55142. expression: "visible"
  55143. }
  55144. ],
  55145. staticClass: "el-select-dropdown__item",
  55146. class: {
  55147. selected: _vm.itemSelected,
  55148. "is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
  55149. hover: _vm.hover
  55150. },
  55151. on: {
  55152. mouseenter: _vm.hoverItem,
  55153. click: function($event) {
  55154. $event.stopPropagation()
  55155. return _vm.selectOptionClick($event)
  55156. }
  55157. }
  55158. },
  55159. [_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])],
  55160. 2
  55161. )
  55162. }
  55163. var staticRenderFns = []
  55164. render._withStripped = true
  55165. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  55166. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  55167. var emitter_ = __webpack_require__(4);
  55168. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  55169. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  55170. var util_ = __webpack_require__(3);
  55171. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&
  55172. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  55173. //
  55174. //
  55175. //
  55176. //
  55177. //
  55178. //
  55179. //
  55180. //
  55181. //
  55182. //
  55183. //
  55184. //
  55185. //
  55186. //
  55187. //
  55188. //
  55189. //
  55190. /* harmony default export */ var optionvue_type_script_lang_js_ = ({
  55191. mixins: [emitter_default.a],
  55192. name: 'ElOption',
  55193. componentName: 'ElOption',
  55194. inject: ['select'],
  55195. props: {
  55196. value: {
  55197. required: true
  55198. },
  55199. label: [String, Number],
  55200. created: Boolean,
  55201. disabled: {
  55202. type: Boolean,
  55203. default: false
  55204. }
  55205. },
  55206. data: function data() {
  55207. return {
  55208. index: -1,
  55209. groupDisabled: false,
  55210. visible: true,
  55211. hitState: false,
  55212. hover: false
  55213. };
  55214. },
  55215. computed: {
  55216. isObject: function isObject() {
  55217. return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
  55218. },
  55219. currentLabel: function currentLabel() {
  55220. return this.label || (this.isObject ? '' : this.value);
  55221. },
  55222. currentValue: function currentValue() {
  55223. return this.value || this.label || '';
  55224. },
  55225. itemSelected: function itemSelected() {
  55226. if (!this.select.multiple) {
  55227. return this.isEqual(this.value, this.select.value);
  55228. } else {
  55229. return this.contains(this.select.value, this.value);
  55230. }
  55231. },
  55232. limitReached: function limitReached() {
  55233. if (this.select.multiple) {
  55234. return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
  55235. } else {
  55236. return false;
  55237. }
  55238. }
  55239. },
  55240. watch: {
  55241. currentLabel: function currentLabel() {
  55242. if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
  55243. },
  55244. value: function value(val, oldVal) {
  55245. var _select = this.select,
  55246. remote = _select.remote,
  55247. valueKey = _select.valueKey;
  55248. if (!this.created && !remote) {
  55249. if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
  55250. return;
  55251. }
  55252. this.dispatch('ElSelect', 'setSelected');
  55253. }
  55254. }
  55255. },
  55256. methods: {
  55257. isEqual: function isEqual(a, b) {
  55258. if (!this.isObject) {
  55259. return a === b;
  55260. } else {
  55261. var valueKey = this.select.valueKey;
  55262. return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
  55263. }
  55264. },
  55265. contains: function contains() {
  55266. var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  55267. var target = arguments[1];
  55268. if (!this.isObject) {
  55269. return arr && arr.indexOf(target) > -1;
  55270. } else {
  55271. var valueKey = this.select.valueKey;
  55272. return arr && arr.some(function (item) {
  55273. return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
  55274. });
  55275. }
  55276. },
  55277. handleGroupDisabled: function handleGroupDisabled(val) {
  55278. this.groupDisabled = val;
  55279. },
  55280. hoverItem: function hoverItem() {
  55281. if (!this.disabled && !this.groupDisabled) {
  55282. this.select.hoverIndex = this.select.options.indexOf(this);
  55283. }
  55284. },
  55285. selectOptionClick: function selectOptionClick() {
  55286. if (this.disabled !== true && this.groupDisabled !== true) {
  55287. this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
  55288. }
  55289. },
  55290. queryChange: function queryChange(query) {
  55291. this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;
  55292. if (!this.visible) {
  55293. this.select.filteredOptionsCount--;
  55294. }
  55295. }
  55296. },
  55297. created: function created() {
  55298. this.select.options.push(this);
  55299. this.select.cachedOptions.push(this);
  55300. this.select.optionsCount++;
  55301. this.select.filteredOptionsCount++;
  55302. this.$on('queryChange', this.queryChange);
  55303. this.$on('handleGroupDisabled', this.handleGroupDisabled);
  55304. },
  55305. beforeDestroy: function beforeDestroy() {
  55306. var _select2 = this.select,
  55307. selected = _select2.selected,
  55308. multiple = _select2.multiple;
  55309. var selectedOptions = multiple ? selected : [selected];
  55310. var index = this.select.cachedOptions.indexOf(this);
  55311. var selectedIndex = selectedOptions.indexOf(this);
  55312. // if option is not selected, remove it from cache
  55313. if (index > -1 && selectedIndex < 0) {
  55314. this.select.cachedOptions.splice(index, 1);
  55315. }
  55316. this.select.onOptionDestroy(this.select.options.indexOf(this));
  55317. }
  55318. });
  55319. // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&
  55320. /* harmony default export */ var src_optionvue_type_script_lang_js_ = (optionvue_type_script_lang_js_);
  55321. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  55322. var componentNormalizer = __webpack_require__(0);
  55323. // CONCATENATED MODULE: ./packages/select/src/option.vue
  55324. /* normalize component */
  55325. var component = Object(componentNormalizer["a" /* default */])(
  55326. src_optionvue_type_script_lang_js_,
  55327. render,
  55328. staticRenderFns,
  55329. false,
  55330. null,
  55331. null,
  55332. null
  55333. )
  55334. /* hot reload */
  55335. if (false) { var api; }
  55336. component.options.__file = "packages/select/src/option.vue"
  55337. /* harmony default export */ var src_option = __webpack_exports__["a"] = (component.exports);
  55338. /***/ }),
  55339. /***/ 37:
  55340. /***/ (function(module, exports) {
  55341. module.exports = __webpack_require__(/*! element-ui/lib/tag */ "./node_modules/_element-ui@2.15.8@element-ui/lib/tag.js");
  55342. /***/ }),
  55343. /***/ 4:
  55344. /***/ (function(module, exports) {
  55345. module.exports = __webpack_require__(/*! element-ui/lib/mixins/emitter */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/emitter.js");
  55346. /***/ }),
  55347. /***/ 5:
  55348. /***/ (function(module, exports) {
  55349. module.exports = __webpack_require__(/*! element-ui/lib/utils/vue-popper */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vue-popper.js");
  55350. /***/ }),
  55351. /***/ 6:
  55352. /***/ (function(module, exports) {
  55353. module.exports = __webpack_require__(/*! element-ui/lib/mixins/locale */ "./node_modules/_element-ui@2.15.8@element-ui/lib/mixins/locale.js");
  55354. /***/ }),
  55355. /***/ 61:
  55356. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  55357. "use strict";
  55358. __webpack_require__.r(__webpack_exports__);
  55359. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
  55360. var render = function() {
  55361. var _vm = this
  55362. var _h = _vm.$createElement
  55363. var _c = _vm._self._c || _h
  55364. return _c(
  55365. "div",
  55366. {
  55367. directives: [
  55368. {
  55369. name: "clickoutside",
  55370. rawName: "v-clickoutside",
  55371. value: _vm.handleClose,
  55372. expression: "handleClose"
  55373. }
  55374. ],
  55375. staticClass: "el-select",
  55376. class: [_vm.selectSize ? "el-select--" + _vm.selectSize : ""],
  55377. on: {
  55378. click: function($event) {
  55379. $event.stopPropagation()
  55380. return _vm.toggleMenu($event)
  55381. }
  55382. }
  55383. },
  55384. [
  55385. _vm.multiple
  55386. ? _c(
  55387. "div",
  55388. {
  55389. ref: "tags",
  55390. staticClass: "el-select__tags",
  55391. style: { "max-width": _vm.inputWidth - 32 + "px", width: "100%" }
  55392. },
  55393. [
  55394. _vm.collapseTags && _vm.selected.length
  55395. ? _c(
  55396. "span",
  55397. [
  55398. _c(
  55399. "el-tag",
  55400. {
  55401. attrs: {
  55402. closable: !_vm.selectDisabled,
  55403. size: _vm.collapseTagSize,
  55404. hit: _vm.selected[0].hitState,
  55405. type: "info",
  55406. "disable-transitions": ""
  55407. },
  55408. on: {
  55409. close: function($event) {
  55410. _vm.deleteTag($event, _vm.selected[0])
  55411. }
  55412. }
  55413. },
  55414. [
  55415. _c("span", { staticClass: "el-select__tags-text" }, [
  55416. _vm._v(_vm._s(_vm.selected[0].currentLabel))
  55417. ])
  55418. ]
  55419. ),
  55420. _vm.selected.length > 1
  55421. ? _c(
  55422. "el-tag",
  55423. {
  55424. attrs: {
  55425. closable: false,
  55426. size: _vm.collapseTagSize,
  55427. type: "info",
  55428. "disable-transitions": ""
  55429. }
  55430. },
  55431. [
  55432. _c(
  55433. "span",
  55434. { staticClass: "el-select__tags-text" },
  55435. [_vm._v("+ " + _vm._s(_vm.selected.length - 1))]
  55436. )
  55437. ]
  55438. )
  55439. : _vm._e()
  55440. ],
  55441. 1
  55442. )
  55443. : _vm._e(),
  55444. !_vm.collapseTags
  55445. ? _c(
  55446. "transition-group",
  55447. { on: { "after-leave": _vm.resetInputHeight } },
  55448. _vm._l(_vm.selected, function(item) {
  55449. return _c(
  55450. "el-tag",
  55451. {
  55452. key: _vm.getValueKey(item),
  55453. attrs: {
  55454. closable: !_vm.selectDisabled,
  55455. size: _vm.collapseTagSize,
  55456. hit: item.hitState,
  55457. type: "info",
  55458. "disable-transitions": ""
  55459. },
  55460. on: {
  55461. close: function($event) {
  55462. _vm.deleteTag($event, item)
  55463. }
  55464. }
  55465. },
  55466. [
  55467. _c("span", { staticClass: "el-select__tags-text" }, [
  55468. _vm._v(_vm._s(item.currentLabel))
  55469. ])
  55470. ]
  55471. )
  55472. }),
  55473. 1
  55474. )
  55475. : _vm._e(),
  55476. _vm.filterable
  55477. ? _c("input", {
  55478. directives: [
  55479. {
  55480. name: "model",
  55481. rawName: "v-model",
  55482. value: _vm.query,
  55483. expression: "query"
  55484. }
  55485. ],
  55486. ref: "input",
  55487. staticClass: "el-select__input",
  55488. class: [_vm.selectSize ? "is-" + _vm.selectSize : ""],
  55489. style: {
  55490. "flex-grow": "1",
  55491. width: _vm.inputLength / (_vm.inputWidth - 32) + "%",
  55492. "max-width": _vm.inputWidth - 42 + "px"
  55493. },
  55494. attrs: {
  55495. type: "text",
  55496. disabled: _vm.selectDisabled,
  55497. autocomplete: _vm.autoComplete || _vm.autocomplete
  55498. },
  55499. domProps: { value: _vm.query },
  55500. on: {
  55501. focus: _vm.handleFocus,
  55502. blur: function($event) {
  55503. _vm.softFocus = false
  55504. },
  55505. keyup: _vm.managePlaceholder,
  55506. keydown: [
  55507. _vm.resetInputState,
  55508. function($event) {
  55509. if (
  55510. !("button" in $event) &&
  55511. _vm._k($event.keyCode, "down", 40, $event.key, [
  55512. "Down",
  55513. "ArrowDown"
  55514. ])
  55515. ) {
  55516. return null
  55517. }
  55518. $event.preventDefault()
  55519. _vm.handleNavigate("next")
  55520. },
  55521. function($event) {
  55522. if (
  55523. !("button" in $event) &&
  55524. _vm._k($event.keyCode, "up", 38, $event.key, [
  55525. "Up",
  55526. "ArrowUp"
  55527. ])
  55528. ) {
  55529. return null
  55530. }
  55531. $event.preventDefault()
  55532. _vm.handleNavigate("prev")
  55533. },
  55534. function($event) {
  55535. if (
  55536. !("button" in $event) &&
  55537. _vm._k(
  55538. $event.keyCode,
  55539. "enter",
  55540. 13,
  55541. $event.key,
  55542. "Enter"
  55543. )
  55544. ) {
  55545. return null
  55546. }
  55547. $event.preventDefault()
  55548. return _vm.selectOption($event)
  55549. },
  55550. function($event) {
  55551. if (
  55552. !("button" in $event) &&
  55553. _vm._k($event.keyCode, "esc", 27, $event.key, [
  55554. "Esc",
  55555. "Escape"
  55556. ])
  55557. ) {
  55558. return null
  55559. }
  55560. $event.stopPropagation()
  55561. $event.preventDefault()
  55562. _vm.visible = false
  55563. },
  55564. function($event) {
  55565. if (
  55566. !("button" in $event) &&
  55567. _vm._k(
  55568. $event.keyCode,
  55569. "delete",
  55570. [8, 46],
  55571. $event.key,
  55572. ["Backspace", "Delete", "Del"]
  55573. )
  55574. ) {
  55575. return null
  55576. }
  55577. return _vm.deletePrevTag($event)
  55578. },
  55579. function($event) {
  55580. if (
  55581. !("button" in $event) &&
  55582. _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
  55583. ) {
  55584. return null
  55585. }
  55586. _vm.visible = false
  55587. }
  55588. ],
  55589. compositionstart: _vm.handleComposition,
  55590. compositionupdate: _vm.handleComposition,
  55591. compositionend: _vm.handleComposition,
  55592. input: [
  55593. function($event) {
  55594. if ($event.target.composing) {
  55595. return
  55596. }
  55597. _vm.query = $event.target.value
  55598. },
  55599. _vm.debouncedQueryChange
  55600. ]
  55601. }
  55602. })
  55603. : _vm._e()
  55604. ],
  55605. 1
  55606. )
  55607. : _vm._e(),
  55608. _c(
  55609. "el-input",
  55610. {
  55611. ref: "reference",
  55612. class: { "is-focus": _vm.visible },
  55613. attrs: {
  55614. type: "text",
  55615. placeholder: _vm.currentPlaceholder,
  55616. name: _vm.name,
  55617. id: _vm.id,
  55618. autocomplete: _vm.autoComplete || _vm.autocomplete,
  55619. size: _vm.selectSize,
  55620. disabled: _vm.selectDisabled,
  55621. readonly: _vm.readonly,
  55622. "validate-event": false,
  55623. tabindex: _vm.multiple && _vm.filterable ? "-1" : null
  55624. },
  55625. on: {
  55626. focus: _vm.handleFocus,
  55627. blur: _vm.handleBlur,
  55628. input: _vm.debouncedOnInputChange,
  55629. compositionstart: _vm.handleComposition,
  55630. compositionupdate: _vm.handleComposition,
  55631. compositionend: _vm.handleComposition
  55632. },
  55633. nativeOn: {
  55634. keydown: [
  55635. function($event) {
  55636. if (
  55637. !("button" in $event) &&
  55638. _vm._k($event.keyCode, "down", 40, $event.key, [
  55639. "Down",
  55640. "ArrowDown"
  55641. ])
  55642. ) {
  55643. return null
  55644. }
  55645. $event.stopPropagation()
  55646. $event.preventDefault()
  55647. _vm.handleNavigate("next")
  55648. },
  55649. function($event) {
  55650. if (
  55651. !("button" in $event) &&
  55652. _vm._k($event.keyCode, "up", 38, $event.key, [
  55653. "Up",
  55654. "ArrowUp"
  55655. ])
  55656. ) {
  55657. return null
  55658. }
  55659. $event.stopPropagation()
  55660. $event.preventDefault()
  55661. _vm.handleNavigate("prev")
  55662. },
  55663. function($event) {
  55664. if (
  55665. !("button" in $event) &&
  55666. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  55667. ) {
  55668. return null
  55669. }
  55670. $event.preventDefault()
  55671. return _vm.selectOption($event)
  55672. },
  55673. function($event) {
  55674. if (
  55675. !("button" in $event) &&
  55676. _vm._k($event.keyCode, "esc", 27, $event.key, [
  55677. "Esc",
  55678. "Escape"
  55679. ])
  55680. ) {
  55681. return null
  55682. }
  55683. $event.stopPropagation()
  55684. $event.preventDefault()
  55685. _vm.visible = false
  55686. },
  55687. function($event) {
  55688. if (
  55689. !("button" in $event) &&
  55690. _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
  55691. ) {
  55692. return null
  55693. }
  55694. _vm.visible = false
  55695. }
  55696. ],
  55697. mouseenter: function($event) {
  55698. _vm.inputHovering = true
  55699. },
  55700. mouseleave: function($event) {
  55701. _vm.inputHovering = false
  55702. }
  55703. },
  55704. model: {
  55705. value: _vm.selectedLabel,
  55706. callback: function($$v) {
  55707. _vm.selectedLabel = $$v
  55708. },
  55709. expression: "selectedLabel"
  55710. }
  55711. },
  55712. [
  55713. _vm.$slots.prefix
  55714. ? _c("template", { slot: "prefix" }, [_vm._t("prefix")], 2)
  55715. : _vm._e(),
  55716. _c("template", { slot: "suffix" }, [
  55717. _c("i", {
  55718. directives: [
  55719. {
  55720. name: "show",
  55721. rawName: "v-show",
  55722. value: !_vm.showClose,
  55723. expression: "!showClose"
  55724. }
  55725. ],
  55726. class: [
  55727. "el-select__caret",
  55728. "el-input__icon",
  55729. "el-icon-" + _vm.iconClass
  55730. ]
  55731. }),
  55732. _vm.showClose
  55733. ? _c("i", {
  55734. staticClass:
  55735. "el-select__caret el-input__icon el-icon-circle-close",
  55736. on: { click: _vm.handleClearClick }
  55737. })
  55738. : _vm._e()
  55739. ])
  55740. ],
  55741. 2
  55742. ),
  55743. _c(
  55744. "transition",
  55745. {
  55746. attrs: { name: "el-zoom-in-top" },
  55747. on: {
  55748. "before-enter": _vm.handleMenuEnter,
  55749. "after-leave": _vm.doDestroy
  55750. }
  55751. },
  55752. [
  55753. _c(
  55754. "el-select-menu",
  55755. {
  55756. directives: [
  55757. {
  55758. name: "show",
  55759. rawName: "v-show",
  55760. value: _vm.visible && _vm.emptyText !== false,
  55761. expression: "visible && emptyText !== false"
  55762. }
  55763. ],
  55764. ref: "popper",
  55765. attrs: { "append-to-body": _vm.popperAppendToBody }
  55766. },
  55767. [
  55768. _c(
  55769. "el-scrollbar",
  55770. {
  55771. directives: [
  55772. {
  55773. name: "show",
  55774. rawName: "v-show",
  55775. value: _vm.options.length > 0 && !_vm.loading,
  55776. expression: "options.length > 0 && !loading"
  55777. }
  55778. ],
  55779. ref: "scrollbar",
  55780. class: {
  55781. "is-empty":
  55782. !_vm.allowCreate &&
  55783. _vm.query &&
  55784. _vm.filteredOptionsCount === 0
  55785. },
  55786. attrs: {
  55787. tag: "ul",
  55788. "wrap-class": "el-select-dropdown__wrap",
  55789. "view-class": "el-select-dropdown__list"
  55790. }
  55791. },
  55792. [
  55793. _vm.showNewOption
  55794. ? _c("el-option", {
  55795. attrs: { value: _vm.query, created: "" }
  55796. })
  55797. : _vm._e(),
  55798. _vm._t("default")
  55799. ],
  55800. 2
  55801. ),
  55802. _vm.emptyText &&
  55803. (!_vm.allowCreate ||
  55804. _vm.loading ||
  55805. (_vm.allowCreate && _vm.options.length === 0))
  55806. ? [
  55807. _vm.$slots.empty
  55808. ? _vm._t("empty")
  55809. : _c("p", { staticClass: "el-select-dropdown__empty" }, [
  55810. _vm._v(
  55811. "\n " +
  55812. _vm._s(_vm.emptyText) +
  55813. "\n "
  55814. )
  55815. ])
  55816. ]
  55817. : _vm._e()
  55818. ],
  55819. 2
  55820. )
  55821. ],
  55822. 1
  55823. )
  55824. ],
  55825. 1
  55826. )
  55827. }
  55828. var staticRenderFns = []
  55829. render._withStripped = true
  55830. // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
  55831. // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
  55832. var emitter_ = __webpack_require__(4);
  55833. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  55834. // EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
  55835. var focus_ = __webpack_require__(22);
  55836. var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
  55837. // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
  55838. var locale_ = __webpack_require__(6);
  55839. var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
  55840. // EXTERNAL MODULE: external "element-ui/lib/input"
  55841. var input_ = __webpack_require__(10);
  55842. var input_default = /*#__PURE__*/__webpack_require__.n(input_);
  55843. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
  55844. var select_dropdownvue_type_template_id_06828748_render = function() {
  55845. var _vm = this
  55846. var _h = _vm.$createElement
  55847. var _c = _vm._self._c || _h
  55848. return _c(
  55849. "div",
  55850. {
  55851. staticClass: "el-select-dropdown el-popper",
  55852. class: [{ "is-multiple": _vm.$parent.multiple }, _vm.popperClass],
  55853. style: { minWidth: _vm.minWidth }
  55854. },
  55855. [_vm._t("default")],
  55856. 2
  55857. )
  55858. }
  55859. var select_dropdownvue_type_template_id_06828748_staticRenderFns = []
  55860. select_dropdownvue_type_template_id_06828748_render._withStripped = true
  55861. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
  55862. // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
  55863. var vue_popper_ = __webpack_require__(5);
  55864. var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
  55865. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
  55866. //
  55867. //
  55868. //
  55869. //
  55870. //
  55871. //
  55872. //
  55873. //
  55874. //
  55875. /* harmony default export */ var select_dropdownvue_type_script_lang_js_ = ({
  55876. name: 'ElSelectDropdown',
  55877. componentName: 'ElSelectDropdown',
  55878. mixins: [vue_popper_default.a],
  55879. props: {
  55880. placement: {
  55881. default: 'bottom-start'
  55882. },
  55883. boundariesPadding: {
  55884. default: 0
  55885. },
  55886. popperOptions: {
  55887. default: function _default() {
  55888. return {
  55889. gpuAcceleration: false
  55890. };
  55891. }
  55892. },
  55893. visibleArrow: {
  55894. default: true
  55895. },
  55896. appendToBody: {
  55897. type: Boolean,
  55898. default: true
  55899. }
  55900. },
  55901. data: function data() {
  55902. return {
  55903. minWidth: ''
  55904. };
  55905. },
  55906. computed: {
  55907. popperClass: function popperClass() {
  55908. return this.$parent.popperClass;
  55909. }
  55910. },
  55911. watch: {
  55912. '$parent.inputWidth': function $parentInputWidth() {
  55913. this.minWidth = this.$parent.$el.getBoundingClientRect().width + 'px';
  55914. }
  55915. },
  55916. mounted: function mounted() {
  55917. var _this = this;
  55918. this.referenceElm = this.$parent.$refs.reference.$el;
  55919. this.$parent.popperElm = this.popperElm = this.$el;
  55920. this.$on('updatePopper', function () {
  55921. if (_this.$parent.visible) _this.updatePopper();
  55922. });
  55923. this.$on('destroyPopper', this.destroyPopper);
  55924. }
  55925. });
  55926. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
  55927. /* harmony default export */ var src_select_dropdownvue_type_script_lang_js_ = (select_dropdownvue_type_script_lang_js_);
  55928. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  55929. var componentNormalizer = __webpack_require__(0);
  55930. // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue
  55931. /* normalize component */
  55932. var component = Object(componentNormalizer["a" /* default */])(
  55933. src_select_dropdownvue_type_script_lang_js_,
  55934. select_dropdownvue_type_template_id_06828748_render,
  55935. select_dropdownvue_type_template_id_06828748_staticRenderFns,
  55936. false,
  55937. null,
  55938. null,
  55939. null
  55940. )
  55941. /* hot reload */
  55942. if (false) { var api; }
  55943. component.options.__file = "packages/select/src/select-dropdown.vue"
  55944. /* harmony default export */ var select_dropdown = (component.exports);
  55945. // EXTERNAL MODULE: ./packages/select/src/option.vue + 4 modules
  55946. var src_option = __webpack_require__(33);
  55947. // EXTERNAL MODULE: external "element-ui/lib/tag"
  55948. var tag_ = __webpack_require__(37);
  55949. var tag_default = /*#__PURE__*/__webpack_require__.n(tag_);
  55950. // EXTERNAL MODULE: external "element-ui/lib/scrollbar"
  55951. var scrollbar_ = __webpack_require__(15);
  55952. var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
  55953. // EXTERNAL MODULE: external "throttle-debounce/debounce"
  55954. var debounce_ = __webpack_require__(18);
  55955. var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
  55956. // EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
  55957. var clickoutside_ = __webpack_require__(12);
  55958. var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
  55959. // EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
  55960. var resize_event_ = __webpack_require__(16);
  55961. // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
  55962. var scroll_into_view_ = __webpack_require__(31);
  55963. var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
  55964. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  55965. var util_ = __webpack_require__(3);
  55966. // CONCATENATED MODULE: ./packages/select/src/navigation-mixin.js
  55967. /* harmony default export */ var navigation_mixin = ({
  55968. data: function data() {
  55969. return {
  55970. hoverOption: -1
  55971. };
  55972. },
  55973. computed: {
  55974. optionsAllDisabled: function optionsAllDisabled() {
  55975. return this.options.filter(function (option) {
  55976. return option.visible;
  55977. }).every(function (option) {
  55978. return option.disabled;
  55979. });
  55980. }
  55981. },
  55982. watch: {
  55983. hoverIndex: function hoverIndex(val) {
  55984. var _this = this;
  55985. if (typeof val === 'number' && val > -1) {
  55986. this.hoverOption = this.options[val] || {};
  55987. }
  55988. this.options.forEach(function (option) {
  55989. option.hover = _this.hoverOption === option;
  55990. });
  55991. }
  55992. },
  55993. methods: {
  55994. navigateOptions: function navigateOptions(direction) {
  55995. var _this2 = this;
  55996. if (!this.visible) {
  55997. this.visible = true;
  55998. return;
  55999. }
  56000. if (this.options.length === 0 || this.filteredOptionsCount === 0) return;
  56001. if (!this.optionsAllDisabled) {
  56002. if (direction === 'next') {
  56003. this.hoverIndex++;
  56004. if (this.hoverIndex === this.options.length) {
  56005. this.hoverIndex = 0;
  56006. }
  56007. } else if (direction === 'prev') {
  56008. this.hoverIndex--;
  56009. if (this.hoverIndex < 0) {
  56010. this.hoverIndex = this.options.length - 1;
  56011. }
  56012. }
  56013. var option = this.options[this.hoverIndex];
  56014. if (option.disabled === true || option.groupDisabled === true || !option.visible) {
  56015. this.navigateOptions(direction);
  56016. }
  56017. this.$nextTick(function () {
  56018. return _this2.scrollToOption(_this2.hoverOption);
  56019. });
  56020. }
  56021. }
  56022. }
  56023. });
  56024. // EXTERNAL MODULE: external "element-ui/lib/utils/shared"
  56025. var shared_ = __webpack_require__(21);
  56026. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js&
  56027. //
  56028. //
  56029. //
  56030. //
  56031. //
  56032. //
  56033. //
  56034. //
  56035. //
  56036. //
  56037. //
  56038. //
  56039. //
  56040. //
  56041. //
  56042. //
  56043. //
  56044. //
  56045. //
  56046. //
  56047. //
  56048. //
  56049. //
  56050. //
  56051. //
  56052. //
  56053. //
  56054. //
  56055. //
  56056. //
  56057. //
  56058. //
  56059. //
  56060. //
  56061. //
  56062. //
  56063. //
  56064. //
  56065. //
  56066. //
  56067. //
  56068. //
  56069. //
  56070. //
  56071. //
  56072. //
  56073. //
  56074. //
  56075. //
  56076. //
  56077. //
  56078. //
  56079. //
  56080. //
  56081. //
  56082. //
  56083. //
  56084. //
  56085. //
  56086. //
  56087. //
  56088. //
  56089. //
  56090. //
  56091. //
  56092. //
  56093. //
  56094. //
  56095. //
  56096. //
  56097. //
  56098. //
  56099. //
  56100. //
  56101. //
  56102. //
  56103. //
  56104. //
  56105. //
  56106. //
  56107. //
  56108. //
  56109. //
  56110. //
  56111. //
  56112. //
  56113. //
  56114. //
  56115. //
  56116. //
  56117. //
  56118. //
  56119. //
  56120. //
  56121. //
  56122. //
  56123. //
  56124. //
  56125. //
  56126. //
  56127. //
  56128. //
  56129. //
  56130. //
  56131. //
  56132. //
  56133. //
  56134. //
  56135. //
  56136. //
  56137. //
  56138. //
  56139. //
  56140. //
  56141. //
  56142. //
  56143. //
  56144. //
  56145. //
  56146. //
  56147. //
  56148. //
  56149. //
  56150. //
  56151. //
  56152. //
  56153. //
  56154. //
  56155. //
  56156. //
  56157. //
  56158. //
  56159. //
  56160. //
  56161. //
  56162. //
  56163. //
  56164. /* harmony default export */ var selectvue_type_script_lang_js_ = ({
  56165. mixins: [emitter_default.a, locale_default.a, focus_default()('reference'), navigation_mixin],
  56166. name: 'ElSelect',
  56167. componentName: 'ElSelect',
  56168. inject: {
  56169. elForm: {
  56170. default: ''
  56171. },
  56172. elFormItem: {
  56173. default: ''
  56174. }
  56175. },
  56176. provide: function provide() {
  56177. return {
  56178. 'select': this
  56179. };
  56180. },
  56181. computed: {
  56182. _elFormItemSize: function _elFormItemSize() {
  56183. return (this.elFormItem || {}).elFormItemSize;
  56184. },
  56185. readonly: function readonly() {
  56186. return !this.filterable || this.multiple || !Object(util_["isIE"])() && !Object(util_["isEdge"])() && !this.visible;
  56187. },
  56188. showClose: function showClose() {
  56189. var hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== undefined && this.value !== null && this.value !== '';
  56190. var criteria = this.clearable && !this.selectDisabled && this.inputHovering && hasValue;
  56191. return criteria;
  56192. },
  56193. iconClass: function iconClass() {
  56194. return this.remote && this.filterable ? '' : this.visible ? 'arrow-up is-reverse' : 'arrow-up';
  56195. },
  56196. debounce: function debounce() {
  56197. return this.remote ? 300 : 0;
  56198. },
  56199. emptyText: function emptyText() {
  56200. if (this.loading) {
  56201. return this.loadingText || this.t('el.select.loading');
  56202. } else {
  56203. if (this.remote && this.query === '' && this.options.length === 0) return false;
  56204. if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
  56205. return this.noMatchText || this.t('el.select.noMatch');
  56206. }
  56207. if (this.options.length === 0) {
  56208. return this.noDataText || this.t('el.select.noData');
  56209. }
  56210. }
  56211. return null;
  56212. },
  56213. showNewOption: function showNewOption() {
  56214. var _this = this;
  56215. var hasExistingOption = this.options.filter(function (option) {
  56216. return !option.created;
  56217. }).some(function (option) {
  56218. return option.currentLabel === _this.query;
  56219. });
  56220. return this.filterable && this.allowCreate && this.query !== '' && !hasExistingOption;
  56221. },
  56222. selectSize: function selectSize() {
  56223. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  56224. },
  56225. selectDisabled: function selectDisabled() {
  56226. return this.disabled || (this.elForm || {}).disabled;
  56227. },
  56228. collapseTagSize: function collapseTagSize() {
  56229. return ['small', 'mini'].indexOf(this.selectSize) > -1 ? 'mini' : 'small';
  56230. },
  56231. propPlaceholder: function propPlaceholder() {
  56232. return typeof this.placeholder !== 'undefined' ? this.placeholder : this.t('el.select.placeholder');
  56233. }
  56234. },
  56235. components: {
  56236. ElInput: input_default.a,
  56237. ElSelectMenu: select_dropdown,
  56238. ElOption: src_option["a" /* default */],
  56239. ElTag: tag_default.a,
  56240. ElScrollbar: scrollbar_default.a
  56241. },
  56242. directives: { Clickoutside: clickoutside_default.a },
  56243. props: {
  56244. name: String,
  56245. id: String,
  56246. value: {
  56247. required: true
  56248. },
  56249. autocomplete: {
  56250. type: String,
  56251. default: 'off'
  56252. },
  56253. /** @Deprecated in next major version */
  56254. autoComplete: {
  56255. type: String,
  56256. validator: function validator(val) {
  56257. false && false;
  56258. return true;
  56259. }
  56260. },
  56261. automaticDropdown: Boolean,
  56262. size: String,
  56263. disabled: Boolean,
  56264. clearable: Boolean,
  56265. filterable: Boolean,
  56266. allowCreate: Boolean,
  56267. loading: Boolean,
  56268. popperClass: String,
  56269. remote: Boolean,
  56270. loadingText: String,
  56271. noMatchText: String,
  56272. noDataText: String,
  56273. remoteMethod: Function,
  56274. filterMethod: Function,
  56275. multiple: Boolean,
  56276. multipleLimit: {
  56277. type: Number,
  56278. default: 0
  56279. },
  56280. placeholder: {
  56281. type: String,
  56282. required: false
  56283. },
  56284. defaultFirstOption: Boolean,
  56285. reserveKeyword: Boolean,
  56286. valueKey: {
  56287. type: String,
  56288. default: 'value'
  56289. },
  56290. collapseTags: Boolean,
  56291. popperAppendToBody: {
  56292. type: Boolean,
  56293. default: true
  56294. }
  56295. },
  56296. data: function data() {
  56297. return {
  56298. options: [],
  56299. cachedOptions: [],
  56300. createdLabel: null,
  56301. createdSelected: false,
  56302. selected: this.multiple ? [] : {},
  56303. inputLength: 20,
  56304. inputWidth: 0,
  56305. initialInputHeight: 0,
  56306. cachedPlaceHolder: '',
  56307. optionsCount: 0,
  56308. filteredOptionsCount: 0,
  56309. visible: false,
  56310. softFocus: false,
  56311. selectedLabel: '',
  56312. hoverIndex: -1,
  56313. query: '',
  56314. previousQuery: null,
  56315. inputHovering: false,
  56316. currentPlaceholder: '',
  56317. menuVisibleOnFocus: false,
  56318. isOnComposition: false,
  56319. isSilentBlur: false
  56320. };
  56321. },
  56322. watch: {
  56323. selectDisabled: function selectDisabled() {
  56324. var _this2 = this;
  56325. this.$nextTick(function () {
  56326. _this2.resetInputHeight();
  56327. });
  56328. },
  56329. propPlaceholder: function propPlaceholder(val) {
  56330. this.cachedPlaceHolder = this.currentPlaceholder = val;
  56331. },
  56332. value: function value(val, oldVal) {
  56333. if (this.multiple) {
  56334. this.resetInputHeight();
  56335. if (val && val.length > 0 || this.$refs.input && this.query !== '') {
  56336. this.currentPlaceholder = '';
  56337. } else {
  56338. this.currentPlaceholder = this.cachedPlaceHolder;
  56339. }
  56340. if (this.filterable && !this.reserveKeyword) {
  56341. this.query = '';
  56342. this.handleQueryChange(this.query);
  56343. }
  56344. }
  56345. this.setSelected();
  56346. if (this.filterable && !this.multiple) {
  56347. this.inputLength = 20;
  56348. }
  56349. if (!Object(util_["valueEquals"])(val, oldVal)) {
  56350. this.dispatch('ElFormItem', 'el.form.change', val);
  56351. }
  56352. },
  56353. visible: function visible(val) {
  56354. var _this3 = this;
  56355. if (!val) {
  56356. this.broadcast('ElSelectDropdown', 'destroyPopper');
  56357. if (this.$refs.input) {
  56358. this.$refs.input.blur();
  56359. }
  56360. this.query = '';
  56361. this.previousQuery = null;
  56362. this.selectedLabel = '';
  56363. this.inputLength = 20;
  56364. this.menuVisibleOnFocus = false;
  56365. this.resetHoverIndex();
  56366. this.$nextTick(function () {
  56367. if (_this3.$refs.input && _this3.$refs.input.value === '' && _this3.selected.length === 0) {
  56368. _this3.currentPlaceholder = _this3.cachedPlaceHolder;
  56369. }
  56370. });
  56371. if (!this.multiple) {
  56372. if (this.selected) {
  56373. if (this.filterable && this.allowCreate && this.createdSelected && this.createdLabel) {
  56374. this.selectedLabel = this.createdLabel;
  56375. } else {
  56376. this.selectedLabel = this.selected.currentLabel;
  56377. }
  56378. if (this.filterable) this.query = this.selectedLabel;
  56379. }
  56380. if (this.filterable) {
  56381. this.currentPlaceholder = this.cachedPlaceHolder;
  56382. }
  56383. }
  56384. } else {
  56385. this.broadcast('ElSelectDropdown', 'updatePopper');
  56386. if (this.filterable) {
  56387. this.query = this.remote ? '' : this.selectedLabel;
  56388. this.handleQueryChange(this.query);
  56389. if (this.multiple) {
  56390. this.$refs.input.focus();
  56391. } else {
  56392. if (!this.remote) {
  56393. this.broadcast('ElOption', 'queryChange', '');
  56394. this.broadcast('ElOptionGroup', 'queryChange');
  56395. }
  56396. if (this.selectedLabel) {
  56397. this.currentPlaceholder = this.selectedLabel;
  56398. this.selectedLabel = '';
  56399. }
  56400. }
  56401. }
  56402. }
  56403. this.$emit('visible-change', val);
  56404. },
  56405. options: function options() {
  56406. var _this4 = this;
  56407. if (this.$isServer) return;
  56408. this.$nextTick(function () {
  56409. _this4.broadcast('ElSelectDropdown', 'updatePopper');
  56410. });
  56411. if (this.multiple) {
  56412. this.resetInputHeight();
  56413. }
  56414. var inputs = this.$el.querySelectorAll('input');
  56415. if ([].indexOf.call(inputs, document.activeElement) === -1) {
  56416. this.setSelected();
  56417. }
  56418. if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
  56419. this.checkDefaultFirstOption();
  56420. }
  56421. }
  56422. },
  56423. methods: {
  56424. handleNavigate: function handleNavigate(direction) {
  56425. if (this.isOnComposition) return;
  56426. this.navigateOptions(direction);
  56427. },
  56428. handleComposition: function handleComposition(event) {
  56429. var _this5 = this;
  56430. var text = event.target.value;
  56431. if (event.type === 'compositionend') {
  56432. this.isOnComposition = false;
  56433. this.$nextTick(function (_) {
  56434. return _this5.handleQueryChange(text);
  56435. });
  56436. } else {
  56437. var lastCharacter = text[text.length - 1] || '';
  56438. this.isOnComposition = !Object(shared_["isKorean"])(lastCharacter);
  56439. }
  56440. },
  56441. handleQueryChange: function handleQueryChange(val) {
  56442. var _this6 = this;
  56443. if (this.previousQuery === val || this.isOnComposition) return;
  56444. if (this.previousQuery === null && (typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')) {
  56445. this.previousQuery = val;
  56446. return;
  56447. }
  56448. this.previousQuery = val;
  56449. this.$nextTick(function () {
  56450. if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper');
  56451. });
  56452. this.hoverIndex = -1;
  56453. if (this.multiple && this.filterable) {
  56454. this.$nextTick(function () {
  56455. var length = _this6.$refs.input.value.length * 15 + 20;
  56456. _this6.inputLength = _this6.collapseTags ? Math.min(50, length) : length;
  56457. _this6.managePlaceholder();
  56458. _this6.resetInputHeight();
  56459. });
  56460. }
  56461. if (this.remote && typeof this.remoteMethod === 'function') {
  56462. this.hoverIndex = -1;
  56463. this.remoteMethod(val);
  56464. } else if (typeof this.filterMethod === 'function') {
  56465. this.filterMethod(val);
  56466. this.broadcast('ElOptionGroup', 'queryChange');
  56467. } else {
  56468. this.filteredOptionsCount = this.optionsCount;
  56469. this.broadcast('ElOption', 'queryChange', val);
  56470. this.broadcast('ElOptionGroup', 'queryChange');
  56471. }
  56472. if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
  56473. this.checkDefaultFirstOption();
  56474. }
  56475. },
  56476. scrollToOption: function scrollToOption(option) {
  56477. var target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;
  56478. if (this.$refs.popper && target) {
  56479. var menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
  56480. scroll_into_view_default()(menu, target);
  56481. }
  56482. this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
  56483. },
  56484. handleMenuEnter: function handleMenuEnter() {
  56485. var _this7 = this;
  56486. this.$nextTick(function () {
  56487. return _this7.scrollToOption(_this7.selected);
  56488. });
  56489. },
  56490. emitChange: function emitChange(val) {
  56491. if (!Object(util_["valueEquals"])(this.value, val)) {
  56492. this.$emit('change', val);
  56493. }
  56494. },
  56495. getOption: function getOption(value) {
  56496. var option = void 0;
  56497. var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
  56498. var isNull = Object.prototype.toString.call(value).toLowerCase() === '[object null]';
  56499. var isUndefined = Object.prototype.toString.call(value).toLowerCase() === '[object undefined]';
  56500. for (var i = this.cachedOptions.length - 1; i >= 0; i--) {
  56501. var cachedOption = this.cachedOptions[i];
  56502. var isEqual = isObject ? Object(util_["getValueByPath"])(cachedOption.value, this.valueKey) === Object(util_["getValueByPath"])(value, this.valueKey) : cachedOption.value === value;
  56503. if (isEqual) {
  56504. option = cachedOption;
  56505. break;
  56506. }
  56507. }
  56508. if (option) return option;
  56509. var label = !isObject && !isNull && !isUndefined ? String(value) : '';
  56510. var newOption = {
  56511. value: value,
  56512. currentLabel: label
  56513. };
  56514. if (this.multiple) {
  56515. newOption.hitState = false;
  56516. }
  56517. return newOption;
  56518. },
  56519. setSelected: function setSelected() {
  56520. var _this8 = this;
  56521. if (!this.multiple) {
  56522. var option = this.getOption(this.value);
  56523. if (option.created) {
  56524. this.createdLabel = option.currentLabel;
  56525. this.createdSelected = true;
  56526. } else {
  56527. this.createdSelected = false;
  56528. }
  56529. this.selectedLabel = option.currentLabel;
  56530. this.selected = option;
  56531. if (this.filterable) this.query = this.selectedLabel;
  56532. return;
  56533. }
  56534. var result = [];
  56535. if (Array.isArray(this.value)) {
  56536. this.value.forEach(function (value) {
  56537. result.push(_this8.getOption(value));
  56538. });
  56539. }
  56540. this.selected = result;
  56541. this.$nextTick(function () {
  56542. _this8.resetInputHeight();
  56543. });
  56544. },
  56545. handleFocus: function handleFocus(event) {
  56546. if (!this.softFocus) {
  56547. if (this.automaticDropdown || this.filterable) {
  56548. if (this.filterable && !this.visible) {
  56549. this.menuVisibleOnFocus = true;
  56550. }
  56551. this.visible = true;
  56552. }
  56553. this.$emit('focus', event);
  56554. } else {
  56555. this.softFocus = false;
  56556. }
  56557. },
  56558. blur: function blur() {
  56559. this.visible = false;
  56560. this.$refs.reference.blur();
  56561. },
  56562. handleBlur: function handleBlur(event) {
  56563. var _this9 = this;
  56564. setTimeout(function () {
  56565. if (_this9.isSilentBlur) {
  56566. _this9.isSilentBlur = false;
  56567. } else {
  56568. _this9.$emit('blur', event);
  56569. }
  56570. }, 50);
  56571. this.softFocus = false;
  56572. },
  56573. handleClearClick: function handleClearClick(event) {
  56574. this.deleteSelected(event);
  56575. },
  56576. doDestroy: function doDestroy() {
  56577. this.$refs.popper && this.$refs.popper.doDestroy();
  56578. },
  56579. handleClose: function handleClose() {
  56580. this.visible = false;
  56581. },
  56582. toggleLastOptionHitState: function toggleLastOptionHitState(hit) {
  56583. if (!Array.isArray(this.selected)) return;
  56584. var option = this.selected[this.selected.length - 1];
  56585. if (!option) return;
  56586. if (hit === true || hit === false) {
  56587. option.hitState = hit;
  56588. return hit;
  56589. }
  56590. option.hitState = !option.hitState;
  56591. return option.hitState;
  56592. },
  56593. deletePrevTag: function deletePrevTag(e) {
  56594. if (e.target.value.length <= 0 && !this.toggleLastOptionHitState()) {
  56595. var value = this.value.slice();
  56596. value.pop();
  56597. this.$emit('input', value);
  56598. this.emitChange(value);
  56599. }
  56600. },
  56601. managePlaceholder: function managePlaceholder() {
  56602. if (this.currentPlaceholder !== '') {
  56603. this.currentPlaceholder = this.$refs.input.value ? '' : this.cachedPlaceHolder;
  56604. }
  56605. },
  56606. resetInputState: function resetInputState(e) {
  56607. if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
  56608. this.inputLength = this.$refs.input.value.length * 15 + 20;
  56609. this.resetInputHeight();
  56610. },
  56611. resetInputHeight: function resetInputHeight() {
  56612. var _this10 = this;
  56613. if (this.collapseTags && !this.filterable) return;
  56614. this.$nextTick(function () {
  56615. if (!_this10.$refs.reference) return;
  56616. var inputChildNodes = _this10.$refs.reference.$el.childNodes;
  56617. var input = [].filter.call(inputChildNodes, function (item) {
  56618. return item.tagName === 'INPUT';
  56619. })[0];
  56620. var tags = _this10.$refs.tags;
  56621. var tagsHeight = tags ? Math.round(tags.getBoundingClientRect().height) : 0;
  56622. var sizeInMap = _this10.initialInputHeight || 40;
  56623. input.style.height = _this10.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tagsHeight + (tagsHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';
  56624. if (_this10.visible && _this10.emptyText !== false) {
  56625. _this10.broadcast('ElSelectDropdown', 'updatePopper');
  56626. }
  56627. });
  56628. },
  56629. resetHoverIndex: function resetHoverIndex() {
  56630. var _this11 = this;
  56631. setTimeout(function () {
  56632. if (!_this11.multiple) {
  56633. _this11.hoverIndex = _this11.options.indexOf(_this11.selected);
  56634. } else {
  56635. if (_this11.selected.length > 0) {
  56636. _this11.hoverIndex = Math.min.apply(null, _this11.selected.map(function (item) {
  56637. return _this11.options.indexOf(item);
  56638. }));
  56639. } else {
  56640. _this11.hoverIndex = -1;
  56641. }
  56642. }
  56643. }, 300);
  56644. },
  56645. handleOptionSelect: function handleOptionSelect(option, byClick) {
  56646. var _this12 = this;
  56647. if (this.multiple) {
  56648. var value = (this.value || []).slice();
  56649. var optionIndex = this.getValueIndex(value, option.value);
  56650. if (optionIndex > -1) {
  56651. value.splice(optionIndex, 1);
  56652. } else if (this.multipleLimit <= 0 || value.length < this.multipleLimit) {
  56653. value.push(option.value);
  56654. }
  56655. this.$emit('input', value);
  56656. this.emitChange(value);
  56657. if (option.created) {
  56658. this.query = '';
  56659. this.handleQueryChange('');
  56660. this.inputLength = 20;
  56661. }
  56662. if (this.filterable) this.$refs.input.focus();
  56663. } else {
  56664. this.$emit('input', option.value);
  56665. this.emitChange(option.value);
  56666. this.visible = false;
  56667. }
  56668. this.isSilentBlur = byClick;
  56669. this.setSoftFocus();
  56670. if (this.visible) return;
  56671. this.$nextTick(function () {
  56672. _this12.scrollToOption(option);
  56673. });
  56674. },
  56675. setSoftFocus: function setSoftFocus() {
  56676. this.softFocus = true;
  56677. var input = this.$refs.input || this.$refs.reference;
  56678. if (input) {
  56679. input.focus();
  56680. }
  56681. },
  56682. getValueIndex: function getValueIndex() {
  56683. var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  56684. var value = arguments[1];
  56685. var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
  56686. if (!isObject) {
  56687. return arr.indexOf(value);
  56688. } else {
  56689. var valueKey = this.valueKey;
  56690. var index = -1;
  56691. arr.some(function (item, i) {
  56692. if (Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(value, valueKey)) {
  56693. index = i;
  56694. return true;
  56695. }
  56696. return false;
  56697. });
  56698. return index;
  56699. }
  56700. },
  56701. toggleMenu: function toggleMenu() {
  56702. if (!this.selectDisabled) {
  56703. if (this.menuVisibleOnFocus) {
  56704. this.menuVisibleOnFocus = false;
  56705. } else {
  56706. this.visible = !this.visible;
  56707. }
  56708. if (this.visible) {
  56709. (this.$refs.input || this.$refs.reference).focus();
  56710. }
  56711. }
  56712. },
  56713. selectOption: function selectOption() {
  56714. if (!this.visible) {
  56715. this.toggleMenu();
  56716. } else {
  56717. if (this.options[this.hoverIndex]) {
  56718. this.handleOptionSelect(this.options[this.hoverIndex]);
  56719. }
  56720. }
  56721. },
  56722. deleteSelected: function deleteSelected(event) {
  56723. event.stopPropagation();
  56724. var value = this.multiple ? [] : '';
  56725. this.$emit('input', value);
  56726. this.emitChange(value);
  56727. this.visible = false;
  56728. this.$emit('clear');
  56729. },
  56730. deleteTag: function deleteTag(event, tag) {
  56731. var index = this.selected.indexOf(tag);
  56732. if (index > -1 && !this.selectDisabled) {
  56733. var value = this.value.slice();
  56734. value.splice(index, 1);
  56735. this.$emit('input', value);
  56736. this.emitChange(value);
  56737. this.$emit('remove-tag', tag.value);
  56738. }
  56739. event.stopPropagation();
  56740. },
  56741. onInputChange: function onInputChange() {
  56742. if (this.filterable && this.query !== this.selectedLabel) {
  56743. this.query = this.selectedLabel;
  56744. this.handleQueryChange(this.query);
  56745. }
  56746. },
  56747. onOptionDestroy: function onOptionDestroy(index) {
  56748. if (index > -1) {
  56749. this.optionsCount--;
  56750. this.filteredOptionsCount--;
  56751. this.options.splice(index, 1);
  56752. }
  56753. },
  56754. resetInputWidth: function resetInputWidth() {
  56755. this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
  56756. },
  56757. handleResize: function handleResize() {
  56758. this.resetInputWidth();
  56759. if (this.multiple) this.resetInputHeight();
  56760. },
  56761. checkDefaultFirstOption: function checkDefaultFirstOption() {
  56762. this.hoverIndex = -1;
  56763. // highlight the created option
  56764. var hasCreated = false;
  56765. for (var i = this.options.length - 1; i >= 0; i--) {
  56766. if (this.options[i].created) {
  56767. hasCreated = true;
  56768. this.hoverIndex = i;
  56769. break;
  56770. }
  56771. }
  56772. if (hasCreated) return;
  56773. for (var _i = 0; _i !== this.options.length; ++_i) {
  56774. var option = this.options[_i];
  56775. if (this.query) {
  56776. // highlight first options that passes the filter
  56777. if (!option.disabled && !option.groupDisabled && option.visible) {
  56778. this.hoverIndex = _i;
  56779. break;
  56780. }
  56781. } else {
  56782. // highlight currently selected option
  56783. if (option.itemSelected) {
  56784. this.hoverIndex = _i;
  56785. break;
  56786. }
  56787. }
  56788. }
  56789. },
  56790. getValueKey: function getValueKey(item) {
  56791. if (Object.prototype.toString.call(item.value).toLowerCase() !== '[object object]') {
  56792. return item.value;
  56793. } else {
  56794. return Object(util_["getValueByPath"])(item.value, this.valueKey);
  56795. }
  56796. }
  56797. },
  56798. created: function created() {
  56799. var _this13 = this;
  56800. this.cachedPlaceHolder = this.currentPlaceholder = this.propPlaceholder;
  56801. if (this.multiple && !Array.isArray(this.value)) {
  56802. this.$emit('input', []);
  56803. }
  56804. if (!this.multiple && Array.isArray(this.value)) {
  56805. this.$emit('input', '');
  56806. }
  56807. this.debouncedOnInputChange = debounce_default()(this.debounce, function () {
  56808. _this13.onInputChange();
  56809. });
  56810. this.debouncedQueryChange = debounce_default()(this.debounce, function (e) {
  56811. _this13.handleQueryChange(e.target.value);
  56812. });
  56813. this.$on('handleOptionClick', this.handleOptionSelect);
  56814. this.$on('setSelected', this.setSelected);
  56815. },
  56816. mounted: function mounted() {
  56817. var _this14 = this;
  56818. if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
  56819. this.currentPlaceholder = '';
  56820. }
  56821. Object(resize_event_["addResizeListener"])(this.$el, this.handleResize);
  56822. var reference = this.$refs.reference;
  56823. if (reference && reference.$el) {
  56824. var sizeMap = {
  56825. medium: 36,
  56826. small: 32,
  56827. mini: 28
  56828. };
  56829. var input = reference.$el.querySelector('input');
  56830. this.initialInputHeight = input.getBoundingClientRect().height || sizeMap[this.selectSize];
  56831. }
  56832. if (this.remote && this.multiple) {
  56833. this.resetInputHeight();
  56834. }
  56835. this.$nextTick(function () {
  56836. if (reference && reference.$el) {
  56837. _this14.inputWidth = reference.$el.getBoundingClientRect().width;
  56838. }
  56839. });
  56840. this.setSelected();
  56841. },
  56842. beforeDestroy: function beforeDestroy() {
  56843. if (this.$el && this.handleResize) Object(resize_event_["removeResizeListener"])(this.$el, this.handleResize);
  56844. }
  56845. });
  56846. // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js&
  56847. /* harmony default export */ var src_selectvue_type_script_lang_js_ = (selectvue_type_script_lang_js_);
  56848. // CONCATENATED MODULE: ./packages/select/src/select.vue
  56849. /* normalize component */
  56850. var select_component = Object(componentNormalizer["a" /* default */])(
  56851. src_selectvue_type_script_lang_js_,
  56852. render,
  56853. staticRenderFns,
  56854. false,
  56855. null,
  56856. null,
  56857. null
  56858. )
  56859. /* hot reload */
  56860. if (false) { var select_api; }
  56861. select_component.options.__file = "packages/select/src/select.vue"
  56862. /* harmony default export */ var src_select = (select_component.exports);
  56863. // CONCATENATED MODULE: ./packages/select/index.js
  56864. /* istanbul ignore next */
  56865. src_select.install = function (Vue) {
  56866. Vue.component(src_select.name, src_select);
  56867. };
  56868. /* harmony default export */ var packages_select = __webpack_exports__["default"] = (src_select);
  56869. /***/ })
  56870. /******/ });
  56871. /***/ }),
  56872. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/tag.js":
  56873. /*!***************************************************************!*\
  56874. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/tag.js ***!
  56875. \***************************************************************/
  56876. /*! no static exports found */
  56877. /***/ (function(module, exports, __webpack_require__) {
  56878. module.exports =
  56879. /******/ (function(modules) { // webpackBootstrap
  56880. /******/ // The module cache
  56881. /******/ var installedModules = {};
  56882. /******/
  56883. /******/ // The require function
  56884. /******/ function __webpack_require__(moduleId) {
  56885. /******/
  56886. /******/ // Check if module is in cache
  56887. /******/ if(installedModules[moduleId]) {
  56888. /******/ return installedModules[moduleId].exports;
  56889. /******/ }
  56890. /******/ // Create a new module (and put it into the cache)
  56891. /******/ var module = installedModules[moduleId] = {
  56892. /******/ i: moduleId,
  56893. /******/ l: false,
  56894. /******/ exports: {}
  56895. /******/ };
  56896. /******/
  56897. /******/ // Execute the module function
  56898. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  56899. /******/
  56900. /******/ // Flag the module as loaded
  56901. /******/ module.l = true;
  56902. /******/
  56903. /******/ // Return the exports of the module
  56904. /******/ return module.exports;
  56905. /******/ }
  56906. /******/
  56907. /******/
  56908. /******/ // expose the modules object (__webpack_modules__)
  56909. /******/ __webpack_require__.m = modules;
  56910. /******/
  56911. /******/ // expose the module cache
  56912. /******/ __webpack_require__.c = installedModules;
  56913. /******/
  56914. /******/ // define getter function for harmony exports
  56915. /******/ __webpack_require__.d = function(exports, name, getter) {
  56916. /******/ if(!__webpack_require__.o(exports, name)) {
  56917. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  56918. /******/ }
  56919. /******/ };
  56920. /******/
  56921. /******/ // define __esModule on exports
  56922. /******/ __webpack_require__.r = function(exports) {
  56923. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  56924. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  56925. /******/ }
  56926. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  56927. /******/ };
  56928. /******/
  56929. /******/ // create a fake namespace object
  56930. /******/ // mode & 1: value is a module id, require it
  56931. /******/ // mode & 2: merge all properties of value into the ns
  56932. /******/ // mode & 4: return value when already ns object
  56933. /******/ // mode & 8|1: behave like require
  56934. /******/ __webpack_require__.t = function(value, mode) {
  56935. /******/ if(mode & 1) value = __webpack_require__(value);
  56936. /******/ if(mode & 8) return value;
  56937. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  56938. /******/ var ns = Object.create(null);
  56939. /******/ __webpack_require__.r(ns);
  56940. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  56941. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  56942. /******/ return ns;
  56943. /******/ };
  56944. /******/
  56945. /******/ // getDefaultExport function for compatibility with non-harmony modules
  56946. /******/ __webpack_require__.n = function(module) {
  56947. /******/ var getter = module && module.__esModule ?
  56948. /******/ function getDefault() { return module['default']; } :
  56949. /******/ function getModuleExports() { return module; };
  56950. /******/ __webpack_require__.d(getter, 'a', getter);
  56951. /******/ return getter;
  56952. /******/ };
  56953. /******/
  56954. /******/ // Object.prototype.hasOwnProperty.call
  56955. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  56956. /******/
  56957. /******/ // __webpack_public_path__
  56958. /******/ __webpack_require__.p = "/dist/";
  56959. /******/
  56960. /******/
  56961. /******/ // Load entry module and return exports
  56962. /******/ return __webpack_require__(__webpack_require__.s = 130);
  56963. /******/ })
  56964. /************************************************************************/
  56965. /******/ ({
  56966. /***/ 0:
  56967. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  56968. "use strict";
  56969. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  56970. /* globals __VUE_SSR_CONTEXT__ */
  56971. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  56972. // This module is a runtime utility for cleaner component module output and will
  56973. // be included in the final webpack user bundle.
  56974. function normalizeComponent (
  56975. scriptExports,
  56976. render,
  56977. staticRenderFns,
  56978. functionalTemplate,
  56979. injectStyles,
  56980. scopeId,
  56981. moduleIdentifier, /* server only */
  56982. shadowMode /* vue-cli only */
  56983. ) {
  56984. // Vue.extend constructor export interop
  56985. var options = typeof scriptExports === 'function'
  56986. ? scriptExports.options
  56987. : scriptExports
  56988. // render functions
  56989. if (render) {
  56990. options.render = render
  56991. options.staticRenderFns = staticRenderFns
  56992. options._compiled = true
  56993. }
  56994. // functional template
  56995. if (functionalTemplate) {
  56996. options.functional = true
  56997. }
  56998. // scopedId
  56999. if (scopeId) {
  57000. options._scopeId = 'data-v-' + scopeId
  57001. }
  57002. var hook
  57003. if (moduleIdentifier) { // server build
  57004. hook = function (context) {
  57005. // 2.3 injection
  57006. context =
  57007. context || // cached call
  57008. (this.$vnode && this.$vnode.ssrContext) || // stateful
  57009. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  57010. // 2.2 with runInNewContext: true
  57011. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  57012. context = __VUE_SSR_CONTEXT__
  57013. }
  57014. // inject component styles
  57015. if (injectStyles) {
  57016. injectStyles.call(this, context)
  57017. }
  57018. // register component module identifier for async chunk inferrence
  57019. if (context && context._registeredComponents) {
  57020. context._registeredComponents.add(moduleIdentifier)
  57021. }
  57022. }
  57023. // used by ssr in case component is cached and beforeCreate
  57024. // never gets called
  57025. options._ssrRegister = hook
  57026. } else if (injectStyles) {
  57027. hook = shadowMode
  57028. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  57029. : injectStyles
  57030. }
  57031. if (hook) {
  57032. if (options.functional) {
  57033. // for template-only hot-reload because in that case the render fn doesn't
  57034. // go through the normalizer
  57035. options._injectStyles = hook
  57036. // register for functioal component in vue file
  57037. var originalRender = options.render
  57038. options.render = function renderWithStyleInjection (h, context) {
  57039. hook.call(context)
  57040. return originalRender(h, context)
  57041. }
  57042. } else {
  57043. // inject component registration as beforeCreate hook
  57044. var existing = options.beforeCreate
  57045. options.beforeCreate = existing
  57046. ? [].concat(existing, hook)
  57047. : [hook]
  57048. }
  57049. }
  57050. return {
  57051. exports: scriptExports,
  57052. options: options
  57053. }
  57054. }
  57055. /***/ }),
  57056. /***/ 130:
  57057. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  57058. "use strict";
  57059. __webpack_require__.r(__webpack_exports__);
  57060. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js&
  57061. /* harmony default export */ var tagvue_type_script_lang_js_ = ({
  57062. name: 'ElTag',
  57063. props: {
  57064. text: String,
  57065. closable: Boolean,
  57066. type: String,
  57067. hit: Boolean,
  57068. disableTransitions: Boolean,
  57069. color: String,
  57070. size: String,
  57071. effect: {
  57072. type: String,
  57073. default: 'light',
  57074. validator: function validator(val) {
  57075. return ['dark', 'light', 'plain'].indexOf(val) !== -1;
  57076. }
  57077. }
  57078. },
  57079. methods: {
  57080. handleClose: function handleClose(event) {
  57081. event.stopPropagation();
  57082. this.$emit('close', event);
  57083. },
  57084. handleClick: function handleClick(event) {
  57085. this.$emit('click', event);
  57086. }
  57087. },
  57088. computed: {
  57089. tagSize: function tagSize() {
  57090. return this.size || (this.$ELEMENT || {}).size;
  57091. }
  57092. },
  57093. render: function render(h) {
  57094. var type = this.type,
  57095. tagSize = this.tagSize,
  57096. hit = this.hit,
  57097. effect = this.effect;
  57098. var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
  57099. var tagEl = h(
  57100. 'span',
  57101. {
  57102. 'class': classes,
  57103. style: { backgroundColor: this.color },
  57104. on: {
  57105. 'click': this.handleClick
  57106. }
  57107. },
  57108. [this.$slots.default, this.closable && h('i', { 'class': 'el-tag__close el-icon-close', on: {
  57109. 'click': this.handleClose
  57110. }
  57111. })]
  57112. );
  57113. return this.disableTransitions ? tagEl : h(
  57114. 'transition',
  57115. {
  57116. attrs: { name: 'el-zoom-in-center' }
  57117. },
  57118. [tagEl]
  57119. );
  57120. }
  57121. });
  57122. // CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js&
  57123. /* harmony default export */ var src_tagvue_type_script_lang_js_ = (tagvue_type_script_lang_js_);
  57124. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  57125. var componentNormalizer = __webpack_require__(0);
  57126. // CONCATENATED MODULE: ./packages/tag/src/tag.vue
  57127. var render, staticRenderFns
  57128. /* normalize component */
  57129. var component = Object(componentNormalizer["a" /* default */])(
  57130. src_tagvue_type_script_lang_js_,
  57131. render,
  57132. staticRenderFns,
  57133. false,
  57134. null,
  57135. null,
  57136. null
  57137. )
  57138. /* hot reload */
  57139. if (false) { var api; }
  57140. component.options.__file = "packages/tag/src/tag.vue"
  57141. /* harmony default export */ var tag = (component.exports);
  57142. // CONCATENATED MODULE: ./packages/tag/index.js
  57143. /* istanbul ignore next */
  57144. tag.install = function (Vue) {
  57145. Vue.component(tag.name, tag);
  57146. };
  57147. /* harmony default export */ var packages_tag = __webpack_exports__["default"] = (tag);
  57148. /***/ })
  57149. /******/ });
  57150. /***/ }),
  57151. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/display.css":
  57152. /*!********************************************************************************!*\
  57153. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/display.css ***!
  57154. \********************************************************************************/
  57155. /*! no static exports found */
  57156. /***/ (function(module, exports, __webpack_require__) {
  57157. // style-loader: Adds some css to the DOM by adding a <style> tag
  57158. // load the styles
  57159. var content = __webpack_require__(/*! !../../../_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!../../../_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./display.css */ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/display.css");
  57160. if(content.__esModule) content = content.default;
  57161. if(typeof content === 'string') content = [[module.i, content, '']];
  57162. if(content.locals) module.exports = content.locals;
  57163. // add the styles to the DOM
  57164. var add = __webpack_require__(/*! ../../../_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js */ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js").default
  57165. var update = add("249d0a72", content, false, {"sourceMap":true,"shadowMode":false});
  57166. // Hot Module Replacement
  57167. if(false) {}
  57168. /***/ }),
  57169. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/fonts/element-icons.ttf":
  57170. /*!********************************************************************************************!*\
  57171. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/fonts/element-icons.ttf ***!
  57172. \********************************************************************************************/
  57173. /*! no static exports found */
  57174. /***/ (function(module, exports, __webpack_require__) {
  57175. module.exports = __webpack_require__.p + "static/fonts/element-icons.732389de.ttf";
  57176. /***/ }),
  57177. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/fonts/element-icons.woff":
  57178. /*!*********************************************************************************************!*\
  57179. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/theme-chalk/fonts/element-icons.woff ***!
  57180. \*********************************************************************************************/
  57181. /*! no static exports found */
  57182. /***/ (function(module, exports, __webpack_require__) {
  57183. module.exports = __webpack_require__.p + "static/fonts/element-icons.535877f5.woff";
  57184. /***/ }),
  57185. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/tooltip.js":
  57186. /*!*******************************************************************!*\
  57187. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/tooltip.js ***!
  57188. \*******************************************************************/
  57189. /*! no static exports found */
  57190. /***/ (function(module, exports, __webpack_require__) {
  57191. module.exports =
  57192. /******/ (function(modules) { // webpackBootstrap
  57193. /******/ // The module cache
  57194. /******/ var installedModules = {};
  57195. /******/
  57196. /******/ // The require function
  57197. /******/ function __webpack_require__(moduleId) {
  57198. /******/
  57199. /******/ // Check if module is in cache
  57200. /******/ if(installedModules[moduleId]) {
  57201. /******/ return installedModules[moduleId].exports;
  57202. /******/ }
  57203. /******/ // Create a new module (and put it into the cache)
  57204. /******/ var module = installedModules[moduleId] = {
  57205. /******/ i: moduleId,
  57206. /******/ l: false,
  57207. /******/ exports: {}
  57208. /******/ };
  57209. /******/
  57210. /******/ // Execute the module function
  57211. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  57212. /******/
  57213. /******/ // Flag the module as loaded
  57214. /******/ module.l = true;
  57215. /******/
  57216. /******/ // Return the exports of the module
  57217. /******/ return module.exports;
  57218. /******/ }
  57219. /******/
  57220. /******/
  57221. /******/ // expose the modules object (__webpack_modules__)
  57222. /******/ __webpack_require__.m = modules;
  57223. /******/
  57224. /******/ // expose the module cache
  57225. /******/ __webpack_require__.c = installedModules;
  57226. /******/
  57227. /******/ // define getter function for harmony exports
  57228. /******/ __webpack_require__.d = function(exports, name, getter) {
  57229. /******/ if(!__webpack_require__.o(exports, name)) {
  57230. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  57231. /******/ }
  57232. /******/ };
  57233. /******/
  57234. /******/ // define __esModule on exports
  57235. /******/ __webpack_require__.r = function(exports) {
  57236. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  57237. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  57238. /******/ }
  57239. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  57240. /******/ };
  57241. /******/
  57242. /******/ // create a fake namespace object
  57243. /******/ // mode & 1: value is a module id, require it
  57244. /******/ // mode & 2: merge all properties of value into the ns
  57245. /******/ // mode & 4: return value when already ns object
  57246. /******/ // mode & 8|1: behave like require
  57247. /******/ __webpack_require__.t = function(value, mode) {
  57248. /******/ if(mode & 1) value = __webpack_require__(value);
  57249. /******/ if(mode & 8) return value;
  57250. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  57251. /******/ var ns = Object.create(null);
  57252. /******/ __webpack_require__.r(ns);
  57253. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  57254. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  57255. /******/ return ns;
  57256. /******/ };
  57257. /******/
  57258. /******/ // getDefaultExport function for compatibility with non-harmony modules
  57259. /******/ __webpack_require__.n = function(module) {
  57260. /******/ var getter = module && module.__esModule ?
  57261. /******/ function getDefault() { return module['default']; } :
  57262. /******/ function getModuleExports() { return module; };
  57263. /******/ __webpack_require__.d(getter, 'a', getter);
  57264. /******/ return getter;
  57265. /******/ };
  57266. /******/
  57267. /******/ // Object.prototype.hasOwnProperty.call
  57268. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  57269. /******/
  57270. /******/ // __webpack_public_path__
  57271. /******/ __webpack_require__.p = "/dist/";
  57272. /******/
  57273. /******/
  57274. /******/ // Load entry module and return exports
  57275. /******/ return __webpack_require__(__webpack_require__.s = 136);
  57276. /******/ })
  57277. /************************************************************************/
  57278. /******/ ({
  57279. /***/ 136:
  57280. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  57281. "use strict";
  57282. __webpack_require__.r(__webpack_exports__);
  57283. // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
  57284. var vue_popper_ = __webpack_require__(5);
  57285. var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
  57286. // EXTERNAL MODULE: external "throttle-debounce/debounce"
  57287. var debounce_ = __webpack_require__(18);
  57288. var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
  57289. // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
  57290. var dom_ = __webpack_require__(2);
  57291. // EXTERNAL MODULE: external "element-ui/lib/utils/util"
  57292. var util_ = __webpack_require__(3);
  57293. // EXTERNAL MODULE: external "vue"
  57294. var external_vue_ = __webpack_require__(7);
  57295. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  57296. // CONCATENATED MODULE: ./packages/tooltip/src/main.js
  57297. /* harmony default export */ var main = ({
  57298. name: 'ElTooltip',
  57299. mixins: [vue_popper_default.a],
  57300. props: {
  57301. openDelay: {
  57302. type: Number,
  57303. default: 0
  57304. },
  57305. disabled: Boolean,
  57306. manual: Boolean,
  57307. effect: {
  57308. type: String,
  57309. default: 'dark'
  57310. },
  57311. arrowOffset: {
  57312. type: Number,
  57313. default: 0
  57314. },
  57315. popperClass: String,
  57316. content: String,
  57317. visibleArrow: {
  57318. default: true
  57319. },
  57320. transition: {
  57321. type: String,
  57322. default: 'el-fade-in-linear'
  57323. },
  57324. popperOptions: {
  57325. default: function _default() {
  57326. return {
  57327. boundariesPadding: 10,
  57328. gpuAcceleration: false
  57329. };
  57330. }
  57331. },
  57332. enterable: {
  57333. type: Boolean,
  57334. default: true
  57335. },
  57336. hideAfter: {
  57337. type: Number,
  57338. default: 0
  57339. },
  57340. tabindex: {
  57341. type: Number,
  57342. default: 0
  57343. }
  57344. },
  57345. data: function data() {
  57346. return {
  57347. tooltipId: 'el-tooltip-' + Object(util_["generateId"])(),
  57348. timeoutPending: null,
  57349. focusing: false
  57350. };
  57351. },
  57352. beforeCreate: function beforeCreate() {
  57353. var _this = this;
  57354. if (this.$isServer) return;
  57355. this.popperVM = new external_vue_default.a({
  57356. data: { node: '' },
  57357. render: function render(h) {
  57358. return this.node;
  57359. }
  57360. }).$mount();
  57361. this.debounceClose = debounce_default()(200, function () {
  57362. return _this.handleClosePopper();
  57363. });
  57364. },
  57365. render: function render(h) {
  57366. var _this2 = this;
  57367. if (this.popperVM) {
  57368. this.popperVM.node = h(
  57369. 'transition',
  57370. {
  57371. attrs: {
  57372. name: this.transition
  57373. },
  57374. on: {
  57375. 'afterLeave': this.doDestroy
  57376. }
  57377. },
  57378. [h(
  57379. 'div',
  57380. {
  57381. on: {
  57382. 'mouseleave': function mouseleave() {
  57383. _this2.setExpectedState(false);_this2.debounceClose();
  57384. },
  57385. 'mouseenter': function mouseenter() {
  57386. _this2.setExpectedState(true);
  57387. }
  57388. },
  57389. ref: 'popper',
  57390. attrs: { role: 'tooltip',
  57391. id: this.tooltipId,
  57392. 'aria-hidden': this.disabled || !this.showPopper ? 'true' : 'false'
  57393. },
  57394. directives: [{
  57395. name: 'show',
  57396. value: !this.disabled && this.showPopper
  57397. }],
  57398. 'class': ['el-tooltip__popper', 'is-' + this.effect, this.popperClass] },
  57399. [this.$slots.content || this.content]
  57400. )]
  57401. );
  57402. }
  57403. var firstElement = this.getFirstElement();
  57404. if (!firstElement) return null;
  57405. var data = firstElement.data = firstElement.data || {};
  57406. data.staticClass = this.addTooltipClass(data.staticClass);
  57407. return firstElement;
  57408. },
  57409. mounted: function mounted() {
  57410. var _this3 = this;
  57411. this.referenceElm = this.$el;
  57412. if (this.$el.nodeType === 1) {
  57413. this.$el.setAttribute('aria-describedby', this.tooltipId);
  57414. this.$el.setAttribute('tabindex', this.tabindex);
  57415. Object(dom_["on"])(this.referenceElm, 'mouseenter', this.show);
  57416. Object(dom_["on"])(this.referenceElm, 'mouseleave', this.hide);
  57417. Object(dom_["on"])(this.referenceElm, 'focus', function () {
  57418. if (!_this3.$slots.default || !_this3.$slots.default.length) {
  57419. _this3.handleFocus();
  57420. return;
  57421. }
  57422. var instance = _this3.$slots.default[0].componentInstance;
  57423. if (instance && instance.focus) {
  57424. instance.focus();
  57425. } else {
  57426. _this3.handleFocus();
  57427. }
  57428. });
  57429. Object(dom_["on"])(this.referenceElm, 'blur', this.handleBlur);
  57430. Object(dom_["on"])(this.referenceElm, 'click', this.removeFocusing);
  57431. }
  57432. // fix issue https://github.com/ElemeFE/element/issues/14424
  57433. if (this.value && this.popperVM) {
  57434. this.popperVM.$nextTick(function () {
  57435. if (_this3.value) {
  57436. _this3.updatePopper();
  57437. }
  57438. });
  57439. }
  57440. },
  57441. watch: {
  57442. focusing: function focusing(val) {
  57443. if (val) {
  57444. Object(dom_["addClass"])(this.referenceElm, 'focusing');
  57445. } else {
  57446. Object(dom_["removeClass"])(this.referenceElm, 'focusing');
  57447. }
  57448. }
  57449. },
  57450. methods: {
  57451. show: function show() {
  57452. this.setExpectedState(true);
  57453. this.handleShowPopper();
  57454. },
  57455. hide: function hide() {
  57456. this.setExpectedState(false);
  57457. this.debounceClose();
  57458. },
  57459. handleFocus: function handleFocus() {
  57460. this.focusing = true;
  57461. this.show();
  57462. },
  57463. handleBlur: function handleBlur() {
  57464. this.focusing = false;
  57465. this.hide();
  57466. },
  57467. removeFocusing: function removeFocusing() {
  57468. this.focusing = false;
  57469. },
  57470. addTooltipClass: function addTooltipClass(prev) {
  57471. if (!prev) {
  57472. return 'el-tooltip';
  57473. } else {
  57474. return 'el-tooltip ' + prev.replace('el-tooltip', '');
  57475. }
  57476. },
  57477. handleShowPopper: function handleShowPopper() {
  57478. var _this4 = this;
  57479. if (!this.expectedState || this.manual) return;
  57480. clearTimeout(this.timeout);
  57481. this.timeout = setTimeout(function () {
  57482. _this4.showPopper = true;
  57483. }, this.openDelay);
  57484. if (this.hideAfter > 0) {
  57485. this.timeoutPending = setTimeout(function () {
  57486. _this4.showPopper = false;
  57487. }, this.hideAfter);
  57488. }
  57489. },
  57490. handleClosePopper: function handleClosePopper() {
  57491. if (this.enterable && this.expectedState || this.manual) return;
  57492. clearTimeout(this.timeout);
  57493. if (this.timeoutPending) {
  57494. clearTimeout(this.timeoutPending);
  57495. }
  57496. this.showPopper = false;
  57497. if (this.disabled) {
  57498. this.doDestroy();
  57499. }
  57500. },
  57501. setExpectedState: function setExpectedState(expectedState) {
  57502. if (expectedState === false) {
  57503. clearTimeout(this.timeoutPending);
  57504. }
  57505. this.expectedState = expectedState;
  57506. },
  57507. getFirstElement: function getFirstElement() {
  57508. var slots = this.$slots.default;
  57509. if (!Array.isArray(slots)) return null;
  57510. var element = null;
  57511. for (var index = 0; index < slots.length; index++) {
  57512. if (slots[index] && slots[index].tag) {
  57513. element = slots[index];
  57514. };
  57515. }
  57516. return element;
  57517. }
  57518. },
  57519. beforeDestroy: function beforeDestroy() {
  57520. this.popperVM && this.popperVM.$destroy();
  57521. },
  57522. destroyed: function destroyed() {
  57523. var reference = this.referenceElm;
  57524. if (reference.nodeType === 1) {
  57525. Object(dom_["off"])(reference, 'mouseenter', this.show);
  57526. Object(dom_["off"])(reference, 'mouseleave', this.hide);
  57527. Object(dom_["off"])(reference, 'focus', this.handleFocus);
  57528. Object(dom_["off"])(reference, 'blur', this.handleBlur);
  57529. Object(dom_["off"])(reference, 'click', this.removeFocusing);
  57530. }
  57531. }
  57532. });
  57533. // CONCATENATED MODULE: ./packages/tooltip/index.js
  57534. /* istanbul ignore next */
  57535. main.install = function (Vue) {
  57536. Vue.component(main.name, main);
  57537. };
  57538. /* harmony default export */ var tooltip = __webpack_exports__["default"] = (main);
  57539. /***/ }),
  57540. /***/ 18:
  57541. /***/ (function(module, exports) {
  57542. module.exports = __webpack_require__(/*! throttle-debounce/debounce */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/debounce.js");
  57543. /***/ }),
  57544. /***/ 2:
  57545. /***/ (function(module, exports) {
  57546. module.exports = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  57547. /***/ }),
  57548. /***/ 3:
  57549. /***/ (function(module, exports) {
  57550. module.exports = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  57551. /***/ }),
  57552. /***/ 5:
  57553. /***/ (function(module, exports) {
  57554. module.exports = __webpack_require__(/*! element-ui/lib/utils/vue-popper */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vue-popper.js");
  57555. /***/ }),
  57556. /***/ 7:
  57557. /***/ (function(module, exports) {
  57558. module.exports = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  57559. /***/ })
  57560. /******/ });
  57561. /***/ }),
  57562. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/transitions/collapse-transition.js":
  57563. /*!*******************************************************************************************!*\
  57564. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/transitions/collapse-transition.js ***!
  57565. \*******************************************************************************************/
  57566. /*! no static exports found */
  57567. /***/ (function(module, exports, __webpack_require__) {
  57568. "use strict";
  57569. exports.__esModule = true;
  57570. var _dom = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  57571. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  57572. var Transition = function () {
  57573. function Transition() {
  57574. _classCallCheck(this, Transition);
  57575. }
  57576. Transition.prototype.beforeEnter = function beforeEnter(el) {
  57577. (0, _dom.addClass)(el, 'collapse-transition');
  57578. if (!el.dataset) el.dataset = {};
  57579. el.dataset.oldPaddingTop = el.style.paddingTop;
  57580. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  57581. el.style.height = '0';
  57582. el.style.paddingTop = 0;
  57583. el.style.paddingBottom = 0;
  57584. };
  57585. Transition.prototype.enter = function enter(el) {
  57586. el.dataset.oldOverflow = el.style.overflow;
  57587. if (el.scrollHeight !== 0) {
  57588. el.style.height = el.scrollHeight + 'px';
  57589. el.style.paddingTop = el.dataset.oldPaddingTop;
  57590. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  57591. } else {
  57592. el.style.height = '';
  57593. el.style.paddingTop = el.dataset.oldPaddingTop;
  57594. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  57595. }
  57596. el.style.overflow = 'hidden';
  57597. };
  57598. Transition.prototype.afterEnter = function afterEnter(el) {
  57599. // for safari: remove class then reset height is necessary
  57600. (0, _dom.removeClass)(el, 'collapse-transition');
  57601. el.style.height = '';
  57602. el.style.overflow = el.dataset.oldOverflow;
  57603. };
  57604. Transition.prototype.beforeLeave = function beforeLeave(el) {
  57605. if (!el.dataset) el.dataset = {};
  57606. el.dataset.oldPaddingTop = el.style.paddingTop;
  57607. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  57608. el.dataset.oldOverflow = el.style.overflow;
  57609. el.style.height = el.scrollHeight + 'px';
  57610. el.style.overflow = 'hidden';
  57611. };
  57612. Transition.prototype.leave = function leave(el) {
  57613. if (el.scrollHeight !== 0) {
  57614. // for safari: add class after set height, or it will jump to zero height suddenly, weired
  57615. (0, _dom.addClass)(el, 'collapse-transition');
  57616. el.style.height = 0;
  57617. el.style.paddingTop = 0;
  57618. el.style.paddingBottom = 0;
  57619. }
  57620. };
  57621. Transition.prototype.afterLeave = function afterLeave(el) {
  57622. (0, _dom.removeClass)(el, 'collapse-transition');
  57623. el.style.height = '';
  57624. el.style.overflow = el.dataset.oldOverflow;
  57625. el.style.paddingTop = el.dataset.oldPaddingTop;
  57626. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  57627. };
  57628. return Transition;
  57629. }();
  57630. exports.default = {
  57631. name: 'ElCollapseTransition',
  57632. functional: true,
  57633. render: function render(h, _ref) {
  57634. var children = _ref.children;
  57635. var data = {
  57636. on: new Transition()
  57637. };
  57638. return h('transition', data, children);
  57639. }
  57640. };
  57641. /***/ }),
  57642. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/after-leave.js":
  57643. /*!*****************************************************************************!*\
  57644. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/after-leave.js ***!
  57645. \*****************************************************************************/
  57646. /*! no static exports found */
  57647. /***/ (function(module, exports, __webpack_require__) {
  57648. "use strict";
  57649. exports.__esModule = true;
  57650. exports.default = function (instance, callback) {
  57651. var speed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
  57652. var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  57653. if (!instance || !callback) throw new Error('instance & callback is required');
  57654. var called = false;
  57655. var afterLeaveCallback = function afterLeaveCallback() {
  57656. if (called) return;
  57657. called = true;
  57658. if (callback) {
  57659. callback.apply(null, arguments);
  57660. }
  57661. };
  57662. if (once) {
  57663. instance.$once('after-leave', afterLeaveCallback);
  57664. } else {
  57665. instance.$on('after-leave', afterLeaveCallback);
  57666. }
  57667. setTimeout(function () {
  57668. afterLeaveCallback();
  57669. }, speed + 100);
  57670. };
  57671. ; /**
  57672. * Bind after-leave event for vue instance. Make sure after-leave is called in any browsers.
  57673. *
  57674. * @param {Vue} instance Vue instance.
  57675. * @param {Function} callback callback of after-leave event
  57676. * @param {Number} speed the speed of transition, default value is 300ms
  57677. * @param {Boolean} once weather bind after-leave once. default value is false.
  57678. */
  57679. /***/ }),
  57680. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-dialog.js":
  57681. /*!*****************************************************************************!*\
  57682. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-dialog.js ***!
  57683. \*****************************************************************************/
  57684. /*! no static exports found */
  57685. /***/ (function(module, exports, __webpack_require__) {
  57686. "use strict";
  57687. exports.__esModule = true;
  57688. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  57689. var _ariaUtils = __webpack_require__(/*! ./aria-utils */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-utils.js");
  57690. var _ariaUtils2 = _interopRequireDefault(_ariaUtils);
  57691. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  57692. /**
  57693. * @constructor
  57694. * @desc Dialog object providing modal focus management.
  57695. *
  57696. * Assumptions: The element serving as the dialog container is present in the
  57697. * DOM and hidden. The dialog container has role='dialog'.
  57698. *
  57699. * @param dialogId
  57700. * The ID of the element serving as the dialog container.
  57701. * @param focusAfterClosed
  57702. * Either the DOM node or the ID of the DOM node to focus when the
  57703. * dialog closes.
  57704. * @param focusFirst
  57705. * Optional parameter containing either the DOM node or the ID of the
  57706. * DOM node to focus when the dialog opens. If not specified, the
  57707. * first focusable element in the dialog will receive focus.
  57708. */
  57709. var aria = aria || {};
  57710. var tabEvent;
  57711. aria.Dialog = function (dialog, focusAfterClosed, focusFirst) {
  57712. var _this = this;
  57713. this.dialogNode = dialog;
  57714. if (this.dialogNode === null || this.dialogNode.getAttribute('role') !== 'dialog') {
  57715. throw new Error('Dialog() requires a DOM element with ARIA role of dialog.');
  57716. }
  57717. if (typeof focusAfterClosed === 'string') {
  57718. this.focusAfterClosed = document.getElementById(focusAfterClosed);
  57719. } else if ((typeof focusAfterClosed === 'undefined' ? 'undefined' : _typeof(focusAfterClosed)) === 'object') {
  57720. this.focusAfterClosed = focusAfterClosed;
  57721. } else {
  57722. this.focusAfterClosed = null;
  57723. }
  57724. if (typeof focusFirst === 'string') {
  57725. this.focusFirst = document.getElementById(focusFirst);
  57726. } else if ((typeof focusFirst === 'undefined' ? 'undefined' : _typeof(focusFirst)) === 'object') {
  57727. this.focusFirst = focusFirst;
  57728. } else {
  57729. this.focusFirst = null;
  57730. }
  57731. if (this.focusFirst) {
  57732. this.focusFirst.focus();
  57733. } else {
  57734. _ariaUtils2.default.focusFirstDescendant(this.dialogNode);
  57735. }
  57736. this.lastFocus = document.activeElement;
  57737. tabEvent = function tabEvent(e) {
  57738. _this.trapFocus(e);
  57739. };
  57740. this.addListeners();
  57741. };
  57742. aria.Dialog.prototype.addListeners = function () {
  57743. document.addEventListener('focus', tabEvent, true);
  57744. };
  57745. aria.Dialog.prototype.removeListeners = function () {
  57746. document.removeEventListener('focus', tabEvent, true);
  57747. };
  57748. aria.Dialog.prototype.closeDialog = function () {
  57749. var _this2 = this;
  57750. this.removeListeners();
  57751. if (this.focusAfterClosed) {
  57752. setTimeout(function () {
  57753. _this2.focusAfterClosed.focus();
  57754. });
  57755. }
  57756. };
  57757. aria.Dialog.prototype.trapFocus = function (event) {
  57758. if (_ariaUtils2.default.IgnoreUtilFocusChanges) {
  57759. return;
  57760. }
  57761. if (this.dialogNode.contains(event.target)) {
  57762. this.lastFocus = event.target;
  57763. } else {
  57764. _ariaUtils2.default.focusFirstDescendant(this.dialogNode);
  57765. if (this.lastFocus === document.activeElement) {
  57766. _ariaUtils2.default.focusLastDescendant(this.dialogNode);
  57767. }
  57768. this.lastFocus = document.activeElement;
  57769. }
  57770. };
  57771. exports.default = aria.Dialog;
  57772. /***/ }),
  57773. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-utils.js":
  57774. /*!****************************************************************************!*\
  57775. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/aria-utils.js ***!
  57776. \****************************************************************************/
  57777. /*! no static exports found */
  57778. /***/ (function(module, exports, __webpack_require__) {
  57779. "use strict";
  57780. exports.__esModule = true;
  57781. var aria = aria || {};
  57782. aria.Utils = aria.Utils || {};
  57783. /**
  57784. * @desc Set focus on descendant nodes until the first focusable element is
  57785. * found.
  57786. * @param element
  57787. * DOM node for which to find the first focusable descendant.
  57788. * @returns
  57789. * true if a focusable element is found and focus is set.
  57790. */
  57791. aria.Utils.focusFirstDescendant = function (element) {
  57792. for (var i = 0; i < element.childNodes.length; i++) {
  57793. var child = element.childNodes[i];
  57794. if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
  57795. return true;
  57796. }
  57797. }
  57798. return false;
  57799. };
  57800. /**
  57801. * @desc Find the last descendant node that is focusable.
  57802. * @param element
  57803. * DOM node for which to find the last focusable descendant.
  57804. * @returns
  57805. * true if a focusable element is found and focus is set.
  57806. */
  57807. aria.Utils.focusLastDescendant = function (element) {
  57808. for (var i = element.childNodes.length - 1; i >= 0; i--) {
  57809. var child = element.childNodes[i];
  57810. if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
  57811. return true;
  57812. }
  57813. }
  57814. return false;
  57815. };
  57816. /**
  57817. * @desc Set Attempt to set focus on the current node.
  57818. * @param element
  57819. * The node to attempt to focus on.
  57820. * @returns
  57821. * true if element is focused.
  57822. */
  57823. aria.Utils.attemptFocus = function (element) {
  57824. if (!aria.Utils.isFocusable(element)) {
  57825. return false;
  57826. }
  57827. aria.Utils.IgnoreUtilFocusChanges = true;
  57828. try {
  57829. element.focus();
  57830. } catch (e) {}
  57831. aria.Utils.IgnoreUtilFocusChanges = false;
  57832. return document.activeElement === element;
  57833. };
  57834. aria.Utils.isFocusable = function (element) {
  57835. if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
  57836. return true;
  57837. }
  57838. if (element.disabled) {
  57839. return false;
  57840. }
  57841. switch (element.nodeName) {
  57842. case 'A':
  57843. return !!element.href && element.rel !== 'ignore';
  57844. case 'INPUT':
  57845. return element.type !== 'hidden' && element.type !== 'file';
  57846. case 'BUTTON':
  57847. case 'SELECT':
  57848. case 'TEXTAREA':
  57849. return true;
  57850. default:
  57851. return false;
  57852. }
  57853. };
  57854. /**
  57855. * 触发一个事件
  57856. * mouseenter, mouseleave, mouseover, keyup, change, click 等
  57857. * @param {Element} elm
  57858. * @param {String} name
  57859. * @param {*} opts
  57860. */
  57861. aria.Utils.triggerEvent = function (elm, name) {
  57862. var eventName = void 0;
  57863. if (/^mouse|click/.test(name)) {
  57864. eventName = 'MouseEvents';
  57865. } else if (/^key/.test(name)) {
  57866. eventName = 'KeyboardEvent';
  57867. } else {
  57868. eventName = 'HTMLEvents';
  57869. }
  57870. var evt = document.createEvent(eventName);
  57871. for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  57872. opts[_key - 2] = arguments[_key];
  57873. }
  57874. evt.initEvent.apply(evt, [name].concat(opts));
  57875. elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
  57876. return elm;
  57877. };
  57878. aria.Utils.keys = {
  57879. tab: 9,
  57880. enter: 13,
  57881. space: 32,
  57882. left: 37,
  57883. up: 38,
  57884. right: 39,
  57885. down: 40,
  57886. esc: 27
  57887. };
  57888. exports.default = aria.Utils;
  57889. /***/ }),
  57890. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/clickoutside.js":
  57891. /*!******************************************************************************!*\
  57892. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/clickoutside.js ***!
  57893. \******************************************************************************/
  57894. /*! no static exports found */
  57895. /***/ (function(module, exports, __webpack_require__) {
  57896. "use strict";
  57897. exports.__esModule = true;
  57898. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  57899. var _vue2 = _interopRequireDefault(_vue);
  57900. var _dom = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  57901. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  57902. var nodeList = [];
  57903. var ctx = '@@clickoutsideContext';
  57904. var startClick = void 0;
  57905. var seed = 0;
  57906. !_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mousedown', function (e) {
  57907. return startClick = e;
  57908. });
  57909. !_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mouseup', function (e) {
  57910. nodeList.forEach(function (node) {
  57911. return node[ctx].documentHandler(e, startClick);
  57912. });
  57913. });
  57914. function createDocumentHandler(el, binding, vnode) {
  57915. return function () {
  57916. var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  57917. var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  57918. if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;
  57919. if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
  57920. vnode.context[el[ctx].methodName]();
  57921. } else {
  57922. el[ctx].bindingFn && el[ctx].bindingFn();
  57923. }
  57924. };
  57925. }
  57926. /**
  57927. * v-clickoutside
  57928. * @desc 点击元素外面才会触发的事件
  57929. * @example
  57930. * ```vue
  57931. * <div v-element-clickoutside="handleClose">
  57932. * ```
  57933. */
  57934. exports.default = {
  57935. bind: function bind(el, binding, vnode) {
  57936. nodeList.push(el);
  57937. var id = seed++;
  57938. el[ctx] = {
  57939. id: id,
  57940. documentHandler: createDocumentHandler(el, binding, vnode),
  57941. methodName: binding.expression,
  57942. bindingFn: binding.value
  57943. };
  57944. },
  57945. update: function update(el, binding, vnode) {
  57946. el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
  57947. el[ctx].methodName = binding.expression;
  57948. el[ctx].bindingFn = binding.value;
  57949. },
  57950. unbind: function unbind(el) {
  57951. var len = nodeList.length;
  57952. for (var i = 0; i < len; i++) {
  57953. if (nodeList[i][ctx].id === el[ctx].id) {
  57954. nodeList.splice(i, 1);
  57955. break;
  57956. }
  57957. }
  57958. delete el[ctx];
  57959. }
  57960. };
  57961. /***/ }),
  57962. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/date-util.js":
  57963. /*!***************************************************************************!*\
  57964. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/date-util.js ***!
  57965. \***************************************************************************/
  57966. /*! no static exports found */
  57967. /***/ (function(module, exports, __webpack_require__) {
  57968. "use strict";
  57969. exports.__esModule = true;
  57970. exports.validateRangeInOneMonth = exports.extractTimeFormat = exports.extractDateFormat = exports.nextYear = exports.prevYear = exports.nextMonth = exports.prevMonth = exports.changeYearMonthAndClampDate = exports.timeWithinRange = exports.limitTimeRange = exports.clearMilliseconds = exports.clearTime = exports.modifyWithTimeString = exports.modifyTime = exports.modifyDate = exports.range = exports.getRangeMinutes = exports.getMonthDays = exports.getPrevMonthLastDays = exports.getRangeHours = exports.getWeekNumber = exports.getStartDateOfMonth = exports.nextDate = exports.prevDate = exports.getFirstDayOfMonth = exports.getDayCountOfYear = exports.getDayCountOfMonth = exports.parseDate = exports.formatDate = exports.isDateObject = exports.isDate = exports.toDate = exports.getI18nSettings = undefined;
  57971. var _date = __webpack_require__(/*! element-ui/lib/utils/date */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/date.js");
  57972. var _date2 = _interopRequireDefault(_date);
  57973. var _locale = __webpack_require__(/*! element-ui/lib/locale */ "./node_modules/_element-ui@2.15.8@element-ui/lib/locale/index.js");
  57974. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  57975. var weeks = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
  57976. var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
  57977. var newArray = function newArray(start, end) {
  57978. var result = [];
  57979. for (var i = start; i <= end; i++) {
  57980. result.push(i);
  57981. }
  57982. return result;
  57983. };
  57984. var getI18nSettings = exports.getI18nSettings = function getI18nSettings() {
  57985. return {
  57986. dayNamesShort: weeks.map(function (week) {
  57987. return (0, _locale.t)('el.datepicker.weeks.' + week);
  57988. }),
  57989. dayNames: weeks.map(function (week) {
  57990. return (0, _locale.t)('el.datepicker.weeks.' + week);
  57991. }),
  57992. monthNamesShort: months.map(function (month) {
  57993. return (0, _locale.t)('el.datepicker.months.' + month);
  57994. }),
  57995. monthNames: months.map(function (month, index) {
  57996. return (0, _locale.t)('el.datepicker.month' + (index + 1));
  57997. }),
  57998. amPm: ['am', 'pm']
  57999. };
  58000. };
  58001. var toDate = exports.toDate = function toDate(date) {
  58002. return isDate(date) ? new Date(date) : null;
  58003. };
  58004. var isDate = exports.isDate = function isDate(date) {
  58005. if (date === null || date === undefined) return false;
  58006. if (isNaN(new Date(date).getTime())) return false;
  58007. if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
  58008. return true;
  58009. };
  58010. var isDateObject = exports.isDateObject = function isDateObject(val) {
  58011. return val instanceof Date;
  58012. };
  58013. var formatDate = exports.formatDate = function formatDate(date, format) {
  58014. date = toDate(date);
  58015. if (!date) return '';
  58016. return _date2.default.format(date, format || 'yyyy-MM-dd', getI18nSettings());
  58017. };
  58018. var parseDate = exports.parseDate = function parseDate(string, format) {
  58019. return _date2.default.parse(string, format || 'yyyy-MM-dd', getI18nSettings());
  58020. };
  58021. var getDayCountOfMonth = exports.getDayCountOfMonth = function getDayCountOfMonth(year, month) {
  58022. if (month === 3 || month === 5 || month === 8 || month === 10) {
  58023. return 30;
  58024. }
  58025. if (month === 1) {
  58026. if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
  58027. return 29;
  58028. } else {
  58029. return 28;
  58030. }
  58031. }
  58032. return 31;
  58033. };
  58034. var getDayCountOfYear = exports.getDayCountOfYear = function getDayCountOfYear(year) {
  58035. var isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
  58036. return isLeapYear ? 366 : 365;
  58037. };
  58038. var getFirstDayOfMonth = exports.getFirstDayOfMonth = function getFirstDayOfMonth(date) {
  58039. var temp = new Date(date.getTime());
  58040. temp.setDate(1);
  58041. return temp.getDay();
  58042. };
  58043. // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
  58044. // {prev, next} Date should work for Daylight Saving Time
  58045. // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
  58046. var prevDate = exports.prevDate = function prevDate(date) {
  58047. var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  58048. return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
  58049. };
  58050. var nextDate = exports.nextDate = function nextDate(date) {
  58051. var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  58052. return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
  58053. };
  58054. var getStartDateOfMonth = exports.getStartDateOfMonth = function getStartDateOfMonth(year, month) {
  58055. var result = new Date(year, month, 1);
  58056. var day = result.getDay();
  58057. if (day === 0) {
  58058. return prevDate(result, 7);
  58059. } else {
  58060. return prevDate(result, day);
  58061. }
  58062. };
  58063. var getWeekNumber = exports.getWeekNumber = function getWeekNumber(src) {
  58064. if (!isDate(src)) return null;
  58065. var date = new Date(src.getTime());
  58066. date.setHours(0, 0, 0, 0);
  58067. // Thursday in current week decides the year.
  58068. date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);
  58069. // January 4 is always in week 1.
  58070. var week1 = new Date(date.getFullYear(), 0, 4);
  58071. // Adjust to Thursday in week 1 and count number of weeks from date to week 1.
  58072. // Rounding should be fine for Daylight Saving Time. Its shift should never be more than 12 hours.
  58073. return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);
  58074. };
  58075. var getRangeHours = exports.getRangeHours = function getRangeHours(ranges) {
  58076. var hours = [];
  58077. var disabledHours = [];
  58078. (ranges || []).forEach(function (range) {
  58079. var value = range.map(function (date) {
  58080. return date.getHours();
  58081. });
  58082. disabledHours = disabledHours.concat(newArray(value[0], value[1]));
  58083. });
  58084. if (disabledHours.length) {
  58085. for (var i = 0; i < 24; i++) {
  58086. hours[i] = disabledHours.indexOf(i) === -1;
  58087. }
  58088. } else {
  58089. for (var _i = 0; _i < 24; _i++) {
  58090. hours[_i] = false;
  58091. }
  58092. }
  58093. return hours;
  58094. };
  58095. var getPrevMonthLastDays = exports.getPrevMonthLastDays = function getPrevMonthLastDays(date, amount) {
  58096. if (amount <= 0) return [];
  58097. var temp = new Date(date.getTime());
  58098. temp.setDate(0);
  58099. var lastDay = temp.getDate();
  58100. return range(amount).map(function (_, index) {
  58101. return lastDay - (amount - index - 1);
  58102. });
  58103. };
  58104. var getMonthDays = exports.getMonthDays = function getMonthDays(date) {
  58105. var temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
  58106. var days = temp.getDate();
  58107. return range(days).map(function (_, index) {
  58108. return index + 1;
  58109. });
  58110. };
  58111. function setRangeData(arr, start, end, value) {
  58112. for (var i = start; i < end; i++) {
  58113. arr[i] = value;
  58114. }
  58115. }
  58116. var getRangeMinutes = exports.getRangeMinutes = function getRangeMinutes(ranges, hour) {
  58117. var minutes = new Array(60);
  58118. if (ranges.length > 0) {
  58119. ranges.forEach(function (range) {
  58120. var start = range[0];
  58121. var end = range[1];
  58122. var startHour = start.getHours();
  58123. var startMinute = start.getMinutes();
  58124. var endHour = end.getHours();
  58125. var endMinute = end.getMinutes();
  58126. if (startHour === hour && endHour !== hour) {
  58127. setRangeData(minutes, startMinute, 60, true);
  58128. } else if (startHour === hour && endHour === hour) {
  58129. setRangeData(minutes, startMinute, endMinute + 1, true);
  58130. } else if (startHour !== hour && endHour === hour) {
  58131. setRangeData(minutes, 0, endMinute + 1, true);
  58132. } else if (startHour < hour && endHour > hour) {
  58133. setRangeData(minutes, 0, 60, true);
  58134. }
  58135. });
  58136. } else {
  58137. setRangeData(minutes, 0, 60, true);
  58138. }
  58139. return minutes;
  58140. };
  58141. var range = exports.range = function range(n) {
  58142. // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
  58143. return Array.apply(null, { length: n }).map(function (_, n) {
  58144. return n;
  58145. });
  58146. };
  58147. var modifyDate = exports.modifyDate = function modifyDate(date, y, m, d) {
  58148. return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
  58149. };
  58150. var modifyTime = exports.modifyTime = function modifyTime(date, h, m, s) {
  58151. return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
  58152. };
  58153. var modifyWithTimeString = exports.modifyWithTimeString = function modifyWithTimeString(date, time) {
  58154. if (date == null || !time) {
  58155. return date;
  58156. }
  58157. time = parseDate(time, 'HH:mm:ss');
  58158. return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
  58159. };
  58160. var clearTime = exports.clearTime = function clearTime(date) {
  58161. return new Date(date.getFullYear(), date.getMonth(), date.getDate());
  58162. };
  58163. var clearMilliseconds = exports.clearMilliseconds = function clearMilliseconds(date) {
  58164. return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
  58165. };
  58166. var limitTimeRange = exports.limitTimeRange = function limitTimeRange(date, ranges) {
  58167. var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'HH:mm:ss';
  58168. // TODO: refactory a more elegant solution
  58169. if (ranges.length === 0) return date;
  58170. var normalizeDate = function normalizeDate(date) {
  58171. return _date2.default.parse(_date2.default.format(date, format), format);
  58172. };
  58173. var ndate = normalizeDate(date);
  58174. var nranges = ranges.map(function (range) {
  58175. return range.map(normalizeDate);
  58176. });
  58177. if (nranges.some(function (nrange) {
  58178. return ndate >= nrange[0] && ndate <= nrange[1];
  58179. })) return date;
  58180. var minDate = nranges[0][0];
  58181. var maxDate = nranges[0][0];
  58182. nranges.forEach(function (nrange) {
  58183. minDate = new Date(Math.min(nrange[0], minDate));
  58184. maxDate = new Date(Math.max(nrange[1], minDate));
  58185. });
  58186. var ret = ndate < minDate ? minDate : maxDate;
  58187. // preserve Year/Month/Date
  58188. return modifyDate(ret, date.getFullYear(), date.getMonth(), date.getDate());
  58189. };
  58190. var timeWithinRange = exports.timeWithinRange = function timeWithinRange(date, selectableRange, format) {
  58191. var limitedDate = limitTimeRange(date, selectableRange, format);
  58192. return limitedDate.getTime() === date.getTime();
  58193. };
  58194. var changeYearMonthAndClampDate = exports.changeYearMonthAndClampDate = function changeYearMonthAndClampDate(date, year, month) {
  58195. // clamp date to the number of days in `year`, `month`
  58196. // eg: (2010-1-31, 2010, 2) => 2010-2-28
  58197. var monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
  58198. return modifyDate(date, year, month, monthDate);
  58199. };
  58200. var prevMonth = exports.prevMonth = function prevMonth(date) {
  58201. var year = date.getFullYear();
  58202. var month = date.getMonth();
  58203. return month === 0 ? changeYearMonthAndClampDate(date, year - 1, 11) : changeYearMonthAndClampDate(date, year, month - 1);
  58204. };
  58205. var nextMonth = exports.nextMonth = function nextMonth(date) {
  58206. var year = date.getFullYear();
  58207. var month = date.getMonth();
  58208. return month === 11 ? changeYearMonthAndClampDate(date, year + 1, 0) : changeYearMonthAndClampDate(date, year, month + 1);
  58209. };
  58210. var prevYear = exports.prevYear = function prevYear(date) {
  58211. var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  58212. var year = date.getFullYear();
  58213. var month = date.getMonth();
  58214. return changeYearMonthAndClampDate(date, year - amount, month);
  58215. };
  58216. var nextYear = exports.nextYear = function nextYear(date) {
  58217. var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  58218. var year = date.getFullYear();
  58219. var month = date.getMonth();
  58220. return changeYearMonthAndClampDate(date, year + amount, month);
  58221. };
  58222. var extractDateFormat = exports.extractDateFormat = function extractDateFormat(format) {
  58223. return format.replace(/\W?m{1,2}|\W?ZZ/g, '').replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '').trim();
  58224. };
  58225. var extractTimeFormat = exports.extractTimeFormat = function extractTimeFormat(format) {
  58226. return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
  58227. };
  58228. var validateRangeInOneMonth = exports.validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
  58229. return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
  58230. };
  58231. /***/ }),
  58232. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/date.js":
  58233. /*!**********************************************************************!*\
  58234. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/date.js ***!
  58235. \**********************************************************************/
  58236. /*! no static exports found */
  58237. /***/ (function(module, exports, __webpack_require__) {
  58238. "use strict";
  58239. var __WEBPACK_AMD_DEFINE_RESULT__;
  58240. /* Modified from https://github.com/taylorhakes/fecha
  58241. *
  58242. * The MIT License (MIT)
  58243. *
  58244. * Copyright (c) 2015 Taylor Hakes
  58245. *
  58246. * Permission is hereby granted, free of charge, to any person obtaining a copy
  58247. * of this software and associated documentation files (the "Software"), to deal
  58248. * in the Software without restriction, including without limitation the rights
  58249. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  58250. * copies of the Software, and to permit persons to whom the Software is
  58251. * furnished to do so, subject to the following conditions:
  58252. *
  58253. * The above copyright notice and this permission notice shall be included in all
  58254. * copies or substantial portions of the Software.
  58255. *
  58256. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  58257. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  58258. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  58259. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  58260. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  58261. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  58262. * SOFTWARE.
  58263. */
  58264. /*eslint-disable*/
  58265. // 把 YYYY-MM-DD 改成了 yyyy-MM-dd
  58266. (function (main) {
  58267. 'use strict';
  58268. /**
  58269. * Parse or format dates
  58270. * @class fecha
  58271. */
  58272. var fecha = {};
  58273. var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
  58274. var twoDigits = '\\d\\d?';
  58275. var threeDigits = '\\d{3}';
  58276. var fourDigits = '\\d{4}';
  58277. var word = '[^\\s]+';
  58278. var literal = /\[([^]*?)\]/gm;
  58279. var noop = function noop() {};
  58280. function regexEscape(str) {
  58281. return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
  58282. }
  58283. function shorten(arr, sLen) {
  58284. var newArr = [];
  58285. for (var i = 0, len = arr.length; i < len; i++) {
  58286. newArr.push(arr[i].substr(0, sLen));
  58287. }
  58288. return newArr;
  58289. }
  58290. function monthUpdate(arrName) {
  58291. return function (d, v, i18n) {
  58292. var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
  58293. if (~index) {
  58294. d.month = index;
  58295. }
  58296. };
  58297. }
  58298. function pad(val, len) {
  58299. val = String(val);
  58300. len = len || 2;
  58301. while (val.length < len) {
  58302. val = '0' + val;
  58303. }
  58304. return val;
  58305. }
  58306. var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
  58307. var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  58308. var monthNamesShort = shorten(monthNames, 3);
  58309. var dayNamesShort = shorten(dayNames, 3);
  58310. fecha.i18n = {
  58311. dayNamesShort: dayNamesShort,
  58312. dayNames: dayNames,
  58313. monthNamesShort: monthNamesShort,
  58314. monthNames: monthNames,
  58315. amPm: ['am', 'pm'],
  58316. DoFn: function DoFn(D) {
  58317. return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
  58318. }
  58319. };
  58320. var formatFlags = {
  58321. D: function D(dateObj) {
  58322. return dateObj.getDay();
  58323. },
  58324. DD: function DD(dateObj) {
  58325. return pad(dateObj.getDay());
  58326. },
  58327. Do: function Do(dateObj, i18n) {
  58328. return i18n.DoFn(dateObj.getDate());
  58329. },
  58330. d: function d(dateObj) {
  58331. return dateObj.getDate();
  58332. },
  58333. dd: function dd(dateObj) {
  58334. return pad(dateObj.getDate());
  58335. },
  58336. ddd: function ddd(dateObj, i18n) {
  58337. return i18n.dayNamesShort[dateObj.getDay()];
  58338. },
  58339. dddd: function dddd(dateObj, i18n) {
  58340. return i18n.dayNames[dateObj.getDay()];
  58341. },
  58342. M: function M(dateObj) {
  58343. return dateObj.getMonth() + 1;
  58344. },
  58345. MM: function MM(dateObj) {
  58346. return pad(dateObj.getMonth() + 1);
  58347. },
  58348. MMM: function MMM(dateObj, i18n) {
  58349. return i18n.monthNamesShort[dateObj.getMonth()];
  58350. },
  58351. MMMM: function MMMM(dateObj, i18n) {
  58352. return i18n.monthNames[dateObj.getMonth()];
  58353. },
  58354. yy: function yy(dateObj) {
  58355. return pad(String(dateObj.getFullYear()), 4).substr(2);
  58356. },
  58357. yyyy: function yyyy(dateObj) {
  58358. return pad(dateObj.getFullYear(), 4);
  58359. },
  58360. h: function h(dateObj) {
  58361. return dateObj.getHours() % 12 || 12;
  58362. },
  58363. hh: function hh(dateObj) {
  58364. return pad(dateObj.getHours() % 12 || 12);
  58365. },
  58366. H: function H(dateObj) {
  58367. return dateObj.getHours();
  58368. },
  58369. HH: function HH(dateObj) {
  58370. return pad(dateObj.getHours());
  58371. },
  58372. m: function m(dateObj) {
  58373. return dateObj.getMinutes();
  58374. },
  58375. mm: function mm(dateObj) {
  58376. return pad(dateObj.getMinutes());
  58377. },
  58378. s: function s(dateObj) {
  58379. return dateObj.getSeconds();
  58380. },
  58381. ss: function ss(dateObj) {
  58382. return pad(dateObj.getSeconds());
  58383. },
  58384. S: function S(dateObj) {
  58385. return Math.round(dateObj.getMilliseconds() / 100);
  58386. },
  58387. SS: function SS(dateObj) {
  58388. return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
  58389. },
  58390. SSS: function SSS(dateObj) {
  58391. return pad(dateObj.getMilliseconds(), 3);
  58392. },
  58393. a: function a(dateObj, i18n) {
  58394. return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
  58395. },
  58396. A: function A(dateObj, i18n) {
  58397. return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();
  58398. },
  58399. ZZ: function ZZ(dateObj) {
  58400. var o = dateObj.getTimezoneOffset();
  58401. return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
  58402. }
  58403. };
  58404. var parseFlags = {
  58405. d: [twoDigits, function (d, v) {
  58406. d.day = v;
  58407. }],
  58408. Do: [twoDigits + word, function (d, v) {
  58409. d.day = parseInt(v, 10);
  58410. }],
  58411. M: [twoDigits, function (d, v) {
  58412. d.month = v - 1;
  58413. }],
  58414. yy: [twoDigits, function (d, v) {
  58415. var da = new Date(),
  58416. cent = +('' + da.getFullYear()).substr(0, 2);
  58417. d.year = '' + (v > 68 ? cent - 1 : cent) + v;
  58418. }],
  58419. h: [twoDigits, function (d, v) {
  58420. d.hour = v;
  58421. }],
  58422. m: [twoDigits, function (d, v) {
  58423. d.minute = v;
  58424. }],
  58425. s: [twoDigits, function (d, v) {
  58426. d.second = v;
  58427. }],
  58428. yyyy: [fourDigits, function (d, v) {
  58429. d.year = v;
  58430. }],
  58431. S: ['\\d', function (d, v) {
  58432. d.millisecond = v * 100;
  58433. }],
  58434. SS: ['\\d{2}', function (d, v) {
  58435. d.millisecond = v * 10;
  58436. }],
  58437. SSS: [threeDigits, function (d, v) {
  58438. d.millisecond = v;
  58439. }],
  58440. D: [twoDigits, noop],
  58441. ddd: [word, noop],
  58442. MMM: [word, monthUpdate('monthNamesShort')],
  58443. MMMM: [word, monthUpdate('monthNames')],
  58444. a: [word, function (d, v, i18n) {
  58445. var val = v.toLowerCase();
  58446. if (val === i18n.amPm[0]) {
  58447. d.isPm = false;
  58448. } else if (val === i18n.amPm[1]) {
  58449. d.isPm = true;
  58450. }
  58451. }],
  58452. ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
  58453. var parts = (v + '').match(/([+-]|\d\d)/gi),
  58454. minutes;
  58455. if (parts) {
  58456. minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
  58457. d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
  58458. }
  58459. }]
  58460. };
  58461. parseFlags.dd = parseFlags.d;
  58462. parseFlags.dddd = parseFlags.ddd;
  58463. parseFlags.DD = parseFlags.D;
  58464. parseFlags.mm = parseFlags.m;
  58465. parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
  58466. parseFlags.MM = parseFlags.M;
  58467. parseFlags.ss = parseFlags.s;
  58468. parseFlags.A = parseFlags.a;
  58469. // Some common format strings
  58470. fecha.masks = {
  58471. default: 'ddd MMM dd yyyy HH:mm:ss',
  58472. shortDate: 'M/D/yy',
  58473. mediumDate: 'MMM d, yyyy',
  58474. longDate: 'MMMM d, yyyy',
  58475. fullDate: 'dddd, MMMM d, yyyy',
  58476. shortTime: 'HH:mm',
  58477. mediumTime: 'HH:mm:ss',
  58478. longTime: 'HH:mm:ss.SSS'
  58479. };
  58480. /***
  58481. * Format a date
  58482. * @method format
  58483. * @param {Date|number} dateObj
  58484. * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
  58485. */
  58486. fecha.format = function (dateObj, mask, i18nSettings) {
  58487. var i18n = i18nSettings || fecha.i18n;
  58488. if (typeof dateObj === 'number') {
  58489. dateObj = new Date(dateObj);
  58490. }
  58491. if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
  58492. throw new Error('Invalid Date in fecha.format');
  58493. }
  58494. mask = fecha.masks[mask] || mask || fecha.masks['default'];
  58495. var literals = [];
  58496. // Make literals inactive by replacing them with ??
  58497. mask = mask.replace(literal, function ($0, $1) {
  58498. literals.push($1);
  58499. return '@@@';
  58500. });
  58501. // Apply formatting rules
  58502. mask = mask.replace(token, function ($0) {
  58503. return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1);
  58504. });
  58505. // Inline literal values back into the formatted value
  58506. return mask.replace(/@@@/g, function () {
  58507. return literals.shift();
  58508. });
  58509. };
  58510. /**
  58511. * Parse a date string into an object, changes - into /
  58512. * @method parse
  58513. * @param {string} dateStr Date string
  58514. * @param {string} format Date parse format
  58515. * @returns {Date|boolean}
  58516. */
  58517. fecha.parse = function (dateStr, format, i18nSettings) {
  58518. var i18n = i18nSettings || fecha.i18n;
  58519. if (typeof format !== 'string') {
  58520. throw new Error('Invalid format in fecha.parse');
  58521. }
  58522. format = fecha.masks[format] || format;
  58523. // Avoid regular expression denial of service, fail early for really long strings
  58524. // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
  58525. if (dateStr.length > 1000) {
  58526. return null;
  58527. }
  58528. var dateInfo = {};
  58529. var parseInfo = [];
  58530. var literals = [];
  58531. format = format.replace(literal, function ($0, $1) {
  58532. literals.push($1);
  58533. return '@@@';
  58534. });
  58535. var newFormat = regexEscape(format).replace(token, function ($0) {
  58536. if (parseFlags[$0]) {
  58537. var info = parseFlags[$0];
  58538. parseInfo.push(info[1]);
  58539. return '(' + info[0] + ')';
  58540. }
  58541. return $0;
  58542. });
  58543. newFormat = newFormat.replace(/@@@/g, function () {
  58544. return literals.shift();
  58545. });
  58546. var matches = dateStr.match(new RegExp(newFormat, 'i'));
  58547. if (!matches) {
  58548. return null;
  58549. }
  58550. for (var i = 1; i < matches.length; i++) {
  58551. parseInfo[i - 1](dateInfo, matches[i], i18n);
  58552. }
  58553. var today = new Date();
  58554. if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
  58555. dateInfo.hour = +dateInfo.hour + 12;
  58556. } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
  58557. dateInfo.hour = 0;
  58558. }
  58559. var date;
  58560. if (dateInfo.timezoneOffset != null) {
  58561. dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
  58562. date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
  58563. } else {
  58564. date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
  58565. }
  58566. return date;
  58567. };
  58568. /* istanbul ignore next */
  58569. if ( true && module.exports) {
  58570. module.exports = fecha;
  58571. } else if (true) {
  58572. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  58573. return fecha;
  58574. }).call(exports, __webpack_require__, exports, module),
  58575. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  58576. } else {}
  58577. })(undefined);
  58578. /***/ }),
  58579. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js":
  58580. /*!*********************************************************************!*\
  58581. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js ***!
  58582. \*********************************************************************/
  58583. /*! no static exports found */
  58584. /***/ (function(module, exports, __webpack_require__) {
  58585. "use strict";
  58586. exports.__esModule = true;
  58587. exports.isInContainer = exports.getScrollContainer = exports.isScroll = exports.getStyle = exports.once = exports.off = exports.on = undefined;
  58588. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* istanbul ignore next */
  58589. exports.hasClass = hasClass;
  58590. exports.addClass = addClass;
  58591. exports.removeClass = removeClass;
  58592. exports.setStyle = setStyle;
  58593. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  58594. var _vue2 = _interopRequireDefault(_vue);
  58595. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  58596. var isServer = _vue2.default.prototype.$isServer;
  58597. var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
  58598. var MOZ_HACK_REGEXP = /^moz([A-Z])/;
  58599. var ieVersion = isServer ? 0 : Number(document.documentMode);
  58600. /* istanbul ignore next */
  58601. var trim = function trim(string) {
  58602. return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
  58603. };
  58604. /* istanbul ignore next */
  58605. var camelCase = function camelCase(name) {
  58606. return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
  58607. return offset ? letter.toUpperCase() : letter;
  58608. }).replace(MOZ_HACK_REGEXP, 'Moz$1');
  58609. };
  58610. /* istanbul ignore next */
  58611. var on = exports.on = function () {
  58612. if (!isServer && document.addEventListener) {
  58613. return function (element, event, handler) {
  58614. if (element && event && handler) {
  58615. element.addEventListener(event, handler, false);
  58616. }
  58617. };
  58618. } else {
  58619. return function (element, event, handler) {
  58620. if (element && event && handler) {
  58621. element.attachEvent('on' + event, handler);
  58622. }
  58623. };
  58624. }
  58625. }();
  58626. /* istanbul ignore next */
  58627. var off = exports.off = function () {
  58628. if (!isServer && document.removeEventListener) {
  58629. return function (element, event, handler) {
  58630. if (element && event) {
  58631. element.removeEventListener(event, handler, false);
  58632. }
  58633. };
  58634. } else {
  58635. return function (element, event, handler) {
  58636. if (element && event) {
  58637. element.detachEvent('on' + event, handler);
  58638. }
  58639. };
  58640. }
  58641. }();
  58642. /* istanbul ignore next */
  58643. var once = exports.once = function once(el, event, fn) {
  58644. var listener = function listener() {
  58645. if (fn) {
  58646. fn.apply(this, arguments);
  58647. }
  58648. off(el, event, listener);
  58649. };
  58650. on(el, event, listener);
  58651. };
  58652. /* istanbul ignore next */
  58653. function hasClass(el, cls) {
  58654. if (!el || !cls) return false;
  58655. if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
  58656. if (el.classList) {
  58657. return el.classList.contains(cls);
  58658. } else {
  58659. return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  58660. }
  58661. };
  58662. /* istanbul ignore next */
  58663. function addClass(el, cls) {
  58664. if (!el) return;
  58665. var curClass = el.className;
  58666. var classes = (cls || '').split(' ');
  58667. for (var i = 0, j = classes.length; i < j; i++) {
  58668. var clsName = classes[i];
  58669. if (!clsName) continue;
  58670. if (el.classList) {
  58671. el.classList.add(clsName);
  58672. } else if (!hasClass(el, clsName)) {
  58673. curClass += ' ' + clsName;
  58674. }
  58675. }
  58676. if (!el.classList) {
  58677. el.setAttribute('class', curClass);
  58678. }
  58679. };
  58680. /* istanbul ignore next */
  58681. function removeClass(el, cls) {
  58682. if (!el || !cls) return;
  58683. var classes = cls.split(' ');
  58684. var curClass = ' ' + el.className + ' ';
  58685. for (var i = 0, j = classes.length; i < j; i++) {
  58686. var clsName = classes[i];
  58687. if (!clsName) continue;
  58688. if (el.classList) {
  58689. el.classList.remove(clsName);
  58690. } else if (hasClass(el, clsName)) {
  58691. curClass = curClass.replace(' ' + clsName + ' ', ' ');
  58692. }
  58693. }
  58694. if (!el.classList) {
  58695. el.setAttribute('class', trim(curClass));
  58696. }
  58697. };
  58698. /* istanbul ignore next */
  58699. var getStyle = exports.getStyle = ieVersion < 9 ? function (element, styleName) {
  58700. if (isServer) return;
  58701. if (!element || !styleName) return null;
  58702. styleName = camelCase(styleName);
  58703. if (styleName === 'float') {
  58704. styleName = 'styleFloat';
  58705. }
  58706. try {
  58707. switch (styleName) {
  58708. case 'opacity':
  58709. try {
  58710. return element.filters.item('alpha').opacity / 100;
  58711. } catch (e) {
  58712. return 1.0;
  58713. }
  58714. default:
  58715. return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
  58716. }
  58717. } catch (e) {
  58718. return element.style[styleName];
  58719. }
  58720. } : function (element, styleName) {
  58721. if (isServer) return;
  58722. if (!element || !styleName) return null;
  58723. styleName = camelCase(styleName);
  58724. if (styleName === 'float') {
  58725. styleName = 'cssFloat';
  58726. }
  58727. try {
  58728. var computed = document.defaultView.getComputedStyle(element, '');
  58729. return element.style[styleName] || computed ? computed[styleName] : null;
  58730. } catch (e) {
  58731. return element.style[styleName];
  58732. }
  58733. };
  58734. /* istanbul ignore next */
  58735. function setStyle(element, styleName, value) {
  58736. if (!element || !styleName) return;
  58737. if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
  58738. for (var prop in styleName) {
  58739. if (styleName.hasOwnProperty(prop)) {
  58740. setStyle(element, prop, styleName[prop]);
  58741. }
  58742. }
  58743. } else {
  58744. styleName = camelCase(styleName);
  58745. if (styleName === 'opacity' && ieVersion < 9) {
  58746. element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
  58747. } else {
  58748. element.style[styleName] = value;
  58749. }
  58750. }
  58751. };
  58752. var isScroll = exports.isScroll = function isScroll(el, vertical) {
  58753. if (isServer) return;
  58754. var determinedDirection = vertical !== null && vertical !== undefined;
  58755. var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
  58756. return overflow.match(/(scroll|auto|overlay)/);
  58757. };
  58758. var getScrollContainer = exports.getScrollContainer = function getScrollContainer(el, vertical) {
  58759. if (isServer) return;
  58760. var parent = el;
  58761. while (parent) {
  58762. if ([window, document, document.documentElement].includes(parent)) {
  58763. return window;
  58764. }
  58765. if (isScroll(parent, vertical)) {
  58766. return parent;
  58767. }
  58768. parent = parent.parentNode;
  58769. }
  58770. return parent;
  58771. };
  58772. var isInContainer = exports.isInContainer = function isInContainer(el, container) {
  58773. if (isServer || !el || !container) return false;
  58774. var elRect = el.getBoundingClientRect();
  58775. var containerRect = void 0;
  58776. if ([window, document, document.documentElement, null, undefined].includes(container)) {
  58777. containerRect = {
  58778. top: 0,
  58779. right: window.innerWidth,
  58780. bottom: window.innerHeight,
  58781. left: 0
  58782. };
  58783. } else {
  58784. containerRect = container.getBoundingClientRect();
  58785. }
  58786. return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
  58787. };
  58788. /***/ }),
  58789. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/merge.js":
  58790. /*!***********************************************************************!*\
  58791. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/merge.js ***!
  58792. \***********************************************************************/
  58793. /*! no static exports found */
  58794. /***/ (function(module, exports, __webpack_require__) {
  58795. "use strict";
  58796. exports.__esModule = true;
  58797. exports.default = function (target) {
  58798. for (var i = 1, j = arguments.length; i < j; i++) {
  58799. var source = arguments[i] || {};
  58800. for (var prop in source) {
  58801. if (source.hasOwnProperty(prop)) {
  58802. var value = source[prop];
  58803. if (value !== undefined) {
  58804. target[prop] = value;
  58805. }
  58806. }
  58807. }
  58808. }
  58809. return target;
  58810. };
  58811. ;
  58812. /***/ }),
  58813. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popper.js":
  58814. /*!************************************************************************!*\
  58815. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popper.js ***!
  58816. \************************************************************************/
  58817. /*! no static exports found */
  58818. /***/ (function(module, exports, __webpack_require__) {
  58819. "use strict";
  58820. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
  58821. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  58822. /**
  58823. * @fileOverview Kickass library to create and place poppers near their reference elements.
  58824. * @version {{version}}
  58825. * @license
  58826. * Copyright (c) 2016 Federico Zivolo and contributors
  58827. *
  58828. * Permission is hereby granted, free of charge, to any person obtaining a copy
  58829. * of this software and associated documentation files (the "Software"), to deal
  58830. * in the Software without restriction, including without limitation the rights
  58831. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  58832. * copies of the Software, and to permit persons to whom the Software is
  58833. * furnished to do so, subject to the following conditions:
  58834. *
  58835. * The above copyright notice and this permission notice shall be included in all
  58836. * copies or substantial portions of the Software.
  58837. *
  58838. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  58839. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  58840. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  58841. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  58842. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  58843. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  58844. * SOFTWARE.
  58845. */
  58846. //
  58847. // Cross module loader
  58848. // Supported: Node, AMD, Browser globals
  58849. //
  58850. ;(function (root, factory) {
  58851. if (true) {
  58852. // AMD. Register as an anonymous module.
  58853. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  58854. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  58855. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  58856. __WEBPACK_AMD_DEFINE_FACTORY__),
  58857. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  58858. } else {}
  58859. })(undefined, function () {
  58860. 'use strict';
  58861. var root = window;
  58862. // default options
  58863. var DEFAULTS = {
  58864. // placement of the popper
  58865. placement: 'bottom',
  58866. gpuAcceleration: true,
  58867. // shift popper from its origin by the given amount of pixels (can be negative)
  58868. offset: 0,
  58869. // the element which will act as boundary of the popper
  58870. boundariesElement: 'viewport',
  58871. // amount of pixel used to define a minimum distance between the boundaries and the popper
  58872. boundariesPadding: 5,
  58873. // popper will try to prevent overflow following this order,
  58874. // by default, then, it could overflow on the left and on top of the boundariesElement
  58875. preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
  58876. // the behavior used by flip to change the placement of the popper
  58877. flipBehavior: 'flip',
  58878. arrowElement: '[x-arrow]',
  58879. arrowOffset: 0,
  58880. // list of functions used to modify the offsets before they are applied to the popper
  58881. modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
  58882. modifiersIgnored: [],
  58883. forceAbsolute: false
  58884. };
  58885. /**
  58886. * Create a new Popper.js instance
  58887. * @constructor Popper
  58888. * @param {HTMLElement} reference - The reference element used to position the popper
  58889. * @param {HTMLElement|Object} popper
  58890. * The HTML element used as popper, or a configuration used to generate the popper.
  58891. * @param {String} [popper.tagName='div'] The tag name of the generated popper.
  58892. * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
  58893. * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
  58894. * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
  58895. * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
  58896. * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
  58897. * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
  58898. * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
  58899. * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
  58900. * @param {Object} options
  58901. * @param {String} [options.placement=bottom]
  58902. * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
  58903. * left(-start, -end)`
  58904. *
  58905. * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
  58906. * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
  58907. * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
  58908. * reference element.
  58909. * By default, it will look for a child node of the popper with the `x-arrow` attribute.
  58910. *
  58911. * @param {Boolean} [options.gpuAcceleration=true]
  58912. * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
  58913. * browser to use the GPU to accelerate the rendering.
  58914. * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
  58915. *
  58916. * @param {Number} [options.offset=0]
  58917. * Amount of pixels the popper will be shifted (can be negative).
  58918. *
  58919. * @param {String|Element} [options.boundariesElement='viewport']
  58920. * The element which will define the boundaries of the popper position, the popper will never be placed outside
  58921. * of the defined boundaries (except if `keepTogether` is enabled)
  58922. *
  58923. * @param {Number} [options.boundariesPadding=5]
  58924. * Additional padding for the boundaries
  58925. *
  58926. * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
  58927. * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
  58928. * this means that the last ones will never overflow
  58929. *
  58930. * @param {String|Array} [options.flipBehavior='flip']
  58931. * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
  58932. * overlap its reference element. Defining `flip` as value, the placement will be flipped on
  58933. * its axis (`right - left`, `top - bottom`).
  58934. * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
  58935. * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
  58936. * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
  58937. *
  58938. * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
  58939. * List of functions used to modify the data before they are applied to the popper, add your custom functions
  58940. * to this array to edit the offsets and placement.
  58941. * The function should reflect the @params and @returns of preventOverflow
  58942. *
  58943. * @param {Array} [options.modifiersIgnored=[]]
  58944. * Put here any built-in modifier name you want to exclude from the modifiers list
  58945. * The function should reflect the @params and @returns of preventOverflow
  58946. *
  58947. * @param {Boolean} [options.removeOnDestroy=false]
  58948. * Set to true if you want to automatically remove the popper when you call the `destroy` method.
  58949. */
  58950. function Popper(reference, popper, options) {
  58951. this._reference = reference.jquery ? reference[0] : reference;
  58952. this.state = {};
  58953. // if the popper variable is a configuration object, parse it to generate an HTMLElement
  58954. // generate a default popper if is not defined
  58955. var isNotDefined = typeof popper === 'undefined' || popper === null;
  58956. var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
  58957. if (isNotDefined || isConfig) {
  58958. this._popper = this.parse(isConfig ? popper : {});
  58959. }
  58960. // otherwise, use the given HTMLElement as popper
  58961. else {
  58962. this._popper = popper.jquery ? popper[0] : popper;
  58963. }
  58964. // with {} we create a new object with the options inside it
  58965. this._options = Object.assign({}, DEFAULTS, options);
  58966. // refactoring modifiers' list
  58967. this._options.modifiers = this._options.modifiers.map(function (modifier) {
  58968. // remove ignored modifiers
  58969. if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
  58970. // set the x-placement attribute before everything else because it could be used to add margins to the popper
  58971. // margins needs to be calculated to get the correct popper offsets
  58972. if (modifier === 'applyStyle') {
  58973. this._popper.setAttribute('x-placement', this._options.placement);
  58974. }
  58975. // return predefined modifier identified by string or keep the custom one
  58976. return this.modifiers[modifier] || modifier;
  58977. }.bind(this));
  58978. // make sure to apply the popper position before any computation
  58979. this.state.position = this._getPosition(this._popper, this._reference);
  58980. setStyle(this._popper, { position: this.state.position, top: 0 });
  58981. // fire the first update to position the popper in the right place
  58982. this.update();
  58983. // setup event listeners, they will take care of update the position in specific situations
  58984. this._setupEventListeners();
  58985. return this;
  58986. }
  58987. //
  58988. // Methods
  58989. //
  58990. /**
  58991. * Destroy the popper
  58992. * @method
  58993. * @memberof Popper
  58994. */
  58995. Popper.prototype.destroy = function () {
  58996. this._popper.removeAttribute('x-placement');
  58997. this._popper.style.left = '';
  58998. this._popper.style.position = '';
  58999. this._popper.style.top = '';
  59000. this._popper.style[getSupportedPropertyName('transform')] = '';
  59001. this._removeEventListeners();
  59002. // remove the popper if user explicity asked for the deletion on destroy
  59003. if (this._options.removeOnDestroy) {
  59004. this._popper.remove();
  59005. }
  59006. return this;
  59007. };
  59008. /**
  59009. * Updates the position of the popper, computing the new offsets and applying the new style
  59010. * @method
  59011. * @memberof Popper
  59012. */
  59013. Popper.prototype.update = function () {
  59014. var data = { instance: this, styles: {} };
  59015. // store placement inside the data object, modifiers will be able to edit `placement` if needed
  59016. // and refer to _originalPlacement to know the original value
  59017. data.placement = this._options.placement;
  59018. data._originalPlacement = this._options.placement;
  59019. // compute the popper and reference offsets and put them inside data.offsets
  59020. data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
  59021. // get boundaries
  59022. data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
  59023. data = this.runModifiers(data, this._options.modifiers);
  59024. if (typeof this.state.updateCallback === 'function') {
  59025. this.state.updateCallback(data);
  59026. }
  59027. };
  59028. /**
  59029. * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
  59030. * @method
  59031. * @memberof Popper
  59032. * @param {Function} callback
  59033. */
  59034. Popper.prototype.onCreate = function (callback) {
  59035. // the createCallbacks return as first argument the popper instance
  59036. callback(this);
  59037. return this;
  59038. };
  59039. /**
  59040. * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
  59041. * used to style popper and its arrow.
  59042. * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
  59043. * @method
  59044. * @memberof Popper
  59045. * @param {Function} callback
  59046. */
  59047. Popper.prototype.onUpdate = function (callback) {
  59048. this.state.updateCallback = callback;
  59049. return this;
  59050. };
  59051. /**
  59052. * Helper used to generate poppers from a configuration file
  59053. * @method
  59054. * @memberof Popper
  59055. * @param config {Object} configuration
  59056. * @returns {HTMLElement} popper
  59057. */
  59058. Popper.prototype.parse = function (config) {
  59059. var defaultConfig = {
  59060. tagName: 'div',
  59061. classNames: ['popper'],
  59062. attributes: [],
  59063. parent: root.document.body,
  59064. content: '',
  59065. contentType: 'text',
  59066. arrowTagName: 'div',
  59067. arrowClassNames: ['popper__arrow'],
  59068. arrowAttributes: ['x-arrow']
  59069. };
  59070. config = Object.assign({}, defaultConfig, config);
  59071. var d = root.document;
  59072. var popper = d.createElement(config.tagName);
  59073. addClassNames(popper, config.classNames);
  59074. addAttributes(popper, config.attributes);
  59075. if (config.contentType === 'node') {
  59076. popper.appendChild(config.content.jquery ? config.content[0] : config.content);
  59077. } else if (config.contentType === 'html') {
  59078. popper.innerHTML = config.content;
  59079. } else {
  59080. popper.textContent = config.content;
  59081. }
  59082. if (config.arrowTagName) {
  59083. var arrow = d.createElement(config.arrowTagName);
  59084. addClassNames(arrow, config.arrowClassNames);
  59085. addAttributes(arrow, config.arrowAttributes);
  59086. popper.appendChild(arrow);
  59087. }
  59088. var parent = config.parent.jquery ? config.parent[0] : config.parent;
  59089. // if the given parent is a string, use it to match an element
  59090. // if more than one element is matched, the first one will be used as parent
  59091. // if no elements are matched, the script will throw an error
  59092. if (typeof parent === 'string') {
  59093. parent = d.querySelectorAll(config.parent);
  59094. if (parent.length > 1) {
  59095. console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
  59096. }
  59097. if (parent.length === 0) {
  59098. throw 'ERROR: the given `parent` doesn\'t exists!';
  59099. }
  59100. parent = parent[0];
  59101. }
  59102. // if the given parent is a DOM nodes list or an array of nodes with more than one element,
  59103. // the first one will be used as parent
  59104. if (parent.length > 1 && parent instanceof Element === false) {
  59105. console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
  59106. parent = parent[0];
  59107. }
  59108. // append the generated popper to its parent
  59109. parent.appendChild(popper);
  59110. return popper;
  59111. /**
  59112. * Adds class names to the given element
  59113. * @function
  59114. * @ignore
  59115. * @param {HTMLElement} target
  59116. * @param {Array} classes
  59117. */
  59118. function addClassNames(element, classNames) {
  59119. classNames.forEach(function (className) {
  59120. element.classList.add(className);
  59121. });
  59122. }
  59123. /**
  59124. * Adds attributes to the given element
  59125. * @function
  59126. * @ignore
  59127. * @param {HTMLElement} target
  59128. * @param {Array} attributes
  59129. * @example
  59130. * addAttributes(element, [ 'data-info:foobar' ]);
  59131. */
  59132. function addAttributes(element, attributes) {
  59133. attributes.forEach(function (attribute) {
  59134. element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
  59135. });
  59136. }
  59137. };
  59138. /**
  59139. * Helper used to get the position which will be applied to the popper
  59140. * @method
  59141. * @memberof Popper
  59142. * @param config {HTMLElement} popper element
  59143. * @param reference {HTMLElement} reference element
  59144. * @returns {String} position
  59145. */
  59146. Popper.prototype._getPosition = function (popper, reference) {
  59147. var container = getOffsetParent(reference);
  59148. if (this._options.forceAbsolute) {
  59149. return 'absolute';
  59150. }
  59151. // Decide if the popper will be fixed
  59152. // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
  59153. var isParentFixed = isFixed(reference, container);
  59154. return isParentFixed ? 'fixed' : 'absolute';
  59155. };
  59156. /**
  59157. * Get offsets to the popper
  59158. * @method
  59159. * @memberof Popper
  59160. * @access private
  59161. * @param {Element} popper - the popper element
  59162. * @param {Element} reference - the reference element (the popper will be relative to this)
  59163. * @returns {Object} An object containing the offsets which will be applied to the popper
  59164. */
  59165. Popper.prototype._getOffsets = function (popper, reference, placement) {
  59166. placement = placement.split('-')[0];
  59167. var popperOffsets = {};
  59168. popperOffsets.position = this.state.position;
  59169. var isParentFixed = popperOffsets.position === 'fixed';
  59170. //
  59171. // Get reference element position
  59172. //
  59173. var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
  59174. //
  59175. // Get popper sizes
  59176. //
  59177. var popperRect = getOuterSizes(popper);
  59178. //
  59179. // Compute offsets of popper
  59180. //
  59181. // depending by the popper placement we have to compute its offsets slightly differently
  59182. if (['right', 'left'].indexOf(placement) !== -1) {
  59183. popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
  59184. if (placement === 'left') {
  59185. popperOffsets.left = referenceOffsets.left - popperRect.width;
  59186. } else {
  59187. popperOffsets.left = referenceOffsets.right;
  59188. }
  59189. } else {
  59190. popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
  59191. if (placement === 'top') {
  59192. popperOffsets.top = referenceOffsets.top - popperRect.height;
  59193. } else {
  59194. popperOffsets.top = referenceOffsets.bottom;
  59195. }
  59196. }
  59197. // Add width and height to our offsets object
  59198. popperOffsets.width = popperRect.width;
  59199. popperOffsets.height = popperRect.height;
  59200. return {
  59201. popper: popperOffsets,
  59202. reference: referenceOffsets
  59203. };
  59204. };
  59205. /**
  59206. * Setup needed event listeners used to update the popper position
  59207. * @method
  59208. * @memberof Popper
  59209. * @access private
  59210. */
  59211. Popper.prototype._setupEventListeners = function () {
  59212. // NOTE: 1 DOM access here
  59213. this.state.updateBound = this.update.bind(this);
  59214. root.addEventListener('resize', this.state.updateBound);
  59215. // if the boundariesElement is window we don't need to listen for the scroll event
  59216. if (this._options.boundariesElement !== 'window') {
  59217. var target = getScrollParent(this._reference);
  59218. // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
  59219. if (target === root.document.body || target === root.document.documentElement) {
  59220. target = root;
  59221. }
  59222. target.addEventListener('scroll', this.state.updateBound);
  59223. this.state.scrollTarget = target;
  59224. }
  59225. };
  59226. /**
  59227. * Remove event listeners used to update the popper position
  59228. * @method
  59229. * @memberof Popper
  59230. * @access private
  59231. */
  59232. Popper.prototype._removeEventListeners = function () {
  59233. // NOTE: 1 DOM access here
  59234. root.removeEventListener('resize', this.state.updateBound);
  59235. if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
  59236. this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
  59237. this.state.scrollTarget = null;
  59238. }
  59239. this.state.updateBound = null;
  59240. };
  59241. /**
  59242. * Computed the boundaries limits and return them
  59243. * @method
  59244. * @memberof Popper
  59245. * @access private
  59246. * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
  59247. * @param {Number} padding - Boundaries padding
  59248. * @param {Element} boundariesElement - Element used to define the boundaries
  59249. * @returns {Object} Coordinates of the boundaries
  59250. */
  59251. Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
  59252. // NOTE: 1 DOM access here
  59253. var boundaries = {};
  59254. var width, height;
  59255. if (boundariesElement === 'window') {
  59256. var body = root.document.body,
  59257. html = root.document.documentElement;
  59258. height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
  59259. width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
  59260. boundaries = {
  59261. top: 0,
  59262. right: width,
  59263. bottom: height,
  59264. left: 0
  59265. };
  59266. } else if (boundariesElement === 'viewport') {
  59267. var offsetParent = getOffsetParent(this._popper);
  59268. var scrollParent = getScrollParent(this._popper);
  59269. var offsetParentRect = getOffsetRect(offsetParent);
  59270. // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
  59271. var getScrollTopValue = function getScrollTopValue(element) {
  59272. return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
  59273. };
  59274. var getScrollLeftValue = function getScrollLeftValue(element) {
  59275. return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
  59276. };
  59277. // if the popper is fixed we don't have to substract scrolling from the boundaries
  59278. var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
  59279. var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
  59280. boundaries = {
  59281. top: 0 - (offsetParentRect.top - scrollTop),
  59282. right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
  59283. bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
  59284. left: 0 - (offsetParentRect.left - scrollLeft)
  59285. };
  59286. } else {
  59287. if (getOffsetParent(this._popper) === boundariesElement) {
  59288. boundaries = {
  59289. top: 0,
  59290. left: 0,
  59291. right: boundariesElement.clientWidth,
  59292. bottom: boundariesElement.clientHeight
  59293. };
  59294. } else {
  59295. boundaries = getOffsetRect(boundariesElement);
  59296. }
  59297. }
  59298. boundaries.left += padding;
  59299. boundaries.right -= padding;
  59300. boundaries.top = boundaries.top + padding;
  59301. boundaries.bottom = boundaries.bottom - padding;
  59302. return boundaries;
  59303. };
  59304. /**
  59305. * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
  59306. * @method
  59307. * @memberof Popper
  59308. * @access public
  59309. * @param {Object} data
  59310. * @param {Array} modifiers
  59311. * @param {Function} ends
  59312. */
  59313. Popper.prototype.runModifiers = function (data, modifiers, ends) {
  59314. var modifiersToRun = modifiers.slice();
  59315. if (ends !== undefined) {
  59316. modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
  59317. }
  59318. modifiersToRun.forEach(function (modifier) {
  59319. if (isFunction(modifier)) {
  59320. data = modifier.call(this, data);
  59321. }
  59322. }.bind(this));
  59323. return data;
  59324. };
  59325. /**
  59326. * Helper used to know if the given modifier depends from another one.
  59327. * @method
  59328. * @memberof Popper
  59329. * @param {String} requesting - name of requesting modifier
  59330. * @param {String} requested - name of requested modifier
  59331. * @returns {Boolean}
  59332. */
  59333. Popper.prototype.isModifierRequired = function (requesting, requested) {
  59334. var index = getArrayKeyIndex(this._options.modifiers, requesting);
  59335. return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
  59336. return modifier === requested;
  59337. }).length;
  59338. };
  59339. //
  59340. // Modifiers
  59341. //
  59342. /**
  59343. * Modifiers list
  59344. * @namespace Popper.modifiers
  59345. * @memberof Popper
  59346. * @type {Object}
  59347. */
  59348. Popper.prototype.modifiers = {};
  59349. /**
  59350. * Apply the computed styles to the popper element
  59351. * @method
  59352. * @memberof Popper.modifiers
  59353. * @argument {Object} data - The data object generated by `update` method
  59354. * @returns {Object} The same data object
  59355. */
  59356. Popper.prototype.modifiers.applyStyle = function (data) {
  59357. // apply the final offsets to the popper
  59358. // NOTE: 1 DOM access here
  59359. var styles = {
  59360. position: data.offsets.popper.position
  59361. };
  59362. // round top and left to avoid blurry text
  59363. var left = Math.round(data.offsets.popper.left);
  59364. var top = Math.round(data.offsets.popper.top);
  59365. // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
  59366. // we automatically use the supported prefixed version if needed
  59367. var prefixedProperty;
  59368. if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
  59369. styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
  59370. styles.top = 0;
  59371. styles.left = 0;
  59372. }
  59373. // othwerise, we use the standard `left` and `top` properties
  59374. else {
  59375. styles.left = left;
  59376. styles.top = top;
  59377. }
  59378. // any property present in `data.styles` will be applied to the popper,
  59379. // in this way we can make the 3rd party modifiers add custom styles to it
  59380. // Be aware, modifiers could override the properties defined in the previous
  59381. // lines of this modifier!
  59382. Object.assign(styles, data.styles);
  59383. setStyle(this._popper, styles);
  59384. // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
  59385. // NOTE: 1 DOM access here
  59386. this._popper.setAttribute('x-placement', data.placement);
  59387. // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
  59388. if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
  59389. setStyle(data.arrowElement, data.offsets.arrow);
  59390. }
  59391. return data;
  59392. };
  59393. /**
  59394. * Modifier used to shift the popper on the start or end of its reference element side
  59395. * @method
  59396. * @memberof Popper.modifiers
  59397. * @argument {Object} data - The data object generated by `update` method
  59398. * @returns {Object} The data object, properly modified
  59399. */
  59400. Popper.prototype.modifiers.shift = function (data) {
  59401. var placement = data.placement;
  59402. var basePlacement = placement.split('-')[0];
  59403. var shiftVariation = placement.split('-')[1];
  59404. // if shift shiftVariation is specified, run the modifier
  59405. if (shiftVariation) {
  59406. var reference = data.offsets.reference;
  59407. var popper = getPopperClientRect(data.offsets.popper);
  59408. var shiftOffsets = {
  59409. y: {
  59410. start: { top: reference.top },
  59411. end: { top: reference.top + reference.height - popper.height }
  59412. },
  59413. x: {
  59414. start: { left: reference.left },
  59415. end: { left: reference.left + reference.width - popper.width }
  59416. }
  59417. };
  59418. var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
  59419. data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
  59420. }
  59421. return data;
  59422. };
  59423. /**
  59424. * Modifier used to make sure the popper does not overflows from it's boundaries
  59425. * @method
  59426. * @memberof Popper.modifiers
  59427. * @argument {Object} data - The data object generated by `update` method
  59428. * @returns {Object} The data object, properly modified
  59429. */
  59430. Popper.prototype.modifiers.preventOverflow = function (data) {
  59431. var order = this._options.preventOverflowOrder;
  59432. var popper = getPopperClientRect(data.offsets.popper);
  59433. var check = {
  59434. left: function left() {
  59435. var left = popper.left;
  59436. if (popper.left < data.boundaries.left) {
  59437. left = Math.max(popper.left, data.boundaries.left);
  59438. }
  59439. return { left: left };
  59440. },
  59441. right: function right() {
  59442. var left = popper.left;
  59443. if (popper.right > data.boundaries.right) {
  59444. left = Math.min(popper.left, data.boundaries.right - popper.width);
  59445. }
  59446. return { left: left };
  59447. },
  59448. top: function top() {
  59449. var top = popper.top;
  59450. if (popper.top < data.boundaries.top) {
  59451. top = Math.max(popper.top, data.boundaries.top);
  59452. }
  59453. return { top: top };
  59454. },
  59455. bottom: function bottom() {
  59456. var top = popper.top;
  59457. if (popper.bottom > data.boundaries.bottom) {
  59458. top = Math.min(popper.top, data.boundaries.bottom - popper.height);
  59459. }
  59460. return { top: top };
  59461. }
  59462. };
  59463. order.forEach(function (direction) {
  59464. data.offsets.popper = Object.assign(popper, check[direction]());
  59465. });
  59466. return data;
  59467. };
  59468. /**
  59469. * Modifier used to make sure the popper is always near its reference
  59470. * @method
  59471. * @memberof Popper.modifiers
  59472. * @argument {Object} data - The data object generated by _update method
  59473. * @returns {Object} The data object, properly modified
  59474. */
  59475. Popper.prototype.modifiers.keepTogether = function (data) {
  59476. var popper = getPopperClientRect(data.offsets.popper);
  59477. var reference = data.offsets.reference;
  59478. var f = Math.floor;
  59479. if (popper.right < f(reference.left)) {
  59480. data.offsets.popper.left = f(reference.left) - popper.width;
  59481. }
  59482. if (popper.left > f(reference.right)) {
  59483. data.offsets.popper.left = f(reference.right);
  59484. }
  59485. if (popper.bottom < f(reference.top)) {
  59486. data.offsets.popper.top = f(reference.top) - popper.height;
  59487. }
  59488. if (popper.top > f(reference.bottom)) {
  59489. data.offsets.popper.top = f(reference.bottom);
  59490. }
  59491. return data;
  59492. };
  59493. /**
  59494. * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
  59495. * Requires the `preventOverflow` modifier before it in order to work.
  59496. * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
  59497. * @method
  59498. * @memberof Popper.modifiers
  59499. * @argument {Object} data - The data object generated by _update method
  59500. * @returns {Object} The data object, properly modified
  59501. */
  59502. Popper.prototype.modifiers.flip = function (data) {
  59503. // check if preventOverflow is in the list of modifiers before the flip modifier.
  59504. // otherwise flip would not work as expected.
  59505. if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
  59506. console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
  59507. return data;
  59508. }
  59509. if (data.flipped && data.placement === data._originalPlacement) {
  59510. // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
  59511. return data;
  59512. }
  59513. var placement = data.placement.split('-')[0];
  59514. var placementOpposite = getOppositePlacement(placement);
  59515. var variation = data.placement.split('-')[1] || '';
  59516. var flipOrder = [];
  59517. if (this._options.flipBehavior === 'flip') {
  59518. flipOrder = [placement, placementOpposite];
  59519. } else {
  59520. flipOrder = this._options.flipBehavior;
  59521. }
  59522. flipOrder.forEach(function (step, index) {
  59523. if (placement !== step || flipOrder.length === index + 1) {
  59524. return;
  59525. }
  59526. placement = data.placement.split('-')[0];
  59527. placementOpposite = getOppositePlacement(placement);
  59528. var popperOffsets = getPopperClientRect(data.offsets.popper);
  59529. // this boolean is used to distinguish right and bottom from top and left
  59530. // they need different computations to get flipped
  59531. var a = ['right', 'bottom'].indexOf(placement) !== -1;
  59532. // using Math.floor because the reference offsets may contain decimals we are not going to consider here
  59533. if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
  59534. // we'll use this boolean to detect any flip loop
  59535. data.flipped = true;
  59536. data.placement = flipOrder[index + 1];
  59537. if (variation) {
  59538. data.placement += '-' + variation;
  59539. }
  59540. data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
  59541. data = this.runModifiers(data, this._options.modifiers, this._flip);
  59542. }
  59543. }.bind(this));
  59544. return data;
  59545. };
  59546. /**
  59547. * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
  59548. * The offsets will shift the popper on the side of its reference element.
  59549. * @method
  59550. * @memberof Popper.modifiers
  59551. * @argument {Object} data - The data object generated by _update method
  59552. * @returns {Object} The data object, properly modified
  59553. */
  59554. Popper.prototype.modifiers.offset = function (data) {
  59555. var offset = this._options.offset;
  59556. var popper = data.offsets.popper;
  59557. if (data.placement.indexOf('left') !== -1) {
  59558. popper.top -= offset;
  59559. } else if (data.placement.indexOf('right') !== -1) {
  59560. popper.top += offset;
  59561. } else if (data.placement.indexOf('top') !== -1) {
  59562. popper.left -= offset;
  59563. } else if (data.placement.indexOf('bottom') !== -1) {
  59564. popper.left += offset;
  59565. }
  59566. return data;
  59567. };
  59568. /**
  59569. * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
  59570. * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
  59571. * @method
  59572. * @memberof Popper.modifiers
  59573. * @argument {Object} data - The data object generated by _update method
  59574. * @returns {Object} The data object, properly modified
  59575. */
  59576. Popper.prototype.modifiers.arrow = function (data) {
  59577. var arrow = this._options.arrowElement;
  59578. var arrowOffset = this._options.arrowOffset;
  59579. // if the arrowElement is a string, suppose it's a CSS selector
  59580. if (typeof arrow === 'string') {
  59581. arrow = this._popper.querySelector(arrow);
  59582. }
  59583. // if arrow element is not found, don't run the modifier
  59584. if (!arrow) {
  59585. return data;
  59586. }
  59587. // the arrow element must be child of its popper
  59588. if (!this._popper.contains(arrow)) {
  59589. console.warn('WARNING: `arrowElement` must be child of its popper element!');
  59590. return data;
  59591. }
  59592. // arrow depends on keepTogether in order to work
  59593. if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
  59594. console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
  59595. return data;
  59596. }
  59597. var arrowStyle = {};
  59598. var placement = data.placement.split('-')[0];
  59599. var popper = getPopperClientRect(data.offsets.popper);
  59600. var reference = data.offsets.reference;
  59601. var isVertical = ['left', 'right'].indexOf(placement) !== -1;
  59602. var len = isVertical ? 'height' : 'width';
  59603. var side = isVertical ? 'top' : 'left';
  59604. var translate = isVertical ? 'translateY' : 'translateX';
  59605. var altSide = isVertical ? 'left' : 'top';
  59606. var opSide = isVertical ? 'bottom' : 'right';
  59607. var arrowSize = getOuterSizes(arrow)[len];
  59608. //
  59609. // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
  59610. //
  59611. // top/left side
  59612. if (reference[opSide] - arrowSize < popper[side]) {
  59613. data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
  59614. }
  59615. // bottom/right side
  59616. if (reference[side] + arrowSize > popper[opSide]) {
  59617. data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
  59618. }
  59619. // compute center of the popper
  59620. var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
  59621. var sideValue = center - popper[side];
  59622. // prevent arrow from being placed not contiguously to its popper
  59623. sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
  59624. arrowStyle[side] = sideValue;
  59625. arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
  59626. data.offsets.arrow = arrowStyle;
  59627. data.arrowElement = arrow;
  59628. return data;
  59629. };
  59630. //
  59631. // Helpers
  59632. //
  59633. /**
  59634. * Get the outer sizes of the given element (offset size + margins)
  59635. * @function
  59636. * @ignore
  59637. * @argument {Element} element
  59638. * @returns {Object} object containing width and height properties
  59639. */
  59640. function getOuterSizes(element) {
  59641. // NOTE: 1 DOM access here
  59642. var _display = element.style.display,
  59643. _visibility = element.style.visibility;
  59644. element.style.display = 'block';element.style.visibility = 'hidden';
  59645. var calcWidthToForceRepaint = element.offsetWidth;
  59646. // original method
  59647. var styles = root.getComputedStyle(element);
  59648. var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
  59649. var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
  59650. var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
  59651. // reset element styles
  59652. element.style.display = _display;element.style.visibility = _visibility;
  59653. return result;
  59654. }
  59655. /**
  59656. * Get the opposite placement of the given one/
  59657. * @function
  59658. * @ignore
  59659. * @argument {String} placement
  59660. * @returns {String} flipped placement
  59661. */
  59662. function getOppositePlacement(placement) {
  59663. var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
  59664. return placement.replace(/left|right|bottom|top/g, function (matched) {
  59665. return hash[matched];
  59666. });
  59667. }
  59668. /**
  59669. * Given the popper offsets, generate an output similar to getBoundingClientRect
  59670. * @function
  59671. * @ignore
  59672. * @argument {Object} popperOffsets
  59673. * @returns {Object} ClientRect like output
  59674. */
  59675. function getPopperClientRect(popperOffsets) {
  59676. var offsets = Object.assign({}, popperOffsets);
  59677. offsets.right = offsets.left + offsets.width;
  59678. offsets.bottom = offsets.top + offsets.height;
  59679. return offsets;
  59680. }
  59681. /**
  59682. * Given an array and the key to find, returns its index
  59683. * @function
  59684. * @ignore
  59685. * @argument {Array} arr
  59686. * @argument keyToFind
  59687. * @returns index or null
  59688. */
  59689. function getArrayKeyIndex(arr, keyToFind) {
  59690. var i = 0,
  59691. key;
  59692. for (key in arr) {
  59693. if (arr[key] === keyToFind) {
  59694. return i;
  59695. }
  59696. i++;
  59697. }
  59698. return null;
  59699. }
  59700. /**
  59701. * Get CSS computed property of the given element
  59702. * @function
  59703. * @ignore
  59704. * @argument {Eement} element
  59705. * @argument {String} property
  59706. */
  59707. function getStyleComputedProperty(element, property) {
  59708. // NOTE: 1 DOM access here
  59709. var css = root.getComputedStyle(element, null);
  59710. return css[property];
  59711. }
  59712. /**
  59713. * Returns the offset parent of the given element
  59714. * @function
  59715. * @ignore
  59716. * @argument {Element} element
  59717. * @returns {Element} offset parent
  59718. */
  59719. function getOffsetParent(element) {
  59720. // NOTE: 1 DOM access here
  59721. var offsetParent = element.offsetParent;
  59722. return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
  59723. }
  59724. /**
  59725. * Returns the scrolling parent of the given element
  59726. * @function
  59727. * @ignore
  59728. * @argument {Element} element
  59729. * @returns {Element} offset parent
  59730. */
  59731. function getScrollParent(element) {
  59732. var parent = element.parentNode;
  59733. if (!parent) {
  59734. return element;
  59735. }
  59736. if (parent === root.document) {
  59737. // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
  59738. // greater than 0 and return the proper element
  59739. if (root.document.body.scrollTop || root.document.body.scrollLeft) {
  59740. return root.document.body;
  59741. } else {
  59742. return root.document.documentElement;
  59743. }
  59744. }
  59745. // Firefox want us to check `-x` and `-y` variations as well
  59746. if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
  59747. // If the detected scrollParent is body, we perform an additional check on its parentNode
  59748. // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
  59749. // fixes issue #65
  59750. return parent;
  59751. }
  59752. return getScrollParent(element.parentNode);
  59753. }
  59754. /**
  59755. * Check if the given element is fixed or is inside a fixed parent
  59756. * @function
  59757. * @ignore
  59758. * @argument {Element} element
  59759. * @argument {Element} customContainer
  59760. * @returns {Boolean} answer to "isFixed?"
  59761. */
  59762. function isFixed(element) {
  59763. if (element === root.document.body) {
  59764. return false;
  59765. }
  59766. if (getStyleComputedProperty(element, 'position') === 'fixed') {
  59767. return true;
  59768. }
  59769. return element.parentNode ? isFixed(element.parentNode) : element;
  59770. }
  59771. /**
  59772. * Set the style to the given popper
  59773. * @function
  59774. * @ignore
  59775. * @argument {Element} element - Element to apply the style to
  59776. * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
  59777. */
  59778. function setStyle(element, styles) {
  59779. function is_numeric(n) {
  59780. return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
  59781. }
  59782. Object.keys(styles).forEach(function (prop) {
  59783. var unit = '';
  59784. // add unit if the value is numeric and is one of the following
  59785. if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
  59786. unit = 'px';
  59787. }
  59788. element.style[prop] = styles[prop] + unit;
  59789. });
  59790. }
  59791. /**
  59792. * Check if the given variable is a function
  59793. * @function
  59794. * @ignore
  59795. * @argument {*} functionToCheck - variable to check
  59796. * @returns {Boolean} answer to: is a function?
  59797. */
  59798. function isFunction(functionToCheck) {
  59799. var getType = {};
  59800. return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  59801. }
  59802. /**
  59803. * Get the position of the given element, relative to its offset parent
  59804. * @function
  59805. * @ignore
  59806. * @param {Element} element
  59807. * @return {Object} position - Coordinates of the element and its `scrollTop`
  59808. */
  59809. function getOffsetRect(element) {
  59810. var elementRect = {
  59811. width: element.offsetWidth,
  59812. height: element.offsetHeight,
  59813. left: element.offsetLeft,
  59814. top: element.offsetTop
  59815. };
  59816. elementRect.right = elementRect.left + elementRect.width;
  59817. elementRect.bottom = elementRect.top + elementRect.height;
  59818. // position
  59819. return elementRect;
  59820. }
  59821. /**
  59822. * Get bounding client rect of given element
  59823. * @function
  59824. * @ignore
  59825. * @param {HTMLElement} element
  59826. * @return {Object} client rect
  59827. */
  59828. function getBoundingClientRect(element) {
  59829. var rect = element.getBoundingClientRect();
  59830. // whether the IE version is lower than 11
  59831. var isIE = navigator.userAgent.indexOf("MSIE") != -1;
  59832. // fix ie document bounding top always 0 bug
  59833. var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
  59834. return {
  59835. left: rect.left,
  59836. top: rectTop,
  59837. right: rect.right,
  59838. bottom: rect.bottom,
  59839. width: rect.right - rect.left,
  59840. height: rect.bottom - rectTop
  59841. };
  59842. }
  59843. /**
  59844. * Given an element and one of its parents, return the offset
  59845. * @function
  59846. * @ignore
  59847. * @param {HTMLElement} element
  59848. * @param {HTMLElement} parent
  59849. * @return {Object} rect
  59850. */
  59851. function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
  59852. var elementRect = getBoundingClientRect(element);
  59853. var parentRect = getBoundingClientRect(parent);
  59854. if (fixed) {
  59855. var scrollParent = getScrollParent(parent);
  59856. parentRect.top += scrollParent.scrollTop;
  59857. parentRect.bottom += scrollParent.scrollTop;
  59858. parentRect.left += scrollParent.scrollLeft;
  59859. parentRect.right += scrollParent.scrollLeft;
  59860. }
  59861. var rect = {
  59862. top: elementRect.top - parentRect.top,
  59863. left: elementRect.left - parentRect.left,
  59864. bottom: elementRect.top - parentRect.top + elementRect.height,
  59865. right: elementRect.left - parentRect.left + elementRect.width,
  59866. width: elementRect.width,
  59867. height: elementRect.height
  59868. };
  59869. return rect;
  59870. }
  59871. /**
  59872. * Get the prefixed supported property name
  59873. * @function
  59874. * @ignore
  59875. * @argument {String} property (camelCase)
  59876. * @returns {String} prefixed property (camelCase)
  59877. */
  59878. function getSupportedPropertyName(property) {
  59879. var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
  59880. for (var i = 0; i < prefixes.length; i++) {
  59881. var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
  59882. if (typeof root.document.body.style[toCheck] !== 'undefined') {
  59883. return toCheck;
  59884. }
  59885. }
  59886. return null;
  59887. }
  59888. /**
  59889. * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
  59890. * objects to a target object. It will return the target object.
  59891. * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
  59892. * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
  59893. * @function
  59894. * @ignore
  59895. */
  59896. if (!Object.assign) {
  59897. Object.defineProperty(Object, 'assign', {
  59898. enumerable: false,
  59899. configurable: true,
  59900. writable: true,
  59901. value: function value(target) {
  59902. if (target === undefined || target === null) {
  59903. throw new TypeError('Cannot convert first argument to object');
  59904. }
  59905. var to = Object(target);
  59906. for (var i = 1; i < arguments.length; i++) {
  59907. var nextSource = arguments[i];
  59908. if (nextSource === undefined || nextSource === null) {
  59909. continue;
  59910. }
  59911. nextSource = Object(nextSource);
  59912. var keysArray = Object.keys(nextSource);
  59913. for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
  59914. var nextKey = keysArray[nextIndex];
  59915. var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
  59916. if (desc !== undefined && desc.enumerable) {
  59917. to[nextKey] = nextSource[nextKey];
  59918. }
  59919. }
  59920. }
  59921. return to;
  59922. }
  59923. });
  59924. }
  59925. return Popper;
  59926. });
  59927. /***/ }),
  59928. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popup/index.js":
  59929. /*!*****************************************************************************!*\
  59930. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popup/index.js ***!
  59931. \*****************************************************************************/
  59932. /*! no static exports found */
  59933. /***/ (function(module, exports, __webpack_require__) {
  59934. "use strict";
  59935. exports.__esModule = true;
  59936. exports.PopupManager = undefined;
  59937. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  59938. var _vue2 = _interopRequireDefault(_vue);
  59939. var _merge = __webpack_require__(/*! element-ui/lib/utils/merge */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/merge.js");
  59940. var _merge2 = _interopRequireDefault(_merge);
  59941. var _popupManager = __webpack_require__(/*! element-ui/lib/utils/popup/popup-manager */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popup/popup-manager.js");
  59942. var _popupManager2 = _interopRequireDefault(_popupManager);
  59943. var _scrollbarWidth = __webpack_require__(/*! ../scrollbar-width */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scrollbar-width.js");
  59944. var _scrollbarWidth2 = _interopRequireDefault(_scrollbarWidth);
  59945. var _dom = __webpack_require__(/*! ../dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  59946. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  59947. var idSeed = 1;
  59948. var scrollBarWidth = void 0;
  59949. exports.default = {
  59950. props: {
  59951. visible: {
  59952. type: Boolean,
  59953. default: false
  59954. },
  59955. openDelay: {},
  59956. closeDelay: {},
  59957. zIndex: {},
  59958. modal: {
  59959. type: Boolean,
  59960. default: false
  59961. },
  59962. modalFade: {
  59963. type: Boolean,
  59964. default: true
  59965. },
  59966. modalClass: {},
  59967. modalAppendToBody: {
  59968. type: Boolean,
  59969. default: false
  59970. },
  59971. lockScroll: {
  59972. type: Boolean,
  59973. default: true
  59974. },
  59975. closeOnPressEscape: {
  59976. type: Boolean,
  59977. default: false
  59978. },
  59979. closeOnClickModal: {
  59980. type: Boolean,
  59981. default: false
  59982. }
  59983. },
  59984. beforeMount: function beforeMount() {
  59985. this._popupId = 'popup-' + idSeed++;
  59986. _popupManager2.default.register(this._popupId, this);
  59987. },
  59988. beforeDestroy: function beforeDestroy() {
  59989. _popupManager2.default.deregister(this._popupId);
  59990. _popupManager2.default.closeModal(this._popupId);
  59991. this.restoreBodyStyle();
  59992. },
  59993. data: function data() {
  59994. return {
  59995. opened: false,
  59996. bodyPaddingRight: null,
  59997. computedBodyPaddingRight: 0,
  59998. withoutHiddenClass: true,
  59999. rendered: false
  60000. };
  60001. },
  60002. watch: {
  60003. visible: function visible(val) {
  60004. var _this = this;
  60005. if (val) {
  60006. if (this._opening) return;
  60007. if (!this.rendered) {
  60008. this.rendered = true;
  60009. _vue2.default.nextTick(function () {
  60010. _this.open();
  60011. });
  60012. } else {
  60013. this.open();
  60014. }
  60015. } else {
  60016. this.close();
  60017. }
  60018. }
  60019. },
  60020. methods: {
  60021. open: function open(options) {
  60022. var _this2 = this;
  60023. if (!this.rendered) {
  60024. this.rendered = true;
  60025. }
  60026. var props = (0, _merge2.default)({}, this.$props || this, options);
  60027. if (this._closeTimer) {
  60028. clearTimeout(this._closeTimer);
  60029. this._closeTimer = null;
  60030. }
  60031. clearTimeout(this._openTimer);
  60032. var openDelay = Number(props.openDelay);
  60033. if (openDelay > 0) {
  60034. this._openTimer = setTimeout(function () {
  60035. _this2._openTimer = null;
  60036. _this2.doOpen(props);
  60037. }, openDelay);
  60038. } else {
  60039. this.doOpen(props);
  60040. }
  60041. },
  60042. doOpen: function doOpen(props) {
  60043. if (this.$isServer) return;
  60044. if (this.willOpen && !this.willOpen()) return;
  60045. if (this.opened) return;
  60046. this._opening = true;
  60047. var dom = this.$el;
  60048. var modal = props.modal;
  60049. var zIndex = props.zIndex;
  60050. if (zIndex) {
  60051. _popupManager2.default.zIndex = zIndex;
  60052. }
  60053. if (modal) {
  60054. if (this._closing) {
  60055. _popupManager2.default.closeModal(this._popupId);
  60056. this._closing = false;
  60057. }
  60058. _popupManager2.default.openModal(this._popupId, _popupManager2.default.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
  60059. if (props.lockScroll) {
  60060. this.withoutHiddenClass = !(0, _dom.hasClass)(document.body, 'el-popup-parent--hidden');
  60061. if (this.withoutHiddenClass) {
  60062. this.bodyPaddingRight = document.body.style.paddingRight;
  60063. this.computedBodyPaddingRight = parseInt((0, _dom.getStyle)(document.body, 'paddingRight'), 10);
  60064. }
  60065. scrollBarWidth = (0, _scrollbarWidth2.default)();
  60066. var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
  60067. var bodyOverflowY = (0, _dom.getStyle)(document.body, 'overflowY');
  60068. if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
  60069. document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
  60070. }
  60071. (0, _dom.addClass)(document.body, 'el-popup-parent--hidden');
  60072. }
  60073. }
  60074. if (getComputedStyle(dom).position === 'static') {
  60075. dom.style.position = 'absolute';
  60076. }
  60077. dom.style.zIndex = _popupManager2.default.nextZIndex();
  60078. this.opened = true;
  60079. this.onOpen && this.onOpen();
  60080. this.doAfterOpen();
  60081. },
  60082. doAfterOpen: function doAfterOpen() {
  60083. this._opening = false;
  60084. },
  60085. close: function close() {
  60086. var _this3 = this;
  60087. if (this.willClose && !this.willClose()) return;
  60088. if (this._openTimer !== null) {
  60089. clearTimeout(this._openTimer);
  60090. this._openTimer = null;
  60091. }
  60092. clearTimeout(this._closeTimer);
  60093. var closeDelay = Number(this.closeDelay);
  60094. if (closeDelay > 0) {
  60095. this._closeTimer = setTimeout(function () {
  60096. _this3._closeTimer = null;
  60097. _this3.doClose();
  60098. }, closeDelay);
  60099. } else {
  60100. this.doClose();
  60101. }
  60102. },
  60103. doClose: function doClose() {
  60104. this._closing = true;
  60105. this.onClose && this.onClose();
  60106. if (this.lockScroll) {
  60107. setTimeout(this.restoreBodyStyle, 200);
  60108. }
  60109. this.opened = false;
  60110. this.doAfterClose();
  60111. },
  60112. doAfterClose: function doAfterClose() {
  60113. _popupManager2.default.closeModal(this._popupId);
  60114. this._closing = false;
  60115. },
  60116. restoreBodyStyle: function restoreBodyStyle() {
  60117. if (this.modal && this.withoutHiddenClass) {
  60118. document.body.style.paddingRight = this.bodyPaddingRight;
  60119. (0, _dom.removeClass)(document.body, 'el-popup-parent--hidden');
  60120. }
  60121. this.withoutHiddenClass = true;
  60122. }
  60123. }
  60124. };
  60125. exports.PopupManager = _popupManager2.default;
  60126. /***/ }),
  60127. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popup/popup-manager.js":
  60128. /*!*************************************************************************************!*\
  60129. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popup/popup-manager.js ***!
  60130. \*************************************************************************************/
  60131. /*! no static exports found */
  60132. /***/ (function(module, exports, __webpack_require__) {
  60133. "use strict";
  60134. exports.__esModule = true;
  60135. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  60136. var _vue2 = _interopRequireDefault(_vue);
  60137. var _dom = __webpack_require__(/*! element-ui/lib/utils/dom */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/dom.js");
  60138. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  60139. var hasModal = false;
  60140. var hasInitZIndex = false;
  60141. var zIndex = void 0;
  60142. var getModal = function getModal() {
  60143. if (_vue2.default.prototype.$isServer) return;
  60144. var modalDom = PopupManager.modalDom;
  60145. if (modalDom) {
  60146. hasModal = true;
  60147. } else {
  60148. hasModal = false;
  60149. modalDom = document.createElement('div');
  60150. PopupManager.modalDom = modalDom;
  60151. modalDom.addEventListener('touchmove', function (event) {
  60152. event.preventDefault();
  60153. event.stopPropagation();
  60154. });
  60155. modalDom.addEventListener('click', function () {
  60156. PopupManager.doOnModalClick && PopupManager.doOnModalClick();
  60157. });
  60158. }
  60159. return modalDom;
  60160. };
  60161. var instances = {};
  60162. var PopupManager = {
  60163. modalFade: true,
  60164. getInstance: function getInstance(id) {
  60165. return instances[id];
  60166. },
  60167. register: function register(id, instance) {
  60168. if (id && instance) {
  60169. instances[id] = instance;
  60170. }
  60171. },
  60172. deregister: function deregister(id) {
  60173. if (id) {
  60174. instances[id] = null;
  60175. delete instances[id];
  60176. }
  60177. },
  60178. nextZIndex: function nextZIndex() {
  60179. return PopupManager.zIndex++;
  60180. },
  60181. modalStack: [],
  60182. doOnModalClick: function doOnModalClick() {
  60183. var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
  60184. if (!topItem) return;
  60185. var instance = PopupManager.getInstance(topItem.id);
  60186. if (instance && instance.closeOnClickModal) {
  60187. instance.close();
  60188. }
  60189. },
  60190. openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
  60191. if (_vue2.default.prototype.$isServer) return;
  60192. if (!id || zIndex === undefined) return;
  60193. this.modalFade = modalFade;
  60194. var modalStack = this.modalStack;
  60195. for (var i = 0, j = modalStack.length; i < j; i++) {
  60196. var item = modalStack[i];
  60197. if (item.id === id) {
  60198. return;
  60199. }
  60200. }
  60201. var modalDom = getModal();
  60202. (0, _dom.addClass)(modalDom, 'v-modal');
  60203. if (this.modalFade && !hasModal) {
  60204. (0, _dom.addClass)(modalDom, 'v-modal-enter');
  60205. }
  60206. if (modalClass) {
  60207. var classArr = modalClass.trim().split(/\s+/);
  60208. classArr.forEach(function (item) {
  60209. return (0, _dom.addClass)(modalDom, item);
  60210. });
  60211. }
  60212. setTimeout(function () {
  60213. (0, _dom.removeClass)(modalDom, 'v-modal-enter');
  60214. }, 200);
  60215. if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
  60216. dom.parentNode.appendChild(modalDom);
  60217. } else {
  60218. document.body.appendChild(modalDom);
  60219. }
  60220. if (zIndex) {
  60221. modalDom.style.zIndex = zIndex;
  60222. }
  60223. modalDom.tabIndex = 0;
  60224. modalDom.style.display = '';
  60225. this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
  60226. },
  60227. closeModal: function closeModal(id) {
  60228. var modalStack = this.modalStack;
  60229. var modalDom = getModal();
  60230. if (modalStack.length > 0) {
  60231. var topItem = modalStack[modalStack.length - 1];
  60232. if (topItem.id === id) {
  60233. if (topItem.modalClass) {
  60234. var classArr = topItem.modalClass.trim().split(/\s+/);
  60235. classArr.forEach(function (item) {
  60236. return (0, _dom.removeClass)(modalDom, item);
  60237. });
  60238. }
  60239. modalStack.pop();
  60240. if (modalStack.length > 0) {
  60241. modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
  60242. }
  60243. } else {
  60244. for (var i = modalStack.length - 1; i >= 0; i--) {
  60245. if (modalStack[i].id === id) {
  60246. modalStack.splice(i, 1);
  60247. break;
  60248. }
  60249. }
  60250. }
  60251. }
  60252. if (modalStack.length === 0) {
  60253. if (this.modalFade) {
  60254. (0, _dom.addClass)(modalDom, 'v-modal-leave');
  60255. }
  60256. setTimeout(function () {
  60257. if (modalStack.length === 0) {
  60258. if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
  60259. modalDom.style.display = 'none';
  60260. PopupManager.modalDom = undefined;
  60261. }
  60262. (0, _dom.removeClass)(modalDom, 'v-modal-leave');
  60263. }, 200);
  60264. }
  60265. }
  60266. };
  60267. Object.defineProperty(PopupManager, 'zIndex', {
  60268. configurable: true,
  60269. get: function get() {
  60270. if (!hasInitZIndex) {
  60271. zIndex = zIndex || (_vue2.default.prototype.$ELEMENT || {}).zIndex || 2000;
  60272. hasInitZIndex = true;
  60273. }
  60274. return zIndex;
  60275. },
  60276. set: function set(value) {
  60277. zIndex = value;
  60278. }
  60279. });
  60280. var getTopPopup = function getTopPopup() {
  60281. if (_vue2.default.prototype.$isServer) return;
  60282. if (PopupManager.modalStack.length > 0) {
  60283. var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
  60284. if (!topPopup) return;
  60285. var instance = PopupManager.getInstance(topPopup.id);
  60286. return instance;
  60287. }
  60288. };
  60289. if (!_vue2.default.prototype.$isServer) {
  60290. // handle `esc` key when the popup is shown
  60291. window.addEventListener('keydown', function (event) {
  60292. if (event.keyCode === 27) {
  60293. var topPopup = getTopPopup();
  60294. if (topPopup && topPopup.closeOnPressEscape) {
  60295. topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
  60296. }
  60297. }
  60298. });
  60299. }
  60300. exports.default = PopupManager;
  60301. /***/ }),
  60302. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/resize-event.js":
  60303. /*!******************************************************************************!*\
  60304. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/resize-event.js ***!
  60305. \******************************************************************************/
  60306. /*! no static exports found */
  60307. /***/ (function(module, exports, __webpack_require__) {
  60308. "use strict";
  60309. exports.__esModule = true;
  60310. exports.removeResizeListener = exports.addResizeListener = undefined;
  60311. var _resizeObserverPolyfill = __webpack_require__(/*! resize-observer-polyfill */ "./node_modules/_resize-observer-polyfill@1.5.1@resize-observer-polyfill/dist/ResizeObserver.es.js");
  60312. var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);
  60313. var _throttleDebounce = __webpack_require__(/*! throttle-debounce */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/index.js");
  60314. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  60315. var isServer = typeof window === 'undefined';
  60316. /* istanbul ignore next */
  60317. var resizeHandler = function resizeHandler(entries) {
  60318. for (var _iterator = entries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  60319. var _ref;
  60320. if (_isArray) {
  60321. if (_i >= _iterator.length) break;
  60322. _ref = _iterator[_i++];
  60323. } else {
  60324. _i = _iterator.next();
  60325. if (_i.done) break;
  60326. _ref = _i.value;
  60327. }
  60328. var entry = _ref;
  60329. var listeners = entry.target.__resizeListeners__ || [];
  60330. if (listeners.length) {
  60331. listeners.forEach(function (fn) {
  60332. fn();
  60333. });
  60334. }
  60335. }
  60336. };
  60337. /* istanbul ignore next */
  60338. var addResizeListener = exports.addResizeListener = function addResizeListener(element, fn) {
  60339. if (isServer) return;
  60340. if (!element.__resizeListeners__) {
  60341. element.__resizeListeners__ = [];
  60342. element.__ro__ = new _resizeObserverPolyfill2.default((0, _throttleDebounce.debounce)(16, resizeHandler));
  60343. element.__ro__.observe(element);
  60344. }
  60345. element.__resizeListeners__.push(fn);
  60346. };
  60347. /* istanbul ignore next */
  60348. var removeResizeListener = exports.removeResizeListener = function removeResizeListener(element, fn) {
  60349. if (!element || !element.__resizeListeners__) return;
  60350. element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
  60351. if (!element.__resizeListeners__.length) {
  60352. element.__ro__.disconnect();
  60353. }
  60354. };
  60355. /***/ }),
  60356. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scroll-into-view.js":
  60357. /*!**********************************************************************************!*\
  60358. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scroll-into-view.js ***!
  60359. \**********************************************************************************/
  60360. /*! no static exports found */
  60361. /***/ (function(module, exports, __webpack_require__) {
  60362. "use strict";
  60363. exports.__esModule = true;
  60364. exports.default = scrollIntoView;
  60365. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  60366. var _vue2 = _interopRequireDefault(_vue);
  60367. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  60368. function scrollIntoView(container, selected) {
  60369. if (_vue2.default.prototype.$isServer) return;
  60370. if (!selected) {
  60371. container.scrollTop = 0;
  60372. return;
  60373. }
  60374. var offsetParents = [];
  60375. var pointer = selected.offsetParent;
  60376. while (pointer && container !== pointer && container.contains(pointer)) {
  60377. offsetParents.push(pointer);
  60378. pointer = pointer.offsetParent;
  60379. }
  60380. var top = selected.offsetTop + offsetParents.reduce(function (prev, curr) {
  60381. return prev + curr.offsetTop;
  60382. }, 0);
  60383. var bottom = top + selected.offsetHeight;
  60384. var viewRectTop = container.scrollTop;
  60385. var viewRectBottom = viewRectTop + container.clientHeight;
  60386. if (top < viewRectTop) {
  60387. container.scrollTop = top;
  60388. } else if (bottom > viewRectBottom) {
  60389. container.scrollTop = bottom - container.clientHeight;
  60390. }
  60391. }
  60392. /***/ }),
  60393. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scrollbar-width.js":
  60394. /*!*********************************************************************************!*\
  60395. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/scrollbar-width.js ***!
  60396. \*********************************************************************************/
  60397. /*! no static exports found */
  60398. /***/ (function(module, exports, __webpack_require__) {
  60399. "use strict";
  60400. exports.__esModule = true;
  60401. exports.default = function () {
  60402. if (_vue2.default.prototype.$isServer) return 0;
  60403. if (scrollBarWidth !== undefined) return scrollBarWidth;
  60404. var outer = document.createElement('div');
  60405. outer.className = 'el-scrollbar__wrap';
  60406. outer.style.visibility = 'hidden';
  60407. outer.style.width = '100px';
  60408. outer.style.position = 'absolute';
  60409. outer.style.top = '-9999px';
  60410. document.body.appendChild(outer);
  60411. var widthNoScroll = outer.offsetWidth;
  60412. outer.style.overflow = 'scroll';
  60413. var inner = document.createElement('div');
  60414. inner.style.width = '100%';
  60415. outer.appendChild(inner);
  60416. var widthWithScroll = inner.offsetWidth;
  60417. outer.parentNode.removeChild(outer);
  60418. scrollBarWidth = widthNoScroll - widthWithScroll;
  60419. return scrollBarWidth;
  60420. };
  60421. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  60422. var _vue2 = _interopRequireDefault(_vue);
  60423. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  60424. var scrollBarWidth = void 0;
  60425. ;
  60426. /***/ }),
  60427. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/shared.js":
  60428. /*!************************************************************************!*\
  60429. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/shared.js ***!
  60430. \************************************************************************/
  60431. /*! no static exports found */
  60432. /***/ (function(module, exports, __webpack_require__) {
  60433. "use strict";
  60434. exports.__esModule = true;
  60435. exports.isDef = isDef;
  60436. exports.isKorean = isKorean;
  60437. function isDef(val) {
  60438. return val !== undefined && val !== null;
  60439. }
  60440. function isKorean(text) {
  60441. var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
  60442. return reg.test(text);
  60443. }
  60444. /***/ }),
  60445. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/types.js":
  60446. /*!***********************************************************************!*\
  60447. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/types.js ***!
  60448. \***********************************************************************/
  60449. /*! no static exports found */
  60450. /***/ (function(module, exports, __webpack_require__) {
  60451. "use strict";
  60452. exports.__esModule = true;
  60453. exports.isDefined = exports.isUndefined = exports.isFunction = undefined;
  60454. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  60455. exports.isString = isString;
  60456. exports.isObject = isObject;
  60457. exports.isHtmlElement = isHtmlElement;
  60458. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  60459. var _vue2 = _interopRequireDefault(_vue);
  60460. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  60461. function isString(obj) {
  60462. return Object.prototype.toString.call(obj) === '[object String]';
  60463. }
  60464. function isObject(obj) {
  60465. return Object.prototype.toString.call(obj) === '[object Object]';
  60466. }
  60467. function isHtmlElement(node) {
  60468. return node && node.nodeType === Node.ELEMENT_NODE;
  60469. }
  60470. /**
  60471. * - Inspired:
  60472. * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
  60473. */
  60474. var isFunction = function isFunction(functionToCheck) {
  60475. var getType = {};
  60476. return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  60477. };
  60478. if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (_vue2.default.prototype.$isServer || typeof document.childNodes !== 'function')) {
  60479. exports.isFunction = isFunction = function isFunction(obj) {
  60480. return typeof obj === 'function' || false;
  60481. };
  60482. }
  60483. exports.isFunction = isFunction;
  60484. var isUndefined = exports.isUndefined = function isUndefined(val) {
  60485. return val === void 0;
  60486. };
  60487. var isDefined = exports.isDefined = function isDefined(val) {
  60488. return val !== undefined && val !== null;
  60489. };
  60490. /***/ }),
  60491. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js":
  60492. /*!**********************************************************************!*\
  60493. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js ***!
  60494. \**********************************************************************/
  60495. /*! no static exports found */
  60496. /***/ (function(module, exports, __webpack_require__) {
  60497. "use strict";
  60498. exports.__esModule = true;
  60499. exports.isEmpty = exports.isEqual = exports.arrayEquals = exports.looseEqual = exports.capitalize = exports.kebabCase = exports.autoprefixer = exports.isFirefox = exports.isEdge = exports.isIE = exports.coerceTruthyValueToArray = exports.arrayFind = exports.arrayFindIndex = exports.escapeRegexpString = exports.valueEquals = exports.generateId = exports.getValueByPath = undefined;
  60500. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  60501. exports.noop = noop;
  60502. exports.hasOwn = hasOwn;
  60503. exports.toObject = toObject;
  60504. exports.getPropByPath = getPropByPath;
  60505. exports.rafThrottle = rafThrottle;
  60506. exports.objToArray = objToArray;
  60507. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  60508. var _vue2 = _interopRequireDefault(_vue);
  60509. var _types = __webpack_require__(/*! element-ui/lib/utils/types */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/types.js");
  60510. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  60511. var hasOwnProperty = Object.prototype.hasOwnProperty;
  60512. function noop() {};
  60513. function hasOwn(obj, key) {
  60514. return hasOwnProperty.call(obj, key);
  60515. };
  60516. function extend(to, _from) {
  60517. for (var key in _from) {
  60518. to[key] = _from[key];
  60519. }
  60520. return to;
  60521. };
  60522. function toObject(arr) {
  60523. var res = {};
  60524. for (var i = 0; i < arr.length; i++) {
  60525. if (arr[i]) {
  60526. extend(res, arr[i]);
  60527. }
  60528. }
  60529. return res;
  60530. };
  60531. var getValueByPath = exports.getValueByPath = function getValueByPath(object, prop) {
  60532. prop = prop || '';
  60533. var paths = prop.split('.');
  60534. var current = object;
  60535. var result = null;
  60536. for (var i = 0, j = paths.length; i < j; i++) {
  60537. var path = paths[i];
  60538. if (!current) break;
  60539. if (i === j - 1) {
  60540. result = current[path];
  60541. break;
  60542. }
  60543. current = current[path];
  60544. }
  60545. return result;
  60546. };
  60547. function getPropByPath(obj, path, strict) {
  60548. var tempObj = obj;
  60549. path = path.replace(/\[(\w+)\]/g, '.$1');
  60550. path = path.replace(/^\./, '');
  60551. var keyArr = path.split('.');
  60552. var i = 0;
  60553. for (var len = keyArr.length; i < len - 1; ++i) {
  60554. if (!tempObj && !strict) break;
  60555. var key = keyArr[i];
  60556. if (key in tempObj) {
  60557. tempObj = tempObj[key];
  60558. } else {
  60559. if (strict) {
  60560. throw new Error('please transfer a valid prop path to form item!');
  60561. }
  60562. break;
  60563. }
  60564. }
  60565. return {
  60566. o: tempObj,
  60567. k: keyArr[i],
  60568. v: tempObj ? tempObj[keyArr[i]] : null
  60569. };
  60570. };
  60571. var generateId = exports.generateId = function generateId() {
  60572. return Math.floor(Math.random() * 10000);
  60573. };
  60574. var valueEquals = exports.valueEquals = function valueEquals(a, b) {
  60575. // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
  60576. if (a === b) return true;
  60577. if (!(a instanceof Array)) return false;
  60578. if (!(b instanceof Array)) return false;
  60579. if (a.length !== b.length) return false;
  60580. for (var i = 0; i !== a.length; ++i) {
  60581. if (a[i] !== b[i]) return false;
  60582. }
  60583. return true;
  60584. };
  60585. var escapeRegexpString = exports.escapeRegexpString = function escapeRegexpString() {
  60586. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  60587. return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
  60588. };
  60589. // TODO: use native Array.find, Array.findIndex when IE support is dropped
  60590. var arrayFindIndex = exports.arrayFindIndex = function arrayFindIndex(arr, pred) {
  60591. for (var i = 0; i !== arr.length; ++i) {
  60592. if (pred(arr[i])) {
  60593. return i;
  60594. }
  60595. }
  60596. return -1;
  60597. };
  60598. var arrayFind = exports.arrayFind = function arrayFind(arr, pred) {
  60599. var idx = arrayFindIndex(arr, pred);
  60600. return idx !== -1 ? arr[idx] : undefined;
  60601. };
  60602. // coerce truthy value to array
  60603. var coerceTruthyValueToArray = exports.coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
  60604. if (Array.isArray(val)) {
  60605. return val;
  60606. } else if (val) {
  60607. return [val];
  60608. } else {
  60609. return [];
  60610. }
  60611. };
  60612. var isIE = exports.isIE = function isIE() {
  60613. return !_vue2.default.prototype.$isServer && !isNaN(Number(document.documentMode));
  60614. };
  60615. var isEdge = exports.isEdge = function isEdge() {
  60616. return !_vue2.default.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
  60617. };
  60618. var isFirefox = exports.isFirefox = function isFirefox() {
  60619. return !_vue2.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
  60620. };
  60621. var autoprefixer = exports.autoprefixer = function autoprefixer(style) {
  60622. if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
  60623. var rules = ['transform', 'transition', 'animation'];
  60624. var prefixes = ['ms-', 'webkit-'];
  60625. rules.forEach(function (rule) {
  60626. var value = style[rule];
  60627. if (rule && value) {
  60628. prefixes.forEach(function (prefix) {
  60629. style[prefix + rule] = value;
  60630. });
  60631. }
  60632. });
  60633. return style;
  60634. };
  60635. var kebabCase = exports.kebabCase = function kebabCase(str) {
  60636. var hyphenateRE = /([^-])([A-Z])/g;
  60637. return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
  60638. };
  60639. var capitalize = exports.capitalize = function capitalize(str) {
  60640. if (!(0, _types.isString)(str)) return str;
  60641. return str.charAt(0).toUpperCase() + str.slice(1);
  60642. };
  60643. var looseEqual = exports.looseEqual = function looseEqual(a, b) {
  60644. var isObjectA = (0, _types.isObject)(a);
  60645. var isObjectB = (0, _types.isObject)(b);
  60646. if (isObjectA && isObjectB) {
  60647. return JSON.stringify(a) === JSON.stringify(b);
  60648. } else if (!isObjectA && !isObjectB) {
  60649. return String(a) === String(b);
  60650. } else {
  60651. return false;
  60652. }
  60653. };
  60654. var arrayEquals = exports.arrayEquals = function arrayEquals(arrayA, arrayB) {
  60655. arrayA = arrayA || [];
  60656. arrayB = arrayB || [];
  60657. if (arrayA.length !== arrayB.length) {
  60658. return false;
  60659. }
  60660. for (var i = 0; i < arrayA.length; i++) {
  60661. if (!looseEqual(arrayA[i], arrayB[i])) {
  60662. return false;
  60663. }
  60664. }
  60665. return true;
  60666. };
  60667. var isEqual = exports.isEqual = function isEqual(value1, value2) {
  60668. if (Array.isArray(value1) && Array.isArray(value2)) {
  60669. return arrayEquals(value1, value2);
  60670. }
  60671. return looseEqual(value1, value2);
  60672. };
  60673. var isEmpty = exports.isEmpty = function isEmpty(val) {
  60674. // null or undefined
  60675. if (val == null) return true;
  60676. if (typeof val === 'boolean') return false;
  60677. if (typeof val === 'number') return !val;
  60678. if (val instanceof Error) return val.message === '';
  60679. switch (Object.prototype.toString.call(val)) {
  60680. // String or Array
  60681. case '[object String]':
  60682. case '[object Array]':
  60683. return !val.length;
  60684. // Map or Set or File
  60685. case '[object File]':
  60686. case '[object Map]':
  60687. case '[object Set]':
  60688. {
  60689. return !val.size;
  60690. }
  60691. // Plain Object
  60692. case '[object Object]':
  60693. {
  60694. return !Object.keys(val).length;
  60695. }
  60696. }
  60697. return false;
  60698. };
  60699. function rafThrottle(fn) {
  60700. var locked = false;
  60701. return function () {
  60702. var _this = this;
  60703. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  60704. args[_key] = arguments[_key];
  60705. }
  60706. if (locked) return;
  60707. locked = true;
  60708. window.requestAnimationFrame(function (_) {
  60709. fn.apply(_this, args);
  60710. locked = false;
  60711. });
  60712. };
  60713. }
  60714. function objToArray(obj) {
  60715. if (Array.isArray(obj)) {
  60716. return obj;
  60717. }
  60718. return isEmpty(obj) ? [] : [obj];
  60719. }
  60720. /***/ }),
  60721. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vdom.js":
  60722. /*!**********************************************************************!*\
  60723. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vdom.js ***!
  60724. \**********************************************************************/
  60725. /*! no static exports found */
  60726. /***/ (function(module, exports, __webpack_require__) {
  60727. "use strict";
  60728. exports.__esModule = true;
  60729. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  60730. exports.isVNode = isVNode;
  60731. var _util = __webpack_require__(/*! element-ui/lib/utils/util */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/util.js");
  60732. function isVNode(node) {
  60733. return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && (0, _util.hasOwn)(node, 'componentOptions');
  60734. };
  60735. /***/ }),
  60736. /***/ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vue-popper.js":
  60737. /*!****************************************************************************!*\
  60738. !*** ./node_modules/_element-ui@2.15.8@element-ui/lib/utils/vue-popper.js ***!
  60739. \****************************************************************************/
  60740. /*! no static exports found */
  60741. /***/ (function(module, exports, __webpack_require__) {
  60742. "use strict";
  60743. exports.__esModule = true;
  60744. var _vue = __webpack_require__(/*! vue */ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js");
  60745. var _vue2 = _interopRequireDefault(_vue);
  60746. var _popup = __webpack_require__(/*! element-ui/lib/utils/popup */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popup/index.js");
  60747. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  60748. var PopperJS = _vue2.default.prototype.$isServer ? function () {} : __webpack_require__(/*! ./popper */ "./node_modules/_element-ui@2.15.8@element-ui/lib/utils/popper.js");
  60749. var stop = function stop(e) {
  60750. return e.stopPropagation();
  60751. };
  60752. /**
  60753. * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
  60754. * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
  60755. * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
  60756. * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
  60757. * @param {Boolean} [visible=false] Visibility of the popup element.
  60758. * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
  60759. */
  60760. exports.default = {
  60761. props: {
  60762. transformOrigin: {
  60763. type: [Boolean, String],
  60764. default: true
  60765. },
  60766. placement: {
  60767. type: String,
  60768. default: 'bottom'
  60769. },
  60770. boundariesPadding: {
  60771. type: Number,
  60772. default: 5
  60773. },
  60774. reference: {},
  60775. popper: {},
  60776. offset: {
  60777. default: 0
  60778. },
  60779. value: Boolean,
  60780. visibleArrow: Boolean,
  60781. arrowOffset: {
  60782. type: Number,
  60783. default: 35
  60784. },
  60785. appendToBody: {
  60786. type: Boolean,
  60787. default: true
  60788. },
  60789. popperOptions: {
  60790. type: Object,
  60791. default: function _default() {
  60792. return {
  60793. gpuAcceleration: false
  60794. };
  60795. }
  60796. }
  60797. },
  60798. data: function data() {
  60799. return {
  60800. showPopper: false,
  60801. currentPlacement: ''
  60802. };
  60803. },
  60804. watch: {
  60805. value: {
  60806. immediate: true,
  60807. handler: function handler(val) {
  60808. this.showPopper = val;
  60809. this.$emit('input', val);
  60810. }
  60811. },
  60812. showPopper: function showPopper(val) {
  60813. if (this.disabled) return;
  60814. val ? this.updatePopper() : this.destroyPopper();
  60815. this.$emit('input', val);
  60816. }
  60817. },
  60818. methods: {
  60819. createPopper: function createPopper() {
  60820. var _this = this;
  60821. if (this.$isServer) return;
  60822. this.currentPlacement = this.currentPlacement || this.placement;
  60823. if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
  60824. return;
  60825. }
  60826. var options = this.popperOptions;
  60827. var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
  60828. var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
  60829. if (!reference && this.$slots.reference && this.$slots.reference[0]) {
  60830. reference = this.referenceElm = this.$slots.reference[0].elm;
  60831. }
  60832. if (!popper || !reference) return;
  60833. if (this.visibleArrow) this.appendArrow(popper);
  60834. if (this.appendToBody) document.body.appendChild(this.popperElm);
  60835. if (this.popperJS && this.popperJS.destroy) {
  60836. this.popperJS.destroy();
  60837. }
  60838. options.placement = this.currentPlacement;
  60839. options.offset = this.offset;
  60840. options.arrowOffset = this.arrowOffset;
  60841. this.popperJS = new PopperJS(reference, popper, options);
  60842. this.popperJS.onCreate(function (_) {
  60843. _this.$emit('created', _this);
  60844. _this.resetTransformOrigin();
  60845. _this.$nextTick(_this.updatePopper);
  60846. });
  60847. if (typeof options.onUpdate === 'function') {
  60848. this.popperJS.onUpdate(options.onUpdate);
  60849. }
  60850. this.popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
  60851. this.popperElm.addEventListener('click', stop);
  60852. },
  60853. updatePopper: function updatePopper() {
  60854. var popperJS = this.popperJS;
  60855. if (popperJS) {
  60856. popperJS.update();
  60857. if (popperJS._popper) {
  60858. popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
  60859. }
  60860. } else {
  60861. this.createPopper();
  60862. }
  60863. },
  60864. doDestroy: function doDestroy(forceDestroy) {
  60865. /* istanbul ignore if */
  60866. if (!this.popperJS || this.showPopper && !forceDestroy) return;
  60867. this.popperJS.destroy();
  60868. this.popperJS = null;
  60869. },
  60870. destroyPopper: function destroyPopper() {
  60871. if (this.popperJS) {
  60872. this.resetTransformOrigin();
  60873. }
  60874. },
  60875. resetTransformOrigin: function resetTransformOrigin() {
  60876. if (!this.transformOrigin) return;
  60877. var placementMap = {
  60878. top: 'bottom',
  60879. bottom: 'top',
  60880. left: 'right',
  60881. right: 'left'
  60882. };
  60883. var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
  60884. var origin = placementMap[placement];
  60885. this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
  60886. },
  60887. appendArrow: function appendArrow(element) {
  60888. var hash = void 0;
  60889. if (this.appended) {
  60890. return;
  60891. }
  60892. this.appended = true;
  60893. for (var item in element.attributes) {
  60894. if (/^_v-/.test(element.attributes[item].name)) {
  60895. hash = element.attributes[item].name;
  60896. break;
  60897. }
  60898. }
  60899. var arrow = document.createElement('div');
  60900. if (hash) {
  60901. arrow.setAttribute(hash, '');
  60902. }
  60903. arrow.setAttribute('x-arrow', '');
  60904. arrow.className = 'popper__arrow';
  60905. element.appendChild(arrow);
  60906. }
  60907. },
  60908. beforeDestroy: function beforeDestroy() {
  60909. this.doDestroy(true);
  60910. if (this.popperElm && this.popperElm.parentNode === document.body) {
  60911. this.popperElm.removeEventListener('click', stop);
  60912. document.body.removeChild(this.popperElm);
  60913. }
  60914. },
  60915. // call destroy in keep-alive mode
  60916. deactivated: function deactivated() {
  60917. this.$options.beforeDestroy[0].call(this);
  60918. }
  60919. };
  60920. /***/ }),
  60921. /***/ "./node_modules/_encode-utf8@1.0.3@encode-utf8/index.js":
  60922. /*!**************************************************************!*\
  60923. !*** ./node_modules/_encode-utf8@1.0.3@encode-utf8/index.js ***!
  60924. \**************************************************************/
  60925. /*! no static exports found */
  60926. /***/ (function(module, exports, __webpack_require__) {
  60927. "use strict";
  60928. module.exports = function encodeUtf8 (input) {
  60929. var result = []
  60930. var size = input.length
  60931. for (var index = 0; index < size; index++) {
  60932. var point = input.charCodeAt(index)
  60933. if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {
  60934. var second = input.charCodeAt(index + 1)
  60935. if (second >= 0xDC00 && second <= 0xDFFF) {
  60936. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  60937. point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000
  60938. index += 1
  60939. }
  60940. }
  60941. // US-ASCII
  60942. if (point < 0x80) {
  60943. result.push(point)
  60944. continue
  60945. }
  60946. // 2-byte UTF-8
  60947. if (point < 0x800) {
  60948. result.push((point >> 6) | 192)
  60949. result.push((point & 63) | 128)
  60950. continue
  60951. }
  60952. // 3-byte UTF-8
  60953. if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {
  60954. result.push((point >> 12) | 224)
  60955. result.push(((point >> 6) & 63) | 128)
  60956. result.push((point & 63) | 128)
  60957. continue
  60958. }
  60959. // 4-byte UTF-8
  60960. if (point >= 0x10000 && point <= 0x10FFFF) {
  60961. result.push((point >> 18) | 240)
  60962. result.push(((point >> 12) & 63) | 128)
  60963. result.push(((point >> 6) & 63) | 128)
  60964. result.push((point & 63) | 128)
  60965. continue
  60966. }
  60967. // Invalid character
  60968. result.push(0xEF, 0xBF, 0xBD)
  60969. }
  60970. return new Uint8Array(result).buffer
  60971. }
  60972. /***/ }),
  60973. /***/ "./node_modules/_function-bind@1.1.1@function-bind/implementation.js":
  60974. /*!***************************************************************************!*\
  60975. !*** ./node_modules/_function-bind@1.1.1@function-bind/implementation.js ***!
  60976. \***************************************************************************/
  60977. /*! no static exports found */
  60978. /***/ (function(module, exports, __webpack_require__) {
  60979. "use strict";
  60980. /* eslint no-invalid-this: 1 */
  60981. var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
  60982. var slice = Array.prototype.slice;
  60983. var toStr = Object.prototype.toString;
  60984. var funcType = '[object Function]';
  60985. module.exports = function bind(that) {
  60986. var target = this;
  60987. if (typeof target !== 'function' || toStr.call(target) !== funcType) {
  60988. throw new TypeError(ERROR_MESSAGE + target);
  60989. }
  60990. var args = slice.call(arguments, 1);
  60991. var bound;
  60992. var binder = function () {
  60993. if (this instanceof bound) {
  60994. var result = target.apply(
  60995. this,
  60996. args.concat(slice.call(arguments))
  60997. );
  60998. if (Object(result) === result) {
  60999. return result;
  61000. }
  61001. return this;
  61002. } else {
  61003. return target.apply(
  61004. that,
  61005. args.concat(slice.call(arguments))
  61006. );
  61007. }
  61008. };
  61009. var boundLength = Math.max(0, target.length - args.length);
  61010. var boundArgs = [];
  61011. for (var i = 0; i < boundLength; i++) {
  61012. boundArgs.push('$' + i);
  61013. }
  61014. bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
  61015. if (target.prototype) {
  61016. var Empty = function Empty() {};
  61017. Empty.prototype = target.prototype;
  61018. bound.prototype = new Empty();
  61019. Empty.prototype = null;
  61020. }
  61021. return bound;
  61022. };
  61023. /***/ }),
  61024. /***/ "./node_modules/_function-bind@1.1.1@function-bind/index.js":
  61025. /*!******************************************************************!*\
  61026. !*** ./node_modules/_function-bind@1.1.1@function-bind/index.js ***!
  61027. \******************************************************************/
  61028. /*! no static exports found */
  61029. /***/ (function(module, exports, __webpack_require__) {
  61030. "use strict";
  61031. var implementation = __webpack_require__(/*! ./implementation */ "./node_modules/_function-bind@1.1.1@function-bind/implementation.js");
  61032. module.exports = Function.prototype.bind || implementation;
  61033. /***/ }),
  61034. /***/ "./node_modules/_get-intrinsic@1.1.2@get-intrinsic/index.js":
  61035. /*!******************************************************************!*\
  61036. !*** ./node_modules/_get-intrinsic@1.1.2@get-intrinsic/index.js ***!
  61037. \******************************************************************/
  61038. /*! no static exports found */
  61039. /***/ (function(module, exports, __webpack_require__) {
  61040. "use strict";
  61041. var undefined;
  61042. var $SyntaxError = SyntaxError;
  61043. var $Function = Function;
  61044. var $TypeError = TypeError;
  61045. // eslint-disable-next-line consistent-return
  61046. var getEvalledConstructor = function (expressionSyntax) {
  61047. try {
  61048. return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  61049. } catch (e) {}
  61050. };
  61051. var $gOPD = Object.getOwnPropertyDescriptor;
  61052. if ($gOPD) {
  61053. try {
  61054. $gOPD({}, '');
  61055. } catch (e) {
  61056. $gOPD = null; // this is IE 8, which has a broken gOPD
  61057. }
  61058. }
  61059. var throwTypeError = function () {
  61060. throw new $TypeError();
  61061. };
  61062. var ThrowTypeError = $gOPD
  61063. ? (function () {
  61064. try {
  61065. // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
  61066. arguments.callee; // IE 8 does not throw here
  61067. return throwTypeError;
  61068. } catch (calleeThrows) {
  61069. try {
  61070. // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
  61071. return $gOPD(arguments, 'callee').get;
  61072. } catch (gOPDthrows) {
  61073. return throwTypeError;
  61074. }
  61075. }
  61076. }())
  61077. : throwTypeError;
  61078. var hasSymbols = __webpack_require__(/*! has-symbols */ "./node_modules/_has-symbols@1.0.3@has-symbols/index.js")();
  61079. var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
  61080. var needsEval = {};
  61081. var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
  61082. var INTRINSICS = {
  61083. '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  61084. '%Array%': Array,
  61085. '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  61086. '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  61087. '%AsyncFromSyncIteratorPrototype%': undefined,
  61088. '%AsyncFunction%': needsEval,
  61089. '%AsyncGenerator%': needsEval,
  61090. '%AsyncGeneratorFunction%': needsEval,
  61091. '%AsyncIteratorPrototype%': needsEval,
  61092. '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  61093. '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  61094. '%Boolean%': Boolean,
  61095. '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  61096. '%Date%': Date,
  61097. '%decodeURI%': decodeURI,
  61098. '%decodeURIComponent%': decodeURIComponent,
  61099. '%encodeURI%': encodeURI,
  61100. '%encodeURIComponent%': encodeURIComponent,
  61101. '%Error%': Error,
  61102. '%eval%': eval, // eslint-disable-line no-eval
  61103. '%EvalError%': EvalError,
  61104. '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  61105. '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  61106. '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  61107. '%Function%': $Function,
  61108. '%GeneratorFunction%': needsEval,
  61109. '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  61110. '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  61111. '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  61112. '%isFinite%': isFinite,
  61113. '%isNaN%': isNaN,
  61114. '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  61115. '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  61116. '%Map%': typeof Map === 'undefined' ? undefined : Map,
  61117. '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  61118. '%Math%': Math,
  61119. '%Number%': Number,
  61120. '%Object%': Object,
  61121. '%parseFloat%': parseFloat,
  61122. '%parseInt%': parseInt,
  61123. '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  61124. '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  61125. '%RangeError%': RangeError,
  61126. '%ReferenceError%': ReferenceError,
  61127. '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  61128. '%RegExp%': RegExp,
  61129. '%Set%': typeof Set === 'undefined' ? undefined : Set,
  61130. '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  61131. '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  61132. '%String%': String,
  61133. '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  61134. '%Symbol%': hasSymbols ? Symbol : undefined,
  61135. '%SyntaxError%': $SyntaxError,
  61136. '%ThrowTypeError%': ThrowTypeError,
  61137. '%TypedArray%': TypedArray,
  61138. '%TypeError%': $TypeError,
  61139. '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  61140. '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  61141. '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  61142. '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  61143. '%URIError%': URIError,
  61144. '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  61145. '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  61146. '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
  61147. };
  61148. var doEval = function doEval(name) {
  61149. var value;
  61150. if (name === '%AsyncFunction%') {
  61151. value = getEvalledConstructor('async function () {}');
  61152. } else if (name === '%GeneratorFunction%') {
  61153. value = getEvalledConstructor('function* () {}');
  61154. } else if (name === '%AsyncGeneratorFunction%') {
  61155. value = getEvalledConstructor('async function* () {}');
  61156. } else if (name === '%AsyncGenerator%') {
  61157. var fn = doEval('%AsyncGeneratorFunction%');
  61158. if (fn) {
  61159. value = fn.prototype;
  61160. }
  61161. } else if (name === '%AsyncIteratorPrototype%') {
  61162. var gen = doEval('%AsyncGenerator%');
  61163. if (gen) {
  61164. value = getProto(gen.prototype);
  61165. }
  61166. }
  61167. INTRINSICS[name] = value;
  61168. return value;
  61169. };
  61170. var LEGACY_ALIASES = {
  61171. '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  61172. '%ArrayPrototype%': ['Array', 'prototype'],
  61173. '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  61174. '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  61175. '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  61176. '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  61177. '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  61178. '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  61179. '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  61180. '%BooleanPrototype%': ['Boolean', 'prototype'],
  61181. '%DataViewPrototype%': ['DataView', 'prototype'],
  61182. '%DatePrototype%': ['Date', 'prototype'],
  61183. '%ErrorPrototype%': ['Error', 'prototype'],
  61184. '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  61185. '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  61186. '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  61187. '%FunctionPrototype%': ['Function', 'prototype'],
  61188. '%Generator%': ['GeneratorFunction', 'prototype'],
  61189. '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  61190. '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  61191. '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  61192. '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  61193. '%JSONParse%': ['JSON', 'parse'],
  61194. '%JSONStringify%': ['JSON', 'stringify'],
  61195. '%MapPrototype%': ['Map', 'prototype'],
  61196. '%NumberPrototype%': ['Number', 'prototype'],
  61197. '%ObjectPrototype%': ['Object', 'prototype'],
  61198. '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  61199. '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  61200. '%PromisePrototype%': ['Promise', 'prototype'],
  61201. '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  61202. '%Promise_all%': ['Promise', 'all'],
  61203. '%Promise_reject%': ['Promise', 'reject'],
  61204. '%Promise_resolve%': ['Promise', 'resolve'],
  61205. '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  61206. '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  61207. '%RegExpPrototype%': ['RegExp', 'prototype'],
  61208. '%SetPrototype%': ['Set', 'prototype'],
  61209. '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  61210. '%StringPrototype%': ['String', 'prototype'],
  61211. '%SymbolPrototype%': ['Symbol', 'prototype'],
  61212. '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  61213. '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  61214. '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  61215. '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  61216. '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  61217. '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  61218. '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  61219. '%URIErrorPrototype%': ['URIError', 'prototype'],
  61220. '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  61221. '%WeakSetPrototype%': ['WeakSet', 'prototype']
  61222. };
  61223. var bind = __webpack_require__(/*! function-bind */ "./node_modules/_function-bind@1.1.1@function-bind/index.js");
  61224. var hasOwn = __webpack_require__(/*! has */ "./node_modules/_has@1.0.3@has/src/index.js");
  61225. var $concat = bind.call(Function.call, Array.prototype.concat);
  61226. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  61227. var $replace = bind.call(Function.call, String.prototype.replace);
  61228. var $strSlice = bind.call(Function.call, String.prototype.slice);
  61229. var $exec = bind.call(Function.call, RegExp.prototype.exec);
  61230. /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
  61231. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  61232. var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
  61233. var stringToPath = function stringToPath(string) {
  61234. var first = $strSlice(string, 0, 1);
  61235. var last = $strSlice(string, -1);
  61236. if (first === '%' && last !== '%') {
  61237. throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  61238. } else if (last === '%' && first !== '%') {
  61239. throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  61240. }
  61241. var result = [];
  61242. $replace(string, rePropName, function (match, number, quote, subString) {
  61243. result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  61244. });
  61245. return result;
  61246. };
  61247. /* end adaptation */
  61248. var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  61249. var intrinsicName = name;
  61250. var alias;
  61251. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  61252. alias = LEGACY_ALIASES[intrinsicName];
  61253. intrinsicName = '%' + alias[0] + '%';
  61254. }
  61255. if (hasOwn(INTRINSICS, intrinsicName)) {
  61256. var value = INTRINSICS[intrinsicName];
  61257. if (value === needsEval) {
  61258. value = doEval(intrinsicName);
  61259. }
  61260. if (typeof value === 'undefined' && !allowMissing) {
  61261. throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
  61262. }
  61263. return {
  61264. alias: alias,
  61265. name: intrinsicName,
  61266. value: value
  61267. };
  61268. }
  61269. throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
  61270. };
  61271. module.exports = function GetIntrinsic(name, allowMissing) {
  61272. if (typeof name !== 'string' || name.length === 0) {
  61273. throw new $TypeError('intrinsic name must be a non-empty string');
  61274. }
  61275. if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
  61276. throw new $TypeError('"allowMissing" argument must be a boolean');
  61277. }
  61278. if ($exec(/^%?[^%]*%?$/g, name) === null) {
  61279. throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
  61280. }
  61281. var parts = stringToPath(name);
  61282. var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  61283. var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  61284. var intrinsicRealName = intrinsic.name;
  61285. var value = intrinsic.value;
  61286. var skipFurtherCaching = false;
  61287. var alias = intrinsic.alias;
  61288. if (alias) {
  61289. intrinsicBaseName = alias[0];
  61290. $spliceApply(parts, $concat([0, 1], alias));
  61291. }
  61292. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  61293. var part = parts[i];
  61294. var first = $strSlice(part, 0, 1);
  61295. var last = $strSlice(part, -1);
  61296. if (
  61297. (
  61298. (first === '"' || first === "'" || first === '`')
  61299. || (last === '"' || last === "'" || last === '`')
  61300. )
  61301. && first !== last
  61302. ) {
  61303. throw new $SyntaxError('property names with quotes must have matching quotes');
  61304. }
  61305. if (part === 'constructor' || !isOwn) {
  61306. skipFurtherCaching = true;
  61307. }
  61308. intrinsicBaseName += '.' + part;
  61309. intrinsicRealName = '%' + intrinsicBaseName + '%';
  61310. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  61311. value = INTRINSICS[intrinsicRealName];
  61312. } else if (value != null) {
  61313. if (!(part in value)) {
  61314. if (!allowMissing) {
  61315. throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
  61316. }
  61317. return void undefined;
  61318. }
  61319. if ($gOPD && (i + 1) >= parts.length) {
  61320. var desc = $gOPD(value, part);
  61321. isOwn = !!desc;
  61322. // By convention, when a data property is converted to an accessor
  61323. // property to emulate a data property that does not suffer from
  61324. // the override mistake, that accessor's getter is marked with
  61325. // an `originalValue` property. Here, when we detect this, we
  61326. // uphold the illusion by pretending to see that original data
  61327. // property, i.e., returning the value rather than the getter
  61328. // itself.
  61329. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
  61330. value = desc.get;
  61331. } else {
  61332. value = value[part];
  61333. }
  61334. } else {
  61335. isOwn = hasOwn(value, part);
  61336. value = value[part];
  61337. }
  61338. if (isOwn && !skipFurtherCaching) {
  61339. INTRINSICS[intrinsicRealName] = value;
  61340. }
  61341. }
  61342. }
  61343. return value;
  61344. };
  61345. /***/ }),
  61346. /***/ "./node_modules/_has-symbols@1.0.3@has-symbols/index.js":
  61347. /*!**************************************************************!*\
  61348. !*** ./node_modules/_has-symbols@1.0.3@has-symbols/index.js ***!
  61349. \**************************************************************/
  61350. /*! no static exports found */
  61351. /***/ (function(module, exports, __webpack_require__) {
  61352. "use strict";
  61353. var origSymbol = typeof Symbol !== 'undefined' && Symbol;
  61354. var hasSymbolSham = __webpack_require__(/*! ./shams */ "./node_modules/_has-symbols@1.0.3@has-symbols/shams.js");
  61355. module.exports = function hasNativeSymbols() {
  61356. if (typeof origSymbol !== 'function') { return false; }
  61357. if (typeof Symbol !== 'function') { return false; }
  61358. if (typeof origSymbol('foo') !== 'symbol') { return false; }
  61359. if (typeof Symbol('bar') !== 'symbol') { return false; }
  61360. return hasSymbolSham();
  61361. };
  61362. /***/ }),
  61363. /***/ "./node_modules/_has-symbols@1.0.3@has-symbols/shams.js":
  61364. /*!**************************************************************!*\
  61365. !*** ./node_modules/_has-symbols@1.0.3@has-symbols/shams.js ***!
  61366. \**************************************************************/
  61367. /*! no static exports found */
  61368. /***/ (function(module, exports, __webpack_require__) {
  61369. "use strict";
  61370. /* eslint complexity: [2, 18], max-statements: [2, 33] */
  61371. module.exports = function hasSymbols() {
  61372. if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
  61373. if (typeof Symbol.iterator === 'symbol') { return true; }
  61374. var obj = {};
  61375. var sym = Symbol('test');
  61376. var symObj = Object(sym);
  61377. if (typeof sym === 'string') { return false; }
  61378. if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
  61379. if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
  61380. // temp disabled per https://github.com/ljharb/object.assign/issues/17
  61381. // if (sym instanceof Symbol) { return false; }
  61382. // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  61383. // if (!(symObj instanceof Symbol)) { return false; }
  61384. // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  61385. // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
  61386. var symVal = 42;
  61387. obj[sym] = symVal;
  61388. for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
  61389. if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
  61390. if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
  61391. var syms = Object.getOwnPropertySymbols(obj);
  61392. if (syms.length !== 1 || syms[0] !== sym) { return false; }
  61393. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
  61394. if (typeof Object.getOwnPropertyDescriptor === 'function') {
  61395. var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
  61396. if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
  61397. }
  61398. return true;
  61399. };
  61400. /***/ }),
  61401. /***/ "./node_modules/_has@1.0.3@has/src/index.js":
  61402. /*!**************************************************!*\
  61403. !*** ./node_modules/_has@1.0.3@has/src/index.js ***!
  61404. \**************************************************/
  61405. /*! no static exports found */
  61406. /***/ (function(module, exports, __webpack_require__) {
  61407. "use strict";
  61408. var bind = __webpack_require__(/*! function-bind */ "./node_modules/_function-bind@1.1.1@function-bind/index.js");
  61409. module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
  61410. /***/ }),
  61411. /***/ "./node_modules/_ieee754@1.2.1@ieee754/index.js":
  61412. /*!******************************************************!*\
  61413. !*** ./node_modules/_ieee754@1.2.1@ieee754/index.js ***!
  61414. \******************************************************/
  61415. /*! no static exports found */
  61416. /***/ (function(module, exports) {
  61417. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  61418. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  61419. var e, m
  61420. var eLen = (nBytes * 8) - mLen - 1
  61421. var eMax = (1 << eLen) - 1
  61422. var eBias = eMax >> 1
  61423. var nBits = -7
  61424. var i = isLE ? (nBytes - 1) : 0
  61425. var d = isLE ? -1 : 1
  61426. var s = buffer[offset + i]
  61427. i += d
  61428. e = s & ((1 << (-nBits)) - 1)
  61429. s >>= (-nBits)
  61430. nBits += eLen
  61431. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  61432. m = e & ((1 << (-nBits)) - 1)
  61433. e >>= (-nBits)
  61434. nBits += mLen
  61435. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  61436. if (e === 0) {
  61437. e = 1 - eBias
  61438. } else if (e === eMax) {
  61439. return m ? NaN : ((s ? -1 : 1) * Infinity)
  61440. } else {
  61441. m = m + Math.pow(2, mLen)
  61442. e = e - eBias
  61443. }
  61444. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  61445. }
  61446. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  61447. var e, m, c
  61448. var eLen = (nBytes * 8) - mLen - 1
  61449. var eMax = (1 << eLen) - 1
  61450. var eBias = eMax >> 1
  61451. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  61452. var i = isLE ? 0 : (nBytes - 1)
  61453. var d = isLE ? 1 : -1
  61454. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  61455. value = Math.abs(value)
  61456. if (isNaN(value) || value === Infinity) {
  61457. m = isNaN(value) ? 1 : 0
  61458. e = eMax
  61459. } else {
  61460. e = Math.floor(Math.log(value) / Math.LN2)
  61461. if (value * (c = Math.pow(2, -e)) < 1) {
  61462. e--
  61463. c *= 2
  61464. }
  61465. if (e + eBias >= 1) {
  61466. value += rt / c
  61467. } else {
  61468. value += rt * Math.pow(2, 1 - eBias)
  61469. }
  61470. if (value * c >= 2) {
  61471. e++
  61472. c /= 2
  61473. }
  61474. if (e + eBias >= eMax) {
  61475. m = 0
  61476. e = eMax
  61477. } else if (e + eBias >= 1) {
  61478. m = ((value * c) - 1) * Math.pow(2, mLen)
  61479. e = e + eBias
  61480. } else {
  61481. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  61482. e = 0
  61483. }
  61484. }
  61485. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  61486. e = (e << mLen) | m
  61487. eLen += mLen
  61488. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  61489. buffer[offset + i - d] |= s * 128
  61490. }
  61491. /***/ }),
  61492. /***/ "./node_modules/_isarray@1.0.0@isarray/index.js":
  61493. /*!******************************************************!*\
  61494. !*** ./node_modules/_isarray@1.0.0@isarray/index.js ***!
  61495. \******************************************************/
  61496. /*! no static exports found */
  61497. /***/ (function(module, exports) {
  61498. var toString = {}.toString;
  61499. module.exports = Array.isArray || function (arr) {
  61500. return toString.call(arr) == '[object Array]';
  61501. };
  61502. /***/ }),
  61503. /***/ "./node_modules/_js-cookie@2.2.1@js-cookie/src/js.cookie.js":
  61504. /*!******************************************************************!*\
  61505. !*** ./node_modules/_js-cookie@2.2.1@js-cookie/src/js.cookie.js ***!
  61506. \******************************************************************/
  61507. /*! no static exports found */
  61508. /***/ (function(module, exports, __webpack_require__) {
  61509. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  61510. * JavaScript Cookie v2.2.1
  61511. * https://github.com/js-cookie/js-cookie
  61512. *
  61513. * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
  61514. * Released under the MIT license
  61515. */
  61516. ;(function (factory) {
  61517. var registeredInModuleLoader;
  61518. if (true) {
  61519. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  61520. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  61521. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  61522. __WEBPACK_AMD_DEFINE_FACTORY__),
  61523. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  61524. registeredInModuleLoader = true;
  61525. }
  61526. if (true) {
  61527. module.exports = factory();
  61528. registeredInModuleLoader = true;
  61529. }
  61530. if (!registeredInModuleLoader) {
  61531. var OldCookies = window.Cookies;
  61532. var api = window.Cookies = factory();
  61533. api.noConflict = function () {
  61534. window.Cookies = OldCookies;
  61535. return api;
  61536. };
  61537. }
  61538. }(function () {
  61539. function extend () {
  61540. var i = 0;
  61541. var result = {};
  61542. for (; i < arguments.length; i++) {
  61543. var attributes = arguments[ i ];
  61544. for (var key in attributes) {
  61545. result[key] = attributes[key];
  61546. }
  61547. }
  61548. return result;
  61549. }
  61550. function decode (s) {
  61551. return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
  61552. }
  61553. function init (converter) {
  61554. function api() {}
  61555. function set (key, value, attributes) {
  61556. if (typeof document === 'undefined') {
  61557. return;
  61558. }
  61559. attributes = extend({
  61560. path: '/'
  61561. }, api.defaults, attributes);
  61562. if (typeof attributes.expires === 'number') {
  61563. attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
  61564. }
  61565. // We're using "expires" because "max-age" is not supported by IE
  61566. attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
  61567. try {
  61568. var result = JSON.stringify(value);
  61569. if (/^[\{\[]/.test(result)) {
  61570. value = result;
  61571. }
  61572. } catch (e) {}
  61573. value = converter.write ?
  61574. converter.write(value, key) :
  61575. encodeURIComponent(String(value))
  61576. .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
  61577. key = encodeURIComponent(String(key))
  61578. .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
  61579. .replace(/[\(\)]/g, escape);
  61580. var stringifiedAttributes = '';
  61581. for (var attributeName in attributes) {
  61582. if (!attributes[attributeName]) {
  61583. continue;
  61584. }
  61585. stringifiedAttributes += '; ' + attributeName;
  61586. if (attributes[attributeName] === true) {
  61587. continue;
  61588. }
  61589. // Considers RFC 6265 section 5.2:
  61590. // ...
  61591. // 3. If the remaining unparsed-attributes contains a %x3B (";")
  61592. // character:
  61593. // Consume the characters of the unparsed-attributes up to,
  61594. // not including, the first %x3B (";") character.
  61595. // ...
  61596. stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
  61597. }
  61598. return (document.cookie = key + '=' + value + stringifiedAttributes);
  61599. }
  61600. function get (key, json) {
  61601. if (typeof document === 'undefined') {
  61602. return;
  61603. }
  61604. var jar = {};
  61605. // To prevent the for loop in the first place assign an empty array
  61606. // in case there are no cookies at all.
  61607. var cookies = document.cookie ? document.cookie.split('; ') : [];
  61608. var i = 0;
  61609. for (; i < cookies.length; i++) {
  61610. var parts = cookies[i].split('=');
  61611. var cookie = parts.slice(1).join('=');
  61612. if (!json && cookie.charAt(0) === '"') {
  61613. cookie = cookie.slice(1, -1);
  61614. }
  61615. try {
  61616. var name = decode(parts[0]);
  61617. cookie = (converter.read || converter)(cookie, name) ||
  61618. decode(cookie);
  61619. if (json) {
  61620. try {
  61621. cookie = JSON.parse(cookie);
  61622. } catch (e) {}
  61623. }
  61624. jar[name] = cookie;
  61625. if (key === name) {
  61626. break;
  61627. }
  61628. } catch (e) {}
  61629. }
  61630. return key ? jar[key] : jar;
  61631. }
  61632. api.set = set;
  61633. api.get = function (key) {
  61634. return get(key, false /* read as raw */);
  61635. };
  61636. api.getJSON = function (key) {
  61637. return get(key, true /* read as json */);
  61638. };
  61639. api.remove = function (key, attributes) {
  61640. set(key, '', extend(attributes, {
  61641. expires: -1
  61642. }));
  61643. };
  61644. api.defaults = {};
  61645. api.withConverter = init;
  61646. return api;
  61647. }
  61648. return init(function () {});
  61649. }));
  61650. /***/ }),
  61651. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/JSEncrypt.js":
  61652. /*!******************************************************************!*\
  61653. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/JSEncrypt.js ***!
  61654. \******************************************************************/
  61655. /*! exports provided: JSEncrypt */
  61656. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  61657. "use strict";
  61658. __webpack_require__.r(__webpack_exports__);
  61659. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSEncrypt", function() { return JSEncrypt; });
  61660. /* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/base64.js");
  61661. /* harmony import */ var _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSEncryptRSAKey */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/JSEncryptRSAKey.js");
  61662. /* harmony import */ var _version_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./version.json */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/version.json");
  61663. var _version_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ./version.json */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/version.json", 1);
  61664. /**
  61665. *
  61666. * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour
  61667. * possible parameters are:
  61668. * - default_key_size {number} default: 1024 the key size in bit
  61669. * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
  61670. * - log {boolean} default: false whether log warn/error or not
  61671. * @constructor
  61672. */
  61673. var JSEncrypt = /** @class */ (function () {
  61674. function JSEncrypt(options) {
  61675. if (options === void 0) { options = {}; }
  61676. options = options || {};
  61677. this.default_key_size = options.default_key_size ? parseInt(options.default_key_size, 10) : 1024;
  61678. this.default_public_exponent = options.default_public_exponent || "010001"; // 65537 default openssl public exponent for rsa key type
  61679. this.log = options.log || false;
  61680. // The private and public key.
  61681. this.key = null;
  61682. }
  61683. /**
  61684. * Method to set the rsa key parameter (one method is enough to set both the public
  61685. * and the private key, since the private key contains the public key paramenters)
  61686. * Log a warning if logs are enabled
  61687. * @param {Object|string} key the pem encoded string or an object (with or without header/footer)
  61688. * @public
  61689. */
  61690. JSEncrypt.prototype.setKey = function (key) {
  61691. if (this.log && this.key) {
  61692. console.warn("A key was already set, overriding existing.");
  61693. }
  61694. this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__["JSEncryptRSAKey"](key);
  61695. };
  61696. /**
  61697. * Proxy method for setKey, for api compatibility
  61698. * @see setKey
  61699. * @public
  61700. */
  61701. JSEncrypt.prototype.setPrivateKey = function (privkey) {
  61702. // Create the key.
  61703. this.setKey(privkey);
  61704. };
  61705. /**
  61706. * Proxy method for setKey, for api compatibility
  61707. * @see setKey
  61708. * @public
  61709. */
  61710. JSEncrypt.prototype.setPublicKey = function (pubkey) {
  61711. // Sets the public key.
  61712. this.setKey(pubkey);
  61713. };
  61714. /**
  61715. * Proxy method for RSAKey object's decrypt, decrypt the string using the private
  61716. * components of the rsa key object. Note that if the object was not set will be created
  61717. * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
  61718. * @param {string} str base64 encoded crypted string to decrypt
  61719. * @return {string} the decrypted string
  61720. * @public
  61721. */
  61722. JSEncrypt.prototype.decrypt = function (str) {
  61723. // Return the decrypted string.
  61724. try {
  61725. return this.getKey().decrypt(Object(_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__["b64tohex"])(str));
  61726. }
  61727. catch (ex) {
  61728. return false;
  61729. }
  61730. };
  61731. /**
  61732. * Proxy method for RSAKey object's encrypt, encrypt the string using the public
  61733. * components of the rsa key object. Note that if the object was not set will be created
  61734. * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
  61735. * @param {string} str the string to encrypt
  61736. * @return {string} the encrypted string encoded in base64
  61737. * @public
  61738. */
  61739. JSEncrypt.prototype.encrypt = function (str) {
  61740. // Return the encrypted string.
  61741. try {
  61742. return Object(_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__["hex2b64"])(this.getKey().encrypt(str));
  61743. }
  61744. catch (ex) {
  61745. return false;
  61746. }
  61747. };
  61748. /**
  61749. * Proxy method for RSAKey object's sign.
  61750. * @param {string} str the string to sign
  61751. * @param {function} digestMethod hash method
  61752. * @param {string} digestName the name of the hash algorithm
  61753. * @return {string} the signature encoded in base64
  61754. * @public
  61755. */
  61756. JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {
  61757. // return the RSA signature of 'str' in 'hex' format.
  61758. try {
  61759. return Object(_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__["hex2b64"])(this.getKey().sign(str, digestMethod, digestName));
  61760. }
  61761. catch (ex) {
  61762. return false;
  61763. }
  61764. };
  61765. /**
  61766. * Proxy method for RSAKey object's verify.
  61767. * @param {string} str the string to verify
  61768. * @param {string} signature the signature encoded in base64 to compare the string to
  61769. * @param {function} digestMethod hash method
  61770. * @return {boolean} whether the data and signature match
  61771. * @public
  61772. */
  61773. JSEncrypt.prototype.verify = function (str, signature, digestMethod) {
  61774. // Return the decrypted 'digest' of the signature.
  61775. try {
  61776. return this.getKey().verify(str, Object(_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__["b64tohex"])(signature), digestMethod);
  61777. }
  61778. catch (ex) {
  61779. return false;
  61780. }
  61781. };
  61782. /**
  61783. * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
  61784. * will be created and returned
  61785. * @param {callback} [cb] the callback to be called if we want the key to be generated
  61786. * in an async fashion
  61787. * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
  61788. * @public
  61789. */
  61790. JSEncrypt.prototype.getKey = function (cb) {
  61791. // Only create new if it does not exist.
  61792. if (!this.key) {
  61793. // Get a new private key.
  61794. this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__["JSEncryptRSAKey"]();
  61795. if (cb && {}.toString.call(cb) === "[object Function]") {
  61796. this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);
  61797. return;
  61798. }
  61799. // Generate the key.
  61800. this.key.generate(this.default_key_size, this.default_public_exponent);
  61801. }
  61802. return this.key;
  61803. };
  61804. /**
  61805. * Returns the pem encoded representation of the private key
  61806. * If the key doesn't exists a new key will be created
  61807. * @returns {string} pem encoded representation of the private key WITH header and footer
  61808. * @public
  61809. */
  61810. JSEncrypt.prototype.getPrivateKey = function () {
  61811. // Return the private representation of this key.
  61812. return this.getKey().getPrivateKey();
  61813. };
  61814. /**
  61815. * Returns the pem encoded representation of the private key
  61816. * If the key doesn't exists a new key will be created
  61817. * @returns {string} pem encoded representation of the private key WITHOUT header and footer
  61818. * @public
  61819. */
  61820. JSEncrypt.prototype.getPrivateKeyB64 = function () {
  61821. // Return the private representation of this key.
  61822. return this.getKey().getPrivateBaseKeyB64();
  61823. };
  61824. /**
  61825. * Returns the pem encoded representation of the public key
  61826. * If the key doesn't exists a new key will be created
  61827. * @returns {string} pem encoded representation of the public key WITH header and footer
  61828. * @public
  61829. */
  61830. JSEncrypt.prototype.getPublicKey = function () {
  61831. // Return the private representation of this key.
  61832. return this.getKey().getPublicKey();
  61833. };
  61834. /**
  61835. * Returns the pem encoded representation of the public key
  61836. * If the key doesn't exists a new key will be created
  61837. * @returns {string} pem encoded representation of the public key WITHOUT header and footer
  61838. * @public
  61839. */
  61840. JSEncrypt.prototype.getPublicKeyB64 = function () {
  61841. // Return the private representation of this key.
  61842. return this.getKey().getPublicBaseKeyB64();
  61843. };
  61844. JSEncrypt.version = _version_json__WEBPACK_IMPORTED_MODULE_2__.version;
  61845. return JSEncrypt;
  61846. }());
  61847. /***/ }),
  61848. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/JSEncryptRSAKey.js":
  61849. /*!************************************************************************!*\
  61850. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/JSEncryptRSAKey.js ***!
  61851. \************************************************************************/
  61852. /*! exports provided: JSEncryptRSAKey */
  61853. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  61854. "use strict";
  61855. __webpack_require__.r(__webpack_exports__);
  61856. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSEncryptRSAKey", function() { return JSEncryptRSAKey; });
  61857. /* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/base64.js");
  61858. /* harmony import */ var _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/asn1js/hex */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/hex.js");
  61859. /* harmony import */ var _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/asn1js/base64 */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/base64.js");
  61860. /* harmony import */ var _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/asn1js/asn1 */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/asn1.js");
  61861. /* harmony import */ var _lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/jsbn/rsa */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/rsa.js");
  61862. /* harmony import */ var _lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/jsbn/jsbn */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/jsbn.js");
  61863. /* harmony import */ var _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/jsrsasign/asn1-1.0 */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsrsasign/asn1-1.0.js");
  61864. var __extends = (undefined && undefined.__extends) || (function () {
  61865. var extendStatics = function (d, b) {
  61866. extendStatics = Object.setPrototypeOf ||
  61867. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  61868. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  61869. return extendStatics(d, b);
  61870. };
  61871. return function (d, b) {
  61872. if (typeof b !== "function" && b !== null)
  61873. throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  61874. extendStatics(d, b);
  61875. function __() { this.constructor = d; }
  61876. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  61877. };
  61878. })();
  61879. /**
  61880. * Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.
  61881. * This object is just a decorator for parsing the key parameter
  61882. * @param {string|Object} key - The key in string format, or an object containing
  61883. * the parameters needed to build a RSAKey object.
  61884. * @constructor
  61885. */
  61886. var JSEncryptRSAKey = /** @class */ (function (_super) {
  61887. __extends(JSEncryptRSAKey, _super);
  61888. function JSEncryptRSAKey(key) {
  61889. var _this = _super.call(this) || this;
  61890. // Call the super constructor.
  61891. // RSAKey.call(this);
  61892. // If a key key was provided.
  61893. if (key) {
  61894. // If this is a string...
  61895. if (typeof key === "string") {
  61896. _this.parseKey(key);
  61897. }
  61898. else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||
  61899. JSEncryptRSAKey.hasPublicKeyProperty(key)) {
  61900. // Set the values for the key.
  61901. _this.parsePropertiesFrom(key);
  61902. }
  61903. }
  61904. return _this;
  61905. }
  61906. /**
  61907. * Method to parse a pem encoded string containing both a public or private key.
  61908. * The method will translate the pem encoded string in a der encoded string and
  61909. * will parse private key and public key parameters. This method accepts public key
  61910. * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).
  61911. *
  61912. * @todo Check how many rsa formats use the same format of pkcs #1.
  61913. *
  61914. * The format is defined as:
  61915. * PublicKeyInfo ::= SEQUENCE {
  61916. * algorithm AlgorithmIdentifier,
  61917. * PublicKey BIT STRING
  61918. * }
  61919. * Where AlgorithmIdentifier is:
  61920. * AlgorithmIdentifier ::= SEQUENCE {
  61921. * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
  61922. * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
  61923. * }
  61924. * and PublicKey is a SEQUENCE encapsulated in a BIT STRING
  61925. * RSAPublicKey ::= SEQUENCE {
  61926. * modulus INTEGER, -- n
  61927. * publicExponent INTEGER -- e
  61928. * }
  61929. * it's possible to examine the structure of the keys obtained from openssl using
  61930. * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/
  61931. * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer
  61932. * @private
  61933. */
  61934. JSEncryptRSAKey.prototype.parseKey = function (pem) {
  61935. try {
  61936. var modulus = 0;
  61937. var public_exponent = 0;
  61938. var reHex = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/;
  61939. var der = reHex.test(pem) ? _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__["Hex"].decode(pem) : _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__["Base64"].unarmor(pem);
  61940. var asn1 = _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__["ASN1"].decode(der);
  61941. // Fixes a bug with OpenSSL 1.0+ private keys
  61942. if (asn1.sub.length === 3) {
  61943. asn1 = asn1.sub[2].sub[0];
  61944. }
  61945. if (asn1.sub.length === 9) {
  61946. // Parse the private key.
  61947. modulus = asn1.sub[1].getHexStringValue(); // bigint
  61948. this.n = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(modulus, 16);
  61949. public_exponent = asn1.sub[2].getHexStringValue(); // int
  61950. this.e = parseInt(public_exponent, 16);
  61951. var private_exponent = asn1.sub[3].getHexStringValue(); // bigint
  61952. this.d = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(private_exponent, 16);
  61953. var prime1 = asn1.sub[4].getHexStringValue(); // bigint
  61954. this.p = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(prime1, 16);
  61955. var prime2 = asn1.sub[5].getHexStringValue(); // bigint
  61956. this.q = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(prime2, 16);
  61957. var exponent1 = asn1.sub[6].getHexStringValue(); // bigint
  61958. this.dmp1 = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(exponent1, 16);
  61959. var exponent2 = asn1.sub[7].getHexStringValue(); // bigint
  61960. this.dmq1 = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(exponent2, 16);
  61961. var coefficient = asn1.sub[8].getHexStringValue(); // bigint
  61962. this.coeff = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(coefficient, 16);
  61963. }
  61964. else if (asn1.sub.length === 2) {
  61965. // Parse the public key.
  61966. var bit_string = asn1.sub[1];
  61967. var sequence = bit_string.sub[0];
  61968. modulus = sequence.sub[0].getHexStringValue();
  61969. this.n = Object(_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__["parseBigInt"])(modulus, 16);
  61970. public_exponent = sequence.sub[1].getHexStringValue();
  61971. this.e = parseInt(public_exponent, 16);
  61972. }
  61973. else {
  61974. return false;
  61975. }
  61976. return true;
  61977. }
  61978. catch (ex) {
  61979. return false;
  61980. }
  61981. };
  61982. /**
  61983. * Translate rsa parameters in a hex encoded string representing the rsa key.
  61984. *
  61985. * The translation follow the ASN.1 notation :
  61986. * RSAPrivateKey ::= SEQUENCE {
  61987. * version Version,
  61988. * modulus INTEGER, -- n
  61989. * publicExponent INTEGER, -- e
  61990. * privateExponent INTEGER, -- d
  61991. * prime1 INTEGER, -- p
  61992. * prime2 INTEGER, -- q
  61993. * exponent1 INTEGER, -- d mod (p1)
  61994. * exponent2 INTEGER, -- d mod (q-1)
  61995. * coefficient INTEGER, -- (inverse of q) mod p
  61996. * }
  61997. * @returns {string} DER Encoded String representing the rsa private key
  61998. * @private
  61999. */
  62000. JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {
  62001. var options = {
  62002. array: [
  62003. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ int: 0 }),
  62004. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.n }),
  62005. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ int: this.e }),
  62006. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.d }),
  62007. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.p }),
  62008. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.q }),
  62009. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.dmp1 }),
  62010. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.dmq1 }),
  62011. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.coeff })
  62012. ]
  62013. };
  62014. var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERSequence(options);
  62015. return seq.getEncodedHex();
  62016. };
  62017. /**
  62018. * base64 (pem) encoded version of the DER encoded representation
  62019. * @returns {string} pem encoded representation without header and footer
  62020. * @public
  62021. */
  62022. JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {
  62023. return Object(_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__["hex2b64"])(this.getPrivateBaseKey());
  62024. };
  62025. /**
  62026. * Translate rsa parameters in a hex encoded string representing the rsa public key.
  62027. * The representation follow the ASN.1 notation :
  62028. * PublicKeyInfo ::= SEQUENCE {
  62029. * algorithm AlgorithmIdentifier,
  62030. * PublicKey BIT STRING
  62031. * }
  62032. * Where AlgorithmIdentifier is:
  62033. * AlgorithmIdentifier ::= SEQUENCE {
  62034. * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
  62035. * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
  62036. * }
  62037. * and PublicKey is a SEQUENCE encapsulated in a BIT STRING
  62038. * RSAPublicKey ::= SEQUENCE {
  62039. * modulus INTEGER, -- n
  62040. * publicExponent INTEGER -- e
  62041. * }
  62042. * @returns {string} DER Encoded String representing the rsa public key
  62043. * @private
  62044. */
  62045. JSEncryptRSAKey.prototype.getPublicBaseKey = function () {
  62046. var first_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERSequence({
  62047. array: [
  62048. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
  62049. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERNull()
  62050. ]
  62051. });
  62052. var second_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERSequence({
  62053. array: [
  62054. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ bigint: this.n }),
  62055. new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERInteger({ int: this.e })
  62056. ]
  62057. });
  62058. var bit_string = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERBitString({
  62059. hex: "00" + second_sequence.getEncodedHex()
  62060. });
  62061. var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__["KJUR"].asn1.DERSequence({
  62062. array: [
  62063. first_sequence,
  62064. bit_string
  62065. ]
  62066. });
  62067. return seq.getEncodedHex();
  62068. };
  62069. /**
  62070. * base64 (pem) encoded version of the DER encoded representation
  62071. * @returns {string} pem encoded representation without header and footer
  62072. * @public
  62073. */
  62074. JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {
  62075. return Object(_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__["hex2b64"])(this.getPublicBaseKey());
  62076. };
  62077. /**
  62078. * wrap the string in block of width chars. The default value for rsa keys is 64
  62079. * characters.
  62080. * @param {string} str the pem encoded string without header and footer
  62081. * @param {Number} [width=64] - the length the string has to be wrapped at
  62082. * @returns {string}
  62083. * @private
  62084. */
  62085. JSEncryptRSAKey.wordwrap = function (str, width) {
  62086. width = width || 64;
  62087. if (!str) {
  62088. return str;
  62089. }
  62090. var regex = "(.{1," + width + "})( +|$\n?)|(.{1," + width + "})";
  62091. return str.match(RegExp(regex, "g")).join("\n");
  62092. };
  62093. /**
  62094. * Retrieve the pem encoded private key
  62095. * @returns {string} the pem encoded private key with header/footer
  62096. * @public
  62097. */
  62098. JSEncryptRSAKey.prototype.getPrivateKey = function () {
  62099. var key = "-----BEGIN RSA PRIVATE KEY-----\n";
  62100. key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + "\n";
  62101. key += "-----END RSA PRIVATE KEY-----";
  62102. return key;
  62103. };
  62104. /**
  62105. * Retrieve the pem encoded public key
  62106. * @returns {string} the pem encoded public key with header/footer
  62107. * @public
  62108. */
  62109. JSEncryptRSAKey.prototype.getPublicKey = function () {
  62110. var key = "-----BEGIN PUBLIC KEY-----\n";
  62111. key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\n";
  62112. key += "-----END PUBLIC KEY-----";
  62113. return key;
  62114. };
  62115. /**
  62116. * Check if the object contains the necessary parameters to populate the rsa modulus
  62117. * and public exponent parameters.
  62118. * @param {Object} [obj={}] - An object that may contain the two public key
  62119. * parameters
  62120. * @returns {boolean} true if the object contains both the modulus and the public exponent
  62121. * properties (n and e)
  62122. * @todo check for types of n and e. N should be a parseable bigInt object, E should
  62123. * be a parseable integer number
  62124. * @private
  62125. */
  62126. JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {
  62127. obj = obj || {};
  62128. return (obj.hasOwnProperty("n") &&
  62129. obj.hasOwnProperty("e"));
  62130. };
  62131. /**
  62132. * Check if the object contains ALL the parameters of an RSA key.
  62133. * @param {Object} [obj={}] - An object that may contain nine rsa key
  62134. * parameters
  62135. * @returns {boolean} true if the object contains all the parameters needed
  62136. * @todo check for types of the parameters all the parameters but the public exponent
  62137. * should be parseable bigint objects, the public exponent should be a parseable integer number
  62138. * @private
  62139. */
  62140. JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {
  62141. obj = obj || {};
  62142. return (obj.hasOwnProperty("n") &&
  62143. obj.hasOwnProperty("e") &&
  62144. obj.hasOwnProperty("d") &&
  62145. obj.hasOwnProperty("p") &&
  62146. obj.hasOwnProperty("q") &&
  62147. obj.hasOwnProperty("dmp1") &&
  62148. obj.hasOwnProperty("dmq1") &&
  62149. obj.hasOwnProperty("coeff"));
  62150. };
  62151. /**
  62152. * Parse the properties of obj in the current rsa object. Obj should AT LEAST
  62153. * include the modulus and public exponent (n, e) parameters.
  62154. * @param {Object} obj - the object containing rsa parameters
  62155. * @private
  62156. */
  62157. JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {
  62158. this.n = obj.n;
  62159. this.e = obj.e;
  62160. if (obj.hasOwnProperty("d")) {
  62161. this.d = obj.d;
  62162. this.p = obj.p;
  62163. this.q = obj.q;
  62164. this.dmp1 = obj.dmp1;
  62165. this.dmq1 = obj.dmq1;
  62166. this.coeff = obj.coeff;
  62167. }
  62168. };
  62169. return JSEncryptRSAKey;
  62170. }(_lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__["RSAKey"]));
  62171. /***/ }),
  62172. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/index.js":
  62173. /*!**************************************************************!*\
  62174. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/index.js ***!
  62175. \**************************************************************/
  62176. /*! exports provided: JSEncrypt, default */
  62177. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  62178. "use strict";
  62179. __webpack_require__.r(__webpack_exports__);
  62180. /* harmony import */ var _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./JSEncrypt */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/JSEncrypt.js");
  62181. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JSEncrypt", function() { return _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__["JSEncrypt"]; });
  62182. /* harmony default export */ __webpack_exports__["default"] = (_JSEncrypt__WEBPACK_IMPORTED_MODULE_0__["JSEncrypt"]);
  62183. /***/ }),
  62184. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/asn1.js":
  62185. /*!************************************************************************!*\
  62186. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/asn1.js ***!
  62187. \************************************************************************/
  62188. /*! exports provided: Stream, ASN1, ASN1Tag */
  62189. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  62190. "use strict";
  62191. __webpack_require__.r(__webpack_exports__);
  62192. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Stream", function() { return Stream; });
  62193. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ASN1", function() { return ASN1; });
  62194. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ASN1Tag", function() { return ASN1Tag; });
  62195. /* harmony import */ var _int10__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./int10 */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/int10.js");
  62196. // ASN.1 JavaScript decoder
  62197. // Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it>
  62198. // Permission to use, copy, modify, and/or distribute this software for any
  62199. // purpose with or without fee is hereby granted, provided that the above
  62200. // copyright notice and this permission notice appear in all copies.
  62201. //
  62202. // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  62203. // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  62204. // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  62205. // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  62206. // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  62207. // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  62208. // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  62209. /*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
  62210. /*global oids */
  62211. var ellipsis = "\u2026";
  62212. var reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
  62213. var reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
  62214. function stringCut(str, len) {
  62215. if (str.length > len) {
  62216. str = str.substring(0, len) + ellipsis;
  62217. }
  62218. return str;
  62219. }
  62220. var Stream = /** @class */ (function () {
  62221. function Stream(enc, pos) {
  62222. this.hexDigits = "0123456789ABCDEF";
  62223. if (enc instanceof Stream) {
  62224. this.enc = enc.enc;
  62225. this.pos = enc.pos;
  62226. }
  62227. else {
  62228. // enc should be an array or a binary string
  62229. this.enc = enc;
  62230. this.pos = pos;
  62231. }
  62232. }
  62233. Stream.prototype.get = function (pos) {
  62234. if (pos === undefined) {
  62235. pos = this.pos++;
  62236. }
  62237. if (pos >= this.enc.length) {
  62238. throw new Error("Requesting byte offset " + pos + " on a stream of length " + this.enc.length);
  62239. }
  62240. return ("string" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];
  62241. };
  62242. Stream.prototype.hexByte = function (b) {
  62243. return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);
  62244. };
  62245. Stream.prototype.hexDump = function (start, end, raw) {
  62246. var s = "";
  62247. for (var i = start; i < end; ++i) {
  62248. s += this.hexByte(this.get(i));
  62249. if (raw !== true) {
  62250. switch (i & 0xF) {
  62251. case 0x7:
  62252. s += " ";
  62253. break;
  62254. case 0xF:
  62255. s += "\n";
  62256. break;
  62257. default:
  62258. s += " ";
  62259. }
  62260. }
  62261. }
  62262. return s;
  62263. };
  62264. Stream.prototype.isASCII = function (start, end) {
  62265. for (var i = start; i < end; ++i) {
  62266. var c = this.get(i);
  62267. if (c < 32 || c > 176) {
  62268. return false;
  62269. }
  62270. }
  62271. return true;
  62272. };
  62273. Stream.prototype.parseStringISO = function (start, end) {
  62274. var s = "";
  62275. for (var i = start; i < end; ++i) {
  62276. s += String.fromCharCode(this.get(i));
  62277. }
  62278. return s;
  62279. };
  62280. Stream.prototype.parseStringUTF = function (start, end) {
  62281. var s = "";
  62282. for (var i = start; i < end;) {
  62283. var c = this.get(i++);
  62284. if (c < 128) {
  62285. s += String.fromCharCode(c);
  62286. }
  62287. else if ((c > 191) && (c < 224)) {
  62288. s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));
  62289. }
  62290. else {
  62291. s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));
  62292. }
  62293. }
  62294. return s;
  62295. };
  62296. Stream.prototype.parseStringBMP = function (start, end) {
  62297. var str = "";
  62298. var hi;
  62299. var lo;
  62300. for (var i = start; i < end;) {
  62301. hi = this.get(i++);
  62302. lo = this.get(i++);
  62303. str += String.fromCharCode((hi << 8) | lo);
  62304. }
  62305. return str;
  62306. };
  62307. Stream.prototype.parseTime = function (start, end, shortYear) {
  62308. var s = this.parseStringISO(start, end);
  62309. var m = (shortYear ? reTimeS : reTimeL).exec(s);
  62310. if (!m) {
  62311. return "Unrecognized time: " + s;
  62312. }
  62313. if (shortYear) {
  62314. // to avoid querying the timer, use the fixed range [1970, 2069]
  62315. // it will conform with ITU X.400 [-10, +40] sliding window until 2030
  62316. m[1] = +m[1];
  62317. m[1] += (+m[1] < 70) ? 2000 : 1900;
  62318. }
  62319. s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4];
  62320. if (m[5]) {
  62321. s += ":" + m[5];
  62322. if (m[6]) {
  62323. s += ":" + m[6];
  62324. if (m[7]) {
  62325. s += "." + m[7];
  62326. }
  62327. }
  62328. }
  62329. if (m[8]) {
  62330. s += " UTC";
  62331. if (m[8] != "Z") {
  62332. s += m[8];
  62333. if (m[9]) {
  62334. s += ":" + m[9];
  62335. }
  62336. }
  62337. }
  62338. return s;
  62339. };
  62340. Stream.prototype.parseInteger = function (start, end) {
  62341. var v = this.get(start);
  62342. var neg = (v > 127);
  62343. var pad = neg ? 255 : 0;
  62344. var len;
  62345. var s = "";
  62346. // skip unuseful bits (not allowed in DER)
  62347. while (v == pad && ++start < end) {
  62348. v = this.get(start);
  62349. }
  62350. len = end - start;
  62351. if (len === 0) {
  62352. return neg ? -1 : 0;
  62353. }
  62354. // show bit length of huge integers
  62355. if (len > 4) {
  62356. s = v;
  62357. len <<= 3;
  62358. while (((+s ^ pad) & 0x80) == 0) {
  62359. s = +s << 1;
  62360. --len;
  62361. }
  62362. s = "(" + len + " bit)\n";
  62363. }
  62364. // decode the integer
  62365. if (neg) {
  62366. v = v - 256;
  62367. }
  62368. var n = new _int10__WEBPACK_IMPORTED_MODULE_0__["Int10"](v);
  62369. for (var i = start + 1; i < end; ++i) {
  62370. n.mulAdd(256, this.get(i));
  62371. }
  62372. return s + n.toString();
  62373. };
  62374. Stream.prototype.parseBitString = function (start, end, maxLength) {
  62375. var unusedBit = this.get(start);
  62376. var lenBit = ((end - start - 1) << 3) - unusedBit;
  62377. var intro = "(" + lenBit + " bit)\n";
  62378. var s = "";
  62379. for (var i = start + 1; i < end; ++i) {
  62380. var b = this.get(i);
  62381. var skip = (i == end - 1) ? unusedBit : 0;
  62382. for (var j = 7; j >= skip; --j) {
  62383. s += (b >> j) & 1 ? "1" : "0";
  62384. }
  62385. if (s.length > maxLength) {
  62386. return intro + stringCut(s, maxLength);
  62387. }
  62388. }
  62389. return intro + s;
  62390. };
  62391. Stream.prototype.parseOctetString = function (start, end, maxLength) {
  62392. if (this.isASCII(start, end)) {
  62393. return stringCut(this.parseStringISO(start, end), maxLength);
  62394. }
  62395. var len = end - start;
  62396. var s = "(" + len + " byte)\n";
  62397. maxLength /= 2; // we work in bytes
  62398. if (len > maxLength) {
  62399. end = start + maxLength;
  62400. }
  62401. for (var i = start; i < end; ++i) {
  62402. s += this.hexByte(this.get(i));
  62403. }
  62404. if (len > maxLength) {
  62405. s += ellipsis;
  62406. }
  62407. return s;
  62408. };
  62409. Stream.prototype.parseOID = function (start, end, maxLength) {
  62410. var s = "";
  62411. var n = new _int10__WEBPACK_IMPORTED_MODULE_0__["Int10"]();
  62412. var bits = 0;
  62413. for (var i = start; i < end; ++i) {
  62414. var v = this.get(i);
  62415. n.mulAdd(128, v & 0x7F);
  62416. bits += 7;
  62417. if (!(v & 0x80)) { // finished
  62418. if (s === "") {
  62419. n = n.simplify();
  62420. if (n instanceof _int10__WEBPACK_IMPORTED_MODULE_0__["Int10"]) {
  62421. n.sub(80);
  62422. s = "2." + n.toString();
  62423. }
  62424. else {
  62425. var m = n < 80 ? n < 40 ? 0 : 1 : 2;
  62426. s = m + "." + (n - m * 40);
  62427. }
  62428. }
  62429. else {
  62430. s += "." + n.toString();
  62431. }
  62432. if (s.length > maxLength) {
  62433. return stringCut(s, maxLength);
  62434. }
  62435. n = new _int10__WEBPACK_IMPORTED_MODULE_0__["Int10"]();
  62436. bits = 0;
  62437. }
  62438. }
  62439. if (bits > 0) {
  62440. s += ".incomplete";
  62441. }
  62442. return s;
  62443. };
  62444. return Stream;
  62445. }());
  62446. var ASN1 = /** @class */ (function () {
  62447. function ASN1(stream, header, length, tag, sub) {
  62448. if (!(tag instanceof ASN1Tag)) {
  62449. throw new Error("Invalid tag value.");
  62450. }
  62451. this.stream = stream;
  62452. this.header = header;
  62453. this.length = length;
  62454. this.tag = tag;
  62455. this.sub = sub;
  62456. }
  62457. ASN1.prototype.typeName = function () {
  62458. switch (this.tag.tagClass) {
  62459. case 0: // universal
  62460. switch (this.tag.tagNumber) {
  62461. case 0x00:
  62462. return "EOC";
  62463. case 0x01:
  62464. return "BOOLEAN";
  62465. case 0x02:
  62466. return "INTEGER";
  62467. case 0x03:
  62468. return "BIT_STRING";
  62469. case 0x04:
  62470. return "OCTET_STRING";
  62471. case 0x05:
  62472. return "NULL";
  62473. case 0x06:
  62474. return "OBJECT_IDENTIFIER";
  62475. case 0x07:
  62476. return "ObjectDescriptor";
  62477. case 0x08:
  62478. return "EXTERNAL";
  62479. case 0x09:
  62480. return "REAL";
  62481. case 0x0A:
  62482. return "ENUMERATED";
  62483. case 0x0B:
  62484. return "EMBEDDED_PDV";
  62485. case 0x0C:
  62486. return "UTF8String";
  62487. case 0x10:
  62488. return "SEQUENCE";
  62489. case 0x11:
  62490. return "SET";
  62491. case 0x12:
  62492. return "NumericString";
  62493. case 0x13:
  62494. return "PrintableString"; // ASCII subset
  62495. case 0x14:
  62496. return "TeletexString"; // aka T61String
  62497. case 0x15:
  62498. return "VideotexString";
  62499. case 0x16:
  62500. return "IA5String"; // ASCII
  62501. case 0x17:
  62502. return "UTCTime";
  62503. case 0x18:
  62504. return "GeneralizedTime";
  62505. case 0x19:
  62506. return "GraphicString";
  62507. case 0x1A:
  62508. return "VisibleString"; // ASCII subset
  62509. case 0x1B:
  62510. return "GeneralString";
  62511. case 0x1C:
  62512. return "UniversalString";
  62513. case 0x1E:
  62514. return "BMPString";
  62515. }
  62516. return "Universal_" + this.tag.tagNumber.toString();
  62517. case 1:
  62518. return "Application_" + this.tag.tagNumber.toString();
  62519. case 2:
  62520. return "[" + this.tag.tagNumber.toString() + "]"; // Context
  62521. case 3:
  62522. return "Private_" + this.tag.tagNumber.toString();
  62523. }
  62524. };
  62525. ASN1.prototype.content = function (maxLength) {
  62526. if (this.tag === undefined) {
  62527. return null;
  62528. }
  62529. if (maxLength === undefined) {
  62530. maxLength = Infinity;
  62531. }
  62532. var content = this.posContent();
  62533. var len = Math.abs(this.length);
  62534. if (!this.tag.isUniversal()) {
  62535. if (this.sub !== null) {
  62536. return "(" + this.sub.length + " elem)";
  62537. }
  62538. return this.stream.parseOctetString(content, content + len, maxLength);
  62539. }
  62540. switch (this.tag.tagNumber) {
  62541. case 0x01: // BOOLEAN
  62542. return (this.stream.get(content) === 0) ? "false" : "true";
  62543. case 0x02: // INTEGER
  62544. return this.stream.parseInteger(content, content + len);
  62545. case 0x03: // BIT_STRING
  62546. return this.sub ? "(" + this.sub.length + " elem)" :
  62547. this.stream.parseBitString(content, content + len, maxLength);
  62548. case 0x04: // OCTET_STRING
  62549. return this.sub ? "(" + this.sub.length + " elem)" :
  62550. this.stream.parseOctetString(content, content + len, maxLength);
  62551. // case 0x05: // NULL
  62552. case 0x06: // OBJECT_IDENTIFIER
  62553. return this.stream.parseOID(content, content + len, maxLength);
  62554. // case 0x07: // ObjectDescriptor
  62555. // case 0x08: // EXTERNAL
  62556. // case 0x09: // REAL
  62557. // case 0x0A: // ENUMERATED
  62558. // case 0x0B: // EMBEDDED_PDV
  62559. case 0x10: // SEQUENCE
  62560. case 0x11: // SET
  62561. if (this.sub !== null) {
  62562. return "(" + this.sub.length + " elem)";
  62563. }
  62564. else {
  62565. return "(no elem)";
  62566. }
  62567. case 0x0C: // UTF8String
  62568. return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);
  62569. case 0x12: // NumericString
  62570. case 0x13: // PrintableString
  62571. case 0x14: // TeletexString
  62572. case 0x15: // VideotexString
  62573. case 0x16: // IA5String
  62574. // case 0x19: // GraphicString
  62575. case 0x1A: // VisibleString
  62576. // case 0x1B: // GeneralString
  62577. // case 0x1C: // UniversalString
  62578. return stringCut(this.stream.parseStringISO(content, content + len), maxLength);
  62579. case 0x1E: // BMPString
  62580. return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);
  62581. case 0x17: // UTCTime
  62582. case 0x18: // GeneralizedTime
  62583. return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));
  62584. }
  62585. return null;
  62586. };
  62587. ASN1.prototype.toString = function () {
  62588. return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + ((this.sub === null) ? "null" : this.sub.length) + "]";
  62589. };
  62590. ASN1.prototype.toPrettyString = function (indent) {
  62591. if (indent === undefined) {
  62592. indent = "";
  62593. }
  62594. var s = indent + this.typeName() + " @" + this.stream.pos;
  62595. if (this.length >= 0) {
  62596. s += "+";
  62597. }
  62598. s += this.length;
  62599. if (this.tag.tagConstructed) {
  62600. s += " (constructed)";
  62601. }
  62602. else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {
  62603. s += " (encapsulates)";
  62604. }
  62605. s += "\n";
  62606. if (this.sub !== null) {
  62607. indent += " ";
  62608. for (var i = 0, max = this.sub.length; i < max; ++i) {
  62609. s += this.sub[i].toPrettyString(indent);
  62610. }
  62611. }
  62612. return s;
  62613. };
  62614. ASN1.prototype.posStart = function () {
  62615. return this.stream.pos;
  62616. };
  62617. ASN1.prototype.posContent = function () {
  62618. return this.stream.pos + this.header;
  62619. };
  62620. ASN1.prototype.posEnd = function () {
  62621. return this.stream.pos + this.header + Math.abs(this.length);
  62622. };
  62623. ASN1.prototype.toHexString = function () {
  62624. return this.stream.hexDump(this.posStart(), this.posEnd(), true);
  62625. };
  62626. ASN1.decodeLength = function (stream) {
  62627. var buf = stream.get();
  62628. var len = buf & 0x7F;
  62629. if (len == buf) {
  62630. return len;
  62631. }
  62632. // no reason to use Int10, as it would be a huge buffer anyways
  62633. if (len > 6) {
  62634. throw new Error("Length over 48 bits not supported at position " + (stream.pos - 1));
  62635. }
  62636. if (len === 0) {
  62637. return null;
  62638. } // undefined
  62639. buf = 0;
  62640. for (var i = 0; i < len; ++i) {
  62641. buf = (buf * 256) + stream.get();
  62642. }
  62643. return buf;
  62644. };
  62645. /**
  62646. * Retrieve the hexadecimal value (as a string) of the current ASN.1 element
  62647. * @returns {string}
  62648. * @public
  62649. */
  62650. ASN1.prototype.getHexStringValue = function () {
  62651. var hexString = this.toHexString();
  62652. var offset = this.header * 2;
  62653. var length = this.length * 2;
  62654. return hexString.substr(offset, length);
  62655. };
  62656. ASN1.decode = function (str) {
  62657. var stream;
  62658. if (!(str instanceof Stream)) {
  62659. stream = new Stream(str, 0);
  62660. }
  62661. else {
  62662. stream = str;
  62663. }
  62664. var streamStart = new Stream(stream);
  62665. var tag = new ASN1Tag(stream);
  62666. var len = ASN1.decodeLength(stream);
  62667. var start = stream.pos;
  62668. var header = start - streamStart.pos;
  62669. var sub = null;
  62670. var getSub = function () {
  62671. var ret = [];
  62672. if (len !== null) {
  62673. // definite length
  62674. var end = start + len;
  62675. while (stream.pos < end) {
  62676. ret[ret.length] = ASN1.decode(stream);
  62677. }
  62678. if (stream.pos != end) {
  62679. throw new Error("Content size is not correct for container starting at offset " + start);
  62680. }
  62681. }
  62682. else {
  62683. // undefined length
  62684. try {
  62685. for (;;) {
  62686. var s = ASN1.decode(stream);
  62687. if (s.tag.isEOC()) {
  62688. break;
  62689. }
  62690. ret[ret.length] = s;
  62691. }
  62692. len = start - stream.pos; // undefined lengths are represented as negative values
  62693. }
  62694. catch (e) {
  62695. throw new Error("Exception while decoding undefined length content: " + e);
  62696. }
  62697. }
  62698. return ret;
  62699. };
  62700. if (tag.tagConstructed) {
  62701. // must have valid content
  62702. sub = getSub();
  62703. }
  62704. else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {
  62705. // sometimes BitString and OctetString are used to encapsulate ASN.1
  62706. try {
  62707. if (tag.tagNumber == 0x03) {
  62708. if (stream.get() != 0) {
  62709. throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
  62710. }
  62711. }
  62712. sub = getSub();
  62713. for (var i = 0; i < sub.length; ++i) {
  62714. if (sub[i].tag.isEOC()) {
  62715. throw new Error("EOC is not supposed to be actual content.");
  62716. }
  62717. }
  62718. }
  62719. catch (e) {
  62720. // but silently ignore when they don't
  62721. sub = null;
  62722. }
  62723. }
  62724. if (sub === null) {
  62725. if (len === null) {
  62726. throw new Error("We can't skip over an invalid tag with undefined length at offset " + start);
  62727. }
  62728. stream.pos = start + Math.abs(len);
  62729. }
  62730. return new ASN1(streamStart, header, len, tag, sub);
  62731. };
  62732. return ASN1;
  62733. }());
  62734. var ASN1Tag = /** @class */ (function () {
  62735. function ASN1Tag(stream) {
  62736. var buf = stream.get();
  62737. this.tagClass = buf >> 6;
  62738. this.tagConstructed = ((buf & 0x20) !== 0);
  62739. this.tagNumber = buf & 0x1F;
  62740. if (this.tagNumber == 0x1F) { // long tag
  62741. var n = new _int10__WEBPACK_IMPORTED_MODULE_0__["Int10"]();
  62742. do {
  62743. buf = stream.get();
  62744. n.mulAdd(128, buf & 0x7F);
  62745. } while (buf & 0x80);
  62746. this.tagNumber = n.simplify();
  62747. }
  62748. }
  62749. ASN1Tag.prototype.isUniversal = function () {
  62750. return this.tagClass === 0x00;
  62751. };
  62752. ASN1Tag.prototype.isEOC = function () {
  62753. return this.tagClass === 0x00 && this.tagNumber === 0x00;
  62754. };
  62755. return ASN1Tag;
  62756. }());
  62757. /***/ }),
  62758. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/base64.js":
  62759. /*!**************************************************************************!*\
  62760. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/base64.js ***!
  62761. \**************************************************************************/
  62762. /*! exports provided: Base64 */
  62763. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  62764. "use strict";
  62765. __webpack_require__.r(__webpack_exports__);
  62766. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Base64", function() { return Base64; });
  62767. // Base64 JavaScript decoder
  62768. // Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>
  62769. // Permission to use, copy, modify, and/or distribute this software for any
  62770. // purpose with or without fee is hereby granted, provided that the above
  62771. // copyright notice and this permission notice appear in all copies.
  62772. //
  62773. // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  62774. // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  62775. // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  62776. // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  62777. // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  62778. // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  62779. // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  62780. /*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
  62781. var decoder;
  62782. var Base64 = {
  62783. decode: function (a) {
  62784. var i;
  62785. if (decoder === undefined) {
  62786. var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  62787. var ignore = "= \f\n\r\t\u00A0\u2028\u2029";
  62788. decoder = Object.create(null);
  62789. for (i = 0; i < 64; ++i) {
  62790. decoder[b64.charAt(i)] = i;
  62791. }
  62792. decoder['-'] = 62; //+
  62793. decoder['_'] = 63; //-
  62794. for (i = 0; i < ignore.length; ++i) {
  62795. decoder[ignore.charAt(i)] = -1;
  62796. }
  62797. }
  62798. var out = [];
  62799. var bits = 0;
  62800. var char_count = 0;
  62801. for (i = 0; i < a.length; ++i) {
  62802. var c = a.charAt(i);
  62803. if (c == "=") {
  62804. break;
  62805. }
  62806. c = decoder[c];
  62807. if (c == -1) {
  62808. continue;
  62809. }
  62810. if (c === undefined) {
  62811. throw new Error("Illegal character at offset " + i);
  62812. }
  62813. bits |= c;
  62814. if (++char_count >= 4) {
  62815. out[out.length] = (bits >> 16);
  62816. out[out.length] = (bits >> 8) & 0xFF;
  62817. out[out.length] = bits & 0xFF;
  62818. bits = 0;
  62819. char_count = 0;
  62820. }
  62821. else {
  62822. bits <<= 6;
  62823. }
  62824. }
  62825. switch (char_count) {
  62826. case 1:
  62827. throw new Error("Base64 encoding incomplete: at least 2 bits missing");
  62828. case 2:
  62829. out[out.length] = (bits >> 10);
  62830. break;
  62831. case 3:
  62832. out[out.length] = (bits >> 16);
  62833. out[out.length] = (bits >> 8) & 0xFF;
  62834. break;
  62835. }
  62836. return out;
  62837. },
  62838. re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
  62839. unarmor: function (a) {
  62840. var m = Base64.re.exec(a);
  62841. if (m) {
  62842. if (m[1]) {
  62843. a = m[1];
  62844. }
  62845. else if (m[2]) {
  62846. a = m[2];
  62847. }
  62848. else {
  62849. throw new Error("RegExp out of sync");
  62850. }
  62851. }
  62852. return Base64.decode(a);
  62853. }
  62854. };
  62855. /***/ }),
  62856. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/hex.js":
  62857. /*!***********************************************************************!*\
  62858. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/hex.js ***!
  62859. \***********************************************************************/
  62860. /*! exports provided: Hex */
  62861. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  62862. "use strict";
  62863. __webpack_require__.r(__webpack_exports__);
  62864. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hex", function() { return Hex; });
  62865. // Hex JavaScript decoder
  62866. // Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>
  62867. // Permission to use, copy, modify, and/or distribute this software for any
  62868. // purpose with or without fee is hereby granted, provided that the above
  62869. // copyright notice and this permission notice appear in all copies.
  62870. //
  62871. // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  62872. // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  62873. // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  62874. // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  62875. // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  62876. // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  62877. // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  62878. /*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
  62879. var decoder;
  62880. var Hex = {
  62881. decode: function (a) {
  62882. var i;
  62883. if (decoder === undefined) {
  62884. var hex = "0123456789ABCDEF";
  62885. var ignore = " \f\n\r\t\u00A0\u2028\u2029";
  62886. decoder = {};
  62887. for (i = 0; i < 16; ++i) {
  62888. decoder[hex.charAt(i)] = i;
  62889. }
  62890. hex = hex.toLowerCase();
  62891. for (i = 10; i < 16; ++i) {
  62892. decoder[hex.charAt(i)] = i;
  62893. }
  62894. for (i = 0; i < ignore.length; ++i) {
  62895. decoder[ignore.charAt(i)] = -1;
  62896. }
  62897. }
  62898. var out = [];
  62899. var bits = 0;
  62900. var char_count = 0;
  62901. for (i = 0; i < a.length; ++i) {
  62902. var c = a.charAt(i);
  62903. if (c == "=") {
  62904. break;
  62905. }
  62906. c = decoder[c];
  62907. if (c == -1) {
  62908. continue;
  62909. }
  62910. if (c === undefined) {
  62911. throw new Error("Illegal character at offset " + i);
  62912. }
  62913. bits |= c;
  62914. if (++char_count >= 2) {
  62915. out[out.length] = bits;
  62916. bits = 0;
  62917. char_count = 0;
  62918. }
  62919. else {
  62920. bits <<= 4;
  62921. }
  62922. }
  62923. if (char_count) {
  62924. throw new Error("Hex encoding incomplete: 4 bits missing");
  62925. }
  62926. return out;
  62927. }
  62928. };
  62929. /***/ }),
  62930. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/int10.js":
  62931. /*!*************************************************************************!*\
  62932. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/asn1js/int10.js ***!
  62933. \*************************************************************************/
  62934. /*! exports provided: Int10 */
  62935. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  62936. "use strict";
  62937. __webpack_require__.r(__webpack_exports__);
  62938. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Int10", function() { return Int10; });
  62939. // Big integer base-10 printing library
  62940. // Copyright (c) 2014 Lapo Luchini <lapo@lapo.it>
  62941. // Permission to use, copy, modify, and/or distribute this software for any
  62942. // purpose with or without fee is hereby granted, provided that the above
  62943. // copyright notice and this permission notice appear in all copies.
  62944. //
  62945. // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  62946. // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  62947. // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  62948. // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  62949. // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  62950. // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  62951. // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  62952. /*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
  62953. var max = 10000000000000; // biggest integer that can still fit 2^53 when multiplied by 256
  62954. var Int10 = /** @class */ (function () {
  62955. function Int10(value) {
  62956. this.buf = [+value || 0];
  62957. }
  62958. Int10.prototype.mulAdd = function (m, c) {
  62959. // assert(m <= 256)
  62960. var b = this.buf;
  62961. var l = b.length;
  62962. var i;
  62963. var t;
  62964. for (i = 0; i < l; ++i) {
  62965. t = b[i] * m + c;
  62966. if (t < max) {
  62967. c = 0;
  62968. }
  62969. else {
  62970. c = 0 | (t / max);
  62971. t -= c * max;
  62972. }
  62973. b[i] = t;
  62974. }
  62975. if (c > 0) {
  62976. b[i] = c;
  62977. }
  62978. };
  62979. Int10.prototype.sub = function (c) {
  62980. // assert(m <= 256)
  62981. var b = this.buf;
  62982. var l = b.length;
  62983. var i;
  62984. var t;
  62985. for (i = 0; i < l; ++i) {
  62986. t = b[i] - c;
  62987. if (t < 0) {
  62988. t += max;
  62989. c = 1;
  62990. }
  62991. else {
  62992. c = 0;
  62993. }
  62994. b[i] = t;
  62995. }
  62996. while (b[b.length - 1] === 0) {
  62997. b.pop();
  62998. }
  62999. };
  63000. Int10.prototype.toString = function (base) {
  63001. if ((base || 10) != 10) {
  63002. throw new Error("only base 10 is supported");
  63003. }
  63004. var b = this.buf;
  63005. var s = b[b.length - 1].toString();
  63006. for (var i = b.length - 2; i >= 0; --i) {
  63007. s += (max + b[i]).toString().substring(1);
  63008. }
  63009. return s;
  63010. };
  63011. Int10.prototype.valueOf = function () {
  63012. var b = this.buf;
  63013. var v = 0;
  63014. for (var i = b.length - 1; i >= 0; --i) {
  63015. v = v * max + b[i];
  63016. }
  63017. return v;
  63018. };
  63019. Int10.prototype.simplify = function () {
  63020. var b = this.buf;
  63021. return (b.length == 1) ? b[0] : this;
  63022. };
  63023. return Int10;
  63024. }());
  63025. /***/ }),
  63026. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/base64.js":
  63027. /*!************************************************************************!*\
  63028. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/base64.js ***!
  63029. \************************************************************************/
  63030. /*! exports provided: hex2b64, b64tohex, b64toBA */
  63031. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  63032. "use strict";
  63033. __webpack_require__.r(__webpack_exports__);
  63034. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hex2b64", function() { return hex2b64; });
  63035. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b64tohex", function() { return b64tohex; });
  63036. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b64toBA", function() { return b64toBA; });
  63037. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/util.js");
  63038. var b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  63039. var b64pad = "=";
  63040. function hex2b64(h) {
  63041. var i;
  63042. var c;
  63043. var ret = "";
  63044. for (i = 0; i + 3 <= h.length; i += 3) {
  63045. c = parseInt(h.substring(i, i + 3), 16);
  63046. ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);
  63047. }
  63048. if (i + 1 == h.length) {
  63049. c = parseInt(h.substring(i, i + 1), 16);
  63050. ret += b64map.charAt(c << 2);
  63051. }
  63052. else if (i + 2 == h.length) {
  63053. c = parseInt(h.substring(i, i + 2), 16);
  63054. ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);
  63055. }
  63056. while ((ret.length & 3) > 0) {
  63057. ret += b64pad;
  63058. }
  63059. return ret;
  63060. }
  63061. // convert a base64 string to hex
  63062. function b64tohex(s) {
  63063. var ret = "";
  63064. var i;
  63065. var k = 0; // b64 state, 0-3
  63066. var slop = 0;
  63067. for (i = 0; i < s.length; ++i) {
  63068. if (s.charAt(i) == b64pad) {
  63069. break;
  63070. }
  63071. var v = b64map.indexOf(s.charAt(i));
  63072. if (v < 0) {
  63073. continue;
  63074. }
  63075. if (k == 0) {
  63076. ret += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])(v >> 2);
  63077. slop = v & 3;
  63078. k = 1;
  63079. }
  63080. else if (k == 1) {
  63081. ret += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])((slop << 2) | (v >> 4));
  63082. slop = v & 0xf;
  63083. k = 2;
  63084. }
  63085. else if (k == 2) {
  63086. ret += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])(slop);
  63087. ret += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])(v >> 2);
  63088. slop = v & 3;
  63089. k = 3;
  63090. }
  63091. else {
  63092. ret += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])((slop << 2) | (v >> 4));
  63093. ret += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])(v & 0xf);
  63094. k = 0;
  63095. }
  63096. }
  63097. if (k == 1) {
  63098. ret += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])(slop << 2);
  63099. }
  63100. return ret;
  63101. }
  63102. // convert a base64 string to a byte/number array
  63103. function b64toBA(s) {
  63104. // piggyback on b64tohex for now, optimize later
  63105. var h = b64tohex(s);
  63106. var i;
  63107. var a = [];
  63108. for (i = 0; 2 * i < h.length; ++i) {
  63109. a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);
  63110. }
  63111. return a;
  63112. }
  63113. /***/ }),
  63114. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/jsbn.js":
  63115. /*!**********************************************************************!*\
  63116. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/jsbn.js ***!
  63117. \**********************************************************************/
  63118. /*! exports provided: BigInteger, nbi, parseBigInt, intAt, nbv, nbits */
  63119. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  63120. "use strict";
  63121. __webpack_require__.r(__webpack_exports__);
  63122. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BigInteger", function() { return BigInteger; });
  63123. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nbi", function() { return nbi; });
  63124. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseBigInt", function() { return parseBigInt; });
  63125. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "intAt", function() { return intAt; });
  63126. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nbv", function() { return nbv; });
  63127. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nbits", function() { return nbits; });
  63128. /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/util.js");
  63129. // Copyright (c) 2005 Tom Wu
  63130. // All Rights Reserved.
  63131. // See "LICENSE" for details.
  63132. // Basic JavaScript BN library - subset useful for RSA encryption.
  63133. // Bits per digit
  63134. var dbits;
  63135. // JavaScript engine analysis
  63136. var canary = 0xdeadbeefcafe;
  63137. var j_lm = ((canary & 0xffffff) == 0xefcafe);
  63138. //#region
  63139. var lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];
  63140. var lplim = (1 << 26) / lowprimes[lowprimes.length - 1];
  63141. //#endregion
  63142. // (public) Constructor
  63143. var BigInteger = /** @class */ (function () {
  63144. function BigInteger(a, b, c) {
  63145. if (a != null) {
  63146. if ("number" == typeof a) {
  63147. this.fromNumber(a, b, c);
  63148. }
  63149. else if (b == null && "string" != typeof a) {
  63150. this.fromString(a, 256);
  63151. }
  63152. else {
  63153. this.fromString(a, b);
  63154. }
  63155. }
  63156. }
  63157. //#region PUBLIC
  63158. // BigInteger.prototype.toString = bnToString;
  63159. // (public) return string representation in given radix
  63160. BigInteger.prototype.toString = function (b) {
  63161. if (this.s < 0) {
  63162. return "-" + this.negate().toString(b);
  63163. }
  63164. var k;
  63165. if (b == 16) {
  63166. k = 4;
  63167. }
  63168. else if (b == 8) {
  63169. k = 3;
  63170. }
  63171. else if (b == 2) {
  63172. k = 1;
  63173. }
  63174. else if (b == 32) {
  63175. k = 5;
  63176. }
  63177. else if (b == 4) {
  63178. k = 2;
  63179. }
  63180. else {
  63181. return this.toRadix(b);
  63182. }
  63183. var km = (1 << k) - 1;
  63184. var d;
  63185. var m = false;
  63186. var r = "";
  63187. var i = this.t;
  63188. var p = this.DB - (i * this.DB) % k;
  63189. if (i-- > 0) {
  63190. if (p < this.DB && (d = this[i] >> p) > 0) {
  63191. m = true;
  63192. r = Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])(d);
  63193. }
  63194. while (i >= 0) {
  63195. if (p < k) {
  63196. d = (this[i] & ((1 << p) - 1)) << (k - p);
  63197. d |= this[--i] >> (p += this.DB - k);
  63198. }
  63199. else {
  63200. d = (this[i] >> (p -= k)) & km;
  63201. if (p <= 0) {
  63202. p += this.DB;
  63203. --i;
  63204. }
  63205. }
  63206. if (d > 0) {
  63207. m = true;
  63208. }
  63209. if (m) {
  63210. r += Object(_util__WEBPACK_IMPORTED_MODULE_0__["int2char"])(d);
  63211. }
  63212. }
  63213. }
  63214. return m ? r : "0";
  63215. };
  63216. // BigInteger.prototype.negate = bnNegate;
  63217. // (public) -this
  63218. BigInteger.prototype.negate = function () {
  63219. var r = nbi();
  63220. BigInteger.ZERO.subTo(this, r);
  63221. return r;
  63222. };
  63223. // BigInteger.prototype.abs = bnAbs;
  63224. // (public) |this|
  63225. BigInteger.prototype.abs = function () {
  63226. return (this.s < 0) ? this.negate() : this;
  63227. };
  63228. // BigInteger.prototype.compareTo = bnCompareTo;
  63229. // (public) return + if this > a, - if this < a, 0 if equal
  63230. BigInteger.prototype.compareTo = function (a) {
  63231. var r = this.s - a.s;
  63232. if (r != 0) {
  63233. return r;
  63234. }
  63235. var i = this.t;
  63236. r = i - a.t;
  63237. if (r != 0) {
  63238. return (this.s < 0) ? -r : r;
  63239. }
  63240. while (--i >= 0) {
  63241. if ((r = this[i] - a[i]) != 0) {
  63242. return r;
  63243. }
  63244. }
  63245. return 0;
  63246. };
  63247. // BigInteger.prototype.bitLength = bnBitLength;
  63248. // (public) return the number of bits in "this"
  63249. BigInteger.prototype.bitLength = function () {
  63250. if (this.t <= 0) {
  63251. return 0;
  63252. }
  63253. return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));
  63254. };
  63255. // BigInteger.prototype.mod = bnMod;
  63256. // (public) this mod a
  63257. BigInteger.prototype.mod = function (a) {
  63258. var r = nbi();
  63259. this.abs().divRemTo(a, null, r);
  63260. if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {
  63261. a.subTo(r, r);
  63262. }
  63263. return r;
  63264. };
  63265. // BigInteger.prototype.modPowInt = bnModPowInt;
  63266. // (public) this^e % m, 0 <= e < 2^32
  63267. BigInteger.prototype.modPowInt = function (e, m) {
  63268. var z;
  63269. if (e < 256 || m.isEven()) {
  63270. z = new Classic(m);
  63271. }
  63272. else {
  63273. z = new Montgomery(m);
  63274. }
  63275. return this.exp(e, z);
  63276. };
  63277. // BigInteger.prototype.clone = bnClone;
  63278. // (public)
  63279. BigInteger.prototype.clone = function () {
  63280. var r = nbi();
  63281. this.copyTo(r);
  63282. return r;
  63283. };
  63284. // BigInteger.prototype.intValue = bnIntValue;
  63285. // (public) return value as integer
  63286. BigInteger.prototype.intValue = function () {
  63287. if (this.s < 0) {
  63288. if (this.t == 1) {
  63289. return this[0] - this.DV;
  63290. }
  63291. else if (this.t == 0) {
  63292. return -1;
  63293. }
  63294. }
  63295. else if (this.t == 1) {
  63296. return this[0];
  63297. }
  63298. else if (this.t == 0) {
  63299. return 0;
  63300. }
  63301. // assumes 16 < DB < 32
  63302. return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];
  63303. };
  63304. // BigInteger.prototype.byteValue = bnByteValue;
  63305. // (public) return value as byte
  63306. BigInteger.prototype.byteValue = function () {
  63307. return (this.t == 0) ? this.s : (this[0] << 24) >> 24;
  63308. };
  63309. // BigInteger.prototype.shortValue = bnShortValue;
  63310. // (public) return value as short (assumes DB>=16)
  63311. BigInteger.prototype.shortValue = function () {
  63312. return (this.t == 0) ? this.s : (this[0] << 16) >> 16;
  63313. };
  63314. // BigInteger.prototype.signum = bnSigNum;
  63315. // (public) 0 if this == 0, 1 if this > 0
  63316. BigInteger.prototype.signum = function () {
  63317. if (this.s < 0) {
  63318. return -1;
  63319. }
  63320. else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) {
  63321. return 0;
  63322. }
  63323. else {
  63324. return 1;
  63325. }
  63326. };
  63327. // BigInteger.prototype.toByteArray = bnToByteArray;
  63328. // (public) convert to bigendian byte array
  63329. BigInteger.prototype.toByteArray = function () {
  63330. var i = this.t;
  63331. var r = [];
  63332. r[0] = this.s;
  63333. var p = this.DB - (i * this.DB) % 8;
  63334. var d;
  63335. var k = 0;
  63336. if (i-- > 0) {
  63337. if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) {
  63338. r[k++] = d | (this.s << (this.DB - p));
  63339. }
  63340. while (i >= 0) {
  63341. if (p < 8) {
  63342. d = (this[i] & ((1 << p) - 1)) << (8 - p);
  63343. d |= this[--i] >> (p += this.DB - 8);
  63344. }
  63345. else {
  63346. d = (this[i] >> (p -= 8)) & 0xff;
  63347. if (p <= 0) {
  63348. p += this.DB;
  63349. --i;
  63350. }
  63351. }
  63352. if ((d & 0x80) != 0) {
  63353. d |= -256;
  63354. }
  63355. if (k == 0 && (this.s & 0x80) != (d & 0x80)) {
  63356. ++k;
  63357. }
  63358. if (k > 0 || d != this.s) {
  63359. r[k++] = d;
  63360. }
  63361. }
  63362. }
  63363. return r;
  63364. };
  63365. // BigInteger.prototype.equals = bnEquals;
  63366. BigInteger.prototype.equals = function (a) {
  63367. return (this.compareTo(a) == 0);
  63368. };
  63369. // BigInteger.prototype.min = bnMin;
  63370. BigInteger.prototype.min = function (a) {
  63371. return (this.compareTo(a) < 0) ? this : a;
  63372. };
  63373. // BigInteger.prototype.max = bnMax;
  63374. BigInteger.prototype.max = function (a) {
  63375. return (this.compareTo(a) > 0) ? this : a;
  63376. };
  63377. // BigInteger.prototype.and = bnAnd;
  63378. BigInteger.prototype.and = function (a) {
  63379. var r = nbi();
  63380. this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__["op_and"], r);
  63381. return r;
  63382. };
  63383. // BigInteger.prototype.or = bnOr;
  63384. BigInteger.prototype.or = function (a) {
  63385. var r = nbi();
  63386. this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__["op_or"], r);
  63387. return r;
  63388. };
  63389. // BigInteger.prototype.xor = bnXor;
  63390. BigInteger.prototype.xor = function (a) {
  63391. var r = nbi();
  63392. this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__["op_xor"], r);
  63393. return r;
  63394. };
  63395. // BigInteger.prototype.andNot = bnAndNot;
  63396. BigInteger.prototype.andNot = function (a) {
  63397. var r = nbi();
  63398. this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__["op_andnot"], r);
  63399. return r;
  63400. };
  63401. // BigInteger.prototype.not = bnNot;
  63402. // (public) ~this
  63403. BigInteger.prototype.not = function () {
  63404. var r = nbi();
  63405. for (var i = 0; i < this.t; ++i) {
  63406. r[i] = this.DM & ~this[i];
  63407. }
  63408. r.t = this.t;
  63409. r.s = ~this.s;
  63410. return r;
  63411. };
  63412. // BigInteger.prototype.shiftLeft = bnShiftLeft;
  63413. // (public) this << n
  63414. BigInteger.prototype.shiftLeft = function (n) {
  63415. var r = nbi();
  63416. if (n < 0) {
  63417. this.rShiftTo(-n, r);
  63418. }
  63419. else {
  63420. this.lShiftTo(n, r);
  63421. }
  63422. return r;
  63423. };
  63424. // BigInteger.prototype.shiftRight = bnShiftRight;
  63425. // (public) this >> n
  63426. BigInteger.prototype.shiftRight = function (n) {
  63427. var r = nbi();
  63428. if (n < 0) {
  63429. this.lShiftTo(-n, r);
  63430. }
  63431. else {
  63432. this.rShiftTo(n, r);
  63433. }
  63434. return r;
  63435. };
  63436. // BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
  63437. // (public) returns index of lowest 1-bit (or -1 if none)
  63438. BigInteger.prototype.getLowestSetBit = function () {
  63439. for (var i = 0; i < this.t; ++i) {
  63440. if (this[i] != 0) {
  63441. return i * this.DB + Object(_util__WEBPACK_IMPORTED_MODULE_0__["lbit"])(this[i]);
  63442. }
  63443. }
  63444. if (this.s < 0) {
  63445. return this.t * this.DB;
  63446. }
  63447. return -1;
  63448. };
  63449. // BigInteger.prototype.bitCount = bnBitCount;
  63450. // (public) return number of set bits
  63451. BigInteger.prototype.bitCount = function () {
  63452. var r = 0;
  63453. var x = this.s & this.DM;
  63454. for (var i = 0; i < this.t; ++i) {
  63455. r += Object(_util__WEBPACK_IMPORTED_MODULE_0__["cbit"])(this[i] ^ x);
  63456. }
  63457. return r;
  63458. };
  63459. // BigInteger.prototype.testBit = bnTestBit;
  63460. // (public) true iff nth bit is set
  63461. BigInteger.prototype.testBit = function (n) {
  63462. var j = Math.floor(n / this.DB);
  63463. if (j >= this.t) {
  63464. return (this.s != 0);
  63465. }
  63466. return ((this[j] & (1 << (n % this.DB))) != 0);
  63467. };
  63468. // BigInteger.prototype.setBit = bnSetBit;
  63469. // (public) this | (1<<n)
  63470. BigInteger.prototype.setBit = function (n) {
  63471. return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__["op_or"]);
  63472. };
  63473. // BigInteger.prototype.clearBit = bnClearBit;
  63474. // (public) this & ~(1<<n)
  63475. BigInteger.prototype.clearBit = function (n) {
  63476. return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__["op_andnot"]);
  63477. };
  63478. // BigInteger.prototype.flipBit = bnFlipBit;
  63479. // (public) this ^ (1<<n)
  63480. BigInteger.prototype.flipBit = function (n) {
  63481. return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__["op_xor"]);
  63482. };
  63483. // BigInteger.prototype.add = bnAdd;
  63484. // (public) this + a
  63485. BigInteger.prototype.add = function (a) {
  63486. var r = nbi();
  63487. this.addTo(a, r);
  63488. return r;
  63489. };
  63490. // BigInteger.prototype.subtract = bnSubtract;
  63491. // (public) this - a
  63492. BigInteger.prototype.subtract = function (a) {
  63493. var r = nbi();
  63494. this.subTo(a, r);
  63495. return r;
  63496. };
  63497. // BigInteger.prototype.multiply = bnMultiply;
  63498. // (public) this * a
  63499. BigInteger.prototype.multiply = function (a) {
  63500. var r = nbi();
  63501. this.multiplyTo(a, r);
  63502. return r;
  63503. };
  63504. // BigInteger.prototype.divide = bnDivide;
  63505. // (public) this / a
  63506. BigInteger.prototype.divide = function (a) {
  63507. var r = nbi();
  63508. this.divRemTo(a, r, null);
  63509. return r;
  63510. };
  63511. // BigInteger.prototype.remainder = bnRemainder;
  63512. // (public) this % a
  63513. BigInteger.prototype.remainder = function (a) {
  63514. var r = nbi();
  63515. this.divRemTo(a, null, r);
  63516. return r;
  63517. };
  63518. // BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
  63519. // (public) [this/a,this%a]
  63520. BigInteger.prototype.divideAndRemainder = function (a) {
  63521. var q = nbi();
  63522. var r = nbi();
  63523. this.divRemTo(a, q, r);
  63524. return [q, r];
  63525. };
  63526. // BigInteger.prototype.modPow = bnModPow;
  63527. // (public) this^e % m (HAC 14.85)
  63528. BigInteger.prototype.modPow = function (e, m) {
  63529. var i = e.bitLength();
  63530. var k;
  63531. var r = nbv(1);
  63532. var z;
  63533. if (i <= 0) {
  63534. return r;
  63535. }
  63536. else if (i < 18) {
  63537. k = 1;
  63538. }
  63539. else if (i < 48) {
  63540. k = 3;
  63541. }
  63542. else if (i < 144) {
  63543. k = 4;
  63544. }
  63545. else if (i < 768) {
  63546. k = 5;
  63547. }
  63548. else {
  63549. k = 6;
  63550. }
  63551. if (i < 8) {
  63552. z = new Classic(m);
  63553. }
  63554. else if (m.isEven()) {
  63555. z = new Barrett(m);
  63556. }
  63557. else {
  63558. z = new Montgomery(m);
  63559. }
  63560. // precomputation
  63561. var g = [];
  63562. var n = 3;
  63563. var k1 = k - 1;
  63564. var km = (1 << k) - 1;
  63565. g[1] = z.convert(this);
  63566. if (k > 1) {
  63567. var g2 = nbi();
  63568. z.sqrTo(g[1], g2);
  63569. while (n <= km) {
  63570. g[n] = nbi();
  63571. z.mulTo(g2, g[n - 2], g[n]);
  63572. n += 2;
  63573. }
  63574. }
  63575. var j = e.t - 1;
  63576. var w;
  63577. var is1 = true;
  63578. var r2 = nbi();
  63579. var t;
  63580. i = nbits(e[j]) - 1;
  63581. while (j >= 0) {
  63582. if (i >= k1) {
  63583. w = (e[j] >> (i - k1)) & km;
  63584. }
  63585. else {
  63586. w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);
  63587. if (j > 0) {
  63588. w |= e[j - 1] >> (this.DB + i - k1);
  63589. }
  63590. }
  63591. n = k;
  63592. while ((w & 1) == 0) {
  63593. w >>= 1;
  63594. --n;
  63595. }
  63596. if ((i -= n) < 0) {
  63597. i += this.DB;
  63598. --j;
  63599. }
  63600. if (is1) { // ret == 1, don't bother squaring or multiplying it
  63601. g[w].copyTo(r);
  63602. is1 = false;
  63603. }
  63604. else {
  63605. while (n > 1) {
  63606. z.sqrTo(r, r2);
  63607. z.sqrTo(r2, r);
  63608. n -= 2;
  63609. }
  63610. if (n > 0) {
  63611. z.sqrTo(r, r2);
  63612. }
  63613. else {
  63614. t = r;
  63615. r = r2;
  63616. r2 = t;
  63617. }
  63618. z.mulTo(r2, g[w], r);
  63619. }
  63620. while (j >= 0 && (e[j] & (1 << i)) == 0) {
  63621. z.sqrTo(r, r2);
  63622. t = r;
  63623. r = r2;
  63624. r2 = t;
  63625. if (--i < 0) {
  63626. i = this.DB - 1;
  63627. --j;
  63628. }
  63629. }
  63630. }
  63631. return z.revert(r);
  63632. };
  63633. // BigInteger.prototype.modInverse = bnModInverse;
  63634. // (public) 1/this % m (HAC 14.61)
  63635. BigInteger.prototype.modInverse = function (m) {
  63636. var ac = m.isEven();
  63637. if ((this.isEven() && ac) || m.signum() == 0) {
  63638. return BigInteger.ZERO;
  63639. }
  63640. var u = m.clone();
  63641. var v = this.clone();
  63642. var a = nbv(1);
  63643. var b = nbv(0);
  63644. var c = nbv(0);
  63645. var d = nbv(1);
  63646. while (u.signum() != 0) {
  63647. while (u.isEven()) {
  63648. u.rShiftTo(1, u);
  63649. if (ac) {
  63650. if (!a.isEven() || !b.isEven()) {
  63651. a.addTo(this, a);
  63652. b.subTo(m, b);
  63653. }
  63654. a.rShiftTo(1, a);
  63655. }
  63656. else if (!b.isEven()) {
  63657. b.subTo(m, b);
  63658. }
  63659. b.rShiftTo(1, b);
  63660. }
  63661. while (v.isEven()) {
  63662. v.rShiftTo(1, v);
  63663. if (ac) {
  63664. if (!c.isEven() || !d.isEven()) {
  63665. c.addTo(this, c);
  63666. d.subTo(m, d);
  63667. }
  63668. c.rShiftTo(1, c);
  63669. }
  63670. else if (!d.isEven()) {
  63671. d.subTo(m, d);
  63672. }
  63673. d.rShiftTo(1, d);
  63674. }
  63675. if (u.compareTo(v) >= 0) {
  63676. u.subTo(v, u);
  63677. if (ac) {
  63678. a.subTo(c, a);
  63679. }
  63680. b.subTo(d, b);
  63681. }
  63682. else {
  63683. v.subTo(u, v);
  63684. if (ac) {
  63685. c.subTo(a, c);
  63686. }
  63687. d.subTo(b, d);
  63688. }
  63689. }
  63690. if (v.compareTo(BigInteger.ONE) != 0) {
  63691. return BigInteger.ZERO;
  63692. }
  63693. if (d.compareTo(m) >= 0) {
  63694. return d.subtract(m);
  63695. }
  63696. if (d.signum() < 0) {
  63697. d.addTo(m, d);
  63698. }
  63699. else {
  63700. return d;
  63701. }
  63702. if (d.signum() < 0) {
  63703. return d.add(m);
  63704. }
  63705. else {
  63706. return d;
  63707. }
  63708. };
  63709. // BigInteger.prototype.pow = bnPow;
  63710. // (public) this^e
  63711. BigInteger.prototype.pow = function (e) {
  63712. return this.exp(e, new NullExp());
  63713. };
  63714. // BigInteger.prototype.gcd = bnGCD;
  63715. // (public) gcd(this,a) (HAC 14.54)
  63716. BigInteger.prototype.gcd = function (a) {
  63717. var x = (this.s < 0) ? this.negate() : this.clone();
  63718. var y = (a.s < 0) ? a.negate() : a.clone();
  63719. if (x.compareTo(y) < 0) {
  63720. var t = x;
  63721. x = y;
  63722. y = t;
  63723. }
  63724. var i = x.getLowestSetBit();
  63725. var g = y.getLowestSetBit();
  63726. if (g < 0) {
  63727. return x;
  63728. }
  63729. if (i < g) {
  63730. g = i;
  63731. }
  63732. if (g > 0) {
  63733. x.rShiftTo(g, x);
  63734. y.rShiftTo(g, y);
  63735. }
  63736. while (x.signum() > 0) {
  63737. if ((i = x.getLowestSetBit()) > 0) {
  63738. x.rShiftTo(i, x);
  63739. }
  63740. if ((i = y.getLowestSetBit()) > 0) {
  63741. y.rShiftTo(i, y);
  63742. }
  63743. if (x.compareTo(y) >= 0) {
  63744. x.subTo(y, x);
  63745. x.rShiftTo(1, x);
  63746. }
  63747. else {
  63748. y.subTo(x, y);
  63749. y.rShiftTo(1, y);
  63750. }
  63751. }
  63752. if (g > 0) {
  63753. y.lShiftTo(g, y);
  63754. }
  63755. return y;
  63756. };
  63757. // BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
  63758. // (public) test primality with certainty >= 1-.5^t
  63759. BigInteger.prototype.isProbablePrime = function (t) {
  63760. var i;
  63761. var x = this.abs();
  63762. if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {
  63763. for (i = 0; i < lowprimes.length; ++i) {
  63764. if (x[0] == lowprimes[i]) {
  63765. return true;
  63766. }
  63767. }
  63768. return false;
  63769. }
  63770. if (x.isEven()) {
  63771. return false;
  63772. }
  63773. i = 1;
  63774. while (i < lowprimes.length) {
  63775. var m = lowprimes[i];
  63776. var j = i + 1;
  63777. while (j < lowprimes.length && m < lplim) {
  63778. m *= lowprimes[j++];
  63779. }
  63780. m = x.modInt(m);
  63781. while (i < j) {
  63782. if (m % lowprimes[i++] == 0) {
  63783. return false;
  63784. }
  63785. }
  63786. }
  63787. return x.millerRabin(t);
  63788. };
  63789. //#endregion PUBLIC
  63790. //#region PROTECTED
  63791. // BigInteger.prototype.copyTo = bnpCopyTo;
  63792. // (protected) copy this to r
  63793. BigInteger.prototype.copyTo = function (r) {
  63794. for (var i = this.t - 1; i >= 0; --i) {
  63795. r[i] = this[i];
  63796. }
  63797. r.t = this.t;
  63798. r.s = this.s;
  63799. };
  63800. // BigInteger.prototype.fromInt = bnpFromInt;
  63801. // (protected) set from integer value x, -DV <= x < DV
  63802. BigInteger.prototype.fromInt = function (x) {
  63803. this.t = 1;
  63804. this.s = (x < 0) ? -1 : 0;
  63805. if (x > 0) {
  63806. this[0] = x;
  63807. }
  63808. else if (x < -1) {
  63809. this[0] = x + this.DV;
  63810. }
  63811. else {
  63812. this.t = 0;
  63813. }
  63814. };
  63815. // BigInteger.prototype.fromString = bnpFromString;
  63816. // (protected) set from string and radix
  63817. BigInteger.prototype.fromString = function (s, b) {
  63818. var k;
  63819. if (b == 16) {
  63820. k = 4;
  63821. }
  63822. else if (b == 8) {
  63823. k = 3;
  63824. }
  63825. else if (b == 256) {
  63826. k = 8;
  63827. /* byte array */
  63828. }
  63829. else if (b == 2) {
  63830. k = 1;
  63831. }
  63832. else if (b == 32) {
  63833. k = 5;
  63834. }
  63835. else if (b == 4) {
  63836. k = 2;
  63837. }
  63838. else {
  63839. this.fromRadix(s, b);
  63840. return;
  63841. }
  63842. this.t = 0;
  63843. this.s = 0;
  63844. var i = s.length;
  63845. var mi = false;
  63846. var sh = 0;
  63847. while (--i >= 0) {
  63848. var x = (k == 8) ? (+s[i]) & 0xff : intAt(s, i);
  63849. if (x < 0) {
  63850. if (s.charAt(i) == "-") {
  63851. mi = true;
  63852. }
  63853. continue;
  63854. }
  63855. mi = false;
  63856. if (sh == 0) {
  63857. this[this.t++] = x;
  63858. }
  63859. else if (sh + k > this.DB) {
  63860. this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;
  63861. this[this.t++] = (x >> (this.DB - sh));
  63862. }
  63863. else {
  63864. this[this.t - 1] |= x << sh;
  63865. }
  63866. sh += k;
  63867. if (sh >= this.DB) {
  63868. sh -= this.DB;
  63869. }
  63870. }
  63871. if (k == 8 && ((+s[0]) & 0x80) != 0) {
  63872. this.s = -1;
  63873. if (sh > 0) {
  63874. this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;
  63875. }
  63876. }
  63877. this.clamp();
  63878. if (mi) {
  63879. BigInteger.ZERO.subTo(this, this);
  63880. }
  63881. };
  63882. // BigInteger.prototype.clamp = bnpClamp;
  63883. // (protected) clamp off excess high words
  63884. BigInteger.prototype.clamp = function () {
  63885. var c = this.s & this.DM;
  63886. while (this.t > 0 && this[this.t - 1] == c) {
  63887. --this.t;
  63888. }
  63889. };
  63890. // BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
  63891. // (protected) r = this << n*DB
  63892. BigInteger.prototype.dlShiftTo = function (n, r) {
  63893. var i;
  63894. for (i = this.t - 1; i >= 0; --i) {
  63895. r[i + n] = this[i];
  63896. }
  63897. for (i = n - 1; i >= 0; --i) {
  63898. r[i] = 0;
  63899. }
  63900. r.t = this.t + n;
  63901. r.s = this.s;
  63902. };
  63903. // BigInteger.prototype.drShiftTo = bnpDRShiftTo;
  63904. // (protected) r = this >> n*DB
  63905. BigInteger.prototype.drShiftTo = function (n, r) {
  63906. for (var i = n; i < this.t; ++i) {
  63907. r[i - n] = this[i];
  63908. }
  63909. r.t = Math.max(this.t - n, 0);
  63910. r.s = this.s;
  63911. };
  63912. // BigInteger.prototype.lShiftTo = bnpLShiftTo;
  63913. // (protected) r = this << n
  63914. BigInteger.prototype.lShiftTo = function (n, r) {
  63915. var bs = n % this.DB;
  63916. var cbs = this.DB - bs;
  63917. var bm = (1 << cbs) - 1;
  63918. var ds = Math.floor(n / this.DB);
  63919. var c = (this.s << bs) & this.DM;
  63920. for (var i = this.t - 1; i >= 0; --i) {
  63921. r[i + ds + 1] = (this[i] >> cbs) | c;
  63922. c = (this[i] & bm) << bs;
  63923. }
  63924. for (var i = ds - 1; i >= 0; --i) {
  63925. r[i] = 0;
  63926. }
  63927. r[ds] = c;
  63928. r.t = this.t + ds + 1;
  63929. r.s = this.s;
  63930. r.clamp();
  63931. };
  63932. // BigInteger.prototype.rShiftTo = bnpRShiftTo;
  63933. // (protected) r = this >> n
  63934. BigInteger.prototype.rShiftTo = function (n, r) {
  63935. r.s = this.s;
  63936. var ds = Math.floor(n / this.DB);
  63937. if (ds >= this.t) {
  63938. r.t = 0;
  63939. return;
  63940. }
  63941. var bs = n % this.DB;
  63942. var cbs = this.DB - bs;
  63943. var bm = (1 << bs) - 1;
  63944. r[0] = this[ds] >> bs;
  63945. for (var i = ds + 1; i < this.t; ++i) {
  63946. r[i - ds - 1] |= (this[i] & bm) << cbs;
  63947. r[i - ds] = this[i] >> bs;
  63948. }
  63949. if (bs > 0) {
  63950. r[this.t - ds - 1] |= (this.s & bm) << cbs;
  63951. }
  63952. r.t = this.t - ds;
  63953. r.clamp();
  63954. };
  63955. // BigInteger.prototype.subTo = bnpSubTo;
  63956. // (protected) r = this - a
  63957. BigInteger.prototype.subTo = function (a, r) {
  63958. var i = 0;
  63959. var c = 0;
  63960. var m = Math.min(a.t, this.t);
  63961. while (i < m) {
  63962. c += this[i] - a[i];
  63963. r[i++] = c & this.DM;
  63964. c >>= this.DB;
  63965. }
  63966. if (a.t < this.t) {
  63967. c -= a.s;
  63968. while (i < this.t) {
  63969. c += this[i];
  63970. r[i++] = c & this.DM;
  63971. c >>= this.DB;
  63972. }
  63973. c += this.s;
  63974. }
  63975. else {
  63976. c += this.s;
  63977. while (i < a.t) {
  63978. c -= a[i];
  63979. r[i++] = c & this.DM;
  63980. c >>= this.DB;
  63981. }
  63982. c -= a.s;
  63983. }
  63984. r.s = (c < 0) ? -1 : 0;
  63985. if (c < -1) {
  63986. r[i++] = this.DV + c;
  63987. }
  63988. else if (c > 0) {
  63989. r[i++] = c;
  63990. }
  63991. r.t = i;
  63992. r.clamp();
  63993. };
  63994. // BigInteger.prototype.multiplyTo = bnpMultiplyTo;
  63995. // (protected) r = this * a, r != this,a (HAC 14.12)
  63996. // "this" should be the larger one if appropriate.
  63997. BigInteger.prototype.multiplyTo = function (a, r) {
  63998. var x = this.abs();
  63999. var y = a.abs();
  64000. var i = x.t;
  64001. r.t = i + y.t;
  64002. while (--i >= 0) {
  64003. r[i] = 0;
  64004. }
  64005. for (i = 0; i < y.t; ++i) {
  64006. r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);
  64007. }
  64008. r.s = 0;
  64009. r.clamp();
  64010. if (this.s != a.s) {
  64011. BigInteger.ZERO.subTo(r, r);
  64012. }
  64013. };
  64014. // BigInteger.prototype.squareTo = bnpSquareTo;
  64015. // (protected) r = this^2, r != this (HAC 14.16)
  64016. BigInteger.prototype.squareTo = function (r) {
  64017. var x = this.abs();
  64018. var i = r.t = 2 * x.t;
  64019. while (--i >= 0) {
  64020. r[i] = 0;
  64021. }
  64022. for (i = 0; i < x.t - 1; ++i) {
  64023. var c = x.am(i, x[i], r, 2 * i, 0, 1);
  64024. if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {
  64025. r[i + x.t] -= x.DV;
  64026. r[i + x.t + 1] = 1;
  64027. }
  64028. }
  64029. if (r.t > 0) {
  64030. r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);
  64031. }
  64032. r.s = 0;
  64033. r.clamp();
  64034. };
  64035. // BigInteger.prototype.divRemTo = bnpDivRemTo;
  64036. // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
  64037. // r != q, this != m. q or r may be null.
  64038. BigInteger.prototype.divRemTo = function (m, q, r) {
  64039. var pm = m.abs();
  64040. if (pm.t <= 0) {
  64041. return;
  64042. }
  64043. var pt = this.abs();
  64044. if (pt.t < pm.t) {
  64045. if (q != null) {
  64046. q.fromInt(0);
  64047. }
  64048. if (r != null) {
  64049. this.copyTo(r);
  64050. }
  64051. return;
  64052. }
  64053. if (r == null) {
  64054. r = nbi();
  64055. }
  64056. var y = nbi();
  64057. var ts = this.s;
  64058. var ms = m.s;
  64059. var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus
  64060. if (nsh > 0) {
  64061. pm.lShiftTo(nsh, y);
  64062. pt.lShiftTo(nsh, r);
  64063. }
  64064. else {
  64065. pm.copyTo(y);
  64066. pt.copyTo(r);
  64067. }
  64068. var ys = y.t;
  64069. var y0 = y[ys - 1];
  64070. if (y0 == 0) {
  64071. return;
  64072. }
  64073. var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);
  64074. var d1 = this.FV / yt;
  64075. var d2 = (1 << this.F1) / yt;
  64076. var e = 1 << this.F2;
  64077. var i = r.t;
  64078. var j = i - ys;
  64079. var t = (q == null) ? nbi() : q;
  64080. y.dlShiftTo(j, t);
  64081. if (r.compareTo(t) >= 0) {
  64082. r[r.t++] = 1;
  64083. r.subTo(t, r);
  64084. }
  64085. BigInteger.ONE.dlShiftTo(ys, t);
  64086. t.subTo(y, y); // "negative" y so we can replace sub with am later
  64087. while (y.t < ys) {
  64088. y[y.t++] = 0;
  64089. }
  64090. while (--j >= 0) {
  64091. // Estimate quotient digit
  64092. var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);
  64093. if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out
  64094. y.dlShiftTo(j, t);
  64095. r.subTo(t, r);
  64096. while (r[i] < --qd) {
  64097. r.subTo(t, r);
  64098. }
  64099. }
  64100. }
  64101. if (q != null) {
  64102. r.drShiftTo(ys, q);
  64103. if (ts != ms) {
  64104. BigInteger.ZERO.subTo(q, q);
  64105. }
  64106. }
  64107. r.t = ys;
  64108. r.clamp();
  64109. if (nsh > 0) {
  64110. r.rShiftTo(nsh, r);
  64111. } // Denormalize remainder
  64112. if (ts < 0) {
  64113. BigInteger.ZERO.subTo(r, r);
  64114. }
  64115. };
  64116. // BigInteger.prototype.invDigit = bnpInvDigit;
  64117. // (protected) return "-1/this % 2^DB"; useful for Mont. reduction
  64118. // justification:
  64119. // xy == 1 (mod m)
  64120. // xy = 1+km
  64121. // xy(2-xy) = (1+km)(1-km)
  64122. // x[y(2-xy)] = 1-k^2m^2
  64123. // x[y(2-xy)] == 1 (mod m^2)
  64124. // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
  64125. // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
  64126. // JS multiply "overflows" differently from C/C++, so care is needed here.
  64127. BigInteger.prototype.invDigit = function () {
  64128. if (this.t < 1) {
  64129. return 0;
  64130. }
  64131. var x = this[0];
  64132. if ((x & 1) == 0) {
  64133. return 0;
  64134. }
  64135. var y = x & 3; // y == 1/x mod 2^2
  64136. y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4
  64137. y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8
  64138. y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16
  64139. // last step - calculate inverse mod DV directly;
  64140. // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
  64141. y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits
  64142. // we really want the negative inverse, and -DV < y < DV
  64143. return (y > 0) ? this.DV - y : -y;
  64144. };
  64145. // BigInteger.prototype.isEven = bnpIsEven;
  64146. // (protected) true iff this is even
  64147. BigInteger.prototype.isEven = function () {
  64148. return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;
  64149. };
  64150. // BigInteger.prototype.exp = bnpExp;
  64151. // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
  64152. BigInteger.prototype.exp = function (e, z) {
  64153. if (e > 0xffffffff || e < 1) {
  64154. return BigInteger.ONE;
  64155. }
  64156. var r = nbi();
  64157. var r2 = nbi();
  64158. var g = z.convert(this);
  64159. var i = nbits(e) - 1;
  64160. g.copyTo(r);
  64161. while (--i >= 0) {
  64162. z.sqrTo(r, r2);
  64163. if ((e & (1 << i)) > 0) {
  64164. z.mulTo(r2, g, r);
  64165. }
  64166. else {
  64167. var t = r;
  64168. r = r2;
  64169. r2 = t;
  64170. }
  64171. }
  64172. return z.revert(r);
  64173. };
  64174. // BigInteger.prototype.chunkSize = bnpChunkSize;
  64175. // (protected) return x s.t. r^x < DV
  64176. BigInteger.prototype.chunkSize = function (r) {
  64177. return Math.floor(Math.LN2 * this.DB / Math.log(r));
  64178. };
  64179. // BigInteger.prototype.toRadix = bnpToRadix;
  64180. // (protected) convert to radix string
  64181. BigInteger.prototype.toRadix = function (b) {
  64182. if (b == null) {
  64183. b = 10;
  64184. }
  64185. if (this.signum() == 0 || b < 2 || b > 36) {
  64186. return "0";
  64187. }
  64188. var cs = this.chunkSize(b);
  64189. var a = Math.pow(b, cs);
  64190. var d = nbv(a);
  64191. var y = nbi();
  64192. var z = nbi();
  64193. var r = "";
  64194. this.divRemTo(d, y, z);
  64195. while (y.signum() > 0) {
  64196. r = (a + z.intValue()).toString(b).substr(1) + r;
  64197. y.divRemTo(d, y, z);
  64198. }
  64199. return z.intValue().toString(b) + r;
  64200. };
  64201. // BigInteger.prototype.fromRadix = bnpFromRadix;
  64202. // (protected) convert from radix string
  64203. BigInteger.prototype.fromRadix = function (s, b) {
  64204. this.fromInt(0);
  64205. if (b == null) {
  64206. b = 10;
  64207. }
  64208. var cs = this.chunkSize(b);
  64209. var d = Math.pow(b, cs);
  64210. var mi = false;
  64211. var j = 0;
  64212. var w = 0;
  64213. for (var i = 0; i < s.length; ++i) {
  64214. var x = intAt(s, i);
  64215. if (x < 0) {
  64216. if (s.charAt(i) == "-" && this.signum() == 0) {
  64217. mi = true;
  64218. }
  64219. continue;
  64220. }
  64221. w = b * w + x;
  64222. if (++j >= cs) {
  64223. this.dMultiply(d);
  64224. this.dAddOffset(w, 0);
  64225. j = 0;
  64226. w = 0;
  64227. }
  64228. }
  64229. if (j > 0) {
  64230. this.dMultiply(Math.pow(b, j));
  64231. this.dAddOffset(w, 0);
  64232. }
  64233. if (mi) {
  64234. BigInteger.ZERO.subTo(this, this);
  64235. }
  64236. };
  64237. // BigInteger.prototype.fromNumber = bnpFromNumber;
  64238. // (protected) alternate constructor
  64239. BigInteger.prototype.fromNumber = function (a, b, c) {
  64240. if ("number" == typeof b) {
  64241. // new BigInteger(int,int,RNG)
  64242. if (a < 2) {
  64243. this.fromInt(1);
  64244. }
  64245. else {
  64246. this.fromNumber(a, c);
  64247. if (!this.testBit(a - 1)) {
  64248. // force MSB set
  64249. this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__["op_or"], this);
  64250. }
  64251. if (this.isEven()) {
  64252. this.dAddOffset(1, 0);
  64253. } // force odd
  64254. while (!this.isProbablePrime(b)) {
  64255. this.dAddOffset(2, 0);
  64256. if (this.bitLength() > a) {
  64257. this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);
  64258. }
  64259. }
  64260. }
  64261. }
  64262. else {
  64263. // new BigInteger(int,RNG)
  64264. var x = [];
  64265. var t = a & 7;
  64266. x.length = (a >> 3) + 1;
  64267. b.nextBytes(x);
  64268. if (t > 0) {
  64269. x[0] &= ((1 << t) - 1);
  64270. }
  64271. else {
  64272. x[0] = 0;
  64273. }
  64274. this.fromString(x, 256);
  64275. }
  64276. };
  64277. // BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
  64278. // (protected) r = this op a (bitwise)
  64279. BigInteger.prototype.bitwiseTo = function (a, op, r) {
  64280. var i;
  64281. var f;
  64282. var m = Math.min(a.t, this.t);
  64283. for (i = 0; i < m; ++i) {
  64284. r[i] = op(this[i], a[i]);
  64285. }
  64286. if (a.t < this.t) {
  64287. f = a.s & this.DM;
  64288. for (i = m; i < this.t; ++i) {
  64289. r[i] = op(this[i], f);
  64290. }
  64291. r.t = this.t;
  64292. }
  64293. else {
  64294. f = this.s & this.DM;
  64295. for (i = m; i < a.t; ++i) {
  64296. r[i] = op(f, a[i]);
  64297. }
  64298. r.t = a.t;
  64299. }
  64300. r.s = op(this.s, a.s);
  64301. r.clamp();
  64302. };
  64303. // BigInteger.prototype.changeBit = bnpChangeBit;
  64304. // (protected) this op (1<<n)
  64305. BigInteger.prototype.changeBit = function (n, op) {
  64306. var r = BigInteger.ONE.shiftLeft(n);
  64307. this.bitwiseTo(r, op, r);
  64308. return r;
  64309. };
  64310. // BigInteger.prototype.addTo = bnpAddTo;
  64311. // (protected) r = this + a
  64312. BigInteger.prototype.addTo = function (a, r) {
  64313. var i = 0;
  64314. var c = 0;
  64315. var m = Math.min(a.t, this.t);
  64316. while (i < m) {
  64317. c += this[i] + a[i];
  64318. r[i++] = c & this.DM;
  64319. c >>= this.DB;
  64320. }
  64321. if (a.t < this.t) {
  64322. c += a.s;
  64323. while (i < this.t) {
  64324. c += this[i];
  64325. r[i++] = c & this.DM;
  64326. c >>= this.DB;
  64327. }
  64328. c += this.s;
  64329. }
  64330. else {
  64331. c += this.s;
  64332. while (i < a.t) {
  64333. c += a[i];
  64334. r[i++] = c & this.DM;
  64335. c >>= this.DB;
  64336. }
  64337. c += a.s;
  64338. }
  64339. r.s = (c < 0) ? -1 : 0;
  64340. if (c > 0) {
  64341. r[i++] = c;
  64342. }
  64343. else if (c < -1) {
  64344. r[i++] = this.DV + c;
  64345. }
  64346. r.t = i;
  64347. r.clamp();
  64348. };
  64349. // BigInteger.prototype.dMultiply = bnpDMultiply;
  64350. // (protected) this *= n, this >= 0, 1 < n < DV
  64351. BigInteger.prototype.dMultiply = function (n) {
  64352. this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);
  64353. ++this.t;
  64354. this.clamp();
  64355. };
  64356. // BigInteger.prototype.dAddOffset = bnpDAddOffset;
  64357. // (protected) this += n << w words, this >= 0
  64358. BigInteger.prototype.dAddOffset = function (n, w) {
  64359. if (n == 0) {
  64360. return;
  64361. }
  64362. while (this.t <= w) {
  64363. this[this.t++] = 0;
  64364. }
  64365. this[w] += n;
  64366. while (this[w] >= this.DV) {
  64367. this[w] -= this.DV;
  64368. if (++w >= this.t) {
  64369. this[this.t++] = 0;
  64370. }
  64371. ++this[w];
  64372. }
  64373. };
  64374. // BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
  64375. // (protected) r = lower n words of "this * a", a.t <= n
  64376. // "this" should be the larger one if appropriate.
  64377. BigInteger.prototype.multiplyLowerTo = function (a, n, r) {
  64378. var i = Math.min(this.t + a.t, n);
  64379. r.s = 0; // assumes a,this >= 0
  64380. r.t = i;
  64381. while (i > 0) {
  64382. r[--i] = 0;
  64383. }
  64384. for (var j = r.t - this.t; i < j; ++i) {
  64385. r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);
  64386. }
  64387. for (var j = Math.min(a.t, n); i < j; ++i) {
  64388. this.am(0, a[i], r, i, 0, n - i);
  64389. }
  64390. r.clamp();
  64391. };
  64392. // BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
  64393. // (protected) r = "this * a" without lower n words, n > 0
  64394. // "this" should be the larger one if appropriate.
  64395. BigInteger.prototype.multiplyUpperTo = function (a, n, r) {
  64396. --n;
  64397. var i = r.t = this.t + a.t - n;
  64398. r.s = 0; // assumes a,this >= 0
  64399. while (--i >= 0) {
  64400. r[i] = 0;
  64401. }
  64402. for (i = Math.max(n - this.t, 0); i < a.t; ++i) {
  64403. r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);
  64404. }
  64405. r.clamp();
  64406. r.drShiftTo(1, r);
  64407. };
  64408. // BigInteger.prototype.modInt = bnpModInt;
  64409. // (protected) this % n, n < 2^26
  64410. BigInteger.prototype.modInt = function (n) {
  64411. if (n <= 0) {
  64412. return 0;
  64413. }
  64414. var d = this.DV % n;
  64415. var r = (this.s < 0) ? n - 1 : 0;
  64416. if (this.t > 0) {
  64417. if (d == 0) {
  64418. r = this[0] % n;
  64419. }
  64420. else {
  64421. for (var i = this.t - 1; i >= 0; --i) {
  64422. r = (d * r + this[i]) % n;
  64423. }
  64424. }
  64425. }
  64426. return r;
  64427. };
  64428. // BigInteger.prototype.millerRabin = bnpMillerRabin;
  64429. // (protected) true if probably prime (HAC 4.24, Miller-Rabin)
  64430. BigInteger.prototype.millerRabin = function (t) {
  64431. var n1 = this.subtract(BigInteger.ONE);
  64432. var k = n1.getLowestSetBit();
  64433. if (k <= 0) {
  64434. return false;
  64435. }
  64436. var r = n1.shiftRight(k);
  64437. t = (t + 1) >> 1;
  64438. if (t > lowprimes.length) {
  64439. t = lowprimes.length;
  64440. }
  64441. var a = nbi();
  64442. for (var i = 0; i < t; ++i) {
  64443. // Pick bases at random, instead of starting at 2
  64444. a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);
  64445. var y = a.modPow(r, this);
  64446. if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
  64447. var j = 1;
  64448. while (j++ < k && y.compareTo(n1) != 0) {
  64449. y = y.modPowInt(2, this);
  64450. if (y.compareTo(BigInteger.ONE) == 0) {
  64451. return false;
  64452. }
  64453. }
  64454. if (y.compareTo(n1) != 0) {
  64455. return false;
  64456. }
  64457. }
  64458. }
  64459. return true;
  64460. };
  64461. // BigInteger.prototype.square = bnSquare;
  64462. // (public) this^2
  64463. BigInteger.prototype.square = function () {
  64464. var r = nbi();
  64465. this.squareTo(r);
  64466. return r;
  64467. };
  64468. //#region ASYNC
  64469. // Public API method
  64470. BigInteger.prototype.gcda = function (a, callback) {
  64471. var x = (this.s < 0) ? this.negate() : this.clone();
  64472. var y = (a.s < 0) ? a.negate() : a.clone();
  64473. if (x.compareTo(y) < 0) {
  64474. var t = x;
  64475. x = y;
  64476. y = t;
  64477. }
  64478. var i = x.getLowestSetBit();
  64479. var g = y.getLowestSetBit();
  64480. if (g < 0) {
  64481. callback(x);
  64482. return;
  64483. }
  64484. if (i < g) {
  64485. g = i;
  64486. }
  64487. if (g > 0) {
  64488. x.rShiftTo(g, x);
  64489. y.rShiftTo(g, y);
  64490. }
  64491. // Workhorse of the algorithm, gets called 200 - 800 times per 512 bit keygen.
  64492. var gcda1 = function () {
  64493. if ((i = x.getLowestSetBit()) > 0) {
  64494. x.rShiftTo(i, x);
  64495. }
  64496. if ((i = y.getLowestSetBit()) > 0) {
  64497. y.rShiftTo(i, y);
  64498. }
  64499. if (x.compareTo(y) >= 0) {
  64500. x.subTo(y, x);
  64501. x.rShiftTo(1, x);
  64502. }
  64503. else {
  64504. y.subTo(x, y);
  64505. y.rShiftTo(1, y);
  64506. }
  64507. if (!(x.signum() > 0)) {
  64508. if (g > 0) {
  64509. y.lShiftTo(g, y);
  64510. }
  64511. setTimeout(function () { callback(y); }, 0); // escape
  64512. }
  64513. else {
  64514. setTimeout(gcda1, 0);
  64515. }
  64516. };
  64517. setTimeout(gcda1, 10);
  64518. };
  64519. // (protected) alternate constructor
  64520. BigInteger.prototype.fromNumberAsync = function (a, b, c, callback) {
  64521. if ("number" == typeof b) {
  64522. if (a < 2) {
  64523. this.fromInt(1);
  64524. }
  64525. else {
  64526. this.fromNumber(a, c);
  64527. if (!this.testBit(a - 1)) {
  64528. this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__["op_or"], this);
  64529. }
  64530. if (this.isEven()) {
  64531. this.dAddOffset(1, 0);
  64532. }
  64533. var bnp_1 = this;
  64534. var bnpfn1_1 = function () {
  64535. bnp_1.dAddOffset(2, 0);
  64536. if (bnp_1.bitLength() > a) {
  64537. bnp_1.subTo(BigInteger.ONE.shiftLeft(a - 1), bnp_1);
  64538. }
  64539. if (bnp_1.isProbablePrime(b)) {
  64540. setTimeout(function () { callback(); }, 0); // escape
  64541. }
  64542. else {
  64543. setTimeout(bnpfn1_1, 0);
  64544. }
  64545. };
  64546. setTimeout(bnpfn1_1, 0);
  64547. }
  64548. }
  64549. else {
  64550. var x = [];
  64551. var t = a & 7;
  64552. x.length = (a >> 3) + 1;
  64553. b.nextBytes(x);
  64554. if (t > 0) {
  64555. x[0] &= ((1 << t) - 1);
  64556. }
  64557. else {
  64558. x[0] = 0;
  64559. }
  64560. this.fromString(x, 256);
  64561. }
  64562. };
  64563. return BigInteger;
  64564. }());
  64565. //#region REDUCERS
  64566. //#region NullExp
  64567. var NullExp = /** @class */ (function () {
  64568. function NullExp() {
  64569. }
  64570. // NullExp.prototype.convert = nNop;
  64571. NullExp.prototype.convert = function (x) {
  64572. return x;
  64573. };
  64574. // NullExp.prototype.revert = nNop;
  64575. NullExp.prototype.revert = function (x) {
  64576. return x;
  64577. };
  64578. // NullExp.prototype.mulTo = nMulTo;
  64579. NullExp.prototype.mulTo = function (x, y, r) {
  64580. x.multiplyTo(y, r);
  64581. };
  64582. // NullExp.prototype.sqrTo = nSqrTo;
  64583. NullExp.prototype.sqrTo = function (x, r) {
  64584. x.squareTo(r);
  64585. };
  64586. return NullExp;
  64587. }());
  64588. // Modular reduction using "classic" algorithm
  64589. var Classic = /** @class */ (function () {
  64590. function Classic(m) {
  64591. this.m = m;
  64592. }
  64593. // Classic.prototype.convert = cConvert;
  64594. Classic.prototype.convert = function (x) {
  64595. if (x.s < 0 || x.compareTo(this.m) >= 0) {
  64596. return x.mod(this.m);
  64597. }
  64598. else {
  64599. return x;
  64600. }
  64601. };
  64602. // Classic.prototype.revert = cRevert;
  64603. Classic.prototype.revert = function (x) {
  64604. return x;
  64605. };
  64606. // Classic.prototype.reduce = cReduce;
  64607. Classic.prototype.reduce = function (x) {
  64608. x.divRemTo(this.m, null, x);
  64609. };
  64610. // Classic.prototype.mulTo = cMulTo;
  64611. Classic.prototype.mulTo = function (x, y, r) {
  64612. x.multiplyTo(y, r);
  64613. this.reduce(r);
  64614. };
  64615. // Classic.prototype.sqrTo = cSqrTo;
  64616. Classic.prototype.sqrTo = function (x, r) {
  64617. x.squareTo(r);
  64618. this.reduce(r);
  64619. };
  64620. return Classic;
  64621. }());
  64622. //#endregion
  64623. //#region Montgomery
  64624. // Montgomery reduction
  64625. var Montgomery = /** @class */ (function () {
  64626. function Montgomery(m) {
  64627. this.m = m;
  64628. this.mp = m.invDigit();
  64629. this.mpl = this.mp & 0x7fff;
  64630. this.mph = this.mp >> 15;
  64631. this.um = (1 << (m.DB - 15)) - 1;
  64632. this.mt2 = 2 * m.t;
  64633. }
  64634. // Montgomery.prototype.convert = montConvert;
  64635. // xR mod m
  64636. Montgomery.prototype.convert = function (x) {
  64637. var r = nbi();
  64638. x.abs().dlShiftTo(this.m.t, r);
  64639. r.divRemTo(this.m, null, r);
  64640. if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {
  64641. this.m.subTo(r, r);
  64642. }
  64643. return r;
  64644. };
  64645. // Montgomery.prototype.revert = montRevert;
  64646. // x/R mod m
  64647. Montgomery.prototype.revert = function (x) {
  64648. var r = nbi();
  64649. x.copyTo(r);
  64650. this.reduce(r);
  64651. return r;
  64652. };
  64653. // Montgomery.prototype.reduce = montReduce;
  64654. // x = x/R mod m (HAC 14.32)
  64655. Montgomery.prototype.reduce = function (x) {
  64656. while (x.t <= this.mt2) {
  64657. // pad x so am has enough room later
  64658. x[x.t++] = 0;
  64659. }
  64660. for (var i = 0; i < this.m.t; ++i) {
  64661. // faster way of calculating u0 = x[i]*mp mod DV
  64662. var j = x[i] & 0x7fff;
  64663. var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;
  64664. // use am to combine the multiply-shift-add into one call
  64665. j = i + this.m.t;
  64666. x[j] += this.m.am(0, u0, x, i, 0, this.m.t);
  64667. // propagate carry
  64668. while (x[j] >= x.DV) {
  64669. x[j] -= x.DV;
  64670. x[++j]++;
  64671. }
  64672. }
  64673. x.clamp();
  64674. x.drShiftTo(this.m.t, x);
  64675. if (x.compareTo(this.m) >= 0) {
  64676. x.subTo(this.m, x);
  64677. }
  64678. };
  64679. // Montgomery.prototype.mulTo = montMulTo;
  64680. // r = "xy/R mod m"; x,y != r
  64681. Montgomery.prototype.mulTo = function (x, y, r) {
  64682. x.multiplyTo(y, r);
  64683. this.reduce(r);
  64684. };
  64685. // Montgomery.prototype.sqrTo = montSqrTo;
  64686. // r = "x^2/R mod m"; x != r
  64687. Montgomery.prototype.sqrTo = function (x, r) {
  64688. x.squareTo(r);
  64689. this.reduce(r);
  64690. };
  64691. return Montgomery;
  64692. }());
  64693. //#endregion Montgomery
  64694. //#region Barrett
  64695. // Barrett modular reduction
  64696. var Barrett = /** @class */ (function () {
  64697. function Barrett(m) {
  64698. this.m = m;
  64699. // setup Barrett
  64700. this.r2 = nbi();
  64701. this.q3 = nbi();
  64702. BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);
  64703. this.mu = this.r2.divide(m);
  64704. }
  64705. // Barrett.prototype.convert = barrettConvert;
  64706. Barrett.prototype.convert = function (x) {
  64707. if (x.s < 0 || x.t > 2 * this.m.t) {
  64708. return x.mod(this.m);
  64709. }
  64710. else if (x.compareTo(this.m) < 0) {
  64711. return x;
  64712. }
  64713. else {
  64714. var r = nbi();
  64715. x.copyTo(r);
  64716. this.reduce(r);
  64717. return r;
  64718. }
  64719. };
  64720. // Barrett.prototype.revert = barrettRevert;
  64721. Barrett.prototype.revert = function (x) {
  64722. return x;
  64723. };
  64724. // Barrett.prototype.reduce = barrettReduce;
  64725. // x = x mod m (HAC 14.42)
  64726. Barrett.prototype.reduce = function (x) {
  64727. x.drShiftTo(this.m.t - 1, this.r2);
  64728. if (x.t > this.m.t + 1) {
  64729. x.t = this.m.t + 1;
  64730. x.clamp();
  64731. }
  64732. this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);
  64733. this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);
  64734. while (x.compareTo(this.r2) < 0) {
  64735. x.dAddOffset(1, this.m.t + 1);
  64736. }
  64737. x.subTo(this.r2, x);
  64738. while (x.compareTo(this.m) >= 0) {
  64739. x.subTo(this.m, x);
  64740. }
  64741. };
  64742. // Barrett.prototype.mulTo = barrettMulTo;
  64743. // r = x*y mod m; x,y != r
  64744. Barrett.prototype.mulTo = function (x, y, r) {
  64745. x.multiplyTo(y, r);
  64746. this.reduce(r);
  64747. };
  64748. // Barrett.prototype.sqrTo = barrettSqrTo;
  64749. // r = x^2 mod m; x != r
  64750. Barrett.prototype.sqrTo = function (x, r) {
  64751. x.squareTo(r);
  64752. this.reduce(r);
  64753. };
  64754. return Barrett;
  64755. }());
  64756. //#endregion
  64757. //#endregion REDUCERS
  64758. // return new, unset BigInteger
  64759. function nbi() { return new BigInteger(null); }
  64760. function parseBigInt(str, r) {
  64761. return new BigInteger(str, r);
  64762. }
  64763. // am: Compute w_j += (x*this_i), propagate carries,
  64764. // c is initial carry, returns final carry.
  64765. // c < 3*dvalue, x < 2*dvalue, this_i < dvalue
  64766. // We need to select the fastest one that works in this environment.
  64767. var inBrowser = typeof navigator !== "undefined";
  64768. if (inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) {
  64769. // am2 avoids a big mult-and-extract completely.
  64770. // Max digit bits should be <= 30 because we do bitwise ops
  64771. // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
  64772. BigInteger.prototype.am = function am2(i, x, w, j, c, n) {
  64773. var xl = x & 0x7fff;
  64774. var xh = x >> 15;
  64775. while (--n >= 0) {
  64776. var l = this[i] & 0x7fff;
  64777. var h = this[i++] >> 15;
  64778. var m = xh * l + h * xl;
  64779. l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);
  64780. c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);
  64781. w[j++] = l & 0x3fffffff;
  64782. }
  64783. return c;
  64784. };
  64785. dbits = 30;
  64786. }
  64787. else if (inBrowser && j_lm && (navigator.appName != "Netscape")) {
  64788. // am1: use a single mult and divide to get the high bits,
  64789. // max digit bits should be 26 because
  64790. // max internal value = 2*dvalue^2-2*dvalue (< 2^53)
  64791. BigInteger.prototype.am = function am1(i, x, w, j, c, n) {
  64792. while (--n >= 0) {
  64793. var v = x * this[i++] + w[j] + c;
  64794. c = Math.floor(v / 0x4000000);
  64795. w[j++] = v & 0x3ffffff;
  64796. }
  64797. return c;
  64798. };
  64799. dbits = 26;
  64800. }
  64801. else { // Mozilla/Netscape seems to prefer am3
  64802. // Alternately, set max digit bits to 28 since some
  64803. // browsers slow down when dealing with 32-bit numbers.
  64804. BigInteger.prototype.am = function am3(i, x, w, j, c, n) {
  64805. var xl = x & 0x3fff;
  64806. var xh = x >> 14;
  64807. while (--n >= 0) {
  64808. var l = this[i] & 0x3fff;
  64809. var h = this[i++] >> 14;
  64810. var m = xh * l + h * xl;
  64811. l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;
  64812. c = (l >> 28) + (m >> 14) + xh * h;
  64813. w[j++] = l & 0xfffffff;
  64814. }
  64815. return c;
  64816. };
  64817. dbits = 28;
  64818. }
  64819. BigInteger.prototype.DB = dbits;
  64820. BigInteger.prototype.DM = ((1 << dbits) - 1);
  64821. BigInteger.prototype.DV = (1 << dbits);
  64822. var BI_FP = 52;
  64823. BigInteger.prototype.FV = Math.pow(2, BI_FP);
  64824. BigInteger.prototype.F1 = BI_FP - dbits;
  64825. BigInteger.prototype.F2 = 2 * dbits - BI_FP;
  64826. // Digit conversions
  64827. var BI_RC = [];
  64828. var rr;
  64829. var vv;
  64830. rr = "0".charCodeAt(0);
  64831. for (vv = 0; vv <= 9; ++vv) {
  64832. BI_RC[rr++] = vv;
  64833. }
  64834. rr = "a".charCodeAt(0);
  64835. for (vv = 10; vv < 36; ++vv) {
  64836. BI_RC[rr++] = vv;
  64837. }
  64838. rr = "A".charCodeAt(0);
  64839. for (vv = 10; vv < 36; ++vv) {
  64840. BI_RC[rr++] = vv;
  64841. }
  64842. function intAt(s, i) {
  64843. var c = BI_RC[s.charCodeAt(i)];
  64844. return (c == null) ? -1 : c;
  64845. }
  64846. // return bigint initialized to value
  64847. function nbv(i) {
  64848. var r = nbi();
  64849. r.fromInt(i);
  64850. return r;
  64851. }
  64852. // returns bit length of the integer x
  64853. function nbits(x) {
  64854. var r = 1;
  64855. var t;
  64856. if ((t = x >>> 16) != 0) {
  64857. x = t;
  64858. r += 16;
  64859. }
  64860. if ((t = x >> 8) != 0) {
  64861. x = t;
  64862. r += 8;
  64863. }
  64864. if ((t = x >> 4) != 0) {
  64865. x = t;
  64866. r += 4;
  64867. }
  64868. if ((t = x >> 2) != 0) {
  64869. x = t;
  64870. r += 2;
  64871. }
  64872. if ((t = x >> 1) != 0) {
  64873. x = t;
  64874. r += 1;
  64875. }
  64876. return r;
  64877. }
  64878. // "constants"
  64879. BigInteger.ZERO = nbv(0);
  64880. BigInteger.ONE = nbv(1);
  64881. /***/ }),
  64882. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/prng4.js":
  64883. /*!***********************************************************************!*\
  64884. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/prng4.js ***!
  64885. \***********************************************************************/
  64886. /*! exports provided: Arcfour, prng_newstate, rng_psize */
  64887. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  64888. "use strict";
  64889. __webpack_require__.r(__webpack_exports__);
  64890. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Arcfour", function() { return Arcfour; });
  64891. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prng_newstate", function() { return prng_newstate; });
  64892. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rng_psize", function() { return rng_psize; });
  64893. // prng4.js - uses Arcfour as a PRNG
  64894. var Arcfour = /** @class */ (function () {
  64895. function Arcfour() {
  64896. this.i = 0;
  64897. this.j = 0;
  64898. this.S = [];
  64899. }
  64900. // Arcfour.prototype.init = ARC4init;
  64901. // Initialize arcfour context from key, an array of ints, each from [0..255]
  64902. Arcfour.prototype.init = function (key) {
  64903. var i;
  64904. var j;
  64905. var t;
  64906. for (i = 0; i < 256; ++i) {
  64907. this.S[i] = i;
  64908. }
  64909. j = 0;
  64910. for (i = 0; i < 256; ++i) {
  64911. j = (j + this.S[i] + key[i % key.length]) & 255;
  64912. t = this.S[i];
  64913. this.S[i] = this.S[j];
  64914. this.S[j] = t;
  64915. }
  64916. this.i = 0;
  64917. this.j = 0;
  64918. };
  64919. // Arcfour.prototype.next = ARC4next;
  64920. Arcfour.prototype.next = function () {
  64921. var t;
  64922. this.i = (this.i + 1) & 255;
  64923. this.j = (this.j + this.S[this.i]) & 255;
  64924. t = this.S[this.i];
  64925. this.S[this.i] = this.S[this.j];
  64926. this.S[this.j] = t;
  64927. return this.S[(t + this.S[this.i]) & 255];
  64928. };
  64929. return Arcfour;
  64930. }());
  64931. // Plug in your RNG constructor here
  64932. function prng_newstate() {
  64933. return new Arcfour();
  64934. }
  64935. // Pool size must be a multiple of 4 and greater than 32.
  64936. // An array of bytes the size of the pool will be passed to init()
  64937. var rng_psize = 256;
  64938. /***/ }),
  64939. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/rng.js":
  64940. /*!*********************************************************************!*\
  64941. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/rng.js ***!
  64942. \*********************************************************************/
  64943. /*! exports provided: SecureRandom */
  64944. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  64945. "use strict";
  64946. __webpack_require__.r(__webpack_exports__);
  64947. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SecureRandom", function() { return SecureRandom; });
  64948. /* harmony import */ var _prng4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prng4 */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/prng4.js");
  64949. // Random number generator - requires a PRNG backend, e.g. prng4.js
  64950. var rng_state;
  64951. var rng_pool = null;
  64952. var rng_pptr;
  64953. // Initialize the pool with junk if needed.
  64954. if (rng_pool == null) {
  64955. rng_pool = [];
  64956. rng_pptr = 0;
  64957. var t = void 0;
  64958. if (window.crypto && window.crypto.getRandomValues) {
  64959. // Extract entropy (2048 bits) from RNG if available
  64960. var z = new Uint32Array(256);
  64961. window.crypto.getRandomValues(z);
  64962. for (t = 0; t < z.length; ++t) {
  64963. rng_pool[rng_pptr++] = z[t] & 255;
  64964. }
  64965. }
  64966. // Use mouse events for entropy, if we do not have enough entropy by the time
  64967. // we need it, entropy will be generated by Math.random.
  64968. var count = 0;
  64969. var onMouseMoveListener_1 = function (ev) {
  64970. count = count || 0;
  64971. if (count >= 256 || rng_pptr >= _prng4__WEBPACK_IMPORTED_MODULE_0__["rng_psize"]) {
  64972. if (window.removeEventListener) {
  64973. window.removeEventListener("mousemove", onMouseMoveListener_1, false);
  64974. }
  64975. else if (window.detachEvent) {
  64976. window.detachEvent("onmousemove", onMouseMoveListener_1);
  64977. }
  64978. return;
  64979. }
  64980. try {
  64981. var mouseCoordinates = ev.x + ev.y;
  64982. rng_pool[rng_pptr++] = mouseCoordinates & 255;
  64983. count += 1;
  64984. }
  64985. catch (e) {
  64986. // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.
  64987. }
  64988. };
  64989. if (window.addEventListener) {
  64990. window.addEventListener("mousemove", onMouseMoveListener_1, false);
  64991. }
  64992. else if (window.attachEvent) {
  64993. window.attachEvent("onmousemove", onMouseMoveListener_1);
  64994. }
  64995. }
  64996. function rng_get_byte() {
  64997. if (rng_state == null) {
  64998. rng_state = Object(_prng4__WEBPACK_IMPORTED_MODULE_0__["prng_newstate"])();
  64999. // At this point, we may not have collected enough entropy. If not, fall back to Math.random
  65000. while (rng_pptr < _prng4__WEBPACK_IMPORTED_MODULE_0__["rng_psize"]) {
  65001. var random = Math.floor(65536 * Math.random());
  65002. rng_pool[rng_pptr++] = random & 255;
  65003. }
  65004. rng_state.init(rng_pool);
  65005. for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {
  65006. rng_pool[rng_pptr] = 0;
  65007. }
  65008. rng_pptr = 0;
  65009. }
  65010. // TODO: allow reseeding after first request
  65011. return rng_state.next();
  65012. }
  65013. var SecureRandom = /** @class */ (function () {
  65014. function SecureRandom() {
  65015. }
  65016. SecureRandom.prototype.nextBytes = function (ba) {
  65017. for (var i = 0; i < ba.length; ++i) {
  65018. ba[i] = rng_get_byte();
  65019. }
  65020. };
  65021. return SecureRandom;
  65022. }());
  65023. /***/ }),
  65024. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/rsa.js":
  65025. /*!*********************************************************************!*\
  65026. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/rsa.js ***!
  65027. \*********************************************************************/
  65028. /*! exports provided: RSAKey */
  65029. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65030. "use strict";
  65031. __webpack_require__.r(__webpack_exports__);
  65032. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RSAKey", function() { return RSAKey; });
  65033. /* harmony import */ var _jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsbn */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/jsbn.js");
  65034. /* harmony import */ var _rng__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/rng.js");
  65035. // Depends on jsbn.js and rng.js
  65036. // Version 1.1: support utf-8 encoding in pkcs1pad2
  65037. // convert a (hex) string to a bignum object
  65038. // function linebrk(s,n) {
  65039. // var ret = "";
  65040. // var i = 0;
  65041. // while(i + n < s.length) {
  65042. // ret += s.substring(i,i+n) + "\n";
  65043. // i += n;
  65044. // }
  65045. // return ret + s.substring(i,s.length);
  65046. // }
  65047. // function byte2Hex(b) {
  65048. // if(b < 0x10)
  65049. // return "0" + b.toString(16);
  65050. // else
  65051. // return b.toString(16);
  65052. // }
  65053. function pkcs1pad1(s, n) {
  65054. if (n < s.length + 22) {
  65055. console.error("Message too long for RSA");
  65056. return null;
  65057. }
  65058. var len = n - s.length - 6;
  65059. var filler = "";
  65060. for (var f = 0; f < len; f += 2) {
  65061. filler += "ff";
  65062. }
  65063. var m = "0001" + filler + "00" + s;
  65064. return Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(m, 16);
  65065. }
  65066. // PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
  65067. function pkcs1pad2(s, n) {
  65068. if (n < s.length + 11) { // TODO: fix for utf-8
  65069. console.error("Message too long for RSA");
  65070. return null;
  65071. }
  65072. var ba = [];
  65073. var i = s.length - 1;
  65074. while (i >= 0 && n > 0) {
  65075. var c = s.charCodeAt(i--);
  65076. if (c < 128) { // encode using utf-8
  65077. ba[--n] = c;
  65078. }
  65079. else if ((c > 127) && (c < 2048)) {
  65080. ba[--n] = (c & 63) | 128;
  65081. ba[--n] = (c >> 6) | 192;
  65082. }
  65083. else {
  65084. ba[--n] = (c & 63) | 128;
  65085. ba[--n] = ((c >> 6) & 63) | 128;
  65086. ba[--n] = (c >> 12) | 224;
  65087. }
  65088. }
  65089. ba[--n] = 0;
  65090. var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__["SecureRandom"]();
  65091. var x = [];
  65092. while (n > 2) { // random non-zero pad
  65093. x[0] = 0;
  65094. while (x[0] == 0) {
  65095. rng.nextBytes(x);
  65096. }
  65097. ba[--n] = x[0];
  65098. }
  65099. ba[--n] = 2;
  65100. ba[--n] = 0;
  65101. return new _jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](ba);
  65102. }
  65103. // "empty" RSA key constructor
  65104. var RSAKey = /** @class */ (function () {
  65105. function RSAKey() {
  65106. this.n = null;
  65107. this.e = 0;
  65108. this.d = null;
  65109. this.p = null;
  65110. this.q = null;
  65111. this.dmp1 = null;
  65112. this.dmq1 = null;
  65113. this.coeff = null;
  65114. }
  65115. //#region PROTECTED
  65116. // protected
  65117. // RSAKey.prototype.doPublic = RSADoPublic;
  65118. // Perform raw public operation on "x": return x^e (mod n)
  65119. RSAKey.prototype.doPublic = function (x) {
  65120. return x.modPowInt(this.e, this.n);
  65121. };
  65122. // RSAKey.prototype.doPrivate = RSADoPrivate;
  65123. // Perform raw private operation on "x": return x^d (mod n)
  65124. RSAKey.prototype.doPrivate = function (x) {
  65125. if (this.p == null || this.q == null) {
  65126. return x.modPow(this.d, this.n);
  65127. }
  65128. // TODO: re-calculate any missing CRT params
  65129. var xp = x.mod(this.p).modPow(this.dmp1, this.p);
  65130. var xq = x.mod(this.q).modPow(this.dmq1, this.q);
  65131. while (xp.compareTo(xq) < 0) {
  65132. xp = xp.add(this.p);
  65133. }
  65134. return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
  65135. };
  65136. //#endregion PROTECTED
  65137. //#region PUBLIC
  65138. // RSAKey.prototype.setPublic = RSASetPublic;
  65139. // Set the public key fields N and e from hex strings
  65140. RSAKey.prototype.setPublic = function (N, E) {
  65141. if (N != null && E != null && N.length > 0 && E.length > 0) {
  65142. this.n = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(N, 16);
  65143. this.e = parseInt(E, 16);
  65144. }
  65145. else {
  65146. console.error("Invalid RSA public key");
  65147. }
  65148. };
  65149. // RSAKey.prototype.encrypt = RSAEncrypt;
  65150. // Return the PKCS#1 RSA encryption of "text" as an even-length hex string
  65151. RSAKey.prototype.encrypt = function (text) {
  65152. var maxLength = (this.n.bitLength() + 7) >> 3;
  65153. var m = pkcs1pad2(text, maxLength);
  65154. if (m == null) {
  65155. return null;
  65156. }
  65157. var c = this.doPublic(m);
  65158. if (c == null) {
  65159. return null;
  65160. }
  65161. var h = c.toString(16);
  65162. var length = h.length;
  65163. // fix zero before result
  65164. for (var i = 0; i < maxLength * 2 - length; i++) {
  65165. h = "0" + h;
  65166. }
  65167. return h;
  65168. };
  65169. // RSAKey.prototype.setPrivate = RSASetPrivate;
  65170. // Set the private key fields N, e, and d from hex strings
  65171. RSAKey.prototype.setPrivate = function (N, E, D) {
  65172. if (N != null && E != null && N.length > 0 && E.length > 0) {
  65173. this.n = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(N, 16);
  65174. this.e = parseInt(E, 16);
  65175. this.d = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(D, 16);
  65176. }
  65177. else {
  65178. console.error("Invalid RSA private key");
  65179. }
  65180. };
  65181. // RSAKey.prototype.setPrivateEx = RSASetPrivateEx;
  65182. // Set the private key fields N, e, d and CRT params from hex strings
  65183. RSAKey.prototype.setPrivateEx = function (N, E, D, P, Q, DP, DQ, C) {
  65184. if (N != null && E != null && N.length > 0 && E.length > 0) {
  65185. this.n = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(N, 16);
  65186. this.e = parseInt(E, 16);
  65187. this.d = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(D, 16);
  65188. this.p = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(P, 16);
  65189. this.q = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(Q, 16);
  65190. this.dmp1 = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(DP, 16);
  65191. this.dmq1 = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(DQ, 16);
  65192. this.coeff = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(C, 16);
  65193. }
  65194. else {
  65195. console.error("Invalid RSA private key");
  65196. }
  65197. };
  65198. // RSAKey.prototype.generate = RSAGenerate;
  65199. // Generate a new random private key B bits long, using public expt E
  65200. RSAKey.prototype.generate = function (B, E) {
  65201. var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__["SecureRandom"]();
  65202. var qs = B >> 1;
  65203. this.e = parseInt(E, 16);
  65204. var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](E, 16);
  65205. for (;;) {
  65206. for (;;) {
  65207. this.p = new _jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](B - qs, 1, rng);
  65208. if (this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE) == 0 && this.p.isProbablePrime(10)) {
  65209. break;
  65210. }
  65211. }
  65212. for (;;) {
  65213. this.q = new _jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](qs, 1, rng);
  65214. if (this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE) == 0 && this.q.isProbablePrime(10)) {
  65215. break;
  65216. }
  65217. }
  65218. if (this.p.compareTo(this.q) <= 0) {
  65219. var t = this.p;
  65220. this.p = this.q;
  65221. this.q = t;
  65222. }
  65223. var p1 = this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE);
  65224. var q1 = this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE);
  65225. var phi = p1.multiply(q1);
  65226. if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE) == 0) {
  65227. this.n = this.p.multiply(this.q);
  65228. this.d = ee.modInverse(phi);
  65229. this.dmp1 = this.d.mod(p1);
  65230. this.dmq1 = this.d.mod(q1);
  65231. this.coeff = this.q.modInverse(this.p);
  65232. break;
  65233. }
  65234. }
  65235. };
  65236. // RSAKey.prototype.decrypt = RSADecrypt;
  65237. // Return the PKCS#1 RSA decryption of "ctext".
  65238. // "ctext" is an even-length hex string and the output is a plain string.
  65239. RSAKey.prototype.decrypt = function (ctext) {
  65240. var c = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(ctext, 16);
  65241. var m = this.doPrivate(c);
  65242. if (m == null) {
  65243. return null;
  65244. }
  65245. return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);
  65246. };
  65247. // Generate a new random private key B bits long, using public expt E
  65248. RSAKey.prototype.generateAsync = function (B, E, callback) {
  65249. var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__["SecureRandom"]();
  65250. var qs = B >> 1;
  65251. this.e = parseInt(E, 16);
  65252. var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](E, 16);
  65253. var rsa = this;
  65254. // These functions have non-descript names because they were originally for(;;) loops.
  65255. // I don't know about cryptography to give them better names than loop1-4.
  65256. var loop1 = function () {
  65257. var loop4 = function () {
  65258. if (rsa.p.compareTo(rsa.q) <= 0) {
  65259. var t = rsa.p;
  65260. rsa.p = rsa.q;
  65261. rsa.q = t;
  65262. }
  65263. var p1 = rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE);
  65264. var q1 = rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE);
  65265. var phi = p1.multiply(q1);
  65266. if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE) == 0) {
  65267. rsa.n = rsa.p.multiply(rsa.q);
  65268. rsa.d = ee.modInverse(phi);
  65269. rsa.dmp1 = rsa.d.mod(p1);
  65270. rsa.dmq1 = rsa.d.mod(q1);
  65271. rsa.coeff = rsa.q.modInverse(rsa.p);
  65272. setTimeout(function () { callback(); }, 0); // escape
  65273. }
  65274. else {
  65275. setTimeout(loop1, 0);
  65276. }
  65277. };
  65278. var loop3 = function () {
  65279. rsa.q = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["nbi"])();
  65280. rsa.q.fromNumberAsync(qs, 1, rng, function () {
  65281. rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE).gcda(ee, function (r) {
  65282. if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE) == 0 && rsa.q.isProbablePrime(10)) {
  65283. setTimeout(loop4, 0);
  65284. }
  65285. else {
  65286. setTimeout(loop3, 0);
  65287. }
  65288. });
  65289. });
  65290. };
  65291. var loop2 = function () {
  65292. rsa.p = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["nbi"])();
  65293. rsa.p.fromNumberAsync(B - qs, 1, rng, function () {
  65294. rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE).gcda(ee, function (r) {
  65295. if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE) == 0 && rsa.p.isProbablePrime(10)) {
  65296. setTimeout(loop3, 0);
  65297. }
  65298. else {
  65299. setTimeout(loop2, 0);
  65300. }
  65301. });
  65302. });
  65303. };
  65304. setTimeout(loop2, 0);
  65305. };
  65306. setTimeout(loop1, 0);
  65307. };
  65308. RSAKey.prototype.sign = function (text, digestMethod, digestName) {
  65309. var header = getDigestHeader(digestName);
  65310. var digest = header + digestMethod(text).toString();
  65311. var m = pkcs1pad1(digest, this.n.bitLength() / 4);
  65312. if (m == null) {
  65313. return null;
  65314. }
  65315. var c = this.doPrivate(m);
  65316. if (c == null) {
  65317. return null;
  65318. }
  65319. var h = c.toString(16);
  65320. if ((h.length & 1) == 0) {
  65321. return h;
  65322. }
  65323. else {
  65324. return "0" + h;
  65325. }
  65326. };
  65327. RSAKey.prototype.verify = function (text, signature, digestMethod) {
  65328. var c = Object(_jsbn__WEBPACK_IMPORTED_MODULE_0__["parseBigInt"])(signature, 16);
  65329. var m = this.doPublic(c);
  65330. if (m == null) {
  65331. return null;
  65332. }
  65333. var unpadded = m.toString(16).replace(/^1f+00/, "");
  65334. var digest = removeDigestHeader(unpadded);
  65335. return digest == digestMethod(text).toString();
  65336. };
  65337. return RSAKey;
  65338. }());
  65339. // Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext
  65340. function pkcs1unpad2(d, n) {
  65341. var b = d.toByteArray();
  65342. var i = 0;
  65343. while (i < b.length && b[i] == 0) {
  65344. ++i;
  65345. }
  65346. if (b.length - i != n - 1 || b[i] != 2) {
  65347. return null;
  65348. }
  65349. ++i;
  65350. while (b[i] != 0) {
  65351. if (++i >= b.length) {
  65352. return null;
  65353. }
  65354. }
  65355. var ret = "";
  65356. while (++i < b.length) {
  65357. var c = b[i] & 255;
  65358. if (c < 128) { // utf-8 decode
  65359. ret += String.fromCharCode(c);
  65360. }
  65361. else if ((c > 191) && (c < 224)) {
  65362. ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));
  65363. ++i;
  65364. }
  65365. else {
  65366. ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));
  65367. i += 2;
  65368. }
  65369. }
  65370. return ret;
  65371. }
  65372. // https://tools.ietf.org/html/rfc3447#page-43
  65373. var DIGEST_HEADERS = {
  65374. md2: "3020300c06082a864886f70d020205000410",
  65375. md5: "3020300c06082a864886f70d020505000410",
  65376. sha1: "3021300906052b0e03021a05000414",
  65377. sha224: "302d300d06096086480165030402040500041c",
  65378. sha256: "3031300d060960864801650304020105000420",
  65379. sha384: "3041300d060960864801650304020205000430",
  65380. sha512: "3051300d060960864801650304020305000440",
  65381. ripemd160: "3021300906052b2403020105000414"
  65382. };
  65383. function getDigestHeader(name) {
  65384. return DIGEST_HEADERS[name] || "";
  65385. }
  65386. function removeDigestHeader(str) {
  65387. for (var name_1 in DIGEST_HEADERS) {
  65388. if (DIGEST_HEADERS.hasOwnProperty(name_1)) {
  65389. var header = DIGEST_HEADERS[name_1];
  65390. var len = header.length;
  65391. if (str.substr(0, len) == header) {
  65392. return str.substr(len);
  65393. }
  65394. }
  65395. }
  65396. return str;
  65397. }
  65398. // Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
  65399. // function RSAEncryptB64(text) {
  65400. // var h = this.encrypt(text);
  65401. // if(h) return hex2b64(h); else return null;
  65402. // }
  65403. // public
  65404. // RSAKey.prototype.encrypt_b64 = RSAEncryptB64;
  65405. /***/ }),
  65406. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/util.js":
  65407. /*!**********************************************************************!*\
  65408. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/util.js ***!
  65409. \**********************************************************************/
  65410. /*! exports provided: int2char, op_and, op_or, op_xor, op_andnot, lbit, cbit */
  65411. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65412. "use strict";
  65413. __webpack_require__.r(__webpack_exports__);
  65414. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "int2char", function() { return int2char; });
  65415. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "op_and", function() { return op_and; });
  65416. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "op_or", function() { return op_or; });
  65417. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "op_xor", function() { return op_xor; });
  65418. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "op_andnot", function() { return op_andnot; });
  65419. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lbit", function() { return lbit; });
  65420. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cbit", function() { return cbit; });
  65421. var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
  65422. function int2char(n) {
  65423. return BI_RM.charAt(n);
  65424. }
  65425. //#region BIT_OPERATIONS
  65426. // (public) this & a
  65427. function op_and(x, y) {
  65428. return x & y;
  65429. }
  65430. // (public) this | a
  65431. function op_or(x, y) {
  65432. return x | y;
  65433. }
  65434. // (public) this ^ a
  65435. function op_xor(x, y) {
  65436. return x ^ y;
  65437. }
  65438. // (public) this & ~a
  65439. function op_andnot(x, y) {
  65440. return x & ~y;
  65441. }
  65442. // return index of lowest 1-bit in x, x < 2^31
  65443. function lbit(x) {
  65444. if (x == 0) {
  65445. return -1;
  65446. }
  65447. var r = 0;
  65448. if ((x & 0xffff) == 0) {
  65449. x >>= 16;
  65450. r += 16;
  65451. }
  65452. if ((x & 0xff) == 0) {
  65453. x >>= 8;
  65454. r += 8;
  65455. }
  65456. if ((x & 0xf) == 0) {
  65457. x >>= 4;
  65458. r += 4;
  65459. }
  65460. if ((x & 3) == 0) {
  65461. x >>= 2;
  65462. r += 2;
  65463. }
  65464. if ((x & 1) == 0) {
  65465. ++r;
  65466. }
  65467. return r;
  65468. }
  65469. // return number of 1 bits in x
  65470. function cbit(x) {
  65471. var r = 0;
  65472. while (x != 0) {
  65473. x &= x - 1;
  65474. ++r;
  65475. }
  65476. return r;
  65477. }
  65478. //#endregion BIT_OPERATIONS
  65479. /***/ }),
  65480. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsrsasign/asn1-1.0.js":
  65481. /*!*******************************************************************************!*\
  65482. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsrsasign/asn1-1.0.js ***!
  65483. \*******************************************************************************/
  65484. /*! exports provided: KJUR */
  65485. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65486. "use strict";
  65487. __webpack_require__.r(__webpack_exports__);
  65488. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KJUR", function() { return KJUR; });
  65489. /* harmony import */ var _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsbn/jsbn */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsbn/jsbn.js");
  65490. /* harmony import */ var _yahoo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./yahoo */ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsrsasign/yahoo.js");
  65491. /* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license
  65492. */
  65493. /*
  65494. * asn1.js - ASN.1 DER encoder classes
  65495. *
  65496. * Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)
  65497. *
  65498. * This software is licensed under the terms of the MIT License.
  65499. * https://kjur.github.io/jsrsasign/license
  65500. *
  65501. * The above copyright and license notice shall be
  65502. * included in all copies or substantial portions of the Software.
  65503. */
  65504. /**
  65505. * @fileOverview
  65506. * @name asn1-1.0.js
  65507. * @author Kenji Urushima kenji.urushima@gmail.com
  65508. * @version asn1 1.0.13 (2017-Jun-02)
  65509. * @since jsrsasign 2.1
  65510. * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
  65511. */
  65512. /**
  65513. * kjur's class library name space
  65514. * <p>
  65515. * This name space provides following name spaces:
  65516. * <ul>
  65517. * <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>
  65518. * <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>
  65519. * <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature
  65520. * class and utilities</li>
  65521. * </ul>
  65522. * </p>
  65523. * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
  65524. * @name KJUR
  65525. * @namespace kjur's class library name space
  65526. */
  65527. var KJUR = {};
  65528. /**
  65529. * kjur's ASN.1 class library name space
  65530. * <p>
  65531. * This is ITU-T X.690 ASN.1 DER encoder class library and
  65532. * class structure and methods is very similar to
  65533. * org.bouncycastle.asn1 package of
  65534. * well known BouncyCaslte Cryptography Library.
  65535. * <h4>PROVIDING ASN.1 PRIMITIVES</h4>
  65536. * Here are ASN.1 DER primitive classes.
  65537. * <ul>
  65538. * <li>0x01 {@link KJUR.asn1.DERBoolean}</li>
  65539. * <li>0x02 {@link KJUR.asn1.DERInteger}</li>
  65540. * <li>0x03 {@link KJUR.asn1.DERBitString}</li>
  65541. * <li>0x04 {@link KJUR.asn1.DEROctetString}</li>
  65542. * <li>0x05 {@link KJUR.asn1.DERNull}</li>
  65543. * <li>0x06 {@link KJUR.asn1.DERObjectIdentifier}</li>
  65544. * <li>0x0a {@link KJUR.asn1.DEREnumerated}</li>
  65545. * <li>0x0c {@link KJUR.asn1.DERUTF8String}</li>
  65546. * <li>0x12 {@link KJUR.asn1.DERNumericString}</li>
  65547. * <li>0x13 {@link KJUR.asn1.DERPrintableString}</li>
  65548. * <li>0x14 {@link KJUR.asn1.DERTeletexString}</li>
  65549. * <li>0x16 {@link KJUR.asn1.DERIA5String}</li>
  65550. * <li>0x17 {@link KJUR.asn1.DERUTCTime}</li>
  65551. * <li>0x18 {@link KJUR.asn1.DERGeneralizedTime}</li>
  65552. * <li>0x30 {@link KJUR.asn1.DERSequence}</li>
  65553. * <li>0x31 {@link KJUR.asn1.DERSet}</li>
  65554. * </ul>
  65555. * <h4>OTHER ASN.1 CLASSES</h4>
  65556. * <ul>
  65557. * <li>{@link KJUR.asn1.ASN1Object}</li>
  65558. * <li>{@link KJUR.asn1.DERAbstractString}</li>
  65559. * <li>{@link KJUR.asn1.DERAbstractTime}</li>
  65560. * <li>{@link KJUR.asn1.DERAbstractStructured}</li>
  65561. * <li>{@link KJUR.asn1.DERTaggedObject}</li>
  65562. * </ul>
  65563. * <h4>SUB NAME SPACES</h4>
  65564. * <ul>
  65565. * <li>{@link KJUR.asn1.cades} - CAdES long term signature format</li>
  65566. * <li>{@link KJUR.asn1.cms} - Cryptographic Message Syntax</li>
  65567. * <li>{@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)</li>
  65568. * <li>{@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format</li>
  65569. * <li>{@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL</li>
  65570. * </ul>
  65571. * </p>
  65572. * NOTE: Please ignore method summary and document of this namespace.
  65573. * This caused by a bug of jsdoc2.
  65574. * @name KJUR.asn1
  65575. * @namespace
  65576. */
  65577. if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1)
  65578. KJUR.asn1 = {};
  65579. /**
  65580. * ASN1 utilities class
  65581. * @name KJUR.asn1.ASN1Util
  65582. * @class ASN1 utilities class
  65583. * @since asn1 1.0.2
  65584. */
  65585. KJUR.asn1.ASN1Util = new function () {
  65586. this.integerToByteHex = function (i) {
  65587. var h = i.toString(16);
  65588. if ((h.length % 2) == 1)
  65589. h = '0' + h;
  65590. return h;
  65591. };
  65592. this.bigIntToMinTwosComplementsHex = function (bigIntegerValue) {
  65593. var h = bigIntegerValue.toString(16);
  65594. if (h.substr(0, 1) != '-') {
  65595. if (h.length % 2 == 1) {
  65596. h = '0' + h;
  65597. }
  65598. else {
  65599. if (!h.match(/^[0-7]/)) {
  65600. h = '00' + h;
  65601. }
  65602. }
  65603. }
  65604. else {
  65605. var hPos = h.substr(1);
  65606. var xorLen = hPos.length;
  65607. if (xorLen % 2 == 1) {
  65608. xorLen += 1;
  65609. }
  65610. else {
  65611. if (!h.match(/^[0-7]/)) {
  65612. xorLen += 2;
  65613. }
  65614. }
  65615. var hMask = '';
  65616. for (var i = 0; i < xorLen; i++) {
  65617. hMask += 'f';
  65618. }
  65619. var biMask = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](hMask, 16);
  65620. var biNeg = biMask.xor(bigIntegerValue).add(_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"].ONE);
  65621. h = biNeg.toString(16).replace(/^-/, '');
  65622. }
  65623. return h;
  65624. };
  65625. /**
  65626. * get PEM string from hexadecimal data and header string
  65627. * @name getPEMStringFromHex
  65628. * @memberOf KJUR.asn1.ASN1Util
  65629. * @function
  65630. * @param {String} dataHex hexadecimal string of PEM body
  65631. * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')
  65632. * @return {String} PEM formatted string of input data
  65633. * @description
  65634. * This method converts a hexadecimal string to a PEM string with
  65635. * a specified header. Its line break will be CRLF("\r\n").
  65636. * @example
  65637. * var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');
  65638. * // value of pem will be:
  65639. * -----BEGIN PRIVATE KEY-----
  65640. * YWFh
  65641. * -----END PRIVATE KEY-----
  65642. */
  65643. this.getPEMStringFromHex = function (dataHex, pemHeader) {
  65644. return hextopem(dataHex, pemHeader);
  65645. };
  65646. /**
  65647. * generate ASN1Object specifed by JSON parameters
  65648. * @name newObject
  65649. * @memberOf KJUR.asn1.ASN1Util
  65650. * @function
  65651. * @param {Array} param JSON parameter to generate ASN1Object
  65652. * @return {KJUR.asn1.ASN1Object} generated object
  65653. * @since asn1 1.0.3
  65654. * @description
  65655. * generate any ASN1Object specified by JSON param
  65656. * including ASN.1 primitive or structured.
  65657. * Generally 'param' can be described as follows:
  65658. * <blockquote>
  65659. * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}
  65660. * </blockquote>
  65661. * 'TYPE-OF-ASN1OBJ' can be one of following symbols:
  65662. * <ul>
  65663. * <li>'bool' - DERBoolean</li>
  65664. * <li>'int' - DERInteger</li>
  65665. * <li>'bitstr' - DERBitString</li>
  65666. * <li>'octstr' - DEROctetString</li>
  65667. * <li>'null' - DERNull</li>
  65668. * <li>'oid' - DERObjectIdentifier</li>
  65669. * <li>'enum' - DEREnumerated</li>
  65670. * <li>'utf8str' - DERUTF8String</li>
  65671. * <li>'numstr' - DERNumericString</li>
  65672. * <li>'prnstr' - DERPrintableString</li>
  65673. * <li>'telstr' - DERTeletexString</li>
  65674. * <li>'ia5str' - DERIA5String</li>
  65675. * <li>'utctime' - DERUTCTime</li>
  65676. * <li>'gentime' - DERGeneralizedTime</li>
  65677. * <li>'seq' - DERSequence</li>
  65678. * <li>'set' - DERSet</li>
  65679. * <li>'tag' - DERTaggedObject</li>
  65680. * </ul>
  65681. * @example
  65682. * newObject({'prnstr': 'aaa'});
  65683. * newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})
  65684. * // ASN.1 Tagged Object
  65685. * newObject({'tag': {'tag': 'a1',
  65686. * 'explicit': true,
  65687. * 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});
  65688. * // more simple representation of ASN.1 Tagged Object
  65689. * newObject({'tag': ['a1',
  65690. * true,
  65691. * {'seq': [
  65692. * {'int': 3},
  65693. * {'prnstr': 'aaa'}]}
  65694. * ]});
  65695. */
  65696. this.newObject = function (param) {
  65697. var _KJUR = KJUR, _KJUR_asn1 = _KJUR.asn1, _DERBoolean = _KJUR_asn1.DERBoolean, _DERInteger = _KJUR_asn1.DERInteger, _DERBitString = _KJUR_asn1.DERBitString, _DEROctetString = _KJUR_asn1.DEROctetString, _DERNull = _KJUR_asn1.DERNull, _DERObjectIdentifier = _KJUR_asn1.DERObjectIdentifier, _DEREnumerated = _KJUR_asn1.DEREnumerated, _DERUTF8String = _KJUR_asn1.DERUTF8String, _DERNumericString = _KJUR_asn1.DERNumericString, _DERPrintableString = _KJUR_asn1.DERPrintableString, _DERTeletexString = _KJUR_asn1.DERTeletexString, _DERIA5String = _KJUR_asn1.DERIA5String, _DERUTCTime = _KJUR_asn1.DERUTCTime, _DERGeneralizedTime = _KJUR_asn1.DERGeneralizedTime, _DERSequence = _KJUR_asn1.DERSequence, _DERSet = _KJUR_asn1.DERSet, _DERTaggedObject = _KJUR_asn1.DERTaggedObject, _newObject = _KJUR_asn1.ASN1Util.newObject;
  65698. var keys = Object.keys(param);
  65699. if (keys.length != 1)
  65700. throw "key of param shall be only one.";
  65701. var key = keys[0];
  65702. if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + key + ":") == -1)
  65703. throw "undefined key: " + key;
  65704. if (key == "bool")
  65705. return new _DERBoolean(param[key]);
  65706. if (key == "int")
  65707. return new _DERInteger(param[key]);
  65708. if (key == "bitstr")
  65709. return new _DERBitString(param[key]);
  65710. if (key == "octstr")
  65711. return new _DEROctetString(param[key]);
  65712. if (key == "null")
  65713. return new _DERNull(param[key]);
  65714. if (key == "oid")
  65715. return new _DERObjectIdentifier(param[key]);
  65716. if (key == "enum")
  65717. return new _DEREnumerated(param[key]);
  65718. if (key == "utf8str")
  65719. return new _DERUTF8String(param[key]);
  65720. if (key == "numstr")
  65721. return new _DERNumericString(param[key]);
  65722. if (key == "prnstr")
  65723. return new _DERPrintableString(param[key]);
  65724. if (key == "telstr")
  65725. return new _DERTeletexString(param[key]);
  65726. if (key == "ia5str")
  65727. return new _DERIA5String(param[key]);
  65728. if (key == "utctime")
  65729. return new _DERUTCTime(param[key]);
  65730. if (key == "gentime")
  65731. return new _DERGeneralizedTime(param[key]);
  65732. if (key == "seq") {
  65733. var paramList = param[key];
  65734. var a = [];
  65735. for (var i = 0; i < paramList.length; i++) {
  65736. var asn1Obj = _newObject(paramList[i]);
  65737. a.push(asn1Obj);
  65738. }
  65739. return new _DERSequence({ 'array': a });
  65740. }
  65741. if (key == "set") {
  65742. var paramList = param[key];
  65743. var a = [];
  65744. for (var i = 0; i < paramList.length; i++) {
  65745. var asn1Obj = _newObject(paramList[i]);
  65746. a.push(asn1Obj);
  65747. }
  65748. return new _DERSet({ 'array': a });
  65749. }
  65750. if (key == "tag") {
  65751. var tagParam = param[key];
  65752. if (Object.prototype.toString.call(tagParam) === '[object Array]' &&
  65753. tagParam.length == 3) {
  65754. var obj = _newObject(tagParam[2]);
  65755. return new _DERTaggedObject({ tag: tagParam[0],
  65756. explicit: tagParam[1],
  65757. obj: obj });
  65758. }
  65759. else {
  65760. var newParam = {};
  65761. if (tagParam.explicit !== undefined)
  65762. newParam.explicit = tagParam.explicit;
  65763. if (tagParam.tag !== undefined)
  65764. newParam.tag = tagParam.tag;
  65765. if (tagParam.obj === undefined)
  65766. throw "obj shall be specified for 'tag'.";
  65767. newParam.obj = _newObject(tagParam.obj);
  65768. return new _DERTaggedObject(newParam);
  65769. }
  65770. }
  65771. };
  65772. /**
  65773. * get encoded hexadecimal string of ASN1Object specifed by JSON parameters
  65774. * @name jsonToASN1HEX
  65775. * @memberOf KJUR.asn1.ASN1Util
  65776. * @function
  65777. * @param {Array} param JSON parameter to generate ASN1Object
  65778. * @return hexadecimal string of ASN1Object
  65779. * @since asn1 1.0.4
  65780. * @description
  65781. * As for ASN.1 object representation of JSON object,
  65782. * please see {@link newObject}.
  65783. * @example
  65784. * jsonToASN1HEX({'prnstr': 'aaa'});
  65785. */
  65786. this.jsonToASN1HEX = function (param) {
  65787. var asn1Obj = this.newObject(param);
  65788. return asn1Obj.getEncodedHex();
  65789. };
  65790. };
  65791. /**
  65792. * get dot noted oid number string from hexadecimal value of OID
  65793. * @name oidHexToInt
  65794. * @memberOf KJUR.asn1.ASN1Util
  65795. * @function
  65796. * @param {String} hex hexadecimal value of object identifier
  65797. * @return {String} dot noted string of object identifier
  65798. * @since jsrsasign 4.8.3 asn1 1.0.7
  65799. * @description
  65800. * This static method converts from hexadecimal string representation of
  65801. * ASN.1 value of object identifier to oid number string.
  65802. * @example
  65803. * KJUR.asn1.ASN1Util.oidHexToInt('550406') &rarr; "2.5.4.6"
  65804. */
  65805. KJUR.asn1.ASN1Util.oidHexToInt = function (hex) {
  65806. var s = "";
  65807. var i01 = parseInt(hex.substr(0, 2), 16);
  65808. var i0 = Math.floor(i01 / 40);
  65809. var i1 = i01 % 40;
  65810. var s = i0 + "." + i1;
  65811. var binbuf = "";
  65812. for (var i = 2; i < hex.length; i += 2) {
  65813. var value = parseInt(hex.substr(i, 2), 16);
  65814. var bin = ("00000000" + value.toString(2)).slice(-8);
  65815. binbuf = binbuf + bin.substr(1, 7);
  65816. if (bin.substr(0, 1) == "0") {
  65817. var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](binbuf, 2);
  65818. s = s + "." + bi.toString(10);
  65819. binbuf = "";
  65820. }
  65821. }
  65822. ;
  65823. return s;
  65824. };
  65825. /**
  65826. * get hexadecimal value of object identifier from dot noted oid value
  65827. * @name oidIntToHex
  65828. * @memberOf KJUR.asn1.ASN1Util
  65829. * @function
  65830. * @param {String} oidString dot noted string of object identifier
  65831. * @return {String} hexadecimal value of object identifier
  65832. * @since jsrsasign 4.8.3 asn1 1.0.7
  65833. * @description
  65834. * This static method converts from object identifier value string.
  65835. * to hexadecimal string representation of it.
  65836. * @example
  65837. * KJUR.asn1.ASN1Util.oidIntToHex("2.5.4.6") &rarr; "550406"
  65838. */
  65839. KJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {
  65840. var itox = function (i) {
  65841. var h = i.toString(16);
  65842. if (h.length == 1)
  65843. h = '0' + h;
  65844. return h;
  65845. };
  65846. var roidtox = function (roid) {
  65847. var h = '';
  65848. var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](roid, 10);
  65849. var b = bi.toString(2);
  65850. var padLen = 7 - b.length % 7;
  65851. if (padLen == 7)
  65852. padLen = 0;
  65853. var bPad = '';
  65854. for (var i = 0; i < padLen; i++)
  65855. bPad += '0';
  65856. b = bPad + b;
  65857. for (var i = 0; i < b.length - 1; i += 7) {
  65858. var b8 = b.substr(i, 7);
  65859. if (i != b.length - 7)
  65860. b8 = '1' + b8;
  65861. h += itox(parseInt(b8, 2));
  65862. }
  65863. return h;
  65864. };
  65865. if (!oidString.match(/^[0-9.]+$/)) {
  65866. throw "malformed oid string: " + oidString;
  65867. }
  65868. var h = '';
  65869. var a = oidString.split('.');
  65870. var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);
  65871. h += itox(i0);
  65872. a.splice(0, 2);
  65873. for (var i = 0; i < a.length; i++) {
  65874. h += roidtox(a[i]);
  65875. }
  65876. return h;
  65877. };
  65878. // ********************************************************************
  65879. // Abstract ASN.1 Classes
  65880. // ********************************************************************
  65881. // ********************************************************************
  65882. /**
  65883. * base class for ASN.1 DER encoder object
  65884. * @name KJUR.asn1.ASN1Object
  65885. * @class base class for ASN.1 DER encoder object
  65886. * @property {Boolean} isModified flag whether internal data was changed
  65887. * @property {String} hTLV hexadecimal string of ASN.1 TLV
  65888. * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)
  65889. * @property {String} hL hexadecimal string of ASN.1 TLV length(L)
  65890. * @property {String} hV hexadecimal string of ASN.1 TLV value(V)
  65891. * @description
  65892. */
  65893. KJUR.asn1.ASN1Object = function () {
  65894. var isModified = true;
  65895. var hTLV = null;
  65896. var hT = '00';
  65897. var hL = '00';
  65898. var hV = '';
  65899. /**
  65900. * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)
  65901. * @name getLengthHexFromValue
  65902. * @memberOf KJUR.asn1.ASN1Object#
  65903. * @function
  65904. * @return {String} hexadecimal string of ASN.1 TLV length(L)
  65905. */
  65906. this.getLengthHexFromValue = function () {
  65907. if (typeof this.hV == "undefined" || this.hV == null) {
  65908. throw "this.hV is null or undefined.";
  65909. }
  65910. if (this.hV.length % 2 == 1) {
  65911. throw "value hex must be even length: n=" + hV.length + ",v=" + this.hV;
  65912. }
  65913. var n = this.hV.length / 2;
  65914. var hN = n.toString(16);
  65915. if (hN.length % 2 == 1) {
  65916. hN = "0" + hN;
  65917. }
  65918. if (n < 128) {
  65919. return hN;
  65920. }
  65921. else {
  65922. var hNlen = hN.length / 2;
  65923. if (hNlen > 15) {
  65924. throw "ASN.1 length too long to represent by 8x: n = " + n.toString(16);
  65925. }
  65926. var head = 128 + hNlen;
  65927. return head.toString(16) + hN;
  65928. }
  65929. };
  65930. /**
  65931. * get hexadecimal string of ASN.1 TLV bytes
  65932. * @name getEncodedHex
  65933. * @memberOf KJUR.asn1.ASN1Object#
  65934. * @function
  65935. * @return {String} hexadecimal string of ASN.1 TLV
  65936. */
  65937. this.getEncodedHex = function () {
  65938. if (this.hTLV == null || this.isModified) {
  65939. this.hV = this.getFreshValueHex();
  65940. this.hL = this.getLengthHexFromValue();
  65941. this.hTLV = this.hT + this.hL + this.hV;
  65942. this.isModified = false;
  65943. //alert("first time: " + this.hTLV);
  65944. }
  65945. return this.hTLV;
  65946. };
  65947. /**
  65948. * get hexadecimal string of ASN.1 TLV value(V) bytes
  65949. * @name getValueHex
  65950. * @memberOf KJUR.asn1.ASN1Object#
  65951. * @function
  65952. * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes
  65953. */
  65954. this.getValueHex = function () {
  65955. this.getEncodedHex();
  65956. return this.hV;
  65957. };
  65958. this.getFreshValueHex = function () {
  65959. return '';
  65960. };
  65961. };
  65962. // == BEGIN DERAbstractString ================================================
  65963. /**
  65964. * base class for ASN.1 DER string classes
  65965. * @name KJUR.asn1.DERAbstractString
  65966. * @class base class for ASN.1 DER string classes
  65967. * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
  65968. * @property {String} s internal string of value
  65969. * @extends KJUR.asn1.ASN1Object
  65970. * @description
  65971. * <br/>
  65972. * As for argument 'params' for constructor, you can specify one of
  65973. * following properties:
  65974. * <ul>
  65975. * <li>str - specify initial ASN.1 value(V) by a string</li>
  65976. * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
  65977. * </ul>
  65978. * NOTE: 'params' can be omitted.
  65979. */
  65980. KJUR.asn1.DERAbstractString = function (params) {
  65981. KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
  65982. var s = null;
  65983. var hV = null;
  65984. /**
  65985. * get string value of this string object
  65986. * @name getString
  65987. * @memberOf KJUR.asn1.DERAbstractString#
  65988. * @function
  65989. * @return {String} string value of this string object
  65990. */
  65991. this.getString = function () {
  65992. return this.s;
  65993. };
  65994. /**
  65995. * set value by a string
  65996. * @name setString
  65997. * @memberOf KJUR.asn1.DERAbstractString#
  65998. * @function
  65999. * @param {String} newS value by a string to set
  66000. */
  66001. this.setString = function (newS) {
  66002. this.hTLV = null;
  66003. this.isModified = true;
  66004. this.s = newS;
  66005. this.hV = stohex(this.s);
  66006. };
  66007. /**
  66008. * set value by a hexadecimal string
  66009. * @name setStringHex
  66010. * @memberOf KJUR.asn1.DERAbstractString#
  66011. * @function
  66012. * @param {String} newHexString value by a hexadecimal string to set
  66013. */
  66014. this.setStringHex = function (newHexString) {
  66015. this.hTLV = null;
  66016. this.isModified = true;
  66017. this.s = null;
  66018. this.hV = newHexString;
  66019. };
  66020. this.getFreshValueHex = function () {
  66021. return this.hV;
  66022. };
  66023. if (typeof params != "undefined") {
  66024. if (typeof params == "string") {
  66025. this.setString(params);
  66026. }
  66027. else if (typeof params['str'] != "undefined") {
  66028. this.setString(params['str']);
  66029. }
  66030. else if (typeof params['hex'] != "undefined") {
  66031. this.setStringHex(params['hex']);
  66032. }
  66033. }
  66034. };
  66035. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);
  66036. // == END DERAbstractString ================================================
  66037. // == BEGIN DERAbstractTime ==================================================
  66038. /**
  66039. * base class for ASN.1 DER Generalized/UTCTime class
  66040. * @name KJUR.asn1.DERAbstractTime
  66041. * @class base class for ASN.1 DER Generalized/UTCTime class
  66042. * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
  66043. * @extends KJUR.asn1.ASN1Object
  66044. * @description
  66045. * @see KJUR.asn1.ASN1Object - superclass
  66046. */
  66047. KJUR.asn1.DERAbstractTime = function (params) {
  66048. KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);
  66049. var s = null;
  66050. var date = null;
  66051. // --- PRIVATE METHODS --------------------
  66052. this.localDateToUTC = function (d) {
  66053. utc = d.getTime() + (d.getTimezoneOffset() * 60000);
  66054. var utcDate = new Date(utc);
  66055. return utcDate;
  66056. };
  66057. /*
  66058. * format date string by Data object
  66059. * @name formatDate
  66060. * @memberOf KJUR.asn1.AbstractTime;
  66061. * @param {Date} dateObject
  66062. * @param {string} type 'utc' or 'gen'
  66063. * @param {boolean} withMillis flag for with millisections or not
  66064. * @description
  66065. * 'withMillis' flag is supported from asn1 1.0.6.
  66066. */
  66067. this.formatDate = function (dateObject, type, withMillis) {
  66068. var pad = this.zeroPadding;
  66069. var d = this.localDateToUTC(dateObject);
  66070. var year = String(d.getFullYear());
  66071. if (type == 'utc')
  66072. year = year.substr(2, 2);
  66073. var month = pad(String(d.getMonth() + 1), 2);
  66074. var day = pad(String(d.getDate()), 2);
  66075. var hour = pad(String(d.getHours()), 2);
  66076. var min = pad(String(d.getMinutes()), 2);
  66077. var sec = pad(String(d.getSeconds()), 2);
  66078. var s = year + month + day + hour + min + sec;
  66079. if (withMillis === true) {
  66080. var millis = d.getMilliseconds();
  66081. if (millis != 0) {
  66082. var sMillis = pad(String(millis), 3);
  66083. sMillis = sMillis.replace(/[0]+$/, "");
  66084. s = s + "." + sMillis;
  66085. }
  66086. }
  66087. return s + "Z";
  66088. };
  66089. this.zeroPadding = function (s, len) {
  66090. if (s.length >= len)
  66091. return s;
  66092. return new Array(len - s.length + 1).join('0') + s;
  66093. };
  66094. // --- PUBLIC METHODS --------------------
  66095. /**
  66096. * get string value of this string object
  66097. * @name getString
  66098. * @memberOf KJUR.asn1.DERAbstractTime#
  66099. * @function
  66100. * @return {String} string value of this time object
  66101. */
  66102. this.getString = function () {
  66103. return this.s;
  66104. };
  66105. /**
  66106. * set value by a string
  66107. * @name setString
  66108. * @memberOf KJUR.asn1.DERAbstractTime#
  66109. * @function
  66110. * @param {String} newS value by a string to set such like "130430235959Z"
  66111. */
  66112. this.setString = function (newS) {
  66113. this.hTLV = null;
  66114. this.isModified = true;
  66115. this.s = newS;
  66116. this.hV = stohex(newS);
  66117. };
  66118. /**
  66119. * set value by a Date object
  66120. * @name setByDateValue
  66121. * @memberOf KJUR.asn1.DERAbstractTime#
  66122. * @function
  66123. * @param {Integer} year year of date (ex. 2013)
  66124. * @param {Integer} month month of date between 1 and 12 (ex. 12)
  66125. * @param {Integer} day day of month
  66126. * @param {Integer} hour hours of date
  66127. * @param {Integer} min minutes of date
  66128. * @param {Integer} sec seconds of date
  66129. */
  66130. this.setByDateValue = function (year, month, day, hour, min, sec) {
  66131. var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));
  66132. this.setByDate(dateObject);
  66133. };
  66134. this.getFreshValueHex = function () {
  66135. return this.hV;
  66136. };
  66137. };
  66138. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);
  66139. // == END DERAbstractTime ==================================================
  66140. // == BEGIN DERAbstractStructured ============================================
  66141. /**
  66142. * base class for ASN.1 DER structured class
  66143. * @name KJUR.asn1.DERAbstractStructured
  66144. * @class base class for ASN.1 DER structured class
  66145. * @property {Array} asn1Array internal array of ASN1Object
  66146. * @extends KJUR.asn1.ASN1Object
  66147. * @description
  66148. * @see KJUR.asn1.ASN1Object - superclass
  66149. */
  66150. KJUR.asn1.DERAbstractStructured = function (params) {
  66151. KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
  66152. var asn1Array = null;
  66153. /**
  66154. * set value by array of ASN1Object
  66155. * @name setByASN1ObjectArray
  66156. * @memberOf KJUR.asn1.DERAbstractStructured#
  66157. * @function
  66158. * @param {array} asn1ObjectArray array of ASN1Object to set
  66159. */
  66160. this.setByASN1ObjectArray = function (asn1ObjectArray) {
  66161. this.hTLV = null;
  66162. this.isModified = true;
  66163. this.asn1Array = asn1ObjectArray;
  66164. };
  66165. /**
  66166. * append an ASN1Object to internal array
  66167. * @name appendASN1Object
  66168. * @memberOf KJUR.asn1.DERAbstractStructured#
  66169. * @function
  66170. * @param {ASN1Object} asn1Object to add
  66171. */
  66172. this.appendASN1Object = function (asn1Object) {
  66173. this.hTLV = null;
  66174. this.isModified = true;
  66175. this.asn1Array.push(asn1Object);
  66176. };
  66177. this.asn1Array = new Array();
  66178. if (typeof params != "undefined") {
  66179. if (typeof params['array'] != "undefined") {
  66180. this.asn1Array = params['array'];
  66181. }
  66182. }
  66183. };
  66184. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);
  66185. // ********************************************************************
  66186. // ASN.1 Object Classes
  66187. // ********************************************************************
  66188. // ********************************************************************
  66189. /**
  66190. * class for ASN.1 DER Boolean
  66191. * @name KJUR.asn1.DERBoolean
  66192. * @class class for ASN.1 DER Boolean
  66193. * @extends KJUR.asn1.ASN1Object
  66194. * @description
  66195. * @see KJUR.asn1.ASN1Object - superclass
  66196. */
  66197. KJUR.asn1.DERBoolean = function () {
  66198. KJUR.asn1.DERBoolean.superclass.constructor.call(this);
  66199. this.hT = "01";
  66200. this.hTLV = "0101ff";
  66201. };
  66202. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);
  66203. // ********************************************************************
  66204. /**
  66205. * class for ASN.1 DER Integer
  66206. * @name KJUR.asn1.DERInteger
  66207. * @class class for ASN.1 DER Integer
  66208. * @extends KJUR.asn1.ASN1Object
  66209. * @description
  66210. * <br/>
  66211. * As for argument 'params' for constructor, you can specify one of
  66212. * following properties:
  66213. * <ul>
  66214. * <li>int - specify initial ASN.1 value(V) by integer value</li>
  66215. * <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>
  66216. * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
  66217. * </ul>
  66218. * NOTE: 'params' can be omitted.
  66219. */
  66220. KJUR.asn1.DERInteger = function (params) {
  66221. KJUR.asn1.DERInteger.superclass.constructor.call(this);
  66222. this.hT = "02";
  66223. /**
  66224. * set value by Tom Wu's BigInteger object
  66225. * @name setByBigInteger
  66226. * @memberOf KJUR.asn1.DERInteger#
  66227. * @function
  66228. * @param {BigInteger} bigIntegerValue to set
  66229. */
  66230. this.setByBigInteger = function (bigIntegerValue) {
  66231. this.hTLV = null;
  66232. this.isModified = true;
  66233. this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);
  66234. };
  66235. /**
  66236. * set value by integer value
  66237. * @name setByInteger
  66238. * @memberOf KJUR.asn1.DERInteger
  66239. * @function
  66240. * @param {Integer} integer value to set
  66241. */
  66242. this.setByInteger = function (intValue) {
  66243. var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](String(intValue), 10);
  66244. this.setByBigInteger(bi);
  66245. };
  66246. /**
  66247. * set value by integer value
  66248. * @name setValueHex
  66249. * @memberOf KJUR.asn1.DERInteger#
  66250. * @function
  66251. * @param {String} hexadecimal string of integer value
  66252. * @description
  66253. * <br/>
  66254. * NOTE: Value shall be represented by minimum octet length of
  66255. * two's complement representation.
  66256. * @example
  66257. * new KJUR.asn1.DERInteger(123);
  66258. * new KJUR.asn1.DERInteger({'int': 123});
  66259. * new KJUR.asn1.DERInteger({'hex': '1fad'});
  66260. */
  66261. this.setValueHex = function (newHexString) {
  66262. this.hV = newHexString;
  66263. };
  66264. this.getFreshValueHex = function () {
  66265. return this.hV;
  66266. };
  66267. if (typeof params != "undefined") {
  66268. if (typeof params['bigint'] != "undefined") {
  66269. this.setByBigInteger(params['bigint']);
  66270. }
  66271. else if (typeof params['int'] != "undefined") {
  66272. this.setByInteger(params['int']);
  66273. }
  66274. else if (typeof params == "number") {
  66275. this.setByInteger(params);
  66276. }
  66277. else if (typeof params['hex'] != "undefined") {
  66278. this.setValueHex(params['hex']);
  66279. }
  66280. }
  66281. };
  66282. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);
  66283. // ********************************************************************
  66284. /**
  66285. * class for ASN.1 DER encoded BitString primitive
  66286. * @name KJUR.asn1.DERBitString
  66287. * @class class for ASN.1 DER encoded BitString primitive
  66288. * @extends KJUR.asn1.ASN1Object
  66289. * @description
  66290. * <br/>
  66291. * As for argument 'params' for constructor, you can specify one of
  66292. * following properties:
  66293. * <ul>
  66294. * <li>bin - specify binary string (ex. '10111')</li>
  66295. * <li>array - specify array of boolean (ex. [true,false,true,true])</li>
  66296. * <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>
  66297. * <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}
  66298. * argument for "BitString encapsulates" structure.</li>
  66299. * </ul>
  66300. * NOTE1: 'params' can be omitted.<br/>
  66301. * NOTE2: 'obj' parameter have been supported since
  66302. * asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/>
  66303. * @example
  66304. * // default constructor
  66305. * o = new KJUR.asn1.DERBitString();
  66306. * // initialize with binary string
  66307. * o = new KJUR.asn1.DERBitString({bin: "1011"});
  66308. * // initialize with boolean array
  66309. * o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});
  66310. * // initialize with hexadecimal string (04 is unused bits)
  66311. * o = new KJUR.asn1.DEROctetString({hex: "04bac0"});
  66312. * // initialize with ASN1Util.newObject argument for encapsulated
  66313. * o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
  66314. * // above generates a ASN.1 data like this:
  66315. * // BIT STRING, encapsulates {
  66316. * // SEQUENCE {
  66317. * // INTEGER 3
  66318. * // PrintableString 'aaa'
  66319. * // }
  66320. * // }
  66321. */
  66322. KJUR.asn1.DERBitString = function (params) {
  66323. if (params !== undefined && typeof params.obj !== "undefined") {
  66324. var o = KJUR.asn1.ASN1Util.newObject(params.obj);
  66325. params.hex = "00" + o.getEncodedHex();
  66326. }
  66327. KJUR.asn1.DERBitString.superclass.constructor.call(this);
  66328. this.hT = "03";
  66329. /**
  66330. * set ASN.1 value(V) by a hexadecimal string including unused bits
  66331. * @name setHexValueIncludingUnusedBits
  66332. * @memberOf KJUR.asn1.DERBitString#
  66333. * @function
  66334. * @param {String} newHexStringIncludingUnusedBits
  66335. */
  66336. this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {
  66337. this.hTLV = null;
  66338. this.isModified = true;
  66339. this.hV = newHexStringIncludingUnusedBits;
  66340. };
  66341. /**
  66342. * set ASN.1 value(V) by unused bit and hexadecimal string of value
  66343. * @name setUnusedBitsAndHexValue
  66344. * @memberOf KJUR.asn1.DERBitString#
  66345. * @function
  66346. * @param {Integer} unusedBits
  66347. * @param {String} hValue
  66348. */
  66349. this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {
  66350. if (unusedBits < 0 || 7 < unusedBits) {
  66351. throw "unused bits shall be from 0 to 7: u = " + unusedBits;
  66352. }
  66353. var hUnusedBits = "0" + unusedBits;
  66354. this.hTLV = null;
  66355. this.isModified = true;
  66356. this.hV = hUnusedBits + hValue;
  66357. };
  66358. /**
  66359. * set ASN.1 DER BitString by binary string<br/>
  66360. * @name setByBinaryString
  66361. * @memberOf KJUR.asn1.DERBitString#
  66362. * @function
  66363. * @param {String} binaryString binary value string (i.e. '10111')
  66364. * @description
  66365. * Its unused bits will be calculated automatically by length of
  66366. * 'binaryValue'. <br/>
  66367. * NOTE: Trailing zeros '0' will be ignored.
  66368. * @example
  66369. * o = new KJUR.asn1.DERBitString();
  66370. * o.setByBooleanArray("01011");
  66371. */
  66372. this.setByBinaryString = function (binaryString) {
  66373. binaryString = binaryString.replace(/0+$/, '');
  66374. var unusedBits = 8 - binaryString.length % 8;
  66375. if (unusedBits == 8)
  66376. unusedBits = 0;
  66377. for (var i = 0; i <= unusedBits; i++) {
  66378. binaryString += '0';
  66379. }
  66380. var h = '';
  66381. for (var i = 0; i < binaryString.length - 1; i += 8) {
  66382. var b = binaryString.substr(i, 8);
  66383. var x = parseInt(b, 2).toString(16);
  66384. if (x.length == 1)
  66385. x = '0' + x;
  66386. h += x;
  66387. }
  66388. this.hTLV = null;
  66389. this.isModified = true;
  66390. this.hV = '0' + unusedBits + h;
  66391. };
  66392. /**
  66393. * set ASN.1 TLV value(V) by an array of boolean<br/>
  66394. * @name setByBooleanArray
  66395. * @memberOf KJUR.asn1.DERBitString#
  66396. * @function
  66397. * @param {array} booleanArray array of boolean (ex. [true, false, true])
  66398. * @description
  66399. * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.
  66400. * @example
  66401. * o = new KJUR.asn1.DERBitString();
  66402. * o.setByBooleanArray([false, true, false, true, true]);
  66403. */
  66404. this.setByBooleanArray = function (booleanArray) {
  66405. var s = '';
  66406. for (var i = 0; i < booleanArray.length; i++) {
  66407. if (booleanArray[i] == true) {
  66408. s += '1';
  66409. }
  66410. else {
  66411. s += '0';
  66412. }
  66413. }
  66414. this.setByBinaryString(s);
  66415. };
  66416. /**
  66417. * generate an array of falses with specified length<br/>
  66418. * @name newFalseArray
  66419. * @memberOf KJUR.asn1.DERBitString
  66420. * @function
  66421. * @param {Integer} nLength length of array to generate
  66422. * @return {array} array of boolean falses
  66423. * @description
  66424. * This static method may be useful to initialize boolean array.
  66425. * @example
  66426. * o = new KJUR.asn1.DERBitString();
  66427. * o.newFalseArray(3) &rarr; [false, false, false]
  66428. */
  66429. this.newFalseArray = function (nLength) {
  66430. var a = new Array(nLength);
  66431. for (var i = 0; i < nLength; i++) {
  66432. a[i] = false;
  66433. }
  66434. return a;
  66435. };
  66436. this.getFreshValueHex = function () {
  66437. return this.hV;
  66438. };
  66439. if (typeof params != "undefined") {
  66440. if (typeof params == "string" && params.toLowerCase().match(/^[0-9a-f]+$/)) {
  66441. this.setHexValueIncludingUnusedBits(params);
  66442. }
  66443. else if (typeof params['hex'] != "undefined") {
  66444. this.setHexValueIncludingUnusedBits(params['hex']);
  66445. }
  66446. else if (typeof params['bin'] != "undefined") {
  66447. this.setByBinaryString(params['bin']);
  66448. }
  66449. else if (typeof params['array'] != "undefined") {
  66450. this.setByBooleanArray(params['array']);
  66451. }
  66452. }
  66453. };
  66454. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);
  66455. // ********************************************************************
  66456. /**
  66457. * class for ASN.1 DER OctetString<br/>
  66458. * @name KJUR.asn1.DEROctetString
  66459. * @class class for ASN.1 DER OctetString
  66460. * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
  66461. * @extends KJUR.asn1.DERAbstractString
  66462. * @description
  66463. * This class provides ASN.1 OctetString simple type.<br/>
  66464. * Supported "params" attributes are:
  66465. * <ul>
  66466. * <li>str - to set a string as a value</li>
  66467. * <li>hex - to set a hexadecimal string as a value</li>
  66468. * <li>obj - to set a encapsulated ASN.1 value by JSON object
  66469. * which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>
  66470. * </ul>
  66471. * NOTE: A parameter 'obj' have been supported
  66472. * for "OCTET STRING, encapsulates" structure.
  66473. * since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).
  66474. * @see KJUR.asn1.DERAbstractString - superclass
  66475. * @example
  66476. * // default constructor
  66477. * o = new KJUR.asn1.DEROctetString();
  66478. * // initialize with string
  66479. * o = new KJUR.asn1.DEROctetString({str: "aaa"});
  66480. * // initialize with hexadecimal string
  66481. * o = new KJUR.asn1.DEROctetString({hex: "616161"});
  66482. * // initialize with ASN1Util.newObject argument
  66483. * o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
  66484. * // above generates a ASN.1 data like this:
  66485. * // OCTET STRING, encapsulates {
  66486. * // SEQUENCE {
  66487. * // INTEGER 3
  66488. * // PrintableString 'aaa'
  66489. * // }
  66490. * // }
  66491. */
  66492. KJUR.asn1.DEROctetString = function (params) {
  66493. if (params !== undefined && typeof params.obj !== "undefined") {
  66494. var o = KJUR.asn1.ASN1Util.newObject(params.obj);
  66495. params.hex = o.getEncodedHex();
  66496. }
  66497. KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);
  66498. this.hT = "04";
  66499. };
  66500. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);
  66501. // ********************************************************************
  66502. /**
  66503. * class for ASN.1 DER Null
  66504. * @name KJUR.asn1.DERNull
  66505. * @class class for ASN.1 DER Null
  66506. * @extends KJUR.asn1.ASN1Object
  66507. * @description
  66508. * @see KJUR.asn1.ASN1Object - superclass
  66509. */
  66510. KJUR.asn1.DERNull = function () {
  66511. KJUR.asn1.DERNull.superclass.constructor.call(this);
  66512. this.hT = "05";
  66513. this.hTLV = "0500";
  66514. };
  66515. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);
  66516. // ********************************************************************
  66517. /**
  66518. * class for ASN.1 DER ObjectIdentifier
  66519. * @name KJUR.asn1.DERObjectIdentifier
  66520. * @class class for ASN.1 DER ObjectIdentifier
  66521. * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})
  66522. * @extends KJUR.asn1.ASN1Object
  66523. * @description
  66524. * <br/>
  66525. * As for argument 'params' for constructor, you can specify one of
  66526. * following properties:
  66527. * <ul>
  66528. * <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>
  66529. * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
  66530. * </ul>
  66531. * NOTE: 'params' can be omitted.
  66532. */
  66533. KJUR.asn1.DERObjectIdentifier = function (params) {
  66534. var itox = function (i) {
  66535. var h = i.toString(16);
  66536. if (h.length == 1)
  66537. h = '0' + h;
  66538. return h;
  66539. };
  66540. var roidtox = function (roid) {
  66541. var h = '';
  66542. var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](roid, 10);
  66543. var b = bi.toString(2);
  66544. var padLen = 7 - b.length % 7;
  66545. if (padLen == 7)
  66546. padLen = 0;
  66547. var bPad = '';
  66548. for (var i = 0; i < padLen; i++)
  66549. bPad += '0';
  66550. b = bPad + b;
  66551. for (var i = 0; i < b.length - 1; i += 7) {
  66552. var b8 = b.substr(i, 7);
  66553. if (i != b.length - 7)
  66554. b8 = '1' + b8;
  66555. h += itox(parseInt(b8, 2));
  66556. }
  66557. return h;
  66558. };
  66559. KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);
  66560. this.hT = "06";
  66561. /**
  66562. * set value by a hexadecimal string
  66563. * @name setValueHex
  66564. * @memberOf KJUR.asn1.DERObjectIdentifier#
  66565. * @function
  66566. * @param {String} newHexString hexadecimal value of OID bytes
  66567. */
  66568. this.setValueHex = function (newHexString) {
  66569. this.hTLV = null;
  66570. this.isModified = true;
  66571. this.s = null;
  66572. this.hV = newHexString;
  66573. };
  66574. /**
  66575. * set value by a OID string<br/>
  66576. * @name setValueOidString
  66577. * @memberOf KJUR.asn1.DERObjectIdentifier#
  66578. * @function
  66579. * @param {String} oidString OID string (ex. 2.5.4.13)
  66580. * @example
  66581. * o = new KJUR.asn1.DERObjectIdentifier();
  66582. * o.setValueOidString("2.5.4.13");
  66583. */
  66584. this.setValueOidString = function (oidString) {
  66585. if (!oidString.match(/^[0-9.]+$/)) {
  66586. throw "malformed oid string: " + oidString;
  66587. }
  66588. var h = '';
  66589. var a = oidString.split('.');
  66590. var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);
  66591. h += itox(i0);
  66592. a.splice(0, 2);
  66593. for (var i = 0; i < a.length; i++) {
  66594. h += roidtox(a[i]);
  66595. }
  66596. this.hTLV = null;
  66597. this.isModified = true;
  66598. this.s = null;
  66599. this.hV = h;
  66600. };
  66601. /**
  66602. * set value by a OID name
  66603. * @name setValueName
  66604. * @memberOf KJUR.asn1.DERObjectIdentifier#
  66605. * @function
  66606. * @param {String} oidName OID name (ex. 'serverAuth')
  66607. * @since 1.0.1
  66608. * @description
  66609. * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.
  66610. * Otherwise raise error.
  66611. * @example
  66612. * o = new KJUR.asn1.DERObjectIdentifier();
  66613. * o.setValueName("serverAuth");
  66614. */
  66615. this.setValueName = function (oidName) {
  66616. var oid = KJUR.asn1.x509.OID.name2oid(oidName);
  66617. if (oid !== '') {
  66618. this.setValueOidString(oid);
  66619. }
  66620. else {
  66621. throw "DERObjectIdentifier oidName undefined: " + oidName;
  66622. }
  66623. };
  66624. this.getFreshValueHex = function () {
  66625. return this.hV;
  66626. };
  66627. if (params !== undefined) {
  66628. if (typeof params === "string") {
  66629. if (params.match(/^[0-2].[0-9.]+$/)) {
  66630. this.setValueOidString(params);
  66631. }
  66632. else {
  66633. this.setValueName(params);
  66634. }
  66635. }
  66636. else if (params.oid !== undefined) {
  66637. this.setValueOidString(params.oid);
  66638. }
  66639. else if (params.hex !== undefined) {
  66640. this.setValueHex(params.hex);
  66641. }
  66642. else if (params.name !== undefined) {
  66643. this.setValueName(params.name);
  66644. }
  66645. }
  66646. };
  66647. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);
  66648. // ********************************************************************
  66649. /**
  66650. * class for ASN.1 DER Enumerated
  66651. * @name KJUR.asn1.DEREnumerated
  66652. * @class class for ASN.1 DER Enumerated
  66653. * @extends KJUR.asn1.ASN1Object
  66654. * @description
  66655. * <br/>
  66656. * As for argument 'params' for constructor, you can specify one of
  66657. * following properties:
  66658. * <ul>
  66659. * <li>int - specify initial ASN.1 value(V) by integer value</li>
  66660. * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
  66661. * </ul>
  66662. * NOTE: 'params' can be omitted.
  66663. * @example
  66664. * new KJUR.asn1.DEREnumerated(123);
  66665. * new KJUR.asn1.DEREnumerated({int: 123});
  66666. * new KJUR.asn1.DEREnumerated({hex: '1fad'});
  66667. */
  66668. KJUR.asn1.DEREnumerated = function (params) {
  66669. KJUR.asn1.DEREnumerated.superclass.constructor.call(this);
  66670. this.hT = "0a";
  66671. /**
  66672. * set value by Tom Wu's BigInteger object
  66673. * @name setByBigInteger
  66674. * @memberOf KJUR.asn1.DEREnumerated#
  66675. * @function
  66676. * @param {BigInteger} bigIntegerValue to set
  66677. */
  66678. this.setByBigInteger = function (bigIntegerValue) {
  66679. this.hTLV = null;
  66680. this.isModified = true;
  66681. this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);
  66682. };
  66683. /**
  66684. * set value by integer value
  66685. * @name setByInteger
  66686. * @memberOf KJUR.asn1.DEREnumerated#
  66687. * @function
  66688. * @param {Integer} integer value to set
  66689. */
  66690. this.setByInteger = function (intValue) {
  66691. var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__["BigInteger"](String(intValue), 10);
  66692. this.setByBigInteger(bi);
  66693. };
  66694. /**
  66695. * set value by integer value
  66696. * @name setValueHex
  66697. * @memberOf KJUR.asn1.DEREnumerated#
  66698. * @function
  66699. * @param {String} hexadecimal string of integer value
  66700. * @description
  66701. * <br/>
  66702. * NOTE: Value shall be represented by minimum octet length of
  66703. * two's complement representation.
  66704. */
  66705. this.setValueHex = function (newHexString) {
  66706. this.hV = newHexString;
  66707. };
  66708. this.getFreshValueHex = function () {
  66709. return this.hV;
  66710. };
  66711. if (typeof params != "undefined") {
  66712. if (typeof params['int'] != "undefined") {
  66713. this.setByInteger(params['int']);
  66714. }
  66715. else if (typeof params == "number") {
  66716. this.setByInteger(params);
  66717. }
  66718. else if (typeof params['hex'] != "undefined") {
  66719. this.setValueHex(params['hex']);
  66720. }
  66721. }
  66722. };
  66723. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);
  66724. // ********************************************************************
  66725. /**
  66726. * class for ASN.1 DER UTF8String
  66727. * @name KJUR.asn1.DERUTF8String
  66728. * @class class for ASN.1 DER UTF8String
  66729. * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
  66730. * @extends KJUR.asn1.DERAbstractString
  66731. * @description
  66732. * @see KJUR.asn1.DERAbstractString - superclass
  66733. */
  66734. KJUR.asn1.DERUTF8String = function (params) {
  66735. KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);
  66736. this.hT = "0c";
  66737. };
  66738. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);
  66739. // ********************************************************************
  66740. /**
  66741. * class for ASN.1 DER NumericString
  66742. * @name KJUR.asn1.DERNumericString
  66743. * @class class for ASN.1 DER NumericString
  66744. * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
  66745. * @extends KJUR.asn1.DERAbstractString
  66746. * @description
  66747. * @see KJUR.asn1.DERAbstractString - superclass
  66748. */
  66749. KJUR.asn1.DERNumericString = function (params) {
  66750. KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);
  66751. this.hT = "12";
  66752. };
  66753. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);
  66754. // ********************************************************************
  66755. /**
  66756. * class for ASN.1 DER PrintableString
  66757. * @name KJUR.asn1.DERPrintableString
  66758. * @class class for ASN.1 DER PrintableString
  66759. * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
  66760. * @extends KJUR.asn1.DERAbstractString
  66761. * @description
  66762. * @see KJUR.asn1.DERAbstractString - superclass
  66763. */
  66764. KJUR.asn1.DERPrintableString = function (params) {
  66765. KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);
  66766. this.hT = "13";
  66767. };
  66768. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);
  66769. // ********************************************************************
  66770. /**
  66771. * class for ASN.1 DER TeletexString
  66772. * @name KJUR.asn1.DERTeletexString
  66773. * @class class for ASN.1 DER TeletexString
  66774. * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
  66775. * @extends KJUR.asn1.DERAbstractString
  66776. * @description
  66777. * @see KJUR.asn1.DERAbstractString - superclass
  66778. */
  66779. KJUR.asn1.DERTeletexString = function (params) {
  66780. KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);
  66781. this.hT = "14";
  66782. };
  66783. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);
  66784. // ********************************************************************
  66785. /**
  66786. * class for ASN.1 DER IA5String
  66787. * @name KJUR.asn1.DERIA5String
  66788. * @class class for ASN.1 DER IA5String
  66789. * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
  66790. * @extends KJUR.asn1.DERAbstractString
  66791. * @description
  66792. * @see KJUR.asn1.DERAbstractString - superclass
  66793. */
  66794. KJUR.asn1.DERIA5String = function (params) {
  66795. KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);
  66796. this.hT = "16";
  66797. };
  66798. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);
  66799. // ********************************************************************
  66800. /**
  66801. * class for ASN.1 DER UTCTime
  66802. * @name KJUR.asn1.DERUTCTime
  66803. * @class class for ASN.1 DER UTCTime
  66804. * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
  66805. * @extends KJUR.asn1.DERAbstractTime
  66806. * @description
  66807. * <br/>
  66808. * As for argument 'params' for constructor, you can specify one of
  66809. * following properties:
  66810. * <ul>
  66811. * <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>
  66812. * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
  66813. * <li>date - specify Date object.</li>
  66814. * </ul>
  66815. * NOTE: 'params' can be omitted.
  66816. * <h4>EXAMPLES</h4>
  66817. * @example
  66818. * d1 = new KJUR.asn1.DERUTCTime();
  66819. * d1.setString('130430125959Z');
  66820. *
  66821. * d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});
  66822. * d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});
  66823. * d4 = new KJUR.asn1.DERUTCTime('130430125959Z');
  66824. */
  66825. KJUR.asn1.DERUTCTime = function (params) {
  66826. KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);
  66827. this.hT = "17";
  66828. /**
  66829. * set value by a Date object<br/>
  66830. * @name setByDate
  66831. * @memberOf KJUR.asn1.DERUTCTime#
  66832. * @function
  66833. * @param {Date} dateObject Date object to set ASN.1 value(V)
  66834. * @example
  66835. * o = new KJUR.asn1.DERUTCTime();
  66836. * o.setByDate(new Date("2016/12/31"));
  66837. */
  66838. this.setByDate = function (dateObject) {
  66839. this.hTLV = null;
  66840. this.isModified = true;
  66841. this.date = dateObject;
  66842. this.s = this.formatDate(this.date, 'utc');
  66843. this.hV = stohex(this.s);
  66844. };
  66845. this.getFreshValueHex = function () {
  66846. if (typeof this.date == "undefined" && typeof this.s == "undefined") {
  66847. this.date = new Date();
  66848. this.s = this.formatDate(this.date, 'utc');
  66849. this.hV = stohex(this.s);
  66850. }
  66851. return this.hV;
  66852. };
  66853. if (params !== undefined) {
  66854. if (params.str !== undefined) {
  66855. this.setString(params.str);
  66856. }
  66857. else if (typeof params == "string" && params.match(/^[0-9]{12}Z$/)) {
  66858. this.setString(params);
  66859. }
  66860. else if (params.hex !== undefined) {
  66861. this.setStringHex(params.hex);
  66862. }
  66863. else if (params.date !== undefined) {
  66864. this.setByDate(params.date);
  66865. }
  66866. }
  66867. };
  66868. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);
  66869. // ********************************************************************
  66870. /**
  66871. * class for ASN.1 DER GeneralizedTime
  66872. * @name KJUR.asn1.DERGeneralizedTime
  66873. * @class class for ASN.1 DER GeneralizedTime
  66874. * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})
  66875. * @property {Boolean} withMillis flag to show milliseconds or not
  66876. * @extends KJUR.asn1.DERAbstractTime
  66877. * @description
  66878. * <br/>
  66879. * As for argument 'params' for constructor, you can specify one of
  66880. * following properties:
  66881. * <ul>
  66882. * <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>
  66883. * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
  66884. * <li>date - specify Date object.</li>
  66885. * <li>millis - specify flag to show milliseconds (from 1.0.6)</li>
  66886. * </ul>
  66887. * NOTE1: 'params' can be omitted.
  66888. * NOTE2: 'withMillis' property is supported from asn1 1.0.6.
  66889. */
  66890. KJUR.asn1.DERGeneralizedTime = function (params) {
  66891. KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);
  66892. this.hT = "18";
  66893. this.withMillis = false;
  66894. /**
  66895. * set value by a Date object
  66896. * @name setByDate
  66897. * @memberOf KJUR.asn1.DERGeneralizedTime#
  66898. * @function
  66899. * @param {Date} dateObject Date object to set ASN.1 value(V)
  66900. * @example
  66901. * When you specify UTC time, use 'Date.UTC' method like this:<br/>
  66902. * o1 = new DERUTCTime();
  66903. * o1.setByDate(date);
  66904. *
  66905. * date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59
  66906. */
  66907. this.setByDate = function (dateObject) {
  66908. this.hTLV = null;
  66909. this.isModified = true;
  66910. this.date = dateObject;
  66911. this.s = this.formatDate(this.date, 'gen', this.withMillis);
  66912. this.hV = stohex(this.s);
  66913. };
  66914. this.getFreshValueHex = function () {
  66915. if (this.date === undefined && this.s === undefined) {
  66916. this.date = new Date();
  66917. this.s = this.formatDate(this.date, 'gen', this.withMillis);
  66918. this.hV = stohex(this.s);
  66919. }
  66920. return this.hV;
  66921. };
  66922. if (params !== undefined) {
  66923. if (params.str !== undefined) {
  66924. this.setString(params.str);
  66925. }
  66926. else if (typeof params == "string" && params.match(/^[0-9]{14}Z$/)) {
  66927. this.setString(params);
  66928. }
  66929. else if (params.hex !== undefined) {
  66930. this.setStringHex(params.hex);
  66931. }
  66932. else if (params.date !== undefined) {
  66933. this.setByDate(params.date);
  66934. }
  66935. if (params.millis === true) {
  66936. this.withMillis = true;
  66937. }
  66938. }
  66939. };
  66940. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);
  66941. // ********************************************************************
  66942. /**
  66943. * class for ASN.1 DER Sequence
  66944. * @name KJUR.asn1.DERSequence
  66945. * @class class for ASN.1 DER Sequence
  66946. * @extends KJUR.asn1.DERAbstractStructured
  66947. * @description
  66948. * <br/>
  66949. * As for argument 'params' for constructor, you can specify one of
  66950. * following properties:
  66951. * <ul>
  66952. * <li>array - specify array of ASN1Object to set elements of content</li>
  66953. * </ul>
  66954. * NOTE: 'params' can be omitted.
  66955. */
  66956. KJUR.asn1.DERSequence = function (params) {
  66957. KJUR.asn1.DERSequence.superclass.constructor.call(this, params);
  66958. this.hT = "30";
  66959. this.getFreshValueHex = function () {
  66960. var h = '';
  66961. for (var i = 0; i < this.asn1Array.length; i++) {
  66962. var asn1Obj = this.asn1Array[i];
  66963. h += asn1Obj.getEncodedHex();
  66964. }
  66965. this.hV = h;
  66966. return this.hV;
  66967. };
  66968. };
  66969. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);
  66970. // ********************************************************************
  66971. /**
  66972. * class for ASN.1 DER Set
  66973. * @name KJUR.asn1.DERSet
  66974. * @class class for ASN.1 DER Set
  66975. * @extends KJUR.asn1.DERAbstractStructured
  66976. * @description
  66977. * <br/>
  66978. * As for argument 'params' for constructor, you can specify one of
  66979. * following properties:
  66980. * <ul>
  66981. * <li>array - specify array of ASN1Object to set elements of content</li>
  66982. * <li>sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.</li>
  66983. * </ul>
  66984. * NOTE1: 'params' can be omitted.<br/>
  66985. * NOTE2: sortflag is supported since 1.0.5.
  66986. */
  66987. KJUR.asn1.DERSet = function (params) {
  66988. KJUR.asn1.DERSet.superclass.constructor.call(this, params);
  66989. this.hT = "31";
  66990. this.sortFlag = true; // item shall be sorted only in ASN.1 DER
  66991. this.getFreshValueHex = function () {
  66992. var a = new Array();
  66993. for (var i = 0; i < this.asn1Array.length; i++) {
  66994. var asn1Obj = this.asn1Array[i];
  66995. a.push(asn1Obj.getEncodedHex());
  66996. }
  66997. if (this.sortFlag == true)
  66998. a.sort();
  66999. this.hV = a.join('');
  67000. return this.hV;
  67001. };
  67002. if (typeof params != "undefined") {
  67003. if (typeof params.sortflag != "undefined" &&
  67004. params.sortflag == false)
  67005. this.sortFlag = false;
  67006. }
  67007. };
  67008. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);
  67009. // ********************************************************************
  67010. /**
  67011. * class for ASN.1 DER TaggedObject
  67012. * @name KJUR.asn1.DERTaggedObject
  67013. * @class class for ASN.1 DER TaggedObject
  67014. * @extends KJUR.asn1.ASN1Object
  67015. * @description
  67016. * <br/>
  67017. * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.
  67018. * For example, if you find '[1]' tag in a ASN.1 dump,
  67019. * 'tagNoHex' will be 'a1'.
  67020. * <br/>
  67021. * As for optional argument 'params' for constructor, you can specify *ANY* of
  67022. * following properties:
  67023. * <ul>
  67024. * <li>explicit - specify true if this is explicit tag otherwise false
  67025. * (default is 'true').</li>
  67026. * <li>tag - specify tag (default is 'a0' which means [0])</li>
  67027. * <li>obj - specify ASN1Object which is tagged</li>
  67028. * </ul>
  67029. * @example
  67030. * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});
  67031. * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});
  67032. * hex = d2.getEncodedHex();
  67033. */
  67034. KJUR.asn1.DERTaggedObject = function (params) {
  67035. KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);
  67036. this.hT = "a0";
  67037. this.hV = '';
  67038. this.isExplicit = true;
  67039. this.asn1Object = null;
  67040. /**
  67041. * set value by an ASN1Object
  67042. * @name setString
  67043. * @memberOf KJUR.asn1.DERTaggedObject#
  67044. * @function
  67045. * @param {Boolean} isExplicitFlag flag for explicit/implicit tag
  67046. * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag
  67047. * @param {ASN1Object} asn1Object ASN.1 to encapsulate
  67048. */
  67049. this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {
  67050. this.hT = tagNoHex;
  67051. this.isExplicit = isExplicitFlag;
  67052. this.asn1Object = asn1Object;
  67053. if (this.isExplicit) {
  67054. this.hV = this.asn1Object.getEncodedHex();
  67055. this.hTLV = null;
  67056. this.isModified = true;
  67057. }
  67058. else {
  67059. this.hV = null;
  67060. this.hTLV = asn1Object.getEncodedHex();
  67061. this.hTLV = this.hTLV.replace(/^../, tagNoHex);
  67062. this.isModified = false;
  67063. }
  67064. };
  67065. this.getFreshValueHex = function () {
  67066. return this.hV;
  67067. };
  67068. if (typeof params != "undefined") {
  67069. if (typeof params['tag'] != "undefined") {
  67070. this.hT = params['tag'];
  67071. }
  67072. if (typeof params['explicit'] != "undefined") {
  67073. this.isExplicit = params['explicit'];
  67074. }
  67075. if (typeof params['obj'] != "undefined") {
  67076. this.asn1Object = params['obj'];
  67077. this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);
  67078. }
  67079. }
  67080. };
  67081. _yahoo__WEBPACK_IMPORTED_MODULE_1__["YAHOO"].lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);
  67082. /***/ }),
  67083. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsrsasign/yahoo.js":
  67084. /*!****************************************************************************!*\
  67085. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/lib/jsrsasign/yahoo.js ***!
  67086. \****************************************************************************/
  67087. /*! exports provided: YAHOO */
  67088. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  67089. "use strict";
  67090. __webpack_require__.r(__webpack_exports__);
  67091. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "YAHOO", function() { return YAHOO; });
  67092. /*!
  67093. Copyright (c) 2011, Yahoo! Inc. All rights reserved.
  67094. Code licensed under the BSD License:
  67095. http://developer.yahoo.com/yui/license.html
  67096. version: 2.9.0
  67097. */
  67098. var YAHOO = {};
  67099. YAHOO.lang = {
  67100. /**
  67101. * Utility to set up the prototype, constructor and superclass properties to
  67102. * support an inheritance strategy that can chain constructors and methods.
  67103. * Static members will not be inherited.
  67104. *
  67105. * @method extend
  67106. * @static
  67107. * @param {Function} subc the object to modify
  67108. * @param {Function} superc the object to inherit
  67109. * @param {Object} overrides additional properties/methods to add to the
  67110. * subclass prototype. These will override the
  67111. * matching items obtained from the superclass
  67112. * if present.
  67113. */
  67114. extend: function (subc, superc, overrides) {
  67115. if (!superc || !subc) {
  67116. throw new Error("YAHOO.lang.extend failed, please check that " +
  67117. "all dependencies are included.");
  67118. }
  67119. var F = function () { };
  67120. F.prototype = superc.prototype;
  67121. subc.prototype = new F();
  67122. subc.prototype.constructor = subc;
  67123. subc.superclass = superc.prototype;
  67124. if (superc.prototype.constructor == Object.prototype.constructor) {
  67125. superc.prototype.constructor = superc;
  67126. }
  67127. if (overrides) {
  67128. var i;
  67129. for (i in overrides) {
  67130. subc.prototype[i] = overrides[i];
  67131. }
  67132. /*
  67133. * IE will not enumerate native functions in a derived object even if the
  67134. * function was overridden. This is a workaround for specific functions
  67135. * we care about on the Object prototype.
  67136. * @property _IEEnumFix
  67137. * @param {Function} r the object to receive the augmentation
  67138. * @param {Function} s the object that supplies the properties to augment
  67139. * @static
  67140. * @private
  67141. */
  67142. var _IEEnumFix = function () { }, ADD = ["toString", "valueOf"];
  67143. try {
  67144. if (/MSIE/.test(navigator.userAgent)) {
  67145. _IEEnumFix = function (r, s) {
  67146. for (i = 0; i < ADD.length; i = i + 1) {
  67147. var fname = ADD[i], f = s[fname];
  67148. if (typeof f === 'function' && f != Object.prototype[fname]) {
  67149. r[fname] = f;
  67150. }
  67151. }
  67152. };
  67153. }
  67154. }
  67155. catch (ex) { }
  67156. ;
  67157. _IEEnumFix(subc.prototype, overrides);
  67158. }
  67159. }
  67160. };
  67161. /***/ }),
  67162. /***/ "./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/version.json":
  67163. /*!******************************************************************!*\
  67164. !*** ./node_modules/_jsencrypt@3.2.1@jsencrypt/lib/version.json ***!
  67165. \******************************************************************/
  67166. /*! exports provided: version, default */
  67167. /***/ (function(module) {
  67168. module.exports = JSON.parse("{\"version\":\"3.2.1\"}");
  67169. /***/ }),
  67170. /***/ "./node_modules/_lodash@4.17.21@lodash/lodash.js":
  67171. /*!*******************************************************!*\
  67172. !*** ./node_modules/_lodash@4.17.21@lodash/lodash.js ***!
  67173. \*******************************************************/
  67174. /*! no static exports found */
  67175. /***/ (function(module, exports, __webpack_require__) {
  67176. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
  67177. * @license
  67178. * Lodash <https://lodash.com/>
  67179. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  67180. * Released under MIT license <https://lodash.com/license>
  67181. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  67182. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  67183. */
  67184. ;(function() {
  67185. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  67186. var undefined;
  67187. /** Used as the semantic version number. */
  67188. var VERSION = '4.17.21';
  67189. /** Used as the size to enable large array optimizations. */
  67190. var LARGE_ARRAY_SIZE = 200;
  67191. /** Error message constants. */
  67192. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  67193. FUNC_ERROR_TEXT = 'Expected a function',
  67194. INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
  67195. /** Used to stand-in for `undefined` hash values. */
  67196. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  67197. /** Used as the maximum memoize cache size. */
  67198. var MAX_MEMOIZE_SIZE = 500;
  67199. /** Used as the internal argument placeholder. */
  67200. var PLACEHOLDER = '__lodash_placeholder__';
  67201. /** Used to compose bitmasks for cloning. */
  67202. var CLONE_DEEP_FLAG = 1,
  67203. CLONE_FLAT_FLAG = 2,
  67204. CLONE_SYMBOLS_FLAG = 4;
  67205. /** Used to compose bitmasks for value comparisons. */
  67206. var COMPARE_PARTIAL_FLAG = 1,
  67207. COMPARE_UNORDERED_FLAG = 2;
  67208. /** Used to compose bitmasks for function metadata. */
  67209. var WRAP_BIND_FLAG = 1,
  67210. WRAP_BIND_KEY_FLAG = 2,
  67211. WRAP_CURRY_BOUND_FLAG = 4,
  67212. WRAP_CURRY_FLAG = 8,
  67213. WRAP_CURRY_RIGHT_FLAG = 16,
  67214. WRAP_PARTIAL_FLAG = 32,
  67215. WRAP_PARTIAL_RIGHT_FLAG = 64,
  67216. WRAP_ARY_FLAG = 128,
  67217. WRAP_REARG_FLAG = 256,
  67218. WRAP_FLIP_FLAG = 512;
  67219. /** Used as default options for `_.truncate`. */
  67220. var DEFAULT_TRUNC_LENGTH = 30,
  67221. DEFAULT_TRUNC_OMISSION = '...';
  67222. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  67223. var HOT_COUNT = 800,
  67224. HOT_SPAN = 16;
  67225. /** Used to indicate the type of lazy iteratees. */
  67226. var LAZY_FILTER_FLAG = 1,
  67227. LAZY_MAP_FLAG = 2,
  67228. LAZY_WHILE_FLAG = 3;
  67229. /** Used as references for various `Number` constants. */
  67230. var INFINITY = 1 / 0,
  67231. MAX_SAFE_INTEGER = 9007199254740991,
  67232. MAX_INTEGER = 1.7976931348623157e+308,
  67233. NAN = 0 / 0;
  67234. /** Used as references for the maximum length and index of an array. */
  67235. var MAX_ARRAY_LENGTH = 4294967295,
  67236. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  67237. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  67238. /** Used to associate wrap methods with their bit flags. */
  67239. var wrapFlags = [
  67240. ['ary', WRAP_ARY_FLAG],
  67241. ['bind', WRAP_BIND_FLAG],
  67242. ['bindKey', WRAP_BIND_KEY_FLAG],
  67243. ['curry', WRAP_CURRY_FLAG],
  67244. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  67245. ['flip', WRAP_FLIP_FLAG],
  67246. ['partial', WRAP_PARTIAL_FLAG],
  67247. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  67248. ['rearg', WRAP_REARG_FLAG]
  67249. ];
  67250. /** `Object#toString` result references. */
  67251. var argsTag = '[object Arguments]',
  67252. arrayTag = '[object Array]',
  67253. asyncTag = '[object AsyncFunction]',
  67254. boolTag = '[object Boolean]',
  67255. dateTag = '[object Date]',
  67256. domExcTag = '[object DOMException]',
  67257. errorTag = '[object Error]',
  67258. funcTag = '[object Function]',
  67259. genTag = '[object GeneratorFunction]',
  67260. mapTag = '[object Map]',
  67261. numberTag = '[object Number]',
  67262. nullTag = '[object Null]',
  67263. objectTag = '[object Object]',
  67264. promiseTag = '[object Promise]',
  67265. proxyTag = '[object Proxy]',
  67266. regexpTag = '[object RegExp]',
  67267. setTag = '[object Set]',
  67268. stringTag = '[object String]',
  67269. symbolTag = '[object Symbol]',
  67270. undefinedTag = '[object Undefined]',
  67271. weakMapTag = '[object WeakMap]',
  67272. weakSetTag = '[object WeakSet]';
  67273. var arrayBufferTag = '[object ArrayBuffer]',
  67274. dataViewTag = '[object DataView]',
  67275. float32Tag = '[object Float32Array]',
  67276. float64Tag = '[object Float64Array]',
  67277. int8Tag = '[object Int8Array]',
  67278. int16Tag = '[object Int16Array]',
  67279. int32Tag = '[object Int32Array]',
  67280. uint8Tag = '[object Uint8Array]',
  67281. uint8ClampedTag = '[object Uint8ClampedArray]',
  67282. uint16Tag = '[object Uint16Array]',
  67283. uint32Tag = '[object Uint32Array]';
  67284. /** Used to match empty string literals in compiled template source. */
  67285. var reEmptyStringLeading = /\b__p \+= '';/g,
  67286. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  67287. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  67288. /** Used to match HTML entities and HTML characters. */
  67289. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  67290. reUnescapedHtml = /[&<>"']/g,
  67291. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  67292. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  67293. /** Used to match template delimiters. */
  67294. var reEscape = /<%-([\s\S]+?)%>/g,
  67295. reEvaluate = /<%([\s\S]+?)%>/g,
  67296. reInterpolate = /<%=([\s\S]+?)%>/g;
  67297. /** Used to match property names within property paths. */
  67298. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  67299. reIsPlainProp = /^\w*$/,
  67300. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  67301. /**
  67302. * Used to match `RegExp`
  67303. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  67304. */
  67305. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  67306. reHasRegExpChar = RegExp(reRegExpChar.source);
  67307. /** Used to match leading whitespace. */
  67308. var reTrimStart = /^\s+/;
  67309. /** Used to match a single whitespace character. */
  67310. var reWhitespace = /\s/;
  67311. /** Used to match wrap detail comments. */
  67312. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  67313. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  67314. reSplitDetails = /,? & /;
  67315. /** Used to match words composed of alphanumeric characters. */
  67316. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  67317. /**
  67318. * Used to validate the `validate` option in `_.template` variable.
  67319. *
  67320. * Forbids characters which could potentially change the meaning of the function argument definition:
  67321. * - "()," (modification of function parameters)
  67322. * - "=" (default value)
  67323. * - "[]{}" (destructuring of function parameters)
  67324. * - "/" (beginning of a comment)
  67325. * - whitespace
  67326. */
  67327. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  67328. /** Used to match backslashes in property paths. */
  67329. var reEscapeChar = /\\(\\)?/g;
  67330. /**
  67331. * Used to match
  67332. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  67333. */
  67334. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  67335. /** Used to match `RegExp` flags from their coerced string values. */
  67336. var reFlags = /\w*$/;
  67337. /** Used to detect bad signed hexadecimal string values. */
  67338. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  67339. /** Used to detect binary string values. */
  67340. var reIsBinary = /^0b[01]+$/i;
  67341. /** Used to detect host constructors (Safari). */
  67342. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  67343. /** Used to detect octal string values. */
  67344. var reIsOctal = /^0o[0-7]+$/i;
  67345. /** Used to detect unsigned integer values. */
  67346. var reIsUint = /^(?:0|[1-9]\d*)$/;
  67347. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  67348. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  67349. /** Used to ensure capturing order of template delimiters. */
  67350. var reNoMatch = /($^)/;
  67351. /** Used to match unescaped characters in compiled string literals. */
  67352. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  67353. /** Used to compose unicode character classes. */
  67354. var rsAstralRange = '\\ud800-\\udfff',
  67355. rsComboMarksRange = '\\u0300-\\u036f',
  67356. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  67357. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  67358. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  67359. rsDingbatRange = '\\u2700-\\u27bf',
  67360. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  67361. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  67362. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  67363. rsPunctuationRange = '\\u2000-\\u206f',
  67364. rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
  67365. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  67366. rsVarRange = '\\ufe0e\\ufe0f',
  67367. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  67368. /** Used to compose unicode capture groups. */
  67369. var rsApos = "['\u2019]",
  67370. rsAstral = '[' + rsAstralRange + ']',
  67371. rsBreak = '[' + rsBreakRange + ']',
  67372. rsCombo = '[' + rsComboRange + ']',
  67373. rsDigits = '\\d+',
  67374. rsDingbat = '[' + rsDingbatRange + ']',
  67375. rsLower = '[' + rsLowerRange + ']',
  67376. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  67377. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  67378. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  67379. rsNonAstral = '[^' + rsAstralRange + ']',
  67380. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  67381. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  67382. rsUpper = '[' + rsUpperRange + ']',
  67383. rsZWJ = '\\u200d';
  67384. /** Used to compose unicode regexes. */
  67385. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  67386. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  67387. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  67388. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  67389. reOptMod = rsModifier + '?',
  67390. rsOptVar = '[' + rsVarRange + ']?',
  67391. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  67392. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  67393. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  67394. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  67395. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  67396. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  67397. /** Used to match apostrophes. */
  67398. var reApos = RegExp(rsApos, 'g');
  67399. /**
  67400. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  67401. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  67402. */
  67403. var reComboMark = RegExp(rsCombo, 'g');
  67404. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  67405. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  67406. /** Used to match complex or compound words. */
  67407. var reUnicodeWord = RegExp([
  67408. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  67409. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  67410. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  67411. rsUpper + '+' + rsOptContrUpper,
  67412. rsOrdUpper,
  67413. rsOrdLower,
  67414. rsDigits,
  67415. rsEmoji
  67416. ].join('|'), 'g');
  67417. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  67418. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  67419. /** Used to detect strings that need a more robust regexp to match words. */
  67420. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  67421. /** Used to assign default `context` object properties. */
  67422. var contextProps = [
  67423. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  67424. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  67425. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  67426. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  67427. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  67428. ];
  67429. /** Used to make template sourceURLs easier to identify. */
  67430. var templateCounter = -1;
  67431. /** Used to identify `toStringTag` values of typed arrays. */
  67432. var typedArrayTags = {};
  67433. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  67434. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  67435. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  67436. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  67437. typedArrayTags[uint32Tag] = true;
  67438. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  67439. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  67440. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  67441. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  67442. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  67443. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  67444. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  67445. typedArrayTags[weakMapTag] = false;
  67446. /** Used to identify `toStringTag` values supported by `_.clone`. */
  67447. var cloneableTags = {};
  67448. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  67449. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  67450. cloneableTags[boolTag] = cloneableTags[dateTag] =
  67451. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  67452. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  67453. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  67454. cloneableTags[numberTag] = cloneableTags[objectTag] =
  67455. cloneableTags[regexpTag] = cloneableTags[setTag] =
  67456. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  67457. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  67458. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  67459. cloneableTags[errorTag] = cloneableTags[funcTag] =
  67460. cloneableTags[weakMapTag] = false;
  67461. /** Used to map Latin Unicode letters to basic Latin letters. */
  67462. var deburredLetters = {
  67463. // Latin-1 Supplement block.
  67464. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  67465. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  67466. '\xc7': 'C', '\xe7': 'c',
  67467. '\xd0': 'D', '\xf0': 'd',
  67468. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  67469. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  67470. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  67471. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  67472. '\xd1': 'N', '\xf1': 'n',
  67473. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  67474. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  67475. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  67476. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  67477. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  67478. '\xc6': 'Ae', '\xe6': 'ae',
  67479. '\xde': 'Th', '\xfe': 'th',
  67480. '\xdf': 'ss',
  67481. // Latin Extended-A block.
  67482. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  67483. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  67484. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  67485. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  67486. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  67487. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  67488. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  67489. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  67490. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  67491. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  67492. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  67493. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  67494. '\u0134': 'J', '\u0135': 'j',
  67495. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  67496. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  67497. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  67498. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  67499. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  67500. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  67501. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  67502. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  67503. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  67504. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  67505. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  67506. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  67507. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  67508. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  67509. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  67510. '\u0174': 'W', '\u0175': 'w',
  67511. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  67512. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  67513. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  67514. '\u0132': 'IJ', '\u0133': 'ij',
  67515. '\u0152': 'Oe', '\u0153': 'oe',
  67516. '\u0149': "'n", '\u017f': 's'
  67517. };
  67518. /** Used to map characters to HTML entities. */
  67519. var htmlEscapes = {
  67520. '&': '&amp;',
  67521. '<': '&lt;',
  67522. '>': '&gt;',
  67523. '"': '&quot;',
  67524. "'": '&#39;'
  67525. };
  67526. /** Used to map HTML entities to characters. */
  67527. var htmlUnescapes = {
  67528. '&amp;': '&',
  67529. '&lt;': '<',
  67530. '&gt;': '>',
  67531. '&quot;': '"',
  67532. '&#39;': "'"
  67533. };
  67534. /** Used to escape characters for inclusion in compiled string literals. */
  67535. var stringEscapes = {
  67536. '\\': '\\',
  67537. "'": "'",
  67538. '\n': 'n',
  67539. '\r': 'r',
  67540. '\u2028': 'u2028',
  67541. '\u2029': 'u2029'
  67542. };
  67543. /** Built-in method references without a dependency on `root`. */
  67544. var freeParseFloat = parseFloat,
  67545. freeParseInt = parseInt;
  67546. /** Detect free variable `global` from Node.js. */
  67547. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  67548. /** Detect free variable `self`. */
  67549. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  67550. /** Used as a reference to the global object. */
  67551. var root = freeGlobal || freeSelf || Function('return this')();
  67552. /** Detect free variable `exports`. */
  67553. var freeExports = true && exports && !exports.nodeType && exports;
  67554. /** Detect free variable `module`. */
  67555. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  67556. /** Detect the popular CommonJS extension `module.exports`. */
  67557. var moduleExports = freeModule && freeModule.exports === freeExports;
  67558. /** Detect free variable `process` from Node.js. */
  67559. var freeProcess = moduleExports && freeGlobal.process;
  67560. /** Used to access faster Node.js helpers. */
  67561. var nodeUtil = (function() {
  67562. try {
  67563. // Use `util.types` for Node.js 10+.
  67564. var types = freeModule && freeModule.require && freeModule.require('util').types;
  67565. if (types) {
  67566. return types;
  67567. }
  67568. // Legacy `process.binding('util')` for Node.js < 10.
  67569. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  67570. } catch (e) {}
  67571. }());
  67572. /* Node.js helper references. */
  67573. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  67574. nodeIsDate = nodeUtil && nodeUtil.isDate,
  67575. nodeIsMap = nodeUtil && nodeUtil.isMap,
  67576. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  67577. nodeIsSet = nodeUtil && nodeUtil.isSet,
  67578. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  67579. /*--------------------------------------------------------------------------*/
  67580. /**
  67581. * A faster alternative to `Function#apply`, this function invokes `func`
  67582. * with the `this` binding of `thisArg` and the arguments of `args`.
  67583. *
  67584. * @private
  67585. * @param {Function} func The function to invoke.
  67586. * @param {*} thisArg The `this` binding of `func`.
  67587. * @param {Array} args The arguments to invoke `func` with.
  67588. * @returns {*} Returns the result of `func`.
  67589. */
  67590. function apply(func, thisArg, args) {
  67591. switch (args.length) {
  67592. case 0: return func.call(thisArg);
  67593. case 1: return func.call(thisArg, args[0]);
  67594. case 2: return func.call(thisArg, args[0], args[1]);
  67595. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  67596. }
  67597. return func.apply(thisArg, args);
  67598. }
  67599. /**
  67600. * A specialized version of `baseAggregator` for arrays.
  67601. *
  67602. * @private
  67603. * @param {Array} [array] The array to iterate over.
  67604. * @param {Function} setter The function to set `accumulator` values.
  67605. * @param {Function} iteratee The iteratee to transform keys.
  67606. * @param {Object} accumulator The initial aggregated object.
  67607. * @returns {Function} Returns `accumulator`.
  67608. */
  67609. function arrayAggregator(array, setter, iteratee, accumulator) {
  67610. var index = -1,
  67611. length = array == null ? 0 : array.length;
  67612. while (++index < length) {
  67613. var value = array[index];
  67614. setter(accumulator, value, iteratee(value), array);
  67615. }
  67616. return accumulator;
  67617. }
  67618. /**
  67619. * A specialized version of `_.forEach` for arrays without support for
  67620. * iteratee shorthands.
  67621. *
  67622. * @private
  67623. * @param {Array} [array] The array to iterate over.
  67624. * @param {Function} iteratee The function invoked per iteration.
  67625. * @returns {Array} Returns `array`.
  67626. */
  67627. function arrayEach(array, iteratee) {
  67628. var index = -1,
  67629. length = array == null ? 0 : array.length;
  67630. while (++index < length) {
  67631. if (iteratee(array[index], index, array) === false) {
  67632. break;
  67633. }
  67634. }
  67635. return array;
  67636. }
  67637. /**
  67638. * A specialized version of `_.forEachRight` for arrays without support for
  67639. * iteratee shorthands.
  67640. *
  67641. * @private
  67642. * @param {Array} [array] The array to iterate over.
  67643. * @param {Function} iteratee The function invoked per iteration.
  67644. * @returns {Array} Returns `array`.
  67645. */
  67646. function arrayEachRight(array, iteratee) {
  67647. var length = array == null ? 0 : array.length;
  67648. while (length--) {
  67649. if (iteratee(array[length], length, array) === false) {
  67650. break;
  67651. }
  67652. }
  67653. return array;
  67654. }
  67655. /**
  67656. * A specialized version of `_.every` for arrays without support for
  67657. * iteratee shorthands.
  67658. *
  67659. * @private
  67660. * @param {Array} [array] The array to iterate over.
  67661. * @param {Function} predicate The function invoked per iteration.
  67662. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  67663. * else `false`.
  67664. */
  67665. function arrayEvery(array, predicate) {
  67666. var index = -1,
  67667. length = array == null ? 0 : array.length;
  67668. while (++index < length) {
  67669. if (!predicate(array[index], index, array)) {
  67670. return false;
  67671. }
  67672. }
  67673. return true;
  67674. }
  67675. /**
  67676. * A specialized version of `_.filter` for arrays without support for
  67677. * iteratee shorthands.
  67678. *
  67679. * @private
  67680. * @param {Array} [array] The array to iterate over.
  67681. * @param {Function} predicate The function invoked per iteration.
  67682. * @returns {Array} Returns the new filtered array.
  67683. */
  67684. function arrayFilter(array, predicate) {
  67685. var index = -1,
  67686. length = array == null ? 0 : array.length,
  67687. resIndex = 0,
  67688. result = [];
  67689. while (++index < length) {
  67690. var value = array[index];
  67691. if (predicate(value, index, array)) {
  67692. result[resIndex++] = value;
  67693. }
  67694. }
  67695. return result;
  67696. }
  67697. /**
  67698. * A specialized version of `_.includes` for arrays without support for
  67699. * specifying an index to search from.
  67700. *
  67701. * @private
  67702. * @param {Array} [array] The array to inspect.
  67703. * @param {*} target The value to search for.
  67704. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  67705. */
  67706. function arrayIncludes(array, value) {
  67707. var length = array == null ? 0 : array.length;
  67708. return !!length && baseIndexOf(array, value, 0) > -1;
  67709. }
  67710. /**
  67711. * This function is like `arrayIncludes` except that it accepts a comparator.
  67712. *
  67713. * @private
  67714. * @param {Array} [array] The array to inspect.
  67715. * @param {*} target The value to search for.
  67716. * @param {Function} comparator The comparator invoked per element.
  67717. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  67718. */
  67719. function arrayIncludesWith(array, value, comparator) {
  67720. var index = -1,
  67721. length = array == null ? 0 : array.length;
  67722. while (++index < length) {
  67723. if (comparator(value, array[index])) {
  67724. return true;
  67725. }
  67726. }
  67727. return false;
  67728. }
  67729. /**
  67730. * A specialized version of `_.map` for arrays without support for iteratee
  67731. * shorthands.
  67732. *
  67733. * @private
  67734. * @param {Array} [array] The array to iterate over.
  67735. * @param {Function} iteratee The function invoked per iteration.
  67736. * @returns {Array} Returns the new mapped array.
  67737. */
  67738. function arrayMap(array, iteratee) {
  67739. var index = -1,
  67740. length = array == null ? 0 : array.length,
  67741. result = Array(length);
  67742. while (++index < length) {
  67743. result[index] = iteratee(array[index], index, array);
  67744. }
  67745. return result;
  67746. }
  67747. /**
  67748. * Appends the elements of `values` to `array`.
  67749. *
  67750. * @private
  67751. * @param {Array} array The array to modify.
  67752. * @param {Array} values The values to append.
  67753. * @returns {Array} Returns `array`.
  67754. */
  67755. function arrayPush(array, values) {
  67756. var index = -1,
  67757. length = values.length,
  67758. offset = array.length;
  67759. while (++index < length) {
  67760. array[offset + index] = values[index];
  67761. }
  67762. return array;
  67763. }
  67764. /**
  67765. * A specialized version of `_.reduce` for arrays without support for
  67766. * iteratee shorthands.
  67767. *
  67768. * @private
  67769. * @param {Array} [array] The array to iterate over.
  67770. * @param {Function} iteratee The function invoked per iteration.
  67771. * @param {*} [accumulator] The initial value.
  67772. * @param {boolean} [initAccum] Specify using the first element of `array` as
  67773. * the initial value.
  67774. * @returns {*} Returns the accumulated value.
  67775. */
  67776. function arrayReduce(array, iteratee, accumulator, initAccum) {
  67777. var index = -1,
  67778. length = array == null ? 0 : array.length;
  67779. if (initAccum && length) {
  67780. accumulator = array[++index];
  67781. }
  67782. while (++index < length) {
  67783. accumulator = iteratee(accumulator, array[index], index, array);
  67784. }
  67785. return accumulator;
  67786. }
  67787. /**
  67788. * A specialized version of `_.reduceRight` for arrays without support for
  67789. * iteratee shorthands.
  67790. *
  67791. * @private
  67792. * @param {Array} [array] The array to iterate over.
  67793. * @param {Function} iteratee The function invoked per iteration.
  67794. * @param {*} [accumulator] The initial value.
  67795. * @param {boolean} [initAccum] Specify using the last element of `array` as
  67796. * the initial value.
  67797. * @returns {*} Returns the accumulated value.
  67798. */
  67799. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  67800. var length = array == null ? 0 : array.length;
  67801. if (initAccum && length) {
  67802. accumulator = array[--length];
  67803. }
  67804. while (length--) {
  67805. accumulator = iteratee(accumulator, array[length], length, array);
  67806. }
  67807. return accumulator;
  67808. }
  67809. /**
  67810. * A specialized version of `_.some` for arrays without support for iteratee
  67811. * shorthands.
  67812. *
  67813. * @private
  67814. * @param {Array} [array] The array to iterate over.
  67815. * @param {Function} predicate The function invoked per iteration.
  67816. * @returns {boolean} Returns `true` if any element passes the predicate check,
  67817. * else `false`.
  67818. */
  67819. function arraySome(array, predicate) {
  67820. var index = -1,
  67821. length = array == null ? 0 : array.length;
  67822. while (++index < length) {
  67823. if (predicate(array[index], index, array)) {
  67824. return true;
  67825. }
  67826. }
  67827. return false;
  67828. }
  67829. /**
  67830. * Gets the size of an ASCII `string`.
  67831. *
  67832. * @private
  67833. * @param {string} string The string inspect.
  67834. * @returns {number} Returns the string size.
  67835. */
  67836. var asciiSize = baseProperty('length');
  67837. /**
  67838. * Converts an ASCII `string` to an array.
  67839. *
  67840. * @private
  67841. * @param {string} string The string to convert.
  67842. * @returns {Array} Returns the converted array.
  67843. */
  67844. function asciiToArray(string) {
  67845. return string.split('');
  67846. }
  67847. /**
  67848. * Splits an ASCII `string` into an array of its words.
  67849. *
  67850. * @private
  67851. * @param {string} The string to inspect.
  67852. * @returns {Array} Returns the words of `string`.
  67853. */
  67854. function asciiWords(string) {
  67855. return string.match(reAsciiWord) || [];
  67856. }
  67857. /**
  67858. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  67859. * without support for iteratee shorthands, which iterates over `collection`
  67860. * using `eachFunc`.
  67861. *
  67862. * @private
  67863. * @param {Array|Object} collection The collection to inspect.
  67864. * @param {Function} predicate The function invoked per iteration.
  67865. * @param {Function} eachFunc The function to iterate over `collection`.
  67866. * @returns {*} Returns the found element or its key, else `undefined`.
  67867. */
  67868. function baseFindKey(collection, predicate, eachFunc) {
  67869. var result;
  67870. eachFunc(collection, function(value, key, collection) {
  67871. if (predicate(value, key, collection)) {
  67872. result = key;
  67873. return false;
  67874. }
  67875. });
  67876. return result;
  67877. }
  67878. /**
  67879. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  67880. * support for iteratee shorthands.
  67881. *
  67882. * @private
  67883. * @param {Array} array The array to inspect.
  67884. * @param {Function} predicate The function invoked per iteration.
  67885. * @param {number} fromIndex The index to search from.
  67886. * @param {boolean} [fromRight] Specify iterating from right to left.
  67887. * @returns {number} Returns the index of the matched value, else `-1`.
  67888. */
  67889. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  67890. var length = array.length,
  67891. index = fromIndex + (fromRight ? 1 : -1);
  67892. while ((fromRight ? index-- : ++index < length)) {
  67893. if (predicate(array[index], index, array)) {
  67894. return index;
  67895. }
  67896. }
  67897. return -1;
  67898. }
  67899. /**
  67900. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  67901. *
  67902. * @private
  67903. * @param {Array} array The array to inspect.
  67904. * @param {*} value The value to search for.
  67905. * @param {number} fromIndex The index to search from.
  67906. * @returns {number} Returns the index of the matched value, else `-1`.
  67907. */
  67908. function baseIndexOf(array, value, fromIndex) {
  67909. return value === value
  67910. ? strictIndexOf(array, value, fromIndex)
  67911. : baseFindIndex(array, baseIsNaN, fromIndex);
  67912. }
  67913. /**
  67914. * This function is like `baseIndexOf` except that it accepts a comparator.
  67915. *
  67916. * @private
  67917. * @param {Array} array The array to inspect.
  67918. * @param {*} value The value to search for.
  67919. * @param {number} fromIndex The index to search from.
  67920. * @param {Function} comparator The comparator invoked per element.
  67921. * @returns {number} Returns the index of the matched value, else `-1`.
  67922. */
  67923. function baseIndexOfWith(array, value, fromIndex, comparator) {
  67924. var index = fromIndex - 1,
  67925. length = array.length;
  67926. while (++index < length) {
  67927. if (comparator(array[index], value)) {
  67928. return index;
  67929. }
  67930. }
  67931. return -1;
  67932. }
  67933. /**
  67934. * The base implementation of `_.isNaN` without support for number objects.
  67935. *
  67936. * @private
  67937. * @param {*} value The value to check.
  67938. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  67939. */
  67940. function baseIsNaN(value) {
  67941. return value !== value;
  67942. }
  67943. /**
  67944. * The base implementation of `_.mean` and `_.meanBy` without support for
  67945. * iteratee shorthands.
  67946. *
  67947. * @private
  67948. * @param {Array} array The array to iterate over.
  67949. * @param {Function} iteratee The function invoked per iteration.
  67950. * @returns {number} Returns the mean.
  67951. */
  67952. function baseMean(array, iteratee) {
  67953. var length = array == null ? 0 : array.length;
  67954. return length ? (baseSum(array, iteratee) / length) : NAN;
  67955. }
  67956. /**
  67957. * The base implementation of `_.property` without support for deep paths.
  67958. *
  67959. * @private
  67960. * @param {string} key The key of the property to get.
  67961. * @returns {Function} Returns the new accessor function.
  67962. */
  67963. function baseProperty(key) {
  67964. return function(object) {
  67965. return object == null ? undefined : object[key];
  67966. };
  67967. }
  67968. /**
  67969. * The base implementation of `_.propertyOf` without support for deep paths.
  67970. *
  67971. * @private
  67972. * @param {Object} object The object to query.
  67973. * @returns {Function} Returns the new accessor function.
  67974. */
  67975. function basePropertyOf(object) {
  67976. return function(key) {
  67977. return object == null ? undefined : object[key];
  67978. };
  67979. }
  67980. /**
  67981. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  67982. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  67983. *
  67984. * @private
  67985. * @param {Array|Object} collection The collection to iterate over.
  67986. * @param {Function} iteratee The function invoked per iteration.
  67987. * @param {*} accumulator The initial value.
  67988. * @param {boolean} initAccum Specify using the first or last element of
  67989. * `collection` as the initial value.
  67990. * @param {Function} eachFunc The function to iterate over `collection`.
  67991. * @returns {*} Returns the accumulated value.
  67992. */
  67993. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  67994. eachFunc(collection, function(value, index, collection) {
  67995. accumulator = initAccum
  67996. ? (initAccum = false, value)
  67997. : iteratee(accumulator, value, index, collection);
  67998. });
  67999. return accumulator;
  68000. }
  68001. /**
  68002. * The base implementation of `_.sortBy` which uses `comparer` to define the
  68003. * sort order of `array` and replaces criteria objects with their corresponding
  68004. * values.
  68005. *
  68006. * @private
  68007. * @param {Array} array The array to sort.
  68008. * @param {Function} comparer The function to define sort order.
  68009. * @returns {Array} Returns `array`.
  68010. */
  68011. function baseSortBy(array, comparer) {
  68012. var length = array.length;
  68013. array.sort(comparer);
  68014. while (length--) {
  68015. array[length] = array[length].value;
  68016. }
  68017. return array;
  68018. }
  68019. /**
  68020. * The base implementation of `_.sum` and `_.sumBy` without support for
  68021. * iteratee shorthands.
  68022. *
  68023. * @private
  68024. * @param {Array} array The array to iterate over.
  68025. * @param {Function} iteratee The function invoked per iteration.
  68026. * @returns {number} Returns the sum.
  68027. */
  68028. function baseSum(array, iteratee) {
  68029. var result,
  68030. index = -1,
  68031. length = array.length;
  68032. while (++index < length) {
  68033. var current = iteratee(array[index]);
  68034. if (current !== undefined) {
  68035. result = result === undefined ? current : (result + current);
  68036. }
  68037. }
  68038. return result;
  68039. }
  68040. /**
  68041. * The base implementation of `_.times` without support for iteratee shorthands
  68042. * or max array length checks.
  68043. *
  68044. * @private
  68045. * @param {number} n The number of times to invoke `iteratee`.
  68046. * @param {Function} iteratee The function invoked per iteration.
  68047. * @returns {Array} Returns the array of results.
  68048. */
  68049. function baseTimes(n, iteratee) {
  68050. var index = -1,
  68051. result = Array(n);
  68052. while (++index < n) {
  68053. result[index] = iteratee(index);
  68054. }
  68055. return result;
  68056. }
  68057. /**
  68058. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  68059. * of key-value pairs for `object` corresponding to the property names of `props`.
  68060. *
  68061. * @private
  68062. * @param {Object} object The object to query.
  68063. * @param {Array} props The property names to get values for.
  68064. * @returns {Object} Returns the key-value pairs.
  68065. */
  68066. function baseToPairs(object, props) {
  68067. return arrayMap(props, function(key) {
  68068. return [key, object[key]];
  68069. });
  68070. }
  68071. /**
  68072. * The base implementation of `_.trim`.
  68073. *
  68074. * @private
  68075. * @param {string} string The string to trim.
  68076. * @returns {string} Returns the trimmed string.
  68077. */
  68078. function baseTrim(string) {
  68079. return string
  68080. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  68081. : string;
  68082. }
  68083. /**
  68084. * The base implementation of `_.unary` without support for storing metadata.
  68085. *
  68086. * @private
  68087. * @param {Function} func The function to cap arguments for.
  68088. * @returns {Function} Returns the new capped function.
  68089. */
  68090. function baseUnary(func) {
  68091. return function(value) {
  68092. return func(value);
  68093. };
  68094. }
  68095. /**
  68096. * The base implementation of `_.values` and `_.valuesIn` which creates an
  68097. * array of `object` property values corresponding to the property names
  68098. * of `props`.
  68099. *
  68100. * @private
  68101. * @param {Object} object The object to query.
  68102. * @param {Array} props The property names to get values for.
  68103. * @returns {Object} Returns the array of property values.
  68104. */
  68105. function baseValues(object, props) {
  68106. return arrayMap(props, function(key) {
  68107. return object[key];
  68108. });
  68109. }
  68110. /**
  68111. * Checks if a `cache` value for `key` exists.
  68112. *
  68113. * @private
  68114. * @param {Object} cache The cache to query.
  68115. * @param {string} key The key of the entry to check.
  68116. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  68117. */
  68118. function cacheHas(cache, key) {
  68119. return cache.has(key);
  68120. }
  68121. /**
  68122. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  68123. * that is not found in the character symbols.
  68124. *
  68125. * @private
  68126. * @param {Array} strSymbols The string symbols to inspect.
  68127. * @param {Array} chrSymbols The character symbols to find.
  68128. * @returns {number} Returns the index of the first unmatched string symbol.
  68129. */
  68130. function charsStartIndex(strSymbols, chrSymbols) {
  68131. var index = -1,
  68132. length = strSymbols.length;
  68133. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  68134. return index;
  68135. }
  68136. /**
  68137. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  68138. * that is not found in the character symbols.
  68139. *
  68140. * @private
  68141. * @param {Array} strSymbols The string symbols to inspect.
  68142. * @param {Array} chrSymbols The character symbols to find.
  68143. * @returns {number} Returns the index of the last unmatched string symbol.
  68144. */
  68145. function charsEndIndex(strSymbols, chrSymbols) {
  68146. var index = strSymbols.length;
  68147. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  68148. return index;
  68149. }
  68150. /**
  68151. * Gets the number of `placeholder` occurrences in `array`.
  68152. *
  68153. * @private
  68154. * @param {Array} array The array to inspect.
  68155. * @param {*} placeholder The placeholder to search for.
  68156. * @returns {number} Returns the placeholder count.
  68157. */
  68158. function countHolders(array, placeholder) {
  68159. var length = array.length,
  68160. result = 0;
  68161. while (length--) {
  68162. if (array[length] === placeholder) {
  68163. ++result;
  68164. }
  68165. }
  68166. return result;
  68167. }
  68168. /**
  68169. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  68170. * letters to basic Latin letters.
  68171. *
  68172. * @private
  68173. * @param {string} letter The matched letter to deburr.
  68174. * @returns {string} Returns the deburred letter.
  68175. */
  68176. var deburrLetter = basePropertyOf(deburredLetters);
  68177. /**
  68178. * Used by `_.escape` to convert characters to HTML entities.
  68179. *
  68180. * @private
  68181. * @param {string} chr The matched character to escape.
  68182. * @returns {string} Returns the escaped character.
  68183. */
  68184. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  68185. /**
  68186. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  68187. *
  68188. * @private
  68189. * @param {string} chr The matched character to escape.
  68190. * @returns {string} Returns the escaped character.
  68191. */
  68192. function escapeStringChar(chr) {
  68193. return '\\' + stringEscapes[chr];
  68194. }
  68195. /**
  68196. * Gets the value at `key` of `object`.
  68197. *
  68198. * @private
  68199. * @param {Object} [object] The object to query.
  68200. * @param {string} key The key of the property to get.
  68201. * @returns {*} Returns the property value.
  68202. */
  68203. function getValue(object, key) {
  68204. return object == null ? undefined : object[key];
  68205. }
  68206. /**
  68207. * Checks if `string` contains Unicode symbols.
  68208. *
  68209. * @private
  68210. * @param {string} string The string to inspect.
  68211. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  68212. */
  68213. function hasUnicode(string) {
  68214. return reHasUnicode.test(string);
  68215. }
  68216. /**
  68217. * Checks if `string` contains a word composed of Unicode symbols.
  68218. *
  68219. * @private
  68220. * @param {string} string The string to inspect.
  68221. * @returns {boolean} Returns `true` if a word is found, else `false`.
  68222. */
  68223. function hasUnicodeWord(string) {
  68224. return reHasUnicodeWord.test(string);
  68225. }
  68226. /**
  68227. * Converts `iterator` to an array.
  68228. *
  68229. * @private
  68230. * @param {Object} iterator The iterator to convert.
  68231. * @returns {Array} Returns the converted array.
  68232. */
  68233. function iteratorToArray(iterator) {
  68234. var data,
  68235. result = [];
  68236. while (!(data = iterator.next()).done) {
  68237. result.push(data.value);
  68238. }
  68239. return result;
  68240. }
  68241. /**
  68242. * Converts `map` to its key-value pairs.
  68243. *
  68244. * @private
  68245. * @param {Object} map The map to convert.
  68246. * @returns {Array} Returns the key-value pairs.
  68247. */
  68248. function mapToArray(map) {
  68249. var index = -1,
  68250. result = Array(map.size);
  68251. map.forEach(function(value, key) {
  68252. result[++index] = [key, value];
  68253. });
  68254. return result;
  68255. }
  68256. /**
  68257. * Creates a unary function that invokes `func` with its argument transformed.
  68258. *
  68259. * @private
  68260. * @param {Function} func The function to wrap.
  68261. * @param {Function} transform The argument transform.
  68262. * @returns {Function} Returns the new function.
  68263. */
  68264. function overArg(func, transform) {
  68265. return function(arg) {
  68266. return func(transform(arg));
  68267. };
  68268. }
  68269. /**
  68270. * Replaces all `placeholder` elements in `array` with an internal placeholder
  68271. * and returns an array of their indexes.
  68272. *
  68273. * @private
  68274. * @param {Array} array The array to modify.
  68275. * @param {*} placeholder The placeholder to replace.
  68276. * @returns {Array} Returns the new array of placeholder indexes.
  68277. */
  68278. function replaceHolders(array, placeholder) {
  68279. var index = -1,
  68280. length = array.length,
  68281. resIndex = 0,
  68282. result = [];
  68283. while (++index < length) {
  68284. var value = array[index];
  68285. if (value === placeholder || value === PLACEHOLDER) {
  68286. array[index] = PLACEHOLDER;
  68287. result[resIndex++] = index;
  68288. }
  68289. }
  68290. return result;
  68291. }
  68292. /**
  68293. * Converts `set` to an array of its values.
  68294. *
  68295. * @private
  68296. * @param {Object} set The set to convert.
  68297. * @returns {Array} Returns the values.
  68298. */
  68299. function setToArray(set) {
  68300. var index = -1,
  68301. result = Array(set.size);
  68302. set.forEach(function(value) {
  68303. result[++index] = value;
  68304. });
  68305. return result;
  68306. }
  68307. /**
  68308. * Converts `set` to its value-value pairs.
  68309. *
  68310. * @private
  68311. * @param {Object} set The set to convert.
  68312. * @returns {Array} Returns the value-value pairs.
  68313. */
  68314. function setToPairs(set) {
  68315. var index = -1,
  68316. result = Array(set.size);
  68317. set.forEach(function(value) {
  68318. result[++index] = [value, value];
  68319. });
  68320. return result;
  68321. }
  68322. /**
  68323. * A specialized version of `_.indexOf` which performs strict equality
  68324. * comparisons of values, i.e. `===`.
  68325. *
  68326. * @private
  68327. * @param {Array} array The array to inspect.
  68328. * @param {*} value The value to search for.
  68329. * @param {number} fromIndex The index to search from.
  68330. * @returns {number} Returns the index of the matched value, else `-1`.
  68331. */
  68332. function strictIndexOf(array, value, fromIndex) {
  68333. var index = fromIndex - 1,
  68334. length = array.length;
  68335. while (++index < length) {
  68336. if (array[index] === value) {
  68337. return index;
  68338. }
  68339. }
  68340. return -1;
  68341. }
  68342. /**
  68343. * A specialized version of `_.lastIndexOf` which performs strict equality
  68344. * comparisons of values, i.e. `===`.
  68345. *
  68346. * @private
  68347. * @param {Array} array The array to inspect.
  68348. * @param {*} value The value to search for.
  68349. * @param {number} fromIndex The index to search from.
  68350. * @returns {number} Returns the index of the matched value, else `-1`.
  68351. */
  68352. function strictLastIndexOf(array, value, fromIndex) {
  68353. var index = fromIndex + 1;
  68354. while (index--) {
  68355. if (array[index] === value) {
  68356. return index;
  68357. }
  68358. }
  68359. return index;
  68360. }
  68361. /**
  68362. * Gets the number of symbols in `string`.
  68363. *
  68364. * @private
  68365. * @param {string} string The string to inspect.
  68366. * @returns {number} Returns the string size.
  68367. */
  68368. function stringSize(string) {
  68369. return hasUnicode(string)
  68370. ? unicodeSize(string)
  68371. : asciiSize(string);
  68372. }
  68373. /**
  68374. * Converts `string` to an array.
  68375. *
  68376. * @private
  68377. * @param {string} string The string to convert.
  68378. * @returns {Array} Returns the converted array.
  68379. */
  68380. function stringToArray(string) {
  68381. return hasUnicode(string)
  68382. ? unicodeToArray(string)
  68383. : asciiToArray(string);
  68384. }
  68385. /**
  68386. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  68387. * character of `string`.
  68388. *
  68389. * @private
  68390. * @param {string} string The string to inspect.
  68391. * @returns {number} Returns the index of the last non-whitespace character.
  68392. */
  68393. function trimmedEndIndex(string) {
  68394. var index = string.length;
  68395. while (index-- && reWhitespace.test(string.charAt(index))) {}
  68396. return index;
  68397. }
  68398. /**
  68399. * Used by `_.unescape` to convert HTML entities to characters.
  68400. *
  68401. * @private
  68402. * @param {string} chr The matched character to unescape.
  68403. * @returns {string} Returns the unescaped character.
  68404. */
  68405. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  68406. /**
  68407. * Gets the size of a Unicode `string`.
  68408. *
  68409. * @private
  68410. * @param {string} string The string inspect.
  68411. * @returns {number} Returns the string size.
  68412. */
  68413. function unicodeSize(string) {
  68414. var result = reUnicode.lastIndex = 0;
  68415. while (reUnicode.test(string)) {
  68416. ++result;
  68417. }
  68418. return result;
  68419. }
  68420. /**
  68421. * Converts a Unicode `string` to an array.
  68422. *
  68423. * @private
  68424. * @param {string} string The string to convert.
  68425. * @returns {Array} Returns the converted array.
  68426. */
  68427. function unicodeToArray(string) {
  68428. return string.match(reUnicode) || [];
  68429. }
  68430. /**
  68431. * Splits a Unicode `string` into an array of its words.
  68432. *
  68433. * @private
  68434. * @param {string} The string to inspect.
  68435. * @returns {Array} Returns the words of `string`.
  68436. */
  68437. function unicodeWords(string) {
  68438. return string.match(reUnicodeWord) || [];
  68439. }
  68440. /*--------------------------------------------------------------------------*/
  68441. /**
  68442. * Create a new pristine `lodash` function using the `context` object.
  68443. *
  68444. * @static
  68445. * @memberOf _
  68446. * @since 1.1.0
  68447. * @category Util
  68448. * @param {Object} [context=root] The context object.
  68449. * @returns {Function} Returns a new `lodash` function.
  68450. * @example
  68451. *
  68452. * _.mixin({ 'foo': _.constant('foo') });
  68453. *
  68454. * var lodash = _.runInContext();
  68455. * lodash.mixin({ 'bar': lodash.constant('bar') });
  68456. *
  68457. * _.isFunction(_.foo);
  68458. * // => true
  68459. * _.isFunction(_.bar);
  68460. * // => false
  68461. *
  68462. * lodash.isFunction(lodash.foo);
  68463. * // => false
  68464. * lodash.isFunction(lodash.bar);
  68465. * // => true
  68466. *
  68467. * // Create a suped-up `defer` in Node.js.
  68468. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  68469. */
  68470. var runInContext = (function runInContext(context) {
  68471. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  68472. /** Built-in constructor references. */
  68473. var Array = context.Array,
  68474. Date = context.Date,
  68475. Error = context.Error,
  68476. Function = context.Function,
  68477. Math = context.Math,
  68478. Object = context.Object,
  68479. RegExp = context.RegExp,
  68480. String = context.String,
  68481. TypeError = context.TypeError;
  68482. /** Used for built-in method references. */
  68483. var arrayProto = Array.prototype,
  68484. funcProto = Function.prototype,
  68485. objectProto = Object.prototype;
  68486. /** Used to detect overreaching core-js shims. */
  68487. var coreJsData = context['__core-js_shared__'];
  68488. /** Used to resolve the decompiled source of functions. */
  68489. var funcToString = funcProto.toString;
  68490. /** Used to check objects for own properties. */
  68491. var hasOwnProperty = objectProto.hasOwnProperty;
  68492. /** Used to generate unique IDs. */
  68493. var idCounter = 0;
  68494. /** Used to detect methods masquerading as native. */
  68495. var maskSrcKey = (function() {
  68496. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  68497. return uid ? ('Symbol(src)_1.' + uid) : '';
  68498. }());
  68499. /**
  68500. * Used to resolve the
  68501. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  68502. * of values.
  68503. */
  68504. var nativeObjectToString = objectProto.toString;
  68505. /** Used to infer the `Object` constructor. */
  68506. var objectCtorString = funcToString.call(Object);
  68507. /** Used to restore the original `_` reference in `_.noConflict`. */
  68508. var oldDash = root._;
  68509. /** Used to detect if a method is native. */
  68510. var reIsNative = RegExp('^' +
  68511. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  68512. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  68513. );
  68514. /** Built-in value references. */
  68515. var Buffer = moduleExports ? context.Buffer : undefined,
  68516. Symbol = context.Symbol,
  68517. Uint8Array = context.Uint8Array,
  68518. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  68519. getPrototype = overArg(Object.getPrototypeOf, Object),
  68520. objectCreate = Object.create,
  68521. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  68522. splice = arrayProto.splice,
  68523. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  68524. symIterator = Symbol ? Symbol.iterator : undefined,
  68525. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  68526. var defineProperty = (function() {
  68527. try {
  68528. var func = getNative(Object, 'defineProperty');
  68529. func({}, '', {});
  68530. return func;
  68531. } catch (e) {}
  68532. }());
  68533. /** Mocked built-ins. */
  68534. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  68535. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  68536. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  68537. /* Built-in method references for those with the same name as other `lodash` methods. */
  68538. var nativeCeil = Math.ceil,
  68539. nativeFloor = Math.floor,
  68540. nativeGetSymbols = Object.getOwnPropertySymbols,
  68541. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  68542. nativeIsFinite = context.isFinite,
  68543. nativeJoin = arrayProto.join,
  68544. nativeKeys = overArg(Object.keys, Object),
  68545. nativeMax = Math.max,
  68546. nativeMin = Math.min,
  68547. nativeNow = Date.now,
  68548. nativeParseInt = context.parseInt,
  68549. nativeRandom = Math.random,
  68550. nativeReverse = arrayProto.reverse;
  68551. /* Built-in method references that are verified to be native. */
  68552. var DataView = getNative(context, 'DataView'),
  68553. Map = getNative(context, 'Map'),
  68554. Promise = getNative(context, 'Promise'),
  68555. Set = getNative(context, 'Set'),
  68556. WeakMap = getNative(context, 'WeakMap'),
  68557. nativeCreate = getNative(Object, 'create');
  68558. /** Used to store function metadata. */
  68559. var metaMap = WeakMap && new WeakMap;
  68560. /** Used to lookup unminified function names. */
  68561. var realNames = {};
  68562. /** Used to detect maps, sets, and weakmaps. */
  68563. var dataViewCtorString = toSource(DataView),
  68564. mapCtorString = toSource(Map),
  68565. promiseCtorString = toSource(Promise),
  68566. setCtorString = toSource(Set),
  68567. weakMapCtorString = toSource(WeakMap);
  68568. /** Used to convert symbols to primitives and strings. */
  68569. var symbolProto = Symbol ? Symbol.prototype : undefined,
  68570. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  68571. symbolToString = symbolProto ? symbolProto.toString : undefined;
  68572. /*------------------------------------------------------------------------*/
  68573. /**
  68574. * Creates a `lodash` object which wraps `value` to enable implicit method
  68575. * chain sequences. Methods that operate on and return arrays, collections,
  68576. * and functions can be chained together. Methods that retrieve a single value
  68577. * or may return a primitive value will automatically end the chain sequence
  68578. * and return the unwrapped value. Otherwise, the value must be unwrapped
  68579. * with `_#value`.
  68580. *
  68581. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  68582. * enabled using `_.chain`.
  68583. *
  68584. * The execution of chained methods is lazy, that is, it's deferred until
  68585. * `_#value` is implicitly or explicitly called.
  68586. *
  68587. * Lazy evaluation allows several methods to support shortcut fusion.
  68588. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  68589. * the creation of intermediate arrays and can greatly reduce the number of
  68590. * iteratee executions. Sections of a chain sequence qualify for shortcut
  68591. * fusion if the section is applied to an array and iteratees accept only
  68592. * one argument. The heuristic for whether a section qualifies for shortcut
  68593. * fusion is subject to change.
  68594. *
  68595. * Chaining is supported in custom builds as long as the `_#value` method is
  68596. * directly or indirectly included in the build.
  68597. *
  68598. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  68599. *
  68600. * The wrapper `Array` methods are:
  68601. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  68602. *
  68603. * The wrapper `String` methods are:
  68604. * `replace` and `split`
  68605. *
  68606. * The wrapper methods that support shortcut fusion are:
  68607. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  68608. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  68609. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  68610. *
  68611. * The chainable wrapper methods are:
  68612. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  68613. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  68614. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  68615. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  68616. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  68617. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  68618. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  68619. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  68620. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  68621. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  68622. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  68623. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  68624. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  68625. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  68626. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  68627. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  68628. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  68629. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  68630. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  68631. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  68632. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  68633. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  68634. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  68635. * `zipObject`, `zipObjectDeep`, and `zipWith`
  68636. *
  68637. * The wrapper methods that are **not** chainable by default are:
  68638. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  68639. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  68640. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  68641. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  68642. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  68643. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  68644. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  68645. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  68646. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  68647. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  68648. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  68649. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  68650. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  68651. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  68652. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  68653. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  68654. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  68655. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  68656. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  68657. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  68658. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  68659. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  68660. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  68661. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  68662. * `upperFirst`, `value`, and `words`
  68663. *
  68664. * @name _
  68665. * @constructor
  68666. * @category Seq
  68667. * @param {*} value The value to wrap in a `lodash` instance.
  68668. * @returns {Object} Returns the new `lodash` wrapper instance.
  68669. * @example
  68670. *
  68671. * function square(n) {
  68672. * return n * n;
  68673. * }
  68674. *
  68675. * var wrapped = _([1, 2, 3]);
  68676. *
  68677. * // Returns an unwrapped value.
  68678. * wrapped.reduce(_.add);
  68679. * // => 6
  68680. *
  68681. * // Returns a wrapped value.
  68682. * var squares = wrapped.map(square);
  68683. *
  68684. * _.isArray(squares);
  68685. * // => false
  68686. *
  68687. * _.isArray(squares.value());
  68688. * // => true
  68689. */
  68690. function lodash(value) {
  68691. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  68692. if (value instanceof LodashWrapper) {
  68693. return value;
  68694. }
  68695. if (hasOwnProperty.call(value, '__wrapped__')) {
  68696. return wrapperClone(value);
  68697. }
  68698. }
  68699. return new LodashWrapper(value);
  68700. }
  68701. /**
  68702. * The base implementation of `_.create` without support for assigning
  68703. * properties to the created object.
  68704. *
  68705. * @private
  68706. * @param {Object} proto The object to inherit from.
  68707. * @returns {Object} Returns the new object.
  68708. */
  68709. var baseCreate = (function() {
  68710. function object() {}
  68711. return function(proto) {
  68712. if (!isObject(proto)) {
  68713. return {};
  68714. }
  68715. if (objectCreate) {
  68716. return objectCreate(proto);
  68717. }
  68718. object.prototype = proto;
  68719. var result = new object;
  68720. object.prototype = undefined;
  68721. return result;
  68722. };
  68723. }());
  68724. /**
  68725. * The function whose prototype chain sequence wrappers inherit from.
  68726. *
  68727. * @private
  68728. */
  68729. function baseLodash() {
  68730. // No operation performed.
  68731. }
  68732. /**
  68733. * The base constructor for creating `lodash` wrapper objects.
  68734. *
  68735. * @private
  68736. * @param {*} value The value to wrap.
  68737. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  68738. */
  68739. function LodashWrapper(value, chainAll) {
  68740. this.__wrapped__ = value;
  68741. this.__actions__ = [];
  68742. this.__chain__ = !!chainAll;
  68743. this.__index__ = 0;
  68744. this.__values__ = undefined;
  68745. }
  68746. /**
  68747. * By default, the template delimiters used by lodash are like those in
  68748. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  68749. * following template settings to use alternative delimiters.
  68750. *
  68751. * @static
  68752. * @memberOf _
  68753. * @type {Object}
  68754. */
  68755. lodash.templateSettings = {
  68756. /**
  68757. * Used to detect `data` property values to be HTML-escaped.
  68758. *
  68759. * @memberOf _.templateSettings
  68760. * @type {RegExp}
  68761. */
  68762. 'escape': reEscape,
  68763. /**
  68764. * Used to detect code to be evaluated.
  68765. *
  68766. * @memberOf _.templateSettings
  68767. * @type {RegExp}
  68768. */
  68769. 'evaluate': reEvaluate,
  68770. /**
  68771. * Used to detect `data` property values to inject.
  68772. *
  68773. * @memberOf _.templateSettings
  68774. * @type {RegExp}
  68775. */
  68776. 'interpolate': reInterpolate,
  68777. /**
  68778. * Used to reference the data object in the template text.
  68779. *
  68780. * @memberOf _.templateSettings
  68781. * @type {string}
  68782. */
  68783. 'variable': '',
  68784. /**
  68785. * Used to import variables into the compiled template.
  68786. *
  68787. * @memberOf _.templateSettings
  68788. * @type {Object}
  68789. */
  68790. 'imports': {
  68791. /**
  68792. * A reference to the `lodash` function.
  68793. *
  68794. * @memberOf _.templateSettings.imports
  68795. * @type {Function}
  68796. */
  68797. '_': lodash
  68798. }
  68799. };
  68800. // Ensure wrappers are instances of `baseLodash`.
  68801. lodash.prototype = baseLodash.prototype;
  68802. lodash.prototype.constructor = lodash;
  68803. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  68804. LodashWrapper.prototype.constructor = LodashWrapper;
  68805. /*------------------------------------------------------------------------*/
  68806. /**
  68807. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  68808. *
  68809. * @private
  68810. * @constructor
  68811. * @param {*} value The value to wrap.
  68812. */
  68813. function LazyWrapper(value) {
  68814. this.__wrapped__ = value;
  68815. this.__actions__ = [];
  68816. this.__dir__ = 1;
  68817. this.__filtered__ = false;
  68818. this.__iteratees__ = [];
  68819. this.__takeCount__ = MAX_ARRAY_LENGTH;
  68820. this.__views__ = [];
  68821. }
  68822. /**
  68823. * Creates a clone of the lazy wrapper object.
  68824. *
  68825. * @private
  68826. * @name clone
  68827. * @memberOf LazyWrapper
  68828. * @returns {Object} Returns the cloned `LazyWrapper` object.
  68829. */
  68830. function lazyClone() {
  68831. var result = new LazyWrapper(this.__wrapped__);
  68832. result.__actions__ = copyArray(this.__actions__);
  68833. result.__dir__ = this.__dir__;
  68834. result.__filtered__ = this.__filtered__;
  68835. result.__iteratees__ = copyArray(this.__iteratees__);
  68836. result.__takeCount__ = this.__takeCount__;
  68837. result.__views__ = copyArray(this.__views__);
  68838. return result;
  68839. }
  68840. /**
  68841. * Reverses the direction of lazy iteration.
  68842. *
  68843. * @private
  68844. * @name reverse
  68845. * @memberOf LazyWrapper
  68846. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  68847. */
  68848. function lazyReverse() {
  68849. if (this.__filtered__) {
  68850. var result = new LazyWrapper(this);
  68851. result.__dir__ = -1;
  68852. result.__filtered__ = true;
  68853. } else {
  68854. result = this.clone();
  68855. result.__dir__ *= -1;
  68856. }
  68857. return result;
  68858. }
  68859. /**
  68860. * Extracts the unwrapped value from its lazy wrapper.
  68861. *
  68862. * @private
  68863. * @name value
  68864. * @memberOf LazyWrapper
  68865. * @returns {*} Returns the unwrapped value.
  68866. */
  68867. function lazyValue() {
  68868. var array = this.__wrapped__.value(),
  68869. dir = this.__dir__,
  68870. isArr = isArray(array),
  68871. isRight = dir < 0,
  68872. arrLength = isArr ? array.length : 0,
  68873. view = getView(0, arrLength, this.__views__),
  68874. start = view.start,
  68875. end = view.end,
  68876. length = end - start,
  68877. index = isRight ? end : (start - 1),
  68878. iteratees = this.__iteratees__,
  68879. iterLength = iteratees.length,
  68880. resIndex = 0,
  68881. takeCount = nativeMin(length, this.__takeCount__);
  68882. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  68883. return baseWrapperValue(array, this.__actions__);
  68884. }
  68885. var result = [];
  68886. outer:
  68887. while (length-- && resIndex < takeCount) {
  68888. index += dir;
  68889. var iterIndex = -1,
  68890. value = array[index];
  68891. while (++iterIndex < iterLength) {
  68892. var data = iteratees[iterIndex],
  68893. iteratee = data.iteratee,
  68894. type = data.type,
  68895. computed = iteratee(value);
  68896. if (type == LAZY_MAP_FLAG) {
  68897. value = computed;
  68898. } else if (!computed) {
  68899. if (type == LAZY_FILTER_FLAG) {
  68900. continue outer;
  68901. } else {
  68902. break outer;
  68903. }
  68904. }
  68905. }
  68906. result[resIndex++] = value;
  68907. }
  68908. return result;
  68909. }
  68910. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  68911. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  68912. LazyWrapper.prototype.constructor = LazyWrapper;
  68913. /*------------------------------------------------------------------------*/
  68914. /**
  68915. * Creates a hash object.
  68916. *
  68917. * @private
  68918. * @constructor
  68919. * @param {Array} [entries] The key-value pairs to cache.
  68920. */
  68921. function Hash(entries) {
  68922. var index = -1,
  68923. length = entries == null ? 0 : entries.length;
  68924. this.clear();
  68925. while (++index < length) {
  68926. var entry = entries[index];
  68927. this.set(entry[0], entry[1]);
  68928. }
  68929. }
  68930. /**
  68931. * Removes all key-value entries from the hash.
  68932. *
  68933. * @private
  68934. * @name clear
  68935. * @memberOf Hash
  68936. */
  68937. function hashClear() {
  68938. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  68939. this.size = 0;
  68940. }
  68941. /**
  68942. * Removes `key` and its value from the hash.
  68943. *
  68944. * @private
  68945. * @name delete
  68946. * @memberOf Hash
  68947. * @param {Object} hash The hash to modify.
  68948. * @param {string} key The key of the value to remove.
  68949. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  68950. */
  68951. function hashDelete(key) {
  68952. var result = this.has(key) && delete this.__data__[key];
  68953. this.size -= result ? 1 : 0;
  68954. return result;
  68955. }
  68956. /**
  68957. * Gets the hash value for `key`.
  68958. *
  68959. * @private
  68960. * @name get
  68961. * @memberOf Hash
  68962. * @param {string} key The key of the value to get.
  68963. * @returns {*} Returns the entry value.
  68964. */
  68965. function hashGet(key) {
  68966. var data = this.__data__;
  68967. if (nativeCreate) {
  68968. var result = data[key];
  68969. return result === HASH_UNDEFINED ? undefined : result;
  68970. }
  68971. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  68972. }
  68973. /**
  68974. * Checks if a hash value for `key` exists.
  68975. *
  68976. * @private
  68977. * @name has
  68978. * @memberOf Hash
  68979. * @param {string} key The key of the entry to check.
  68980. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  68981. */
  68982. function hashHas(key) {
  68983. var data = this.__data__;
  68984. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  68985. }
  68986. /**
  68987. * Sets the hash `key` to `value`.
  68988. *
  68989. * @private
  68990. * @name set
  68991. * @memberOf Hash
  68992. * @param {string} key The key of the value to set.
  68993. * @param {*} value The value to set.
  68994. * @returns {Object} Returns the hash instance.
  68995. */
  68996. function hashSet(key, value) {
  68997. var data = this.__data__;
  68998. this.size += this.has(key) ? 0 : 1;
  68999. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  69000. return this;
  69001. }
  69002. // Add methods to `Hash`.
  69003. Hash.prototype.clear = hashClear;
  69004. Hash.prototype['delete'] = hashDelete;
  69005. Hash.prototype.get = hashGet;
  69006. Hash.prototype.has = hashHas;
  69007. Hash.prototype.set = hashSet;
  69008. /*------------------------------------------------------------------------*/
  69009. /**
  69010. * Creates an list cache object.
  69011. *
  69012. * @private
  69013. * @constructor
  69014. * @param {Array} [entries] The key-value pairs to cache.
  69015. */
  69016. function ListCache(entries) {
  69017. var index = -1,
  69018. length = entries == null ? 0 : entries.length;
  69019. this.clear();
  69020. while (++index < length) {
  69021. var entry = entries[index];
  69022. this.set(entry[0], entry[1]);
  69023. }
  69024. }
  69025. /**
  69026. * Removes all key-value entries from the list cache.
  69027. *
  69028. * @private
  69029. * @name clear
  69030. * @memberOf ListCache
  69031. */
  69032. function listCacheClear() {
  69033. this.__data__ = [];
  69034. this.size = 0;
  69035. }
  69036. /**
  69037. * Removes `key` and its value from the list cache.
  69038. *
  69039. * @private
  69040. * @name delete
  69041. * @memberOf ListCache
  69042. * @param {string} key The key of the value to remove.
  69043. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  69044. */
  69045. function listCacheDelete(key) {
  69046. var data = this.__data__,
  69047. index = assocIndexOf(data, key);
  69048. if (index < 0) {
  69049. return false;
  69050. }
  69051. var lastIndex = data.length - 1;
  69052. if (index == lastIndex) {
  69053. data.pop();
  69054. } else {
  69055. splice.call(data, index, 1);
  69056. }
  69057. --this.size;
  69058. return true;
  69059. }
  69060. /**
  69061. * Gets the list cache value for `key`.
  69062. *
  69063. * @private
  69064. * @name get
  69065. * @memberOf ListCache
  69066. * @param {string} key The key of the value to get.
  69067. * @returns {*} Returns the entry value.
  69068. */
  69069. function listCacheGet(key) {
  69070. var data = this.__data__,
  69071. index = assocIndexOf(data, key);
  69072. return index < 0 ? undefined : data[index][1];
  69073. }
  69074. /**
  69075. * Checks if a list cache value for `key` exists.
  69076. *
  69077. * @private
  69078. * @name has
  69079. * @memberOf ListCache
  69080. * @param {string} key The key of the entry to check.
  69081. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  69082. */
  69083. function listCacheHas(key) {
  69084. return assocIndexOf(this.__data__, key) > -1;
  69085. }
  69086. /**
  69087. * Sets the list cache `key` to `value`.
  69088. *
  69089. * @private
  69090. * @name set
  69091. * @memberOf ListCache
  69092. * @param {string} key The key of the value to set.
  69093. * @param {*} value The value to set.
  69094. * @returns {Object} Returns the list cache instance.
  69095. */
  69096. function listCacheSet(key, value) {
  69097. var data = this.__data__,
  69098. index = assocIndexOf(data, key);
  69099. if (index < 0) {
  69100. ++this.size;
  69101. data.push([key, value]);
  69102. } else {
  69103. data[index][1] = value;
  69104. }
  69105. return this;
  69106. }
  69107. // Add methods to `ListCache`.
  69108. ListCache.prototype.clear = listCacheClear;
  69109. ListCache.prototype['delete'] = listCacheDelete;
  69110. ListCache.prototype.get = listCacheGet;
  69111. ListCache.prototype.has = listCacheHas;
  69112. ListCache.prototype.set = listCacheSet;
  69113. /*------------------------------------------------------------------------*/
  69114. /**
  69115. * Creates a map cache object to store key-value pairs.
  69116. *
  69117. * @private
  69118. * @constructor
  69119. * @param {Array} [entries] The key-value pairs to cache.
  69120. */
  69121. function MapCache(entries) {
  69122. var index = -1,
  69123. length = entries == null ? 0 : entries.length;
  69124. this.clear();
  69125. while (++index < length) {
  69126. var entry = entries[index];
  69127. this.set(entry[0], entry[1]);
  69128. }
  69129. }
  69130. /**
  69131. * Removes all key-value entries from the map.
  69132. *
  69133. * @private
  69134. * @name clear
  69135. * @memberOf MapCache
  69136. */
  69137. function mapCacheClear() {
  69138. this.size = 0;
  69139. this.__data__ = {
  69140. 'hash': new Hash,
  69141. 'map': new (Map || ListCache),
  69142. 'string': new Hash
  69143. };
  69144. }
  69145. /**
  69146. * Removes `key` and its value from the map.
  69147. *
  69148. * @private
  69149. * @name delete
  69150. * @memberOf MapCache
  69151. * @param {string} key The key of the value to remove.
  69152. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  69153. */
  69154. function mapCacheDelete(key) {
  69155. var result = getMapData(this, key)['delete'](key);
  69156. this.size -= result ? 1 : 0;
  69157. return result;
  69158. }
  69159. /**
  69160. * Gets the map value for `key`.
  69161. *
  69162. * @private
  69163. * @name get
  69164. * @memberOf MapCache
  69165. * @param {string} key The key of the value to get.
  69166. * @returns {*} Returns the entry value.
  69167. */
  69168. function mapCacheGet(key) {
  69169. return getMapData(this, key).get(key);
  69170. }
  69171. /**
  69172. * Checks if a map value for `key` exists.
  69173. *
  69174. * @private
  69175. * @name has
  69176. * @memberOf MapCache
  69177. * @param {string} key The key of the entry to check.
  69178. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  69179. */
  69180. function mapCacheHas(key) {
  69181. return getMapData(this, key).has(key);
  69182. }
  69183. /**
  69184. * Sets the map `key` to `value`.
  69185. *
  69186. * @private
  69187. * @name set
  69188. * @memberOf MapCache
  69189. * @param {string} key The key of the value to set.
  69190. * @param {*} value The value to set.
  69191. * @returns {Object} Returns the map cache instance.
  69192. */
  69193. function mapCacheSet(key, value) {
  69194. var data = getMapData(this, key),
  69195. size = data.size;
  69196. data.set(key, value);
  69197. this.size += data.size == size ? 0 : 1;
  69198. return this;
  69199. }
  69200. // Add methods to `MapCache`.
  69201. MapCache.prototype.clear = mapCacheClear;
  69202. MapCache.prototype['delete'] = mapCacheDelete;
  69203. MapCache.prototype.get = mapCacheGet;
  69204. MapCache.prototype.has = mapCacheHas;
  69205. MapCache.prototype.set = mapCacheSet;
  69206. /*------------------------------------------------------------------------*/
  69207. /**
  69208. *
  69209. * Creates an array cache object to store unique values.
  69210. *
  69211. * @private
  69212. * @constructor
  69213. * @param {Array} [values] The values to cache.
  69214. */
  69215. function SetCache(values) {
  69216. var index = -1,
  69217. length = values == null ? 0 : values.length;
  69218. this.__data__ = new MapCache;
  69219. while (++index < length) {
  69220. this.add(values[index]);
  69221. }
  69222. }
  69223. /**
  69224. * Adds `value` to the array cache.
  69225. *
  69226. * @private
  69227. * @name add
  69228. * @memberOf SetCache
  69229. * @alias push
  69230. * @param {*} value The value to cache.
  69231. * @returns {Object} Returns the cache instance.
  69232. */
  69233. function setCacheAdd(value) {
  69234. this.__data__.set(value, HASH_UNDEFINED);
  69235. return this;
  69236. }
  69237. /**
  69238. * Checks if `value` is in the array cache.
  69239. *
  69240. * @private
  69241. * @name has
  69242. * @memberOf SetCache
  69243. * @param {*} value The value to search for.
  69244. * @returns {number} Returns `true` if `value` is found, else `false`.
  69245. */
  69246. function setCacheHas(value) {
  69247. return this.__data__.has(value);
  69248. }
  69249. // Add methods to `SetCache`.
  69250. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  69251. SetCache.prototype.has = setCacheHas;
  69252. /*------------------------------------------------------------------------*/
  69253. /**
  69254. * Creates a stack cache object to store key-value pairs.
  69255. *
  69256. * @private
  69257. * @constructor
  69258. * @param {Array} [entries] The key-value pairs to cache.
  69259. */
  69260. function Stack(entries) {
  69261. var data = this.__data__ = new ListCache(entries);
  69262. this.size = data.size;
  69263. }
  69264. /**
  69265. * Removes all key-value entries from the stack.
  69266. *
  69267. * @private
  69268. * @name clear
  69269. * @memberOf Stack
  69270. */
  69271. function stackClear() {
  69272. this.__data__ = new ListCache;
  69273. this.size = 0;
  69274. }
  69275. /**
  69276. * Removes `key` and its value from the stack.
  69277. *
  69278. * @private
  69279. * @name delete
  69280. * @memberOf Stack
  69281. * @param {string} key The key of the value to remove.
  69282. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  69283. */
  69284. function stackDelete(key) {
  69285. var data = this.__data__,
  69286. result = data['delete'](key);
  69287. this.size = data.size;
  69288. return result;
  69289. }
  69290. /**
  69291. * Gets the stack value for `key`.
  69292. *
  69293. * @private
  69294. * @name get
  69295. * @memberOf Stack
  69296. * @param {string} key The key of the value to get.
  69297. * @returns {*} Returns the entry value.
  69298. */
  69299. function stackGet(key) {
  69300. return this.__data__.get(key);
  69301. }
  69302. /**
  69303. * Checks if a stack value for `key` exists.
  69304. *
  69305. * @private
  69306. * @name has
  69307. * @memberOf Stack
  69308. * @param {string} key The key of the entry to check.
  69309. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  69310. */
  69311. function stackHas(key) {
  69312. return this.__data__.has(key);
  69313. }
  69314. /**
  69315. * Sets the stack `key` to `value`.
  69316. *
  69317. * @private
  69318. * @name set
  69319. * @memberOf Stack
  69320. * @param {string} key The key of the value to set.
  69321. * @param {*} value The value to set.
  69322. * @returns {Object} Returns the stack cache instance.
  69323. */
  69324. function stackSet(key, value) {
  69325. var data = this.__data__;
  69326. if (data instanceof ListCache) {
  69327. var pairs = data.__data__;
  69328. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  69329. pairs.push([key, value]);
  69330. this.size = ++data.size;
  69331. return this;
  69332. }
  69333. data = this.__data__ = new MapCache(pairs);
  69334. }
  69335. data.set(key, value);
  69336. this.size = data.size;
  69337. return this;
  69338. }
  69339. // Add methods to `Stack`.
  69340. Stack.prototype.clear = stackClear;
  69341. Stack.prototype['delete'] = stackDelete;
  69342. Stack.prototype.get = stackGet;
  69343. Stack.prototype.has = stackHas;
  69344. Stack.prototype.set = stackSet;
  69345. /*------------------------------------------------------------------------*/
  69346. /**
  69347. * Creates an array of the enumerable property names of the array-like `value`.
  69348. *
  69349. * @private
  69350. * @param {*} value The value to query.
  69351. * @param {boolean} inherited Specify returning inherited property names.
  69352. * @returns {Array} Returns the array of property names.
  69353. */
  69354. function arrayLikeKeys(value, inherited) {
  69355. var isArr = isArray(value),
  69356. isArg = !isArr && isArguments(value),
  69357. isBuff = !isArr && !isArg && isBuffer(value),
  69358. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  69359. skipIndexes = isArr || isArg || isBuff || isType,
  69360. result = skipIndexes ? baseTimes(value.length, String) : [],
  69361. length = result.length;
  69362. for (var key in value) {
  69363. if ((inherited || hasOwnProperty.call(value, key)) &&
  69364. !(skipIndexes && (
  69365. // Safari 9 has enumerable `arguments.length` in strict mode.
  69366. key == 'length' ||
  69367. // Node.js 0.10 has enumerable non-index properties on buffers.
  69368. (isBuff && (key == 'offset' || key == 'parent')) ||
  69369. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  69370. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  69371. // Skip index properties.
  69372. isIndex(key, length)
  69373. ))) {
  69374. result.push(key);
  69375. }
  69376. }
  69377. return result;
  69378. }
  69379. /**
  69380. * A specialized version of `_.sample` for arrays.
  69381. *
  69382. * @private
  69383. * @param {Array} array The array to sample.
  69384. * @returns {*} Returns the random element.
  69385. */
  69386. function arraySample(array) {
  69387. var length = array.length;
  69388. return length ? array[baseRandom(0, length - 1)] : undefined;
  69389. }
  69390. /**
  69391. * A specialized version of `_.sampleSize` for arrays.
  69392. *
  69393. * @private
  69394. * @param {Array} array The array to sample.
  69395. * @param {number} n The number of elements to sample.
  69396. * @returns {Array} Returns the random elements.
  69397. */
  69398. function arraySampleSize(array, n) {
  69399. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  69400. }
  69401. /**
  69402. * A specialized version of `_.shuffle` for arrays.
  69403. *
  69404. * @private
  69405. * @param {Array} array The array to shuffle.
  69406. * @returns {Array} Returns the new shuffled array.
  69407. */
  69408. function arrayShuffle(array) {
  69409. return shuffleSelf(copyArray(array));
  69410. }
  69411. /**
  69412. * This function is like `assignValue` except that it doesn't assign
  69413. * `undefined` values.
  69414. *
  69415. * @private
  69416. * @param {Object} object The object to modify.
  69417. * @param {string} key The key of the property to assign.
  69418. * @param {*} value The value to assign.
  69419. */
  69420. function assignMergeValue(object, key, value) {
  69421. if ((value !== undefined && !eq(object[key], value)) ||
  69422. (value === undefined && !(key in object))) {
  69423. baseAssignValue(object, key, value);
  69424. }
  69425. }
  69426. /**
  69427. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  69428. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  69429. * for equality comparisons.
  69430. *
  69431. * @private
  69432. * @param {Object} object The object to modify.
  69433. * @param {string} key The key of the property to assign.
  69434. * @param {*} value The value to assign.
  69435. */
  69436. function assignValue(object, key, value) {
  69437. var objValue = object[key];
  69438. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  69439. (value === undefined && !(key in object))) {
  69440. baseAssignValue(object, key, value);
  69441. }
  69442. }
  69443. /**
  69444. * Gets the index at which the `key` is found in `array` of key-value pairs.
  69445. *
  69446. * @private
  69447. * @param {Array} array The array to inspect.
  69448. * @param {*} key The key to search for.
  69449. * @returns {number} Returns the index of the matched value, else `-1`.
  69450. */
  69451. function assocIndexOf(array, key) {
  69452. var length = array.length;
  69453. while (length--) {
  69454. if (eq(array[length][0], key)) {
  69455. return length;
  69456. }
  69457. }
  69458. return -1;
  69459. }
  69460. /**
  69461. * Aggregates elements of `collection` on `accumulator` with keys transformed
  69462. * by `iteratee` and values set by `setter`.
  69463. *
  69464. * @private
  69465. * @param {Array|Object} collection The collection to iterate over.
  69466. * @param {Function} setter The function to set `accumulator` values.
  69467. * @param {Function} iteratee The iteratee to transform keys.
  69468. * @param {Object} accumulator The initial aggregated object.
  69469. * @returns {Function} Returns `accumulator`.
  69470. */
  69471. function baseAggregator(collection, setter, iteratee, accumulator) {
  69472. baseEach(collection, function(value, key, collection) {
  69473. setter(accumulator, value, iteratee(value), collection);
  69474. });
  69475. return accumulator;
  69476. }
  69477. /**
  69478. * The base implementation of `_.assign` without support for multiple sources
  69479. * or `customizer` functions.
  69480. *
  69481. * @private
  69482. * @param {Object} object The destination object.
  69483. * @param {Object} source The source object.
  69484. * @returns {Object} Returns `object`.
  69485. */
  69486. function baseAssign(object, source) {
  69487. return object && copyObject(source, keys(source), object);
  69488. }
  69489. /**
  69490. * The base implementation of `_.assignIn` without support for multiple sources
  69491. * or `customizer` functions.
  69492. *
  69493. * @private
  69494. * @param {Object} object The destination object.
  69495. * @param {Object} source The source object.
  69496. * @returns {Object} Returns `object`.
  69497. */
  69498. function baseAssignIn(object, source) {
  69499. return object && copyObject(source, keysIn(source), object);
  69500. }
  69501. /**
  69502. * The base implementation of `assignValue` and `assignMergeValue` without
  69503. * value checks.
  69504. *
  69505. * @private
  69506. * @param {Object} object The object to modify.
  69507. * @param {string} key The key of the property to assign.
  69508. * @param {*} value The value to assign.
  69509. */
  69510. function baseAssignValue(object, key, value) {
  69511. if (key == '__proto__' && defineProperty) {
  69512. defineProperty(object, key, {
  69513. 'configurable': true,
  69514. 'enumerable': true,
  69515. 'value': value,
  69516. 'writable': true
  69517. });
  69518. } else {
  69519. object[key] = value;
  69520. }
  69521. }
  69522. /**
  69523. * The base implementation of `_.at` without support for individual paths.
  69524. *
  69525. * @private
  69526. * @param {Object} object The object to iterate over.
  69527. * @param {string[]} paths The property paths to pick.
  69528. * @returns {Array} Returns the picked elements.
  69529. */
  69530. function baseAt(object, paths) {
  69531. var index = -1,
  69532. length = paths.length,
  69533. result = Array(length),
  69534. skip = object == null;
  69535. while (++index < length) {
  69536. result[index] = skip ? undefined : get(object, paths[index]);
  69537. }
  69538. return result;
  69539. }
  69540. /**
  69541. * The base implementation of `_.clamp` which doesn't coerce arguments.
  69542. *
  69543. * @private
  69544. * @param {number} number The number to clamp.
  69545. * @param {number} [lower] The lower bound.
  69546. * @param {number} upper The upper bound.
  69547. * @returns {number} Returns the clamped number.
  69548. */
  69549. function baseClamp(number, lower, upper) {
  69550. if (number === number) {
  69551. if (upper !== undefined) {
  69552. number = number <= upper ? number : upper;
  69553. }
  69554. if (lower !== undefined) {
  69555. number = number >= lower ? number : lower;
  69556. }
  69557. }
  69558. return number;
  69559. }
  69560. /**
  69561. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  69562. * traversed objects.
  69563. *
  69564. * @private
  69565. * @param {*} value The value to clone.
  69566. * @param {boolean} bitmask The bitmask flags.
  69567. * 1 - Deep clone
  69568. * 2 - Flatten inherited properties
  69569. * 4 - Clone symbols
  69570. * @param {Function} [customizer] The function to customize cloning.
  69571. * @param {string} [key] The key of `value`.
  69572. * @param {Object} [object] The parent object of `value`.
  69573. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  69574. * @returns {*} Returns the cloned value.
  69575. */
  69576. function baseClone(value, bitmask, customizer, key, object, stack) {
  69577. var result,
  69578. isDeep = bitmask & CLONE_DEEP_FLAG,
  69579. isFlat = bitmask & CLONE_FLAT_FLAG,
  69580. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  69581. if (customizer) {
  69582. result = object ? customizer(value, key, object, stack) : customizer(value);
  69583. }
  69584. if (result !== undefined) {
  69585. return result;
  69586. }
  69587. if (!isObject(value)) {
  69588. return value;
  69589. }
  69590. var isArr = isArray(value);
  69591. if (isArr) {
  69592. result = initCloneArray(value);
  69593. if (!isDeep) {
  69594. return copyArray(value, result);
  69595. }
  69596. } else {
  69597. var tag = getTag(value),
  69598. isFunc = tag == funcTag || tag == genTag;
  69599. if (isBuffer(value)) {
  69600. return cloneBuffer(value, isDeep);
  69601. }
  69602. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  69603. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  69604. if (!isDeep) {
  69605. return isFlat
  69606. ? copySymbolsIn(value, baseAssignIn(result, value))
  69607. : copySymbols(value, baseAssign(result, value));
  69608. }
  69609. } else {
  69610. if (!cloneableTags[tag]) {
  69611. return object ? value : {};
  69612. }
  69613. result = initCloneByTag(value, tag, isDeep);
  69614. }
  69615. }
  69616. // Check for circular references and return its corresponding clone.
  69617. stack || (stack = new Stack);
  69618. var stacked = stack.get(value);
  69619. if (stacked) {
  69620. return stacked;
  69621. }
  69622. stack.set(value, result);
  69623. if (isSet(value)) {
  69624. value.forEach(function(subValue) {
  69625. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  69626. });
  69627. } else if (isMap(value)) {
  69628. value.forEach(function(subValue, key) {
  69629. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  69630. });
  69631. }
  69632. var keysFunc = isFull
  69633. ? (isFlat ? getAllKeysIn : getAllKeys)
  69634. : (isFlat ? keysIn : keys);
  69635. var props = isArr ? undefined : keysFunc(value);
  69636. arrayEach(props || value, function(subValue, key) {
  69637. if (props) {
  69638. key = subValue;
  69639. subValue = value[key];
  69640. }
  69641. // Recursively populate clone (susceptible to call stack limits).
  69642. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  69643. });
  69644. return result;
  69645. }
  69646. /**
  69647. * The base implementation of `_.conforms` which doesn't clone `source`.
  69648. *
  69649. * @private
  69650. * @param {Object} source The object of property predicates to conform to.
  69651. * @returns {Function} Returns the new spec function.
  69652. */
  69653. function baseConforms(source) {
  69654. var props = keys(source);
  69655. return function(object) {
  69656. return baseConformsTo(object, source, props);
  69657. };
  69658. }
  69659. /**
  69660. * The base implementation of `_.conformsTo` which accepts `props` to check.
  69661. *
  69662. * @private
  69663. * @param {Object} object The object to inspect.
  69664. * @param {Object} source The object of property predicates to conform to.
  69665. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  69666. */
  69667. function baseConformsTo(object, source, props) {
  69668. var length = props.length;
  69669. if (object == null) {
  69670. return !length;
  69671. }
  69672. object = Object(object);
  69673. while (length--) {
  69674. var key = props[length],
  69675. predicate = source[key],
  69676. value = object[key];
  69677. if ((value === undefined && !(key in object)) || !predicate(value)) {
  69678. return false;
  69679. }
  69680. }
  69681. return true;
  69682. }
  69683. /**
  69684. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  69685. * to provide to `func`.
  69686. *
  69687. * @private
  69688. * @param {Function} func The function to delay.
  69689. * @param {number} wait The number of milliseconds to delay invocation.
  69690. * @param {Array} args The arguments to provide to `func`.
  69691. * @returns {number|Object} Returns the timer id or timeout object.
  69692. */
  69693. function baseDelay(func, wait, args) {
  69694. if (typeof func != 'function') {
  69695. throw new TypeError(FUNC_ERROR_TEXT);
  69696. }
  69697. return setTimeout(function() { func.apply(undefined, args); }, wait);
  69698. }
  69699. /**
  69700. * The base implementation of methods like `_.difference` without support
  69701. * for excluding multiple arrays or iteratee shorthands.
  69702. *
  69703. * @private
  69704. * @param {Array} array The array to inspect.
  69705. * @param {Array} values The values to exclude.
  69706. * @param {Function} [iteratee] The iteratee invoked per element.
  69707. * @param {Function} [comparator] The comparator invoked per element.
  69708. * @returns {Array} Returns the new array of filtered values.
  69709. */
  69710. function baseDifference(array, values, iteratee, comparator) {
  69711. var index = -1,
  69712. includes = arrayIncludes,
  69713. isCommon = true,
  69714. length = array.length,
  69715. result = [],
  69716. valuesLength = values.length;
  69717. if (!length) {
  69718. return result;
  69719. }
  69720. if (iteratee) {
  69721. values = arrayMap(values, baseUnary(iteratee));
  69722. }
  69723. if (comparator) {
  69724. includes = arrayIncludesWith;
  69725. isCommon = false;
  69726. }
  69727. else if (values.length >= LARGE_ARRAY_SIZE) {
  69728. includes = cacheHas;
  69729. isCommon = false;
  69730. values = new SetCache(values);
  69731. }
  69732. outer:
  69733. while (++index < length) {
  69734. var value = array[index],
  69735. computed = iteratee == null ? value : iteratee(value);
  69736. value = (comparator || value !== 0) ? value : 0;
  69737. if (isCommon && computed === computed) {
  69738. var valuesIndex = valuesLength;
  69739. while (valuesIndex--) {
  69740. if (values[valuesIndex] === computed) {
  69741. continue outer;
  69742. }
  69743. }
  69744. result.push(value);
  69745. }
  69746. else if (!includes(values, computed, comparator)) {
  69747. result.push(value);
  69748. }
  69749. }
  69750. return result;
  69751. }
  69752. /**
  69753. * The base implementation of `_.forEach` without support for iteratee shorthands.
  69754. *
  69755. * @private
  69756. * @param {Array|Object} collection The collection to iterate over.
  69757. * @param {Function} iteratee The function invoked per iteration.
  69758. * @returns {Array|Object} Returns `collection`.
  69759. */
  69760. var baseEach = createBaseEach(baseForOwn);
  69761. /**
  69762. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  69763. *
  69764. * @private
  69765. * @param {Array|Object} collection The collection to iterate over.
  69766. * @param {Function} iteratee The function invoked per iteration.
  69767. * @returns {Array|Object} Returns `collection`.
  69768. */
  69769. var baseEachRight = createBaseEach(baseForOwnRight, true);
  69770. /**
  69771. * The base implementation of `_.every` without support for iteratee shorthands.
  69772. *
  69773. * @private
  69774. * @param {Array|Object} collection The collection to iterate over.
  69775. * @param {Function} predicate The function invoked per iteration.
  69776. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  69777. * else `false`
  69778. */
  69779. function baseEvery(collection, predicate) {
  69780. var result = true;
  69781. baseEach(collection, function(value, index, collection) {
  69782. result = !!predicate(value, index, collection);
  69783. return result;
  69784. });
  69785. return result;
  69786. }
  69787. /**
  69788. * The base implementation of methods like `_.max` and `_.min` which accepts a
  69789. * `comparator` to determine the extremum value.
  69790. *
  69791. * @private
  69792. * @param {Array} array The array to iterate over.
  69793. * @param {Function} iteratee The iteratee invoked per iteration.
  69794. * @param {Function} comparator The comparator used to compare values.
  69795. * @returns {*} Returns the extremum value.
  69796. */
  69797. function baseExtremum(array, iteratee, comparator) {
  69798. var index = -1,
  69799. length = array.length;
  69800. while (++index < length) {
  69801. var value = array[index],
  69802. current = iteratee(value);
  69803. if (current != null && (computed === undefined
  69804. ? (current === current && !isSymbol(current))
  69805. : comparator(current, computed)
  69806. )) {
  69807. var computed = current,
  69808. result = value;
  69809. }
  69810. }
  69811. return result;
  69812. }
  69813. /**
  69814. * The base implementation of `_.fill` without an iteratee call guard.
  69815. *
  69816. * @private
  69817. * @param {Array} array The array to fill.
  69818. * @param {*} value The value to fill `array` with.
  69819. * @param {number} [start=0] The start position.
  69820. * @param {number} [end=array.length] The end position.
  69821. * @returns {Array} Returns `array`.
  69822. */
  69823. function baseFill(array, value, start, end) {
  69824. var length = array.length;
  69825. start = toInteger(start);
  69826. if (start < 0) {
  69827. start = -start > length ? 0 : (length + start);
  69828. }
  69829. end = (end === undefined || end > length) ? length : toInteger(end);
  69830. if (end < 0) {
  69831. end += length;
  69832. }
  69833. end = start > end ? 0 : toLength(end);
  69834. while (start < end) {
  69835. array[start++] = value;
  69836. }
  69837. return array;
  69838. }
  69839. /**
  69840. * The base implementation of `_.filter` without support for iteratee shorthands.
  69841. *
  69842. * @private
  69843. * @param {Array|Object} collection The collection to iterate over.
  69844. * @param {Function} predicate The function invoked per iteration.
  69845. * @returns {Array} Returns the new filtered array.
  69846. */
  69847. function baseFilter(collection, predicate) {
  69848. var result = [];
  69849. baseEach(collection, function(value, index, collection) {
  69850. if (predicate(value, index, collection)) {
  69851. result.push(value);
  69852. }
  69853. });
  69854. return result;
  69855. }
  69856. /**
  69857. * The base implementation of `_.flatten` with support for restricting flattening.
  69858. *
  69859. * @private
  69860. * @param {Array} array The array to flatten.
  69861. * @param {number} depth The maximum recursion depth.
  69862. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  69863. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  69864. * @param {Array} [result=[]] The initial result value.
  69865. * @returns {Array} Returns the new flattened array.
  69866. */
  69867. function baseFlatten(array, depth, predicate, isStrict, result) {
  69868. var index = -1,
  69869. length = array.length;
  69870. predicate || (predicate = isFlattenable);
  69871. result || (result = []);
  69872. while (++index < length) {
  69873. var value = array[index];
  69874. if (depth > 0 && predicate(value)) {
  69875. if (depth > 1) {
  69876. // Recursively flatten arrays (susceptible to call stack limits).
  69877. baseFlatten(value, depth - 1, predicate, isStrict, result);
  69878. } else {
  69879. arrayPush(result, value);
  69880. }
  69881. } else if (!isStrict) {
  69882. result[result.length] = value;
  69883. }
  69884. }
  69885. return result;
  69886. }
  69887. /**
  69888. * The base implementation of `baseForOwn` which iterates over `object`
  69889. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  69890. * Iteratee functions may exit iteration early by explicitly returning `false`.
  69891. *
  69892. * @private
  69893. * @param {Object} object The object to iterate over.
  69894. * @param {Function} iteratee The function invoked per iteration.
  69895. * @param {Function} keysFunc The function to get the keys of `object`.
  69896. * @returns {Object} Returns `object`.
  69897. */
  69898. var baseFor = createBaseFor();
  69899. /**
  69900. * This function is like `baseFor` except that it iterates over properties
  69901. * in the opposite order.
  69902. *
  69903. * @private
  69904. * @param {Object} object The object to iterate over.
  69905. * @param {Function} iteratee The function invoked per iteration.
  69906. * @param {Function} keysFunc The function to get the keys of `object`.
  69907. * @returns {Object} Returns `object`.
  69908. */
  69909. var baseForRight = createBaseFor(true);
  69910. /**
  69911. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  69912. *
  69913. * @private
  69914. * @param {Object} object The object to iterate over.
  69915. * @param {Function} iteratee The function invoked per iteration.
  69916. * @returns {Object} Returns `object`.
  69917. */
  69918. function baseForOwn(object, iteratee) {
  69919. return object && baseFor(object, iteratee, keys);
  69920. }
  69921. /**
  69922. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  69923. *
  69924. * @private
  69925. * @param {Object} object The object to iterate over.
  69926. * @param {Function} iteratee The function invoked per iteration.
  69927. * @returns {Object} Returns `object`.
  69928. */
  69929. function baseForOwnRight(object, iteratee) {
  69930. return object && baseForRight(object, iteratee, keys);
  69931. }
  69932. /**
  69933. * The base implementation of `_.functions` which creates an array of
  69934. * `object` function property names filtered from `props`.
  69935. *
  69936. * @private
  69937. * @param {Object} object The object to inspect.
  69938. * @param {Array} props The property names to filter.
  69939. * @returns {Array} Returns the function names.
  69940. */
  69941. function baseFunctions(object, props) {
  69942. return arrayFilter(props, function(key) {
  69943. return isFunction(object[key]);
  69944. });
  69945. }
  69946. /**
  69947. * The base implementation of `_.get` without support for default values.
  69948. *
  69949. * @private
  69950. * @param {Object} object The object to query.
  69951. * @param {Array|string} path The path of the property to get.
  69952. * @returns {*} Returns the resolved value.
  69953. */
  69954. function baseGet(object, path) {
  69955. path = castPath(path, object);
  69956. var index = 0,
  69957. length = path.length;
  69958. while (object != null && index < length) {
  69959. object = object[toKey(path[index++])];
  69960. }
  69961. return (index && index == length) ? object : undefined;
  69962. }
  69963. /**
  69964. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  69965. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  69966. * symbols of `object`.
  69967. *
  69968. * @private
  69969. * @param {Object} object The object to query.
  69970. * @param {Function} keysFunc The function to get the keys of `object`.
  69971. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  69972. * @returns {Array} Returns the array of property names and symbols.
  69973. */
  69974. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  69975. var result = keysFunc(object);
  69976. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  69977. }
  69978. /**
  69979. * The base implementation of `getTag` without fallbacks for buggy environments.
  69980. *
  69981. * @private
  69982. * @param {*} value The value to query.
  69983. * @returns {string} Returns the `toStringTag`.
  69984. */
  69985. function baseGetTag(value) {
  69986. if (value == null) {
  69987. return value === undefined ? undefinedTag : nullTag;
  69988. }
  69989. return (symToStringTag && symToStringTag in Object(value))
  69990. ? getRawTag(value)
  69991. : objectToString(value);
  69992. }
  69993. /**
  69994. * The base implementation of `_.gt` which doesn't coerce arguments.
  69995. *
  69996. * @private
  69997. * @param {*} value The value to compare.
  69998. * @param {*} other The other value to compare.
  69999. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  70000. * else `false`.
  70001. */
  70002. function baseGt(value, other) {
  70003. return value > other;
  70004. }
  70005. /**
  70006. * The base implementation of `_.has` without support for deep paths.
  70007. *
  70008. * @private
  70009. * @param {Object} [object] The object to query.
  70010. * @param {Array|string} key The key to check.
  70011. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  70012. */
  70013. function baseHas(object, key) {
  70014. return object != null && hasOwnProperty.call(object, key);
  70015. }
  70016. /**
  70017. * The base implementation of `_.hasIn` without support for deep paths.
  70018. *
  70019. * @private
  70020. * @param {Object} [object] The object to query.
  70021. * @param {Array|string} key The key to check.
  70022. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  70023. */
  70024. function baseHasIn(object, key) {
  70025. return object != null && key in Object(object);
  70026. }
  70027. /**
  70028. * The base implementation of `_.inRange` which doesn't coerce arguments.
  70029. *
  70030. * @private
  70031. * @param {number} number The number to check.
  70032. * @param {number} start The start of the range.
  70033. * @param {number} end The end of the range.
  70034. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  70035. */
  70036. function baseInRange(number, start, end) {
  70037. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  70038. }
  70039. /**
  70040. * The base implementation of methods like `_.intersection`, without support
  70041. * for iteratee shorthands, that accepts an array of arrays to inspect.
  70042. *
  70043. * @private
  70044. * @param {Array} arrays The arrays to inspect.
  70045. * @param {Function} [iteratee] The iteratee invoked per element.
  70046. * @param {Function} [comparator] The comparator invoked per element.
  70047. * @returns {Array} Returns the new array of shared values.
  70048. */
  70049. function baseIntersection(arrays, iteratee, comparator) {
  70050. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  70051. length = arrays[0].length,
  70052. othLength = arrays.length,
  70053. othIndex = othLength,
  70054. caches = Array(othLength),
  70055. maxLength = Infinity,
  70056. result = [];
  70057. while (othIndex--) {
  70058. var array = arrays[othIndex];
  70059. if (othIndex && iteratee) {
  70060. array = arrayMap(array, baseUnary(iteratee));
  70061. }
  70062. maxLength = nativeMin(array.length, maxLength);
  70063. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  70064. ? new SetCache(othIndex && array)
  70065. : undefined;
  70066. }
  70067. array = arrays[0];
  70068. var index = -1,
  70069. seen = caches[0];
  70070. outer:
  70071. while (++index < length && result.length < maxLength) {
  70072. var value = array[index],
  70073. computed = iteratee ? iteratee(value) : value;
  70074. value = (comparator || value !== 0) ? value : 0;
  70075. if (!(seen
  70076. ? cacheHas(seen, computed)
  70077. : includes(result, computed, comparator)
  70078. )) {
  70079. othIndex = othLength;
  70080. while (--othIndex) {
  70081. var cache = caches[othIndex];
  70082. if (!(cache
  70083. ? cacheHas(cache, computed)
  70084. : includes(arrays[othIndex], computed, comparator))
  70085. ) {
  70086. continue outer;
  70087. }
  70088. }
  70089. if (seen) {
  70090. seen.push(computed);
  70091. }
  70092. result.push(value);
  70093. }
  70094. }
  70095. return result;
  70096. }
  70097. /**
  70098. * The base implementation of `_.invert` and `_.invertBy` which inverts
  70099. * `object` with values transformed by `iteratee` and set by `setter`.
  70100. *
  70101. * @private
  70102. * @param {Object} object The object to iterate over.
  70103. * @param {Function} setter The function to set `accumulator` values.
  70104. * @param {Function} iteratee The iteratee to transform values.
  70105. * @param {Object} accumulator The initial inverted object.
  70106. * @returns {Function} Returns `accumulator`.
  70107. */
  70108. function baseInverter(object, setter, iteratee, accumulator) {
  70109. baseForOwn(object, function(value, key, object) {
  70110. setter(accumulator, iteratee(value), key, object);
  70111. });
  70112. return accumulator;
  70113. }
  70114. /**
  70115. * The base implementation of `_.invoke` without support for individual
  70116. * method arguments.
  70117. *
  70118. * @private
  70119. * @param {Object} object The object to query.
  70120. * @param {Array|string} path The path of the method to invoke.
  70121. * @param {Array} args The arguments to invoke the method with.
  70122. * @returns {*} Returns the result of the invoked method.
  70123. */
  70124. function baseInvoke(object, path, args) {
  70125. path = castPath(path, object);
  70126. object = parent(object, path);
  70127. var func = object == null ? object : object[toKey(last(path))];
  70128. return func == null ? undefined : apply(func, object, args);
  70129. }
  70130. /**
  70131. * The base implementation of `_.isArguments`.
  70132. *
  70133. * @private
  70134. * @param {*} value The value to check.
  70135. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  70136. */
  70137. function baseIsArguments(value) {
  70138. return isObjectLike(value) && baseGetTag(value) == argsTag;
  70139. }
  70140. /**
  70141. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  70142. *
  70143. * @private
  70144. * @param {*} value The value to check.
  70145. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  70146. */
  70147. function baseIsArrayBuffer(value) {
  70148. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  70149. }
  70150. /**
  70151. * The base implementation of `_.isDate` without Node.js optimizations.
  70152. *
  70153. * @private
  70154. * @param {*} value The value to check.
  70155. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  70156. */
  70157. function baseIsDate(value) {
  70158. return isObjectLike(value) && baseGetTag(value) == dateTag;
  70159. }
  70160. /**
  70161. * The base implementation of `_.isEqual` which supports partial comparisons
  70162. * and tracks traversed objects.
  70163. *
  70164. * @private
  70165. * @param {*} value The value to compare.
  70166. * @param {*} other The other value to compare.
  70167. * @param {boolean} bitmask The bitmask flags.
  70168. * 1 - Unordered comparison
  70169. * 2 - Partial comparison
  70170. * @param {Function} [customizer] The function to customize comparisons.
  70171. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  70172. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  70173. */
  70174. function baseIsEqual(value, other, bitmask, customizer, stack) {
  70175. if (value === other) {
  70176. return true;
  70177. }
  70178. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  70179. return value !== value && other !== other;
  70180. }
  70181. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  70182. }
  70183. /**
  70184. * A specialized version of `baseIsEqual` for arrays and objects which performs
  70185. * deep comparisons and tracks traversed objects enabling objects with circular
  70186. * references to be compared.
  70187. *
  70188. * @private
  70189. * @param {Object} object The object to compare.
  70190. * @param {Object} other The other object to compare.
  70191. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  70192. * @param {Function} customizer The function to customize comparisons.
  70193. * @param {Function} equalFunc The function to determine equivalents of values.
  70194. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  70195. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  70196. */
  70197. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  70198. var objIsArr = isArray(object),
  70199. othIsArr = isArray(other),
  70200. objTag = objIsArr ? arrayTag : getTag(object),
  70201. othTag = othIsArr ? arrayTag : getTag(other);
  70202. objTag = objTag == argsTag ? objectTag : objTag;
  70203. othTag = othTag == argsTag ? objectTag : othTag;
  70204. var objIsObj = objTag == objectTag,
  70205. othIsObj = othTag == objectTag,
  70206. isSameTag = objTag == othTag;
  70207. if (isSameTag && isBuffer(object)) {
  70208. if (!isBuffer(other)) {
  70209. return false;
  70210. }
  70211. objIsArr = true;
  70212. objIsObj = false;
  70213. }
  70214. if (isSameTag && !objIsObj) {
  70215. stack || (stack = new Stack);
  70216. return (objIsArr || isTypedArray(object))
  70217. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  70218. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  70219. }
  70220. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  70221. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  70222. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  70223. if (objIsWrapped || othIsWrapped) {
  70224. var objUnwrapped = objIsWrapped ? object.value() : object,
  70225. othUnwrapped = othIsWrapped ? other.value() : other;
  70226. stack || (stack = new Stack);
  70227. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  70228. }
  70229. }
  70230. if (!isSameTag) {
  70231. return false;
  70232. }
  70233. stack || (stack = new Stack);
  70234. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  70235. }
  70236. /**
  70237. * The base implementation of `_.isMap` without Node.js optimizations.
  70238. *
  70239. * @private
  70240. * @param {*} value The value to check.
  70241. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  70242. */
  70243. function baseIsMap(value) {
  70244. return isObjectLike(value) && getTag(value) == mapTag;
  70245. }
  70246. /**
  70247. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  70248. *
  70249. * @private
  70250. * @param {Object} object The object to inspect.
  70251. * @param {Object} source The object of property values to match.
  70252. * @param {Array} matchData The property names, values, and compare flags to match.
  70253. * @param {Function} [customizer] The function to customize comparisons.
  70254. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  70255. */
  70256. function baseIsMatch(object, source, matchData, customizer) {
  70257. var index = matchData.length,
  70258. length = index,
  70259. noCustomizer = !customizer;
  70260. if (object == null) {
  70261. return !length;
  70262. }
  70263. object = Object(object);
  70264. while (index--) {
  70265. var data = matchData[index];
  70266. if ((noCustomizer && data[2])
  70267. ? data[1] !== object[data[0]]
  70268. : !(data[0] in object)
  70269. ) {
  70270. return false;
  70271. }
  70272. }
  70273. while (++index < length) {
  70274. data = matchData[index];
  70275. var key = data[0],
  70276. objValue = object[key],
  70277. srcValue = data[1];
  70278. if (noCustomizer && data[2]) {
  70279. if (objValue === undefined && !(key in object)) {
  70280. return false;
  70281. }
  70282. } else {
  70283. var stack = new Stack;
  70284. if (customizer) {
  70285. var result = customizer(objValue, srcValue, key, object, source, stack);
  70286. }
  70287. if (!(result === undefined
  70288. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  70289. : result
  70290. )) {
  70291. return false;
  70292. }
  70293. }
  70294. }
  70295. return true;
  70296. }
  70297. /**
  70298. * The base implementation of `_.isNative` without bad shim checks.
  70299. *
  70300. * @private
  70301. * @param {*} value The value to check.
  70302. * @returns {boolean} Returns `true` if `value` is a native function,
  70303. * else `false`.
  70304. */
  70305. function baseIsNative(value) {
  70306. if (!isObject(value) || isMasked(value)) {
  70307. return false;
  70308. }
  70309. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  70310. return pattern.test(toSource(value));
  70311. }
  70312. /**
  70313. * The base implementation of `_.isRegExp` without Node.js optimizations.
  70314. *
  70315. * @private
  70316. * @param {*} value The value to check.
  70317. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  70318. */
  70319. function baseIsRegExp(value) {
  70320. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  70321. }
  70322. /**
  70323. * The base implementation of `_.isSet` without Node.js optimizations.
  70324. *
  70325. * @private
  70326. * @param {*} value The value to check.
  70327. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  70328. */
  70329. function baseIsSet(value) {
  70330. return isObjectLike(value) && getTag(value) == setTag;
  70331. }
  70332. /**
  70333. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  70334. *
  70335. * @private
  70336. * @param {*} value The value to check.
  70337. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  70338. */
  70339. function baseIsTypedArray(value) {
  70340. return isObjectLike(value) &&
  70341. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  70342. }
  70343. /**
  70344. * The base implementation of `_.iteratee`.
  70345. *
  70346. * @private
  70347. * @param {*} [value=_.identity] The value to convert to an iteratee.
  70348. * @returns {Function} Returns the iteratee.
  70349. */
  70350. function baseIteratee(value) {
  70351. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  70352. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  70353. if (typeof value == 'function') {
  70354. return value;
  70355. }
  70356. if (value == null) {
  70357. return identity;
  70358. }
  70359. if (typeof value == 'object') {
  70360. return isArray(value)
  70361. ? baseMatchesProperty(value[0], value[1])
  70362. : baseMatches(value);
  70363. }
  70364. return property(value);
  70365. }
  70366. /**
  70367. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  70368. *
  70369. * @private
  70370. * @param {Object} object The object to query.
  70371. * @returns {Array} Returns the array of property names.
  70372. */
  70373. function baseKeys(object) {
  70374. if (!isPrototype(object)) {
  70375. return nativeKeys(object);
  70376. }
  70377. var result = [];
  70378. for (var key in Object(object)) {
  70379. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  70380. result.push(key);
  70381. }
  70382. }
  70383. return result;
  70384. }
  70385. /**
  70386. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  70387. *
  70388. * @private
  70389. * @param {Object} object The object to query.
  70390. * @returns {Array} Returns the array of property names.
  70391. */
  70392. function baseKeysIn(object) {
  70393. if (!isObject(object)) {
  70394. return nativeKeysIn(object);
  70395. }
  70396. var isProto = isPrototype(object),
  70397. result = [];
  70398. for (var key in object) {
  70399. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  70400. result.push(key);
  70401. }
  70402. }
  70403. return result;
  70404. }
  70405. /**
  70406. * The base implementation of `_.lt` which doesn't coerce arguments.
  70407. *
  70408. * @private
  70409. * @param {*} value The value to compare.
  70410. * @param {*} other The other value to compare.
  70411. * @returns {boolean} Returns `true` if `value` is less than `other`,
  70412. * else `false`.
  70413. */
  70414. function baseLt(value, other) {
  70415. return value < other;
  70416. }
  70417. /**
  70418. * The base implementation of `_.map` without support for iteratee shorthands.
  70419. *
  70420. * @private
  70421. * @param {Array|Object} collection The collection to iterate over.
  70422. * @param {Function} iteratee The function invoked per iteration.
  70423. * @returns {Array} Returns the new mapped array.
  70424. */
  70425. function baseMap(collection, iteratee) {
  70426. var index = -1,
  70427. result = isArrayLike(collection) ? Array(collection.length) : [];
  70428. baseEach(collection, function(value, key, collection) {
  70429. result[++index] = iteratee(value, key, collection);
  70430. });
  70431. return result;
  70432. }
  70433. /**
  70434. * The base implementation of `_.matches` which doesn't clone `source`.
  70435. *
  70436. * @private
  70437. * @param {Object} source The object of property values to match.
  70438. * @returns {Function} Returns the new spec function.
  70439. */
  70440. function baseMatches(source) {
  70441. var matchData = getMatchData(source);
  70442. if (matchData.length == 1 && matchData[0][2]) {
  70443. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  70444. }
  70445. return function(object) {
  70446. return object === source || baseIsMatch(object, source, matchData);
  70447. };
  70448. }
  70449. /**
  70450. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  70451. *
  70452. * @private
  70453. * @param {string} path The path of the property to get.
  70454. * @param {*} srcValue The value to match.
  70455. * @returns {Function} Returns the new spec function.
  70456. */
  70457. function baseMatchesProperty(path, srcValue) {
  70458. if (isKey(path) && isStrictComparable(srcValue)) {
  70459. return matchesStrictComparable(toKey(path), srcValue);
  70460. }
  70461. return function(object) {
  70462. var objValue = get(object, path);
  70463. return (objValue === undefined && objValue === srcValue)
  70464. ? hasIn(object, path)
  70465. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  70466. };
  70467. }
  70468. /**
  70469. * The base implementation of `_.merge` without support for multiple sources.
  70470. *
  70471. * @private
  70472. * @param {Object} object The destination object.
  70473. * @param {Object} source The source object.
  70474. * @param {number} srcIndex The index of `source`.
  70475. * @param {Function} [customizer] The function to customize merged values.
  70476. * @param {Object} [stack] Tracks traversed source values and their merged
  70477. * counterparts.
  70478. */
  70479. function baseMerge(object, source, srcIndex, customizer, stack) {
  70480. if (object === source) {
  70481. return;
  70482. }
  70483. baseFor(source, function(srcValue, key) {
  70484. stack || (stack = new Stack);
  70485. if (isObject(srcValue)) {
  70486. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  70487. }
  70488. else {
  70489. var newValue = customizer
  70490. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  70491. : undefined;
  70492. if (newValue === undefined) {
  70493. newValue = srcValue;
  70494. }
  70495. assignMergeValue(object, key, newValue);
  70496. }
  70497. }, keysIn);
  70498. }
  70499. /**
  70500. * A specialized version of `baseMerge` for arrays and objects which performs
  70501. * deep merges and tracks traversed objects enabling objects with circular
  70502. * references to be merged.
  70503. *
  70504. * @private
  70505. * @param {Object} object The destination object.
  70506. * @param {Object} source The source object.
  70507. * @param {string} key The key of the value to merge.
  70508. * @param {number} srcIndex The index of `source`.
  70509. * @param {Function} mergeFunc The function to merge values.
  70510. * @param {Function} [customizer] The function to customize assigned values.
  70511. * @param {Object} [stack] Tracks traversed source values and their merged
  70512. * counterparts.
  70513. */
  70514. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  70515. var objValue = safeGet(object, key),
  70516. srcValue = safeGet(source, key),
  70517. stacked = stack.get(srcValue);
  70518. if (stacked) {
  70519. assignMergeValue(object, key, stacked);
  70520. return;
  70521. }
  70522. var newValue = customizer
  70523. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  70524. : undefined;
  70525. var isCommon = newValue === undefined;
  70526. if (isCommon) {
  70527. var isArr = isArray(srcValue),
  70528. isBuff = !isArr && isBuffer(srcValue),
  70529. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  70530. newValue = srcValue;
  70531. if (isArr || isBuff || isTyped) {
  70532. if (isArray(objValue)) {
  70533. newValue = objValue;
  70534. }
  70535. else if (isArrayLikeObject(objValue)) {
  70536. newValue = copyArray(objValue);
  70537. }
  70538. else if (isBuff) {
  70539. isCommon = false;
  70540. newValue = cloneBuffer(srcValue, true);
  70541. }
  70542. else if (isTyped) {
  70543. isCommon = false;
  70544. newValue = cloneTypedArray(srcValue, true);
  70545. }
  70546. else {
  70547. newValue = [];
  70548. }
  70549. }
  70550. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  70551. newValue = objValue;
  70552. if (isArguments(objValue)) {
  70553. newValue = toPlainObject(objValue);
  70554. }
  70555. else if (!isObject(objValue) || isFunction(objValue)) {
  70556. newValue = initCloneObject(srcValue);
  70557. }
  70558. }
  70559. else {
  70560. isCommon = false;
  70561. }
  70562. }
  70563. if (isCommon) {
  70564. // Recursively merge objects and arrays (susceptible to call stack limits).
  70565. stack.set(srcValue, newValue);
  70566. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  70567. stack['delete'](srcValue);
  70568. }
  70569. assignMergeValue(object, key, newValue);
  70570. }
  70571. /**
  70572. * The base implementation of `_.nth` which doesn't coerce arguments.
  70573. *
  70574. * @private
  70575. * @param {Array} array The array to query.
  70576. * @param {number} n The index of the element to return.
  70577. * @returns {*} Returns the nth element of `array`.
  70578. */
  70579. function baseNth(array, n) {
  70580. var length = array.length;
  70581. if (!length) {
  70582. return;
  70583. }
  70584. n += n < 0 ? length : 0;
  70585. return isIndex(n, length) ? array[n] : undefined;
  70586. }
  70587. /**
  70588. * The base implementation of `_.orderBy` without param guards.
  70589. *
  70590. * @private
  70591. * @param {Array|Object} collection The collection to iterate over.
  70592. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  70593. * @param {string[]} orders The sort orders of `iteratees`.
  70594. * @returns {Array} Returns the new sorted array.
  70595. */
  70596. function baseOrderBy(collection, iteratees, orders) {
  70597. if (iteratees.length) {
  70598. iteratees = arrayMap(iteratees, function(iteratee) {
  70599. if (isArray(iteratee)) {
  70600. return function(value) {
  70601. return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
  70602. }
  70603. }
  70604. return iteratee;
  70605. });
  70606. } else {
  70607. iteratees = [identity];
  70608. }
  70609. var index = -1;
  70610. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  70611. var result = baseMap(collection, function(value, key, collection) {
  70612. var criteria = arrayMap(iteratees, function(iteratee) {
  70613. return iteratee(value);
  70614. });
  70615. return { 'criteria': criteria, 'index': ++index, 'value': value };
  70616. });
  70617. return baseSortBy(result, function(object, other) {
  70618. return compareMultiple(object, other, orders);
  70619. });
  70620. }
  70621. /**
  70622. * The base implementation of `_.pick` without support for individual
  70623. * property identifiers.
  70624. *
  70625. * @private
  70626. * @param {Object} object The source object.
  70627. * @param {string[]} paths The property paths to pick.
  70628. * @returns {Object} Returns the new object.
  70629. */
  70630. function basePick(object, paths) {
  70631. return basePickBy(object, paths, function(value, path) {
  70632. return hasIn(object, path);
  70633. });
  70634. }
  70635. /**
  70636. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  70637. *
  70638. * @private
  70639. * @param {Object} object The source object.
  70640. * @param {string[]} paths The property paths to pick.
  70641. * @param {Function} predicate The function invoked per property.
  70642. * @returns {Object} Returns the new object.
  70643. */
  70644. function basePickBy(object, paths, predicate) {
  70645. var index = -1,
  70646. length = paths.length,
  70647. result = {};
  70648. while (++index < length) {
  70649. var path = paths[index],
  70650. value = baseGet(object, path);
  70651. if (predicate(value, path)) {
  70652. baseSet(result, castPath(path, object), value);
  70653. }
  70654. }
  70655. return result;
  70656. }
  70657. /**
  70658. * A specialized version of `baseProperty` which supports deep paths.
  70659. *
  70660. * @private
  70661. * @param {Array|string} path The path of the property to get.
  70662. * @returns {Function} Returns the new accessor function.
  70663. */
  70664. function basePropertyDeep(path) {
  70665. return function(object) {
  70666. return baseGet(object, path);
  70667. };
  70668. }
  70669. /**
  70670. * The base implementation of `_.pullAllBy` without support for iteratee
  70671. * shorthands.
  70672. *
  70673. * @private
  70674. * @param {Array} array The array to modify.
  70675. * @param {Array} values The values to remove.
  70676. * @param {Function} [iteratee] The iteratee invoked per element.
  70677. * @param {Function} [comparator] The comparator invoked per element.
  70678. * @returns {Array} Returns `array`.
  70679. */
  70680. function basePullAll(array, values, iteratee, comparator) {
  70681. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  70682. index = -1,
  70683. length = values.length,
  70684. seen = array;
  70685. if (array === values) {
  70686. values = copyArray(values);
  70687. }
  70688. if (iteratee) {
  70689. seen = arrayMap(array, baseUnary(iteratee));
  70690. }
  70691. while (++index < length) {
  70692. var fromIndex = 0,
  70693. value = values[index],
  70694. computed = iteratee ? iteratee(value) : value;
  70695. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  70696. if (seen !== array) {
  70697. splice.call(seen, fromIndex, 1);
  70698. }
  70699. splice.call(array, fromIndex, 1);
  70700. }
  70701. }
  70702. return array;
  70703. }
  70704. /**
  70705. * The base implementation of `_.pullAt` without support for individual
  70706. * indexes or capturing the removed elements.
  70707. *
  70708. * @private
  70709. * @param {Array} array The array to modify.
  70710. * @param {number[]} indexes The indexes of elements to remove.
  70711. * @returns {Array} Returns `array`.
  70712. */
  70713. function basePullAt(array, indexes) {
  70714. var length = array ? indexes.length : 0,
  70715. lastIndex = length - 1;
  70716. while (length--) {
  70717. var index = indexes[length];
  70718. if (length == lastIndex || index !== previous) {
  70719. var previous = index;
  70720. if (isIndex(index)) {
  70721. splice.call(array, index, 1);
  70722. } else {
  70723. baseUnset(array, index);
  70724. }
  70725. }
  70726. }
  70727. return array;
  70728. }
  70729. /**
  70730. * The base implementation of `_.random` without support for returning
  70731. * floating-point numbers.
  70732. *
  70733. * @private
  70734. * @param {number} lower The lower bound.
  70735. * @param {number} upper The upper bound.
  70736. * @returns {number} Returns the random number.
  70737. */
  70738. function baseRandom(lower, upper) {
  70739. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  70740. }
  70741. /**
  70742. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  70743. * coerce arguments.
  70744. *
  70745. * @private
  70746. * @param {number} start The start of the range.
  70747. * @param {number} end The end of the range.
  70748. * @param {number} step The value to increment or decrement by.
  70749. * @param {boolean} [fromRight] Specify iterating from right to left.
  70750. * @returns {Array} Returns the range of numbers.
  70751. */
  70752. function baseRange(start, end, step, fromRight) {
  70753. var index = -1,
  70754. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  70755. result = Array(length);
  70756. while (length--) {
  70757. result[fromRight ? length : ++index] = start;
  70758. start += step;
  70759. }
  70760. return result;
  70761. }
  70762. /**
  70763. * The base implementation of `_.repeat` which doesn't coerce arguments.
  70764. *
  70765. * @private
  70766. * @param {string} string The string to repeat.
  70767. * @param {number} n The number of times to repeat the string.
  70768. * @returns {string} Returns the repeated string.
  70769. */
  70770. function baseRepeat(string, n) {
  70771. var result = '';
  70772. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  70773. return result;
  70774. }
  70775. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  70776. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  70777. do {
  70778. if (n % 2) {
  70779. result += string;
  70780. }
  70781. n = nativeFloor(n / 2);
  70782. if (n) {
  70783. string += string;
  70784. }
  70785. } while (n);
  70786. return result;
  70787. }
  70788. /**
  70789. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  70790. *
  70791. * @private
  70792. * @param {Function} func The function to apply a rest parameter to.
  70793. * @param {number} [start=func.length-1] The start position of the rest parameter.
  70794. * @returns {Function} Returns the new function.
  70795. */
  70796. function baseRest(func, start) {
  70797. return setToString(overRest(func, start, identity), func + '');
  70798. }
  70799. /**
  70800. * The base implementation of `_.sample`.
  70801. *
  70802. * @private
  70803. * @param {Array|Object} collection The collection to sample.
  70804. * @returns {*} Returns the random element.
  70805. */
  70806. function baseSample(collection) {
  70807. return arraySample(values(collection));
  70808. }
  70809. /**
  70810. * The base implementation of `_.sampleSize` without param guards.
  70811. *
  70812. * @private
  70813. * @param {Array|Object} collection The collection to sample.
  70814. * @param {number} n The number of elements to sample.
  70815. * @returns {Array} Returns the random elements.
  70816. */
  70817. function baseSampleSize(collection, n) {
  70818. var array = values(collection);
  70819. return shuffleSelf(array, baseClamp(n, 0, array.length));
  70820. }
  70821. /**
  70822. * The base implementation of `_.set`.
  70823. *
  70824. * @private
  70825. * @param {Object} object The object to modify.
  70826. * @param {Array|string} path The path of the property to set.
  70827. * @param {*} value The value to set.
  70828. * @param {Function} [customizer] The function to customize path creation.
  70829. * @returns {Object} Returns `object`.
  70830. */
  70831. function baseSet(object, path, value, customizer) {
  70832. if (!isObject(object)) {
  70833. return object;
  70834. }
  70835. path = castPath(path, object);
  70836. var index = -1,
  70837. length = path.length,
  70838. lastIndex = length - 1,
  70839. nested = object;
  70840. while (nested != null && ++index < length) {
  70841. var key = toKey(path[index]),
  70842. newValue = value;
  70843. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  70844. return object;
  70845. }
  70846. if (index != lastIndex) {
  70847. var objValue = nested[key];
  70848. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  70849. if (newValue === undefined) {
  70850. newValue = isObject(objValue)
  70851. ? objValue
  70852. : (isIndex(path[index + 1]) ? [] : {});
  70853. }
  70854. }
  70855. assignValue(nested, key, newValue);
  70856. nested = nested[key];
  70857. }
  70858. return object;
  70859. }
  70860. /**
  70861. * The base implementation of `setData` without support for hot loop shorting.
  70862. *
  70863. * @private
  70864. * @param {Function} func The function to associate metadata with.
  70865. * @param {*} data The metadata.
  70866. * @returns {Function} Returns `func`.
  70867. */
  70868. var baseSetData = !metaMap ? identity : function(func, data) {
  70869. metaMap.set(func, data);
  70870. return func;
  70871. };
  70872. /**
  70873. * The base implementation of `setToString` without support for hot loop shorting.
  70874. *
  70875. * @private
  70876. * @param {Function} func The function to modify.
  70877. * @param {Function} string The `toString` result.
  70878. * @returns {Function} Returns `func`.
  70879. */
  70880. var baseSetToString = !defineProperty ? identity : function(func, string) {
  70881. return defineProperty(func, 'toString', {
  70882. 'configurable': true,
  70883. 'enumerable': false,
  70884. 'value': constant(string),
  70885. 'writable': true
  70886. });
  70887. };
  70888. /**
  70889. * The base implementation of `_.shuffle`.
  70890. *
  70891. * @private
  70892. * @param {Array|Object} collection The collection to shuffle.
  70893. * @returns {Array} Returns the new shuffled array.
  70894. */
  70895. function baseShuffle(collection) {
  70896. return shuffleSelf(values(collection));
  70897. }
  70898. /**
  70899. * The base implementation of `_.slice` without an iteratee call guard.
  70900. *
  70901. * @private
  70902. * @param {Array} array The array to slice.
  70903. * @param {number} [start=0] The start position.
  70904. * @param {number} [end=array.length] The end position.
  70905. * @returns {Array} Returns the slice of `array`.
  70906. */
  70907. function baseSlice(array, start, end) {
  70908. var index = -1,
  70909. length = array.length;
  70910. if (start < 0) {
  70911. start = -start > length ? 0 : (length + start);
  70912. }
  70913. end = end > length ? length : end;
  70914. if (end < 0) {
  70915. end += length;
  70916. }
  70917. length = start > end ? 0 : ((end - start) >>> 0);
  70918. start >>>= 0;
  70919. var result = Array(length);
  70920. while (++index < length) {
  70921. result[index] = array[index + start];
  70922. }
  70923. return result;
  70924. }
  70925. /**
  70926. * The base implementation of `_.some` without support for iteratee shorthands.
  70927. *
  70928. * @private
  70929. * @param {Array|Object} collection The collection to iterate over.
  70930. * @param {Function} predicate The function invoked per iteration.
  70931. * @returns {boolean} Returns `true` if any element passes the predicate check,
  70932. * else `false`.
  70933. */
  70934. function baseSome(collection, predicate) {
  70935. var result;
  70936. baseEach(collection, function(value, index, collection) {
  70937. result = predicate(value, index, collection);
  70938. return !result;
  70939. });
  70940. return !!result;
  70941. }
  70942. /**
  70943. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  70944. * performs a binary search of `array` to determine the index at which `value`
  70945. * should be inserted into `array` in order to maintain its sort order.
  70946. *
  70947. * @private
  70948. * @param {Array} array The sorted array to inspect.
  70949. * @param {*} value The value to evaluate.
  70950. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  70951. * @returns {number} Returns the index at which `value` should be inserted
  70952. * into `array`.
  70953. */
  70954. function baseSortedIndex(array, value, retHighest) {
  70955. var low = 0,
  70956. high = array == null ? low : array.length;
  70957. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  70958. while (low < high) {
  70959. var mid = (low + high) >>> 1,
  70960. computed = array[mid];
  70961. if (computed !== null && !isSymbol(computed) &&
  70962. (retHighest ? (computed <= value) : (computed < value))) {
  70963. low = mid + 1;
  70964. } else {
  70965. high = mid;
  70966. }
  70967. }
  70968. return high;
  70969. }
  70970. return baseSortedIndexBy(array, value, identity, retHighest);
  70971. }
  70972. /**
  70973. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  70974. * which invokes `iteratee` for `value` and each element of `array` to compute
  70975. * their sort ranking. The iteratee is invoked with one argument; (value).
  70976. *
  70977. * @private
  70978. * @param {Array} array The sorted array to inspect.
  70979. * @param {*} value The value to evaluate.
  70980. * @param {Function} iteratee The iteratee invoked per element.
  70981. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  70982. * @returns {number} Returns the index at which `value` should be inserted
  70983. * into `array`.
  70984. */
  70985. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  70986. var low = 0,
  70987. high = array == null ? 0 : array.length;
  70988. if (high === 0) {
  70989. return 0;
  70990. }
  70991. value = iteratee(value);
  70992. var valIsNaN = value !== value,
  70993. valIsNull = value === null,
  70994. valIsSymbol = isSymbol(value),
  70995. valIsUndefined = value === undefined;
  70996. while (low < high) {
  70997. var mid = nativeFloor((low + high) / 2),
  70998. computed = iteratee(array[mid]),
  70999. othIsDefined = computed !== undefined,
  71000. othIsNull = computed === null,
  71001. othIsReflexive = computed === computed,
  71002. othIsSymbol = isSymbol(computed);
  71003. if (valIsNaN) {
  71004. var setLow = retHighest || othIsReflexive;
  71005. } else if (valIsUndefined) {
  71006. setLow = othIsReflexive && (retHighest || othIsDefined);
  71007. } else if (valIsNull) {
  71008. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  71009. } else if (valIsSymbol) {
  71010. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  71011. } else if (othIsNull || othIsSymbol) {
  71012. setLow = false;
  71013. } else {
  71014. setLow = retHighest ? (computed <= value) : (computed < value);
  71015. }
  71016. if (setLow) {
  71017. low = mid + 1;
  71018. } else {
  71019. high = mid;
  71020. }
  71021. }
  71022. return nativeMin(high, MAX_ARRAY_INDEX);
  71023. }
  71024. /**
  71025. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  71026. * support for iteratee shorthands.
  71027. *
  71028. * @private
  71029. * @param {Array} array The array to inspect.
  71030. * @param {Function} [iteratee] The iteratee invoked per element.
  71031. * @returns {Array} Returns the new duplicate free array.
  71032. */
  71033. function baseSortedUniq(array, iteratee) {
  71034. var index = -1,
  71035. length = array.length,
  71036. resIndex = 0,
  71037. result = [];
  71038. while (++index < length) {
  71039. var value = array[index],
  71040. computed = iteratee ? iteratee(value) : value;
  71041. if (!index || !eq(computed, seen)) {
  71042. var seen = computed;
  71043. result[resIndex++] = value === 0 ? 0 : value;
  71044. }
  71045. }
  71046. return result;
  71047. }
  71048. /**
  71049. * The base implementation of `_.toNumber` which doesn't ensure correct
  71050. * conversions of binary, hexadecimal, or octal string values.
  71051. *
  71052. * @private
  71053. * @param {*} value The value to process.
  71054. * @returns {number} Returns the number.
  71055. */
  71056. function baseToNumber(value) {
  71057. if (typeof value == 'number') {
  71058. return value;
  71059. }
  71060. if (isSymbol(value)) {
  71061. return NAN;
  71062. }
  71063. return +value;
  71064. }
  71065. /**
  71066. * The base implementation of `_.toString` which doesn't convert nullish
  71067. * values to empty strings.
  71068. *
  71069. * @private
  71070. * @param {*} value The value to process.
  71071. * @returns {string} Returns the string.
  71072. */
  71073. function baseToString(value) {
  71074. // Exit early for strings to avoid a performance hit in some environments.
  71075. if (typeof value == 'string') {
  71076. return value;
  71077. }
  71078. if (isArray(value)) {
  71079. // Recursively convert values (susceptible to call stack limits).
  71080. return arrayMap(value, baseToString) + '';
  71081. }
  71082. if (isSymbol(value)) {
  71083. return symbolToString ? symbolToString.call(value) : '';
  71084. }
  71085. var result = (value + '');
  71086. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  71087. }
  71088. /**
  71089. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  71090. *
  71091. * @private
  71092. * @param {Array} array The array to inspect.
  71093. * @param {Function} [iteratee] The iteratee invoked per element.
  71094. * @param {Function} [comparator] The comparator invoked per element.
  71095. * @returns {Array} Returns the new duplicate free array.
  71096. */
  71097. function baseUniq(array, iteratee, comparator) {
  71098. var index = -1,
  71099. includes = arrayIncludes,
  71100. length = array.length,
  71101. isCommon = true,
  71102. result = [],
  71103. seen = result;
  71104. if (comparator) {
  71105. isCommon = false;
  71106. includes = arrayIncludesWith;
  71107. }
  71108. else if (length >= LARGE_ARRAY_SIZE) {
  71109. var set = iteratee ? null : createSet(array);
  71110. if (set) {
  71111. return setToArray(set);
  71112. }
  71113. isCommon = false;
  71114. includes = cacheHas;
  71115. seen = new SetCache;
  71116. }
  71117. else {
  71118. seen = iteratee ? [] : result;
  71119. }
  71120. outer:
  71121. while (++index < length) {
  71122. var value = array[index],
  71123. computed = iteratee ? iteratee(value) : value;
  71124. value = (comparator || value !== 0) ? value : 0;
  71125. if (isCommon && computed === computed) {
  71126. var seenIndex = seen.length;
  71127. while (seenIndex--) {
  71128. if (seen[seenIndex] === computed) {
  71129. continue outer;
  71130. }
  71131. }
  71132. if (iteratee) {
  71133. seen.push(computed);
  71134. }
  71135. result.push(value);
  71136. }
  71137. else if (!includes(seen, computed, comparator)) {
  71138. if (seen !== result) {
  71139. seen.push(computed);
  71140. }
  71141. result.push(value);
  71142. }
  71143. }
  71144. return result;
  71145. }
  71146. /**
  71147. * The base implementation of `_.unset`.
  71148. *
  71149. * @private
  71150. * @param {Object} object The object to modify.
  71151. * @param {Array|string} path The property path to unset.
  71152. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  71153. */
  71154. function baseUnset(object, path) {
  71155. path = castPath(path, object);
  71156. object = parent(object, path);
  71157. return object == null || delete object[toKey(last(path))];
  71158. }
  71159. /**
  71160. * The base implementation of `_.update`.
  71161. *
  71162. * @private
  71163. * @param {Object} object The object to modify.
  71164. * @param {Array|string} path The path of the property to update.
  71165. * @param {Function} updater The function to produce the updated value.
  71166. * @param {Function} [customizer] The function to customize path creation.
  71167. * @returns {Object} Returns `object`.
  71168. */
  71169. function baseUpdate(object, path, updater, customizer) {
  71170. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  71171. }
  71172. /**
  71173. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  71174. * without support for iteratee shorthands.
  71175. *
  71176. * @private
  71177. * @param {Array} array The array to query.
  71178. * @param {Function} predicate The function invoked per iteration.
  71179. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  71180. * @param {boolean} [fromRight] Specify iterating from right to left.
  71181. * @returns {Array} Returns the slice of `array`.
  71182. */
  71183. function baseWhile(array, predicate, isDrop, fromRight) {
  71184. var length = array.length,
  71185. index = fromRight ? length : -1;
  71186. while ((fromRight ? index-- : ++index < length) &&
  71187. predicate(array[index], index, array)) {}
  71188. return isDrop
  71189. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  71190. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  71191. }
  71192. /**
  71193. * The base implementation of `wrapperValue` which returns the result of
  71194. * performing a sequence of actions on the unwrapped `value`, where each
  71195. * successive action is supplied the return value of the previous.
  71196. *
  71197. * @private
  71198. * @param {*} value The unwrapped value.
  71199. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  71200. * @returns {*} Returns the resolved value.
  71201. */
  71202. function baseWrapperValue(value, actions) {
  71203. var result = value;
  71204. if (result instanceof LazyWrapper) {
  71205. result = result.value();
  71206. }
  71207. return arrayReduce(actions, function(result, action) {
  71208. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  71209. }, result);
  71210. }
  71211. /**
  71212. * The base implementation of methods like `_.xor`, without support for
  71213. * iteratee shorthands, that accepts an array of arrays to inspect.
  71214. *
  71215. * @private
  71216. * @param {Array} arrays The arrays to inspect.
  71217. * @param {Function} [iteratee] The iteratee invoked per element.
  71218. * @param {Function} [comparator] The comparator invoked per element.
  71219. * @returns {Array} Returns the new array of values.
  71220. */
  71221. function baseXor(arrays, iteratee, comparator) {
  71222. var length = arrays.length;
  71223. if (length < 2) {
  71224. return length ? baseUniq(arrays[0]) : [];
  71225. }
  71226. var index = -1,
  71227. result = Array(length);
  71228. while (++index < length) {
  71229. var array = arrays[index],
  71230. othIndex = -1;
  71231. while (++othIndex < length) {
  71232. if (othIndex != index) {
  71233. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  71234. }
  71235. }
  71236. }
  71237. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  71238. }
  71239. /**
  71240. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  71241. *
  71242. * @private
  71243. * @param {Array} props The property identifiers.
  71244. * @param {Array} values The property values.
  71245. * @param {Function} assignFunc The function to assign values.
  71246. * @returns {Object} Returns the new object.
  71247. */
  71248. function baseZipObject(props, values, assignFunc) {
  71249. var index = -1,
  71250. length = props.length,
  71251. valsLength = values.length,
  71252. result = {};
  71253. while (++index < length) {
  71254. var value = index < valsLength ? values[index] : undefined;
  71255. assignFunc(result, props[index], value);
  71256. }
  71257. return result;
  71258. }
  71259. /**
  71260. * Casts `value` to an empty array if it's not an array like object.
  71261. *
  71262. * @private
  71263. * @param {*} value The value to inspect.
  71264. * @returns {Array|Object} Returns the cast array-like object.
  71265. */
  71266. function castArrayLikeObject(value) {
  71267. return isArrayLikeObject(value) ? value : [];
  71268. }
  71269. /**
  71270. * Casts `value` to `identity` if it's not a function.
  71271. *
  71272. * @private
  71273. * @param {*} value The value to inspect.
  71274. * @returns {Function} Returns cast function.
  71275. */
  71276. function castFunction(value) {
  71277. return typeof value == 'function' ? value : identity;
  71278. }
  71279. /**
  71280. * Casts `value` to a path array if it's not one.
  71281. *
  71282. * @private
  71283. * @param {*} value The value to inspect.
  71284. * @param {Object} [object] The object to query keys on.
  71285. * @returns {Array} Returns the cast property path array.
  71286. */
  71287. function castPath(value, object) {
  71288. if (isArray(value)) {
  71289. return value;
  71290. }
  71291. return isKey(value, object) ? [value] : stringToPath(toString(value));
  71292. }
  71293. /**
  71294. * A `baseRest` alias which can be replaced with `identity` by module
  71295. * replacement plugins.
  71296. *
  71297. * @private
  71298. * @type {Function}
  71299. * @param {Function} func The function to apply a rest parameter to.
  71300. * @returns {Function} Returns the new function.
  71301. */
  71302. var castRest = baseRest;
  71303. /**
  71304. * Casts `array` to a slice if it's needed.
  71305. *
  71306. * @private
  71307. * @param {Array} array The array to inspect.
  71308. * @param {number} start The start position.
  71309. * @param {number} [end=array.length] The end position.
  71310. * @returns {Array} Returns the cast slice.
  71311. */
  71312. function castSlice(array, start, end) {
  71313. var length = array.length;
  71314. end = end === undefined ? length : end;
  71315. return (!start && end >= length) ? array : baseSlice(array, start, end);
  71316. }
  71317. /**
  71318. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  71319. *
  71320. * @private
  71321. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  71322. */
  71323. var clearTimeout = ctxClearTimeout || function(id) {
  71324. return root.clearTimeout(id);
  71325. };
  71326. /**
  71327. * Creates a clone of `buffer`.
  71328. *
  71329. * @private
  71330. * @param {Buffer} buffer The buffer to clone.
  71331. * @param {boolean} [isDeep] Specify a deep clone.
  71332. * @returns {Buffer} Returns the cloned buffer.
  71333. */
  71334. function cloneBuffer(buffer, isDeep) {
  71335. if (isDeep) {
  71336. return buffer.slice();
  71337. }
  71338. var length = buffer.length,
  71339. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  71340. buffer.copy(result);
  71341. return result;
  71342. }
  71343. /**
  71344. * Creates a clone of `arrayBuffer`.
  71345. *
  71346. * @private
  71347. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  71348. * @returns {ArrayBuffer} Returns the cloned array buffer.
  71349. */
  71350. function cloneArrayBuffer(arrayBuffer) {
  71351. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  71352. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  71353. return result;
  71354. }
  71355. /**
  71356. * Creates a clone of `dataView`.
  71357. *
  71358. * @private
  71359. * @param {Object} dataView The data view to clone.
  71360. * @param {boolean} [isDeep] Specify a deep clone.
  71361. * @returns {Object} Returns the cloned data view.
  71362. */
  71363. function cloneDataView(dataView, isDeep) {
  71364. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  71365. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  71366. }
  71367. /**
  71368. * Creates a clone of `regexp`.
  71369. *
  71370. * @private
  71371. * @param {Object} regexp The regexp to clone.
  71372. * @returns {Object} Returns the cloned regexp.
  71373. */
  71374. function cloneRegExp(regexp) {
  71375. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  71376. result.lastIndex = regexp.lastIndex;
  71377. return result;
  71378. }
  71379. /**
  71380. * Creates a clone of the `symbol` object.
  71381. *
  71382. * @private
  71383. * @param {Object} symbol The symbol object to clone.
  71384. * @returns {Object} Returns the cloned symbol object.
  71385. */
  71386. function cloneSymbol(symbol) {
  71387. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  71388. }
  71389. /**
  71390. * Creates a clone of `typedArray`.
  71391. *
  71392. * @private
  71393. * @param {Object} typedArray The typed array to clone.
  71394. * @param {boolean} [isDeep] Specify a deep clone.
  71395. * @returns {Object} Returns the cloned typed array.
  71396. */
  71397. function cloneTypedArray(typedArray, isDeep) {
  71398. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  71399. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  71400. }
  71401. /**
  71402. * Compares values to sort them in ascending order.
  71403. *
  71404. * @private
  71405. * @param {*} value The value to compare.
  71406. * @param {*} other The other value to compare.
  71407. * @returns {number} Returns the sort order indicator for `value`.
  71408. */
  71409. function compareAscending(value, other) {
  71410. if (value !== other) {
  71411. var valIsDefined = value !== undefined,
  71412. valIsNull = value === null,
  71413. valIsReflexive = value === value,
  71414. valIsSymbol = isSymbol(value);
  71415. var othIsDefined = other !== undefined,
  71416. othIsNull = other === null,
  71417. othIsReflexive = other === other,
  71418. othIsSymbol = isSymbol(other);
  71419. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  71420. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  71421. (valIsNull && othIsDefined && othIsReflexive) ||
  71422. (!valIsDefined && othIsReflexive) ||
  71423. !valIsReflexive) {
  71424. return 1;
  71425. }
  71426. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  71427. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  71428. (othIsNull && valIsDefined && valIsReflexive) ||
  71429. (!othIsDefined && valIsReflexive) ||
  71430. !othIsReflexive) {
  71431. return -1;
  71432. }
  71433. }
  71434. return 0;
  71435. }
  71436. /**
  71437. * Used by `_.orderBy` to compare multiple properties of a value to another
  71438. * and stable sort them.
  71439. *
  71440. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  71441. * specify an order of "desc" for descending or "asc" for ascending sort order
  71442. * of corresponding values.
  71443. *
  71444. * @private
  71445. * @param {Object} object The object to compare.
  71446. * @param {Object} other The other object to compare.
  71447. * @param {boolean[]|string[]} orders The order to sort by for each property.
  71448. * @returns {number} Returns the sort order indicator for `object`.
  71449. */
  71450. function compareMultiple(object, other, orders) {
  71451. var index = -1,
  71452. objCriteria = object.criteria,
  71453. othCriteria = other.criteria,
  71454. length = objCriteria.length,
  71455. ordersLength = orders.length;
  71456. while (++index < length) {
  71457. var result = compareAscending(objCriteria[index], othCriteria[index]);
  71458. if (result) {
  71459. if (index >= ordersLength) {
  71460. return result;
  71461. }
  71462. var order = orders[index];
  71463. return result * (order == 'desc' ? -1 : 1);
  71464. }
  71465. }
  71466. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  71467. // that causes it, under certain circumstances, to provide the same value for
  71468. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  71469. // for more details.
  71470. //
  71471. // This also ensures a stable sort in V8 and other engines.
  71472. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  71473. return object.index - other.index;
  71474. }
  71475. /**
  71476. * Creates an array that is the composition of partially applied arguments,
  71477. * placeholders, and provided arguments into a single array of arguments.
  71478. *
  71479. * @private
  71480. * @param {Array} args The provided arguments.
  71481. * @param {Array} partials The arguments to prepend to those provided.
  71482. * @param {Array} holders The `partials` placeholder indexes.
  71483. * @params {boolean} [isCurried] Specify composing for a curried function.
  71484. * @returns {Array} Returns the new array of composed arguments.
  71485. */
  71486. function composeArgs(args, partials, holders, isCurried) {
  71487. var argsIndex = -1,
  71488. argsLength = args.length,
  71489. holdersLength = holders.length,
  71490. leftIndex = -1,
  71491. leftLength = partials.length,
  71492. rangeLength = nativeMax(argsLength - holdersLength, 0),
  71493. result = Array(leftLength + rangeLength),
  71494. isUncurried = !isCurried;
  71495. while (++leftIndex < leftLength) {
  71496. result[leftIndex] = partials[leftIndex];
  71497. }
  71498. while (++argsIndex < holdersLength) {
  71499. if (isUncurried || argsIndex < argsLength) {
  71500. result[holders[argsIndex]] = args[argsIndex];
  71501. }
  71502. }
  71503. while (rangeLength--) {
  71504. result[leftIndex++] = args[argsIndex++];
  71505. }
  71506. return result;
  71507. }
  71508. /**
  71509. * This function is like `composeArgs` except that the arguments composition
  71510. * is tailored for `_.partialRight`.
  71511. *
  71512. * @private
  71513. * @param {Array} args The provided arguments.
  71514. * @param {Array} partials The arguments to append to those provided.
  71515. * @param {Array} holders The `partials` placeholder indexes.
  71516. * @params {boolean} [isCurried] Specify composing for a curried function.
  71517. * @returns {Array} Returns the new array of composed arguments.
  71518. */
  71519. function composeArgsRight(args, partials, holders, isCurried) {
  71520. var argsIndex = -1,
  71521. argsLength = args.length,
  71522. holdersIndex = -1,
  71523. holdersLength = holders.length,
  71524. rightIndex = -1,
  71525. rightLength = partials.length,
  71526. rangeLength = nativeMax(argsLength - holdersLength, 0),
  71527. result = Array(rangeLength + rightLength),
  71528. isUncurried = !isCurried;
  71529. while (++argsIndex < rangeLength) {
  71530. result[argsIndex] = args[argsIndex];
  71531. }
  71532. var offset = argsIndex;
  71533. while (++rightIndex < rightLength) {
  71534. result[offset + rightIndex] = partials[rightIndex];
  71535. }
  71536. while (++holdersIndex < holdersLength) {
  71537. if (isUncurried || argsIndex < argsLength) {
  71538. result[offset + holders[holdersIndex]] = args[argsIndex++];
  71539. }
  71540. }
  71541. return result;
  71542. }
  71543. /**
  71544. * Copies the values of `source` to `array`.
  71545. *
  71546. * @private
  71547. * @param {Array} source The array to copy values from.
  71548. * @param {Array} [array=[]] The array to copy values to.
  71549. * @returns {Array} Returns `array`.
  71550. */
  71551. function copyArray(source, array) {
  71552. var index = -1,
  71553. length = source.length;
  71554. array || (array = Array(length));
  71555. while (++index < length) {
  71556. array[index] = source[index];
  71557. }
  71558. return array;
  71559. }
  71560. /**
  71561. * Copies properties of `source` to `object`.
  71562. *
  71563. * @private
  71564. * @param {Object} source The object to copy properties from.
  71565. * @param {Array} props The property identifiers to copy.
  71566. * @param {Object} [object={}] The object to copy properties to.
  71567. * @param {Function} [customizer] The function to customize copied values.
  71568. * @returns {Object} Returns `object`.
  71569. */
  71570. function copyObject(source, props, object, customizer) {
  71571. var isNew = !object;
  71572. object || (object = {});
  71573. var index = -1,
  71574. length = props.length;
  71575. while (++index < length) {
  71576. var key = props[index];
  71577. var newValue = customizer
  71578. ? customizer(object[key], source[key], key, object, source)
  71579. : undefined;
  71580. if (newValue === undefined) {
  71581. newValue = source[key];
  71582. }
  71583. if (isNew) {
  71584. baseAssignValue(object, key, newValue);
  71585. } else {
  71586. assignValue(object, key, newValue);
  71587. }
  71588. }
  71589. return object;
  71590. }
  71591. /**
  71592. * Copies own symbols of `source` to `object`.
  71593. *
  71594. * @private
  71595. * @param {Object} source The object to copy symbols from.
  71596. * @param {Object} [object={}] The object to copy symbols to.
  71597. * @returns {Object} Returns `object`.
  71598. */
  71599. function copySymbols(source, object) {
  71600. return copyObject(source, getSymbols(source), object);
  71601. }
  71602. /**
  71603. * Copies own and inherited symbols of `source` to `object`.
  71604. *
  71605. * @private
  71606. * @param {Object} source The object to copy symbols from.
  71607. * @param {Object} [object={}] The object to copy symbols to.
  71608. * @returns {Object} Returns `object`.
  71609. */
  71610. function copySymbolsIn(source, object) {
  71611. return copyObject(source, getSymbolsIn(source), object);
  71612. }
  71613. /**
  71614. * Creates a function like `_.groupBy`.
  71615. *
  71616. * @private
  71617. * @param {Function} setter The function to set accumulator values.
  71618. * @param {Function} [initializer] The accumulator object initializer.
  71619. * @returns {Function} Returns the new aggregator function.
  71620. */
  71621. function createAggregator(setter, initializer) {
  71622. return function(collection, iteratee) {
  71623. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  71624. accumulator = initializer ? initializer() : {};
  71625. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  71626. };
  71627. }
  71628. /**
  71629. * Creates a function like `_.assign`.
  71630. *
  71631. * @private
  71632. * @param {Function} assigner The function to assign values.
  71633. * @returns {Function} Returns the new assigner function.
  71634. */
  71635. function createAssigner(assigner) {
  71636. return baseRest(function(object, sources) {
  71637. var index = -1,
  71638. length = sources.length,
  71639. customizer = length > 1 ? sources[length - 1] : undefined,
  71640. guard = length > 2 ? sources[2] : undefined;
  71641. customizer = (assigner.length > 3 && typeof customizer == 'function')
  71642. ? (length--, customizer)
  71643. : undefined;
  71644. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  71645. customizer = length < 3 ? undefined : customizer;
  71646. length = 1;
  71647. }
  71648. object = Object(object);
  71649. while (++index < length) {
  71650. var source = sources[index];
  71651. if (source) {
  71652. assigner(object, source, index, customizer);
  71653. }
  71654. }
  71655. return object;
  71656. });
  71657. }
  71658. /**
  71659. * Creates a `baseEach` or `baseEachRight` function.
  71660. *
  71661. * @private
  71662. * @param {Function} eachFunc The function to iterate over a collection.
  71663. * @param {boolean} [fromRight] Specify iterating from right to left.
  71664. * @returns {Function} Returns the new base function.
  71665. */
  71666. function createBaseEach(eachFunc, fromRight) {
  71667. return function(collection, iteratee) {
  71668. if (collection == null) {
  71669. return collection;
  71670. }
  71671. if (!isArrayLike(collection)) {
  71672. return eachFunc(collection, iteratee);
  71673. }
  71674. var length = collection.length,
  71675. index = fromRight ? length : -1,
  71676. iterable = Object(collection);
  71677. while ((fromRight ? index-- : ++index < length)) {
  71678. if (iteratee(iterable[index], index, iterable) === false) {
  71679. break;
  71680. }
  71681. }
  71682. return collection;
  71683. };
  71684. }
  71685. /**
  71686. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  71687. *
  71688. * @private
  71689. * @param {boolean} [fromRight] Specify iterating from right to left.
  71690. * @returns {Function} Returns the new base function.
  71691. */
  71692. function createBaseFor(fromRight) {
  71693. return function(object, iteratee, keysFunc) {
  71694. var index = -1,
  71695. iterable = Object(object),
  71696. props = keysFunc(object),
  71697. length = props.length;
  71698. while (length--) {
  71699. var key = props[fromRight ? length : ++index];
  71700. if (iteratee(iterable[key], key, iterable) === false) {
  71701. break;
  71702. }
  71703. }
  71704. return object;
  71705. };
  71706. }
  71707. /**
  71708. * Creates a function that wraps `func` to invoke it with the optional `this`
  71709. * binding of `thisArg`.
  71710. *
  71711. * @private
  71712. * @param {Function} func The function to wrap.
  71713. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  71714. * @param {*} [thisArg] The `this` binding of `func`.
  71715. * @returns {Function} Returns the new wrapped function.
  71716. */
  71717. function createBind(func, bitmask, thisArg) {
  71718. var isBind = bitmask & WRAP_BIND_FLAG,
  71719. Ctor = createCtor(func);
  71720. function wrapper() {
  71721. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  71722. return fn.apply(isBind ? thisArg : this, arguments);
  71723. }
  71724. return wrapper;
  71725. }
  71726. /**
  71727. * Creates a function like `_.lowerFirst`.
  71728. *
  71729. * @private
  71730. * @param {string} methodName The name of the `String` case method to use.
  71731. * @returns {Function} Returns the new case function.
  71732. */
  71733. function createCaseFirst(methodName) {
  71734. return function(string) {
  71735. string = toString(string);
  71736. var strSymbols = hasUnicode(string)
  71737. ? stringToArray(string)
  71738. : undefined;
  71739. var chr = strSymbols
  71740. ? strSymbols[0]
  71741. : string.charAt(0);
  71742. var trailing = strSymbols
  71743. ? castSlice(strSymbols, 1).join('')
  71744. : string.slice(1);
  71745. return chr[methodName]() + trailing;
  71746. };
  71747. }
  71748. /**
  71749. * Creates a function like `_.camelCase`.
  71750. *
  71751. * @private
  71752. * @param {Function} callback The function to combine each word.
  71753. * @returns {Function} Returns the new compounder function.
  71754. */
  71755. function createCompounder(callback) {
  71756. return function(string) {
  71757. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  71758. };
  71759. }
  71760. /**
  71761. * Creates a function that produces an instance of `Ctor` regardless of
  71762. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  71763. *
  71764. * @private
  71765. * @param {Function} Ctor The constructor to wrap.
  71766. * @returns {Function} Returns the new wrapped function.
  71767. */
  71768. function createCtor(Ctor) {
  71769. return function() {
  71770. // Use a `switch` statement to work with class constructors. See
  71771. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  71772. // for more details.
  71773. var args = arguments;
  71774. switch (args.length) {
  71775. case 0: return new Ctor;
  71776. case 1: return new Ctor(args[0]);
  71777. case 2: return new Ctor(args[0], args[1]);
  71778. case 3: return new Ctor(args[0], args[1], args[2]);
  71779. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  71780. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  71781. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  71782. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  71783. }
  71784. var thisBinding = baseCreate(Ctor.prototype),
  71785. result = Ctor.apply(thisBinding, args);
  71786. // Mimic the constructor's `return` behavior.
  71787. // See https://es5.github.io/#x13.2.2 for more details.
  71788. return isObject(result) ? result : thisBinding;
  71789. };
  71790. }
  71791. /**
  71792. * Creates a function that wraps `func` to enable currying.
  71793. *
  71794. * @private
  71795. * @param {Function} func The function to wrap.
  71796. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  71797. * @param {number} arity The arity of `func`.
  71798. * @returns {Function} Returns the new wrapped function.
  71799. */
  71800. function createCurry(func, bitmask, arity) {
  71801. var Ctor = createCtor(func);
  71802. function wrapper() {
  71803. var length = arguments.length,
  71804. args = Array(length),
  71805. index = length,
  71806. placeholder = getHolder(wrapper);
  71807. while (index--) {
  71808. args[index] = arguments[index];
  71809. }
  71810. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  71811. ? []
  71812. : replaceHolders(args, placeholder);
  71813. length -= holders.length;
  71814. if (length < arity) {
  71815. return createRecurry(
  71816. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  71817. args, holders, undefined, undefined, arity - length);
  71818. }
  71819. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  71820. return apply(fn, this, args);
  71821. }
  71822. return wrapper;
  71823. }
  71824. /**
  71825. * Creates a `_.find` or `_.findLast` function.
  71826. *
  71827. * @private
  71828. * @param {Function} findIndexFunc The function to find the collection index.
  71829. * @returns {Function} Returns the new find function.
  71830. */
  71831. function createFind(findIndexFunc) {
  71832. return function(collection, predicate, fromIndex) {
  71833. var iterable = Object(collection);
  71834. if (!isArrayLike(collection)) {
  71835. var iteratee = getIteratee(predicate, 3);
  71836. collection = keys(collection);
  71837. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  71838. }
  71839. var index = findIndexFunc(collection, predicate, fromIndex);
  71840. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  71841. };
  71842. }
  71843. /**
  71844. * Creates a `_.flow` or `_.flowRight` function.
  71845. *
  71846. * @private
  71847. * @param {boolean} [fromRight] Specify iterating from right to left.
  71848. * @returns {Function} Returns the new flow function.
  71849. */
  71850. function createFlow(fromRight) {
  71851. return flatRest(function(funcs) {
  71852. var length = funcs.length,
  71853. index = length,
  71854. prereq = LodashWrapper.prototype.thru;
  71855. if (fromRight) {
  71856. funcs.reverse();
  71857. }
  71858. while (index--) {
  71859. var func = funcs[index];
  71860. if (typeof func != 'function') {
  71861. throw new TypeError(FUNC_ERROR_TEXT);
  71862. }
  71863. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  71864. var wrapper = new LodashWrapper([], true);
  71865. }
  71866. }
  71867. index = wrapper ? index : length;
  71868. while (++index < length) {
  71869. func = funcs[index];
  71870. var funcName = getFuncName(func),
  71871. data = funcName == 'wrapper' ? getData(func) : undefined;
  71872. if (data && isLaziable(data[0]) &&
  71873. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  71874. !data[4].length && data[9] == 1
  71875. ) {
  71876. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  71877. } else {
  71878. wrapper = (func.length == 1 && isLaziable(func))
  71879. ? wrapper[funcName]()
  71880. : wrapper.thru(func);
  71881. }
  71882. }
  71883. return function() {
  71884. var args = arguments,
  71885. value = args[0];
  71886. if (wrapper && args.length == 1 && isArray(value)) {
  71887. return wrapper.plant(value).value();
  71888. }
  71889. var index = 0,
  71890. result = length ? funcs[index].apply(this, args) : value;
  71891. while (++index < length) {
  71892. result = funcs[index].call(this, result);
  71893. }
  71894. return result;
  71895. };
  71896. });
  71897. }
  71898. /**
  71899. * Creates a function that wraps `func` to invoke it with optional `this`
  71900. * binding of `thisArg`, partial application, and currying.
  71901. *
  71902. * @private
  71903. * @param {Function|string} func The function or method name to wrap.
  71904. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  71905. * @param {*} [thisArg] The `this` binding of `func`.
  71906. * @param {Array} [partials] The arguments to prepend to those provided to
  71907. * the new function.
  71908. * @param {Array} [holders] The `partials` placeholder indexes.
  71909. * @param {Array} [partialsRight] The arguments to append to those provided
  71910. * to the new function.
  71911. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  71912. * @param {Array} [argPos] The argument positions of the new function.
  71913. * @param {number} [ary] The arity cap of `func`.
  71914. * @param {number} [arity] The arity of `func`.
  71915. * @returns {Function} Returns the new wrapped function.
  71916. */
  71917. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  71918. var isAry = bitmask & WRAP_ARY_FLAG,
  71919. isBind = bitmask & WRAP_BIND_FLAG,
  71920. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  71921. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  71922. isFlip = bitmask & WRAP_FLIP_FLAG,
  71923. Ctor = isBindKey ? undefined : createCtor(func);
  71924. function wrapper() {
  71925. var length = arguments.length,
  71926. args = Array(length),
  71927. index = length;
  71928. while (index--) {
  71929. args[index] = arguments[index];
  71930. }
  71931. if (isCurried) {
  71932. var placeholder = getHolder(wrapper),
  71933. holdersCount = countHolders(args, placeholder);
  71934. }
  71935. if (partials) {
  71936. args = composeArgs(args, partials, holders, isCurried);
  71937. }
  71938. if (partialsRight) {
  71939. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  71940. }
  71941. length -= holdersCount;
  71942. if (isCurried && length < arity) {
  71943. var newHolders = replaceHolders(args, placeholder);
  71944. return createRecurry(
  71945. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  71946. args, newHolders, argPos, ary, arity - length
  71947. );
  71948. }
  71949. var thisBinding = isBind ? thisArg : this,
  71950. fn = isBindKey ? thisBinding[func] : func;
  71951. length = args.length;
  71952. if (argPos) {
  71953. args = reorder(args, argPos);
  71954. } else if (isFlip && length > 1) {
  71955. args.reverse();
  71956. }
  71957. if (isAry && ary < length) {
  71958. args.length = ary;
  71959. }
  71960. if (this && this !== root && this instanceof wrapper) {
  71961. fn = Ctor || createCtor(fn);
  71962. }
  71963. return fn.apply(thisBinding, args);
  71964. }
  71965. return wrapper;
  71966. }
  71967. /**
  71968. * Creates a function like `_.invertBy`.
  71969. *
  71970. * @private
  71971. * @param {Function} setter The function to set accumulator values.
  71972. * @param {Function} toIteratee The function to resolve iteratees.
  71973. * @returns {Function} Returns the new inverter function.
  71974. */
  71975. function createInverter(setter, toIteratee) {
  71976. return function(object, iteratee) {
  71977. return baseInverter(object, setter, toIteratee(iteratee), {});
  71978. };
  71979. }
  71980. /**
  71981. * Creates a function that performs a mathematical operation on two values.
  71982. *
  71983. * @private
  71984. * @param {Function} operator The function to perform the operation.
  71985. * @param {number} [defaultValue] The value used for `undefined` arguments.
  71986. * @returns {Function} Returns the new mathematical operation function.
  71987. */
  71988. function createMathOperation(operator, defaultValue) {
  71989. return function(value, other) {
  71990. var result;
  71991. if (value === undefined && other === undefined) {
  71992. return defaultValue;
  71993. }
  71994. if (value !== undefined) {
  71995. result = value;
  71996. }
  71997. if (other !== undefined) {
  71998. if (result === undefined) {
  71999. return other;
  72000. }
  72001. if (typeof value == 'string' || typeof other == 'string') {
  72002. value = baseToString(value);
  72003. other = baseToString(other);
  72004. } else {
  72005. value = baseToNumber(value);
  72006. other = baseToNumber(other);
  72007. }
  72008. result = operator(value, other);
  72009. }
  72010. return result;
  72011. };
  72012. }
  72013. /**
  72014. * Creates a function like `_.over`.
  72015. *
  72016. * @private
  72017. * @param {Function} arrayFunc The function to iterate over iteratees.
  72018. * @returns {Function} Returns the new over function.
  72019. */
  72020. function createOver(arrayFunc) {
  72021. return flatRest(function(iteratees) {
  72022. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  72023. return baseRest(function(args) {
  72024. var thisArg = this;
  72025. return arrayFunc(iteratees, function(iteratee) {
  72026. return apply(iteratee, thisArg, args);
  72027. });
  72028. });
  72029. });
  72030. }
  72031. /**
  72032. * Creates the padding for `string` based on `length`. The `chars` string
  72033. * is truncated if the number of characters exceeds `length`.
  72034. *
  72035. * @private
  72036. * @param {number} length The padding length.
  72037. * @param {string} [chars=' '] The string used as padding.
  72038. * @returns {string} Returns the padding for `string`.
  72039. */
  72040. function createPadding(length, chars) {
  72041. chars = chars === undefined ? ' ' : baseToString(chars);
  72042. var charsLength = chars.length;
  72043. if (charsLength < 2) {
  72044. return charsLength ? baseRepeat(chars, length) : chars;
  72045. }
  72046. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  72047. return hasUnicode(chars)
  72048. ? castSlice(stringToArray(result), 0, length).join('')
  72049. : result.slice(0, length);
  72050. }
  72051. /**
  72052. * Creates a function that wraps `func` to invoke it with the `this` binding
  72053. * of `thisArg` and `partials` prepended to the arguments it receives.
  72054. *
  72055. * @private
  72056. * @param {Function} func The function to wrap.
  72057. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  72058. * @param {*} thisArg The `this` binding of `func`.
  72059. * @param {Array} partials The arguments to prepend to those provided to
  72060. * the new function.
  72061. * @returns {Function} Returns the new wrapped function.
  72062. */
  72063. function createPartial(func, bitmask, thisArg, partials) {
  72064. var isBind = bitmask & WRAP_BIND_FLAG,
  72065. Ctor = createCtor(func);
  72066. function wrapper() {
  72067. var argsIndex = -1,
  72068. argsLength = arguments.length,
  72069. leftIndex = -1,
  72070. leftLength = partials.length,
  72071. args = Array(leftLength + argsLength),
  72072. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  72073. while (++leftIndex < leftLength) {
  72074. args[leftIndex] = partials[leftIndex];
  72075. }
  72076. while (argsLength--) {
  72077. args[leftIndex++] = arguments[++argsIndex];
  72078. }
  72079. return apply(fn, isBind ? thisArg : this, args);
  72080. }
  72081. return wrapper;
  72082. }
  72083. /**
  72084. * Creates a `_.range` or `_.rangeRight` function.
  72085. *
  72086. * @private
  72087. * @param {boolean} [fromRight] Specify iterating from right to left.
  72088. * @returns {Function} Returns the new range function.
  72089. */
  72090. function createRange(fromRight) {
  72091. return function(start, end, step) {
  72092. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  72093. end = step = undefined;
  72094. }
  72095. // Ensure the sign of `-0` is preserved.
  72096. start = toFinite(start);
  72097. if (end === undefined) {
  72098. end = start;
  72099. start = 0;
  72100. } else {
  72101. end = toFinite(end);
  72102. }
  72103. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  72104. return baseRange(start, end, step, fromRight);
  72105. };
  72106. }
  72107. /**
  72108. * Creates a function that performs a relational operation on two values.
  72109. *
  72110. * @private
  72111. * @param {Function} operator The function to perform the operation.
  72112. * @returns {Function} Returns the new relational operation function.
  72113. */
  72114. function createRelationalOperation(operator) {
  72115. return function(value, other) {
  72116. if (!(typeof value == 'string' && typeof other == 'string')) {
  72117. value = toNumber(value);
  72118. other = toNumber(other);
  72119. }
  72120. return operator(value, other);
  72121. };
  72122. }
  72123. /**
  72124. * Creates a function that wraps `func` to continue currying.
  72125. *
  72126. * @private
  72127. * @param {Function} func The function to wrap.
  72128. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  72129. * @param {Function} wrapFunc The function to create the `func` wrapper.
  72130. * @param {*} placeholder The placeholder value.
  72131. * @param {*} [thisArg] The `this` binding of `func`.
  72132. * @param {Array} [partials] The arguments to prepend to those provided to
  72133. * the new function.
  72134. * @param {Array} [holders] The `partials` placeholder indexes.
  72135. * @param {Array} [argPos] The argument positions of the new function.
  72136. * @param {number} [ary] The arity cap of `func`.
  72137. * @param {number} [arity] The arity of `func`.
  72138. * @returns {Function} Returns the new wrapped function.
  72139. */
  72140. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  72141. var isCurry = bitmask & WRAP_CURRY_FLAG,
  72142. newHolders = isCurry ? holders : undefined,
  72143. newHoldersRight = isCurry ? undefined : holders,
  72144. newPartials = isCurry ? partials : undefined,
  72145. newPartialsRight = isCurry ? undefined : partials;
  72146. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  72147. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  72148. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  72149. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  72150. }
  72151. var newData = [
  72152. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  72153. newHoldersRight, argPos, ary, arity
  72154. ];
  72155. var result = wrapFunc.apply(undefined, newData);
  72156. if (isLaziable(func)) {
  72157. setData(result, newData);
  72158. }
  72159. result.placeholder = placeholder;
  72160. return setWrapToString(result, func, bitmask);
  72161. }
  72162. /**
  72163. * Creates a function like `_.round`.
  72164. *
  72165. * @private
  72166. * @param {string} methodName The name of the `Math` method to use when rounding.
  72167. * @returns {Function} Returns the new round function.
  72168. */
  72169. function createRound(methodName) {
  72170. var func = Math[methodName];
  72171. return function(number, precision) {
  72172. number = toNumber(number);
  72173. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  72174. if (precision && nativeIsFinite(number)) {
  72175. // Shift with exponential notation to avoid floating-point issues.
  72176. // See [MDN](https://mdn.io/round#Examples) for more details.
  72177. var pair = (toString(number) + 'e').split('e'),
  72178. value = func(pair[0] + 'e' + (+pair[1] + precision));
  72179. pair = (toString(value) + 'e').split('e');
  72180. return +(pair[0] + 'e' + (+pair[1] - precision));
  72181. }
  72182. return func(number);
  72183. };
  72184. }
  72185. /**
  72186. * Creates a set object of `values`.
  72187. *
  72188. * @private
  72189. * @param {Array} values The values to add to the set.
  72190. * @returns {Object} Returns the new set.
  72191. */
  72192. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  72193. return new Set(values);
  72194. };
  72195. /**
  72196. * Creates a `_.toPairs` or `_.toPairsIn` function.
  72197. *
  72198. * @private
  72199. * @param {Function} keysFunc The function to get the keys of a given object.
  72200. * @returns {Function} Returns the new pairs function.
  72201. */
  72202. function createToPairs(keysFunc) {
  72203. return function(object) {
  72204. var tag = getTag(object);
  72205. if (tag == mapTag) {
  72206. return mapToArray(object);
  72207. }
  72208. if (tag == setTag) {
  72209. return setToPairs(object);
  72210. }
  72211. return baseToPairs(object, keysFunc(object));
  72212. };
  72213. }
  72214. /**
  72215. * Creates a function that either curries or invokes `func` with optional
  72216. * `this` binding and partially applied arguments.
  72217. *
  72218. * @private
  72219. * @param {Function|string} func The function or method name to wrap.
  72220. * @param {number} bitmask The bitmask flags.
  72221. * 1 - `_.bind`
  72222. * 2 - `_.bindKey`
  72223. * 4 - `_.curry` or `_.curryRight` of a bound function
  72224. * 8 - `_.curry`
  72225. * 16 - `_.curryRight`
  72226. * 32 - `_.partial`
  72227. * 64 - `_.partialRight`
  72228. * 128 - `_.rearg`
  72229. * 256 - `_.ary`
  72230. * 512 - `_.flip`
  72231. * @param {*} [thisArg] The `this` binding of `func`.
  72232. * @param {Array} [partials] The arguments to be partially applied.
  72233. * @param {Array} [holders] The `partials` placeholder indexes.
  72234. * @param {Array} [argPos] The argument positions of the new function.
  72235. * @param {number} [ary] The arity cap of `func`.
  72236. * @param {number} [arity] The arity of `func`.
  72237. * @returns {Function} Returns the new wrapped function.
  72238. */
  72239. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  72240. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  72241. if (!isBindKey && typeof func != 'function') {
  72242. throw new TypeError(FUNC_ERROR_TEXT);
  72243. }
  72244. var length = partials ? partials.length : 0;
  72245. if (!length) {
  72246. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  72247. partials = holders = undefined;
  72248. }
  72249. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  72250. arity = arity === undefined ? arity : toInteger(arity);
  72251. length -= holders ? holders.length : 0;
  72252. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  72253. var partialsRight = partials,
  72254. holdersRight = holders;
  72255. partials = holders = undefined;
  72256. }
  72257. var data = isBindKey ? undefined : getData(func);
  72258. var newData = [
  72259. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  72260. argPos, ary, arity
  72261. ];
  72262. if (data) {
  72263. mergeData(newData, data);
  72264. }
  72265. func = newData[0];
  72266. bitmask = newData[1];
  72267. thisArg = newData[2];
  72268. partials = newData[3];
  72269. holders = newData[4];
  72270. arity = newData[9] = newData[9] === undefined
  72271. ? (isBindKey ? 0 : func.length)
  72272. : nativeMax(newData[9] - length, 0);
  72273. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  72274. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  72275. }
  72276. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  72277. var result = createBind(func, bitmask, thisArg);
  72278. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  72279. result = createCurry(func, bitmask, arity);
  72280. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  72281. result = createPartial(func, bitmask, thisArg, partials);
  72282. } else {
  72283. result = createHybrid.apply(undefined, newData);
  72284. }
  72285. var setter = data ? baseSetData : setData;
  72286. return setWrapToString(setter(result, newData), func, bitmask);
  72287. }
  72288. /**
  72289. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  72290. * of source objects to the destination object for all destination properties
  72291. * that resolve to `undefined`.
  72292. *
  72293. * @private
  72294. * @param {*} objValue The destination value.
  72295. * @param {*} srcValue The source value.
  72296. * @param {string} key The key of the property to assign.
  72297. * @param {Object} object The parent object of `objValue`.
  72298. * @returns {*} Returns the value to assign.
  72299. */
  72300. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  72301. if (objValue === undefined ||
  72302. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  72303. return srcValue;
  72304. }
  72305. return objValue;
  72306. }
  72307. /**
  72308. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  72309. * objects into destination objects that are passed thru.
  72310. *
  72311. * @private
  72312. * @param {*} objValue The destination value.
  72313. * @param {*} srcValue The source value.
  72314. * @param {string} key The key of the property to merge.
  72315. * @param {Object} object The parent object of `objValue`.
  72316. * @param {Object} source The parent object of `srcValue`.
  72317. * @param {Object} [stack] Tracks traversed source values and their merged
  72318. * counterparts.
  72319. * @returns {*} Returns the value to assign.
  72320. */
  72321. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  72322. if (isObject(objValue) && isObject(srcValue)) {
  72323. // Recursively merge objects and arrays (susceptible to call stack limits).
  72324. stack.set(srcValue, objValue);
  72325. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  72326. stack['delete'](srcValue);
  72327. }
  72328. return objValue;
  72329. }
  72330. /**
  72331. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  72332. * objects.
  72333. *
  72334. * @private
  72335. * @param {*} value The value to inspect.
  72336. * @param {string} key The key of the property to inspect.
  72337. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  72338. */
  72339. function customOmitClone(value) {
  72340. return isPlainObject(value) ? undefined : value;
  72341. }
  72342. /**
  72343. * A specialized version of `baseIsEqualDeep` for arrays with support for
  72344. * partial deep comparisons.
  72345. *
  72346. * @private
  72347. * @param {Array} array The array to compare.
  72348. * @param {Array} other The other array to compare.
  72349. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  72350. * @param {Function} customizer The function to customize comparisons.
  72351. * @param {Function} equalFunc The function to determine equivalents of values.
  72352. * @param {Object} stack Tracks traversed `array` and `other` objects.
  72353. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  72354. */
  72355. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  72356. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  72357. arrLength = array.length,
  72358. othLength = other.length;
  72359. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  72360. return false;
  72361. }
  72362. // Check that cyclic values are equal.
  72363. var arrStacked = stack.get(array);
  72364. var othStacked = stack.get(other);
  72365. if (arrStacked && othStacked) {
  72366. return arrStacked == other && othStacked == array;
  72367. }
  72368. var index = -1,
  72369. result = true,
  72370. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  72371. stack.set(array, other);
  72372. stack.set(other, array);
  72373. // Ignore non-index properties.
  72374. while (++index < arrLength) {
  72375. var arrValue = array[index],
  72376. othValue = other[index];
  72377. if (customizer) {
  72378. var compared = isPartial
  72379. ? customizer(othValue, arrValue, index, other, array, stack)
  72380. : customizer(arrValue, othValue, index, array, other, stack);
  72381. }
  72382. if (compared !== undefined) {
  72383. if (compared) {
  72384. continue;
  72385. }
  72386. result = false;
  72387. break;
  72388. }
  72389. // Recursively compare arrays (susceptible to call stack limits).
  72390. if (seen) {
  72391. if (!arraySome(other, function(othValue, othIndex) {
  72392. if (!cacheHas(seen, othIndex) &&
  72393. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  72394. return seen.push(othIndex);
  72395. }
  72396. })) {
  72397. result = false;
  72398. break;
  72399. }
  72400. } else if (!(
  72401. arrValue === othValue ||
  72402. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  72403. )) {
  72404. result = false;
  72405. break;
  72406. }
  72407. }
  72408. stack['delete'](array);
  72409. stack['delete'](other);
  72410. return result;
  72411. }
  72412. /**
  72413. * A specialized version of `baseIsEqualDeep` for comparing objects of
  72414. * the same `toStringTag`.
  72415. *
  72416. * **Note:** This function only supports comparing values with tags of
  72417. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  72418. *
  72419. * @private
  72420. * @param {Object} object The object to compare.
  72421. * @param {Object} other The other object to compare.
  72422. * @param {string} tag The `toStringTag` of the objects to compare.
  72423. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  72424. * @param {Function} customizer The function to customize comparisons.
  72425. * @param {Function} equalFunc The function to determine equivalents of values.
  72426. * @param {Object} stack Tracks traversed `object` and `other` objects.
  72427. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  72428. */
  72429. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  72430. switch (tag) {
  72431. case dataViewTag:
  72432. if ((object.byteLength != other.byteLength) ||
  72433. (object.byteOffset != other.byteOffset)) {
  72434. return false;
  72435. }
  72436. object = object.buffer;
  72437. other = other.buffer;
  72438. case arrayBufferTag:
  72439. if ((object.byteLength != other.byteLength) ||
  72440. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  72441. return false;
  72442. }
  72443. return true;
  72444. case boolTag:
  72445. case dateTag:
  72446. case numberTag:
  72447. // Coerce booleans to `1` or `0` and dates to milliseconds.
  72448. // Invalid dates are coerced to `NaN`.
  72449. return eq(+object, +other);
  72450. case errorTag:
  72451. return object.name == other.name && object.message == other.message;
  72452. case regexpTag:
  72453. case stringTag:
  72454. // Coerce regexes to strings and treat strings, primitives and objects,
  72455. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  72456. // for more details.
  72457. return object == (other + '');
  72458. case mapTag:
  72459. var convert = mapToArray;
  72460. case setTag:
  72461. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  72462. convert || (convert = setToArray);
  72463. if (object.size != other.size && !isPartial) {
  72464. return false;
  72465. }
  72466. // Assume cyclic values are equal.
  72467. var stacked = stack.get(object);
  72468. if (stacked) {
  72469. return stacked == other;
  72470. }
  72471. bitmask |= COMPARE_UNORDERED_FLAG;
  72472. // Recursively compare objects (susceptible to call stack limits).
  72473. stack.set(object, other);
  72474. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  72475. stack['delete'](object);
  72476. return result;
  72477. case symbolTag:
  72478. if (symbolValueOf) {
  72479. return symbolValueOf.call(object) == symbolValueOf.call(other);
  72480. }
  72481. }
  72482. return false;
  72483. }
  72484. /**
  72485. * A specialized version of `baseIsEqualDeep` for objects with support for
  72486. * partial deep comparisons.
  72487. *
  72488. * @private
  72489. * @param {Object} object The object to compare.
  72490. * @param {Object} other The other object to compare.
  72491. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  72492. * @param {Function} customizer The function to customize comparisons.
  72493. * @param {Function} equalFunc The function to determine equivalents of values.
  72494. * @param {Object} stack Tracks traversed `object` and `other` objects.
  72495. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  72496. */
  72497. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  72498. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  72499. objProps = getAllKeys(object),
  72500. objLength = objProps.length,
  72501. othProps = getAllKeys(other),
  72502. othLength = othProps.length;
  72503. if (objLength != othLength && !isPartial) {
  72504. return false;
  72505. }
  72506. var index = objLength;
  72507. while (index--) {
  72508. var key = objProps[index];
  72509. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  72510. return false;
  72511. }
  72512. }
  72513. // Check that cyclic values are equal.
  72514. var objStacked = stack.get(object);
  72515. var othStacked = stack.get(other);
  72516. if (objStacked && othStacked) {
  72517. return objStacked == other && othStacked == object;
  72518. }
  72519. var result = true;
  72520. stack.set(object, other);
  72521. stack.set(other, object);
  72522. var skipCtor = isPartial;
  72523. while (++index < objLength) {
  72524. key = objProps[index];
  72525. var objValue = object[key],
  72526. othValue = other[key];
  72527. if (customizer) {
  72528. var compared = isPartial
  72529. ? customizer(othValue, objValue, key, other, object, stack)
  72530. : customizer(objValue, othValue, key, object, other, stack);
  72531. }
  72532. // Recursively compare objects (susceptible to call stack limits).
  72533. if (!(compared === undefined
  72534. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  72535. : compared
  72536. )) {
  72537. result = false;
  72538. break;
  72539. }
  72540. skipCtor || (skipCtor = key == 'constructor');
  72541. }
  72542. if (result && !skipCtor) {
  72543. var objCtor = object.constructor,
  72544. othCtor = other.constructor;
  72545. // Non `Object` object instances with different constructors are not equal.
  72546. if (objCtor != othCtor &&
  72547. ('constructor' in object && 'constructor' in other) &&
  72548. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  72549. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  72550. result = false;
  72551. }
  72552. }
  72553. stack['delete'](object);
  72554. stack['delete'](other);
  72555. return result;
  72556. }
  72557. /**
  72558. * A specialized version of `baseRest` which flattens the rest array.
  72559. *
  72560. * @private
  72561. * @param {Function} func The function to apply a rest parameter to.
  72562. * @returns {Function} Returns the new function.
  72563. */
  72564. function flatRest(func) {
  72565. return setToString(overRest(func, undefined, flatten), func + '');
  72566. }
  72567. /**
  72568. * Creates an array of own enumerable property names and symbols of `object`.
  72569. *
  72570. * @private
  72571. * @param {Object} object The object to query.
  72572. * @returns {Array} Returns the array of property names and symbols.
  72573. */
  72574. function getAllKeys(object) {
  72575. return baseGetAllKeys(object, keys, getSymbols);
  72576. }
  72577. /**
  72578. * Creates an array of own and inherited enumerable property names and
  72579. * symbols of `object`.
  72580. *
  72581. * @private
  72582. * @param {Object} object The object to query.
  72583. * @returns {Array} Returns the array of property names and symbols.
  72584. */
  72585. function getAllKeysIn(object) {
  72586. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  72587. }
  72588. /**
  72589. * Gets metadata for `func`.
  72590. *
  72591. * @private
  72592. * @param {Function} func The function to query.
  72593. * @returns {*} Returns the metadata for `func`.
  72594. */
  72595. var getData = !metaMap ? noop : function(func) {
  72596. return metaMap.get(func);
  72597. };
  72598. /**
  72599. * Gets the name of `func`.
  72600. *
  72601. * @private
  72602. * @param {Function} func The function to query.
  72603. * @returns {string} Returns the function name.
  72604. */
  72605. function getFuncName(func) {
  72606. var result = (func.name + ''),
  72607. array = realNames[result],
  72608. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  72609. while (length--) {
  72610. var data = array[length],
  72611. otherFunc = data.func;
  72612. if (otherFunc == null || otherFunc == func) {
  72613. return data.name;
  72614. }
  72615. }
  72616. return result;
  72617. }
  72618. /**
  72619. * Gets the argument placeholder value for `func`.
  72620. *
  72621. * @private
  72622. * @param {Function} func The function to inspect.
  72623. * @returns {*} Returns the placeholder value.
  72624. */
  72625. function getHolder(func) {
  72626. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  72627. return object.placeholder;
  72628. }
  72629. /**
  72630. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  72631. * this function returns the custom method, otherwise it returns `baseIteratee`.
  72632. * If arguments are provided, the chosen function is invoked with them and
  72633. * its result is returned.
  72634. *
  72635. * @private
  72636. * @param {*} [value] The value to convert to an iteratee.
  72637. * @param {number} [arity] The arity of the created iteratee.
  72638. * @returns {Function} Returns the chosen function or its result.
  72639. */
  72640. function getIteratee() {
  72641. var result = lodash.iteratee || iteratee;
  72642. result = result === iteratee ? baseIteratee : result;
  72643. return arguments.length ? result(arguments[0], arguments[1]) : result;
  72644. }
  72645. /**
  72646. * Gets the data for `map`.
  72647. *
  72648. * @private
  72649. * @param {Object} map The map to query.
  72650. * @param {string} key The reference key.
  72651. * @returns {*} Returns the map data.
  72652. */
  72653. function getMapData(map, key) {
  72654. var data = map.__data__;
  72655. return isKeyable(key)
  72656. ? data[typeof key == 'string' ? 'string' : 'hash']
  72657. : data.map;
  72658. }
  72659. /**
  72660. * Gets the property names, values, and compare flags of `object`.
  72661. *
  72662. * @private
  72663. * @param {Object} object The object to query.
  72664. * @returns {Array} Returns the match data of `object`.
  72665. */
  72666. function getMatchData(object) {
  72667. var result = keys(object),
  72668. length = result.length;
  72669. while (length--) {
  72670. var key = result[length],
  72671. value = object[key];
  72672. result[length] = [key, value, isStrictComparable(value)];
  72673. }
  72674. return result;
  72675. }
  72676. /**
  72677. * Gets the native function at `key` of `object`.
  72678. *
  72679. * @private
  72680. * @param {Object} object The object to query.
  72681. * @param {string} key The key of the method to get.
  72682. * @returns {*} Returns the function if it's native, else `undefined`.
  72683. */
  72684. function getNative(object, key) {
  72685. var value = getValue(object, key);
  72686. return baseIsNative(value) ? value : undefined;
  72687. }
  72688. /**
  72689. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  72690. *
  72691. * @private
  72692. * @param {*} value The value to query.
  72693. * @returns {string} Returns the raw `toStringTag`.
  72694. */
  72695. function getRawTag(value) {
  72696. var isOwn = hasOwnProperty.call(value, symToStringTag),
  72697. tag = value[symToStringTag];
  72698. try {
  72699. value[symToStringTag] = undefined;
  72700. var unmasked = true;
  72701. } catch (e) {}
  72702. var result = nativeObjectToString.call(value);
  72703. if (unmasked) {
  72704. if (isOwn) {
  72705. value[symToStringTag] = tag;
  72706. } else {
  72707. delete value[symToStringTag];
  72708. }
  72709. }
  72710. return result;
  72711. }
  72712. /**
  72713. * Creates an array of the own enumerable symbols of `object`.
  72714. *
  72715. * @private
  72716. * @param {Object} object The object to query.
  72717. * @returns {Array} Returns the array of symbols.
  72718. */
  72719. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  72720. if (object == null) {
  72721. return [];
  72722. }
  72723. object = Object(object);
  72724. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  72725. return propertyIsEnumerable.call(object, symbol);
  72726. });
  72727. };
  72728. /**
  72729. * Creates an array of the own and inherited enumerable symbols of `object`.
  72730. *
  72731. * @private
  72732. * @param {Object} object The object to query.
  72733. * @returns {Array} Returns the array of symbols.
  72734. */
  72735. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  72736. var result = [];
  72737. while (object) {
  72738. arrayPush(result, getSymbols(object));
  72739. object = getPrototype(object);
  72740. }
  72741. return result;
  72742. };
  72743. /**
  72744. * Gets the `toStringTag` of `value`.
  72745. *
  72746. * @private
  72747. * @param {*} value The value to query.
  72748. * @returns {string} Returns the `toStringTag`.
  72749. */
  72750. var getTag = baseGetTag;
  72751. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  72752. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  72753. (Map && getTag(new Map) != mapTag) ||
  72754. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  72755. (Set && getTag(new Set) != setTag) ||
  72756. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  72757. getTag = function(value) {
  72758. var result = baseGetTag(value),
  72759. Ctor = result == objectTag ? value.constructor : undefined,
  72760. ctorString = Ctor ? toSource(Ctor) : '';
  72761. if (ctorString) {
  72762. switch (ctorString) {
  72763. case dataViewCtorString: return dataViewTag;
  72764. case mapCtorString: return mapTag;
  72765. case promiseCtorString: return promiseTag;
  72766. case setCtorString: return setTag;
  72767. case weakMapCtorString: return weakMapTag;
  72768. }
  72769. }
  72770. return result;
  72771. };
  72772. }
  72773. /**
  72774. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  72775. *
  72776. * @private
  72777. * @param {number} start The start of the view.
  72778. * @param {number} end The end of the view.
  72779. * @param {Array} transforms The transformations to apply to the view.
  72780. * @returns {Object} Returns an object containing the `start` and `end`
  72781. * positions of the view.
  72782. */
  72783. function getView(start, end, transforms) {
  72784. var index = -1,
  72785. length = transforms.length;
  72786. while (++index < length) {
  72787. var data = transforms[index],
  72788. size = data.size;
  72789. switch (data.type) {
  72790. case 'drop': start += size; break;
  72791. case 'dropRight': end -= size; break;
  72792. case 'take': end = nativeMin(end, start + size); break;
  72793. case 'takeRight': start = nativeMax(start, end - size); break;
  72794. }
  72795. }
  72796. return { 'start': start, 'end': end };
  72797. }
  72798. /**
  72799. * Extracts wrapper details from the `source` body comment.
  72800. *
  72801. * @private
  72802. * @param {string} source The source to inspect.
  72803. * @returns {Array} Returns the wrapper details.
  72804. */
  72805. function getWrapDetails(source) {
  72806. var match = source.match(reWrapDetails);
  72807. return match ? match[1].split(reSplitDetails) : [];
  72808. }
  72809. /**
  72810. * Checks if `path` exists on `object`.
  72811. *
  72812. * @private
  72813. * @param {Object} object The object to query.
  72814. * @param {Array|string} path The path to check.
  72815. * @param {Function} hasFunc The function to check properties.
  72816. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  72817. */
  72818. function hasPath(object, path, hasFunc) {
  72819. path = castPath(path, object);
  72820. var index = -1,
  72821. length = path.length,
  72822. result = false;
  72823. while (++index < length) {
  72824. var key = toKey(path[index]);
  72825. if (!(result = object != null && hasFunc(object, key))) {
  72826. break;
  72827. }
  72828. object = object[key];
  72829. }
  72830. if (result || ++index != length) {
  72831. return result;
  72832. }
  72833. length = object == null ? 0 : object.length;
  72834. return !!length && isLength(length) && isIndex(key, length) &&
  72835. (isArray(object) || isArguments(object));
  72836. }
  72837. /**
  72838. * Initializes an array clone.
  72839. *
  72840. * @private
  72841. * @param {Array} array The array to clone.
  72842. * @returns {Array} Returns the initialized clone.
  72843. */
  72844. function initCloneArray(array) {
  72845. var length = array.length,
  72846. result = new array.constructor(length);
  72847. // Add properties assigned by `RegExp#exec`.
  72848. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  72849. result.index = array.index;
  72850. result.input = array.input;
  72851. }
  72852. return result;
  72853. }
  72854. /**
  72855. * Initializes an object clone.
  72856. *
  72857. * @private
  72858. * @param {Object} object The object to clone.
  72859. * @returns {Object} Returns the initialized clone.
  72860. */
  72861. function initCloneObject(object) {
  72862. return (typeof object.constructor == 'function' && !isPrototype(object))
  72863. ? baseCreate(getPrototype(object))
  72864. : {};
  72865. }
  72866. /**
  72867. * Initializes an object clone based on its `toStringTag`.
  72868. *
  72869. * **Note:** This function only supports cloning values with tags of
  72870. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  72871. *
  72872. * @private
  72873. * @param {Object} object The object to clone.
  72874. * @param {string} tag The `toStringTag` of the object to clone.
  72875. * @param {boolean} [isDeep] Specify a deep clone.
  72876. * @returns {Object} Returns the initialized clone.
  72877. */
  72878. function initCloneByTag(object, tag, isDeep) {
  72879. var Ctor = object.constructor;
  72880. switch (tag) {
  72881. case arrayBufferTag:
  72882. return cloneArrayBuffer(object);
  72883. case boolTag:
  72884. case dateTag:
  72885. return new Ctor(+object);
  72886. case dataViewTag:
  72887. return cloneDataView(object, isDeep);
  72888. case float32Tag: case float64Tag:
  72889. case int8Tag: case int16Tag: case int32Tag:
  72890. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  72891. return cloneTypedArray(object, isDeep);
  72892. case mapTag:
  72893. return new Ctor;
  72894. case numberTag:
  72895. case stringTag:
  72896. return new Ctor(object);
  72897. case regexpTag:
  72898. return cloneRegExp(object);
  72899. case setTag:
  72900. return new Ctor;
  72901. case symbolTag:
  72902. return cloneSymbol(object);
  72903. }
  72904. }
  72905. /**
  72906. * Inserts wrapper `details` in a comment at the top of the `source` body.
  72907. *
  72908. * @private
  72909. * @param {string} source The source to modify.
  72910. * @returns {Array} details The details to insert.
  72911. * @returns {string} Returns the modified source.
  72912. */
  72913. function insertWrapDetails(source, details) {
  72914. var length = details.length;
  72915. if (!length) {
  72916. return source;
  72917. }
  72918. var lastIndex = length - 1;
  72919. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  72920. details = details.join(length > 2 ? ', ' : ' ');
  72921. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  72922. }
  72923. /**
  72924. * Checks if `value` is a flattenable `arguments` object or array.
  72925. *
  72926. * @private
  72927. * @param {*} value The value to check.
  72928. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  72929. */
  72930. function isFlattenable(value) {
  72931. return isArray(value) || isArguments(value) ||
  72932. !!(spreadableSymbol && value && value[spreadableSymbol]);
  72933. }
  72934. /**
  72935. * Checks if `value` is a valid array-like index.
  72936. *
  72937. * @private
  72938. * @param {*} value The value to check.
  72939. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  72940. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  72941. */
  72942. function isIndex(value, length) {
  72943. var type = typeof value;
  72944. length = length == null ? MAX_SAFE_INTEGER : length;
  72945. return !!length &&
  72946. (type == 'number' ||
  72947. (type != 'symbol' && reIsUint.test(value))) &&
  72948. (value > -1 && value % 1 == 0 && value < length);
  72949. }
  72950. /**
  72951. * Checks if the given arguments are from an iteratee call.
  72952. *
  72953. * @private
  72954. * @param {*} value The potential iteratee value argument.
  72955. * @param {*} index The potential iteratee index or key argument.
  72956. * @param {*} object The potential iteratee object argument.
  72957. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  72958. * else `false`.
  72959. */
  72960. function isIterateeCall(value, index, object) {
  72961. if (!isObject(object)) {
  72962. return false;
  72963. }
  72964. var type = typeof index;
  72965. if (type == 'number'
  72966. ? (isArrayLike(object) && isIndex(index, object.length))
  72967. : (type == 'string' && index in object)
  72968. ) {
  72969. return eq(object[index], value);
  72970. }
  72971. return false;
  72972. }
  72973. /**
  72974. * Checks if `value` is a property name and not a property path.
  72975. *
  72976. * @private
  72977. * @param {*} value The value to check.
  72978. * @param {Object} [object] The object to query keys on.
  72979. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  72980. */
  72981. function isKey(value, object) {
  72982. if (isArray(value)) {
  72983. return false;
  72984. }
  72985. var type = typeof value;
  72986. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  72987. value == null || isSymbol(value)) {
  72988. return true;
  72989. }
  72990. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  72991. (object != null && value in Object(object));
  72992. }
  72993. /**
  72994. * Checks if `value` is suitable for use as unique object key.
  72995. *
  72996. * @private
  72997. * @param {*} value The value to check.
  72998. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  72999. */
  73000. function isKeyable(value) {
  73001. var type = typeof value;
  73002. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  73003. ? (value !== '__proto__')
  73004. : (value === null);
  73005. }
  73006. /**
  73007. * Checks if `func` has a lazy counterpart.
  73008. *
  73009. * @private
  73010. * @param {Function} func The function to check.
  73011. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  73012. * else `false`.
  73013. */
  73014. function isLaziable(func) {
  73015. var funcName = getFuncName(func),
  73016. other = lodash[funcName];
  73017. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  73018. return false;
  73019. }
  73020. if (func === other) {
  73021. return true;
  73022. }
  73023. var data = getData(other);
  73024. return !!data && func === data[0];
  73025. }
  73026. /**
  73027. * Checks if `func` has its source masked.
  73028. *
  73029. * @private
  73030. * @param {Function} func The function to check.
  73031. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  73032. */
  73033. function isMasked(func) {
  73034. return !!maskSrcKey && (maskSrcKey in func);
  73035. }
  73036. /**
  73037. * Checks if `func` is capable of being masked.
  73038. *
  73039. * @private
  73040. * @param {*} value The value to check.
  73041. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  73042. */
  73043. var isMaskable = coreJsData ? isFunction : stubFalse;
  73044. /**
  73045. * Checks if `value` is likely a prototype object.
  73046. *
  73047. * @private
  73048. * @param {*} value The value to check.
  73049. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  73050. */
  73051. function isPrototype(value) {
  73052. var Ctor = value && value.constructor,
  73053. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  73054. return value === proto;
  73055. }
  73056. /**
  73057. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  73058. *
  73059. * @private
  73060. * @param {*} value The value to check.
  73061. * @returns {boolean} Returns `true` if `value` if suitable for strict
  73062. * equality comparisons, else `false`.
  73063. */
  73064. function isStrictComparable(value) {
  73065. return value === value && !isObject(value);
  73066. }
  73067. /**
  73068. * A specialized version of `matchesProperty` for source values suitable
  73069. * for strict equality comparisons, i.e. `===`.
  73070. *
  73071. * @private
  73072. * @param {string} key The key of the property to get.
  73073. * @param {*} srcValue The value to match.
  73074. * @returns {Function} Returns the new spec function.
  73075. */
  73076. function matchesStrictComparable(key, srcValue) {
  73077. return function(object) {
  73078. if (object == null) {
  73079. return false;
  73080. }
  73081. return object[key] === srcValue &&
  73082. (srcValue !== undefined || (key in Object(object)));
  73083. };
  73084. }
  73085. /**
  73086. * A specialized version of `_.memoize` which clears the memoized function's
  73087. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  73088. *
  73089. * @private
  73090. * @param {Function} func The function to have its output memoized.
  73091. * @returns {Function} Returns the new memoized function.
  73092. */
  73093. function memoizeCapped(func) {
  73094. var result = memoize(func, function(key) {
  73095. if (cache.size === MAX_MEMOIZE_SIZE) {
  73096. cache.clear();
  73097. }
  73098. return key;
  73099. });
  73100. var cache = result.cache;
  73101. return result;
  73102. }
  73103. /**
  73104. * Merges the function metadata of `source` into `data`.
  73105. *
  73106. * Merging metadata reduces the number of wrappers used to invoke a function.
  73107. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  73108. * may be applied regardless of execution order. Methods like `_.ary` and
  73109. * `_.rearg` modify function arguments, making the order in which they are
  73110. * executed important, preventing the merging of metadata. However, we make
  73111. * an exception for a safe combined case where curried functions have `_.ary`
  73112. * and or `_.rearg` applied.
  73113. *
  73114. * @private
  73115. * @param {Array} data The destination metadata.
  73116. * @param {Array} source The source metadata.
  73117. * @returns {Array} Returns `data`.
  73118. */
  73119. function mergeData(data, source) {
  73120. var bitmask = data[1],
  73121. srcBitmask = source[1],
  73122. newBitmask = bitmask | srcBitmask,
  73123. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  73124. var isCombo =
  73125. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  73126. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  73127. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  73128. // Exit early if metadata can't be merged.
  73129. if (!(isCommon || isCombo)) {
  73130. return data;
  73131. }
  73132. // Use source `thisArg` if available.
  73133. if (srcBitmask & WRAP_BIND_FLAG) {
  73134. data[2] = source[2];
  73135. // Set when currying a bound function.
  73136. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  73137. }
  73138. // Compose partial arguments.
  73139. var value = source[3];
  73140. if (value) {
  73141. var partials = data[3];
  73142. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  73143. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  73144. }
  73145. // Compose partial right arguments.
  73146. value = source[5];
  73147. if (value) {
  73148. partials = data[5];
  73149. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  73150. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  73151. }
  73152. // Use source `argPos` if available.
  73153. value = source[7];
  73154. if (value) {
  73155. data[7] = value;
  73156. }
  73157. // Use source `ary` if it's smaller.
  73158. if (srcBitmask & WRAP_ARY_FLAG) {
  73159. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  73160. }
  73161. // Use source `arity` if one is not provided.
  73162. if (data[9] == null) {
  73163. data[9] = source[9];
  73164. }
  73165. // Use source `func` and merge bitmasks.
  73166. data[0] = source[0];
  73167. data[1] = newBitmask;
  73168. return data;
  73169. }
  73170. /**
  73171. * This function is like
  73172. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  73173. * except that it includes inherited enumerable properties.
  73174. *
  73175. * @private
  73176. * @param {Object} object The object to query.
  73177. * @returns {Array} Returns the array of property names.
  73178. */
  73179. function nativeKeysIn(object) {
  73180. var result = [];
  73181. if (object != null) {
  73182. for (var key in Object(object)) {
  73183. result.push(key);
  73184. }
  73185. }
  73186. return result;
  73187. }
  73188. /**
  73189. * Converts `value` to a string using `Object.prototype.toString`.
  73190. *
  73191. * @private
  73192. * @param {*} value The value to convert.
  73193. * @returns {string} Returns the converted string.
  73194. */
  73195. function objectToString(value) {
  73196. return nativeObjectToString.call(value);
  73197. }
  73198. /**
  73199. * A specialized version of `baseRest` which transforms the rest array.
  73200. *
  73201. * @private
  73202. * @param {Function} func The function to apply a rest parameter to.
  73203. * @param {number} [start=func.length-1] The start position of the rest parameter.
  73204. * @param {Function} transform The rest array transform.
  73205. * @returns {Function} Returns the new function.
  73206. */
  73207. function overRest(func, start, transform) {
  73208. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  73209. return function() {
  73210. var args = arguments,
  73211. index = -1,
  73212. length = nativeMax(args.length - start, 0),
  73213. array = Array(length);
  73214. while (++index < length) {
  73215. array[index] = args[start + index];
  73216. }
  73217. index = -1;
  73218. var otherArgs = Array(start + 1);
  73219. while (++index < start) {
  73220. otherArgs[index] = args[index];
  73221. }
  73222. otherArgs[start] = transform(array);
  73223. return apply(func, this, otherArgs);
  73224. };
  73225. }
  73226. /**
  73227. * Gets the parent value at `path` of `object`.
  73228. *
  73229. * @private
  73230. * @param {Object} object The object to query.
  73231. * @param {Array} path The path to get the parent value of.
  73232. * @returns {*} Returns the parent value.
  73233. */
  73234. function parent(object, path) {
  73235. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  73236. }
  73237. /**
  73238. * Reorder `array` according to the specified indexes where the element at
  73239. * the first index is assigned as the first element, the element at
  73240. * the second index is assigned as the second element, and so on.
  73241. *
  73242. * @private
  73243. * @param {Array} array The array to reorder.
  73244. * @param {Array} indexes The arranged array indexes.
  73245. * @returns {Array} Returns `array`.
  73246. */
  73247. function reorder(array, indexes) {
  73248. var arrLength = array.length,
  73249. length = nativeMin(indexes.length, arrLength),
  73250. oldArray = copyArray(array);
  73251. while (length--) {
  73252. var index = indexes[length];
  73253. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  73254. }
  73255. return array;
  73256. }
  73257. /**
  73258. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  73259. *
  73260. * @private
  73261. * @param {Object} object The object to query.
  73262. * @param {string} key The key of the property to get.
  73263. * @returns {*} Returns the property value.
  73264. */
  73265. function safeGet(object, key) {
  73266. if (key === 'constructor' && typeof object[key] === 'function') {
  73267. return;
  73268. }
  73269. if (key == '__proto__') {
  73270. return;
  73271. }
  73272. return object[key];
  73273. }
  73274. /**
  73275. * Sets metadata for `func`.
  73276. *
  73277. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  73278. * period of time, it will trip its breaker and transition to an identity
  73279. * function to avoid garbage collection pauses in V8. See
  73280. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  73281. * for more details.
  73282. *
  73283. * @private
  73284. * @param {Function} func The function to associate metadata with.
  73285. * @param {*} data The metadata.
  73286. * @returns {Function} Returns `func`.
  73287. */
  73288. var setData = shortOut(baseSetData);
  73289. /**
  73290. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  73291. *
  73292. * @private
  73293. * @param {Function} func The function to delay.
  73294. * @param {number} wait The number of milliseconds to delay invocation.
  73295. * @returns {number|Object} Returns the timer id or timeout object.
  73296. */
  73297. var setTimeout = ctxSetTimeout || function(func, wait) {
  73298. return root.setTimeout(func, wait);
  73299. };
  73300. /**
  73301. * Sets the `toString` method of `func` to return `string`.
  73302. *
  73303. * @private
  73304. * @param {Function} func The function to modify.
  73305. * @param {Function} string The `toString` result.
  73306. * @returns {Function} Returns `func`.
  73307. */
  73308. var setToString = shortOut(baseSetToString);
  73309. /**
  73310. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  73311. * with wrapper details in a comment at the top of the source body.
  73312. *
  73313. * @private
  73314. * @param {Function} wrapper The function to modify.
  73315. * @param {Function} reference The reference function.
  73316. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  73317. * @returns {Function} Returns `wrapper`.
  73318. */
  73319. function setWrapToString(wrapper, reference, bitmask) {
  73320. var source = (reference + '');
  73321. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  73322. }
  73323. /**
  73324. * Creates a function that'll short out and invoke `identity` instead
  73325. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  73326. * milliseconds.
  73327. *
  73328. * @private
  73329. * @param {Function} func The function to restrict.
  73330. * @returns {Function} Returns the new shortable function.
  73331. */
  73332. function shortOut(func) {
  73333. var count = 0,
  73334. lastCalled = 0;
  73335. return function() {
  73336. var stamp = nativeNow(),
  73337. remaining = HOT_SPAN - (stamp - lastCalled);
  73338. lastCalled = stamp;
  73339. if (remaining > 0) {
  73340. if (++count >= HOT_COUNT) {
  73341. return arguments[0];
  73342. }
  73343. } else {
  73344. count = 0;
  73345. }
  73346. return func.apply(undefined, arguments);
  73347. };
  73348. }
  73349. /**
  73350. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  73351. *
  73352. * @private
  73353. * @param {Array} array The array to shuffle.
  73354. * @param {number} [size=array.length] The size of `array`.
  73355. * @returns {Array} Returns `array`.
  73356. */
  73357. function shuffleSelf(array, size) {
  73358. var index = -1,
  73359. length = array.length,
  73360. lastIndex = length - 1;
  73361. size = size === undefined ? length : size;
  73362. while (++index < size) {
  73363. var rand = baseRandom(index, lastIndex),
  73364. value = array[rand];
  73365. array[rand] = array[index];
  73366. array[index] = value;
  73367. }
  73368. array.length = size;
  73369. return array;
  73370. }
  73371. /**
  73372. * Converts `string` to a property path array.
  73373. *
  73374. * @private
  73375. * @param {string} string The string to convert.
  73376. * @returns {Array} Returns the property path array.
  73377. */
  73378. var stringToPath = memoizeCapped(function(string) {
  73379. var result = [];
  73380. if (string.charCodeAt(0) === 46 /* . */) {
  73381. result.push('');
  73382. }
  73383. string.replace(rePropName, function(match, number, quote, subString) {
  73384. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  73385. });
  73386. return result;
  73387. });
  73388. /**
  73389. * Converts `value` to a string key if it's not a string or symbol.
  73390. *
  73391. * @private
  73392. * @param {*} value The value to inspect.
  73393. * @returns {string|symbol} Returns the key.
  73394. */
  73395. function toKey(value) {
  73396. if (typeof value == 'string' || isSymbol(value)) {
  73397. return value;
  73398. }
  73399. var result = (value + '');
  73400. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  73401. }
  73402. /**
  73403. * Converts `func` to its source code.
  73404. *
  73405. * @private
  73406. * @param {Function} func The function to convert.
  73407. * @returns {string} Returns the source code.
  73408. */
  73409. function toSource(func) {
  73410. if (func != null) {
  73411. try {
  73412. return funcToString.call(func);
  73413. } catch (e) {}
  73414. try {
  73415. return (func + '');
  73416. } catch (e) {}
  73417. }
  73418. return '';
  73419. }
  73420. /**
  73421. * Updates wrapper `details` based on `bitmask` flags.
  73422. *
  73423. * @private
  73424. * @returns {Array} details The details to modify.
  73425. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  73426. * @returns {Array} Returns `details`.
  73427. */
  73428. function updateWrapDetails(details, bitmask) {
  73429. arrayEach(wrapFlags, function(pair) {
  73430. var value = '_.' + pair[0];
  73431. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  73432. details.push(value);
  73433. }
  73434. });
  73435. return details.sort();
  73436. }
  73437. /**
  73438. * Creates a clone of `wrapper`.
  73439. *
  73440. * @private
  73441. * @param {Object} wrapper The wrapper to clone.
  73442. * @returns {Object} Returns the cloned wrapper.
  73443. */
  73444. function wrapperClone(wrapper) {
  73445. if (wrapper instanceof LazyWrapper) {
  73446. return wrapper.clone();
  73447. }
  73448. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  73449. result.__actions__ = copyArray(wrapper.__actions__);
  73450. result.__index__ = wrapper.__index__;
  73451. result.__values__ = wrapper.__values__;
  73452. return result;
  73453. }
  73454. /*------------------------------------------------------------------------*/
  73455. /**
  73456. * Creates an array of elements split into groups the length of `size`.
  73457. * If `array` can't be split evenly, the final chunk will be the remaining
  73458. * elements.
  73459. *
  73460. * @static
  73461. * @memberOf _
  73462. * @since 3.0.0
  73463. * @category Array
  73464. * @param {Array} array The array to process.
  73465. * @param {number} [size=1] The length of each chunk
  73466. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  73467. * @returns {Array} Returns the new array of chunks.
  73468. * @example
  73469. *
  73470. * _.chunk(['a', 'b', 'c', 'd'], 2);
  73471. * // => [['a', 'b'], ['c', 'd']]
  73472. *
  73473. * _.chunk(['a', 'b', 'c', 'd'], 3);
  73474. * // => [['a', 'b', 'c'], ['d']]
  73475. */
  73476. function chunk(array, size, guard) {
  73477. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  73478. size = 1;
  73479. } else {
  73480. size = nativeMax(toInteger(size), 0);
  73481. }
  73482. var length = array == null ? 0 : array.length;
  73483. if (!length || size < 1) {
  73484. return [];
  73485. }
  73486. var index = 0,
  73487. resIndex = 0,
  73488. result = Array(nativeCeil(length / size));
  73489. while (index < length) {
  73490. result[resIndex++] = baseSlice(array, index, (index += size));
  73491. }
  73492. return result;
  73493. }
  73494. /**
  73495. * Creates an array with all falsey values removed. The values `false`, `null`,
  73496. * `0`, `""`, `undefined`, and `NaN` are falsey.
  73497. *
  73498. * @static
  73499. * @memberOf _
  73500. * @since 0.1.0
  73501. * @category Array
  73502. * @param {Array} array The array to compact.
  73503. * @returns {Array} Returns the new array of filtered values.
  73504. * @example
  73505. *
  73506. * _.compact([0, 1, false, 2, '', 3]);
  73507. * // => [1, 2, 3]
  73508. */
  73509. function compact(array) {
  73510. var index = -1,
  73511. length = array == null ? 0 : array.length,
  73512. resIndex = 0,
  73513. result = [];
  73514. while (++index < length) {
  73515. var value = array[index];
  73516. if (value) {
  73517. result[resIndex++] = value;
  73518. }
  73519. }
  73520. return result;
  73521. }
  73522. /**
  73523. * Creates a new array concatenating `array` with any additional arrays
  73524. * and/or values.
  73525. *
  73526. * @static
  73527. * @memberOf _
  73528. * @since 4.0.0
  73529. * @category Array
  73530. * @param {Array} array The array to concatenate.
  73531. * @param {...*} [values] The values to concatenate.
  73532. * @returns {Array} Returns the new concatenated array.
  73533. * @example
  73534. *
  73535. * var array = [1];
  73536. * var other = _.concat(array, 2, [3], [[4]]);
  73537. *
  73538. * console.log(other);
  73539. * // => [1, 2, 3, [4]]
  73540. *
  73541. * console.log(array);
  73542. * // => [1]
  73543. */
  73544. function concat() {
  73545. var length = arguments.length;
  73546. if (!length) {
  73547. return [];
  73548. }
  73549. var args = Array(length - 1),
  73550. array = arguments[0],
  73551. index = length;
  73552. while (index--) {
  73553. args[index - 1] = arguments[index];
  73554. }
  73555. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  73556. }
  73557. /**
  73558. * Creates an array of `array` values not included in the other given arrays
  73559. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  73560. * for equality comparisons. The order and references of result values are
  73561. * determined by the first array.
  73562. *
  73563. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  73564. *
  73565. * @static
  73566. * @memberOf _
  73567. * @since 0.1.0
  73568. * @category Array
  73569. * @param {Array} array The array to inspect.
  73570. * @param {...Array} [values] The values to exclude.
  73571. * @returns {Array} Returns the new array of filtered values.
  73572. * @see _.without, _.xor
  73573. * @example
  73574. *
  73575. * _.difference([2, 1], [2, 3]);
  73576. * // => [1]
  73577. */
  73578. var difference = baseRest(function(array, values) {
  73579. return isArrayLikeObject(array)
  73580. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  73581. : [];
  73582. });
  73583. /**
  73584. * This method is like `_.difference` except that it accepts `iteratee` which
  73585. * is invoked for each element of `array` and `values` to generate the criterion
  73586. * by which they're compared. The order and references of result values are
  73587. * determined by the first array. The iteratee is invoked with one argument:
  73588. * (value).
  73589. *
  73590. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  73591. *
  73592. * @static
  73593. * @memberOf _
  73594. * @since 4.0.0
  73595. * @category Array
  73596. * @param {Array} array The array to inspect.
  73597. * @param {...Array} [values] The values to exclude.
  73598. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  73599. * @returns {Array} Returns the new array of filtered values.
  73600. * @example
  73601. *
  73602. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  73603. * // => [1.2]
  73604. *
  73605. * // The `_.property` iteratee shorthand.
  73606. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  73607. * // => [{ 'x': 2 }]
  73608. */
  73609. var differenceBy = baseRest(function(array, values) {
  73610. var iteratee = last(values);
  73611. if (isArrayLikeObject(iteratee)) {
  73612. iteratee = undefined;
  73613. }
  73614. return isArrayLikeObject(array)
  73615. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  73616. : [];
  73617. });
  73618. /**
  73619. * This method is like `_.difference` except that it accepts `comparator`
  73620. * which is invoked to compare elements of `array` to `values`. The order and
  73621. * references of result values are determined by the first array. The comparator
  73622. * is invoked with two arguments: (arrVal, othVal).
  73623. *
  73624. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  73625. *
  73626. * @static
  73627. * @memberOf _
  73628. * @since 4.0.0
  73629. * @category Array
  73630. * @param {Array} array The array to inspect.
  73631. * @param {...Array} [values] The values to exclude.
  73632. * @param {Function} [comparator] The comparator invoked per element.
  73633. * @returns {Array} Returns the new array of filtered values.
  73634. * @example
  73635. *
  73636. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  73637. *
  73638. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  73639. * // => [{ 'x': 2, 'y': 1 }]
  73640. */
  73641. var differenceWith = baseRest(function(array, values) {
  73642. var comparator = last(values);
  73643. if (isArrayLikeObject(comparator)) {
  73644. comparator = undefined;
  73645. }
  73646. return isArrayLikeObject(array)
  73647. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  73648. : [];
  73649. });
  73650. /**
  73651. * Creates a slice of `array` with `n` elements dropped from the beginning.
  73652. *
  73653. * @static
  73654. * @memberOf _
  73655. * @since 0.5.0
  73656. * @category Array
  73657. * @param {Array} array The array to query.
  73658. * @param {number} [n=1] The number of elements to drop.
  73659. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  73660. * @returns {Array} Returns the slice of `array`.
  73661. * @example
  73662. *
  73663. * _.drop([1, 2, 3]);
  73664. * // => [2, 3]
  73665. *
  73666. * _.drop([1, 2, 3], 2);
  73667. * // => [3]
  73668. *
  73669. * _.drop([1, 2, 3], 5);
  73670. * // => []
  73671. *
  73672. * _.drop([1, 2, 3], 0);
  73673. * // => [1, 2, 3]
  73674. */
  73675. function drop(array, n, guard) {
  73676. var length = array == null ? 0 : array.length;
  73677. if (!length) {
  73678. return [];
  73679. }
  73680. n = (guard || n === undefined) ? 1 : toInteger(n);
  73681. return baseSlice(array, n < 0 ? 0 : n, length);
  73682. }
  73683. /**
  73684. * Creates a slice of `array` with `n` elements dropped from the end.
  73685. *
  73686. * @static
  73687. * @memberOf _
  73688. * @since 3.0.0
  73689. * @category Array
  73690. * @param {Array} array The array to query.
  73691. * @param {number} [n=1] The number of elements to drop.
  73692. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  73693. * @returns {Array} Returns the slice of `array`.
  73694. * @example
  73695. *
  73696. * _.dropRight([1, 2, 3]);
  73697. * // => [1, 2]
  73698. *
  73699. * _.dropRight([1, 2, 3], 2);
  73700. * // => [1]
  73701. *
  73702. * _.dropRight([1, 2, 3], 5);
  73703. * // => []
  73704. *
  73705. * _.dropRight([1, 2, 3], 0);
  73706. * // => [1, 2, 3]
  73707. */
  73708. function dropRight(array, n, guard) {
  73709. var length = array == null ? 0 : array.length;
  73710. if (!length) {
  73711. return [];
  73712. }
  73713. n = (guard || n === undefined) ? 1 : toInteger(n);
  73714. n = length - n;
  73715. return baseSlice(array, 0, n < 0 ? 0 : n);
  73716. }
  73717. /**
  73718. * Creates a slice of `array` excluding elements dropped from the end.
  73719. * Elements are dropped until `predicate` returns falsey. The predicate is
  73720. * invoked with three arguments: (value, index, array).
  73721. *
  73722. * @static
  73723. * @memberOf _
  73724. * @since 3.0.0
  73725. * @category Array
  73726. * @param {Array} array The array to query.
  73727. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  73728. * @returns {Array} Returns the slice of `array`.
  73729. * @example
  73730. *
  73731. * var users = [
  73732. * { 'user': 'barney', 'active': true },
  73733. * { 'user': 'fred', 'active': false },
  73734. * { 'user': 'pebbles', 'active': false }
  73735. * ];
  73736. *
  73737. * _.dropRightWhile(users, function(o) { return !o.active; });
  73738. * // => objects for ['barney']
  73739. *
  73740. * // The `_.matches` iteratee shorthand.
  73741. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  73742. * // => objects for ['barney', 'fred']
  73743. *
  73744. * // The `_.matchesProperty` iteratee shorthand.
  73745. * _.dropRightWhile(users, ['active', false]);
  73746. * // => objects for ['barney']
  73747. *
  73748. * // The `_.property` iteratee shorthand.
  73749. * _.dropRightWhile(users, 'active');
  73750. * // => objects for ['barney', 'fred', 'pebbles']
  73751. */
  73752. function dropRightWhile(array, predicate) {
  73753. return (array && array.length)
  73754. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  73755. : [];
  73756. }
  73757. /**
  73758. * Creates a slice of `array` excluding elements dropped from the beginning.
  73759. * Elements are dropped until `predicate` returns falsey. The predicate is
  73760. * invoked with three arguments: (value, index, array).
  73761. *
  73762. * @static
  73763. * @memberOf _
  73764. * @since 3.0.0
  73765. * @category Array
  73766. * @param {Array} array The array to query.
  73767. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  73768. * @returns {Array} Returns the slice of `array`.
  73769. * @example
  73770. *
  73771. * var users = [
  73772. * { 'user': 'barney', 'active': false },
  73773. * { 'user': 'fred', 'active': false },
  73774. * { 'user': 'pebbles', 'active': true }
  73775. * ];
  73776. *
  73777. * _.dropWhile(users, function(o) { return !o.active; });
  73778. * // => objects for ['pebbles']
  73779. *
  73780. * // The `_.matches` iteratee shorthand.
  73781. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  73782. * // => objects for ['fred', 'pebbles']
  73783. *
  73784. * // The `_.matchesProperty` iteratee shorthand.
  73785. * _.dropWhile(users, ['active', false]);
  73786. * // => objects for ['pebbles']
  73787. *
  73788. * // The `_.property` iteratee shorthand.
  73789. * _.dropWhile(users, 'active');
  73790. * // => objects for ['barney', 'fred', 'pebbles']
  73791. */
  73792. function dropWhile(array, predicate) {
  73793. return (array && array.length)
  73794. ? baseWhile(array, getIteratee(predicate, 3), true)
  73795. : [];
  73796. }
  73797. /**
  73798. * Fills elements of `array` with `value` from `start` up to, but not
  73799. * including, `end`.
  73800. *
  73801. * **Note:** This method mutates `array`.
  73802. *
  73803. * @static
  73804. * @memberOf _
  73805. * @since 3.2.0
  73806. * @category Array
  73807. * @param {Array} array The array to fill.
  73808. * @param {*} value The value to fill `array` with.
  73809. * @param {number} [start=0] The start position.
  73810. * @param {number} [end=array.length] The end position.
  73811. * @returns {Array} Returns `array`.
  73812. * @example
  73813. *
  73814. * var array = [1, 2, 3];
  73815. *
  73816. * _.fill(array, 'a');
  73817. * console.log(array);
  73818. * // => ['a', 'a', 'a']
  73819. *
  73820. * _.fill(Array(3), 2);
  73821. * // => [2, 2, 2]
  73822. *
  73823. * _.fill([4, 6, 8, 10], '*', 1, 3);
  73824. * // => [4, '*', '*', 10]
  73825. */
  73826. function fill(array, value, start, end) {
  73827. var length = array == null ? 0 : array.length;
  73828. if (!length) {
  73829. return [];
  73830. }
  73831. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  73832. start = 0;
  73833. end = length;
  73834. }
  73835. return baseFill(array, value, start, end);
  73836. }
  73837. /**
  73838. * This method is like `_.find` except that it returns the index of the first
  73839. * element `predicate` returns truthy for instead of the element itself.
  73840. *
  73841. * @static
  73842. * @memberOf _
  73843. * @since 1.1.0
  73844. * @category Array
  73845. * @param {Array} array The array to inspect.
  73846. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  73847. * @param {number} [fromIndex=0] The index to search from.
  73848. * @returns {number} Returns the index of the found element, else `-1`.
  73849. * @example
  73850. *
  73851. * var users = [
  73852. * { 'user': 'barney', 'active': false },
  73853. * { 'user': 'fred', 'active': false },
  73854. * { 'user': 'pebbles', 'active': true }
  73855. * ];
  73856. *
  73857. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  73858. * // => 0
  73859. *
  73860. * // The `_.matches` iteratee shorthand.
  73861. * _.findIndex(users, { 'user': 'fred', 'active': false });
  73862. * // => 1
  73863. *
  73864. * // The `_.matchesProperty` iteratee shorthand.
  73865. * _.findIndex(users, ['active', false]);
  73866. * // => 0
  73867. *
  73868. * // The `_.property` iteratee shorthand.
  73869. * _.findIndex(users, 'active');
  73870. * // => 2
  73871. */
  73872. function findIndex(array, predicate, fromIndex) {
  73873. var length = array == null ? 0 : array.length;
  73874. if (!length) {
  73875. return -1;
  73876. }
  73877. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  73878. if (index < 0) {
  73879. index = nativeMax(length + index, 0);
  73880. }
  73881. return baseFindIndex(array, getIteratee(predicate, 3), index);
  73882. }
  73883. /**
  73884. * This method is like `_.findIndex` except that it iterates over elements
  73885. * of `collection` from right to left.
  73886. *
  73887. * @static
  73888. * @memberOf _
  73889. * @since 2.0.0
  73890. * @category Array
  73891. * @param {Array} array The array to inspect.
  73892. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  73893. * @param {number} [fromIndex=array.length-1] The index to search from.
  73894. * @returns {number} Returns the index of the found element, else `-1`.
  73895. * @example
  73896. *
  73897. * var users = [
  73898. * { 'user': 'barney', 'active': true },
  73899. * { 'user': 'fred', 'active': false },
  73900. * { 'user': 'pebbles', 'active': false }
  73901. * ];
  73902. *
  73903. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  73904. * // => 2
  73905. *
  73906. * // The `_.matches` iteratee shorthand.
  73907. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  73908. * // => 0
  73909. *
  73910. * // The `_.matchesProperty` iteratee shorthand.
  73911. * _.findLastIndex(users, ['active', false]);
  73912. * // => 2
  73913. *
  73914. * // The `_.property` iteratee shorthand.
  73915. * _.findLastIndex(users, 'active');
  73916. * // => 0
  73917. */
  73918. function findLastIndex(array, predicate, fromIndex) {
  73919. var length = array == null ? 0 : array.length;
  73920. if (!length) {
  73921. return -1;
  73922. }
  73923. var index = length - 1;
  73924. if (fromIndex !== undefined) {
  73925. index = toInteger(fromIndex);
  73926. index = fromIndex < 0
  73927. ? nativeMax(length + index, 0)
  73928. : nativeMin(index, length - 1);
  73929. }
  73930. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  73931. }
  73932. /**
  73933. * Flattens `array` a single level deep.
  73934. *
  73935. * @static
  73936. * @memberOf _
  73937. * @since 0.1.0
  73938. * @category Array
  73939. * @param {Array} array The array to flatten.
  73940. * @returns {Array} Returns the new flattened array.
  73941. * @example
  73942. *
  73943. * _.flatten([1, [2, [3, [4]], 5]]);
  73944. * // => [1, 2, [3, [4]], 5]
  73945. */
  73946. function flatten(array) {
  73947. var length = array == null ? 0 : array.length;
  73948. return length ? baseFlatten(array, 1) : [];
  73949. }
  73950. /**
  73951. * Recursively flattens `array`.
  73952. *
  73953. * @static
  73954. * @memberOf _
  73955. * @since 3.0.0
  73956. * @category Array
  73957. * @param {Array} array The array to flatten.
  73958. * @returns {Array} Returns the new flattened array.
  73959. * @example
  73960. *
  73961. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  73962. * // => [1, 2, 3, 4, 5]
  73963. */
  73964. function flattenDeep(array) {
  73965. var length = array == null ? 0 : array.length;
  73966. return length ? baseFlatten(array, INFINITY) : [];
  73967. }
  73968. /**
  73969. * Recursively flatten `array` up to `depth` times.
  73970. *
  73971. * @static
  73972. * @memberOf _
  73973. * @since 4.4.0
  73974. * @category Array
  73975. * @param {Array} array The array to flatten.
  73976. * @param {number} [depth=1] The maximum recursion depth.
  73977. * @returns {Array} Returns the new flattened array.
  73978. * @example
  73979. *
  73980. * var array = [1, [2, [3, [4]], 5]];
  73981. *
  73982. * _.flattenDepth(array, 1);
  73983. * // => [1, 2, [3, [4]], 5]
  73984. *
  73985. * _.flattenDepth(array, 2);
  73986. * // => [1, 2, 3, [4], 5]
  73987. */
  73988. function flattenDepth(array, depth) {
  73989. var length = array == null ? 0 : array.length;
  73990. if (!length) {
  73991. return [];
  73992. }
  73993. depth = depth === undefined ? 1 : toInteger(depth);
  73994. return baseFlatten(array, depth);
  73995. }
  73996. /**
  73997. * The inverse of `_.toPairs`; this method returns an object composed
  73998. * from key-value `pairs`.
  73999. *
  74000. * @static
  74001. * @memberOf _
  74002. * @since 4.0.0
  74003. * @category Array
  74004. * @param {Array} pairs The key-value pairs.
  74005. * @returns {Object} Returns the new object.
  74006. * @example
  74007. *
  74008. * _.fromPairs([['a', 1], ['b', 2]]);
  74009. * // => { 'a': 1, 'b': 2 }
  74010. */
  74011. function fromPairs(pairs) {
  74012. var index = -1,
  74013. length = pairs == null ? 0 : pairs.length,
  74014. result = {};
  74015. while (++index < length) {
  74016. var pair = pairs[index];
  74017. result[pair[0]] = pair[1];
  74018. }
  74019. return result;
  74020. }
  74021. /**
  74022. * Gets the first element of `array`.
  74023. *
  74024. * @static
  74025. * @memberOf _
  74026. * @since 0.1.0
  74027. * @alias first
  74028. * @category Array
  74029. * @param {Array} array The array to query.
  74030. * @returns {*} Returns the first element of `array`.
  74031. * @example
  74032. *
  74033. * _.head([1, 2, 3]);
  74034. * // => 1
  74035. *
  74036. * _.head([]);
  74037. * // => undefined
  74038. */
  74039. function head(array) {
  74040. return (array && array.length) ? array[0] : undefined;
  74041. }
  74042. /**
  74043. * Gets the index at which the first occurrence of `value` is found in `array`
  74044. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  74045. * for equality comparisons. If `fromIndex` is negative, it's used as the
  74046. * offset from the end of `array`.
  74047. *
  74048. * @static
  74049. * @memberOf _
  74050. * @since 0.1.0
  74051. * @category Array
  74052. * @param {Array} array The array to inspect.
  74053. * @param {*} value The value to search for.
  74054. * @param {number} [fromIndex=0] The index to search from.
  74055. * @returns {number} Returns the index of the matched value, else `-1`.
  74056. * @example
  74057. *
  74058. * _.indexOf([1, 2, 1, 2], 2);
  74059. * // => 1
  74060. *
  74061. * // Search from the `fromIndex`.
  74062. * _.indexOf([1, 2, 1, 2], 2, 2);
  74063. * // => 3
  74064. */
  74065. function indexOf(array, value, fromIndex) {
  74066. var length = array == null ? 0 : array.length;
  74067. if (!length) {
  74068. return -1;
  74069. }
  74070. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  74071. if (index < 0) {
  74072. index = nativeMax(length + index, 0);
  74073. }
  74074. return baseIndexOf(array, value, index);
  74075. }
  74076. /**
  74077. * Gets all but the last element of `array`.
  74078. *
  74079. * @static
  74080. * @memberOf _
  74081. * @since 0.1.0
  74082. * @category Array
  74083. * @param {Array} array The array to query.
  74084. * @returns {Array} Returns the slice of `array`.
  74085. * @example
  74086. *
  74087. * _.initial([1, 2, 3]);
  74088. * // => [1, 2]
  74089. */
  74090. function initial(array) {
  74091. var length = array == null ? 0 : array.length;
  74092. return length ? baseSlice(array, 0, -1) : [];
  74093. }
  74094. /**
  74095. * Creates an array of unique values that are included in all given arrays
  74096. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  74097. * for equality comparisons. The order and references of result values are
  74098. * determined by the first array.
  74099. *
  74100. * @static
  74101. * @memberOf _
  74102. * @since 0.1.0
  74103. * @category Array
  74104. * @param {...Array} [arrays] The arrays to inspect.
  74105. * @returns {Array} Returns the new array of intersecting values.
  74106. * @example
  74107. *
  74108. * _.intersection([2, 1], [2, 3]);
  74109. * // => [2]
  74110. */
  74111. var intersection = baseRest(function(arrays) {
  74112. var mapped = arrayMap(arrays, castArrayLikeObject);
  74113. return (mapped.length && mapped[0] === arrays[0])
  74114. ? baseIntersection(mapped)
  74115. : [];
  74116. });
  74117. /**
  74118. * This method is like `_.intersection` except that it accepts `iteratee`
  74119. * which is invoked for each element of each `arrays` to generate the criterion
  74120. * by which they're compared. The order and references of result values are
  74121. * determined by the first array. The iteratee is invoked with one argument:
  74122. * (value).
  74123. *
  74124. * @static
  74125. * @memberOf _
  74126. * @since 4.0.0
  74127. * @category Array
  74128. * @param {...Array} [arrays] The arrays to inspect.
  74129. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  74130. * @returns {Array} Returns the new array of intersecting values.
  74131. * @example
  74132. *
  74133. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  74134. * // => [2.1]
  74135. *
  74136. * // The `_.property` iteratee shorthand.
  74137. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  74138. * // => [{ 'x': 1 }]
  74139. */
  74140. var intersectionBy = baseRest(function(arrays) {
  74141. var iteratee = last(arrays),
  74142. mapped = arrayMap(arrays, castArrayLikeObject);
  74143. if (iteratee === last(mapped)) {
  74144. iteratee = undefined;
  74145. } else {
  74146. mapped.pop();
  74147. }
  74148. return (mapped.length && mapped[0] === arrays[0])
  74149. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  74150. : [];
  74151. });
  74152. /**
  74153. * This method is like `_.intersection` except that it accepts `comparator`
  74154. * which is invoked to compare elements of `arrays`. The order and references
  74155. * of result values are determined by the first array. The comparator is
  74156. * invoked with two arguments: (arrVal, othVal).
  74157. *
  74158. * @static
  74159. * @memberOf _
  74160. * @since 4.0.0
  74161. * @category Array
  74162. * @param {...Array} [arrays] The arrays to inspect.
  74163. * @param {Function} [comparator] The comparator invoked per element.
  74164. * @returns {Array} Returns the new array of intersecting values.
  74165. * @example
  74166. *
  74167. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  74168. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  74169. *
  74170. * _.intersectionWith(objects, others, _.isEqual);
  74171. * // => [{ 'x': 1, 'y': 2 }]
  74172. */
  74173. var intersectionWith = baseRest(function(arrays) {
  74174. var comparator = last(arrays),
  74175. mapped = arrayMap(arrays, castArrayLikeObject);
  74176. comparator = typeof comparator == 'function' ? comparator : undefined;
  74177. if (comparator) {
  74178. mapped.pop();
  74179. }
  74180. return (mapped.length && mapped[0] === arrays[0])
  74181. ? baseIntersection(mapped, undefined, comparator)
  74182. : [];
  74183. });
  74184. /**
  74185. * Converts all elements in `array` into a string separated by `separator`.
  74186. *
  74187. * @static
  74188. * @memberOf _
  74189. * @since 4.0.0
  74190. * @category Array
  74191. * @param {Array} array The array to convert.
  74192. * @param {string} [separator=','] The element separator.
  74193. * @returns {string} Returns the joined string.
  74194. * @example
  74195. *
  74196. * _.join(['a', 'b', 'c'], '~');
  74197. * // => 'a~b~c'
  74198. */
  74199. function join(array, separator) {
  74200. return array == null ? '' : nativeJoin.call(array, separator);
  74201. }
  74202. /**
  74203. * Gets the last element of `array`.
  74204. *
  74205. * @static
  74206. * @memberOf _
  74207. * @since 0.1.0
  74208. * @category Array
  74209. * @param {Array} array The array to query.
  74210. * @returns {*} Returns the last element of `array`.
  74211. * @example
  74212. *
  74213. * _.last([1, 2, 3]);
  74214. * // => 3
  74215. */
  74216. function last(array) {
  74217. var length = array == null ? 0 : array.length;
  74218. return length ? array[length - 1] : undefined;
  74219. }
  74220. /**
  74221. * This method is like `_.indexOf` except that it iterates over elements of
  74222. * `array` from right to left.
  74223. *
  74224. * @static
  74225. * @memberOf _
  74226. * @since 0.1.0
  74227. * @category Array
  74228. * @param {Array} array The array to inspect.
  74229. * @param {*} value The value to search for.
  74230. * @param {number} [fromIndex=array.length-1] The index to search from.
  74231. * @returns {number} Returns the index of the matched value, else `-1`.
  74232. * @example
  74233. *
  74234. * _.lastIndexOf([1, 2, 1, 2], 2);
  74235. * // => 3
  74236. *
  74237. * // Search from the `fromIndex`.
  74238. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  74239. * // => 1
  74240. */
  74241. function lastIndexOf(array, value, fromIndex) {
  74242. var length = array == null ? 0 : array.length;
  74243. if (!length) {
  74244. return -1;
  74245. }
  74246. var index = length;
  74247. if (fromIndex !== undefined) {
  74248. index = toInteger(fromIndex);
  74249. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  74250. }
  74251. return value === value
  74252. ? strictLastIndexOf(array, value, index)
  74253. : baseFindIndex(array, baseIsNaN, index, true);
  74254. }
  74255. /**
  74256. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  74257. * element from the end is returned.
  74258. *
  74259. * @static
  74260. * @memberOf _
  74261. * @since 4.11.0
  74262. * @category Array
  74263. * @param {Array} array The array to query.
  74264. * @param {number} [n=0] The index of the element to return.
  74265. * @returns {*} Returns the nth element of `array`.
  74266. * @example
  74267. *
  74268. * var array = ['a', 'b', 'c', 'd'];
  74269. *
  74270. * _.nth(array, 1);
  74271. * // => 'b'
  74272. *
  74273. * _.nth(array, -2);
  74274. * // => 'c';
  74275. */
  74276. function nth(array, n) {
  74277. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  74278. }
  74279. /**
  74280. * Removes all given values from `array` using
  74281. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  74282. * for equality comparisons.
  74283. *
  74284. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  74285. * to remove elements from an array by predicate.
  74286. *
  74287. * @static
  74288. * @memberOf _
  74289. * @since 2.0.0
  74290. * @category Array
  74291. * @param {Array} array The array to modify.
  74292. * @param {...*} [values] The values to remove.
  74293. * @returns {Array} Returns `array`.
  74294. * @example
  74295. *
  74296. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  74297. *
  74298. * _.pull(array, 'a', 'c');
  74299. * console.log(array);
  74300. * // => ['b', 'b']
  74301. */
  74302. var pull = baseRest(pullAll);
  74303. /**
  74304. * This method is like `_.pull` except that it accepts an array of values to remove.
  74305. *
  74306. * **Note:** Unlike `_.difference`, this method mutates `array`.
  74307. *
  74308. * @static
  74309. * @memberOf _
  74310. * @since 4.0.0
  74311. * @category Array
  74312. * @param {Array} array The array to modify.
  74313. * @param {Array} values The values to remove.
  74314. * @returns {Array} Returns `array`.
  74315. * @example
  74316. *
  74317. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  74318. *
  74319. * _.pullAll(array, ['a', 'c']);
  74320. * console.log(array);
  74321. * // => ['b', 'b']
  74322. */
  74323. function pullAll(array, values) {
  74324. return (array && array.length && values && values.length)
  74325. ? basePullAll(array, values)
  74326. : array;
  74327. }
  74328. /**
  74329. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  74330. * invoked for each element of `array` and `values` to generate the criterion
  74331. * by which they're compared. The iteratee is invoked with one argument: (value).
  74332. *
  74333. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  74334. *
  74335. * @static
  74336. * @memberOf _
  74337. * @since 4.0.0
  74338. * @category Array
  74339. * @param {Array} array The array to modify.
  74340. * @param {Array} values The values to remove.
  74341. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  74342. * @returns {Array} Returns `array`.
  74343. * @example
  74344. *
  74345. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  74346. *
  74347. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  74348. * console.log(array);
  74349. * // => [{ 'x': 2 }]
  74350. */
  74351. function pullAllBy(array, values, iteratee) {
  74352. return (array && array.length && values && values.length)
  74353. ? basePullAll(array, values, getIteratee(iteratee, 2))
  74354. : array;
  74355. }
  74356. /**
  74357. * This method is like `_.pullAll` except that it accepts `comparator` which
  74358. * is invoked to compare elements of `array` to `values`. The comparator is
  74359. * invoked with two arguments: (arrVal, othVal).
  74360. *
  74361. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  74362. *
  74363. * @static
  74364. * @memberOf _
  74365. * @since 4.6.0
  74366. * @category Array
  74367. * @param {Array} array The array to modify.
  74368. * @param {Array} values The values to remove.
  74369. * @param {Function} [comparator] The comparator invoked per element.
  74370. * @returns {Array} Returns `array`.
  74371. * @example
  74372. *
  74373. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  74374. *
  74375. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  74376. * console.log(array);
  74377. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  74378. */
  74379. function pullAllWith(array, values, comparator) {
  74380. return (array && array.length && values && values.length)
  74381. ? basePullAll(array, values, undefined, comparator)
  74382. : array;
  74383. }
  74384. /**
  74385. * Removes elements from `array` corresponding to `indexes` and returns an
  74386. * array of removed elements.
  74387. *
  74388. * **Note:** Unlike `_.at`, this method mutates `array`.
  74389. *
  74390. * @static
  74391. * @memberOf _
  74392. * @since 3.0.0
  74393. * @category Array
  74394. * @param {Array} array The array to modify.
  74395. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  74396. * @returns {Array} Returns the new array of removed elements.
  74397. * @example
  74398. *
  74399. * var array = ['a', 'b', 'c', 'd'];
  74400. * var pulled = _.pullAt(array, [1, 3]);
  74401. *
  74402. * console.log(array);
  74403. * // => ['a', 'c']
  74404. *
  74405. * console.log(pulled);
  74406. * // => ['b', 'd']
  74407. */
  74408. var pullAt = flatRest(function(array, indexes) {
  74409. var length = array == null ? 0 : array.length,
  74410. result = baseAt(array, indexes);
  74411. basePullAt(array, arrayMap(indexes, function(index) {
  74412. return isIndex(index, length) ? +index : index;
  74413. }).sort(compareAscending));
  74414. return result;
  74415. });
  74416. /**
  74417. * Removes all elements from `array` that `predicate` returns truthy for
  74418. * and returns an array of the removed elements. The predicate is invoked
  74419. * with three arguments: (value, index, array).
  74420. *
  74421. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  74422. * to pull elements from an array by value.
  74423. *
  74424. * @static
  74425. * @memberOf _
  74426. * @since 2.0.0
  74427. * @category Array
  74428. * @param {Array} array The array to modify.
  74429. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  74430. * @returns {Array} Returns the new array of removed elements.
  74431. * @example
  74432. *
  74433. * var array = [1, 2, 3, 4];
  74434. * var evens = _.remove(array, function(n) {
  74435. * return n % 2 == 0;
  74436. * });
  74437. *
  74438. * console.log(array);
  74439. * // => [1, 3]
  74440. *
  74441. * console.log(evens);
  74442. * // => [2, 4]
  74443. */
  74444. function remove(array, predicate) {
  74445. var result = [];
  74446. if (!(array && array.length)) {
  74447. return result;
  74448. }
  74449. var index = -1,
  74450. indexes = [],
  74451. length = array.length;
  74452. predicate = getIteratee(predicate, 3);
  74453. while (++index < length) {
  74454. var value = array[index];
  74455. if (predicate(value, index, array)) {
  74456. result.push(value);
  74457. indexes.push(index);
  74458. }
  74459. }
  74460. basePullAt(array, indexes);
  74461. return result;
  74462. }
  74463. /**
  74464. * Reverses `array` so that the first element becomes the last, the second
  74465. * element becomes the second to last, and so on.
  74466. *
  74467. * **Note:** This method mutates `array` and is based on
  74468. * [`Array#reverse`](https://mdn.io/Array/reverse).
  74469. *
  74470. * @static
  74471. * @memberOf _
  74472. * @since 4.0.0
  74473. * @category Array
  74474. * @param {Array} array The array to modify.
  74475. * @returns {Array} Returns `array`.
  74476. * @example
  74477. *
  74478. * var array = [1, 2, 3];
  74479. *
  74480. * _.reverse(array);
  74481. * // => [3, 2, 1]
  74482. *
  74483. * console.log(array);
  74484. * // => [3, 2, 1]
  74485. */
  74486. function reverse(array) {
  74487. return array == null ? array : nativeReverse.call(array);
  74488. }
  74489. /**
  74490. * Creates a slice of `array` from `start` up to, but not including, `end`.
  74491. *
  74492. * **Note:** This method is used instead of
  74493. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  74494. * returned.
  74495. *
  74496. * @static
  74497. * @memberOf _
  74498. * @since 3.0.0
  74499. * @category Array
  74500. * @param {Array} array The array to slice.
  74501. * @param {number} [start=0] The start position.
  74502. * @param {number} [end=array.length] The end position.
  74503. * @returns {Array} Returns the slice of `array`.
  74504. */
  74505. function slice(array, start, end) {
  74506. var length = array == null ? 0 : array.length;
  74507. if (!length) {
  74508. return [];
  74509. }
  74510. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  74511. start = 0;
  74512. end = length;
  74513. }
  74514. else {
  74515. start = start == null ? 0 : toInteger(start);
  74516. end = end === undefined ? length : toInteger(end);
  74517. }
  74518. return baseSlice(array, start, end);
  74519. }
  74520. /**
  74521. * Uses a binary search to determine the lowest index at which `value`
  74522. * should be inserted into `array` in order to maintain its sort order.
  74523. *
  74524. * @static
  74525. * @memberOf _
  74526. * @since 0.1.0
  74527. * @category Array
  74528. * @param {Array} array The sorted array to inspect.
  74529. * @param {*} value The value to evaluate.
  74530. * @returns {number} Returns the index at which `value` should be inserted
  74531. * into `array`.
  74532. * @example
  74533. *
  74534. * _.sortedIndex([30, 50], 40);
  74535. * // => 1
  74536. */
  74537. function sortedIndex(array, value) {
  74538. return baseSortedIndex(array, value);
  74539. }
  74540. /**
  74541. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  74542. * which is invoked for `value` and each element of `array` to compute their
  74543. * sort ranking. The iteratee is invoked with one argument: (value).
  74544. *
  74545. * @static
  74546. * @memberOf _
  74547. * @since 4.0.0
  74548. * @category Array
  74549. * @param {Array} array The sorted array to inspect.
  74550. * @param {*} value The value to evaluate.
  74551. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  74552. * @returns {number} Returns the index at which `value` should be inserted
  74553. * into `array`.
  74554. * @example
  74555. *
  74556. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  74557. *
  74558. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  74559. * // => 0
  74560. *
  74561. * // The `_.property` iteratee shorthand.
  74562. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  74563. * // => 0
  74564. */
  74565. function sortedIndexBy(array, value, iteratee) {
  74566. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  74567. }
  74568. /**
  74569. * This method is like `_.indexOf` except that it performs a binary
  74570. * search on a sorted `array`.
  74571. *
  74572. * @static
  74573. * @memberOf _
  74574. * @since 4.0.0
  74575. * @category Array
  74576. * @param {Array} array The array to inspect.
  74577. * @param {*} value The value to search for.
  74578. * @returns {number} Returns the index of the matched value, else `-1`.
  74579. * @example
  74580. *
  74581. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  74582. * // => 1
  74583. */
  74584. function sortedIndexOf(array, value) {
  74585. var length = array == null ? 0 : array.length;
  74586. if (length) {
  74587. var index = baseSortedIndex(array, value);
  74588. if (index < length && eq(array[index], value)) {
  74589. return index;
  74590. }
  74591. }
  74592. return -1;
  74593. }
  74594. /**
  74595. * This method is like `_.sortedIndex` except that it returns the highest
  74596. * index at which `value` should be inserted into `array` in order to
  74597. * maintain its sort order.
  74598. *
  74599. * @static
  74600. * @memberOf _
  74601. * @since 3.0.0
  74602. * @category Array
  74603. * @param {Array} array The sorted array to inspect.
  74604. * @param {*} value The value to evaluate.
  74605. * @returns {number} Returns the index at which `value` should be inserted
  74606. * into `array`.
  74607. * @example
  74608. *
  74609. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  74610. * // => 4
  74611. */
  74612. function sortedLastIndex(array, value) {
  74613. return baseSortedIndex(array, value, true);
  74614. }
  74615. /**
  74616. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  74617. * which is invoked for `value` and each element of `array` to compute their
  74618. * sort ranking. The iteratee is invoked with one argument: (value).
  74619. *
  74620. * @static
  74621. * @memberOf _
  74622. * @since 4.0.0
  74623. * @category Array
  74624. * @param {Array} array The sorted array to inspect.
  74625. * @param {*} value The value to evaluate.
  74626. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  74627. * @returns {number} Returns the index at which `value` should be inserted
  74628. * into `array`.
  74629. * @example
  74630. *
  74631. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  74632. *
  74633. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  74634. * // => 1
  74635. *
  74636. * // The `_.property` iteratee shorthand.
  74637. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  74638. * // => 1
  74639. */
  74640. function sortedLastIndexBy(array, value, iteratee) {
  74641. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  74642. }
  74643. /**
  74644. * This method is like `_.lastIndexOf` except that it performs a binary
  74645. * search on a sorted `array`.
  74646. *
  74647. * @static
  74648. * @memberOf _
  74649. * @since 4.0.0
  74650. * @category Array
  74651. * @param {Array} array The array to inspect.
  74652. * @param {*} value The value to search for.
  74653. * @returns {number} Returns the index of the matched value, else `-1`.
  74654. * @example
  74655. *
  74656. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  74657. * // => 3
  74658. */
  74659. function sortedLastIndexOf(array, value) {
  74660. var length = array == null ? 0 : array.length;
  74661. if (length) {
  74662. var index = baseSortedIndex(array, value, true) - 1;
  74663. if (eq(array[index], value)) {
  74664. return index;
  74665. }
  74666. }
  74667. return -1;
  74668. }
  74669. /**
  74670. * This method is like `_.uniq` except that it's designed and optimized
  74671. * for sorted arrays.
  74672. *
  74673. * @static
  74674. * @memberOf _
  74675. * @since 4.0.0
  74676. * @category Array
  74677. * @param {Array} array The array to inspect.
  74678. * @returns {Array} Returns the new duplicate free array.
  74679. * @example
  74680. *
  74681. * _.sortedUniq([1, 1, 2]);
  74682. * // => [1, 2]
  74683. */
  74684. function sortedUniq(array) {
  74685. return (array && array.length)
  74686. ? baseSortedUniq(array)
  74687. : [];
  74688. }
  74689. /**
  74690. * This method is like `_.uniqBy` except that it's designed and optimized
  74691. * for sorted arrays.
  74692. *
  74693. * @static
  74694. * @memberOf _
  74695. * @since 4.0.0
  74696. * @category Array
  74697. * @param {Array} array The array to inspect.
  74698. * @param {Function} [iteratee] The iteratee invoked per element.
  74699. * @returns {Array} Returns the new duplicate free array.
  74700. * @example
  74701. *
  74702. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  74703. * // => [1.1, 2.3]
  74704. */
  74705. function sortedUniqBy(array, iteratee) {
  74706. return (array && array.length)
  74707. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  74708. : [];
  74709. }
  74710. /**
  74711. * Gets all but the first element of `array`.
  74712. *
  74713. * @static
  74714. * @memberOf _
  74715. * @since 4.0.0
  74716. * @category Array
  74717. * @param {Array} array The array to query.
  74718. * @returns {Array} Returns the slice of `array`.
  74719. * @example
  74720. *
  74721. * _.tail([1, 2, 3]);
  74722. * // => [2, 3]
  74723. */
  74724. function tail(array) {
  74725. var length = array == null ? 0 : array.length;
  74726. return length ? baseSlice(array, 1, length) : [];
  74727. }
  74728. /**
  74729. * Creates a slice of `array` with `n` elements taken from the beginning.
  74730. *
  74731. * @static
  74732. * @memberOf _
  74733. * @since 0.1.0
  74734. * @category Array
  74735. * @param {Array} array The array to query.
  74736. * @param {number} [n=1] The number of elements to take.
  74737. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  74738. * @returns {Array} Returns the slice of `array`.
  74739. * @example
  74740. *
  74741. * _.take([1, 2, 3]);
  74742. * // => [1]
  74743. *
  74744. * _.take([1, 2, 3], 2);
  74745. * // => [1, 2]
  74746. *
  74747. * _.take([1, 2, 3], 5);
  74748. * // => [1, 2, 3]
  74749. *
  74750. * _.take([1, 2, 3], 0);
  74751. * // => []
  74752. */
  74753. function take(array, n, guard) {
  74754. if (!(array && array.length)) {
  74755. return [];
  74756. }
  74757. n = (guard || n === undefined) ? 1 : toInteger(n);
  74758. return baseSlice(array, 0, n < 0 ? 0 : n);
  74759. }
  74760. /**
  74761. * Creates a slice of `array` with `n` elements taken from the end.
  74762. *
  74763. * @static
  74764. * @memberOf _
  74765. * @since 3.0.0
  74766. * @category Array
  74767. * @param {Array} array The array to query.
  74768. * @param {number} [n=1] The number of elements to take.
  74769. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  74770. * @returns {Array} Returns the slice of `array`.
  74771. * @example
  74772. *
  74773. * _.takeRight([1, 2, 3]);
  74774. * // => [3]
  74775. *
  74776. * _.takeRight([1, 2, 3], 2);
  74777. * // => [2, 3]
  74778. *
  74779. * _.takeRight([1, 2, 3], 5);
  74780. * // => [1, 2, 3]
  74781. *
  74782. * _.takeRight([1, 2, 3], 0);
  74783. * // => []
  74784. */
  74785. function takeRight(array, n, guard) {
  74786. var length = array == null ? 0 : array.length;
  74787. if (!length) {
  74788. return [];
  74789. }
  74790. n = (guard || n === undefined) ? 1 : toInteger(n);
  74791. n = length - n;
  74792. return baseSlice(array, n < 0 ? 0 : n, length);
  74793. }
  74794. /**
  74795. * Creates a slice of `array` with elements taken from the end. Elements are
  74796. * taken until `predicate` returns falsey. The predicate is invoked with
  74797. * three arguments: (value, index, array).
  74798. *
  74799. * @static
  74800. * @memberOf _
  74801. * @since 3.0.0
  74802. * @category Array
  74803. * @param {Array} array The array to query.
  74804. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  74805. * @returns {Array} Returns the slice of `array`.
  74806. * @example
  74807. *
  74808. * var users = [
  74809. * { 'user': 'barney', 'active': true },
  74810. * { 'user': 'fred', 'active': false },
  74811. * { 'user': 'pebbles', 'active': false }
  74812. * ];
  74813. *
  74814. * _.takeRightWhile(users, function(o) { return !o.active; });
  74815. * // => objects for ['fred', 'pebbles']
  74816. *
  74817. * // The `_.matches` iteratee shorthand.
  74818. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  74819. * // => objects for ['pebbles']
  74820. *
  74821. * // The `_.matchesProperty` iteratee shorthand.
  74822. * _.takeRightWhile(users, ['active', false]);
  74823. * // => objects for ['fred', 'pebbles']
  74824. *
  74825. * // The `_.property` iteratee shorthand.
  74826. * _.takeRightWhile(users, 'active');
  74827. * // => []
  74828. */
  74829. function takeRightWhile(array, predicate) {
  74830. return (array && array.length)
  74831. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  74832. : [];
  74833. }
  74834. /**
  74835. * Creates a slice of `array` with elements taken from the beginning. Elements
  74836. * are taken until `predicate` returns falsey. The predicate is invoked with
  74837. * three arguments: (value, index, array).
  74838. *
  74839. * @static
  74840. * @memberOf _
  74841. * @since 3.0.0
  74842. * @category Array
  74843. * @param {Array} array The array to query.
  74844. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  74845. * @returns {Array} Returns the slice of `array`.
  74846. * @example
  74847. *
  74848. * var users = [
  74849. * { 'user': 'barney', 'active': false },
  74850. * { 'user': 'fred', 'active': false },
  74851. * { 'user': 'pebbles', 'active': true }
  74852. * ];
  74853. *
  74854. * _.takeWhile(users, function(o) { return !o.active; });
  74855. * // => objects for ['barney', 'fred']
  74856. *
  74857. * // The `_.matches` iteratee shorthand.
  74858. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  74859. * // => objects for ['barney']
  74860. *
  74861. * // The `_.matchesProperty` iteratee shorthand.
  74862. * _.takeWhile(users, ['active', false]);
  74863. * // => objects for ['barney', 'fred']
  74864. *
  74865. * // The `_.property` iteratee shorthand.
  74866. * _.takeWhile(users, 'active');
  74867. * // => []
  74868. */
  74869. function takeWhile(array, predicate) {
  74870. return (array && array.length)
  74871. ? baseWhile(array, getIteratee(predicate, 3))
  74872. : [];
  74873. }
  74874. /**
  74875. * Creates an array of unique values, in order, from all given arrays using
  74876. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  74877. * for equality comparisons.
  74878. *
  74879. * @static
  74880. * @memberOf _
  74881. * @since 0.1.0
  74882. * @category Array
  74883. * @param {...Array} [arrays] The arrays to inspect.
  74884. * @returns {Array} Returns the new array of combined values.
  74885. * @example
  74886. *
  74887. * _.union([2], [1, 2]);
  74888. * // => [2, 1]
  74889. */
  74890. var union = baseRest(function(arrays) {
  74891. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  74892. });
  74893. /**
  74894. * This method is like `_.union` except that it accepts `iteratee` which is
  74895. * invoked for each element of each `arrays` to generate the criterion by
  74896. * which uniqueness is computed. Result values are chosen from the first
  74897. * array in which the value occurs. The iteratee is invoked with one argument:
  74898. * (value).
  74899. *
  74900. * @static
  74901. * @memberOf _
  74902. * @since 4.0.0
  74903. * @category Array
  74904. * @param {...Array} [arrays] The arrays to inspect.
  74905. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  74906. * @returns {Array} Returns the new array of combined values.
  74907. * @example
  74908. *
  74909. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  74910. * // => [2.1, 1.2]
  74911. *
  74912. * // The `_.property` iteratee shorthand.
  74913. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  74914. * // => [{ 'x': 1 }, { 'x': 2 }]
  74915. */
  74916. var unionBy = baseRest(function(arrays) {
  74917. var iteratee = last(arrays);
  74918. if (isArrayLikeObject(iteratee)) {
  74919. iteratee = undefined;
  74920. }
  74921. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  74922. });
  74923. /**
  74924. * This method is like `_.union` except that it accepts `comparator` which
  74925. * is invoked to compare elements of `arrays`. Result values are chosen from
  74926. * the first array in which the value occurs. The comparator is invoked
  74927. * with two arguments: (arrVal, othVal).
  74928. *
  74929. * @static
  74930. * @memberOf _
  74931. * @since 4.0.0
  74932. * @category Array
  74933. * @param {...Array} [arrays] The arrays to inspect.
  74934. * @param {Function} [comparator] The comparator invoked per element.
  74935. * @returns {Array} Returns the new array of combined values.
  74936. * @example
  74937. *
  74938. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  74939. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  74940. *
  74941. * _.unionWith(objects, others, _.isEqual);
  74942. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  74943. */
  74944. var unionWith = baseRest(function(arrays) {
  74945. var comparator = last(arrays);
  74946. comparator = typeof comparator == 'function' ? comparator : undefined;
  74947. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  74948. });
  74949. /**
  74950. * Creates a duplicate-free version of an array, using
  74951. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  74952. * for equality comparisons, in which only the first occurrence of each element
  74953. * is kept. The order of result values is determined by the order they occur
  74954. * in the array.
  74955. *
  74956. * @static
  74957. * @memberOf _
  74958. * @since 0.1.0
  74959. * @category Array
  74960. * @param {Array} array The array to inspect.
  74961. * @returns {Array} Returns the new duplicate free array.
  74962. * @example
  74963. *
  74964. * _.uniq([2, 1, 2]);
  74965. * // => [2, 1]
  74966. */
  74967. function uniq(array) {
  74968. return (array && array.length) ? baseUniq(array) : [];
  74969. }
  74970. /**
  74971. * This method is like `_.uniq` except that it accepts `iteratee` which is
  74972. * invoked for each element in `array` to generate the criterion by which
  74973. * uniqueness is computed. The order of result values is determined by the
  74974. * order they occur in the array. The iteratee is invoked with one argument:
  74975. * (value).
  74976. *
  74977. * @static
  74978. * @memberOf _
  74979. * @since 4.0.0
  74980. * @category Array
  74981. * @param {Array} array The array to inspect.
  74982. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  74983. * @returns {Array} Returns the new duplicate free array.
  74984. * @example
  74985. *
  74986. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  74987. * // => [2.1, 1.2]
  74988. *
  74989. * // The `_.property` iteratee shorthand.
  74990. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  74991. * // => [{ 'x': 1 }, { 'x': 2 }]
  74992. */
  74993. function uniqBy(array, iteratee) {
  74994. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  74995. }
  74996. /**
  74997. * This method is like `_.uniq` except that it accepts `comparator` which
  74998. * is invoked to compare elements of `array`. The order of result values is
  74999. * determined by the order they occur in the array.The comparator is invoked
  75000. * with two arguments: (arrVal, othVal).
  75001. *
  75002. * @static
  75003. * @memberOf _
  75004. * @since 4.0.0
  75005. * @category Array
  75006. * @param {Array} array The array to inspect.
  75007. * @param {Function} [comparator] The comparator invoked per element.
  75008. * @returns {Array} Returns the new duplicate free array.
  75009. * @example
  75010. *
  75011. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  75012. *
  75013. * _.uniqWith(objects, _.isEqual);
  75014. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  75015. */
  75016. function uniqWith(array, comparator) {
  75017. comparator = typeof comparator == 'function' ? comparator : undefined;
  75018. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  75019. }
  75020. /**
  75021. * This method is like `_.zip` except that it accepts an array of grouped
  75022. * elements and creates an array regrouping the elements to their pre-zip
  75023. * configuration.
  75024. *
  75025. * @static
  75026. * @memberOf _
  75027. * @since 1.2.0
  75028. * @category Array
  75029. * @param {Array} array The array of grouped elements to process.
  75030. * @returns {Array} Returns the new array of regrouped elements.
  75031. * @example
  75032. *
  75033. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  75034. * // => [['a', 1, true], ['b', 2, false]]
  75035. *
  75036. * _.unzip(zipped);
  75037. * // => [['a', 'b'], [1, 2], [true, false]]
  75038. */
  75039. function unzip(array) {
  75040. if (!(array && array.length)) {
  75041. return [];
  75042. }
  75043. var length = 0;
  75044. array = arrayFilter(array, function(group) {
  75045. if (isArrayLikeObject(group)) {
  75046. length = nativeMax(group.length, length);
  75047. return true;
  75048. }
  75049. });
  75050. return baseTimes(length, function(index) {
  75051. return arrayMap(array, baseProperty(index));
  75052. });
  75053. }
  75054. /**
  75055. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  75056. * how regrouped values should be combined. The iteratee is invoked with the
  75057. * elements of each group: (...group).
  75058. *
  75059. * @static
  75060. * @memberOf _
  75061. * @since 3.8.0
  75062. * @category Array
  75063. * @param {Array} array The array of grouped elements to process.
  75064. * @param {Function} [iteratee=_.identity] The function to combine
  75065. * regrouped values.
  75066. * @returns {Array} Returns the new array of regrouped elements.
  75067. * @example
  75068. *
  75069. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  75070. * // => [[1, 10, 100], [2, 20, 200]]
  75071. *
  75072. * _.unzipWith(zipped, _.add);
  75073. * // => [3, 30, 300]
  75074. */
  75075. function unzipWith(array, iteratee) {
  75076. if (!(array && array.length)) {
  75077. return [];
  75078. }
  75079. var result = unzip(array);
  75080. if (iteratee == null) {
  75081. return result;
  75082. }
  75083. return arrayMap(result, function(group) {
  75084. return apply(iteratee, undefined, group);
  75085. });
  75086. }
  75087. /**
  75088. * Creates an array excluding all given values using
  75089. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  75090. * for equality comparisons.
  75091. *
  75092. * **Note:** Unlike `_.pull`, this method returns a new array.
  75093. *
  75094. * @static
  75095. * @memberOf _
  75096. * @since 0.1.0
  75097. * @category Array
  75098. * @param {Array} array The array to inspect.
  75099. * @param {...*} [values] The values to exclude.
  75100. * @returns {Array} Returns the new array of filtered values.
  75101. * @see _.difference, _.xor
  75102. * @example
  75103. *
  75104. * _.without([2, 1, 2, 3], 1, 2);
  75105. * // => [3]
  75106. */
  75107. var without = baseRest(function(array, values) {
  75108. return isArrayLikeObject(array)
  75109. ? baseDifference(array, values)
  75110. : [];
  75111. });
  75112. /**
  75113. * Creates an array of unique values that is the
  75114. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  75115. * of the given arrays. The order of result values is determined by the order
  75116. * they occur in the arrays.
  75117. *
  75118. * @static
  75119. * @memberOf _
  75120. * @since 2.4.0
  75121. * @category Array
  75122. * @param {...Array} [arrays] The arrays to inspect.
  75123. * @returns {Array} Returns the new array of filtered values.
  75124. * @see _.difference, _.without
  75125. * @example
  75126. *
  75127. * _.xor([2, 1], [2, 3]);
  75128. * // => [1, 3]
  75129. */
  75130. var xor = baseRest(function(arrays) {
  75131. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  75132. });
  75133. /**
  75134. * This method is like `_.xor` except that it accepts `iteratee` which is
  75135. * invoked for each element of each `arrays` to generate the criterion by
  75136. * which by which they're compared. The order of result values is determined
  75137. * by the order they occur in the arrays. The iteratee is invoked with one
  75138. * argument: (value).
  75139. *
  75140. * @static
  75141. * @memberOf _
  75142. * @since 4.0.0
  75143. * @category Array
  75144. * @param {...Array} [arrays] The arrays to inspect.
  75145. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  75146. * @returns {Array} Returns the new array of filtered values.
  75147. * @example
  75148. *
  75149. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  75150. * // => [1.2, 3.4]
  75151. *
  75152. * // The `_.property` iteratee shorthand.
  75153. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  75154. * // => [{ 'x': 2 }]
  75155. */
  75156. var xorBy = baseRest(function(arrays) {
  75157. var iteratee = last(arrays);
  75158. if (isArrayLikeObject(iteratee)) {
  75159. iteratee = undefined;
  75160. }
  75161. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  75162. });
  75163. /**
  75164. * This method is like `_.xor` except that it accepts `comparator` which is
  75165. * invoked to compare elements of `arrays`. The order of result values is
  75166. * determined by the order they occur in the arrays. The comparator is invoked
  75167. * with two arguments: (arrVal, othVal).
  75168. *
  75169. * @static
  75170. * @memberOf _
  75171. * @since 4.0.0
  75172. * @category Array
  75173. * @param {...Array} [arrays] The arrays to inspect.
  75174. * @param {Function} [comparator] The comparator invoked per element.
  75175. * @returns {Array} Returns the new array of filtered values.
  75176. * @example
  75177. *
  75178. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  75179. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  75180. *
  75181. * _.xorWith(objects, others, _.isEqual);
  75182. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  75183. */
  75184. var xorWith = baseRest(function(arrays) {
  75185. var comparator = last(arrays);
  75186. comparator = typeof comparator == 'function' ? comparator : undefined;
  75187. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  75188. });
  75189. /**
  75190. * Creates an array of grouped elements, the first of which contains the
  75191. * first elements of the given arrays, the second of which contains the
  75192. * second elements of the given arrays, and so on.
  75193. *
  75194. * @static
  75195. * @memberOf _
  75196. * @since 0.1.0
  75197. * @category Array
  75198. * @param {...Array} [arrays] The arrays to process.
  75199. * @returns {Array} Returns the new array of grouped elements.
  75200. * @example
  75201. *
  75202. * _.zip(['a', 'b'], [1, 2], [true, false]);
  75203. * // => [['a', 1, true], ['b', 2, false]]
  75204. */
  75205. var zip = baseRest(unzip);
  75206. /**
  75207. * This method is like `_.fromPairs` except that it accepts two arrays,
  75208. * one of property identifiers and one of corresponding values.
  75209. *
  75210. * @static
  75211. * @memberOf _
  75212. * @since 0.4.0
  75213. * @category Array
  75214. * @param {Array} [props=[]] The property identifiers.
  75215. * @param {Array} [values=[]] The property values.
  75216. * @returns {Object} Returns the new object.
  75217. * @example
  75218. *
  75219. * _.zipObject(['a', 'b'], [1, 2]);
  75220. * // => { 'a': 1, 'b': 2 }
  75221. */
  75222. function zipObject(props, values) {
  75223. return baseZipObject(props || [], values || [], assignValue);
  75224. }
  75225. /**
  75226. * This method is like `_.zipObject` except that it supports property paths.
  75227. *
  75228. * @static
  75229. * @memberOf _
  75230. * @since 4.1.0
  75231. * @category Array
  75232. * @param {Array} [props=[]] The property identifiers.
  75233. * @param {Array} [values=[]] The property values.
  75234. * @returns {Object} Returns the new object.
  75235. * @example
  75236. *
  75237. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  75238. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  75239. */
  75240. function zipObjectDeep(props, values) {
  75241. return baseZipObject(props || [], values || [], baseSet);
  75242. }
  75243. /**
  75244. * This method is like `_.zip` except that it accepts `iteratee` to specify
  75245. * how grouped values should be combined. The iteratee is invoked with the
  75246. * elements of each group: (...group).
  75247. *
  75248. * @static
  75249. * @memberOf _
  75250. * @since 3.8.0
  75251. * @category Array
  75252. * @param {...Array} [arrays] The arrays to process.
  75253. * @param {Function} [iteratee=_.identity] The function to combine
  75254. * grouped values.
  75255. * @returns {Array} Returns the new array of grouped elements.
  75256. * @example
  75257. *
  75258. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  75259. * return a + b + c;
  75260. * });
  75261. * // => [111, 222]
  75262. */
  75263. var zipWith = baseRest(function(arrays) {
  75264. var length = arrays.length,
  75265. iteratee = length > 1 ? arrays[length - 1] : undefined;
  75266. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  75267. return unzipWith(arrays, iteratee);
  75268. });
  75269. /*------------------------------------------------------------------------*/
  75270. /**
  75271. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  75272. * chain sequences enabled. The result of such sequences must be unwrapped
  75273. * with `_#value`.
  75274. *
  75275. * @static
  75276. * @memberOf _
  75277. * @since 1.3.0
  75278. * @category Seq
  75279. * @param {*} value The value to wrap.
  75280. * @returns {Object} Returns the new `lodash` wrapper instance.
  75281. * @example
  75282. *
  75283. * var users = [
  75284. * { 'user': 'barney', 'age': 36 },
  75285. * { 'user': 'fred', 'age': 40 },
  75286. * { 'user': 'pebbles', 'age': 1 }
  75287. * ];
  75288. *
  75289. * var youngest = _
  75290. * .chain(users)
  75291. * .sortBy('age')
  75292. * .map(function(o) {
  75293. * return o.user + ' is ' + o.age;
  75294. * })
  75295. * .head()
  75296. * .value();
  75297. * // => 'pebbles is 1'
  75298. */
  75299. function chain(value) {
  75300. var result = lodash(value);
  75301. result.__chain__ = true;
  75302. return result;
  75303. }
  75304. /**
  75305. * This method invokes `interceptor` and returns `value`. The interceptor
  75306. * is invoked with one argument; (value). The purpose of this method is to
  75307. * "tap into" a method chain sequence in order to modify intermediate results.
  75308. *
  75309. * @static
  75310. * @memberOf _
  75311. * @since 0.1.0
  75312. * @category Seq
  75313. * @param {*} value The value to provide to `interceptor`.
  75314. * @param {Function} interceptor The function to invoke.
  75315. * @returns {*} Returns `value`.
  75316. * @example
  75317. *
  75318. * _([1, 2, 3])
  75319. * .tap(function(array) {
  75320. * // Mutate input array.
  75321. * array.pop();
  75322. * })
  75323. * .reverse()
  75324. * .value();
  75325. * // => [2, 1]
  75326. */
  75327. function tap(value, interceptor) {
  75328. interceptor(value);
  75329. return value;
  75330. }
  75331. /**
  75332. * This method is like `_.tap` except that it returns the result of `interceptor`.
  75333. * The purpose of this method is to "pass thru" values replacing intermediate
  75334. * results in a method chain sequence.
  75335. *
  75336. * @static
  75337. * @memberOf _
  75338. * @since 3.0.0
  75339. * @category Seq
  75340. * @param {*} value The value to provide to `interceptor`.
  75341. * @param {Function} interceptor The function to invoke.
  75342. * @returns {*} Returns the result of `interceptor`.
  75343. * @example
  75344. *
  75345. * _(' abc ')
  75346. * .chain()
  75347. * .trim()
  75348. * .thru(function(value) {
  75349. * return [value];
  75350. * })
  75351. * .value();
  75352. * // => ['abc']
  75353. */
  75354. function thru(value, interceptor) {
  75355. return interceptor(value);
  75356. }
  75357. /**
  75358. * This method is the wrapper version of `_.at`.
  75359. *
  75360. * @name at
  75361. * @memberOf _
  75362. * @since 1.0.0
  75363. * @category Seq
  75364. * @param {...(string|string[])} [paths] The property paths to pick.
  75365. * @returns {Object} Returns the new `lodash` wrapper instance.
  75366. * @example
  75367. *
  75368. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  75369. *
  75370. * _(object).at(['a[0].b.c', 'a[1]']).value();
  75371. * // => [3, 4]
  75372. */
  75373. var wrapperAt = flatRest(function(paths) {
  75374. var length = paths.length,
  75375. start = length ? paths[0] : 0,
  75376. value = this.__wrapped__,
  75377. interceptor = function(object) { return baseAt(object, paths); };
  75378. if (length > 1 || this.__actions__.length ||
  75379. !(value instanceof LazyWrapper) || !isIndex(start)) {
  75380. return this.thru(interceptor);
  75381. }
  75382. value = value.slice(start, +start + (length ? 1 : 0));
  75383. value.__actions__.push({
  75384. 'func': thru,
  75385. 'args': [interceptor],
  75386. 'thisArg': undefined
  75387. });
  75388. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  75389. if (length && !array.length) {
  75390. array.push(undefined);
  75391. }
  75392. return array;
  75393. });
  75394. });
  75395. /**
  75396. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  75397. *
  75398. * @name chain
  75399. * @memberOf _
  75400. * @since 0.1.0
  75401. * @category Seq
  75402. * @returns {Object} Returns the new `lodash` wrapper instance.
  75403. * @example
  75404. *
  75405. * var users = [
  75406. * { 'user': 'barney', 'age': 36 },
  75407. * { 'user': 'fred', 'age': 40 }
  75408. * ];
  75409. *
  75410. * // A sequence without explicit chaining.
  75411. * _(users).head();
  75412. * // => { 'user': 'barney', 'age': 36 }
  75413. *
  75414. * // A sequence with explicit chaining.
  75415. * _(users)
  75416. * .chain()
  75417. * .head()
  75418. * .pick('user')
  75419. * .value();
  75420. * // => { 'user': 'barney' }
  75421. */
  75422. function wrapperChain() {
  75423. return chain(this);
  75424. }
  75425. /**
  75426. * Executes the chain sequence and returns the wrapped result.
  75427. *
  75428. * @name commit
  75429. * @memberOf _
  75430. * @since 3.2.0
  75431. * @category Seq
  75432. * @returns {Object} Returns the new `lodash` wrapper instance.
  75433. * @example
  75434. *
  75435. * var array = [1, 2];
  75436. * var wrapped = _(array).push(3);
  75437. *
  75438. * console.log(array);
  75439. * // => [1, 2]
  75440. *
  75441. * wrapped = wrapped.commit();
  75442. * console.log(array);
  75443. * // => [1, 2, 3]
  75444. *
  75445. * wrapped.last();
  75446. * // => 3
  75447. *
  75448. * console.log(array);
  75449. * // => [1, 2, 3]
  75450. */
  75451. function wrapperCommit() {
  75452. return new LodashWrapper(this.value(), this.__chain__);
  75453. }
  75454. /**
  75455. * Gets the next value on a wrapped object following the
  75456. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  75457. *
  75458. * @name next
  75459. * @memberOf _
  75460. * @since 4.0.0
  75461. * @category Seq
  75462. * @returns {Object} Returns the next iterator value.
  75463. * @example
  75464. *
  75465. * var wrapped = _([1, 2]);
  75466. *
  75467. * wrapped.next();
  75468. * // => { 'done': false, 'value': 1 }
  75469. *
  75470. * wrapped.next();
  75471. * // => { 'done': false, 'value': 2 }
  75472. *
  75473. * wrapped.next();
  75474. * // => { 'done': true, 'value': undefined }
  75475. */
  75476. function wrapperNext() {
  75477. if (this.__values__ === undefined) {
  75478. this.__values__ = toArray(this.value());
  75479. }
  75480. var done = this.__index__ >= this.__values__.length,
  75481. value = done ? undefined : this.__values__[this.__index__++];
  75482. return { 'done': done, 'value': value };
  75483. }
  75484. /**
  75485. * Enables the wrapper to be iterable.
  75486. *
  75487. * @name Symbol.iterator
  75488. * @memberOf _
  75489. * @since 4.0.0
  75490. * @category Seq
  75491. * @returns {Object} Returns the wrapper object.
  75492. * @example
  75493. *
  75494. * var wrapped = _([1, 2]);
  75495. *
  75496. * wrapped[Symbol.iterator]() === wrapped;
  75497. * // => true
  75498. *
  75499. * Array.from(wrapped);
  75500. * // => [1, 2]
  75501. */
  75502. function wrapperToIterator() {
  75503. return this;
  75504. }
  75505. /**
  75506. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  75507. *
  75508. * @name plant
  75509. * @memberOf _
  75510. * @since 3.2.0
  75511. * @category Seq
  75512. * @param {*} value The value to plant.
  75513. * @returns {Object} Returns the new `lodash` wrapper instance.
  75514. * @example
  75515. *
  75516. * function square(n) {
  75517. * return n * n;
  75518. * }
  75519. *
  75520. * var wrapped = _([1, 2]).map(square);
  75521. * var other = wrapped.plant([3, 4]);
  75522. *
  75523. * other.value();
  75524. * // => [9, 16]
  75525. *
  75526. * wrapped.value();
  75527. * // => [1, 4]
  75528. */
  75529. function wrapperPlant(value) {
  75530. var result,
  75531. parent = this;
  75532. while (parent instanceof baseLodash) {
  75533. var clone = wrapperClone(parent);
  75534. clone.__index__ = 0;
  75535. clone.__values__ = undefined;
  75536. if (result) {
  75537. previous.__wrapped__ = clone;
  75538. } else {
  75539. result = clone;
  75540. }
  75541. var previous = clone;
  75542. parent = parent.__wrapped__;
  75543. }
  75544. previous.__wrapped__ = value;
  75545. return result;
  75546. }
  75547. /**
  75548. * This method is the wrapper version of `_.reverse`.
  75549. *
  75550. * **Note:** This method mutates the wrapped array.
  75551. *
  75552. * @name reverse
  75553. * @memberOf _
  75554. * @since 0.1.0
  75555. * @category Seq
  75556. * @returns {Object} Returns the new `lodash` wrapper instance.
  75557. * @example
  75558. *
  75559. * var array = [1, 2, 3];
  75560. *
  75561. * _(array).reverse().value()
  75562. * // => [3, 2, 1]
  75563. *
  75564. * console.log(array);
  75565. * // => [3, 2, 1]
  75566. */
  75567. function wrapperReverse() {
  75568. var value = this.__wrapped__;
  75569. if (value instanceof LazyWrapper) {
  75570. var wrapped = value;
  75571. if (this.__actions__.length) {
  75572. wrapped = new LazyWrapper(this);
  75573. }
  75574. wrapped = wrapped.reverse();
  75575. wrapped.__actions__.push({
  75576. 'func': thru,
  75577. 'args': [reverse],
  75578. 'thisArg': undefined
  75579. });
  75580. return new LodashWrapper(wrapped, this.__chain__);
  75581. }
  75582. return this.thru(reverse);
  75583. }
  75584. /**
  75585. * Executes the chain sequence to resolve the unwrapped value.
  75586. *
  75587. * @name value
  75588. * @memberOf _
  75589. * @since 0.1.0
  75590. * @alias toJSON, valueOf
  75591. * @category Seq
  75592. * @returns {*} Returns the resolved unwrapped value.
  75593. * @example
  75594. *
  75595. * _([1, 2, 3]).value();
  75596. * // => [1, 2, 3]
  75597. */
  75598. function wrapperValue() {
  75599. return baseWrapperValue(this.__wrapped__, this.__actions__);
  75600. }
  75601. /*------------------------------------------------------------------------*/
  75602. /**
  75603. * Creates an object composed of keys generated from the results of running
  75604. * each element of `collection` thru `iteratee`. The corresponding value of
  75605. * each key is the number of times the key was returned by `iteratee`. The
  75606. * iteratee is invoked with one argument: (value).
  75607. *
  75608. * @static
  75609. * @memberOf _
  75610. * @since 0.5.0
  75611. * @category Collection
  75612. * @param {Array|Object} collection The collection to iterate over.
  75613. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  75614. * @returns {Object} Returns the composed aggregate object.
  75615. * @example
  75616. *
  75617. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  75618. * // => { '4': 1, '6': 2 }
  75619. *
  75620. * // The `_.property` iteratee shorthand.
  75621. * _.countBy(['one', 'two', 'three'], 'length');
  75622. * // => { '3': 2, '5': 1 }
  75623. */
  75624. var countBy = createAggregator(function(result, value, key) {
  75625. if (hasOwnProperty.call(result, key)) {
  75626. ++result[key];
  75627. } else {
  75628. baseAssignValue(result, key, 1);
  75629. }
  75630. });
  75631. /**
  75632. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  75633. * Iteration is stopped once `predicate` returns falsey. The predicate is
  75634. * invoked with three arguments: (value, index|key, collection).
  75635. *
  75636. * **Note:** This method returns `true` for
  75637. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  75638. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  75639. * elements of empty collections.
  75640. *
  75641. * @static
  75642. * @memberOf _
  75643. * @since 0.1.0
  75644. * @category Collection
  75645. * @param {Array|Object} collection The collection to iterate over.
  75646. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  75647. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  75648. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  75649. * else `false`.
  75650. * @example
  75651. *
  75652. * _.every([true, 1, null, 'yes'], Boolean);
  75653. * // => false
  75654. *
  75655. * var users = [
  75656. * { 'user': 'barney', 'age': 36, 'active': false },
  75657. * { 'user': 'fred', 'age': 40, 'active': false }
  75658. * ];
  75659. *
  75660. * // The `_.matches` iteratee shorthand.
  75661. * _.every(users, { 'user': 'barney', 'active': false });
  75662. * // => false
  75663. *
  75664. * // The `_.matchesProperty` iteratee shorthand.
  75665. * _.every(users, ['active', false]);
  75666. * // => true
  75667. *
  75668. * // The `_.property` iteratee shorthand.
  75669. * _.every(users, 'active');
  75670. * // => false
  75671. */
  75672. function every(collection, predicate, guard) {
  75673. var func = isArray(collection) ? arrayEvery : baseEvery;
  75674. if (guard && isIterateeCall(collection, predicate, guard)) {
  75675. predicate = undefined;
  75676. }
  75677. return func(collection, getIteratee(predicate, 3));
  75678. }
  75679. /**
  75680. * Iterates over elements of `collection`, returning an array of all elements
  75681. * `predicate` returns truthy for. The predicate is invoked with three
  75682. * arguments: (value, index|key, collection).
  75683. *
  75684. * **Note:** Unlike `_.remove`, this method returns a new array.
  75685. *
  75686. * @static
  75687. * @memberOf _
  75688. * @since 0.1.0
  75689. * @category Collection
  75690. * @param {Array|Object} collection The collection to iterate over.
  75691. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  75692. * @returns {Array} Returns the new filtered array.
  75693. * @see _.reject
  75694. * @example
  75695. *
  75696. * var users = [
  75697. * { 'user': 'barney', 'age': 36, 'active': true },
  75698. * { 'user': 'fred', 'age': 40, 'active': false }
  75699. * ];
  75700. *
  75701. * _.filter(users, function(o) { return !o.active; });
  75702. * // => objects for ['fred']
  75703. *
  75704. * // The `_.matches` iteratee shorthand.
  75705. * _.filter(users, { 'age': 36, 'active': true });
  75706. * // => objects for ['barney']
  75707. *
  75708. * // The `_.matchesProperty` iteratee shorthand.
  75709. * _.filter(users, ['active', false]);
  75710. * // => objects for ['fred']
  75711. *
  75712. * // The `_.property` iteratee shorthand.
  75713. * _.filter(users, 'active');
  75714. * // => objects for ['barney']
  75715. *
  75716. * // Combining several predicates using `_.overEvery` or `_.overSome`.
  75717. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  75718. * // => objects for ['fred', 'barney']
  75719. */
  75720. function filter(collection, predicate) {
  75721. var func = isArray(collection) ? arrayFilter : baseFilter;
  75722. return func(collection, getIteratee(predicate, 3));
  75723. }
  75724. /**
  75725. * Iterates over elements of `collection`, returning the first element
  75726. * `predicate` returns truthy for. The predicate is invoked with three
  75727. * arguments: (value, index|key, collection).
  75728. *
  75729. * @static
  75730. * @memberOf _
  75731. * @since 0.1.0
  75732. * @category Collection
  75733. * @param {Array|Object} collection The collection to inspect.
  75734. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  75735. * @param {number} [fromIndex=0] The index to search from.
  75736. * @returns {*} Returns the matched element, else `undefined`.
  75737. * @example
  75738. *
  75739. * var users = [
  75740. * { 'user': 'barney', 'age': 36, 'active': true },
  75741. * { 'user': 'fred', 'age': 40, 'active': false },
  75742. * { 'user': 'pebbles', 'age': 1, 'active': true }
  75743. * ];
  75744. *
  75745. * _.find(users, function(o) { return o.age < 40; });
  75746. * // => object for 'barney'
  75747. *
  75748. * // The `_.matches` iteratee shorthand.
  75749. * _.find(users, { 'age': 1, 'active': true });
  75750. * // => object for 'pebbles'
  75751. *
  75752. * // The `_.matchesProperty` iteratee shorthand.
  75753. * _.find(users, ['active', false]);
  75754. * // => object for 'fred'
  75755. *
  75756. * // The `_.property` iteratee shorthand.
  75757. * _.find(users, 'active');
  75758. * // => object for 'barney'
  75759. */
  75760. var find = createFind(findIndex);
  75761. /**
  75762. * This method is like `_.find` except that it iterates over elements of
  75763. * `collection` from right to left.
  75764. *
  75765. * @static
  75766. * @memberOf _
  75767. * @since 2.0.0
  75768. * @category Collection
  75769. * @param {Array|Object} collection The collection to inspect.
  75770. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  75771. * @param {number} [fromIndex=collection.length-1] The index to search from.
  75772. * @returns {*} Returns the matched element, else `undefined`.
  75773. * @example
  75774. *
  75775. * _.findLast([1, 2, 3, 4], function(n) {
  75776. * return n % 2 == 1;
  75777. * });
  75778. * // => 3
  75779. */
  75780. var findLast = createFind(findLastIndex);
  75781. /**
  75782. * Creates a flattened array of values by running each element in `collection`
  75783. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  75784. * with three arguments: (value, index|key, collection).
  75785. *
  75786. * @static
  75787. * @memberOf _
  75788. * @since 4.0.0
  75789. * @category Collection
  75790. * @param {Array|Object} collection The collection to iterate over.
  75791. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  75792. * @returns {Array} Returns the new flattened array.
  75793. * @example
  75794. *
  75795. * function duplicate(n) {
  75796. * return [n, n];
  75797. * }
  75798. *
  75799. * _.flatMap([1, 2], duplicate);
  75800. * // => [1, 1, 2, 2]
  75801. */
  75802. function flatMap(collection, iteratee) {
  75803. return baseFlatten(map(collection, iteratee), 1);
  75804. }
  75805. /**
  75806. * This method is like `_.flatMap` except that it recursively flattens the
  75807. * mapped results.
  75808. *
  75809. * @static
  75810. * @memberOf _
  75811. * @since 4.7.0
  75812. * @category Collection
  75813. * @param {Array|Object} collection The collection to iterate over.
  75814. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  75815. * @returns {Array} Returns the new flattened array.
  75816. * @example
  75817. *
  75818. * function duplicate(n) {
  75819. * return [[[n, n]]];
  75820. * }
  75821. *
  75822. * _.flatMapDeep([1, 2], duplicate);
  75823. * // => [1, 1, 2, 2]
  75824. */
  75825. function flatMapDeep(collection, iteratee) {
  75826. return baseFlatten(map(collection, iteratee), INFINITY);
  75827. }
  75828. /**
  75829. * This method is like `_.flatMap` except that it recursively flattens the
  75830. * mapped results up to `depth` times.
  75831. *
  75832. * @static
  75833. * @memberOf _
  75834. * @since 4.7.0
  75835. * @category Collection
  75836. * @param {Array|Object} collection The collection to iterate over.
  75837. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  75838. * @param {number} [depth=1] The maximum recursion depth.
  75839. * @returns {Array} Returns the new flattened array.
  75840. * @example
  75841. *
  75842. * function duplicate(n) {
  75843. * return [[[n, n]]];
  75844. * }
  75845. *
  75846. * _.flatMapDepth([1, 2], duplicate, 2);
  75847. * // => [[1, 1], [2, 2]]
  75848. */
  75849. function flatMapDepth(collection, iteratee, depth) {
  75850. depth = depth === undefined ? 1 : toInteger(depth);
  75851. return baseFlatten(map(collection, iteratee), depth);
  75852. }
  75853. /**
  75854. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  75855. * The iteratee is invoked with three arguments: (value, index|key, collection).
  75856. * Iteratee functions may exit iteration early by explicitly returning `false`.
  75857. *
  75858. * **Note:** As with other "Collections" methods, objects with a "length"
  75859. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  75860. * or `_.forOwn` for object iteration.
  75861. *
  75862. * @static
  75863. * @memberOf _
  75864. * @since 0.1.0
  75865. * @alias each
  75866. * @category Collection
  75867. * @param {Array|Object} collection The collection to iterate over.
  75868. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  75869. * @returns {Array|Object} Returns `collection`.
  75870. * @see _.forEachRight
  75871. * @example
  75872. *
  75873. * _.forEach([1, 2], function(value) {
  75874. * console.log(value);
  75875. * });
  75876. * // => Logs `1` then `2`.
  75877. *
  75878. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  75879. * console.log(key);
  75880. * });
  75881. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  75882. */
  75883. function forEach(collection, iteratee) {
  75884. var func = isArray(collection) ? arrayEach : baseEach;
  75885. return func(collection, getIteratee(iteratee, 3));
  75886. }
  75887. /**
  75888. * This method is like `_.forEach` except that it iterates over elements of
  75889. * `collection` from right to left.
  75890. *
  75891. * @static
  75892. * @memberOf _
  75893. * @since 2.0.0
  75894. * @alias eachRight
  75895. * @category Collection
  75896. * @param {Array|Object} collection The collection to iterate over.
  75897. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  75898. * @returns {Array|Object} Returns `collection`.
  75899. * @see _.forEach
  75900. * @example
  75901. *
  75902. * _.forEachRight([1, 2], function(value) {
  75903. * console.log(value);
  75904. * });
  75905. * // => Logs `2` then `1`.
  75906. */
  75907. function forEachRight(collection, iteratee) {
  75908. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  75909. return func(collection, getIteratee(iteratee, 3));
  75910. }
  75911. /**
  75912. * Creates an object composed of keys generated from the results of running
  75913. * each element of `collection` thru `iteratee`. The order of grouped values
  75914. * is determined by the order they occur in `collection`. The corresponding
  75915. * value of each key is an array of elements responsible for generating the
  75916. * key. The iteratee is invoked with one argument: (value).
  75917. *
  75918. * @static
  75919. * @memberOf _
  75920. * @since 0.1.0
  75921. * @category Collection
  75922. * @param {Array|Object} collection The collection to iterate over.
  75923. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  75924. * @returns {Object} Returns the composed aggregate object.
  75925. * @example
  75926. *
  75927. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  75928. * // => { '4': [4.2], '6': [6.1, 6.3] }
  75929. *
  75930. * // The `_.property` iteratee shorthand.
  75931. * _.groupBy(['one', 'two', 'three'], 'length');
  75932. * // => { '3': ['one', 'two'], '5': ['three'] }
  75933. */
  75934. var groupBy = createAggregator(function(result, value, key) {
  75935. if (hasOwnProperty.call(result, key)) {
  75936. result[key].push(value);
  75937. } else {
  75938. baseAssignValue(result, key, [value]);
  75939. }
  75940. });
  75941. /**
  75942. * Checks if `value` is in `collection`. If `collection` is a string, it's
  75943. * checked for a substring of `value`, otherwise
  75944. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  75945. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  75946. * the offset from the end of `collection`.
  75947. *
  75948. * @static
  75949. * @memberOf _
  75950. * @since 0.1.0
  75951. * @category Collection
  75952. * @param {Array|Object|string} collection The collection to inspect.
  75953. * @param {*} value The value to search for.
  75954. * @param {number} [fromIndex=0] The index to search from.
  75955. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  75956. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  75957. * @example
  75958. *
  75959. * _.includes([1, 2, 3], 1);
  75960. * // => true
  75961. *
  75962. * _.includes([1, 2, 3], 1, 2);
  75963. * // => false
  75964. *
  75965. * _.includes({ 'a': 1, 'b': 2 }, 1);
  75966. * // => true
  75967. *
  75968. * _.includes('abcd', 'bc');
  75969. * // => true
  75970. */
  75971. function includes(collection, value, fromIndex, guard) {
  75972. collection = isArrayLike(collection) ? collection : values(collection);
  75973. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  75974. var length = collection.length;
  75975. if (fromIndex < 0) {
  75976. fromIndex = nativeMax(length + fromIndex, 0);
  75977. }
  75978. return isString(collection)
  75979. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  75980. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  75981. }
  75982. /**
  75983. * Invokes the method at `path` of each element in `collection`, returning
  75984. * an array of the results of each invoked method. Any additional arguments
  75985. * are provided to each invoked method. If `path` is a function, it's invoked
  75986. * for, and `this` bound to, each element in `collection`.
  75987. *
  75988. * @static
  75989. * @memberOf _
  75990. * @since 4.0.0
  75991. * @category Collection
  75992. * @param {Array|Object} collection The collection to iterate over.
  75993. * @param {Array|Function|string} path The path of the method to invoke or
  75994. * the function invoked per iteration.
  75995. * @param {...*} [args] The arguments to invoke each method with.
  75996. * @returns {Array} Returns the array of results.
  75997. * @example
  75998. *
  75999. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  76000. * // => [[1, 5, 7], [1, 2, 3]]
  76001. *
  76002. * _.invokeMap([123, 456], String.prototype.split, '');
  76003. * // => [['1', '2', '3'], ['4', '5', '6']]
  76004. */
  76005. var invokeMap = baseRest(function(collection, path, args) {
  76006. var index = -1,
  76007. isFunc = typeof path == 'function',
  76008. result = isArrayLike(collection) ? Array(collection.length) : [];
  76009. baseEach(collection, function(value) {
  76010. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  76011. });
  76012. return result;
  76013. });
  76014. /**
  76015. * Creates an object composed of keys generated from the results of running
  76016. * each element of `collection` thru `iteratee`. The corresponding value of
  76017. * each key is the last element responsible for generating the key. The
  76018. * iteratee is invoked with one argument: (value).
  76019. *
  76020. * @static
  76021. * @memberOf _
  76022. * @since 4.0.0
  76023. * @category Collection
  76024. * @param {Array|Object} collection The collection to iterate over.
  76025. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  76026. * @returns {Object} Returns the composed aggregate object.
  76027. * @example
  76028. *
  76029. * var array = [
  76030. * { 'dir': 'left', 'code': 97 },
  76031. * { 'dir': 'right', 'code': 100 }
  76032. * ];
  76033. *
  76034. * _.keyBy(array, function(o) {
  76035. * return String.fromCharCode(o.code);
  76036. * });
  76037. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  76038. *
  76039. * _.keyBy(array, 'dir');
  76040. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  76041. */
  76042. var keyBy = createAggregator(function(result, value, key) {
  76043. baseAssignValue(result, key, value);
  76044. });
  76045. /**
  76046. * Creates an array of values by running each element in `collection` thru
  76047. * `iteratee`. The iteratee is invoked with three arguments:
  76048. * (value, index|key, collection).
  76049. *
  76050. * Many lodash methods are guarded to work as iteratees for methods like
  76051. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  76052. *
  76053. * The guarded methods are:
  76054. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  76055. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  76056. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  76057. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  76058. *
  76059. * @static
  76060. * @memberOf _
  76061. * @since 0.1.0
  76062. * @category Collection
  76063. * @param {Array|Object} collection The collection to iterate over.
  76064. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  76065. * @returns {Array} Returns the new mapped array.
  76066. * @example
  76067. *
  76068. * function square(n) {
  76069. * return n * n;
  76070. * }
  76071. *
  76072. * _.map([4, 8], square);
  76073. * // => [16, 64]
  76074. *
  76075. * _.map({ 'a': 4, 'b': 8 }, square);
  76076. * // => [16, 64] (iteration order is not guaranteed)
  76077. *
  76078. * var users = [
  76079. * { 'user': 'barney' },
  76080. * { 'user': 'fred' }
  76081. * ];
  76082. *
  76083. * // The `_.property` iteratee shorthand.
  76084. * _.map(users, 'user');
  76085. * // => ['barney', 'fred']
  76086. */
  76087. function map(collection, iteratee) {
  76088. var func = isArray(collection) ? arrayMap : baseMap;
  76089. return func(collection, getIteratee(iteratee, 3));
  76090. }
  76091. /**
  76092. * This method is like `_.sortBy` except that it allows specifying the sort
  76093. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  76094. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  76095. * descending or "asc" for ascending sort order of corresponding values.
  76096. *
  76097. * @static
  76098. * @memberOf _
  76099. * @since 4.0.0
  76100. * @category Collection
  76101. * @param {Array|Object} collection The collection to iterate over.
  76102. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  76103. * The iteratees to sort by.
  76104. * @param {string[]} [orders] The sort orders of `iteratees`.
  76105. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  76106. * @returns {Array} Returns the new sorted array.
  76107. * @example
  76108. *
  76109. * var users = [
  76110. * { 'user': 'fred', 'age': 48 },
  76111. * { 'user': 'barney', 'age': 34 },
  76112. * { 'user': 'fred', 'age': 40 },
  76113. * { 'user': 'barney', 'age': 36 }
  76114. * ];
  76115. *
  76116. * // Sort by `user` in ascending order and by `age` in descending order.
  76117. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  76118. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  76119. */
  76120. function orderBy(collection, iteratees, orders, guard) {
  76121. if (collection == null) {
  76122. return [];
  76123. }
  76124. if (!isArray(iteratees)) {
  76125. iteratees = iteratees == null ? [] : [iteratees];
  76126. }
  76127. orders = guard ? undefined : orders;
  76128. if (!isArray(orders)) {
  76129. orders = orders == null ? [] : [orders];
  76130. }
  76131. return baseOrderBy(collection, iteratees, orders);
  76132. }
  76133. /**
  76134. * Creates an array of elements split into two groups, the first of which
  76135. * contains elements `predicate` returns truthy for, the second of which
  76136. * contains elements `predicate` returns falsey for. The predicate is
  76137. * invoked with one argument: (value).
  76138. *
  76139. * @static
  76140. * @memberOf _
  76141. * @since 3.0.0
  76142. * @category Collection
  76143. * @param {Array|Object} collection The collection to iterate over.
  76144. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  76145. * @returns {Array} Returns the array of grouped elements.
  76146. * @example
  76147. *
  76148. * var users = [
  76149. * { 'user': 'barney', 'age': 36, 'active': false },
  76150. * { 'user': 'fred', 'age': 40, 'active': true },
  76151. * { 'user': 'pebbles', 'age': 1, 'active': false }
  76152. * ];
  76153. *
  76154. * _.partition(users, function(o) { return o.active; });
  76155. * // => objects for [['fred'], ['barney', 'pebbles']]
  76156. *
  76157. * // The `_.matches` iteratee shorthand.
  76158. * _.partition(users, { 'age': 1, 'active': false });
  76159. * // => objects for [['pebbles'], ['barney', 'fred']]
  76160. *
  76161. * // The `_.matchesProperty` iteratee shorthand.
  76162. * _.partition(users, ['active', false]);
  76163. * // => objects for [['barney', 'pebbles'], ['fred']]
  76164. *
  76165. * // The `_.property` iteratee shorthand.
  76166. * _.partition(users, 'active');
  76167. * // => objects for [['fred'], ['barney', 'pebbles']]
  76168. */
  76169. var partition = createAggregator(function(result, value, key) {
  76170. result[key ? 0 : 1].push(value);
  76171. }, function() { return [[], []]; });
  76172. /**
  76173. * Reduces `collection` to a value which is the accumulated result of running
  76174. * each element in `collection` thru `iteratee`, where each successive
  76175. * invocation is supplied the return value of the previous. If `accumulator`
  76176. * is not given, the first element of `collection` is used as the initial
  76177. * value. The iteratee is invoked with four arguments:
  76178. * (accumulator, value, index|key, collection).
  76179. *
  76180. * Many lodash methods are guarded to work as iteratees for methods like
  76181. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  76182. *
  76183. * The guarded methods are:
  76184. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  76185. * and `sortBy`
  76186. *
  76187. * @static
  76188. * @memberOf _
  76189. * @since 0.1.0
  76190. * @category Collection
  76191. * @param {Array|Object} collection The collection to iterate over.
  76192. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  76193. * @param {*} [accumulator] The initial value.
  76194. * @returns {*} Returns the accumulated value.
  76195. * @see _.reduceRight
  76196. * @example
  76197. *
  76198. * _.reduce([1, 2], function(sum, n) {
  76199. * return sum + n;
  76200. * }, 0);
  76201. * // => 3
  76202. *
  76203. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  76204. * (result[value] || (result[value] = [])).push(key);
  76205. * return result;
  76206. * }, {});
  76207. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  76208. */
  76209. function reduce(collection, iteratee, accumulator) {
  76210. var func = isArray(collection) ? arrayReduce : baseReduce,
  76211. initAccum = arguments.length < 3;
  76212. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  76213. }
  76214. /**
  76215. * This method is like `_.reduce` except that it iterates over elements of
  76216. * `collection` from right to left.
  76217. *
  76218. * @static
  76219. * @memberOf _
  76220. * @since 0.1.0
  76221. * @category Collection
  76222. * @param {Array|Object} collection The collection to iterate over.
  76223. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  76224. * @param {*} [accumulator] The initial value.
  76225. * @returns {*} Returns the accumulated value.
  76226. * @see _.reduce
  76227. * @example
  76228. *
  76229. * var array = [[0, 1], [2, 3], [4, 5]];
  76230. *
  76231. * _.reduceRight(array, function(flattened, other) {
  76232. * return flattened.concat(other);
  76233. * }, []);
  76234. * // => [4, 5, 2, 3, 0, 1]
  76235. */
  76236. function reduceRight(collection, iteratee, accumulator) {
  76237. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  76238. initAccum = arguments.length < 3;
  76239. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  76240. }
  76241. /**
  76242. * The opposite of `_.filter`; this method returns the elements of `collection`
  76243. * that `predicate` does **not** return truthy for.
  76244. *
  76245. * @static
  76246. * @memberOf _
  76247. * @since 0.1.0
  76248. * @category Collection
  76249. * @param {Array|Object} collection The collection to iterate over.
  76250. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  76251. * @returns {Array} Returns the new filtered array.
  76252. * @see _.filter
  76253. * @example
  76254. *
  76255. * var users = [
  76256. * { 'user': 'barney', 'age': 36, 'active': false },
  76257. * { 'user': 'fred', 'age': 40, 'active': true }
  76258. * ];
  76259. *
  76260. * _.reject(users, function(o) { return !o.active; });
  76261. * // => objects for ['fred']
  76262. *
  76263. * // The `_.matches` iteratee shorthand.
  76264. * _.reject(users, { 'age': 40, 'active': true });
  76265. * // => objects for ['barney']
  76266. *
  76267. * // The `_.matchesProperty` iteratee shorthand.
  76268. * _.reject(users, ['active', false]);
  76269. * // => objects for ['fred']
  76270. *
  76271. * // The `_.property` iteratee shorthand.
  76272. * _.reject(users, 'active');
  76273. * // => objects for ['barney']
  76274. */
  76275. function reject(collection, predicate) {
  76276. var func = isArray(collection) ? arrayFilter : baseFilter;
  76277. return func(collection, negate(getIteratee(predicate, 3)));
  76278. }
  76279. /**
  76280. * Gets a random element from `collection`.
  76281. *
  76282. * @static
  76283. * @memberOf _
  76284. * @since 2.0.0
  76285. * @category Collection
  76286. * @param {Array|Object} collection The collection to sample.
  76287. * @returns {*} Returns the random element.
  76288. * @example
  76289. *
  76290. * _.sample([1, 2, 3, 4]);
  76291. * // => 2
  76292. */
  76293. function sample(collection) {
  76294. var func = isArray(collection) ? arraySample : baseSample;
  76295. return func(collection);
  76296. }
  76297. /**
  76298. * Gets `n` random elements at unique keys from `collection` up to the
  76299. * size of `collection`.
  76300. *
  76301. * @static
  76302. * @memberOf _
  76303. * @since 4.0.0
  76304. * @category Collection
  76305. * @param {Array|Object} collection The collection to sample.
  76306. * @param {number} [n=1] The number of elements to sample.
  76307. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  76308. * @returns {Array} Returns the random elements.
  76309. * @example
  76310. *
  76311. * _.sampleSize([1, 2, 3], 2);
  76312. * // => [3, 1]
  76313. *
  76314. * _.sampleSize([1, 2, 3], 4);
  76315. * // => [2, 3, 1]
  76316. */
  76317. function sampleSize(collection, n, guard) {
  76318. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  76319. n = 1;
  76320. } else {
  76321. n = toInteger(n);
  76322. }
  76323. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  76324. return func(collection, n);
  76325. }
  76326. /**
  76327. * Creates an array of shuffled values, using a version of the
  76328. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  76329. *
  76330. * @static
  76331. * @memberOf _
  76332. * @since 0.1.0
  76333. * @category Collection
  76334. * @param {Array|Object} collection The collection to shuffle.
  76335. * @returns {Array} Returns the new shuffled array.
  76336. * @example
  76337. *
  76338. * _.shuffle([1, 2, 3, 4]);
  76339. * // => [4, 1, 3, 2]
  76340. */
  76341. function shuffle(collection) {
  76342. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  76343. return func(collection);
  76344. }
  76345. /**
  76346. * Gets the size of `collection` by returning its length for array-like
  76347. * values or the number of own enumerable string keyed properties for objects.
  76348. *
  76349. * @static
  76350. * @memberOf _
  76351. * @since 0.1.0
  76352. * @category Collection
  76353. * @param {Array|Object|string} collection The collection to inspect.
  76354. * @returns {number} Returns the collection size.
  76355. * @example
  76356. *
  76357. * _.size([1, 2, 3]);
  76358. * // => 3
  76359. *
  76360. * _.size({ 'a': 1, 'b': 2 });
  76361. * // => 2
  76362. *
  76363. * _.size('pebbles');
  76364. * // => 7
  76365. */
  76366. function size(collection) {
  76367. if (collection == null) {
  76368. return 0;
  76369. }
  76370. if (isArrayLike(collection)) {
  76371. return isString(collection) ? stringSize(collection) : collection.length;
  76372. }
  76373. var tag = getTag(collection);
  76374. if (tag == mapTag || tag == setTag) {
  76375. return collection.size;
  76376. }
  76377. return baseKeys(collection).length;
  76378. }
  76379. /**
  76380. * Checks if `predicate` returns truthy for **any** element of `collection`.
  76381. * Iteration is stopped once `predicate` returns truthy. The predicate is
  76382. * invoked with three arguments: (value, index|key, collection).
  76383. *
  76384. * @static
  76385. * @memberOf _
  76386. * @since 0.1.0
  76387. * @category Collection
  76388. * @param {Array|Object} collection The collection to iterate over.
  76389. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  76390. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  76391. * @returns {boolean} Returns `true` if any element passes the predicate check,
  76392. * else `false`.
  76393. * @example
  76394. *
  76395. * _.some([null, 0, 'yes', false], Boolean);
  76396. * // => true
  76397. *
  76398. * var users = [
  76399. * { 'user': 'barney', 'active': true },
  76400. * { 'user': 'fred', 'active': false }
  76401. * ];
  76402. *
  76403. * // The `_.matches` iteratee shorthand.
  76404. * _.some(users, { 'user': 'barney', 'active': false });
  76405. * // => false
  76406. *
  76407. * // The `_.matchesProperty` iteratee shorthand.
  76408. * _.some(users, ['active', false]);
  76409. * // => true
  76410. *
  76411. * // The `_.property` iteratee shorthand.
  76412. * _.some(users, 'active');
  76413. * // => true
  76414. */
  76415. function some(collection, predicate, guard) {
  76416. var func = isArray(collection) ? arraySome : baseSome;
  76417. if (guard && isIterateeCall(collection, predicate, guard)) {
  76418. predicate = undefined;
  76419. }
  76420. return func(collection, getIteratee(predicate, 3));
  76421. }
  76422. /**
  76423. * Creates an array of elements, sorted in ascending order by the results of
  76424. * running each element in a collection thru each iteratee. This method
  76425. * performs a stable sort, that is, it preserves the original sort order of
  76426. * equal elements. The iteratees are invoked with one argument: (value).
  76427. *
  76428. * @static
  76429. * @memberOf _
  76430. * @since 0.1.0
  76431. * @category Collection
  76432. * @param {Array|Object} collection The collection to iterate over.
  76433. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  76434. * The iteratees to sort by.
  76435. * @returns {Array} Returns the new sorted array.
  76436. * @example
  76437. *
  76438. * var users = [
  76439. * { 'user': 'fred', 'age': 48 },
  76440. * { 'user': 'barney', 'age': 36 },
  76441. * { 'user': 'fred', 'age': 30 },
  76442. * { 'user': 'barney', 'age': 34 }
  76443. * ];
  76444. *
  76445. * _.sortBy(users, [function(o) { return o.user; }]);
  76446. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  76447. *
  76448. * _.sortBy(users, ['user', 'age']);
  76449. * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  76450. */
  76451. var sortBy = baseRest(function(collection, iteratees) {
  76452. if (collection == null) {
  76453. return [];
  76454. }
  76455. var length = iteratees.length;
  76456. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  76457. iteratees = [];
  76458. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  76459. iteratees = [iteratees[0]];
  76460. }
  76461. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  76462. });
  76463. /*------------------------------------------------------------------------*/
  76464. /**
  76465. * Gets the timestamp of the number of milliseconds that have elapsed since
  76466. * the Unix epoch (1 January 1970 00:00:00 UTC).
  76467. *
  76468. * @static
  76469. * @memberOf _
  76470. * @since 2.4.0
  76471. * @category Date
  76472. * @returns {number} Returns the timestamp.
  76473. * @example
  76474. *
  76475. * _.defer(function(stamp) {
  76476. * console.log(_.now() - stamp);
  76477. * }, _.now());
  76478. * // => Logs the number of milliseconds it took for the deferred invocation.
  76479. */
  76480. var now = ctxNow || function() {
  76481. return root.Date.now();
  76482. };
  76483. /*------------------------------------------------------------------------*/
  76484. /**
  76485. * The opposite of `_.before`; this method creates a function that invokes
  76486. * `func` once it's called `n` or more times.
  76487. *
  76488. * @static
  76489. * @memberOf _
  76490. * @since 0.1.0
  76491. * @category Function
  76492. * @param {number} n The number of calls before `func` is invoked.
  76493. * @param {Function} func The function to restrict.
  76494. * @returns {Function} Returns the new restricted function.
  76495. * @example
  76496. *
  76497. * var saves = ['profile', 'settings'];
  76498. *
  76499. * var done = _.after(saves.length, function() {
  76500. * console.log('done saving!');
  76501. * });
  76502. *
  76503. * _.forEach(saves, function(type) {
  76504. * asyncSave({ 'type': type, 'complete': done });
  76505. * });
  76506. * // => Logs 'done saving!' after the two async saves have completed.
  76507. */
  76508. function after(n, func) {
  76509. if (typeof func != 'function') {
  76510. throw new TypeError(FUNC_ERROR_TEXT);
  76511. }
  76512. n = toInteger(n);
  76513. return function() {
  76514. if (--n < 1) {
  76515. return func.apply(this, arguments);
  76516. }
  76517. };
  76518. }
  76519. /**
  76520. * Creates a function that invokes `func`, with up to `n` arguments,
  76521. * ignoring any additional arguments.
  76522. *
  76523. * @static
  76524. * @memberOf _
  76525. * @since 3.0.0
  76526. * @category Function
  76527. * @param {Function} func The function to cap arguments for.
  76528. * @param {number} [n=func.length] The arity cap.
  76529. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  76530. * @returns {Function} Returns the new capped function.
  76531. * @example
  76532. *
  76533. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  76534. * // => [6, 8, 10]
  76535. */
  76536. function ary(func, n, guard) {
  76537. n = guard ? undefined : n;
  76538. n = (func && n == null) ? func.length : n;
  76539. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  76540. }
  76541. /**
  76542. * Creates a function that invokes `func`, with the `this` binding and arguments
  76543. * of the created function, while it's called less than `n` times. Subsequent
  76544. * calls to the created function return the result of the last `func` invocation.
  76545. *
  76546. * @static
  76547. * @memberOf _
  76548. * @since 3.0.0
  76549. * @category Function
  76550. * @param {number} n The number of calls at which `func` is no longer invoked.
  76551. * @param {Function} func The function to restrict.
  76552. * @returns {Function} Returns the new restricted function.
  76553. * @example
  76554. *
  76555. * jQuery(element).on('click', _.before(5, addContactToList));
  76556. * // => Allows adding up to 4 contacts to the list.
  76557. */
  76558. function before(n, func) {
  76559. var result;
  76560. if (typeof func != 'function') {
  76561. throw new TypeError(FUNC_ERROR_TEXT);
  76562. }
  76563. n = toInteger(n);
  76564. return function() {
  76565. if (--n > 0) {
  76566. result = func.apply(this, arguments);
  76567. }
  76568. if (n <= 1) {
  76569. func = undefined;
  76570. }
  76571. return result;
  76572. };
  76573. }
  76574. /**
  76575. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  76576. * and `partials` prepended to the arguments it receives.
  76577. *
  76578. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  76579. * may be used as a placeholder for partially applied arguments.
  76580. *
  76581. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  76582. * property of bound functions.
  76583. *
  76584. * @static
  76585. * @memberOf _
  76586. * @since 0.1.0
  76587. * @category Function
  76588. * @param {Function} func The function to bind.
  76589. * @param {*} thisArg The `this` binding of `func`.
  76590. * @param {...*} [partials] The arguments to be partially applied.
  76591. * @returns {Function} Returns the new bound function.
  76592. * @example
  76593. *
  76594. * function greet(greeting, punctuation) {
  76595. * return greeting + ' ' + this.user + punctuation;
  76596. * }
  76597. *
  76598. * var object = { 'user': 'fred' };
  76599. *
  76600. * var bound = _.bind(greet, object, 'hi');
  76601. * bound('!');
  76602. * // => 'hi fred!'
  76603. *
  76604. * // Bound with placeholders.
  76605. * var bound = _.bind(greet, object, _, '!');
  76606. * bound('hi');
  76607. * // => 'hi fred!'
  76608. */
  76609. var bind = baseRest(function(func, thisArg, partials) {
  76610. var bitmask = WRAP_BIND_FLAG;
  76611. if (partials.length) {
  76612. var holders = replaceHolders(partials, getHolder(bind));
  76613. bitmask |= WRAP_PARTIAL_FLAG;
  76614. }
  76615. return createWrap(func, bitmask, thisArg, partials, holders);
  76616. });
  76617. /**
  76618. * Creates a function that invokes the method at `object[key]` with `partials`
  76619. * prepended to the arguments it receives.
  76620. *
  76621. * This method differs from `_.bind` by allowing bound functions to reference
  76622. * methods that may be redefined or don't yet exist. See
  76623. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  76624. * for more details.
  76625. *
  76626. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  76627. * builds, may be used as a placeholder for partially applied arguments.
  76628. *
  76629. * @static
  76630. * @memberOf _
  76631. * @since 0.10.0
  76632. * @category Function
  76633. * @param {Object} object The object to invoke the method on.
  76634. * @param {string} key The key of the method.
  76635. * @param {...*} [partials] The arguments to be partially applied.
  76636. * @returns {Function} Returns the new bound function.
  76637. * @example
  76638. *
  76639. * var object = {
  76640. * 'user': 'fred',
  76641. * 'greet': function(greeting, punctuation) {
  76642. * return greeting + ' ' + this.user + punctuation;
  76643. * }
  76644. * };
  76645. *
  76646. * var bound = _.bindKey(object, 'greet', 'hi');
  76647. * bound('!');
  76648. * // => 'hi fred!'
  76649. *
  76650. * object.greet = function(greeting, punctuation) {
  76651. * return greeting + 'ya ' + this.user + punctuation;
  76652. * };
  76653. *
  76654. * bound('!');
  76655. * // => 'hiya fred!'
  76656. *
  76657. * // Bound with placeholders.
  76658. * var bound = _.bindKey(object, 'greet', _, '!');
  76659. * bound('hi');
  76660. * // => 'hiya fred!'
  76661. */
  76662. var bindKey = baseRest(function(object, key, partials) {
  76663. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  76664. if (partials.length) {
  76665. var holders = replaceHolders(partials, getHolder(bindKey));
  76666. bitmask |= WRAP_PARTIAL_FLAG;
  76667. }
  76668. return createWrap(key, bitmask, object, partials, holders);
  76669. });
  76670. /**
  76671. * Creates a function that accepts arguments of `func` and either invokes
  76672. * `func` returning its result, if at least `arity` number of arguments have
  76673. * been provided, or returns a function that accepts the remaining `func`
  76674. * arguments, and so on. The arity of `func` may be specified if `func.length`
  76675. * is not sufficient.
  76676. *
  76677. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  76678. * may be used as a placeholder for provided arguments.
  76679. *
  76680. * **Note:** This method doesn't set the "length" property of curried functions.
  76681. *
  76682. * @static
  76683. * @memberOf _
  76684. * @since 2.0.0
  76685. * @category Function
  76686. * @param {Function} func The function to curry.
  76687. * @param {number} [arity=func.length] The arity of `func`.
  76688. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  76689. * @returns {Function} Returns the new curried function.
  76690. * @example
  76691. *
  76692. * var abc = function(a, b, c) {
  76693. * return [a, b, c];
  76694. * };
  76695. *
  76696. * var curried = _.curry(abc);
  76697. *
  76698. * curried(1)(2)(3);
  76699. * // => [1, 2, 3]
  76700. *
  76701. * curried(1, 2)(3);
  76702. * // => [1, 2, 3]
  76703. *
  76704. * curried(1, 2, 3);
  76705. * // => [1, 2, 3]
  76706. *
  76707. * // Curried with placeholders.
  76708. * curried(1)(_, 3)(2);
  76709. * // => [1, 2, 3]
  76710. */
  76711. function curry(func, arity, guard) {
  76712. arity = guard ? undefined : arity;
  76713. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  76714. result.placeholder = curry.placeholder;
  76715. return result;
  76716. }
  76717. /**
  76718. * This method is like `_.curry` except that arguments are applied to `func`
  76719. * in the manner of `_.partialRight` instead of `_.partial`.
  76720. *
  76721. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  76722. * builds, may be used as a placeholder for provided arguments.
  76723. *
  76724. * **Note:** This method doesn't set the "length" property of curried functions.
  76725. *
  76726. * @static
  76727. * @memberOf _
  76728. * @since 3.0.0
  76729. * @category Function
  76730. * @param {Function} func The function to curry.
  76731. * @param {number} [arity=func.length] The arity of `func`.
  76732. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  76733. * @returns {Function} Returns the new curried function.
  76734. * @example
  76735. *
  76736. * var abc = function(a, b, c) {
  76737. * return [a, b, c];
  76738. * };
  76739. *
  76740. * var curried = _.curryRight(abc);
  76741. *
  76742. * curried(3)(2)(1);
  76743. * // => [1, 2, 3]
  76744. *
  76745. * curried(2, 3)(1);
  76746. * // => [1, 2, 3]
  76747. *
  76748. * curried(1, 2, 3);
  76749. * // => [1, 2, 3]
  76750. *
  76751. * // Curried with placeholders.
  76752. * curried(3)(1, _)(2);
  76753. * // => [1, 2, 3]
  76754. */
  76755. function curryRight(func, arity, guard) {
  76756. arity = guard ? undefined : arity;
  76757. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  76758. result.placeholder = curryRight.placeholder;
  76759. return result;
  76760. }
  76761. /**
  76762. * Creates a debounced function that delays invoking `func` until after `wait`
  76763. * milliseconds have elapsed since the last time the debounced function was
  76764. * invoked. The debounced function comes with a `cancel` method to cancel
  76765. * delayed `func` invocations and a `flush` method to immediately invoke them.
  76766. * Provide `options` to indicate whether `func` should be invoked on the
  76767. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  76768. * with the last arguments provided to the debounced function. Subsequent
  76769. * calls to the debounced function return the result of the last `func`
  76770. * invocation.
  76771. *
  76772. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  76773. * invoked on the trailing edge of the timeout only if the debounced function
  76774. * is invoked more than once during the `wait` timeout.
  76775. *
  76776. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  76777. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  76778. *
  76779. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  76780. * for details over the differences between `_.debounce` and `_.throttle`.
  76781. *
  76782. * @static
  76783. * @memberOf _
  76784. * @since 0.1.0
  76785. * @category Function
  76786. * @param {Function} func The function to debounce.
  76787. * @param {number} [wait=0] The number of milliseconds to delay.
  76788. * @param {Object} [options={}] The options object.
  76789. * @param {boolean} [options.leading=false]
  76790. * Specify invoking on the leading edge of the timeout.
  76791. * @param {number} [options.maxWait]
  76792. * The maximum time `func` is allowed to be delayed before it's invoked.
  76793. * @param {boolean} [options.trailing=true]
  76794. * Specify invoking on the trailing edge of the timeout.
  76795. * @returns {Function} Returns the new debounced function.
  76796. * @example
  76797. *
  76798. * // Avoid costly calculations while the window size is in flux.
  76799. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  76800. *
  76801. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  76802. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  76803. * 'leading': true,
  76804. * 'trailing': false
  76805. * }));
  76806. *
  76807. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  76808. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  76809. * var source = new EventSource('/stream');
  76810. * jQuery(source).on('message', debounced);
  76811. *
  76812. * // Cancel the trailing debounced invocation.
  76813. * jQuery(window).on('popstate', debounced.cancel);
  76814. */
  76815. function debounce(func, wait, options) {
  76816. var lastArgs,
  76817. lastThis,
  76818. maxWait,
  76819. result,
  76820. timerId,
  76821. lastCallTime,
  76822. lastInvokeTime = 0,
  76823. leading = false,
  76824. maxing = false,
  76825. trailing = true;
  76826. if (typeof func != 'function') {
  76827. throw new TypeError(FUNC_ERROR_TEXT);
  76828. }
  76829. wait = toNumber(wait) || 0;
  76830. if (isObject(options)) {
  76831. leading = !!options.leading;
  76832. maxing = 'maxWait' in options;
  76833. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  76834. trailing = 'trailing' in options ? !!options.trailing : trailing;
  76835. }
  76836. function invokeFunc(time) {
  76837. var args = lastArgs,
  76838. thisArg = lastThis;
  76839. lastArgs = lastThis = undefined;
  76840. lastInvokeTime = time;
  76841. result = func.apply(thisArg, args);
  76842. return result;
  76843. }
  76844. function leadingEdge(time) {
  76845. // Reset any `maxWait` timer.
  76846. lastInvokeTime = time;
  76847. // Start the timer for the trailing edge.
  76848. timerId = setTimeout(timerExpired, wait);
  76849. // Invoke the leading edge.
  76850. return leading ? invokeFunc(time) : result;
  76851. }
  76852. function remainingWait(time) {
  76853. var timeSinceLastCall = time - lastCallTime,
  76854. timeSinceLastInvoke = time - lastInvokeTime,
  76855. timeWaiting = wait - timeSinceLastCall;
  76856. return maxing
  76857. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  76858. : timeWaiting;
  76859. }
  76860. function shouldInvoke(time) {
  76861. var timeSinceLastCall = time - lastCallTime,
  76862. timeSinceLastInvoke = time - lastInvokeTime;
  76863. // Either this is the first call, activity has stopped and we're at the
  76864. // trailing edge, the system time has gone backwards and we're treating
  76865. // it as the trailing edge, or we've hit the `maxWait` limit.
  76866. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  76867. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  76868. }
  76869. function timerExpired() {
  76870. var time = now();
  76871. if (shouldInvoke(time)) {
  76872. return trailingEdge(time);
  76873. }
  76874. // Restart the timer.
  76875. timerId = setTimeout(timerExpired, remainingWait(time));
  76876. }
  76877. function trailingEdge(time) {
  76878. timerId = undefined;
  76879. // Only invoke if we have `lastArgs` which means `func` has been
  76880. // debounced at least once.
  76881. if (trailing && lastArgs) {
  76882. return invokeFunc(time);
  76883. }
  76884. lastArgs = lastThis = undefined;
  76885. return result;
  76886. }
  76887. function cancel() {
  76888. if (timerId !== undefined) {
  76889. clearTimeout(timerId);
  76890. }
  76891. lastInvokeTime = 0;
  76892. lastArgs = lastCallTime = lastThis = timerId = undefined;
  76893. }
  76894. function flush() {
  76895. return timerId === undefined ? result : trailingEdge(now());
  76896. }
  76897. function debounced() {
  76898. var time = now(),
  76899. isInvoking = shouldInvoke(time);
  76900. lastArgs = arguments;
  76901. lastThis = this;
  76902. lastCallTime = time;
  76903. if (isInvoking) {
  76904. if (timerId === undefined) {
  76905. return leadingEdge(lastCallTime);
  76906. }
  76907. if (maxing) {
  76908. // Handle invocations in a tight loop.
  76909. clearTimeout(timerId);
  76910. timerId = setTimeout(timerExpired, wait);
  76911. return invokeFunc(lastCallTime);
  76912. }
  76913. }
  76914. if (timerId === undefined) {
  76915. timerId = setTimeout(timerExpired, wait);
  76916. }
  76917. return result;
  76918. }
  76919. debounced.cancel = cancel;
  76920. debounced.flush = flush;
  76921. return debounced;
  76922. }
  76923. /**
  76924. * Defers invoking the `func` until the current call stack has cleared. Any
  76925. * additional arguments are provided to `func` when it's invoked.
  76926. *
  76927. * @static
  76928. * @memberOf _
  76929. * @since 0.1.0
  76930. * @category Function
  76931. * @param {Function} func The function to defer.
  76932. * @param {...*} [args] The arguments to invoke `func` with.
  76933. * @returns {number} Returns the timer id.
  76934. * @example
  76935. *
  76936. * _.defer(function(text) {
  76937. * console.log(text);
  76938. * }, 'deferred');
  76939. * // => Logs 'deferred' after one millisecond.
  76940. */
  76941. var defer = baseRest(function(func, args) {
  76942. return baseDelay(func, 1, args);
  76943. });
  76944. /**
  76945. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  76946. * provided to `func` when it's invoked.
  76947. *
  76948. * @static
  76949. * @memberOf _
  76950. * @since 0.1.0
  76951. * @category Function
  76952. * @param {Function} func The function to delay.
  76953. * @param {number} wait The number of milliseconds to delay invocation.
  76954. * @param {...*} [args] The arguments to invoke `func` with.
  76955. * @returns {number} Returns the timer id.
  76956. * @example
  76957. *
  76958. * _.delay(function(text) {
  76959. * console.log(text);
  76960. * }, 1000, 'later');
  76961. * // => Logs 'later' after one second.
  76962. */
  76963. var delay = baseRest(function(func, wait, args) {
  76964. return baseDelay(func, toNumber(wait) || 0, args);
  76965. });
  76966. /**
  76967. * Creates a function that invokes `func` with arguments reversed.
  76968. *
  76969. * @static
  76970. * @memberOf _
  76971. * @since 4.0.0
  76972. * @category Function
  76973. * @param {Function} func The function to flip arguments for.
  76974. * @returns {Function} Returns the new flipped function.
  76975. * @example
  76976. *
  76977. * var flipped = _.flip(function() {
  76978. * return _.toArray(arguments);
  76979. * });
  76980. *
  76981. * flipped('a', 'b', 'c', 'd');
  76982. * // => ['d', 'c', 'b', 'a']
  76983. */
  76984. function flip(func) {
  76985. return createWrap(func, WRAP_FLIP_FLAG);
  76986. }
  76987. /**
  76988. * Creates a function that memoizes the result of `func`. If `resolver` is
  76989. * provided, it determines the cache key for storing the result based on the
  76990. * arguments provided to the memoized function. By default, the first argument
  76991. * provided to the memoized function is used as the map cache key. The `func`
  76992. * is invoked with the `this` binding of the memoized function.
  76993. *
  76994. * **Note:** The cache is exposed as the `cache` property on the memoized
  76995. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  76996. * constructor with one whose instances implement the
  76997. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  76998. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  76999. *
  77000. * @static
  77001. * @memberOf _
  77002. * @since 0.1.0
  77003. * @category Function
  77004. * @param {Function} func The function to have its output memoized.
  77005. * @param {Function} [resolver] The function to resolve the cache key.
  77006. * @returns {Function} Returns the new memoized function.
  77007. * @example
  77008. *
  77009. * var object = { 'a': 1, 'b': 2 };
  77010. * var other = { 'c': 3, 'd': 4 };
  77011. *
  77012. * var values = _.memoize(_.values);
  77013. * values(object);
  77014. * // => [1, 2]
  77015. *
  77016. * values(other);
  77017. * // => [3, 4]
  77018. *
  77019. * object.a = 2;
  77020. * values(object);
  77021. * // => [1, 2]
  77022. *
  77023. * // Modify the result cache.
  77024. * values.cache.set(object, ['a', 'b']);
  77025. * values(object);
  77026. * // => ['a', 'b']
  77027. *
  77028. * // Replace `_.memoize.Cache`.
  77029. * _.memoize.Cache = WeakMap;
  77030. */
  77031. function memoize(func, resolver) {
  77032. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  77033. throw new TypeError(FUNC_ERROR_TEXT);
  77034. }
  77035. var memoized = function() {
  77036. var args = arguments,
  77037. key = resolver ? resolver.apply(this, args) : args[0],
  77038. cache = memoized.cache;
  77039. if (cache.has(key)) {
  77040. return cache.get(key);
  77041. }
  77042. var result = func.apply(this, args);
  77043. memoized.cache = cache.set(key, result) || cache;
  77044. return result;
  77045. };
  77046. memoized.cache = new (memoize.Cache || MapCache);
  77047. return memoized;
  77048. }
  77049. // Expose `MapCache`.
  77050. memoize.Cache = MapCache;
  77051. /**
  77052. * Creates a function that negates the result of the predicate `func`. The
  77053. * `func` predicate is invoked with the `this` binding and arguments of the
  77054. * created function.
  77055. *
  77056. * @static
  77057. * @memberOf _
  77058. * @since 3.0.0
  77059. * @category Function
  77060. * @param {Function} predicate The predicate to negate.
  77061. * @returns {Function} Returns the new negated function.
  77062. * @example
  77063. *
  77064. * function isEven(n) {
  77065. * return n % 2 == 0;
  77066. * }
  77067. *
  77068. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  77069. * // => [1, 3, 5]
  77070. */
  77071. function negate(predicate) {
  77072. if (typeof predicate != 'function') {
  77073. throw new TypeError(FUNC_ERROR_TEXT);
  77074. }
  77075. return function() {
  77076. var args = arguments;
  77077. switch (args.length) {
  77078. case 0: return !predicate.call(this);
  77079. case 1: return !predicate.call(this, args[0]);
  77080. case 2: return !predicate.call(this, args[0], args[1]);
  77081. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  77082. }
  77083. return !predicate.apply(this, args);
  77084. };
  77085. }
  77086. /**
  77087. * Creates a function that is restricted to invoking `func` once. Repeat calls
  77088. * to the function return the value of the first invocation. The `func` is
  77089. * invoked with the `this` binding and arguments of the created function.
  77090. *
  77091. * @static
  77092. * @memberOf _
  77093. * @since 0.1.0
  77094. * @category Function
  77095. * @param {Function} func The function to restrict.
  77096. * @returns {Function} Returns the new restricted function.
  77097. * @example
  77098. *
  77099. * var initialize = _.once(createApplication);
  77100. * initialize();
  77101. * initialize();
  77102. * // => `createApplication` is invoked once
  77103. */
  77104. function once(func) {
  77105. return before(2, func);
  77106. }
  77107. /**
  77108. * Creates a function that invokes `func` with its arguments transformed.
  77109. *
  77110. * @static
  77111. * @since 4.0.0
  77112. * @memberOf _
  77113. * @category Function
  77114. * @param {Function} func The function to wrap.
  77115. * @param {...(Function|Function[])} [transforms=[_.identity]]
  77116. * The argument transforms.
  77117. * @returns {Function} Returns the new function.
  77118. * @example
  77119. *
  77120. * function doubled(n) {
  77121. * return n * 2;
  77122. * }
  77123. *
  77124. * function square(n) {
  77125. * return n * n;
  77126. * }
  77127. *
  77128. * var func = _.overArgs(function(x, y) {
  77129. * return [x, y];
  77130. * }, [square, doubled]);
  77131. *
  77132. * func(9, 3);
  77133. * // => [81, 6]
  77134. *
  77135. * func(10, 5);
  77136. * // => [100, 10]
  77137. */
  77138. var overArgs = castRest(function(func, transforms) {
  77139. transforms = (transforms.length == 1 && isArray(transforms[0]))
  77140. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  77141. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  77142. var funcsLength = transforms.length;
  77143. return baseRest(function(args) {
  77144. var index = -1,
  77145. length = nativeMin(args.length, funcsLength);
  77146. while (++index < length) {
  77147. args[index] = transforms[index].call(this, args[index]);
  77148. }
  77149. return apply(func, this, args);
  77150. });
  77151. });
  77152. /**
  77153. * Creates a function that invokes `func` with `partials` prepended to the
  77154. * arguments it receives. This method is like `_.bind` except it does **not**
  77155. * alter the `this` binding.
  77156. *
  77157. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  77158. * builds, may be used as a placeholder for partially applied arguments.
  77159. *
  77160. * **Note:** This method doesn't set the "length" property of partially
  77161. * applied functions.
  77162. *
  77163. * @static
  77164. * @memberOf _
  77165. * @since 0.2.0
  77166. * @category Function
  77167. * @param {Function} func The function to partially apply arguments to.
  77168. * @param {...*} [partials] The arguments to be partially applied.
  77169. * @returns {Function} Returns the new partially applied function.
  77170. * @example
  77171. *
  77172. * function greet(greeting, name) {
  77173. * return greeting + ' ' + name;
  77174. * }
  77175. *
  77176. * var sayHelloTo = _.partial(greet, 'hello');
  77177. * sayHelloTo('fred');
  77178. * // => 'hello fred'
  77179. *
  77180. * // Partially applied with placeholders.
  77181. * var greetFred = _.partial(greet, _, 'fred');
  77182. * greetFred('hi');
  77183. * // => 'hi fred'
  77184. */
  77185. var partial = baseRest(function(func, partials) {
  77186. var holders = replaceHolders(partials, getHolder(partial));
  77187. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  77188. });
  77189. /**
  77190. * This method is like `_.partial` except that partially applied arguments
  77191. * are appended to the arguments it receives.
  77192. *
  77193. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  77194. * builds, may be used as a placeholder for partially applied arguments.
  77195. *
  77196. * **Note:** This method doesn't set the "length" property of partially
  77197. * applied functions.
  77198. *
  77199. * @static
  77200. * @memberOf _
  77201. * @since 1.0.0
  77202. * @category Function
  77203. * @param {Function} func The function to partially apply arguments to.
  77204. * @param {...*} [partials] The arguments to be partially applied.
  77205. * @returns {Function} Returns the new partially applied function.
  77206. * @example
  77207. *
  77208. * function greet(greeting, name) {
  77209. * return greeting + ' ' + name;
  77210. * }
  77211. *
  77212. * var greetFred = _.partialRight(greet, 'fred');
  77213. * greetFred('hi');
  77214. * // => 'hi fred'
  77215. *
  77216. * // Partially applied with placeholders.
  77217. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  77218. * sayHelloTo('fred');
  77219. * // => 'hello fred'
  77220. */
  77221. var partialRight = baseRest(function(func, partials) {
  77222. var holders = replaceHolders(partials, getHolder(partialRight));
  77223. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  77224. });
  77225. /**
  77226. * Creates a function that invokes `func` with arguments arranged according
  77227. * to the specified `indexes` where the argument value at the first index is
  77228. * provided as the first argument, the argument value at the second index is
  77229. * provided as the second argument, and so on.
  77230. *
  77231. * @static
  77232. * @memberOf _
  77233. * @since 3.0.0
  77234. * @category Function
  77235. * @param {Function} func The function to rearrange arguments for.
  77236. * @param {...(number|number[])} indexes The arranged argument indexes.
  77237. * @returns {Function} Returns the new function.
  77238. * @example
  77239. *
  77240. * var rearged = _.rearg(function(a, b, c) {
  77241. * return [a, b, c];
  77242. * }, [2, 0, 1]);
  77243. *
  77244. * rearged('b', 'c', 'a')
  77245. * // => ['a', 'b', 'c']
  77246. */
  77247. var rearg = flatRest(function(func, indexes) {
  77248. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  77249. });
  77250. /**
  77251. * Creates a function that invokes `func` with the `this` binding of the
  77252. * created function and arguments from `start` and beyond provided as
  77253. * an array.
  77254. *
  77255. * **Note:** This method is based on the
  77256. * [rest parameter](https://mdn.io/rest_parameters).
  77257. *
  77258. * @static
  77259. * @memberOf _
  77260. * @since 4.0.0
  77261. * @category Function
  77262. * @param {Function} func The function to apply a rest parameter to.
  77263. * @param {number} [start=func.length-1] The start position of the rest parameter.
  77264. * @returns {Function} Returns the new function.
  77265. * @example
  77266. *
  77267. * var say = _.rest(function(what, names) {
  77268. * return what + ' ' + _.initial(names).join(', ') +
  77269. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  77270. * });
  77271. *
  77272. * say('hello', 'fred', 'barney', 'pebbles');
  77273. * // => 'hello fred, barney, & pebbles'
  77274. */
  77275. function rest(func, start) {
  77276. if (typeof func != 'function') {
  77277. throw new TypeError(FUNC_ERROR_TEXT);
  77278. }
  77279. start = start === undefined ? start : toInteger(start);
  77280. return baseRest(func, start);
  77281. }
  77282. /**
  77283. * Creates a function that invokes `func` with the `this` binding of the
  77284. * create function and an array of arguments much like
  77285. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  77286. *
  77287. * **Note:** This method is based on the
  77288. * [spread operator](https://mdn.io/spread_operator).
  77289. *
  77290. * @static
  77291. * @memberOf _
  77292. * @since 3.2.0
  77293. * @category Function
  77294. * @param {Function} func The function to spread arguments over.
  77295. * @param {number} [start=0] The start position of the spread.
  77296. * @returns {Function} Returns the new function.
  77297. * @example
  77298. *
  77299. * var say = _.spread(function(who, what) {
  77300. * return who + ' says ' + what;
  77301. * });
  77302. *
  77303. * say(['fred', 'hello']);
  77304. * // => 'fred says hello'
  77305. *
  77306. * var numbers = Promise.all([
  77307. * Promise.resolve(40),
  77308. * Promise.resolve(36)
  77309. * ]);
  77310. *
  77311. * numbers.then(_.spread(function(x, y) {
  77312. * return x + y;
  77313. * }));
  77314. * // => a Promise of 76
  77315. */
  77316. function spread(func, start) {
  77317. if (typeof func != 'function') {
  77318. throw new TypeError(FUNC_ERROR_TEXT);
  77319. }
  77320. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  77321. return baseRest(function(args) {
  77322. var array = args[start],
  77323. otherArgs = castSlice(args, 0, start);
  77324. if (array) {
  77325. arrayPush(otherArgs, array);
  77326. }
  77327. return apply(func, this, otherArgs);
  77328. });
  77329. }
  77330. /**
  77331. * Creates a throttled function that only invokes `func` at most once per
  77332. * every `wait` milliseconds. The throttled function comes with a `cancel`
  77333. * method to cancel delayed `func` invocations and a `flush` method to
  77334. * immediately invoke them. Provide `options` to indicate whether `func`
  77335. * should be invoked on the leading and/or trailing edge of the `wait`
  77336. * timeout. The `func` is invoked with the last arguments provided to the
  77337. * throttled function. Subsequent calls to the throttled function return the
  77338. * result of the last `func` invocation.
  77339. *
  77340. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  77341. * invoked on the trailing edge of the timeout only if the throttled function
  77342. * is invoked more than once during the `wait` timeout.
  77343. *
  77344. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  77345. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  77346. *
  77347. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  77348. * for details over the differences between `_.throttle` and `_.debounce`.
  77349. *
  77350. * @static
  77351. * @memberOf _
  77352. * @since 0.1.0
  77353. * @category Function
  77354. * @param {Function} func The function to throttle.
  77355. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  77356. * @param {Object} [options={}] The options object.
  77357. * @param {boolean} [options.leading=true]
  77358. * Specify invoking on the leading edge of the timeout.
  77359. * @param {boolean} [options.trailing=true]
  77360. * Specify invoking on the trailing edge of the timeout.
  77361. * @returns {Function} Returns the new throttled function.
  77362. * @example
  77363. *
  77364. * // Avoid excessively updating the position while scrolling.
  77365. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  77366. *
  77367. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  77368. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  77369. * jQuery(element).on('click', throttled);
  77370. *
  77371. * // Cancel the trailing throttled invocation.
  77372. * jQuery(window).on('popstate', throttled.cancel);
  77373. */
  77374. function throttle(func, wait, options) {
  77375. var leading = true,
  77376. trailing = true;
  77377. if (typeof func != 'function') {
  77378. throw new TypeError(FUNC_ERROR_TEXT);
  77379. }
  77380. if (isObject(options)) {
  77381. leading = 'leading' in options ? !!options.leading : leading;
  77382. trailing = 'trailing' in options ? !!options.trailing : trailing;
  77383. }
  77384. return debounce(func, wait, {
  77385. 'leading': leading,
  77386. 'maxWait': wait,
  77387. 'trailing': trailing
  77388. });
  77389. }
  77390. /**
  77391. * Creates a function that accepts up to one argument, ignoring any
  77392. * additional arguments.
  77393. *
  77394. * @static
  77395. * @memberOf _
  77396. * @since 4.0.0
  77397. * @category Function
  77398. * @param {Function} func The function to cap arguments for.
  77399. * @returns {Function} Returns the new capped function.
  77400. * @example
  77401. *
  77402. * _.map(['6', '8', '10'], _.unary(parseInt));
  77403. * // => [6, 8, 10]
  77404. */
  77405. function unary(func) {
  77406. return ary(func, 1);
  77407. }
  77408. /**
  77409. * Creates a function that provides `value` to `wrapper` as its first
  77410. * argument. Any additional arguments provided to the function are appended
  77411. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  77412. * binding of the created function.
  77413. *
  77414. * @static
  77415. * @memberOf _
  77416. * @since 0.1.0
  77417. * @category Function
  77418. * @param {*} value The value to wrap.
  77419. * @param {Function} [wrapper=identity] The wrapper function.
  77420. * @returns {Function} Returns the new function.
  77421. * @example
  77422. *
  77423. * var p = _.wrap(_.escape, function(func, text) {
  77424. * return '<p>' + func(text) + '</p>';
  77425. * });
  77426. *
  77427. * p('fred, barney, & pebbles');
  77428. * // => '<p>fred, barney, &amp; pebbles</p>'
  77429. */
  77430. function wrap(value, wrapper) {
  77431. return partial(castFunction(wrapper), value);
  77432. }
  77433. /*------------------------------------------------------------------------*/
  77434. /**
  77435. * Casts `value` as an array if it's not one.
  77436. *
  77437. * @static
  77438. * @memberOf _
  77439. * @since 4.4.0
  77440. * @category Lang
  77441. * @param {*} value The value to inspect.
  77442. * @returns {Array} Returns the cast array.
  77443. * @example
  77444. *
  77445. * _.castArray(1);
  77446. * // => [1]
  77447. *
  77448. * _.castArray({ 'a': 1 });
  77449. * // => [{ 'a': 1 }]
  77450. *
  77451. * _.castArray('abc');
  77452. * // => ['abc']
  77453. *
  77454. * _.castArray(null);
  77455. * // => [null]
  77456. *
  77457. * _.castArray(undefined);
  77458. * // => [undefined]
  77459. *
  77460. * _.castArray();
  77461. * // => []
  77462. *
  77463. * var array = [1, 2, 3];
  77464. * console.log(_.castArray(array) === array);
  77465. * // => true
  77466. */
  77467. function castArray() {
  77468. if (!arguments.length) {
  77469. return [];
  77470. }
  77471. var value = arguments[0];
  77472. return isArray(value) ? value : [value];
  77473. }
  77474. /**
  77475. * Creates a shallow clone of `value`.
  77476. *
  77477. * **Note:** This method is loosely based on the
  77478. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  77479. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  77480. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  77481. * arrays. The own enumerable properties of `arguments` objects are cloned
  77482. * as plain objects. An empty object is returned for uncloneable values such
  77483. * as error objects, functions, DOM nodes, and WeakMaps.
  77484. *
  77485. * @static
  77486. * @memberOf _
  77487. * @since 0.1.0
  77488. * @category Lang
  77489. * @param {*} value The value to clone.
  77490. * @returns {*} Returns the cloned value.
  77491. * @see _.cloneDeep
  77492. * @example
  77493. *
  77494. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  77495. *
  77496. * var shallow = _.clone(objects);
  77497. * console.log(shallow[0] === objects[0]);
  77498. * // => true
  77499. */
  77500. function clone(value) {
  77501. return baseClone(value, CLONE_SYMBOLS_FLAG);
  77502. }
  77503. /**
  77504. * This method is like `_.clone` except that it accepts `customizer` which
  77505. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  77506. * cloning is handled by the method instead. The `customizer` is invoked with
  77507. * up to four arguments; (value [, index|key, object, stack]).
  77508. *
  77509. * @static
  77510. * @memberOf _
  77511. * @since 4.0.0
  77512. * @category Lang
  77513. * @param {*} value The value to clone.
  77514. * @param {Function} [customizer] The function to customize cloning.
  77515. * @returns {*} Returns the cloned value.
  77516. * @see _.cloneDeepWith
  77517. * @example
  77518. *
  77519. * function customizer(value) {
  77520. * if (_.isElement(value)) {
  77521. * return value.cloneNode(false);
  77522. * }
  77523. * }
  77524. *
  77525. * var el = _.cloneWith(document.body, customizer);
  77526. *
  77527. * console.log(el === document.body);
  77528. * // => false
  77529. * console.log(el.nodeName);
  77530. * // => 'BODY'
  77531. * console.log(el.childNodes.length);
  77532. * // => 0
  77533. */
  77534. function cloneWith(value, customizer) {
  77535. customizer = typeof customizer == 'function' ? customizer : undefined;
  77536. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  77537. }
  77538. /**
  77539. * This method is like `_.clone` except that it recursively clones `value`.
  77540. *
  77541. * @static
  77542. * @memberOf _
  77543. * @since 1.0.0
  77544. * @category Lang
  77545. * @param {*} value The value to recursively clone.
  77546. * @returns {*} Returns the deep cloned value.
  77547. * @see _.clone
  77548. * @example
  77549. *
  77550. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  77551. *
  77552. * var deep = _.cloneDeep(objects);
  77553. * console.log(deep[0] === objects[0]);
  77554. * // => false
  77555. */
  77556. function cloneDeep(value) {
  77557. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  77558. }
  77559. /**
  77560. * This method is like `_.cloneWith` except that it recursively clones `value`.
  77561. *
  77562. * @static
  77563. * @memberOf _
  77564. * @since 4.0.0
  77565. * @category Lang
  77566. * @param {*} value The value to recursively clone.
  77567. * @param {Function} [customizer] The function to customize cloning.
  77568. * @returns {*} Returns the deep cloned value.
  77569. * @see _.cloneWith
  77570. * @example
  77571. *
  77572. * function customizer(value) {
  77573. * if (_.isElement(value)) {
  77574. * return value.cloneNode(true);
  77575. * }
  77576. * }
  77577. *
  77578. * var el = _.cloneDeepWith(document.body, customizer);
  77579. *
  77580. * console.log(el === document.body);
  77581. * // => false
  77582. * console.log(el.nodeName);
  77583. * // => 'BODY'
  77584. * console.log(el.childNodes.length);
  77585. * // => 20
  77586. */
  77587. function cloneDeepWith(value, customizer) {
  77588. customizer = typeof customizer == 'function' ? customizer : undefined;
  77589. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  77590. }
  77591. /**
  77592. * Checks if `object` conforms to `source` by invoking the predicate
  77593. * properties of `source` with the corresponding property values of `object`.
  77594. *
  77595. * **Note:** This method is equivalent to `_.conforms` when `source` is
  77596. * partially applied.
  77597. *
  77598. * @static
  77599. * @memberOf _
  77600. * @since 4.14.0
  77601. * @category Lang
  77602. * @param {Object} object The object to inspect.
  77603. * @param {Object} source The object of property predicates to conform to.
  77604. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  77605. * @example
  77606. *
  77607. * var object = { 'a': 1, 'b': 2 };
  77608. *
  77609. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  77610. * // => true
  77611. *
  77612. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  77613. * // => false
  77614. */
  77615. function conformsTo(object, source) {
  77616. return source == null || baseConformsTo(object, source, keys(source));
  77617. }
  77618. /**
  77619. * Performs a
  77620. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  77621. * comparison between two values to determine if they are equivalent.
  77622. *
  77623. * @static
  77624. * @memberOf _
  77625. * @since 4.0.0
  77626. * @category Lang
  77627. * @param {*} value The value to compare.
  77628. * @param {*} other The other value to compare.
  77629. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  77630. * @example
  77631. *
  77632. * var object = { 'a': 1 };
  77633. * var other = { 'a': 1 };
  77634. *
  77635. * _.eq(object, object);
  77636. * // => true
  77637. *
  77638. * _.eq(object, other);
  77639. * // => false
  77640. *
  77641. * _.eq('a', 'a');
  77642. * // => true
  77643. *
  77644. * _.eq('a', Object('a'));
  77645. * // => false
  77646. *
  77647. * _.eq(NaN, NaN);
  77648. * // => true
  77649. */
  77650. function eq(value, other) {
  77651. return value === other || (value !== value && other !== other);
  77652. }
  77653. /**
  77654. * Checks if `value` is greater than `other`.
  77655. *
  77656. * @static
  77657. * @memberOf _
  77658. * @since 3.9.0
  77659. * @category Lang
  77660. * @param {*} value The value to compare.
  77661. * @param {*} other The other value to compare.
  77662. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  77663. * else `false`.
  77664. * @see _.lt
  77665. * @example
  77666. *
  77667. * _.gt(3, 1);
  77668. * // => true
  77669. *
  77670. * _.gt(3, 3);
  77671. * // => false
  77672. *
  77673. * _.gt(1, 3);
  77674. * // => false
  77675. */
  77676. var gt = createRelationalOperation(baseGt);
  77677. /**
  77678. * Checks if `value` is greater than or equal to `other`.
  77679. *
  77680. * @static
  77681. * @memberOf _
  77682. * @since 3.9.0
  77683. * @category Lang
  77684. * @param {*} value The value to compare.
  77685. * @param {*} other The other value to compare.
  77686. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  77687. * `other`, else `false`.
  77688. * @see _.lte
  77689. * @example
  77690. *
  77691. * _.gte(3, 1);
  77692. * // => true
  77693. *
  77694. * _.gte(3, 3);
  77695. * // => true
  77696. *
  77697. * _.gte(1, 3);
  77698. * // => false
  77699. */
  77700. var gte = createRelationalOperation(function(value, other) {
  77701. return value >= other;
  77702. });
  77703. /**
  77704. * Checks if `value` is likely an `arguments` object.
  77705. *
  77706. * @static
  77707. * @memberOf _
  77708. * @since 0.1.0
  77709. * @category Lang
  77710. * @param {*} value The value to check.
  77711. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  77712. * else `false`.
  77713. * @example
  77714. *
  77715. * _.isArguments(function() { return arguments; }());
  77716. * // => true
  77717. *
  77718. * _.isArguments([1, 2, 3]);
  77719. * // => false
  77720. */
  77721. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  77722. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  77723. !propertyIsEnumerable.call(value, 'callee');
  77724. };
  77725. /**
  77726. * Checks if `value` is classified as an `Array` object.
  77727. *
  77728. * @static
  77729. * @memberOf _
  77730. * @since 0.1.0
  77731. * @category Lang
  77732. * @param {*} value The value to check.
  77733. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  77734. * @example
  77735. *
  77736. * _.isArray([1, 2, 3]);
  77737. * // => true
  77738. *
  77739. * _.isArray(document.body.children);
  77740. * // => false
  77741. *
  77742. * _.isArray('abc');
  77743. * // => false
  77744. *
  77745. * _.isArray(_.noop);
  77746. * // => false
  77747. */
  77748. var isArray = Array.isArray;
  77749. /**
  77750. * Checks if `value` is classified as an `ArrayBuffer` object.
  77751. *
  77752. * @static
  77753. * @memberOf _
  77754. * @since 4.3.0
  77755. * @category Lang
  77756. * @param {*} value The value to check.
  77757. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  77758. * @example
  77759. *
  77760. * _.isArrayBuffer(new ArrayBuffer(2));
  77761. * // => true
  77762. *
  77763. * _.isArrayBuffer(new Array(2));
  77764. * // => false
  77765. */
  77766. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  77767. /**
  77768. * Checks if `value` is array-like. A value is considered array-like if it's
  77769. * not a function and has a `value.length` that's an integer greater than or
  77770. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  77771. *
  77772. * @static
  77773. * @memberOf _
  77774. * @since 4.0.0
  77775. * @category Lang
  77776. * @param {*} value The value to check.
  77777. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  77778. * @example
  77779. *
  77780. * _.isArrayLike([1, 2, 3]);
  77781. * // => true
  77782. *
  77783. * _.isArrayLike(document.body.children);
  77784. * // => true
  77785. *
  77786. * _.isArrayLike('abc');
  77787. * // => true
  77788. *
  77789. * _.isArrayLike(_.noop);
  77790. * // => false
  77791. */
  77792. function isArrayLike(value) {
  77793. return value != null && isLength(value.length) && !isFunction(value);
  77794. }
  77795. /**
  77796. * This method is like `_.isArrayLike` except that it also checks if `value`
  77797. * is an object.
  77798. *
  77799. * @static
  77800. * @memberOf _
  77801. * @since 4.0.0
  77802. * @category Lang
  77803. * @param {*} value The value to check.
  77804. * @returns {boolean} Returns `true` if `value` is an array-like object,
  77805. * else `false`.
  77806. * @example
  77807. *
  77808. * _.isArrayLikeObject([1, 2, 3]);
  77809. * // => true
  77810. *
  77811. * _.isArrayLikeObject(document.body.children);
  77812. * // => true
  77813. *
  77814. * _.isArrayLikeObject('abc');
  77815. * // => false
  77816. *
  77817. * _.isArrayLikeObject(_.noop);
  77818. * // => false
  77819. */
  77820. function isArrayLikeObject(value) {
  77821. return isObjectLike(value) && isArrayLike(value);
  77822. }
  77823. /**
  77824. * Checks if `value` is classified as a boolean primitive or object.
  77825. *
  77826. * @static
  77827. * @memberOf _
  77828. * @since 0.1.0
  77829. * @category Lang
  77830. * @param {*} value The value to check.
  77831. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  77832. * @example
  77833. *
  77834. * _.isBoolean(false);
  77835. * // => true
  77836. *
  77837. * _.isBoolean(null);
  77838. * // => false
  77839. */
  77840. function isBoolean(value) {
  77841. return value === true || value === false ||
  77842. (isObjectLike(value) && baseGetTag(value) == boolTag);
  77843. }
  77844. /**
  77845. * Checks if `value` is a buffer.
  77846. *
  77847. * @static
  77848. * @memberOf _
  77849. * @since 4.3.0
  77850. * @category Lang
  77851. * @param {*} value The value to check.
  77852. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  77853. * @example
  77854. *
  77855. * _.isBuffer(new Buffer(2));
  77856. * // => true
  77857. *
  77858. * _.isBuffer(new Uint8Array(2));
  77859. * // => false
  77860. */
  77861. var isBuffer = nativeIsBuffer || stubFalse;
  77862. /**
  77863. * Checks if `value` is classified as a `Date` object.
  77864. *
  77865. * @static
  77866. * @memberOf _
  77867. * @since 0.1.0
  77868. * @category Lang
  77869. * @param {*} value The value to check.
  77870. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  77871. * @example
  77872. *
  77873. * _.isDate(new Date);
  77874. * // => true
  77875. *
  77876. * _.isDate('Mon April 23 2012');
  77877. * // => false
  77878. */
  77879. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  77880. /**
  77881. * Checks if `value` is likely a DOM element.
  77882. *
  77883. * @static
  77884. * @memberOf _
  77885. * @since 0.1.0
  77886. * @category Lang
  77887. * @param {*} value The value to check.
  77888. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  77889. * @example
  77890. *
  77891. * _.isElement(document.body);
  77892. * // => true
  77893. *
  77894. * _.isElement('<body>');
  77895. * // => false
  77896. */
  77897. function isElement(value) {
  77898. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  77899. }
  77900. /**
  77901. * Checks if `value` is an empty object, collection, map, or set.
  77902. *
  77903. * Objects are considered empty if they have no own enumerable string keyed
  77904. * properties.
  77905. *
  77906. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  77907. * jQuery-like collections are considered empty if they have a `length` of `0`.
  77908. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  77909. *
  77910. * @static
  77911. * @memberOf _
  77912. * @since 0.1.0
  77913. * @category Lang
  77914. * @param {*} value The value to check.
  77915. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  77916. * @example
  77917. *
  77918. * _.isEmpty(null);
  77919. * // => true
  77920. *
  77921. * _.isEmpty(true);
  77922. * // => true
  77923. *
  77924. * _.isEmpty(1);
  77925. * // => true
  77926. *
  77927. * _.isEmpty([1, 2, 3]);
  77928. * // => false
  77929. *
  77930. * _.isEmpty({ 'a': 1 });
  77931. * // => false
  77932. */
  77933. function isEmpty(value) {
  77934. if (value == null) {
  77935. return true;
  77936. }
  77937. if (isArrayLike(value) &&
  77938. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  77939. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  77940. return !value.length;
  77941. }
  77942. var tag = getTag(value);
  77943. if (tag == mapTag || tag == setTag) {
  77944. return !value.size;
  77945. }
  77946. if (isPrototype(value)) {
  77947. return !baseKeys(value).length;
  77948. }
  77949. for (var key in value) {
  77950. if (hasOwnProperty.call(value, key)) {
  77951. return false;
  77952. }
  77953. }
  77954. return true;
  77955. }
  77956. /**
  77957. * Performs a deep comparison between two values to determine if they are
  77958. * equivalent.
  77959. *
  77960. * **Note:** This method supports comparing arrays, array buffers, booleans,
  77961. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  77962. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  77963. * by their own, not inherited, enumerable properties. Functions and DOM
  77964. * nodes are compared by strict equality, i.e. `===`.
  77965. *
  77966. * @static
  77967. * @memberOf _
  77968. * @since 0.1.0
  77969. * @category Lang
  77970. * @param {*} value The value to compare.
  77971. * @param {*} other The other value to compare.
  77972. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  77973. * @example
  77974. *
  77975. * var object = { 'a': 1 };
  77976. * var other = { 'a': 1 };
  77977. *
  77978. * _.isEqual(object, other);
  77979. * // => true
  77980. *
  77981. * object === other;
  77982. * // => false
  77983. */
  77984. function isEqual(value, other) {
  77985. return baseIsEqual(value, other);
  77986. }
  77987. /**
  77988. * This method is like `_.isEqual` except that it accepts `customizer` which
  77989. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  77990. * are handled by the method instead. The `customizer` is invoked with up to
  77991. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  77992. *
  77993. * @static
  77994. * @memberOf _
  77995. * @since 4.0.0
  77996. * @category Lang
  77997. * @param {*} value The value to compare.
  77998. * @param {*} other The other value to compare.
  77999. * @param {Function} [customizer] The function to customize comparisons.
  78000. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  78001. * @example
  78002. *
  78003. * function isGreeting(value) {
  78004. * return /^h(?:i|ello)$/.test(value);
  78005. * }
  78006. *
  78007. * function customizer(objValue, othValue) {
  78008. * if (isGreeting(objValue) && isGreeting(othValue)) {
  78009. * return true;
  78010. * }
  78011. * }
  78012. *
  78013. * var array = ['hello', 'goodbye'];
  78014. * var other = ['hi', 'goodbye'];
  78015. *
  78016. * _.isEqualWith(array, other, customizer);
  78017. * // => true
  78018. */
  78019. function isEqualWith(value, other, customizer) {
  78020. customizer = typeof customizer == 'function' ? customizer : undefined;
  78021. var result = customizer ? customizer(value, other) : undefined;
  78022. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  78023. }
  78024. /**
  78025. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  78026. * `SyntaxError`, `TypeError`, or `URIError` object.
  78027. *
  78028. * @static
  78029. * @memberOf _
  78030. * @since 3.0.0
  78031. * @category Lang
  78032. * @param {*} value The value to check.
  78033. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  78034. * @example
  78035. *
  78036. * _.isError(new Error);
  78037. * // => true
  78038. *
  78039. * _.isError(Error);
  78040. * // => false
  78041. */
  78042. function isError(value) {
  78043. if (!isObjectLike(value)) {
  78044. return false;
  78045. }
  78046. var tag = baseGetTag(value);
  78047. return tag == errorTag || tag == domExcTag ||
  78048. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  78049. }
  78050. /**
  78051. * Checks if `value` is a finite primitive number.
  78052. *
  78053. * **Note:** This method is based on
  78054. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  78055. *
  78056. * @static
  78057. * @memberOf _
  78058. * @since 0.1.0
  78059. * @category Lang
  78060. * @param {*} value The value to check.
  78061. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  78062. * @example
  78063. *
  78064. * _.isFinite(3);
  78065. * // => true
  78066. *
  78067. * _.isFinite(Number.MIN_VALUE);
  78068. * // => true
  78069. *
  78070. * _.isFinite(Infinity);
  78071. * // => false
  78072. *
  78073. * _.isFinite('3');
  78074. * // => false
  78075. */
  78076. function isFinite(value) {
  78077. return typeof value == 'number' && nativeIsFinite(value);
  78078. }
  78079. /**
  78080. * Checks if `value` is classified as a `Function` object.
  78081. *
  78082. * @static
  78083. * @memberOf _
  78084. * @since 0.1.0
  78085. * @category Lang
  78086. * @param {*} value The value to check.
  78087. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  78088. * @example
  78089. *
  78090. * _.isFunction(_);
  78091. * // => true
  78092. *
  78093. * _.isFunction(/abc/);
  78094. * // => false
  78095. */
  78096. function isFunction(value) {
  78097. if (!isObject(value)) {
  78098. return false;
  78099. }
  78100. // The use of `Object#toString` avoids issues with the `typeof` operator
  78101. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  78102. var tag = baseGetTag(value);
  78103. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  78104. }
  78105. /**
  78106. * Checks if `value` is an integer.
  78107. *
  78108. * **Note:** This method is based on
  78109. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  78110. *
  78111. * @static
  78112. * @memberOf _
  78113. * @since 4.0.0
  78114. * @category Lang
  78115. * @param {*} value The value to check.
  78116. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  78117. * @example
  78118. *
  78119. * _.isInteger(3);
  78120. * // => true
  78121. *
  78122. * _.isInteger(Number.MIN_VALUE);
  78123. * // => false
  78124. *
  78125. * _.isInteger(Infinity);
  78126. * // => false
  78127. *
  78128. * _.isInteger('3');
  78129. * // => false
  78130. */
  78131. function isInteger(value) {
  78132. return typeof value == 'number' && value == toInteger(value);
  78133. }
  78134. /**
  78135. * Checks if `value` is a valid array-like length.
  78136. *
  78137. * **Note:** This method is loosely based on
  78138. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  78139. *
  78140. * @static
  78141. * @memberOf _
  78142. * @since 4.0.0
  78143. * @category Lang
  78144. * @param {*} value The value to check.
  78145. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  78146. * @example
  78147. *
  78148. * _.isLength(3);
  78149. * // => true
  78150. *
  78151. * _.isLength(Number.MIN_VALUE);
  78152. * // => false
  78153. *
  78154. * _.isLength(Infinity);
  78155. * // => false
  78156. *
  78157. * _.isLength('3');
  78158. * // => false
  78159. */
  78160. function isLength(value) {
  78161. return typeof value == 'number' &&
  78162. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  78163. }
  78164. /**
  78165. * Checks if `value` is the
  78166. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  78167. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  78168. *
  78169. * @static
  78170. * @memberOf _
  78171. * @since 0.1.0
  78172. * @category Lang
  78173. * @param {*} value The value to check.
  78174. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  78175. * @example
  78176. *
  78177. * _.isObject({});
  78178. * // => true
  78179. *
  78180. * _.isObject([1, 2, 3]);
  78181. * // => true
  78182. *
  78183. * _.isObject(_.noop);
  78184. * // => true
  78185. *
  78186. * _.isObject(null);
  78187. * // => false
  78188. */
  78189. function isObject(value) {
  78190. var type = typeof value;
  78191. return value != null && (type == 'object' || type == 'function');
  78192. }
  78193. /**
  78194. * Checks if `value` is object-like. A value is object-like if it's not `null`
  78195. * and has a `typeof` result of "object".
  78196. *
  78197. * @static
  78198. * @memberOf _
  78199. * @since 4.0.0
  78200. * @category Lang
  78201. * @param {*} value The value to check.
  78202. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  78203. * @example
  78204. *
  78205. * _.isObjectLike({});
  78206. * // => true
  78207. *
  78208. * _.isObjectLike([1, 2, 3]);
  78209. * // => true
  78210. *
  78211. * _.isObjectLike(_.noop);
  78212. * // => false
  78213. *
  78214. * _.isObjectLike(null);
  78215. * // => false
  78216. */
  78217. function isObjectLike(value) {
  78218. return value != null && typeof value == 'object';
  78219. }
  78220. /**
  78221. * Checks if `value` is classified as a `Map` object.
  78222. *
  78223. * @static
  78224. * @memberOf _
  78225. * @since 4.3.0
  78226. * @category Lang
  78227. * @param {*} value The value to check.
  78228. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  78229. * @example
  78230. *
  78231. * _.isMap(new Map);
  78232. * // => true
  78233. *
  78234. * _.isMap(new WeakMap);
  78235. * // => false
  78236. */
  78237. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  78238. /**
  78239. * Performs a partial deep comparison between `object` and `source` to
  78240. * determine if `object` contains equivalent property values.
  78241. *
  78242. * **Note:** This method is equivalent to `_.matches` when `source` is
  78243. * partially applied.
  78244. *
  78245. * Partial comparisons will match empty array and empty object `source`
  78246. * values against any array or object value, respectively. See `_.isEqual`
  78247. * for a list of supported value comparisons.
  78248. *
  78249. * @static
  78250. * @memberOf _
  78251. * @since 3.0.0
  78252. * @category Lang
  78253. * @param {Object} object The object to inspect.
  78254. * @param {Object} source The object of property values to match.
  78255. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  78256. * @example
  78257. *
  78258. * var object = { 'a': 1, 'b': 2 };
  78259. *
  78260. * _.isMatch(object, { 'b': 2 });
  78261. * // => true
  78262. *
  78263. * _.isMatch(object, { 'b': 1 });
  78264. * // => false
  78265. */
  78266. function isMatch(object, source) {
  78267. return object === source || baseIsMatch(object, source, getMatchData(source));
  78268. }
  78269. /**
  78270. * This method is like `_.isMatch` except that it accepts `customizer` which
  78271. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  78272. * are handled by the method instead. The `customizer` is invoked with five
  78273. * arguments: (objValue, srcValue, index|key, object, source).
  78274. *
  78275. * @static
  78276. * @memberOf _
  78277. * @since 4.0.0
  78278. * @category Lang
  78279. * @param {Object} object The object to inspect.
  78280. * @param {Object} source The object of property values to match.
  78281. * @param {Function} [customizer] The function to customize comparisons.
  78282. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  78283. * @example
  78284. *
  78285. * function isGreeting(value) {
  78286. * return /^h(?:i|ello)$/.test(value);
  78287. * }
  78288. *
  78289. * function customizer(objValue, srcValue) {
  78290. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  78291. * return true;
  78292. * }
  78293. * }
  78294. *
  78295. * var object = { 'greeting': 'hello' };
  78296. * var source = { 'greeting': 'hi' };
  78297. *
  78298. * _.isMatchWith(object, source, customizer);
  78299. * // => true
  78300. */
  78301. function isMatchWith(object, source, customizer) {
  78302. customizer = typeof customizer == 'function' ? customizer : undefined;
  78303. return baseIsMatch(object, source, getMatchData(source), customizer);
  78304. }
  78305. /**
  78306. * Checks if `value` is `NaN`.
  78307. *
  78308. * **Note:** This method is based on
  78309. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  78310. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  78311. * `undefined` and other non-number values.
  78312. *
  78313. * @static
  78314. * @memberOf _
  78315. * @since 0.1.0
  78316. * @category Lang
  78317. * @param {*} value The value to check.
  78318. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  78319. * @example
  78320. *
  78321. * _.isNaN(NaN);
  78322. * // => true
  78323. *
  78324. * _.isNaN(new Number(NaN));
  78325. * // => true
  78326. *
  78327. * isNaN(undefined);
  78328. * // => true
  78329. *
  78330. * _.isNaN(undefined);
  78331. * // => false
  78332. */
  78333. function isNaN(value) {
  78334. // An `NaN` primitive is the only value that is not equal to itself.
  78335. // Perform the `toStringTag` check first to avoid errors with some
  78336. // ActiveX objects in IE.
  78337. return isNumber(value) && value != +value;
  78338. }
  78339. /**
  78340. * Checks if `value` is a pristine native function.
  78341. *
  78342. * **Note:** This method can't reliably detect native functions in the presence
  78343. * of the core-js package because core-js circumvents this kind of detection.
  78344. * Despite multiple requests, the core-js maintainer has made it clear: any
  78345. * attempt to fix the detection will be obstructed. As a result, we're left
  78346. * with little choice but to throw an error. Unfortunately, this also affects
  78347. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  78348. * which rely on core-js.
  78349. *
  78350. * @static
  78351. * @memberOf _
  78352. * @since 3.0.0
  78353. * @category Lang
  78354. * @param {*} value The value to check.
  78355. * @returns {boolean} Returns `true` if `value` is a native function,
  78356. * else `false`.
  78357. * @example
  78358. *
  78359. * _.isNative(Array.prototype.push);
  78360. * // => true
  78361. *
  78362. * _.isNative(_);
  78363. * // => false
  78364. */
  78365. function isNative(value) {
  78366. if (isMaskable(value)) {
  78367. throw new Error(CORE_ERROR_TEXT);
  78368. }
  78369. return baseIsNative(value);
  78370. }
  78371. /**
  78372. * Checks if `value` is `null`.
  78373. *
  78374. * @static
  78375. * @memberOf _
  78376. * @since 0.1.0
  78377. * @category Lang
  78378. * @param {*} value The value to check.
  78379. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  78380. * @example
  78381. *
  78382. * _.isNull(null);
  78383. * // => true
  78384. *
  78385. * _.isNull(void 0);
  78386. * // => false
  78387. */
  78388. function isNull(value) {
  78389. return value === null;
  78390. }
  78391. /**
  78392. * Checks if `value` is `null` or `undefined`.
  78393. *
  78394. * @static
  78395. * @memberOf _
  78396. * @since 4.0.0
  78397. * @category Lang
  78398. * @param {*} value The value to check.
  78399. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  78400. * @example
  78401. *
  78402. * _.isNil(null);
  78403. * // => true
  78404. *
  78405. * _.isNil(void 0);
  78406. * // => true
  78407. *
  78408. * _.isNil(NaN);
  78409. * // => false
  78410. */
  78411. function isNil(value) {
  78412. return value == null;
  78413. }
  78414. /**
  78415. * Checks if `value` is classified as a `Number` primitive or object.
  78416. *
  78417. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  78418. * classified as numbers, use the `_.isFinite` method.
  78419. *
  78420. * @static
  78421. * @memberOf _
  78422. * @since 0.1.0
  78423. * @category Lang
  78424. * @param {*} value The value to check.
  78425. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  78426. * @example
  78427. *
  78428. * _.isNumber(3);
  78429. * // => true
  78430. *
  78431. * _.isNumber(Number.MIN_VALUE);
  78432. * // => true
  78433. *
  78434. * _.isNumber(Infinity);
  78435. * // => true
  78436. *
  78437. * _.isNumber('3');
  78438. * // => false
  78439. */
  78440. function isNumber(value) {
  78441. return typeof value == 'number' ||
  78442. (isObjectLike(value) && baseGetTag(value) == numberTag);
  78443. }
  78444. /**
  78445. * Checks if `value` is a plain object, that is, an object created by the
  78446. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  78447. *
  78448. * @static
  78449. * @memberOf _
  78450. * @since 0.8.0
  78451. * @category Lang
  78452. * @param {*} value The value to check.
  78453. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  78454. * @example
  78455. *
  78456. * function Foo() {
  78457. * this.a = 1;
  78458. * }
  78459. *
  78460. * _.isPlainObject(new Foo);
  78461. * // => false
  78462. *
  78463. * _.isPlainObject([1, 2, 3]);
  78464. * // => false
  78465. *
  78466. * _.isPlainObject({ 'x': 0, 'y': 0 });
  78467. * // => true
  78468. *
  78469. * _.isPlainObject(Object.create(null));
  78470. * // => true
  78471. */
  78472. function isPlainObject(value) {
  78473. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  78474. return false;
  78475. }
  78476. var proto = getPrototype(value);
  78477. if (proto === null) {
  78478. return true;
  78479. }
  78480. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  78481. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  78482. funcToString.call(Ctor) == objectCtorString;
  78483. }
  78484. /**
  78485. * Checks if `value` is classified as a `RegExp` object.
  78486. *
  78487. * @static
  78488. * @memberOf _
  78489. * @since 0.1.0
  78490. * @category Lang
  78491. * @param {*} value The value to check.
  78492. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  78493. * @example
  78494. *
  78495. * _.isRegExp(/abc/);
  78496. * // => true
  78497. *
  78498. * _.isRegExp('/abc/');
  78499. * // => false
  78500. */
  78501. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  78502. /**
  78503. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  78504. * double precision number which isn't the result of a rounded unsafe integer.
  78505. *
  78506. * **Note:** This method is based on
  78507. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  78508. *
  78509. * @static
  78510. * @memberOf _
  78511. * @since 4.0.0
  78512. * @category Lang
  78513. * @param {*} value The value to check.
  78514. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  78515. * @example
  78516. *
  78517. * _.isSafeInteger(3);
  78518. * // => true
  78519. *
  78520. * _.isSafeInteger(Number.MIN_VALUE);
  78521. * // => false
  78522. *
  78523. * _.isSafeInteger(Infinity);
  78524. * // => false
  78525. *
  78526. * _.isSafeInteger('3');
  78527. * // => false
  78528. */
  78529. function isSafeInteger(value) {
  78530. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  78531. }
  78532. /**
  78533. * Checks if `value` is classified as a `Set` object.
  78534. *
  78535. * @static
  78536. * @memberOf _
  78537. * @since 4.3.0
  78538. * @category Lang
  78539. * @param {*} value The value to check.
  78540. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  78541. * @example
  78542. *
  78543. * _.isSet(new Set);
  78544. * // => true
  78545. *
  78546. * _.isSet(new WeakSet);
  78547. * // => false
  78548. */
  78549. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  78550. /**
  78551. * Checks if `value` is classified as a `String` primitive or object.
  78552. *
  78553. * @static
  78554. * @since 0.1.0
  78555. * @memberOf _
  78556. * @category Lang
  78557. * @param {*} value The value to check.
  78558. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  78559. * @example
  78560. *
  78561. * _.isString('abc');
  78562. * // => true
  78563. *
  78564. * _.isString(1);
  78565. * // => false
  78566. */
  78567. function isString(value) {
  78568. return typeof value == 'string' ||
  78569. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  78570. }
  78571. /**
  78572. * Checks if `value` is classified as a `Symbol` primitive or object.
  78573. *
  78574. * @static
  78575. * @memberOf _
  78576. * @since 4.0.0
  78577. * @category Lang
  78578. * @param {*} value The value to check.
  78579. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  78580. * @example
  78581. *
  78582. * _.isSymbol(Symbol.iterator);
  78583. * // => true
  78584. *
  78585. * _.isSymbol('abc');
  78586. * // => false
  78587. */
  78588. function isSymbol(value) {
  78589. return typeof value == 'symbol' ||
  78590. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  78591. }
  78592. /**
  78593. * Checks if `value` is classified as a typed array.
  78594. *
  78595. * @static
  78596. * @memberOf _
  78597. * @since 3.0.0
  78598. * @category Lang
  78599. * @param {*} value The value to check.
  78600. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  78601. * @example
  78602. *
  78603. * _.isTypedArray(new Uint8Array);
  78604. * // => true
  78605. *
  78606. * _.isTypedArray([]);
  78607. * // => false
  78608. */
  78609. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  78610. /**
  78611. * Checks if `value` is `undefined`.
  78612. *
  78613. * @static
  78614. * @since 0.1.0
  78615. * @memberOf _
  78616. * @category Lang
  78617. * @param {*} value The value to check.
  78618. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  78619. * @example
  78620. *
  78621. * _.isUndefined(void 0);
  78622. * // => true
  78623. *
  78624. * _.isUndefined(null);
  78625. * // => false
  78626. */
  78627. function isUndefined(value) {
  78628. return value === undefined;
  78629. }
  78630. /**
  78631. * Checks if `value` is classified as a `WeakMap` object.
  78632. *
  78633. * @static
  78634. * @memberOf _
  78635. * @since 4.3.0
  78636. * @category Lang
  78637. * @param {*} value The value to check.
  78638. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  78639. * @example
  78640. *
  78641. * _.isWeakMap(new WeakMap);
  78642. * // => true
  78643. *
  78644. * _.isWeakMap(new Map);
  78645. * // => false
  78646. */
  78647. function isWeakMap(value) {
  78648. return isObjectLike(value) && getTag(value) == weakMapTag;
  78649. }
  78650. /**
  78651. * Checks if `value` is classified as a `WeakSet` object.
  78652. *
  78653. * @static
  78654. * @memberOf _
  78655. * @since 4.3.0
  78656. * @category Lang
  78657. * @param {*} value The value to check.
  78658. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  78659. * @example
  78660. *
  78661. * _.isWeakSet(new WeakSet);
  78662. * // => true
  78663. *
  78664. * _.isWeakSet(new Set);
  78665. * // => false
  78666. */
  78667. function isWeakSet(value) {
  78668. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  78669. }
  78670. /**
  78671. * Checks if `value` is less than `other`.
  78672. *
  78673. * @static
  78674. * @memberOf _
  78675. * @since 3.9.0
  78676. * @category Lang
  78677. * @param {*} value The value to compare.
  78678. * @param {*} other The other value to compare.
  78679. * @returns {boolean} Returns `true` if `value` is less than `other`,
  78680. * else `false`.
  78681. * @see _.gt
  78682. * @example
  78683. *
  78684. * _.lt(1, 3);
  78685. * // => true
  78686. *
  78687. * _.lt(3, 3);
  78688. * // => false
  78689. *
  78690. * _.lt(3, 1);
  78691. * // => false
  78692. */
  78693. var lt = createRelationalOperation(baseLt);
  78694. /**
  78695. * Checks if `value` is less than or equal to `other`.
  78696. *
  78697. * @static
  78698. * @memberOf _
  78699. * @since 3.9.0
  78700. * @category Lang
  78701. * @param {*} value The value to compare.
  78702. * @param {*} other The other value to compare.
  78703. * @returns {boolean} Returns `true` if `value` is less than or equal to
  78704. * `other`, else `false`.
  78705. * @see _.gte
  78706. * @example
  78707. *
  78708. * _.lte(1, 3);
  78709. * // => true
  78710. *
  78711. * _.lte(3, 3);
  78712. * // => true
  78713. *
  78714. * _.lte(3, 1);
  78715. * // => false
  78716. */
  78717. var lte = createRelationalOperation(function(value, other) {
  78718. return value <= other;
  78719. });
  78720. /**
  78721. * Converts `value` to an array.
  78722. *
  78723. * @static
  78724. * @since 0.1.0
  78725. * @memberOf _
  78726. * @category Lang
  78727. * @param {*} value The value to convert.
  78728. * @returns {Array} Returns the converted array.
  78729. * @example
  78730. *
  78731. * _.toArray({ 'a': 1, 'b': 2 });
  78732. * // => [1, 2]
  78733. *
  78734. * _.toArray('abc');
  78735. * // => ['a', 'b', 'c']
  78736. *
  78737. * _.toArray(1);
  78738. * // => []
  78739. *
  78740. * _.toArray(null);
  78741. * // => []
  78742. */
  78743. function toArray(value) {
  78744. if (!value) {
  78745. return [];
  78746. }
  78747. if (isArrayLike(value)) {
  78748. return isString(value) ? stringToArray(value) : copyArray(value);
  78749. }
  78750. if (symIterator && value[symIterator]) {
  78751. return iteratorToArray(value[symIterator]());
  78752. }
  78753. var tag = getTag(value),
  78754. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  78755. return func(value);
  78756. }
  78757. /**
  78758. * Converts `value` to a finite number.
  78759. *
  78760. * @static
  78761. * @memberOf _
  78762. * @since 4.12.0
  78763. * @category Lang
  78764. * @param {*} value The value to convert.
  78765. * @returns {number} Returns the converted number.
  78766. * @example
  78767. *
  78768. * _.toFinite(3.2);
  78769. * // => 3.2
  78770. *
  78771. * _.toFinite(Number.MIN_VALUE);
  78772. * // => 5e-324
  78773. *
  78774. * _.toFinite(Infinity);
  78775. * // => 1.7976931348623157e+308
  78776. *
  78777. * _.toFinite('3.2');
  78778. * // => 3.2
  78779. */
  78780. function toFinite(value) {
  78781. if (!value) {
  78782. return value === 0 ? value : 0;
  78783. }
  78784. value = toNumber(value);
  78785. if (value === INFINITY || value === -INFINITY) {
  78786. var sign = (value < 0 ? -1 : 1);
  78787. return sign * MAX_INTEGER;
  78788. }
  78789. return value === value ? value : 0;
  78790. }
  78791. /**
  78792. * Converts `value` to an integer.
  78793. *
  78794. * **Note:** This method is loosely based on
  78795. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  78796. *
  78797. * @static
  78798. * @memberOf _
  78799. * @since 4.0.0
  78800. * @category Lang
  78801. * @param {*} value The value to convert.
  78802. * @returns {number} Returns the converted integer.
  78803. * @example
  78804. *
  78805. * _.toInteger(3.2);
  78806. * // => 3
  78807. *
  78808. * _.toInteger(Number.MIN_VALUE);
  78809. * // => 0
  78810. *
  78811. * _.toInteger(Infinity);
  78812. * // => 1.7976931348623157e+308
  78813. *
  78814. * _.toInteger('3.2');
  78815. * // => 3
  78816. */
  78817. function toInteger(value) {
  78818. var result = toFinite(value),
  78819. remainder = result % 1;
  78820. return result === result ? (remainder ? result - remainder : result) : 0;
  78821. }
  78822. /**
  78823. * Converts `value` to an integer suitable for use as the length of an
  78824. * array-like object.
  78825. *
  78826. * **Note:** This method is based on
  78827. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  78828. *
  78829. * @static
  78830. * @memberOf _
  78831. * @since 4.0.0
  78832. * @category Lang
  78833. * @param {*} value The value to convert.
  78834. * @returns {number} Returns the converted integer.
  78835. * @example
  78836. *
  78837. * _.toLength(3.2);
  78838. * // => 3
  78839. *
  78840. * _.toLength(Number.MIN_VALUE);
  78841. * // => 0
  78842. *
  78843. * _.toLength(Infinity);
  78844. * // => 4294967295
  78845. *
  78846. * _.toLength('3.2');
  78847. * // => 3
  78848. */
  78849. function toLength(value) {
  78850. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  78851. }
  78852. /**
  78853. * Converts `value` to a number.
  78854. *
  78855. * @static
  78856. * @memberOf _
  78857. * @since 4.0.0
  78858. * @category Lang
  78859. * @param {*} value The value to process.
  78860. * @returns {number} Returns the number.
  78861. * @example
  78862. *
  78863. * _.toNumber(3.2);
  78864. * // => 3.2
  78865. *
  78866. * _.toNumber(Number.MIN_VALUE);
  78867. * // => 5e-324
  78868. *
  78869. * _.toNumber(Infinity);
  78870. * // => Infinity
  78871. *
  78872. * _.toNumber('3.2');
  78873. * // => 3.2
  78874. */
  78875. function toNumber(value) {
  78876. if (typeof value == 'number') {
  78877. return value;
  78878. }
  78879. if (isSymbol(value)) {
  78880. return NAN;
  78881. }
  78882. if (isObject(value)) {
  78883. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  78884. value = isObject(other) ? (other + '') : other;
  78885. }
  78886. if (typeof value != 'string') {
  78887. return value === 0 ? value : +value;
  78888. }
  78889. value = baseTrim(value);
  78890. var isBinary = reIsBinary.test(value);
  78891. return (isBinary || reIsOctal.test(value))
  78892. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  78893. : (reIsBadHex.test(value) ? NAN : +value);
  78894. }
  78895. /**
  78896. * Converts `value` to a plain object flattening inherited enumerable string
  78897. * keyed properties of `value` to own properties of the plain object.
  78898. *
  78899. * @static
  78900. * @memberOf _
  78901. * @since 3.0.0
  78902. * @category Lang
  78903. * @param {*} value The value to convert.
  78904. * @returns {Object} Returns the converted plain object.
  78905. * @example
  78906. *
  78907. * function Foo() {
  78908. * this.b = 2;
  78909. * }
  78910. *
  78911. * Foo.prototype.c = 3;
  78912. *
  78913. * _.assign({ 'a': 1 }, new Foo);
  78914. * // => { 'a': 1, 'b': 2 }
  78915. *
  78916. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  78917. * // => { 'a': 1, 'b': 2, 'c': 3 }
  78918. */
  78919. function toPlainObject(value) {
  78920. return copyObject(value, keysIn(value));
  78921. }
  78922. /**
  78923. * Converts `value` to a safe integer. A safe integer can be compared and
  78924. * represented correctly.
  78925. *
  78926. * @static
  78927. * @memberOf _
  78928. * @since 4.0.0
  78929. * @category Lang
  78930. * @param {*} value The value to convert.
  78931. * @returns {number} Returns the converted integer.
  78932. * @example
  78933. *
  78934. * _.toSafeInteger(3.2);
  78935. * // => 3
  78936. *
  78937. * _.toSafeInteger(Number.MIN_VALUE);
  78938. * // => 0
  78939. *
  78940. * _.toSafeInteger(Infinity);
  78941. * // => 9007199254740991
  78942. *
  78943. * _.toSafeInteger('3.2');
  78944. * // => 3
  78945. */
  78946. function toSafeInteger(value) {
  78947. return value
  78948. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  78949. : (value === 0 ? value : 0);
  78950. }
  78951. /**
  78952. * Converts `value` to a string. An empty string is returned for `null`
  78953. * and `undefined` values. The sign of `-0` is preserved.
  78954. *
  78955. * @static
  78956. * @memberOf _
  78957. * @since 4.0.0
  78958. * @category Lang
  78959. * @param {*} value The value to convert.
  78960. * @returns {string} Returns the converted string.
  78961. * @example
  78962. *
  78963. * _.toString(null);
  78964. * // => ''
  78965. *
  78966. * _.toString(-0);
  78967. * // => '-0'
  78968. *
  78969. * _.toString([1, 2, 3]);
  78970. * // => '1,2,3'
  78971. */
  78972. function toString(value) {
  78973. return value == null ? '' : baseToString(value);
  78974. }
  78975. /*------------------------------------------------------------------------*/
  78976. /**
  78977. * Assigns own enumerable string keyed properties of source objects to the
  78978. * destination object. Source objects are applied from left to right.
  78979. * Subsequent sources overwrite property assignments of previous sources.
  78980. *
  78981. * **Note:** This method mutates `object` and is loosely based on
  78982. * [`Object.assign`](https://mdn.io/Object/assign).
  78983. *
  78984. * @static
  78985. * @memberOf _
  78986. * @since 0.10.0
  78987. * @category Object
  78988. * @param {Object} object The destination object.
  78989. * @param {...Object} [sources] The source objects.
  78990. * @returns {Object} Returns `object`.
  78991. * @see _.assignIn
  78992. * @example
  78993. *
  78994. * function Foo() {
  78995. * this.a = 1;
  78996. * }
  78997. *
  78998. * function Bar() {
  78999. * this.c = 3;
  79000. * }
  79001. *
  79002. * Foo.prototype.b = 2;
  79003. * Bar.prototype.d = 4;
  79004. *
  79005. * _.assign({ 'a': 0 }, new Foo, new Bar);
  79006. * // => { 'a': 1, 'c': 3 }
  79007. */
  79008. var assign = createAssigner(function(object, source) {
  79009. if (isPrototype(source) || isArrayLike(source)) {
  79010. copyObject(source, keys(source), object);
  79011. return;
  79012. }
  79013. for (var key in source) {
  79014. if (hasOwnProperty.call(source, key)) {
  79015. assignValue(object, key, source[key]);
  79016. }
  79017. }
  79018. });
  79019. /**
  79020. * This method is like `_.assign` except that it iterates over own and
  79021. * inherited source properties.
  79022. *
  79023. * **Note:** This method mutates `object`.
  79024. *
  79025. * @static
  79026. * @memberOf _
  79027. * @since 4.0.0
  79028. * @alias extend
  79029. * @category Object
  79030. * @param {Object} object The destination object.
  79031. * @param {...Object} [sources] The source objects.
  79032. * @returns {Object} Returns `object`.
  79033. * @see _.assign
  79034. * @example
  79035. *
  79036. * function Foo() {
  79037. * this.a = 1;
  79038. * }
  79039. *
  79040. * function Bar() {
  79041. * this.c = 3;
  79042. * }
  79043. *
  79044. * Foo.prototype.b = 2;
  79045. * Bar.prototype.d = 4;
  79046. *
  79047. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  79048. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  79049. */
  79050. var assignIn = createAssigner(function(object, source) {
  79051. copyObject(source, keysIn(source), object);
  79052. });
  79053. /**
  79054. * This method is like `_.assignIn` except that it accepts `customizer`
  79055. * which is invoked to produce the assigned values. If `customizer` returns
  79056. * `undefined`, assignment is handled by the method instead. The `customizer`
  79057. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  79058. *
  79059. * **Note:** This method mutates `object`.
  79060. *
  79061. * @static
  79062. * @memberOf _
  79063. * @since 4.0.0
  79064. * @alias extendWith
  79065. * @category Object
  79066. * @param {Object} object The destination object.
  79067. * @param {...Object} sources The source objects.
  79068. * @param {Function} [customizer] The function to customize assigned values.
  79069. * @returns {Object} Returns `object`.
  79070. * @see _.assignWith
  79071. * @example
  79072. *
  79073. * function customizer(objValue, srcValue) {
  79074. * return _.isUndefined(objValue) ? srcValue : objValue;
  79075. * }
  79076. *
  79077. * var defaults = _.partialRight(_.assignInWith, customizer);
  79078. *
  79079. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  79080. * // => { 'a': 1, 'b': 2 }
  79081. */
  79082. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  79083. copyObject(source, keysIn(source), object, customizer);
  79084. });
  79085. /**
  79086. * This method is like `_.assign` except that it accepts `customizer`
  79087. * which is invoked to produce the assigned values. If `customizer` returns
  79088. * `undefined`, assignment is handled by the method instead. The `customizer`
  79089. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  79090. *
  79091. * **Note:** This method mutates `object`.
  79092. *
  79093. * @static
  79094. * @memberOf _
  79095. * @since 4.0.0
  79096. * @category Object
  79097. * @param {Object} object The destination object.
  79098. * @param {...Object} sources The source objects.
  79099. * @param {Function} [customizer] The function to customize assigned values.
  79100. * @returns {Object} Returns `object`.
  79101. * @see _.assignInWith
  79102. * @example
  79103. *
  79104. * function customizer(objValue, srcValue) {
  79105. * return _.isUndefined(objValue) ? srcValue : objValue;
  79106. * }
  79107. *
  79108. * var defaults = _.partialRight(_.assignWith, customizer);
  79109. *
  79110. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  79111. * // => { 'a': 1, 'b': 2 }
  79112. */
  79113. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  79114. copyObject(source, keys(source), object, customizer);
  79115. });
  79116. /**
  79117. * Creates an array of values corresponding to `paths` of `object`.
  79118. *
  79119. * @static
  79120. * @memberOf _
  79121. * @since 1.0.0
  79122. * @category Object
  79123. * @param {Object} object The object to iterate over.
  79124. * @param {...(string|string[])} [paths] The property paths to pick.
  79125. * @returns {Array} Returns the picked values.
  79126. * @example
  79127. *
  79128. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  79129. *
  79130. * _.at(object, ['a[0].b.c', 'a[1]']);
  79131. * // => [3, 4]
  79132. */
  79133. var at = flatRest(baseAt);
  79134. /**
  79135. * Creates an object that inherits from the `prototype` object. If a
  79136. * `properties` object is given, its own enumerable string keyed properties
  79137. * are assigned to the created object.
  79138. *
  79139. * @static
  79140. * @memberOf _
  79141. * @since 2.3.0
  79142. * @category Object
  79143. * @param {Object} prototype The object to inherit from.
  79144. * @param {Object} [properties] The properties to assign to the object.
  79145. * @returns {Object} Returns the new object.
  79146. * @example
  79147. *
  79148. * function Shape() {
  79149. * this.x = 0;
  79150. * this.y = 0;
  79151. * }
  79152. *
  79153. * function Circle() {
  79154. * Shape.call(this);
  79155. * }
  79156. *
  79157. * Circle.prototype = _.create(Shape.prototype, {
  79158. * 'constructor': Circle
  79159. * });
  79160. *
  79161. * var circle = new Circle;
  79162. * circle instanceof Circle;
  79163. * // => true
  79164. *
  79165. * circle instanceof Shape;
  79166. * // => true
  79167. */
  79168. function create(prototype, properties) {
  79169. var result = baseCreate(prototype);
  79170. return properties == null ? result : baseAssign(result, properties);
  79171. }
  79172. /**
  79173. * Assigns own and inherited enumerable string keyed properties of source
  79174. * objects to the destination object for all destination properties that
  79175. * resolve to `undefined`. Source objects are applied from left to right.
  79176. * Once a property is set, additional values of the same property are ignored.
  79177. *
  79178. * **Note:** This method mutates `object`.
  79179. *
  79180. * @static
  79181. * @since 0.1.0
  79182. * @memberOf _
  79183. * @category Object
  79184. * @param {Object} object The destination object.
  79185. * @param {...Object} [sources] The source objects.
  79186. * @returns {Object} Returns `object`.
  79187. * @see _.defaultsDeep
  79188. * @example
  79189. *
  79190. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  79191. * // => { 'a': 1, 'b': 2 }
  79192. */
  79193. var defaults = baseRest(function(object, sources) {
  79194. object = Object(object);
  79195. var index = -1;
  79196. var length = sources.length;
  79197. var guard = length > 2 ? sources[2] : undefined;
  79198. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  79199. length = 1;
  79200. }
  79201. while (++index < length) {
  79202. var source = sources[index];
  79203. var props = keysIn(source);
  79204. var propsIndex = -1;
  79205. var propsLength = props.length;
  79206. while (++propsIndex < propsLength) {
  79207. var key = props[propsIndex];
  79208. var value = object[key];
  79209. if (value === undefined ||
  79210. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  79211. object[key] = source[key];
  79212. }
  79213. }
  79214. }
  79215. return object;
  79216. });
  79217. /**
  79218. * This method is like `_.defaults` except that it recursively assigns
  79219. * default properties.
  79220. *
  79221. * **Note:** This method mutates `object`.
  79222. *
  79223. * @static
  79224. * @memberOf _
  79225. * @since 3.10.0
  79226. * @category Object
  79227. * @param {Object} object The destination object.
  79228. * @param {...Object} [sources] The source objects.
  79229. * @returns {Object} Returns `object`.
  79230. * @see _.defaults
  79231. * @example
  79232. *
  79233. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  79234. * // => { 'a': { 'b': 2, 'c': 3 } }
  79235. */
  79236. var defaultsDeep = baseRest(function(args) {
  79237. args.push(undefined, customDefaultsMerge);
  79238. return apply(mergeWith, undefined, args);
  79239. });
  79240. /**
  79241. * This method is like `_.find` except that it returns the key of the first
  79242. * element `predicate` returns truthy for instead of the element itself.
  79243. *
  79244. * @static
  79245. * @memberOf _
  79246. * @since 1.1.0
  79247. * @category Object
  79248. * @param {Object} object The object to inspect.
  79249. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  79250. * @returns {string|undefined} Returns the key of the matched element,
  79251. * else `undefined`.
  79252. * @example
  79253. *
  79254. * var users = {
  79255. * 'barney': { 'age': 36, 'active': true },
  79256. * 'fred': { 'age': 40, 'active': false },
  79257. * 'pebbles': { 'age': 1, 'active': true }
  79258. * };
  79259. *
  79260. * _.findKey(users, function(o) { return o.age < 40; });
  79261. * // => 'barney' (iteration order is not guaranteed)
  79262. *
  79263. * // The `_.matches` iteratee shorthand.
  79264. * _.findKey(users, { 'age': 1, 'active': true });
  79265. * // => 'pebbles'
  79266. *
  79267. * // The `_.matchesProperty` iteratee shorthand.
  79268. * _.findKey(users, ['active', false]);
  79269. * // => 'fred'
  79270. *
  79271. * // The `_.property` iteratee shorthand.
  79272. * _.findKey(users, 'active');
  79273. * // => 'barney'
  79274. */
  79275. function findKey(object, predicate) {
  79276. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  79277. }
  79278. /**
  79279. * This method is like `_.findKey` except that it iterates over elements of
  79280. * a collection in the opposite order.
  79281. *
  79282. * @static
  79283. * @memberOf _
  79284. * @since 2.0.0
  79285. * @category Object
  79286. * @param {Object} object The object to inspect.
  79287. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  79288. * @returns {string|undefined} Returns the key of the matched element,
  79289. * else `undefined`.
  79290. * @example
  79291. *
  79292. * var users = {
  79293. * 'barney': { 'age': 36, 'active': true },
  79294. * 'fred': { 'age': 40, 'active': false },
  79295. * 'pebbles': { 'age': 1, 'active': true }
  79296. * };
  79297. *
  79298. * _.findLastKey(users, function(o) { return o.age < 40; });
  79299. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  79300. *
  79301. * // The `_.matches` iteratee shorthand.
  79302. * _.findLastKey(users, { 'age': 36, 'active': true });
  79303. * // => 'barney'
  79304. *
  79305. * // The `_.matchesProperty` iteratee shorthand.
  79306. * _.findLastKey(users, ['active', false]);
  79307. * // => 'fred'
  79308. *
  79309. * // The `_.property` iteratee shorthand.
  79310. * _.findLastKey(users, 'active');
  79311. * // => 'pebbles'
  79312. */
  79313. function findLastKey(object, predicate) {
  79314. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  79315. }
  79316. /**
  79317. * Iterates over own and inherited enumerable string keyed properties of an
  79318. * object and invokes `iteratee` for each property. The iteratee is invoked
  79319. * with three arguments: (value, key, object). Iteratee functions may exit
  79320. * iteration early by explicitly returning `false`.
  79321. *
  79322. * @static
  79323. * @memberOf _
  79324. * @since 0.3.0
  79325. * @category Object
  79326. * @param {Object} object The object to iterate over.
  79327. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  79328. * @returns {Object} Returns `object`.
  79329. * @see _.forInRight
  79330. * @example
  79331. *
  79332. * function Foo() {
  79333. * this.a = 1;
  79334. * this.b = 2;
  79335. * }
  79336. *
  79337. * Foo.prototype.c = 3;
  79338. *
  79339. * _.forIn(new Foo, function(value, key) {
  79340. * console.log(key);
  79341. * });
  79342. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  79343. */
  79344. function forIn(object, iteratee) {
  79345. return object == null
  79346. ? object
  79347. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  79348. }
  79349. /**
  79350. * This method is like `_.forIn` except that it iterates over properties of
  79351. * `object` in the opposite order.
  79352. *
  79353. * @static
  79354. * @memberOf _
  79355. * @since 2.0.0
  79356. * @category Object
  79357. * @param {Object} object The object to iterate over.
  79358. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  79359. * @returns {Object} Returns `object`.
  79360. * @see _.forIn
  79361. * @example
  79362. *
  79363. * function Foo() {
  79364. * this.a = 1;
  79365. * this.b = 2;
  79366. * }
  79367. *
  79368. * Foo.prototype.c = 3;
  79369. *
  79370. * _.forInRight(new Foo, function(value, key) {
  79371. * console.log(key);
  79372. * });
  79373. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  79374. */
  79375. function forInRight(object, iteratee) {
  79376. return object == null
  79377. ? object
  79378. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  79379. }
  79380. /**
  79381. * Iterates over own enumerable string keyed properties of an object and
  79382. * invokes `iteratee` for each property. The iteratee is invoked with three
  79383. * arguments: (value, key, object). Iteratee functions may exit iteration
  79384. * early by explicitly returning `false`.
  79385. *
  79386. * @static
  79387. * @memberOf _
  79388. * @since 0.3.0
  79389. * @category Object
  79390. * @param {Object} object The object to iterate over.
  79391. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  79392. * @returns {Object} Returns `object`.
  79393. * @see _.forOwnRight
  79394. * @example
  79395. *
  79396. * function Foo() {
  79397. * this.a = 1;
  79398. * this.b = 2;
  79399. * }
  79400. *
  79401. * Foo.prototype.c = 3;
  79402. *
  79403. * _.forOwn(new Foo, function(value, key) {
  79404. * console.log(key);
  79405. * });
  79406. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  79407. */
  79408. function forOwn(object, iteratee) {
  79409. return object && baseForOwn(object, getIteratee(iteratee, 3));
  79410. }
  79411. /**
  79412. * This method is like `_.forOwn` except that it iterates over properties of
  79413. * `object` in the opposite order.
  79414. *
  79415. * @static
  79416. * @memberOf _
  79417. * @since 2.0.0
  79418. * @category Object
  79419. * @param {Object} object The object to iterate over.
  79420. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  79421. * @returns {Object} Returns `object`.
  79422. * @see _.forOwn
  79423. * @example
  79424. *
  79425. * function Foo() {
  79426. * this.a = 1;
  79427. * this.b = 2;
  79428. * }
  79429. *
  79430. * Foo.prototype.c = 3;
  79431. *
  79432. * _.forOwnRight(new Foo, function(value, key) {
  79433. * console.log(key);
  79434. * });
  79435. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  79436. */
  79437. function forOwnRight(object, iteratee) {
  79438. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  79439. }
  79440. /**
  79441. * Creates an array of function property names from own enumerable properties
  79442. * of `object`.
  79443. *
  79444. * @static
  79445. * @since 0.1.0
  79446. * @memberOf _
  79447. * @category Object
  79448. * @param {Object} object The object to inspect.
  79449. * @returns {Array} Returns the function names.
  79450. * @see _.functionsIn
  79451. * @example
  79452. *
  79453. * function Foo() {
  79454. * this.a = _.constant('a');
  79455. * this.b = _.constant('b');
  79456. * }
  79457. *
  79458. * Foo.prototype.c = _.constant('c');
  79459. *
  79460. * _.functions(new Foo);
  79461. * // => ['a', 'b']
  79462. */
  79463. function functions(object) {
  79464. return object == null ? [] : baseFunctions(object, keys(object));
  79465. }
  79466. /**
  79467. * Creates an array of function property names from own and inherited
  79468. * enumerable properties of `object`.
  79469. *
  79470. * @static
  79471. * @memberOf _
  79472. * @since 4.0.0
  79473. * @category Object
  79474. * @param {Object} object The object to inspect.
  79475. * @returns {Array} Returns the function names.
  79476. * @see _.functions
  79477. * @example
  79478. *
  79479. * function Foo() {
  79480. * this.a = _.constant('a');
  79481. * this.b = _.constant('b');
  79482. * }
  79483. *
  79484. * Foo.prototype.c = _.constant('c');
  79485. *
  79486. * _.functionsIn(new Foo);
  79487. * // => ['a', 'b', 'c']
  79488. */
  79489. function functionsIn(object) {
  79490. return object == null ? [] : baseFunctions(object, keysIn(object));
  79491. }
  79492. /**
  79493. * Gets the value at `path` of `object`. If the resolved value is
  79494. * `undefined`, the `defaultValue` is returned in its place.
  79495. *
  79496. * @static
  79497. * @memberOf _
  79498. * @since 3.7.0
  79499. * @category Object
  79500. * @param {Object} object The object to query.
  79501. * @param {Array|string} path The path of the property to get.
  79502. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  79503. * @returns {*} Returns the resolved value.
  79504. * @example
  79505. *
  79506. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  79507. *
  79508. * _.get(object, 'a[0].b.c');
  79509. * // => 3
  79510. *
  79511. * _.get(object, ['a', '0', 'b', 'c']);
  79512. * // => 3
  79513. *
  79514. * _.get(object, 'a.b.c', 'default');
  79515. * // => 'default'
  79516. */
  79517. function get(object, path, defaultValue) {
  79518. var result = object == null ? undefined : baseGet(object, path);
  79519. return result === undefined ? defaultValue : result;
  79520. }
  79521. /**
  79522. * Checks if `path` is a direct property of `object`.
  79523. *
  79524. * @static
  79525. * @since 0.1.0
  79526. * @memberOf _
  79527. * @category Object
  79528. * @param {Object} object The object to query.
  79529. * @param {Array|string} path The path to check.
  79530. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  79531. * @example
  79532. *
  79533. * var object = { 'a': { 'b': 2 } };
  79534. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  79535. *
  79536. * _.has(object, 'a');
  79537. * // => true
  79538. *
  79539. * _.has(object, 'a.b');
  79540. * // => true
  79541. *
  79542. * _.has(object, ['a', 'b']);
  79543. * // => true
  79544. *
  79545. * _.has(other, 'a');
  79546. * // => false
  79547. */
  79548. function has(object, path) {
  79549. return object != null && hasPath(object, path, baseHas);
  79550. }
  79551. /**
  79552. * Checks if `path` is a direct or inherited property of `object`.
  79553. *
  79554. * @static
  79555. * @memberOf _
  79556. * @since 4.0.0
  79557. * @category Object
  79558. * @param {Object} object The object to query.
  79559. * @param {Array|string} path The path to check.
  79560. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  79561. * @example
  79562. *
  79563. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  79564. *
  79565. * _.hasIn(object, 'a');
  79566. * // => true
  79567. *
  79568. * _.hasIn(object, 'a.b');
  79569. * // => true
  79570. *
  79571. * _.hasIn(object, ['a', 'b']);
  79572. * // => true
  79573. *
  79574. * _.hasIn(object, 'b');
  79575. * // => false
  79576. */
  79577. function hasIn(object, path) {
  79578. return object != null && hasPath(object, path, baseHasIn);
  79579. }
  79580. /**
  79581. * Creates an object composed of the inverted keys and values of `object`.
  79582. * If `object` contains duplicate values, subsequent values overwrite
  79583. * property assignments of previous values.
  79584. *
  79585. * @static
  79586. * @memberOf _
  79587. * @since 0.7.0
  79588. * @category Object
  79589. * @param {Object} object The object to invert.
  79590. * @returns {Object} Returns the new inverted object.
  79591. * @example
  79592. *
  79593. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  79594. *
  79595. * _.invert(object);
  79596. * // => { '1': 'c', '2': 'b' }
  79597. */
  79598. var invert = createInverter(function(result, value, key) {
  79599. if (value != null &&
  79600. typeof value.toString != 'function') {
  79601. value = nativeObjectToString.call(value);
  79602. }
  79603. result[value] = key;
  79604. }, constant(identity));
  79605. /**
  79606. * This method is like `_.invert` except that the inverted object is generated
  79607. * from the results of running each element of `object` thru `iteratee`. The
  79608. * corresponding inverted value of each inverted key is an array of keys
  79609. * responsible for generating the inverted value. The iteratee is invoked
  79610. * with one argument: (value).
  79611. *
  79612. * @static
  79613. * @memberOf _
  79614. * @since 4.1.0
  79615. * @category Object
  79616. * @param {Object} object The object to invert.
  79617. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  79618. * @returns {Object} Returns the new inverted object.
  79619. * @example
  79620. *
  79621. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  79622. *
  79623. * _.invertBy(object);
  79624. * // => { '1': ['a', 'c'], '2': ['b'] }
  79625. *
  79626. * _.invertBy(object, function(value) {
  79627. * return 'group' + value;
  79628. * });
  79629. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  79630. */
  79631. var invertBy = createInverter(function(result, value, key) {
  79632. if (value != null &&
  79633. typeof value.toString != 'function') {
  79634. value = nativeObjectToString.call(value);
  79635. }
  79636. if (hasOwnProperty.call(result, value)) {
  79637. result[value].push(key);
  79638. } else {
  79639. result[value] = [key];
  79640. }
  79641. }, getIteratee);
  79642. /**
  79643. * Invokes the method at `path` of `object`.
  79644. *
  79645. * @static
  79646. * @memberOf _
  79647. * @since 4.0.0
  79648. * @category Object
  79649. * @param {Object} object The object to query.
  79650. * @param {Array|string} path The path of the method to invoke.
  79651. * @param {...*} [args] The arguments to invoke the method with.
  79652. * @returns {*} Returns the result of the invoked method.
  79653. * @example
  79654. *
  79655. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  79656. *
  79657. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  79658. * // => [2, 3]
  79659. */
  79660. var invoke = baseRest(baseInvoke);
  79661. /**
  79662. * Creates an array of the own enumerable property names of `object`.
  79663. *
  79664. * **Note:** Non-object values are coerced to objects. See the
  79665. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  79666. * for more details.
  79667. *
  79668. * @static
  79669. * @since 0.1.0
  79670. * @memberOf _
  79671. * @category Object
  79672. * @param {Object} object The object to query.
  79673. * @returns {Array} Returns the array of property names.
  79674. * @example
  79675. *
  79676. * function Foo() {
  79677. * this.a = 1;
  79678. * this.b = 2;
  79679. * }
  79680. *
  79681. * Foo.prototype.c = 3;
  79682. *
  79683. * _.keys(new Foo);
  79684. * // => ['a', 'b'] (iteration order is not guaranteed)
  79685. *
  79686. * _.keys('hi');
  79687. * // => ['0', '1']
  79688. */
  79689. function keys(object) {
  79690. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  79691. }
  79692. /**
  79693. * Creates an array of the own and inherited enumerable property names of `object`.
  79694. *
  79695. * **Note:** Non-object values are coerced to objects.
  79696. *
  79697. * @static
  79698. * @memberOf _
  79699. * @since 3.0.0
  79700. * @category Object
  79701. * @param {Object} object The object to query.
  79702. * @returns {Array} Returns the array of property names.
  79703. * @example
  79704. *
  79705. * function Foo() {
  79706. * this.a = 1;
  79707. * this.b = 2;
  79708. * }
  79709. *
  79710. * Foo.prototype.c = 3;
  79711. *
  79712. * _.keysIn(new Foo);
  79713. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  79714. */
  79715. function keysIn(object) {
  79716. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  79717. }
  79718. /**
  79719. * The opposite of `_.mapValues`; this method creates an object with the
  79720. * same values as `object` and keys generated by running each own enumerable
  79721. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  79722. * with three arguments: (value, key, object).
  79723. *
  79724. * @static
  79725. * @memberOf _
  79726. * @since 3.8.0
  79727. * @category Object
  79728. * @param {Object} object The object to iterate over.
  79729. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  79730. * @returns {Object} Returns the new mapped object.
  79731. * @see _.mapValues
  79732. * @example
  79733. *
  79734. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  79735. * return key + value;
  79736. * });
  79737. * // => { 'a1': 1, 'b2': 2 }
  79738. */
  79739. function mapKeys(object, iteratee) {
  79740. var result = {};
  79741. iteratee = getIteratee(iteratee, 3);
  79742. baseForOwn(object, function(value, key, object) {
  79743. baseAssignValue(result, iteratee(value, key, object), value);
  79744. });
  79745. return result;
  79746. }
  79747. /**
  79748. * Creates an object with the same keys as `object` and values generated
  79749. * by running each own enumerable string keyed property of `object` thru
  79750. * `iteratee`. The iteratee is invoked with three arguments:
  79751. * (value, key, object).
  79752. *
  79753. * @static
  79754. * @memberOf _
  79755. * @since 2.4.0
  79756. * @category Object
  79757. * @param {Object} object The object to iterate over.
  79758. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  79759. * @returns {Object} Returns the new mapped object.
  79760. * @see _.mapKeys
  79761. * @example
  79762. *
  79763. * var users = {
  79764. * 'fred': { 'user': 'fred', 'age': 40 },
  79765. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  79766. * };
  79767. *
  79768. * _.mapValues(users, function(o) { return o.age; });
  79769. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  79770. *
  79771. * // The `_.property` iteratee shorthand.
  79772. * _.mapValues(users, 'age');
  79773. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  79774. */
  79775. function mapValues(object, iteratee) {
  79776. var result = {};
  79777. iteratee = getIteratee(iteratee, 3);
  79778. baseForOwn(object, function(value, key, object) {
  79779. baseAssignValue(result, key, iteratee(value, key, object));
  79780. });
  79781. return result;
  79782. }
  79783. /**
  79784. * This method is like `_.assign` except that it recursively merges own and
  79785. * inherited enumerable string keyed properties of source objects into the
  79786. * destination object. Source properties that resolve to `undefined` are
  79787. * skipped if a destination value exists. Array and plain object properties
  79788. * are merged recursively. Other objects and value types are overridden by
  79789. * assignment. Source objects are applied from left to right. Subsequent
  79790. * sources overwrite property assignments of previous sources.
  79791. *
  79792. * **Note:** This method mutates `object`.
  79793. *
  79794. * @static
  79795. * @memberOf _
  79796. * @since 0.5.0
  79797. * @category Object
  79798. * @param {Object} object The destination object.
  79799. * @param {...Object} [sources] The source objects.
  79800. * @returns {Object} Returns `object`.
  79801. * @example
  79802. *
  79803. * var object = {
  79804. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  79805. * };
  79806. *
  79807. * var other = {
  79808. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  79809. * };
  79810. *
  79811. * _.merge(object, other);
  79812. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  79813. */
  79814. var merge = createAssigner(function(object, source, srcIndex) {
  79815. baseMerge(object, source, srcIndex);
  79816. });
  79817. /**
  79818. * This method is like `_.merge` except that it accepts `customizer` which
  79819. * is invoked to produce the merged values of the destination and source
  79820. * properties. If `customizer` returns `undefined`, merging is handled by the
  79821. * method instead. The `customizer` is invoked with six arguments:
  79822. * (objValue, srcValue, key, object, source, stack).
  79823. *
  79824. * **Note:** This method mutates `object`.
  79825. *
  79826. * @static
  79827. * @memberOf _
  79828. * @since 4.0.0
  79829. * @category Object
  79830. * @param {Object} object The destination object.
  79831. * @param {...Object} sources The source objects.
  79832. * @param {Function} customizer The function to customize assigned values.
  79833. * @returns {Object} Returns `object`.
  79834. * @example
  79835. *
  79836. * function customizer(objValue, srcValue) {
  79837. * if (_.isArray(objValue)) {
  79838. * return objValue.concat(srcValue);
  79839. * }
  79840. * }
  79841. *
  79842. * var object = { 'a': [1], 'b': [2] };
  79843. * var other = { 'a': [3], 'b': [4] };
  79844. *
  79845. * _.mergeWith(object, other, customizer);
  79846. * // => { 'a': [1, 3], 'b': [2, 4] }
  79847. */
  79848. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  79849. baseMerge(object, source, srcIndex, customizer);
  79850. });
  79851. /**
  79852. * The opposite of `_.pick`; this method creates an object composed of the
  79853. * own and inherited enumerable property paths of `object` that are not omitted.
  79854. *
  79855. * **Note:** This method is considerably slower than `_.pick`.
  79856. *
  79857. * @static
  79858. * @since 0.1.0
  79859. * @memberOf _
  79860. * @category Object
  79861. * @param {Object} object The source object.
  79862. * @param {...(string|string[])} [paths] The property paths to omit.
  79863. * @returns {Object} Returns the new object.
  79864. * @example
  79865. *
  79866. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  79867. *
  79868. * _.omit(object, ['a', 'c']);
  79869. * // => { 'b': '2' }
  79870. */
  79871. var omit = flatRest(function(object, paths) {
  79872. var result = {};
  79873. if (object == null) {
  79874. return result;
  79875. }
  79876. var isDeep = false;
  79877. paths = arrayMap(paths, function(path) {
  79878. path = castPath(path, object);
  79879. isDeep || (isDeep = path.length > 1);
  79880. return path;
  79881. });
  79882. copyObject(object, getAllKeysIn(object), result);
  79883. if (isDeep) {
  79884. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  79885. }
  79886. var length = paths.length;
  79887. while (length--) {
  79888. baseUnset(result, paths[length]);
  79889. }
  79890. return result;
  79891. });
  79892. /**
  79893. * The opposite of `_.pickBy`; this method creates an object composed of
  79894. * the own and inherited enumerable string keyed properties of `object` that
  79895. * `predicate` doesn't return truthy for. The predicate is invoked with two
  79896. * arguments: (value, key).
  79897. *
  79898. * @static
  79899. * @memberOf _
  79900. * @since 4.0.0
  79901. * @category Object
  79902. * @param {Object} object The source object.
  79903. * @param {Function} [predicate=_.identity] The function invoked per property.
  79904. * @returns {Object} Returns the new object.
  79905. * @example
  79906. *
  79907. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  79908. *
  79909. * _.omitBy(object, _.isNumber);
  79910. * // => { 'b': '2' }
  79911. */
  79912. function omitBy(object, predicate) {
  79913. return pickBy(object, negate(getIteratee(predicate)));
  79914. }
  79915. /**
  79916. * Creates an object composed of the picked `object` properties.
  79917. *
  79918. * @static
  79919. * @since 0.1.0
  79920. * @memberOf _
  79921. * @category Object
  79922. * @param {Object} object The source object.
  79923. * @param {...(string|string[])} [paths] The property paths to pick.
  79924. * @returns {Object} Returns the new object.
  79925. * @example
  79926. *
  79927. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  79928. *
  79929. * _.pick(object, ['a', 'c']);
  79930. * // => { 'a': 1, 'c': 3 }
  79931. */
  79932. var pick = flatRest(function(object, paths) {
  79933. return object == null ? {} : basePick(object, paths);
  79934. });
  79935. /**
  79936. * Creates an object composed of the `object` properties `predicate` returns
  79937. * truthy for. The predicate is invoked with two arguments: (value, key).
  79938. *
  79939. * @static
  79940. * @memberOf _
  79941. * @since 4.0.0
  79942. * @category Object
  79943. * @param {Object} object The source object.
  79944. * @param {Function} [predicate=_.identity] The function invoked per property.
  79945. * @returns {Object} Returns the new object.
  79946. * @example
  79947. *
  79948. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  79949. *
  79950. * _.pickBy(object, _.isNumber);
  79951. * // => { 'a': 1, 'c': 3 }
  79952. */
  79953. function pickBy(object, predicate) {
  79954. if (object == null) {
  79955. return {};
  79956. }
  79957. var props = arrayMap(getAllKeysIn(object), function(prop) {
  79958. return [prop];
  79959. });
  79960. predicate = getIteratee(predicate);
  79961. return basePickBy(object, props, function(value, path) {
  79962. return predicate(value, path[0]);
  79963. });
  79964. }
  79965. /**
  79966. * This method is like `_.get` except that if the resolved value is a
  79967. * function it's invoked with the `this` binding of its parent object and
  79968. * its result is returned.
  79969. *
  79970. * @static
  79971. * @since 0.1.0
  79972. * @memberOf _
  79973. * @category Object
  79974. * @param {Object} object The object to query.
  79975. * @param {Array|string} path The path of the property to resolve.
  79976. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  79977. * @returns {*} Returns the resolved value.
  79978. * @example
  79979. *
  79980. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  79981. *
  79982. * _.result(object, 'a[0].b.c1');
  79983. * // => 3
  79984. *
  79985. * _.result(object, 'a[0].b.c2');
  79986. * // => 4
  79987. *
  79988. * _.result(object, 'a[0].b.c3', 'default');
  79989. * // => 'default'
  79990. *
  79991. * _.result(object, 'a[0].b.c3', _.constant('default'));
  79992. * // => 'default'
  79993. */
  79994. function result(object, path, defaultValue) {
  79995. path = castPath(path, object);
  79996. var index = -1,
  79997. length = path.length;
  79998. // Ensure the loop is entered when path is empty.
  79999. if (!length) {
  80000. length = 1;
  80001. object = undefined;
  80002. }
  80003. while (++index < length) {
  80004. var value = object == null ? undefined : object[toKey(path[index])];
  80005. if (value === undefined) {
  80006. index = length;
  80007. value = defaultValue;
  80008. }
  80009. object = isFunction(value) ? value.call(object) : value;
  80010. }
  80011. return object;
  80012. }
  80013. /**
  80014. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  80015. * it's created. Arrays are created for missing index properties while objects
  80016. * are created for all other missing properties. Use `_.setWith` to customize
  80017. * `path` creation.
  80018. *
  80019. * **Note:** This method mutates `object`.
  80020. *
  80021. * @static
  80022. * @memberOf _
  80023. * @since 3.7.0
  80024. * @category Object
  80025. * @param {Object} object The object to modify.
  80026. * @param {Array|string} path The path of the property to set.
  80027. * @param {*} value The value to set.
  80028. * @returns {Object} Returns `object`.
  80029. * @example
  80030. *
  80031. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  80032. *
  80033. * _.set(object, 'a[0].b.c', 4);
  80034. * console.log(object.a[0].b.c);
  80035. * // => 4
  80036. *
  80037. * _.set(object, ['x', '0', 'y', 'z'], 5);
  80038. * console.log(object.x[0].y.z);
  80039. * // => 5
  80040. */
  80041. function set(object, path, value) {
  80042. return object == null ? object : baseSet(object, path, value);
  80043. }
  80044. /**
  80045. * This method is like `_.set` except that it accepts `customizer` which is
  80046. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  80047. * path creation is handled by the method instead. The `customizer` is invoked
  80048. * with three arguments: (nsValue, key, nsObject).
  80049. *
  80050. * **Note:** This method mutates `object`.
  80051. *
  80052. * @static
  80053. * @memberOf _
  80054. * @since 4.0.0
  80055. * @category Object
  80056. * @param {Object} object The object to modify.
  80057. * @param {Array|string} path The path of the property to set.
  80058. * @param {*} value The value to set.
  80059. * @param {Function} [customizer] The function to customize assigned values.
  80060. * @returns {Object} Returns `object`.
  80061. * @example
  80062. *
  80063. * var object = {};
  80064. *
  80065. * _.setWith(object, '[0][1]', 'a', Object);
  80066. * // => { '0': { '1': 'a' } }
  80067. */
  80068. function setWith(object, path, value, customizer) {
  80069. customizer = typeof customizer == 'function' ? customizer : undefined;
  80070. return object == null ? object : baseSet(object, path, value, customizer);
  80071. }
  80072. /**
  80073. * Creates an array of own enumerable string keyed-value pairs for `object`
  80074. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  80075. * entries are returned.
  80076. *
  80077. * @static
  80078. * @memberOf _
  80079. * @since 4.0.0
  80080. * @alias entries
  80081. * @category Object
  80082. * @param {Object} object The object to query.
  80083. * @returns {Array} Returns the key-value pairs.
  80084. * @example
  80085. *
  80086. * function Foo() {
  80087. * this.a = 1;
  80088. * this.b = 2;
  80089. * }
  80090. *
  80091. * Foo.prototype.c = 3;
  80092. *
  80093. * _.toPairs(new Foo);
  80094. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  80095. */
  80096. var toPairs = createToPairs(keys);
  80097. /**
  80098. * Creates an array of own and inherited enumerable string keyed-value pairs
  80099. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  80100. * or set, its entries are returned.
  80101. *
  80102. * @static
  80103. * @memberOf _
  80104. * @since 4.0.0
  80105. * @alias entriesIn
  80106. * @category Object
  80107. * @param {Object} object The object to query.
  80108. * @returns {Array} Returns the key-value pairs.
  80109. * @example
  80110. *
  80111. * function Foo() {
  80112. * this.a = 1;
  80113. * this.b = 2;
  80114. * }
  80115. *
  80116. * Foo.prototype.c = 3;
  80117. *
  80118. * _.toPairsIn(new Foo);
  80119. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  80120. */
  80121. var toPairsIn = createToPairs(keysIn);
  80122. /**
  80123. * An alternative to `_.reduce`; this method transforms `object` to a new
  80124. * `accumulator` object which is the result of running each of its own
  80125. * enumerable string keyed properties thru `iteratee`, with each invocation
  80126. * potentially mutating the `accumulator` object. If `accumulator` is not
  80127. * provided, a new object with the same `[[Prototype]]` will be used. The
  80128. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  80129. * Iteratee functions may exit iteration early by explicitly returning `false`.
  80130. *
  80131. * @static
  80132. * @memberOf _
  80133. * @since 1.3.0
  80134. * @category Object
  80135. * @param {Object} object The object to iterate over.
  80136. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  80137. * @param {*} [accumulator] The custom accumulator value.
  80138. * @returns {*} Returns the accumulated value.
  80139. * @example
  80140. *
  80141. * _.transform([2, 3, 4], function(result, n) {
  80142. * result.push(n *= n);
  80143. * return n % 2 == 0;
  80144. * }, []);
  80145. * // => [4, 9]
  80146. *
  80147. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  80148. * (result[value] || (result[value] = [])).push(key);
  80149. * }, {});
  80150. * // => { '1': ['a', 'c'], '2': ['b'] }
  80151. */
  80152. function transform(object, iteratee, accumulator) {
  80153. var isArr = isArray(object),
  80154. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  80155. iteratee = getIteratee(iteratee, 4);
  80156. if (accumulator == null) {
  80157. var Ctor = object && object.constructor;
  80158. if (isArrLike) {
  80159. accumulator = isArr ? new Ctor : [];
  80160. }
  80161. else if (isObject(object)) {
  80162. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  80163. }
  80164. else {
  80165. accumulator = {};
  80166. }
  80167. }
  80168. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  80169. return iteratee(accumulator, value, index, object);
  80170. });
  80171. return accumulator;
  80172. }
  80173. /**
  80174. * Removes the property at `path` of `object`.
  80175. *
  80176. * **Note:** This method mutates `object`.
  80177. *
  80178. * @static
  80179. * @memberOf _
  80180. * @since 4.0.0
  80181. * @category Object
  80182. * @param {Object} object The object to modify.
  80183. * @param {Array|string} path The path of the property to unset.
  80184. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  80185. * @example
  80186. *
  80187. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  80188. * _.unset(object, 'a[0].b.c');
  80189. * // => true
  80190. *
  80191. * console.log(object);
  80192. * // => { 'a': [{ 'b': {} }] };
  80193. *
  80194. * _.unset(object, ['a', '0', 'b', 'c']);
  80195. * // => true
  80196. *
  80197. * console.log(object);
  80198. * // => { 'a': [{ 'b': {} }] };
  80199. */
  80200. function unset(object, path) {
  80201. return object == null ? true : baseUnset(object, path);
  80202. }
  80203. /**
  80204. * This method is like `_.set` except that accepts `updater` to produce the
  80205. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  80206. * is invoked with one argument: (value).
  80207. *
  80208. * **Note:** This method mutates `object`.
  80209. *
  80210. * @static
  80211. * @memberOf _
  80212. * @since 4.6.0
  80213. * @category Object
  80214. * @param {Object} object The object to modify.
  80215. * @param {Array|string} path The path of the property to set.
  80216. * @param {Function} updater The function to produce the updated value.
  80217. * @returns {Object} Returns `object`.
  80218. * @example
  80219. *
  80220. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  80221. *
  80222. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  80223. * console.log(object.a[0].b.c);
  80224. * // => 9
  80225. *
  80226. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  80227. * console.log(object.x[0].y.z);
  80228. * // => 0
  80229. */
  80230. function update(object, path, updater) {
  80231. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  80232. }
  80233. /**
  80234. * This method is like `_.update` except that it accepts `customizer` which is
  80235. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  80236. * path creation is handled by the method instead. The `customizer` is invoked
  80237. * with three arguments: (nsValue, key, nsObject).
  80238. *
  80239. * **Note:** This method mutates `object`.
  80240. *
  80241. * @static
  80242. * @memberOf _
  80243. * @since 4.6.0
  80244. * @category Object
  80245. * @param {Object} object The object to modify.
  80246. * @param {Array|string} path The path of the property to set.
  80247. * @param {Function} updater The function to produce the updated value.
  80248. * @param {Function} [customizer] The function to customize assigned values.
  80249. * @returns {Object} Returns `object`.
  80250. * @example
  80251. *
  80252. * var object = {};
  80253. *
  80254. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  80255. * // => { '0': { '1': 'a' } }
  80256. */
  80257. function updateWith(object, path, updater, customizer) {
  80258. customizer = typeof customizer == 'function' ? customizer : undefined;
  80259. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  80260. }
  80261. /**
  80262. * Creates an array of the own enumerable string keyed property values of `object`.
  80263. *
  80264. * **Note:** Non-object values are coerced to objects.
  80265. *
  80266. * @static
  80267. * @since 0.1.0
  80268. * @memberOf _
  80269. * @category Object
  80270. * @param {Object} object The object to query.
  80271. * @returns {Array} Returns the array of property values.
  80272. * @example
  80273. *
  80274. * function Foo() {
  80275. * this.a = 1;
  80276. * this.b = 2;
  80277. * }
  80278. *
  80279. * Foo.prototype.c = 3;
  80280. *
  80281. * _.values(new Foo);
  80282. * // => [1, 2] (iteration order is not guaranteed)
  80283. *
  80284. * _.values('hi');
  80285. * // => ['h', 'i']
  80286. */
  80287. function values(object) {
  80288. return object == null ? [] : baseValues(object, keys(object));
  80289. }
  80290. /**
  80291. * Creates an array of the own and inherited enumerable string keyed property
  80292. * values of `object`.
  80293. *
  80294. * **Note:** Non-object values are coerced to objects.
  80295. *
  80296. * @static
  80297. * @memberOf _
  80298. * @since 3.0.0
  80299. * @category Object
  80300. * @param {Object} object The object to query.
  80301. * @returns {Array} Returns the array of property values.
  80302. * @example
  80303. *
  80304. * function Foo() {
  80305. * this.a = 1;
  80306. * this.b = 2;
  80307. * }
  80308. *
  80309. * Foo.prototype.c = 3;
  80310. *
  80311. * _.valuesIn(new Foo);
  80312. * // => [1, 2, 3] (iteration order is not guaranteed)
  80313. */
  80314. function valuesIn(object) {
  80315. return object == null ? [] : baseValues(object, keysIn(object));
  80316. }
  80317. /*------------------------------------------------------------------------*/
  80318. /**
  80319. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  80320. *
  80321. * @static
  80322. * @memberOf _
  80323. * @since 4.0.0
  80324. * @category Number
  80325. * @param {number} number The number to clamp.
  80326. * @param {number} [lower] The lower bound.
  80327. * @param {number} upper The upper bound.
  80328. * @returns {number} Returns the clamped number.
  80329. * @example
  80330. *
  80331. * _.clamp(-10, -5, 5);
  80332. * // => -5
  80333. *
  80334. * _.clamp(10, -5, 5);
  80335. * // => 5
  80336. */
  80337. function clamp(number, lower, upper) {
  80338. if (upper === undefined) {
  80339. upper = lower;
  80340. lower = undefined;
  80341. }
  80342. if (upper !== undefined) {
  80343. upper = toNumber(upper);
  80344. upper = upper === upper ? upper : 0;
  80345. }
  80346. if (lower !== undefined) {
  80347. lower = toNumber(lower);
  80348. lower = lower === lower ? lower : 0;
  80349. }
  80350. return baseClamp(toNumber(number), lower, upper);
  80351. }
  80352. /**
  80353. * Checks if `n` is between `start` and up to, but not including, `end`. If
  80354. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  80355. * If `start` is greater than `end` the params are swapped to support
  80356. * negative ranges.
  80357. *
  80358. * @static
  80359. * @memberOf _
  80360. * @since 3.3.0
  80361. * @category Number
  80362. * @param {number} number The number to check.
  80363. * @param {number} [start=0] The start of the range.
  80364. * @param {number} end The end of the range.
  80365. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  80366. * @see _.range, _.rangeRight
  80367. * @example
  80368. *
  80369. * _.inRange(3, 2, 4);
  80370. * // => true
  80371. *
  80372. * _.inRange(4, 8);
  80373. * // => true
  80374. *
  80375. * _.inRange(4, 2);
  80376. * // => false
  80377. *
  80378. * _.inRange(2, 2);
  80379. * // => false
  80380. *
  80381. * _.inRange(1.2, 2);
  80382. * // => true
  80383. *
  80384. * _.inRange(5.2, 4);
  80385. * // => false
  80386. *
  80387. * _.inRange(-3, -2, -6);
  80388. * // => true
  80389. */
  80390. function inRange(number, start, end) {
  80391. start = toFinite(start);
  80392. if (end === undefined) {
  80393. end = start;
  80394. start = 0;
  80395. } else {
  80396. end = toFinite(end);
  80397. }
  80398. number = toNumber(number);
  80399. return baseInRange(number, start, end);
  80400. }
  80401. /**
  80402. * Produces a random number between the inclusive `lower` and `upper` bounds.
  80403. * If only one argument is provided a number between `0` and the given number
  80404. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  80405. * floats, a floating-point number is returned instead of an integer.
  80406. *
  80407. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  80408. * floating-point values which can produce unexpected results.
  80409. *
  80410. * @static
  80411. * @memberOf _
  80412. * @since 0.7.0
  80413. * @category Number
  80414. * @param {number} [lower=0] The lower bound.
  80415. * @param {number} [upper=1] The upper bound.
  80416. * @param {boolean} [floating] Specify returning a floating-point number.
  80417. * @returns {number} Returns the random number.
  80418. * @example
  80419. *
  80420. * _.random(0, 5);
  80421. * // => an integer between 0 and 5
  80422. *
  80423. * _.random(5);
  80424. * // => also an integer between 0 and 5
  80425. *
  80426. * _.random(5, true);
  80427. * // => a floating-point number between 0 and 5
  80428. *
  80429. * _.random(1.2, 5.2);
  80430. * // => a floating-point number between 1.2 and 5.2
  80431. */
  80432. function random(lower, upper, floating) {
  80433. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  80434. upper = floating = undefined;
  80435. }
  80436. if (floating === undefined) {
  80437. if (typeof upper == 'boolean') {
  80438. floating = upper;
  80439. upper = undefined;
  80440. }
  80441. else if (typeof lower == 'boolean') {
  80442. floating = lower;
  80443. lower = undefined;
  80444. }
  80445. }
  80446. if (lower === undefined && upper === undefined) {
  80447. lower = 0;
  80448. upper = 1;
  80449. }
  80450. else {
  80451. lower = toFinite(lower);
  80452. if (upper === undefined) {
  80453. upper = lower;
  80454. lower = 0;
  80455. } else {
  80456. upper = toFinite(upper);
  80457. }
  80458. }
  80459. if (lower > upper) {
  80460. var temp = lower;
  80461. lower = upper;
  80462. upper = temp;
  80463. }
  80464. if (floating || lower % 1 || upper % 1) {
  80465. var rand = nativeRandom();
  80466. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  80467. }
  80468. return baseRandom(lower, upper);
  80469. }
  80470. /*------------------------------------------------------------------------*/
  80471. /**
  80472. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  80473. *
  80474. * @static
  80475. * @memberOf _
  80476. * @since 3.0.0
  80477. * @category String
  80478. * @param {string} [string=''] The string to convert.
  80479. * @returns {string} Returns the camel cased string.
  80480. * @example
  80481. *
  80482. * _.camelCase('Foo Bar');
  80483. * // => 'fooBar'
  80484. *
  80485. * _.camelCase('--foo-bar--');
  80486. * // => 'fooBar'
  80487. *
  80488. * _.camelCase('__FOO_BAR__');
  80489. * // => 'fooBar'
  80490. */
  80491. var camelCase = createCompounder(function(result, word, index) {
  80492. word = word.toLowerCase();
  80493. return result + (index ? capitalize(word) : word);
  80494. });
  80495. /**
  80496. * Converts the first character of `string` to upper case and the remaining
  80497. * to lower case.
  80498. *
  80499. * @static
  80500. * @memberOf _
  80501. * @since 3.0.0
  80502. * @category String
  80503. * @param {string} [string=''] The string to capitalize.
  80504. * @returns {string} Returns the capitalized string.
  80505. * @example
  80506. *
  80507. * _.capitalize('FRED');
  80508. * // => 'Fred'
  80509. */
  80510. function capitalize(string) {
  80511. return upperFirst(toString(string).toLowerCase());
  80512. }
  80513. /**
  80514. * Deburrs `string` by converting
  80515. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  80516. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  80517. * letters to basic Latin letters and removing
  80518. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  80519. *
  80520. * @static
  80521. * @memberOf _
  80522. * @since 3.0.0
  80523. * @category String
  80524. * @param {string} [string=''] The string to deburr.
  80525. * @returns {string} Returns the deburred string.
  80526. * @example
  80527. *
  80528. * _.deburr('déjà vu');
  80529. * // => 'deja vu'
  80530. */
  80531. function deburr(string) {
  80532. string = toString(string);
  80533. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  80534. }
  80535. /**
  80536. * Checks if `string` ends with the given target string.
  80537. *
  80538. * @static
  80539. * @memberOf _
  80540. * @since 3.0.0
  80541. * @category String
  80542. * @param {string} [string=''] The string to inspect.
  80543. * @param {string} [target] The string to search for.
  80544. * @param {number} [position=string.length] The position to search up to.
  80545. * @returns {boolean} Returns `true` if `string` ends with `target`,
  80546. * else `false`.
  80547. * @example
  80548. *
  80549. * _.endsWith('abc', 'c');
  80550. * // => true
  80551. *
  80552. * _.endsWith('abc', 'b');
  80553. * // => false
  80554. *
  80555. * _.endsWith('abc', 'b', 2);
  80556. * // => true
  80557. */
  80558. function endsWith(string, target, position) {
  80559. string = toString(string);
  80560. target = baseToString(target);
  80561. var length = string.length;
  80562. position = position === undefined
  80563. ? length
  80564. : baseClamp(toInteger(position), 0, length);
  80565. var end = position;
  80566. position -= target.length;
  80567. return position >= 0 && string.slice(position, end) == target;
  80568. }
  80569. /**
  80570. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  80571. * corresponding HTML entities.
  80572. *
  80573. * **Note:** No other characters are escaped. To escape additional
  80574. * characters use a third-party library like [_he_](https://mths.be/he).
  80575. *
  80576. * Though the ">" character is escaped for symmetry, characters like
  80577. * ">" and "/" don't need escaping in HTML and have no special meaning
  80578. * unless they're part of a tag or unquoted attribute value. See
  80579. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  80580. * (under "semi-related fun fact") for more details.
  80581. *
  80582. * When working with HTML you should always
  80583. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  80584. * XSS vectors.
  80585. *
  80586. * @static
  80587. * @since 0.1.0
  80588. * @memberOf _
  80589. * @category String
  80590. * @param {string} [string=''] The string to escape.
  80591. * @returns {string} Returns the escaped string.
  80592. * @example
  80593. *
  80594. * _.escape('fred, barney, & pebbles');
  80595. * // => 'fred, barney, &amp; pebbles'
  80596. */
  80597. function escape(string) {
  80598. string = toString(string);
  80599. return (string && reHasUnescapedHtml.test(string))
  80600. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  80601. : string;
  80602. }
  80603. /**
  80604. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  80605. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  80606. *
  80607. * @static
  80608. * @memberOf _
  80609. * @since 3.0.0
  80610. * @category String
  80611. * @param {string} [string=''] The string to escape.
  80612. * @returns {string} Returns the escaped string.
  80613. * @example
  80614. *
  80615. * _.escapeRegExp('[lodash](https://lodash.com/)');
  80616. * // => '\[lodash\]\(https://lodash\.com/\)'
  80617. */
  80618. function escapeRegExp(string) {
  80619. string = toString(string);
  80620. return (string && reHasRegExpChar.test(string))
  80621. ? string.replace(reRegExpChar, '\\$&')
  80622. : string;
  80623. }
  80624. /**
  80625. * Converts `string` to
  80626. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  80627. *
  80628. * @static
  80629. * @memberOf _
  80630. * @since 3.0.0
  80631. * @category String
  80632. * @param {string} [string=''] The string to convert.
  80633. * @returns {string} Returns the kebab cased string.
  80634. * @example
  80635. *
  80636. * _.kebabCase('Foo Bar');
  80637. * // => 'foo-bar'
  80638. *
  80639. * _.kebabCase('fooBar');
  80640. * // => 'foo-bar'
  80641. *
  80642. * _.kebabCase('__FOO_BAR__');
  80643. * // => 'foo-bar'
  80644. */
  80645. var kebabCase = createCompounder(function(result, word, index) {
  80646. return result + (index ? '-' : '') + word.toLowerCase();
  80647. });
  80648. /**
  80649. * Converts `string`, as space separated words, to lower case.
  80650. *
  80651. * @static
  80652. * @memberOf _
  80653. * @since 4.0.0
  80654. * @category String
  80655. * @param {string} [string=''] The string to convert.
  80656. * @returns {string} Returns the lower cased string.
  80657. * @example
  80658. *
  80659. * _.lowerCase('--Foo-Bar--');
  80660. * // => 'foo bar'
  80661. *
  80662. * _.lowerCase('fooBar');
  80663. * // => 'foo bar'
  80664. *
  80665. * _.lowerCase('__FOO_BAR__');
  80666. * // => 'foo bar'
  80667. */
  80668. var lowerCase = createCompounder(function(result, word, index) {
  80669. return result + (index ? ' ' : '') + word.toLowerCase();
  80670. });
  80671. /**
  80672. * Converts the first character of `string` to lower case.
  80673. *
  80674. * @static
  80675. * @memberOf _
  80676. * @since 4.0.0
  80677. * @category String
  80678. * @param {string} [string=''] The string to convert.
  80679. * @returns {string} Returns the converted string.
  80680. * @example
  80681. *
  80682. * _.lowerFirst('Fred');
  80683. * // => 'fred'
  80684. *
  80685. * _.lowerFirst('FRED');
  80686. * // => 'fRED'
  80687. */
  80688. var lowerFirst = createCaseFirst('toLowerCase');
  80689. /**
  80690. * Pads `string` on the left and right sides if it's shorter than `length`.
  80691. * Padding characters are truncated if they can't be evenly divided by `length`.
  80692. *
  80693. * @static
  80694. * @memberOf _
  80695. * @since 3.0.0
  80696. * @category String
  80697. * @param {string} [string=''] The string to pad.
  80698. * @param {number} [length=0] The padding length.
  80699. * @param {string} [chars=' '] The string used as padding.
  80700. * @returns {string} Returns the padded string.
  80701. * @example
  80702. *
  80703. * _.pad('abc', 8);
  80704. * // => ' abc '
  80705. *
  80706. * _.pad('abc', 8, '_-');
  80707. * // => '_-abc_-_'
  80708. *
  80709. * _.pad('abc', 3);
  80710. * // => 'abc'
  80711. */
  80712. function pad(string, length, chars) {
  80713. string = toString(string);
  80714. length = toInteger(length);
  80715. var strLength = length ? stringSize(string) : 0;
  80716. if (!length || strLength >= length) {
  80717. return string;
  80718. }
  80719. var mid = (length - strLength) / 2;
  80720. return (
  80721. createPadding(nativeFloor(mid), chars) +
  80722. string +
  80723. createPadding(nativeCeil(mid), chars)
  80724. );
  80725. }
  80726. /**
  80727. * Pads `string` on the right side if it's shorter than `length`. Padding
  80728. * characters are truncated if they exceed `length`.
  80729. *
  80730. * @static
  80731. * @memberOf _
  80732. * @since 4.0.0
  80733. * @category String
  80734. * @param {string} [string=''] The string to pad.
  80735. * @param {number} [length=0] The padding length.
  80736. * @param {string} [chars=' '] The string used as padding.
  80737. * @returns {string} Returns the padded string.
  80738. * @example
  80739. *
  80740. * _.padEnd('abc', 6);
  80741. * // => 'abc '
  80742. *
  80743. * _.padEnd('abc', 6, '_-');
  80744. * // => 'abc_-_'
  80745. *
  80746. * _.padEnd('abc', 3);
  80747. * // => 'abc'
  80748. */
  80749. function padEnd(string, length, chars) {
  80750. string = toString(string);
  80751. length = toInteger(length);
  80752. var strLength = length ? stringSize(string) : 0;
  80753. return (length && strLength < length)
  80754. ? (string + createPadding(length - strLength, chars))
  80755. : string;
  80756. }
  80757. /**
  80758. * Pads `string` on the left side if it's shorter than `length`. Padding
  80759. * characters are truncated if they exceed `length`.
  80760. *
  80761. * @static
  80762. * @memberOf _
  80763. * @since 4.0.0
  80764. * @category String
  80765. * @param {string} [string=''] The string to pad.
  80766. * @param {number} [length=0] The padding length.
  80767. * @param {string} [chars=' '] The string used as padding.
  80768. * @returns {string} Returns the padded string.
  80769. * @example
  80770. *
  80771. * _.padStart('abc', 6);
  80772. * // => ' abc'
  80773. *
  80774. * _.padStart('abc', 6, '_-');
  80775. * // => '_-_abc'
  80776. *
  80777. * _.padStart('abc', 3);
  80778. * // => 'abc'
  80779. */
  80780. function padStart(string, length, chars) {
  80781. string = toString(string);
  80782. length = toInteger(length);
  80783. var strLength = length ? stringSize(string) : 0;
  80784. return (length && strLength < length)
  80785. ? (createPadding(length - strLength, chars) + string)
  80786. : string;
  80787. }
  80788. /**
  80789. * Converts `string` to an integer of the specified radix. If `radix` is
  80790. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  80791. * hexadecimal, in which case a `radix` of `16` is used.
  80792. *
  80793. * **Note:** This method aligns with the
  80794. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  80795. *
  80796. * @static
  80797. * @memberOf _
  80798. * @since 1.1.0
  80799. * @category String
  80800. * @param {string} string The string to convert.
  80801. * @param {number} [radix=10] The radix to interpret `value` by.
  80802. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  80803. * @returns {number} Returns the converted integer.
  80804. * @example
  80805. *
  80806. * _.parseInt('08');
  80807. * // => 8
  80808. *
  80809. * _.map(['6', '08', '10'], _.parseInt);
  80810. * // => [6, 8, 10]
  80811. */
  80812. function parseInt(string, radix, guard) {
  80813. if (guard || radix == null) {
  80814. radix = 0;
  80815. } else if (radix) {
  80816. radix = +radix;
  80817. }
  80818. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  80819. }
  80820. /**
  80821. * Repeats the given string `n` times.
  80822. *
  80823. * @static
  80824. * @memberOf _
  80825. * @since 3.0.0
  80826. * @category String
  80827. * @param {string} [string=''] The string to repeat.
  80828. * @param {number} [n=1] The number of times to repeat the string.
  80829. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  80830. * @returns {string} Returns the repeated string.
  80831. * @example
  80832. *
  80833. * _.repeat('*', 3);
  80834. * // => '***'
  80835. *
  80836. * _.repeat('abc', 2);
  80837. * // => 'abcabc'
  80838. *
  80839. * _.repeat('abc', 0);
  80840. * // => ''
  80841. */
  80842. function repeat(string, n, guard) {
  80843. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  80844. n = 1;
  80845. } else {
  80846. n = toInteger(n);
  80847. }
  80848. return baseRepeat(toString(string), n);
  80849. }
  80850. /**
  80851. * Replaces matches for `pattern` in `string` with `replacement`.
  80852. *
  80853. * **Note:** This method is based on
  80854. * [`String#replace`](https://mdn.io/String/replace).
  80855. *
  80856. * @static
  80857. * @memberOf _
  80858. * @since 4.0.0
  80859. * @category String
  80860. * @param {string} [string=''] The string to modify.
  80861. * @param {RegExp|string} pattern The pattern to replace.
  80862. * @param {Function|string} replacement The match replacement.
  80863. * @returns {string} Returns the modified string.
  80864. * @example
  80865. *
  80866. * _.replace('Hi Fred', 'Fred', 'Barney');
  80867. * // => 'Hi Barney'
  80868. */
  80869. function replace() {
  80870. var args = arguments,
  80871. string = toString(args[0]);
  80872. return args.length < 3 ? string : string.replace(args[1], args[2]);
  80873. }
  80874. /**
  80875. * Converts `string` to
  80876. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  80877. *
  80878. * @static
  80879. * @memberOf _
  80880. * @since 3.0.0
  80881. * @category String
  80882. * @param {string} [string=''] The string to convert.
  80883. * @returns {string} Returns the snake cased string.
  80884. * @example
  80885. *
  80886. * _.snakeCase('Foo Bar');
  80887. * // => 'foo_bar'
  80888. *
  80889. * _.snakeCase('fooBar');
  80890. * // => 'foo_bar'
  80891. *
  80892. * _.snakeCase('--FOO-BAR--');
  80893. * // => 'foo_bar'
  80894. */
  80895. var snakeCase = createCompounder(function(result, word, index) {
  80896. return result + (index ? '_' : '') + word.toLowerCase();
  80897. });
  80898. /**
  80899. * Splits `string` by `separator`.
  80900. *
  80901. * **Note:** This method is based on
  80902. * [`String#split`](https://mdn.io/String/split).
  80903. *
  80904. * @static
  80905. * @memberOf _
  80906. * @since 4.0.0
  80907. * @category String
  80908. * @param {string} [string=''] The string to split.
  80909. * @param {RegExp|string} separator The separator pattern to split by.
  80910. * @param {number} [limit] The length to truncate results to.
  80911. * @returns {Array} Returns the string segments.
  80912. * @example
  80913. *
  80914. * _.split('a-b-c', '-', 2);
  80915. * // => ['a', 'b']
  80916. */
  80917. function split(string, separator, limit) {
  80918. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  80919. separator = limit = undefined;
  80920. }
  80921. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  80922. if (!limit) {
  80923. return [];
  80924. }
  80925. string = toString(string);
  80926. if (string && (
  80927. typeof separator == 'string' ||
  80928. (separator != null && !isRegExp(separator))
  80929. )) {
  80930. separator = baseToString(separator);
  80931. if (!separator && hasUnicode(string)) {
  80932. return castSlice(stringToArray(string), 0, limit);
  80933. }
  80934. }
  80935. return string.split(separator, limit);
  80936. }
  80937. /**
  80938. * Converts `string` to
  80939. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  80940. *
  80941. * @static
  80942. * @memberOf _
  80943. * @since 3.1.0
  80944. * @category String
  80945. * @param {string} [string=''] The string to convert.
  80946. * @returns {string} Returns the start cased string.
  80947. * @example
  80948. *
  80949. * _.startCase('--foo-bar--');
  80950. * // => 'Foo Bar'
  80951. *
  80952. * _.startCase('fooBar');
  80953. * // => 'Foo Bar'
  80954. *
  80955. * _.startCase('__FOO_BAR__');
  80956. * // => 'FOO BAR'
  80957. */
  80958. var startCase = createCompounder(function(result, word, index) {
  80959. return result + (index ? ' ' : '') + upperFirst(word);
  80960. });
  80961. /**
  80962. * Checks if `string` starts with the given target string.
  80963. *
  80964. * @static
  80965. * @memberOf _
  80966. * @since 3.0.0
  80967. * @category String
  80968. * @param {string} [string=''] The string to inspect.
  80969. * @param {string} [target] The string to search for.
  80970. * @param {number} [position=0] The position to search from.
  80971. * @returns {boolean} Returns `true` if `string` starts with `target`,
  80972. * else `false`.
  80973. * @example
  80974. *
  80975. * _.startsWith('abc', 'a');
  80976. * // => true
  80977. *
  80978. * _.startsWith('abc', 'b');
  80979. * // => false
  80980. *
  80981. * _.startsWith('abc', 'b', 1);
  80982. * // => true
  80983. */
  80984. function startsWith(string, target, position) {
  80985. string = toString(string);
  80986. position = position == null
  80987. ? 0
  80988. : baseClamp(toInteger(position), 0, string.length);
  80989. target = baseToString(target);
  80990. return string.slice(position, position + target.length) == target;
  80991. }
  80992. /**
  80993. * Creates a compiled template function that can interpolate data properties
  80994. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  80995. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  80996. * properties may be accessed as free variables in the template. If a setting
  80997. * object is given, it takes precedence over `_.templateSettings` values.
  80998. *
  80999. * **Note:** In the development build `_.template` utilizes
  81000. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  81001. * for easier debugging.
  81002. *
  81003. * For more information on precompiling templates see
  81004. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  81005. *
  81006. * For more information on Chrome extension sandboxes see
  81007. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  81008. *
  81009. * @static
  81010. * @since 0.1.0
  81011. * @memberOf _
  81012. * @category String
  81013. * @param {string} [string=''] The template string.
  81014. * @param {Object} [options={}] The options object.
  81015. * @param {RegExp} [options.escape=_.templateSettings.escape]
  81016. * The HTML "escape" delimiter.
  81017. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  81018. * The "evaluate" delimiter.
  81019. * @param {Object} [options.imports=_.templateSettings.imports]
  81020. * An object to import into the template as free variables.
  81021. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  81022. * The "interpolate" delimiter.
  81023. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  81024. * The sourceURL of the compiled template.
  81025. * @param {string} [options.variable='obj']
  81026. * The data object variable name.
  81027. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  81028. * @returns {Function} Returns the compiled template function.
  81029. * @example
  81030. *
  81031. * // Use the "interpolate" delimiter to create a compiled template.
  81032. * var compiled = _.template('hello <%= user %>!');
  81033. * compiled({ 'user': 'fred' });
  81034. * // => 'hello fred!'
  81035. *
  81036. * // Use the HTML "escape" delimiter to escape data property values.
  81037. * var compiled = _.template('<b><%- value %></b>');
  81038. * compiled({ 'value': '<script>' });
  81039. * // => '<b>&lt;script&gt;</b>'
  81040. *
  81041. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  81042. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  81043. * compiled({ 'users': ['fred', 'barney'] });
  81044. * // => '<li>fred</li><li>barney</li>'
  81045. *
  81046. * // Use the internal `print` function in "evaluate" delimiters.
  81047. * var compiled = _.template('<% print("hello " + user); %>!');
  81048. * compiled({ 'user': 'barney' });
  81049. * // => 'hello barney!'
  81050. *
  81051. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  81052. * // Disable support by replacing the "interpolate" delimiter.
  81053. * var compiled = _.template('hello ${ user }!');
  81054. * compiled({ 'user': 'pebbles' });
  81055. * // => 'hello pebbles!'
  81056. *
  81057. * // Use backslashes to treat delimiters as plain text.
  81058. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  81059. * compiled({ 'value': 'ignored' });
  81060. * // => '<%- value %>'
  81061. *
  81062. * // Use the `imports` option to import `jQuery` as `jq`.
  81063. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  81064. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  81065. * compiled({ 'users': ['fred', 'barney'] });
  81066. * // => '<li>fred</li><li>barney</li>'
  81067. *
  81068. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  81069. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  81070. * compiled(data);
  81071. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  81072. *
  81073. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  81074. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  81075. * compiled.source;
  81076. * // => function(data) {
  81077. * // var __t, __p = '';
  81078. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  81079. * // return __p;
  81080. * // }
  81081. *
  81082. * // Use custom template delimiters.
  81083. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  81084. * var compiled = _.template('hello {{ user }}!');
  81085. * compiled({ 'user': 'mustache' });
  81086. * // => 'hello mustache!'
  81087. *
  81088. * // Use the `source` property to inline compiled templates for meaningful
  81089. * // line numbers in error messages and stack traces.
  81090. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  81091. * var JST = {\
  81092. * "main": ' + _.template(mainText).source + '\
  81093. * };\
  81094. * ');
  81095. */
  81096. function template(string, options, guard) {
  81097. // Based on John Resig's `tmpl` implementation
  81098. // (http://ejohn.org/blog/javascript-micro-templating/)
  81099. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  81100. var settings = lodash.templateSettings;
  81101. if (guard && isIterateeCall(string, options, guard)) {
  81102. options = undefined;
  81103. }
  81104. string = toString(string);
  81105. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  81106. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  81107. importsKeys = keys(imports),
  81108. importsValues = baseValues(imports, importsKeys);
  81109. var isEscaping,
  81110. isEvaluating,
  81111. index = 0,
  81112. interpolate = options.interpolate || reNoMatch,
  81113. source = "__p += '";
  81114. // Compile the regexp to match each delimiter.
  81115. var reDelimiters = RegExp(
  81116. (options.escape || reNoMatch).source + '|' +
  81117. interpolate.source + '|' +
  81118. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  81119. (options.evaluate || reNoMatch).source + '|$'
  81120. , 'g');
  81121. // Use a sourceURL for easier debugging.
  81122. // The sourceURL gets injected into the source that's eval-ed, so be careful
  81123. // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  81124. // and escape the comment, thus injecting code that gets evaled.
  81125. var sourceURL = '//# sourceURL=' +
  81126. (hasOwnProperty.call(options, 'sourceURL')
  81127. ? (options.sourceURL + '').replace(/\s/g, ' ')
  81128. : ('lodash.templateSources[' + (++templateCounter) + ']')
  81129. ) + '\n';
  81130. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  81131. interpolateValue || (interpolateValue = esTemplateValue);
  81132. // Escape characters that can't be included in string literals.
  81133. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  81134. // Replace delimiters with snippets.
  81135. if (escapeValue) {
  81136. isEscaping = true;
  81137. source += "' +\n__e(" + escapeValue + ") +\n'";
  81138. }
  81139. if (evaluateValue) {
  81140. isEvaluating = true;
  81141. source += "';\n" + evaluateValue + ";\n__p += '";
  81142. }
  81143. if (interpolateValue) {
  81144. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  81145. }
  81146. index = offset + match.length;
  81147. // The JS engine embedded in Adobe products needs `match` returned in
  81148. // order to produce the correct `offset` value.
  81149. return match;
  81150. });
  81151. source += "';\n";
  81152. // If `variable` is not specified wrap a with-statement around the generated
  81153. // code to add the data object to the top of the scope chain.
  81154. var variable = hasOwnProperty.call(options, 'variable') && options.variable;
  81155. if (!variable) {
  81156. source = 'with (obj) {\n' + source + '\n}\n';
  81157. }
  81158. // Throw an error if a forbidden character was found in `variable`, to prevent
  81159. // potential command injection attacks.
  81160. else if (reForbiddenIdentifierChars.test(variable)) {
  81161. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  81162. }
  81163. // Cleanup code by stripping empty strings.
  81164. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  81165. .replace(reEmptyStringMiddle, '$1')
  81166. .replace(reEmptyStringTrailing, '$1;');
  81167. // Frame code as the function body.
  81168. source = 'function(' + (variable || 'obj') + ') {\n' +
  81169. (variable
  81170. ? ''
  81171. : 'obj || (obj = {});\n'
  81172. ) +
  81173. "var __t, __p = ''" +
  81174. (isEscaping
  81175. ? ', __e = _.escape'
  81176. : ''
  81177. ) +
  81178. (isEvaluating
  81179. ? ', __j = Array.prototype.join;\n' +
  81180. "function print() { __p += __j.call(arguments, '') }\n"
  81181. : ';\n'
  81182. ) +
  81183. source +
  81184. 'return __p\n}';
  81185. var result = attempt(function() {
  81186. return Function(importsKeys, sourceURL + 'return ' + source)
  81187. .apply(undefined, importsValues);
  81188. });
  81189. // Provide the compiled function's source by its `toString` method or
  81190. // the `source` property as a convenience for inlining compiled templates.
  81191. result.source = source;
  81192. if (isError(result)) {
  81193. throw result;
  81194. }
  81195. return result;
  81196. }
  81197. /**
  81198. * Converts `string`, as a whole, to lower case just like
  81199. * [String#toLowerCase](https://mdn.io/toLowerCase).
  81200. *
  81201. * @static
  81202. * @memberOf _
  81203. * @since 4.0.0
  81204. * @category String
  81205. * @param {string} [string=''] The string to convert.
  81206. * @returns {string} Returns the lower cased string.
  81207. * @example
  81208. *
  81209. * _.toLower('--Foo-Bar--');
  81210. * // => '--foo-bar--'
  81211. *
  81212. * _.toLower('fooBar');
  81213. * // => 'foobar'
  81214. *
  81215. * _.toLower('__FOO_BAR__');
  81216. * // => '__foo_bar__'
  81217. */
  81218. function toLower(value) {
  81219. return toString(value).toLowerCase();
  81220. }
  81221. /**
  81222. * Converts `string`, as a whole, to upper case just like
  81223. * [String#toUpperCase](https://mdn.io/toUpperCase).
  81224. *
  81225. * @static
  81226. * @memberOf _
  81227. * @since 4.0.0
  81228. * @category String
  81229. * @param {string} [string=''] The string to convert.
  81230. * @returns {string} Returns the upper cased string.
  81231. * @example
  81232. *
  81233. * _.toUpper('--foo-bar--');
  81234. * // => '--FOO-BAR--'
  81235. *
  81236. * _.toUpper('fooBar');
  81237. * // => 'FOOBAR'
  81238. *
  81239. * _.toUpper('__foo_bar__');
  81240. * // => '__FOO_BAR__'
  81241. */
  81242. function toUpper(value) {
  81243. return toString(value).toUpperCase();
  81244. }
  81245. /**
  81246. * Removes leading and trailing whitespace or specified characters from `string`.
  81247. *
  81248. * @static
  81249. * @memberOf _
  81250. * @since 3.0.0
  81251. * @category String
  81252. * @param {string} [string=''] The string to trim.
  81253. * @param {string} [chars=whitespace] The characters to trim.
  81254. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  81255. * @returns {string} Returns the trimmed string.
  81256. * @example
  81257. *
  81258. * _.trim(' abc ');
  81259. * // => 'abc'
  81260. *
  81261. * _.trim('-_-abc-_-', '_-');
  81262. * // => 'abc'
  81263. *
  81264. * _.map([' foo ', ' bar '], _.trim);
  81265. * // => ['foo', 'bar']
  81266. */
  81267. function trim(string, chars, guard) {
  81268. string = toString(string);
  81269. if (string && (guard || chars === undefined)) {
  81270. return baseTrim(string);
  81271. }
  81272. if (!string || !(chars = baseToString(chars))) {
  81273. return string;
  81274. }
  81275. var strSymbols = stringToArray(string),
  81276. chrSymbols = stringToArray(chars),
  81277. start = charsStartIndex(strSymbols, chrSymbols),
  81278. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  81279. return castSlice(strSymbols, start, end).join('');
  81280. }
  81281. /**
  81282. * Removes trailing whitespace or specified characters from `string`.
  81283. *
  81284. * @static
  81285. * @memberOf _
  81286. * @since 4.0.0
  81287. * @category String
  81288. * @param {string} [string=''] The string to trim.
  81289. * @param {string} [chars=whitespace] The characters to trim.
  81290. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  81291. * @returns {string} Returns the trimmed string.
  81292. * @example
  81293. *
  81294. * _.trimEnd(' abc ');
  81295. * // => ' abc'
  81296. *
  81297. * _.trimEnd('-_-abc-_-', '_-');
  81298. * // => '-_-abc'
  81299. */
  81300. function trimEnd(string, chars, guard) {
  81301. string = toString(string);
  81302. if (string && (guard || chars === undefined)) {
  81303. return string.slice(0, trimmedEndIndex(string) + 1);
  81304. }
  81305. if (!string || !(chars = baseToString(chars))) {
  81306. return string;
  81307. }
  81308. var strSymbols = stringToArray(string),
  81309. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  81310. return castSlice(strSymbols, 0, end).join('');
  81311. }
  81312. /**
  81313. * Removes leading whitespace or specified characters from `string`.
  81314. *
  81315. * @static
  81316. * @memberOf _
  81317. * @since 4.0.0
  81318. * @category String
  81319. * @param {string} [string=''] The string to trim.
  81320. * @param {string} [chars=whitespace] The characters to trim.
  81321. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  81322. * @returns {string} Returns the trimmed string.
  81323. * @example
  81324. *
  81325. * _.trimStart(' abc ');
  81326. * // => 'abc '
  81327. *
  81328. * _.trimStart('-_-abc-_-', '_-');
  81329. * // => 'abc-_-'
  81330. */
  81331. function trimStart(string, chars, guard) {
  81332. string = toString(string);
  81333. if (string && (guard || chars === undefined)) {
  81334. return string.replace(reTrimStart, '');
  81335. }
  81336. if (!string || !(chars = baseToString(chars))) {
  81337. return string;
  81338. }
  81339. var strSymbols = stringToArray(string),
  81340. start = charsStartIndex(strSymbols, stringToArray(chars));
  81341. return castSlice(strSymbols, start).join('');
  81342. }
  81343. /**
  81344. * Truncates `string` if it's longer than the given maximum string length.
  81345. * The last characters of the truncated string are replaced with the omission
  81346. * string which defaults to "...".
  81347. *
  81348. * @static
  81349. * @memberOf _
  81350. * @since 4.0.0
  81351. * @category String
  81352. * @param {string} [string=''] The string to truncate.
  81353. * @param {Object} [options={}] The options object.
  81354. * @param {number} [options.length=30] The maximum string length.
  81355. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  81356. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  81357. * @returns {string} Returns the truncated string.
  81358. * @example
  81359. *
  81360. * _.truncate('hi-diddly-ho there, neighborino');
  81361. * // => 'hi-diddly-ho there, neighbo...'
  81362. *
  81363. * _.truncate('hi-diddly-ho there, neighborino', {
  81364. * 'length': 24,
  81365. * 'separator': ' '
  81366. * });
  81367. * // => 'hi-diddly-ho there,...'
  81368. *
  81369. * _.truncate('hi-diddly-ho there, neighborino', {
  81370. * 'length': 24,
  81371. * 'separator': /,? +/
  81372. * });
  81373. * // => 'hi-diddly-ho there...'
  81374. *
  81375. * _.truncate('hi-diddly-ho there, neighborino', {
  81376. * 'omission': ' [...]'
  81377. * });
  81378. * // => 'hi-diddly-ho there, neig [...]'
  81379. */
  81380. function truncate(string, options) {
  81381. var length = DEFAULT_TRUNC_LENGTH,
  81382. omission = DEFAULT_TRUNC_OMISSION;
  81383. if (isObject(options)) {
  81384. var separator = 'separator' in options ? options.separator : separator;
  81385. length = 'length' in options ? toInteger(options.length) : length;
  81386. omission = 'omission' in options ? baseToString(options.omission) : omission;
  81387. }
  81388. string = toString(string);
  81389. var strLength = string.length;
  81390. if (hasUnicode(string)) {
  81391. var strSymbols = stringToArray(string);
  81392. strLength = strSymbols.length;
  81393. }
  81394. if (length >= strLength) {
  81395. return string;
  81396. }
  81397. var end = length - stringSize(omission);
  81398. if (end < 1) {
  81399. return omission;
  81400. }
  81401. var result = strSymbols
  81402. ? castSlice(strSymbols, 0, end).join('')
  81403. : string.slice(0, end);
  81404. if (separator === undefined) {
  81405. return result + omission;
  81406. }
  81407. if (strSymbols) {
  81408. end += (result.length - end);
  81409. }
  81410. if (isRegExp(separator)) {
  81411. if (string.slice(end).search(separator)) {
  81412. var match,
  81413. substring = result;
  81414. if (!separator.global) {
  81415. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  81416. }
  81417. separator.lastIndex = 0;
  81418. while ((match = separator.exec(substring))) {
  81419. var newEnd = match.index;
  81420. }
  81421. result = result.slice(0, newEnd === undefined ? end : newEnd);
  81422. }
  81423. } else if (string.indexOf(baseToString(separator), end) != end) {
  81424. var index = result.lastIndexOf(separator);
  81425. if (index > -1) {
  81426. result = result.slice(0, index);
  81427. }
  81428. }
  81429. return result + omission;
  81430. }
  81431. /**
  81432. * The inverse of `_.escape`; this method converts the HTML entities
  81433. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  81434. * their corresponding characters.
  81435. *
  81436. * **Note:** No other HTML entities are unescaped. To unescape additional
  81437. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  81438. *
  81439. * @static
  81440. * @memberOf _
  81441. * @since 0.6.0
  81442. * @category String
  81443. * @param {string} [string=''] The string to unescape.
  81444. * @returns {string} Returns the unescaped string.
  81445. * @example
  81446. *
  81447. * _.unescape('fred, barney, &amp; pebbles');
  81448. * // => 'fred, barney, & pebbles'
  81449. */
  81450. function unescape(string) {
  81451. string = toString(string);
  81452. return (string && reHasEscapedHtml.test(string))
  81453. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  81454. : string;
  81455. }
  81456. /**
  81457. * Converts `string`, as space separated words, to upper case.
  81458. *
  81459. * @static
  81460. * @memberOf _
  81461. * @since 4.0.0
  81462. * @category String
  81463. * @param {string} [string=''] The string to convert.
  81464. * @returns {string} Returns the upper cased string.
  81465. * @example
  81466. *
  81467. * _.upperCase('--foo-bar');
  81468. * // => 'FOO BAR'
  81469. *
  81470. * _.upperCase('fooBar');
  81471. * // => 'FOO BAR'
  81472. *
  81473. * _.upperCase('__foo_bar__');
  81474. * // => 'FOO BAR'
  81475. */
  81476. var upperCase = createCompounder(function(result, word, index) {
  81477. return result + (index ? ' ' : '') + word.toUpperCase();
  81478. });
  81479. /**
  81480. * Converts the first character of `string` to upper case.
  81481. *
  81482. * @static
  81483. * @memberOf _
  81484. * @since 4.0.0
  81485. * @category String
  81486. * @param {string} [string=''] The string to convert.
  81487. * @returns {string} Returns the converted string.
  81488. * @example
  81489. *
  81490. * _.upperFirst('fred');
  81491. * // => 'Fred'
  81492. *
  81493. * _.upperFirst('FRED');
  81494. * // => 'FRED'
  81495. */
  81496. var upperFirst = createCaseFirst('toUpperCase');
  81497. /**
  81498. * Splits `string` into an array of its words.
  81499. *
  81500. * @static
  81501. * @memberOf _
  81502. * @since 3.0.0
  81503. * @category String
  81504. * @param {string} [string=''] The string to inspect.
  81505. * @param {RegExp|string} [pattern] The pattern to match words.
  81506. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  81507. * @returns {Array} Returns the words of `string`.
  81508. * @example
  81509. *
  81510. * _.words('fred, barney, & pebbles');
  81511. * // => ['fred', 'barney', 'pebbles']
  81512. *
  81513. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  81514. * // => ['fred', 'barney', '&', 'pebbles']
  81515. */
  81516. function words(string, pattern, guard) {
  81517. string = toString(string);
  81518. pattern = guard ? undefined : pattern;
  81519. if (pattern === undefined) {
  81520. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  81521. }
  81522. return string.match(pattern) || [];
  81523. }
  81524. /*------------------------------------------------------------------------*/
  81525. /**
  81526. * Attempts to invoke `func`, returning either the result or the caught error
  81527. * object. Any additional arguments are provided to `func` when it's invoked.
  81528. *
  81529. * @static
  81530. * @memberOf _
  81531. * @since 3.0.0
  81532. * @category Util
  81533. * @param {Function} func The function to attempt.
  81534. * @param {...*} [args] The arguments to invoke `func` with.
  81535. * @returns {*} Returns the `func` result or error object.
  81536. * @example
  81537. *
  81538. * // Avoid throwing errors for invalid selectors.
  81539. * var elements = _.attempt(function(selector) {
  81540. * return document.querySelectorAll(selector);
  81541. * }, '>_>');
  81542. *
  81543. * if (_.isError(elements)) {
  81544. * elements = [];
  81545. * }
  81546. */
  81547. var attempt = baseRest(function(func, args) {
  81548. try {
  81549. return apply(func, undefined, args);
  81550. } catch (e) {
  81551. return isError(e) ? e : new Error(e);
  81552. }
  81553. });
  81554. /**
  81555. * Binds methods of an object to the object itself, overwriting the existing
  81556. * method.
  81557. *
  81558. * **Note:** This method doesn't set the "length" property of bound functions.
  81559. *
  81560. * @static
  81561. * @since 0.1.0
  81562. * @memberOf _
  81563. * @category Util
  81564. * @param {Object} object The object to bind and assign the bound methods to.
  81565. * @param {...(string|string[])} methodNames The object method names to bind.
  81566. * @returns {Object} Returns `object`.
  81567. * @example
  81568. *
  81569. * var view = {
  81570. * 'label': 'docs',
  81571. * 'click': function() {
  81572. * console.log('clicked ' + this.label);
  81573. * }
  81574. * };
  81575. *
  81576. * _.bindAll(view, ['click']);
  81577. * jQuery(element).on('click', view.click);
  81578. * // => Logs 'clicked docs' when clicked.
  81579. */
  81580. var bindAll = flatRest(function(object, methodNames) {
  81581. arrayEach(methodNames, function(key) {
  81582. key = toKey(key);
  81583. baseAssignValue(object, key, bind(object[key], object));
  81584. });
  81585. return object;
  81586. });
  81587. /**
  81588. * Creates a function that iterates over `pairs` and invokes the corresponding
  81589. * function of the first predicate to return truthy. The predicate-function
  81590. * pairs are invoked with the `this` binding and arguments of the created
  81591. * function.
  81592. *
  81593. * @static
  81594. * @memberOf _
  81595. * @since 4.0.0
  81596. * @category Util
  81597. * @param {Array} pairs The predicate-function pairs.
  81598. * @returns {Function} Returns the new composite function.
  81599. * @example
  81600. *
  81601. * var func = _.cond([
  81602. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  81603. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  81604. * [_.stubTrue, _.constant('no match')]
  81605. * ]);
  81606. *
  81607. * func({ 'a': 1, 'b': 2 });
  81608. * // => 'matches A'
  81609. *
  81610. * func({ 'a': 0, 'b': 1 });
  81611. * // => 'matches B'
  81612. *
  81613. * func({ 'a': '1', 'b': '2' });
  81614. * // => 'no match'
  81615. */
  81616. function cond(pairs) {
  81617. var length = pairs == null ? 0 : pairs.length,
  81618. toIteratee = getIteratee();
  81619. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  81620. if (typeof pair[1] != 'function') {
  81621. throw new TypeError(FUNC_ERROR_TEXT);
  81622. }
  81623. return [toIteratee(pair[0]), pair[1]];
  81624. });
  81625. return baseRest(function(args) {
  81626. var index = -1;
  81627. while (++index < length) {
  81628. var pair = pairs[index];
  81629. if (apply(pair[0], this, args)) {
  81630. return apply(pair[1], this, args);
  81631. }
  81632. }
  81633. });
  81634. }
  81635. /**
  81636. * Creates a function that invokes the predicate properties of `source` with
  81637. * the corresponding property values of a given object, returning `true` if
  81638. * all predicates return truthy, else `false`.
  81639. *
  81640. * **Note:** The created function is equivalent to `_.conformsTo` with
  81641. * `source` partially applied.
  81642. *
  81643. * @static
  81644. * @memberOf _
  81645. * @since 4.0.0
  81646. * @category Util
  81647. * @param {Object} source The object of property predicates to conform to.
  81648. * @returns {Function} Returns the new spec function.
  81649. * @example
  81650. *
  81651. * var objects = [
  81652. * { 'a': 2, 'b': 1 },
  81653. * { 'a': 1, 'b': 2 }
  81654. * ];
  81655. *
  81656. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  81657. * // => [{ 'a': 1, 'b': 2 }]
  81658. */
  81659. function conforms(source) {
  81660. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  81661. }
  81662. /**
  81663. * Creates a function that returns `value`.
  81664. *
  81665. * @static
  81666. * @memberOf _
  81667. * @since 2.4.0
  81668. * @category Util
  81669. * @param {*} value The value to return from the new function.
  81670. * @returns {Function} Returns the new constant function.
  81671. * @example
  81672. *
  81673. * var objects = _.times(2, _.constant({ 'a': 1 }));
  81674. *
  81675. * console.log(objects);
  81676. * // => [{ 'a': 1 }, { 'a': 1 }]
  81677. *
  81678. * console.log(objects[0] === objects[1]);
  81679. * // => true
  81680. */
  81681. function constant(value) {
  81682. return function() {
  81683. return value;
  81684. };
  81685. }
  81686. /**
  81687. * Checks `value` to determine whether a default value should be returned in
  81688. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  81689. * or `undefined`.
  81690. *
  81691. * @static
  81692. * @memberOf _
  81693. * @since 4.14.0
  81694. * @category Util
  81695. * @param {*} value The value to check.
  81696. * @param {*} defaultValue The default value.
  81697. * @returns {*} Returns the resolved value.
  81698. * @example
  81699. *
  81700. * _.defaultTo(1, 10);
  81701. * // => 1
  81702. *
  81703. * _.defaultTo(undefined, 10);
  81704. * // => 10
  81705. */
  81706. function defaultTo(value, defaultValue) {
  81707. return (value == null || value !== value) ? defaultValue : value;
  81708. }
  81709. /**
  81710. * Creates a function that returns the result of invoking the given functions
  81711. * with the `this` binding of the created function, where each successive
  81712. * invocation is supplied the return value of the previous.
  81713. *
  81714. * @static
  81715. * @memberOf _
  81716. * @since 3.0.0
  81717. * @category Util
  81718. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  81719. * @returns {Function} Returns the new composite function.
  81720. * @see _.flowRight
  81721. * @example
  81722. *
  81723. * function square(n) {
  81724. * return n * n;
  81725. * }
  81726. *
  81727. * var addSquare = _.flow([_.add, square]);
  81728. * addSquare(1, 2);
  81729. * // => 9
  81730. */
  81731. var flow = createFlow();
  81732. /**
  81733. * This method is like `_.flow` except that it creates a function that
  81734. * invokes the given functions from right to left.
  81735. *
  81736. * @static
  81737. * @since 3.0.0
  81738. * @memberOf _
  81739. * @category Util
  81740. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  81741. * @returns {Function} Returns the new composite function.
  81742. * @see _.flow
  81743. * @example
  81744. *
  81745. * function square(n) {
  81746. * return n * n;
  81747. * }
  81748. *
  81749. * var addSquare = _.flowRight([square, _.add]);
  81750. * addSquare(1, 2);
  81751. * // => 9
  81752. */
  81753. var flowRight = createFlow(true);
  81754. /**
  81755. * This method returns the first argument it receives.
  81756. *
  81757. * @static
  81758. * @since 0.1.0
  81759. * @memberOf _
  81760. * @category Util
  81761. * @param {*} value Any value.
  81762. * @returns {*} Returns `value`.
  81763. * @example
  81764. *
  81765. * var object = { 'a': 1 };
  81766. *
  81767. * console.log(_.identity(object) === object);
  81768. * // => true
  81769. */
  81770. function identity(value) {
  81771. return value;
  81772. }
  81773. /**
  81774. * Creates a function that invokes `func` with the arguments of the created
  81775. * function. If `func` is a property name, the created function returns the
  81776. * property value for a given element. If `func` is an array or object, the
  81777. * created function returns `true` for elements that contain the equivalent
  81778. * source properties, otherwise it returns `false`.
  81779. *
  81780. * @static
  81781. * @since 4.0.0
  81782. * @memberOf _
  81783. * @category Util
  81784. * @param {*} [func=_.identity] The value to convert to a callback.
  81785. * @returns {Function} Returns the callback.
  81786. * @example
  81787. *
  81788. * var users = [
  81789. * { 'user': 'barney', 'age': 36, 'active': true },
  81790. * { 'user': 'fred', 'age': 40, 'active': false }
  81791. * ];
  81792. *
  81793. * // The `_.matches` iteratee shorthand.
  81794. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  81795. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  81796. *
  81797. * // The `_.matchesProperty` iteratee shorthand.
  81798. * _.filter(users, _.iteratee(['user', 'fred']));
  81799. * // => [{ 'user': 'fred', 'age': 40 }]
  81800. *
  81801. * // The `_.property` iteratee shorthand.
  81802. * _.map(users, _.iteratee('user'));
  81803. * // => ['barney', 'fred']
  81804. *
  81805. * // Create custom iteratee shorthands.
  81806. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  81807. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  81808. * return func.test(string);
  81809. * };
  81810. * });
  81811. *
  81812. * _.filter(['abc', 'def'], /ef/);
  81813. * // => ['def']
  81814. */
  81815. function iteratee(func) {
  81816. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  81817. }
  81818. /**
  81819. * Creates a function that performs a partial deep comparison between a given
  81820. * object and `source`, returning `true` if the given object has equivalent
  81821. * property values, else `false`.
  81822. *
  81823. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  81824. * partially applied.
  81825. *
  81826. * Partial comparisons will match empty array and empty object `source`
  81827. * values against any array or object value, respectively. See `_.isEqual`
  81828. * for a list of supported value comparisons.
  81829. *
  81830. * **Note:** Multiple values can be checked by combining several matchers
  81831. * using `_.overSome`
  81832. *
  81833. * @static
  81834. * @memberOf _
  81835. * @since 3.0.0
  81836. * @category Util
  81837. * @param {Object} source The object of property values to match.
  81838. * @returns {Function} Returns the new spec function.
  81839. * @example
  81840. *
  81841. * var objects = [
  81842. * { 'a': 1, 'b': 2, 'c': 3 },
  81843. * { 'a': 4, 'b': 5, 'c': 6 }
  81844. * ];
  81845. *
  81846. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  81847. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  81848. *
  81849. * // Checking for several possible values
  81850. * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  81851. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  81852. */
  81853. function matches(source) {
  81854. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  81855. }
  81856. /**
  81857. * Creates a function that performs a partial deep comparison between the
  81858. * value at `path` of a given object to `srcValue`, returning `true` if the
  81859. * object value is equivalent, else `false`.
  81860. *
  81861. * **Note:** Partial comparisons will match empty array and empty object
  81862. * `srcValue` values against any array or object value, respectively. See
  81863. * `_.isEqual` for a list of supported value comparisons.
  81864. *
  81865. * **Note:** Multiple values can be checked by combining several matchers
  81866. * using `_.overSome`
  81867. *
  81868. * @static
  81869. * @memberOf _
  81870. * @since 3.2.0
  81871. * @category Util
  81872. * @param {Array|string} path The path of the property to get.
  81873. * @param {*} srcValue The value to match.
  81874. * @returns {Function} Returns the new spec function.
  81875. * @example
  81876. *
  81877. * var objects = [
  81878. * { 'a': 1, 'b': 2, 'c': 3 },
  81879. * { 'a': 4, 'b': 5, 'c': 6 }
  81880. * ];
  81881. *
  81882. * _.find(objects, _.matchesProperty('a', 4));
  81883. * // => { 'a': 4, 'b': 5, 'c': 6 }
  81884. *
  81885. * // Checking for several possible values
  81886. * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  81887. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  81888. */
  81889. function matchesProperty(path, srcValue) {
  81890. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  81891. }
  81892. /**
  81893. * Creates a function that invokes the method at `path` of a given object.
  81894. * Any additional arguments are provided to the invoked method.
  81895. *
  81896. * @static
  81897. * @memberOf _
  81898. * @since 3.7.0
  81899. * @category Util
  81900. * @param {Array|string} path The path of the method to invoke.
  81901. * @param {...*} [args] The arguments to invoke the method with.
  81902. * @returns {Function} Returns the new invoker function.
  81903. * @example
  81904. *
  81905. * var objects = [
  81906. * { 'a': { 'b': _.constant(2) } },
  81907. * { 'a': { 'b': _.constant(1) } }
  81908. * ];
  81909. *
  81910. * _.map(objects, _.method('a.b'));
  81911. * // => [2, 1]
  81912. *
  81913. * _.map(objects, _.method(['a', 'b']));
  81914. * // => [2, 1]
  81915. */
  81916. var method = baseRest(function(path, args) {
  81917. return function(object) {
  81918. return baseInvoke(object, path, args);
  81919. };
  81920. });
  81921. /**
  81922. * The opposite of `_.method`; this method creates a function that invokes
  81923. * the method at a given path of `object`. Any additional arguments are
  81924. * provided to the invoked method.
  81925. *
  81926. * @static
  81927. * @memberOf _
  81928. * @since 3.7.0
  81929. * @category Util
  81930. * @param {Object} object The object to query.
  81931. * @param {...*} [args] The arguments to invoke the method with.
  81932. * @returns {Function} Returns the new invoker function.
  81933. * @example
  81934. *
  81935. * var array = _.times(3, _.constant),
  81936. * object = { 'a': array, 'b': array, 'c': array };
  81937. *
  81938. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  81939. * // => [2, 0]
  81940. *
  81941. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  81942. * // => [2, 0]
  81943. */
  81944. var methodOf = baseRest(function(object, args) {
  81945. return function(path) {
  81946. return baseInvoke(object, path, args);
  81947. };
  81948. });
  81949. /**
  81950. * Adds all own enumerable string keyed function properties of a source
  81951. * object to the destination object. If `object` is a function, then methods
  81952. * are added to its prototype as well.
  81953. *
  81954. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  81955. * avoid conflicts caused by modifying the original.
  81956. *
  81957. * @static
  81958. * @since 0.1.0
  81959. * @memberOf _
  81960. * @category Util
  81961. * @param {Function|Object} [object=lodash] The destination object.
  81962. * @param {Object} source The object of functions to add.
  81963. * @param {Object} [options={}] The options object.
  81964. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  81965. * @returns {Function|Object} Returns `object`.
  81966. * @example
  81967. *
  81968. * function vowels(string) {
  81969. * return _.filter(string, function(v) {
  81970. * return /[aeiou]/i.test(v);
  81971. * });
  81972. * }
  81973. *
  81974. * _.mixin({ 'vowels': vowels });
  81975. * _.vowels('fred');
  81976. * // => ['e']
  81977. *
  81978. * _('fred').vowels().value();
  81979. * // => ['e']
  81980. *
  81981. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  81982. * _('fred').vowels();
  81983. * // => ['e']
  81984. */
  81985. function mixin(object, source, options) {
  81986. var props = keys(source),
  81987. methodNames = baseFunctions(source, props);
  81988. if (options == null &&
  81989. !(isObject(source) && (methodNames.length || !props.length))) {
  81990. options = source;
  81991. source = object;
  81992. object = this;
  81993. methodNames = baseFunctions(source, keys(source));
  81994. }
  81995. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  81996. isFunc = isFunction(object);
  81997. arrayEach(methodNames, function(methodName) {
  81998. var func = source[methodName];
  81999. object[methodName] = func;
  82000. if (isFunc) {
  82001. object.prototype[methodName] = function() {
  82002. var chainAll = this.__chain__;
  82003. if (chain || chainAll) {
  82004. var result = object(this.__wrapped__),
  82005. actions = result.__actions__ = copyArray(this.__actions__);
  82006. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  82007. result.__chain__ = chainAll;
  82008. return result;
  82009. }
  82010. return func.apply(object, arrayPush([this.value()], arguments));
  82011. };
  82012. }
  82013. });
  82014. return object;
  82015. }
  82016. /**
  82017. * Reverts the `_` variable to its previous value and returns a reference to
  82018. * the `lodash` function.
  82019. *
  82020. * @static
  82021. * @since 0.1.0
  82022. * @memberOf _
  82023. * @category Util
  82024. * @returns {Function} Returns the `lodash` function.
  82025. * @example
  82026. *
  82027. * var lodash = _.noConflict();
  82028. */
  82029. function noConflict() {
  82030. if (root._ === this) {
  82031. root._ = oldDash;
  82032. }
  82033. return this;
  82034. }
  82035. /**
  82036. * This method returns `undefined`.
  82037. *
  82038. * @static
  82039. * @memberOf _
  82040. * @since 2.3.0
  82041. * @category Util
  82042. * @example
  82043. *
  82044. * _.times(2, _.noop);
  82045. * // => [undefined, undefined]
  82046. */
  82047. function noop() {
  82048. // No operation performed.
  82049. }
  82050. /**
  82051. * Creates a function that gets the argument at index `n`. If `n` is negative,
  82052. * the nth argument from the end is returned.
  82053. *
  82054. * @static
  82055. * @memberOf _
  82056. * @since 4.0.0
  82057. * @category Util
  82058. * @param {number} [n=0] The index of the argument to return.
  82059. * @returns {Function} Returns the new pass-thru function.
  82060. * @example
  82061. *
  82062. * var func = _.nthArg(1);
  82063. * func('a', 'b', 'c', 'd');
  82064. * // => 'b'
  82065. *
  82066. * var func = _.nthArg(-2);
  82067. * func('a', 'b', 'c', 'd');
  82068. * // => 'c'
  82069. */
  82070. function nthArg(n) {
  82071. n = toInteger(n);
  82072. return baseRest(function(args) {
  82073. return baseNth(args, n);
  82074. });
  82075. }
  82076. /**
  82077. * Creates a function that invokes `iteratees` with the arguments it receives
  82078. * and returns their results.
  82079. *
  82080. * @static
  82081. * @memberOf _
  82082. * @since 4.0.0
  82083. * @category Util
  82084. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  82085. * The iteratees to invoke.
  82086. * @returns {Function} Returns the new function.
  82087. * @example
  82088. *
  82089. * var func = _.over([Math.max, Math.min]);
  82090. *
  82091. * func(1, 2, 3, 4);
  82092. * // => [4, 1]
  82093. */
  82094. var over = createOver(arrayMap);
  82095. /**
  82096. * Creates a function that checks if **all** of the `predicates` return
  82097. * truthy when invoked with the arguments it receives.
  82098. *
  82099. * Following shorthands are possible for providing predicates.
  82100. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  82101. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  82102. *
  82103. * @static
  82104. * @memberOf _
  82105. * @since 4.0.0
  82106. * @category Util
  82107. * @param {...(Function|Function[])} [predicates=[_.identity]]
  82108. * The predicates to check.
  82109. * @returns {Function} Returns the new function.
  82110. * @example
  82111. *
  82112. * var func = _.overEvery([Boolean, isFinite]);
  82113. *
  82114. * func('1');
  82115. * // => true
  82116. *
  82117. * func(null);
  82118. * // => false
  82119. *
  82120. * func(NaN);
  82121. * // => false
  82122. */
  82123. var overEvery = createOver(arrayEvery);
  82124. /**
  82125. * Creates a function that checks if **any** of the `predicates` return
  82126. * truthy when invoked with the arguments it receives.
  82127. *
  82128. * Following shorthands are possible for providing predicates.
  82129. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  82130. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  82131. *
  82132. * @static
  82133. * @memberOf _
  82134. * @since 4.0.0
  82135. * @category Util
  82136. * @param {...(Function|Function[])} [predicates=[_.identity]]
  82137. * The predicates to check.
  82138. * @returns {Function} Returns the new function.
  82139. * @example
  82140. *
  82141. * var func = _.overSome([Boolean, isFinite]);
  82142. *
  82143. * func('1');
  82144. * // => true
  82145. *
  82146. * func(null);
  82147. * // => true
  82148. *
  82149. * func(NaN);
  82150. * // => false
  82151. *
  82152. * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  82153. * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  82154. */
  82155. var overSome = createOver(arraySome);
  82156. /**
  82157. * Creates a function that returns the value at `path` of a given object.
  82158. *
  82159. * @static
  82160. * @memberOf _
  82161. * @since 2.4.0
  82162. * @category Util
  82163. * @param {Array|string} path The path of the property to get.
  82164. * @returns {Function} Returns the new accessor function.
  82165. * @example
  82166. *
  82167. * var objects = [
  82168. * { 'a': { 'b': 2 } },
  82169. * { 'a': { 'b': 1 } }
  82170. * ];
  82171. *
  82172. * _.map(objects, _.property('a.b'));
  82173. * // => [2, 1]
  82174. *
  82175. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  82176. * // => [1, 2]
  82177. */
  82178. function property(path) {
  82179. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  82180. }
  82181. /**
  82182. * The opposite of `_.property`; this method creates a function that returns
  82183. * the value at a given path of `object`.
  82184. *
  82185. * @static
  82186. * @memberOf _
  82187. * @since 3.0.0
  82188. * @category Util
  82189. * @param {Object} object The object to query.
  82190. * @returns {Function} Returns the new accessor function.
  82191. * @example
  82192. *
  82193. * var array = [0, 1, 2],
  82194. * object = { 'a': array, 'b': array, 'c': array };
  82195. *
  82196. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  82197. * // => [2, 0]
  82198. *
  82199. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  82200. * // => [2, 0]
  82201. */
  82202. function propertyOf(object) {
  82203. return function(path) {
  82204. return object == null ? undefined : baseGet(object, path);
  82205. };
  82206. }
  82207. /**
  82208. * Creates an array of numbers (positive and/or negative) progressing from
  82209. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  82210. * `start` is specified without an `end` or `step`. If `end` is not specified,
  82211. * it's set to `start` with `start` then set to `0`.
  82212. *
  82213. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  82214. * floating-point values which can produce unexpected results.
  82215. *
  82216. * @static
  82217. * @since 0.1.0
  82218. * @memberOf _
  82219. * @category Util
  82220. * @param {number} [start=0] The start of the range.
  82221. * @param {number} end The end of the range.
  82222. * @param {number} [step=1] The value to increment or decrement by.
  82223. * @returns {Array} Returns the range of numbers.
  82224. * @see _.inRange, _.rangeRight
  82225. * @example
  82226. *
  82227. * _.range(4);
  82228. * // => [0, 1, 2, 3]
  82229. *
  82230. * _.range(-4);
  82231. * // => [0, -1, -2, -3]
  82232. *
  82233. * _.range(1, 5);
  82234. * // => [1, 2, 3, 4]
  82235. *
  82236. * _.range(0, 20, 5);
  82237. * // => [0, 5, 10, 15]
  82238. *
  82239. * _.range(0, -4, -1);
  82240. * // => [0, -1, -2, -3]
  82241. *
  82242. * _.range(1, 4, 0);
  82243. * // => [1, 1, 1]
  82244. *
  82245. * _.range(0);
  82246. * // => []
  82247. */
  82248. var range = createRange();
  82249. /**
  82250. * This method is like `_.range` except that it populates values in
  82251. * descending order.
  82252. *
  82253. * @static
  82254. * @memberOf _
  82255. * @since 4.0.0
  82256. * @category Util
  82257. * @param {number} [start=0] The start of the range.
  82258. * @param {number} end The end of the range.
  82259. * @param {number} [step=1] The value to increment or decrement by.
  82260. * @returns {Array} Returns the range of numbers.
  82261. * @see _.inRange, _.range
  82262. * @example
  82263. *
  82264. * _.rangeRight(4);
  82265. * // => [3, 2, 1, 0]
  82266. *
  82267. * _.rangeRight(-4);
  82268. * // => [-3, -2, -1, 0]
  82269. *
  82270. * _.rangeRight(1, 5);
  82271. * // => [4, 3, 2, 1]
  82272. *
  82273. * _.rangeRight(0, 20, 5);
  82274. * // => [15, 10, 5, 0]
  82275. *
  82276. * _.rangeRight(0, -4, -1);
  82277. * // => [-3, -2, -1, 0]
  82278. *
  82279. * _.rangeRight(1, 4, 0);
  82280. * // => [1, 1, 1]
  82281. *
  82282. * _.rangeRight(0);
  82283. * // => []
  82284. */
  82285. var rangeRight = createRange(true);
  82286. /**
  82287. * This method returns a new empty array.
  82288. *
  82289. * @static
  82290. * @memberOf _
  82291. * @since 4.13.0
  82292. * @category Util
  82293. * @returns {Array} Returns the new empty array.
  82294. * @example
  82295. *
  82296. * var arrays = _.times(2, _.stubArray);
  82297. *
  82298. * console.log(arrays);
  82299. * // => [[], []]
  82300. *
  82301. * console.log(arrays[0] === arrays[1]);
  82302. * // => false
  82303. */
  82304. function stubArray() {
  82305. return [];
  82306. }
  82307. /**
  82308. * This method returns `false`.
  82309. *
  82310. * @static
  82311. * @memberOf _
  82312. * @since 4.13.0
  82313. * @category Util
  82314. * @returns {boolean} Returns `false`.
  82315. * @example
  82316. *
  82317. * _.times(2, _.stubFalse);
  82318. * // => [false, false]
  82319. */
  82320. function stubFalse() {
  82321. return false;
  82322. }
  82323. /**
  82324. * This method returns a new empty object.
  82325. *
  82326. * @static
  82327. * @memberOf _
  82328. * @since 4.13.0
  82329. * @category Util
  82330. * @returns {Object} Returns the new empty object.
  82331. * @example
  82332. *
  82333. * var objects = _.times(2, _.stubObject);
  82334. *
  82335. * console.log(objects);
  82336. * // => [{}, {}]
  82337. *
  82338. * console.log(objects[0] === objects[1]);
  82339. * // => false
  82340. */
  82341. function stubObject() {
  82342. return {};
  82343. }
  82344. /**
  82345. * This method returns an empty string.
  82346. *
  82347. * @static
  82348. * @memberOf _
  82349. * @since 4.13.0
  82350. * @category Util
  82351. * @returns {string} Returns the empty string.
  82352. * @example
  82353. *
  82354. * _.times(2, _.stubString);
  82355. * // => ['', '']
  82356. */
  82357. function stubString() {
  82358. return '';
  82359. }
  82360. /**
  82361. * This method returns `true`.
  82362. *
  82363. * @static
  82364. * @memberOf _
  82365. * @since 4.13.0
  82366. * @category Util
  82367. * @returns {boolean} Returns `true`.
  82368. * @example
  82369. *
  82370. * _.times(2, _.stubTrue);
  82371. * // => [true, true]
  82372. */
  82373. function stubTrue() {
  82374. return true;
  82375. }
  82376. /**
  82377. * Invokes the iteratee `n` times, returning an array of the results of
  82378. * each invocation. The iteratee is invoked with one argument; (index).
  82379. *
  82380. * @static
  82381. * @since 0.1.0
  82382. * @memberOf _
  82383. * @category Util
  82384. * @param {number} n The number of times to invoke `iteratee`.
  82385. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  82386. * @returns {Array} Returns the array of results.
  82387. * @example
  82388. *
  82389. * _.times(3, String);
  82390. * // => ['0', '1', '2']
  82391. *
  82392. * _.times(4, _.constant(0));
  82393. * // => [0, 0, 0, 0]
  82394. */
  82395. function times(n, iteratee) {
  82396. n = toInteger(n);
  82397. if (n < 1 || n > MAX_SAFE_INTEGER) {
  82398. return [];
  82399. }
  82400. var index = MAX_ARRAY_LENGTH,
  82401. length = nativeMin(n, MAX_ARRAY_LENGTH);
  82402. iteratee = getIteratee(iteratee);
  82403. n -= MAX_ARRAY_LENGTH;
  82404. var result = baseTimes(length, iteratee);
  82405. while (++index < n) {
  82406. iteratee(index);
  82407. }
  82408. return result;
  82409. }
  82410. /**
  82411. * Converts `value` to a property path array.
  82412. *
  82413. * @static
  82414. * @memberOf _
  82415. * @since 4.0.0
  82416. * @category Util
  82417. * @param {*} value The value to convert.
  82418. * @returns {Array} Returns the new property path array.
  82419. * @example
  82420. *
  82421. * _.toPath('a.b.c');
  82422. * // => ['a', 'b', 'c']
  82423. *
  82424. * _.toPath('a[0].b.c');
  82425. * // => ['a', '0', 'b', 'c']
  82426. */
  82427. function toPath(value) {
  82428. if (isArray(value)) {
  82429. return arrayMap(value, toKey);
  82430. }
  82431. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  82432. }
  82433. /**
  82434. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  82435. *
  82436. * @static
  82437. * @since 0.1.0
  82438. * @memberOf _
  82439. * @category Util
  82440. * @param {string} [prefix=''] The value to prefix the ID with.
  82441. * @returns {string} Returns the unique ID.
  82442. * @example
  82443. *
  82444. * _.uniqueId('contact_');
  82445. * // => 'contact_104'
  82446. *
  82447. * _.uniqueId();
  82448. * // => '105'
  82449. */
  82450. function uniqueId(prefix) {
  82451. var id = ++idCounter;
  82452. return toString(prefix) + id;
  82453. }
  82454. /*------------------------------------------------------------------------*/
  82455. /**
  82456. * Adds two numbers.
  82457. *
  82458. * @static
  82459. * @memberOf _
  82460. * @since 3.4.0
  82461. * @category Math
  82462. * @param {number} augend The first number in an addition.
  82463. * @param {number} addend The second number in an addition.
  82464. * @returns {number} Returns the total.
  82465. * @example
  82466. *
  82467. * _.add(6, 4);
  82468. * // => 10
  82469. */
  82470. var add = createMathOperation(function(augend, addend) {
  82471. return augend + addend;
  82472. }, 0);
  82473. /**
  82474. * Computes `number` rounded up to `precision`.
  82475. *
  82476. * @static
  82477. * @memberOf _
  82478. * @since 3.10.0
  82479. * @category Math
  82480. * @param {number} number The number to round up.
  82481. * @param {number} [precision=0] The precision to round up to.
  82482. * @returns {number} Returns the rounded up number.
  82483. * @example
  82484. *
  82485. * _.ceil(4.006);
  82486. * // => 5
  82487. *
  82488. * _.ceil(6.004, 2);
  82489. * // => 6.01
  82490. *
  82491. * _.ceil(6040, -2);
  82492. * // => 6100
  82493. */
  82494. var ceil = createRound('ceil');
  82495. /**
  82496. * Divide two numbers.
  82497. *
  82498. * @static
  82499. * @memberOf _
  82500. * @since 4.7.0
  82501. * @category Math
  82502. * @param {number} dividend The first number in a division.
  82503. * @param {number} divisor The second number in a division.
  82504. * @returns {number} Returns the quotient.
  82505. * @example
  82506. *
  82507. * _.divide(6, 4);
  82508. * // => 1.5
  82509. */
  82510. var divide = createMathOperation(function(dividend, divisor) {
  82511. return dividend / divisor;
  82512. }, 1);
  82513. /**
  82514. * Computes `number` rounded down to `precision`.
  82515. *
  82516. * @static
  82517. * @memberOf _
  82518. * @since 3.10.0
  82519. * @category Math
  82520. * @param {number} number The number to round down.
  82521. * @param {number} [precision=0] The precision to round down to.
  82522. * @returns {number} Returns the rounded down number.
  82523. * @example
  82524. *
  82525. * _.floor(4.006);
  82526. * // => 4
  82527. *
  82528. * _.floor(0.046, 2);
  82529. * // => 0.04
  82530. *
  82531. * _.floor(4060, -2);
  82532. * // => 4000
  82533. */
  82534. var floor = createRound('floor');
  82535. /**
  82536. * Computes the maximum value of `array`. If `array` is empty or falsey,
  82537. * `undefined` is returned.
  82538. *
  82539. * @static
  82540. * @since 0.1.0
  82541. * @memberOf _
  82542. * @category Math
  82543. * @param {Array} array The array to iterate over.
  82544. * @returns {*} Returns the maximum value.
  82545. * @example
  82546. *
  82547. * _.max([4, 2, 8, 6]);
  82548. * // => 8
  82549. *
  82550. * _.max([]);
  82551. * // => undefined
  82552. */
  82553. function max(array) {
  82554. return (array && array.length)
  82555. ? baseExtremum(array, identity, baseGt)
  82556. : undefined;
  82557. }
  82558. /**
  82559. * This method is like `_.max` except that it accepts `iteratee` which is
  82560. * invoked for each element in `array` to generate the criterion by which
  82561. * the value is ranked. The iteratee is invoked with one argument: (value).
  82562. *
  82563. * @static
  82564. * @memberOf _
  82565. * @since 4.0.0
  82566. * @category Math
  82567. * @param {Array} array The array to iterate over.
  82568. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  82569. * @returns {*} Returns the maximum value.
  82570. * @example
  82571. *
  82572. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  82573. *
  82574. * _.maxBy(objects, function(o) { return o.n; });
  82575. * // => { 'n': 2 }
  82576. *
  82577. * // The `_.property` iteratee shorthand.
  82578. * _.maxBy(objects, 'n');
  82579. * // => { 'n': 2 }
  82580. */
  82581. function maxBy(array, iteratee) {
  82582. return (array && array.length)
  82583. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  82584. : undefined;
  82585. }
  82586. /**
  82587. * Computes the mean of the values in `array`.
  82588. *
  82589. * @static
  82590. * @memberOf _
  82591. * @since 4.0.0
  82592. * @category Math
  82593. * @param {Array} array The array to iterate over.
  82594. * @returns {number} Returns the mean.
  82595. * @example
  82596. *
  82597. * _.mean([4, 2, 8, 6]);
  82598. * // => 5
  82599. */
  82600. function mean(array) {
  82601. return baseMean(array, identity);
  82602. }
  82603. /**
  82604. * This method is like `_.mean` except that it accepts `iteratee` which is
  82605. * invoked for each element in `array` to generate the value to be averaged.
  82606. * The iteratee is invoked with one argument: (value).
  82607. *
  82608. * @static
  82609. * @memberOf _
  82610. * @since 4.7.0
  82611. * @category Math
  82612. * @param {Array} array The array to iterate over.
  82613. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  82614. * @returns {number} Returns the mean.
  82615. * @example
  82616. *
  82617. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  82618. *
  82619. * _.meanBy(objects, function(o) { return o.n; });
  82620. * // => 5
  82621. *
  82622. * // The `_.property` iteratee shorthand.
  82623. * _.meanBy(objects, 'n');
  82624. * // => 5
  82625. */
  82626. function meanBy(array, iteratee) {
  82627. return baseMean(array, getIteratee(iteratee, 2));
  82628. }
  82629. /**
  82630. * Computes the minimum value of `array`. If `array` is empty or falsey,
  82631. * `undefined` is returned.
  82632. *
  82633. * @static
  82634. * @since 0.1.0
  82635. * @memberOf _
  82636. * @category Math
  82637. * @param {Array} array The array to iterate over.
  82638. * @returns {*} Returns the minimum value.
  82639. * @example
  82640. *
  82641. * _.min([4, 2, 8, 6]);
  82642. * // => 2
  82643. *
  82644. * _.min([]);
  82645. * // => undefined
  82646. */
  82647. function min(array) {
  82648. return (array && array.length)
  82649. ? baseExtremum(array, identity, baseLt)
  82650. : undefined;
  82651. }
  82652. /**
  82653. * This method is like `_.min` except that it accepts `iteratee` which is
  82654. * invoked for each element in `array` to generate the criterion by which
  82655. * the value is ranked. The iteratee is invoked with one argument: (value).
  82656. *
  82657. * @static
  82658. * @memberOf _
  82659. * @since 4.0.0
  82660. * @category Math
  82661. * @param {Array} array The array to iterate over.
  82662. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  82663. * @returns {*} Returns the minimum value.
  82664. * @example
  82665. *
  82666. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  82667. *
  82668. * _.minBy(objects, function(o) { return o.n; });
  82669. * // => { 'n': 1 }
  82670. *
  82671. * // The `_.property` iteratee shorthand.
  82672. * _.minBy(objects, 'n');
  82673. * // => { 'n': 1 }
  82674. */
  82675. function minBy(array, iteratee) {
  82676. return (array && array.length)
  82677. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  82678. : undefined;
  82679. }
  82680. /**
  82681. * Multiply two numbers.
  82682. *
  82683. * @static
  82684. * @memberOf _
  82685. * @since 4.7.0
  82686. * @category Math
  82687. * @param {number} multiplier The first number in a multiplication.
  82688. * @param {number} multiplicand The second number in a multiplication.
  82689. * @returns {number} Returns the product.
  82690. * @example
  82691. *
  82692. * _.multiply(6, 4);
  82693. * // => 24
  82694. */
  82695. var multiply = createMathOperation(function(multiplier, multiplicand) {
  82696. return multiplier * multiplicand;
  82697. }, 1);
  82698. /**
  82699. * Computes `number` rounded to `precision`.
  82700. *
  82701. * @static
  82702. * @memberOf _
  82703. * @since 3.10.0
  82704. * @category Math
  82705. * @param {number} number The number to round.
  82706. * @param {number} [precision=0] The precision to round to.
  82707. * @returns {number} Returns the rounded number.
  82708. * @example
  82709. *
  82710. * _.round(4.006);
  82711. * // => 4
  82712. *
  82713. * _.round(4.006, 2);
  82714. * // => 4.01
  82715. *
  82716. * _.round(4060, -2);
  82717. * // => 4100
  82718. */
  82719. var round = createRound('round');
  82720. /**
  82721. * Subtract two numbers.
  82722. *
  82723. * @static
  82724. * @memberOf _
  82725. * @since 4.0.0
  82726. * @category Math
  82727. * @param {number} minuend The first number in a subtraction.
  82728. * @param {number} subtrahend The second number in a subtraction.
  82729. * @returns {number} Returns the difference.
  82730. * @example
  82731. *
  82732. * _.subtract(6, 4);
  82733. * // => 2
  82734. */
  82735. var subtract = createMathOperation(function(minuend, subtrahend) {
  82736. return minuend - subtrahend;
  82737. }, 0);
  82738. /**
  82739. * Computes the sum of the values in `array`.
  82740. *
  82741. * @static
  82742. * @memberOf _
  82743. * @since 3.4.0
  82744. * @category Math
  82745. * @param {Array} array The array to iterate over.
  82746. * @returns {number} Returns the sum.
  82747. * @example
  82748. *
  82749. * _.sum([4, 2, 8, 6]);
  82750. * // => 20
  82751. */
  82752. function sum(array) {
  82753. return (array && array.length)
  82754. ? baseSum(array, identity)
  82755. : 0;
  82756. }
  82757. /**
  82758. * This method is like `_.sum` except that it accepts `iteratee` which is
  82759. * invoked for each element in `array` to generate the value to be summed.
  82760. * The iteratee is invoked with one argument: (value).
  82761. *
  82762. * @static
  82763. * @memberOf _
  82764. * @since 4.0.0
  82765. * @category Math
  82766. * @param {Array} array The array to iterate over.
  82767. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  82768. * @returns {number} Returns the sum.
  82769. * @example
  82770. *
  82771. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  82772. *
  82773. * _.sumBy(objects, function(o) { return o.n; });
  82774. * // => 20
  82775. *
  82776. * // The `_.property` iteratee shorthand.
  82777. * _.sumBy(objects, 'n');
  82778. * // => 20
  82779. */
  82780. function sumBy(array, iteratee) {
  82781. return (array && array.length)
  82782. ? baseSum(array, getIteratee(iteratee, 2))
  82783. : 0;
  82784. }
  82785. /*------------------------------------------------------------------------*/
  82786. // Add methods that return wrapped values in chain sequences.
  82787. lodash.after = after;
  82788. lodash.ary = ary;
  82789. lodash.assign = assign;
  82790. lodash.assignIn = assignIn;
  82791. lodash.assignInWith = assignInWith;
  82792. lodash.assignWith = assignWith;
  82793. lodash.at = at;
  82794. lodash.before = before;
  82795. lodash.bind = bind;
  82796. lodash.bindAll = bindAll;
  82797. lodash.bindKey = bindKey;
  82798. lodash.castArray = castArray;
  82799. lodash.chain = chain;
  82800. lodash.chunk = chunk;
  82801. lodash.compact = compact;
  82802. lodash.concat = concat;
  82803. lodash.cond = cond;
  82804. lodash.conforms = conforms;
  82805. lodash.constant = constant;
  82806. lodash.countBy = countBy;
  82807. lodash.create = create;
  82808. lodash.curry = curry;
  82809. lodash.curryRight = curryRight;
  82810. lodash.debounce = debounce;
  82811. lodash.defaults = defaults;
  82812. lodash.defaultsDeep = defaultsDeep;
  82813. lodash.defer = defer;
  82814. lodash.delay = delay;
  82815. lodash.difference = difference;
  82816. lodash.differenceBy = differenceBy;
  82817. lodash.differenceWith = differenceWith;
  82818. lodash.drop = drop;
  82819. lodash.dropRight = dropRight;
  82820. lodash.dropRightWhile = dropRightWhile;
  82821. lodash.dropWhile = dropWhile;
  82822. lodash.fill = fill;
  82823. lodash.filter = filter;
  82824. lodash.flatMap = flatMap;
  82825. lodash.flatMapDeep = flatMapDeep;
  82826. lodash.flatMapDepth = flatMapDepth;
  82827. lodash.flatten = flatten;
  82828. lodash.flattenDeep = flattenDeep;
  82829. lodash.flattenDepth = flattenDepth;
  82830. lodash.flip = flip;
  82831. lodash.flow = flow;
  82832. lodash.flowRight = flowRight;
  82833. lodash.fromPairs = fromPairs;
  82834. lodash.functions = functions;
  82835. lodash.functionsIn = functionsIn;
  82836. lodash.groupBy = groupBy;
  82837. lodash.initial = initial;
  82838. lodash.intersection = intersection;
  82839. lodash.intersectionBy = intersectionBy;
  82840. lodash.intersectionWith = intersectionWith;
  82841. lodash.invert = invert;
  82842. lodash.invertBy = invertBy;
  82843. lodash.invokeMap = invokeMap;
  82844. lodash.iteratee = iteratee;
  82845. lodash.keyBy = keyBy;
  82846. lodash.keys = keys;
  82847. lodash.keysIn = keysIn;
  82848. lodash.map = map;
  82849. lodash.mapKeys = mapKeys;
  82850. lodash.mapValues = mapValues;
  82851. lodash.matches = matches;
  82852. lodash.matchesProperty = matchesProperty;
  82853. lodash.memoize = memoize;
  82854. lodash.merge = merge;
  82855. lodash.mergeWith = mergeWith;
  82856. lodash.method = method;
  82857. lodash.methodOf = methodOf;
  82858. lodash.mixin = mixin;
  82859. lodash.negate = negate;
  82860. lodash.nthArg = nthArg;
  82861. lodash.omit = omit;
  82862. lodash.omitBy = omitBy;
  82863. lodash.once = once;
  82864. lodash.orderBy = orderBy;
  82865. lodash.over = over;
  82866. lodash.overArgs = overArgs;
  82867. lodash.overEvery = overEvery;
  82868. lodash.overSome = overSome;
  82869. lodash.partial = partial;
  82870. lodash.partialRight = partialRight;
  82871. lodash.partition = partition;
  82872. lodash.pick = pick;
  82873. lodash.pickBy = pickBy;
  82874. lodash.property = property;
  82875. lodash.propertyOf = propertyOf;
  82876. lodash.pull = pull;
  82877. lodash.pullAll = pullAll;
  82878. lodash.pullAllBy = pullAllBy;
  82879. lodash.pullAllWith = pullAllWith;
  82880. lodash.pullAt = pullAt;
  82881. lodash.range = range;
  82882. lodash.rangeRight = rangeRight;
  82883. lodash.rearg = rearg;
  82884. lodash.reject = reject;
  82885. lodash.remove = remove;
  82886. lodash.rest = rest;
  82887. lodash.reverse = reverse;
  82888. lodash.sampleSize = sampleSize;
  82889. lodash.set = set;
  82890. lodash.setWith = setWith;
  82891. lodash.shuffle = shuffle;
  82892. lodash.slice = slice;
  82893. lodash.sortBy = sortBy;
  82894. lodash.sortedUniq = sortedUniq;
  82895. lodash.sortedUniqBy = sortedUniqBy;
  82896. lodash.split = split;
  82897. lodash.spread = spread;
  82898. lodash.tail = tail;
  82899. lodash.take = take;
  82900. lodash.takeRight = takeRight;
  82901. lodash.takeRightWhile = takeRightWhile;
  82902. lodash.takeWhile = takeWhile;
  82903. lodash.tap = tap;
  82904. lodash.throttle = throttle;
  82905. lodash.thru = thru;
  82906. lodash.toArray = toArray;
  82907. lodash.toPairs = toPairs;
  82908. lodash.toPairsIn = toPairsIn;
  82909. lodash.toPath = toPath;
  82910. lodash.toPlainObject = toPlainObject;
  82911. lodash.transform = transform;
  82912. lodash.unary = unary;
  82913. lodash.union = union;
  82914. lodash.unionBy = unionBy;
  82915. lodash.unionWith = unionWith;
  82916. lodash.uniq = uniq;
  82917. lodash.uniqBy = uniqBy;
  82918. lodash.uniqWith = uniqWith;
  82919. lodash.unset = unset;
  82920. lodash.unzip = unzip;
  82921. lodash.unzipWith = unzipWith;
  82922. lodash.update = update;
  82923. lodash.updateWith = updateWith;
  82924. lodash.values = values;
  82925. lodash.valuesIn = valuesIn;
  82926. lodash.without = without;
  82927. lodash.words = words;
  82928. lodash.wrap = wrap;
  82929. lodash.xor = xor;
  82930. lodash.xorBy = xorBy;
  82931. lodash.xorWith = xorWith;
  82932. lodash.zip = zip;
  82933. lodash.zipObject = zipObject;
  82934. lodash.zipObjectDeep = zipObjectDeep;
  82935. lodash.zipWith = zipWith;
  82936. // Add aliases.
  82937. lodash.entries = toPairs;
  82938. lodash.entriesIn = toPairsIn;
  82939. lodash.extend = assignIn;
  82940. lodash.extendWith = assignInWith;
  82941. // Add methods to `lodash.prototype`.
  82942. mixin(lodash, lodash);
  82943. /*------------------------------------------------------------------------*/
  82944. // Add methods that return unwrapped values in chain sequences.
  82945. lodash.add = add;
  82946. lodash.attempt = attempt;
  82947. lodash.camelCase = camelCase;
  82948. lodash.capitalize = capitalize;
  82949. lodash.ceil = ceil;
  82950. lodash.clamp = clamp;
  82951. lodash.clone = clone;
  82952. lodash.cloneDeep = cloneDeep;
  82953. lodash.cloneDeepWith = cloneDeepWith;
  82954. lodash.cloneWith = cloneWith;
  82955. lodash.conformsTo = conformsTo;
  82956. lodash.deburr = deburr;
  82957. lodash.defaultTo = defaultTo;
  82958. lodash.divide = divide;
  82959. lodash.endsWith = endsWith;
  82960. lodash.eq = eq;
  82961. lodash.escape = escape;
  82962. lodash.escapeRegExp = escapeRegExp;
  82963. lodash.every = every;
  82964. lodash.find = find;
  82965. lodash.findIndex = findIndex;
  82966. lodash.findKey = findKey;
  82967. lodash.findLast = findLast;
  82968. lodash.findLastIndex = findLastIndex;
  82969. lodash.findLastKey = findLastKey;
  82970. lodash.floor = floor;
  82971. lodash.forEach = forEach;
  82972. lodash.forEachRight = forEachRight;
  82973. lodash.forIn = forIn;
  82974. lodash.forInRight = forInRight;
  82975. lodash.forOwn = forOwn;
  82976. lodash.forOwnRight = forOwnRight;
  82977. lodash.get = get;
  82978. lodash.gt = gt;
  82979. lodash.gte = gte;
  82980. lodash.has = has;
  82981. lodash.hasIn = hasIn;
  82982. lodash.head = head;
  82983. lodash.identity = identity;
  82984. lodash.includes = includes;
  82985. lodash.indexOf = indexOf;
  82986. lodash.inRange = inRange;
  82987. lodash.invoke = invoke;
  82988. lodash.isArguments = isArguments;
  82989. lodash.isArray = isArray;
  82990. lodash.isArrayBuffer = isArrayBuffer;
  82991. lodash.isArrayLike = isArrayLike;
  82992. lodash.isArrayLikeObject = isArrayLikeObject;
  82993. lodash.isBoolean = isBoolean;
  82994. lodash.isBuffer = isBuffer;
  82995. lodash.isDate = isDate;
  82996. lodash.isElement = isElement;
  82997. lodash.isEmpty = isEmpty;
  82998. lodash.isEqual = isEqual;
  82999. lodash.isEqualWith = isEqualWith;
  83000. lodash.isError = isError;
  83001. lodash.isFinite = isFinite;
  83002. lodash.isFunction = isFunction;
  83003. lodash.isInteger = isInteger;
  83004. lodash.isLength = isLength;
  83005. lodash.isMap = isMap;
  83006. lodash.isMatch = isMatch;
  83007. lodash.isMatchWith = isMatchWith;
  83008. lodash.isNaN = isNaN;
  83009. lodash.isNative = isNative;
  83010. lodash.isNil = isNil;
  83011. lodash.isNull = isNull;
  83012. lodash.isNumber = isNumber;
  83013. lodash.isObject = isObject;
  83014. lodash.isObjectLike = isObjectLike;
  83015. lodash.isPlainObject = isPlainObject;
  83016. lodash.isRegExp = isRegExp;
  83017. lodash.isSafeInteger = isSafeInteger;
  83018. lodash.isSet = isSet;
  83019. lodash.isString = isString;
  83020. lodash.isSymbol = isSymbol;
  83021. lodash.isTypedArray = isTypedArray;
  83022. lodash.isUndefined = isUndefined;
  83023. lodash.isWeakMap = isWeakMap;
  83024. lodash.isWeakSet = isWeakSet;
  83025. lodash.join = join;
  83026. lodash.kebabCase = kebabCase;
  83027. lodash.last = last;
  83028. lodash.lastIndexOf = lastIndexOf;
  83029. lodash.lowerCase = lowerCase;
  83030. lodash.lowerFirst = lowerFirst;
  83031. lodash.lt = lt;
  83032. lodash.lte = lte;
  83033. lodash.max = max;
  83034. lodash.maxBy = maxBy;
  83035. lodash.mean = mean;
  83036. lodash.meanBy = meanBy;
  83037. lodash.min = min;
  83038. lodash.minBy = minBy;
  83039. lodash.stubArray = stubArray;
  83040. lodash.stubFalse = stubFalse;
  83041. lodash.stubObject = stubObject;
  83042. lodash.stubString = stubString;
  83043. lodash.stubTrue = stubTrue;
  83044. lodash.multiply = multiply;
  83045. lodash.nth = nth;
  83046. lodash.noConflict = noConflict;
  83047. lodash.noop = noop;
  83048. lodash.now = now;
  83049. lodash.pad = pad;
  83050. lodash.padEnd = padEnd;
  83051. lodash.padStart = padStart;
  83052. lodash.parseInt = parseInt;
  83053. lodash.random = random;
  83054. lodash.reduce = reduce;
  83055. lodash.reduceRight = reduceRight;
  83056. lodash.repeat = repeat;
  83057. lodash.replace = replace;
  83058. lodash.result = result;
  83059. lodash.round = round;
  83060. lodash.runInContext = runInContext;
  83061. lodash.sample = sample;
  83062. lodash.size = size;
  83063. lodash.snakeCase = snakeCase;
  83064. lodash.some = some;
  83065. lodash.sortedIndex = sortedIndex;
  83066. lodash.sortedIndexBy = sortedIndexBy;
  83067. lodash.sortedIndexOf = sortedIndexOf;
  83068. lodash.sortedLastIndex = sortedLastIndex;
  83069. lodash.sortedLastIndexBy = sortedLastIndexBy;
  83070. lodash.sortedLastIndexOf = sortedLastIndexOf;
  83071. lodash.startCase = startCase;
  83072. lodash.startsWith = startsWith;
  83073. lodash.subtract = subtract;
  83074. lodash.sum = sum;
  83075. lodash.sumBy = sumBy;
  83076. lodash.template = template;
  83077. lodash.times = times;
  83078. lodash.toFinite = toFinite;
  83079. lodash.toInteger = toInteger;
  83080. lodash.toLength = toLength;
  83081. lodash.toLower = toLower;
  83082. lodash.toNumber = toNumber;
  83083. lodash.toSafeInteger = toSafeInteger;
  83084. lodash.toString = toString;
  83085. lodash.toUpper = toUpper;
  83086. lodash.trim = trim;
  83087. lodash.trimEnd = trimEnd;
  83088. lodash.trimStart = trimStart;
  83089. lodash.truncate = truncate;
  83090. lodash.unescape = unescape;
  83091. lodash.uniqueId = uniqueId;
  83092. lodash.upperCase = upperCase;
  83093. lodash.upperFirst = upperFirst;
  83094. // Add aliases.
  83095. lodash.each = forEach;
  83096. lodash.eachRight = forEachRight;
  83097. lodash.first = head;
  83098. mixin(lodash, (function() {
  83099. var source = {};
  83100. baseForOwn(lodash, function(func, methodName) {
  83101. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  83102. source[methodName] = func;
  83103. }
  83104. });
  83105. return source;
  83106. }()), { 'chain': false });
  83107. /*------------------------------------------------------------------------*/
  83108. /**
  83109. * The semantic version number.
  83110. *
  83111. * @static
  83112. * @memberOf _
  83113. * @type {string}
  83114. */
  83115. lodash.VERSION = VERSION;
  83116. // Assign default placeholders.
  83117. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  83118. lodash[methodName].placeholder = lodash;
  83119. });
  83120. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  83121. arrayEach(['drop', 'take'], function(methodName, index) {
  83122. LazyWrapper.prototype[methodName] = function(n) {
  83123. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  83124. var result = (this.__filtered__ && !index)
  83125. ? new LazyWrapper(this)
  83126. : this.clone();
  83127. if (result.__filtered__) {
  83128. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  83129. } else {
  83130. result.__views__.push({
  83131. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  83132. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  83133. });
  83134. }
  83135. return result;
  83136. };
  83137. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  83138. return this.reverse()[methodName](n).reverse();
  83139. };
  83140. });
  83141. // Add `LazyWrapper` methods that accept an `iteratee` value.
  83142. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  83143. var type = index + 1,
  83144. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  83145. LazyWrapper.prototype[methodName] = function(iteratee) {
  83146. var result = this.clone();
  83147. result.__iteratees__.push({
  83148. 'iteratee': getIteratee(iteratee, 3),
  83149. 'type': type
  83150. });
  83151. result.__filtered__ = result.__filtered__ || isFilter;
  83152. return result;
  83153. };
  83154. });
  83155. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  83156. arrayEach(['head', 'last'], function(methodName, index) {
  83157. var takeName = 'take' + (index ? 'Right' : '');
  83158. LazyWrapper.prototype[methodName] = function() {
  83159. return this[takeName](1).value()[0];
  83160. };
  83161. });
  83162. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  83163. arrayEach(['initial', 'tail'], function(methodName, index) {
  83164. var dropName = 'drop' + (index ? '' : 'Right');
  83165. LazyWrapper.prototype[methodName] = function() {
  83166. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  83167. };
  83168. });
  83169. LazyWrapper.prototype.compact = function() {
  83170. return this.filter(identity);
  83171. };
  83172. LazyWrapper.prototype.find = function(predicate) {
  83173. return this.filter(predicate).head();
  83174. };
  83175. LazyWrapper.prototype.findLast = function(predicate) {
  83176. return this.reverse().find(predicate);
  83177. };
  83178. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  83179. if (typeof path == 'function') {
  83180. return new LazyWrapper(this);
  83181. }
  83182. return this.map(function(value) {
  83183. return baseInvoke(value, path, args);
  83184. });
  83185. });
  83186. LazyWrapper.prototype.reject = function(predicate) {
  83187. return this.filter(negate(getIteratee(predicate)));
  83188. };
  83189. LazyWrapper.prototype.slice = function(start, end) {
  83190. start = toInteger(start);
  83191. var result = this;
  83192. if (result.__filtered__ && (start > 0 || end < 0)) {
  83193. return new LazyWrapper(result);
  83194. }
  83195. if (start < 0) {
  83196. result = result.takeRight(-start);
  83197. } else if (start) {
  83198. result = result.drop(start);
  83199. }
  83200. if (end !== undefined) {
  83201. end = toInteger(end);
  83202. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  83203. }
  83204. return result;
  83205. };
  83206. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  83207. return this.reverse().takeWhile(predicate).reverse();
  83208. };
  83209. LazyWrapper.prototype.toArray = function() {
  83210. return this.take(MAX_ARRAY_LENGTH);
  83211. };
  83212. // Add `LazyWrapper` methods to `lodash.prototype`.
  83213. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  83214. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  83215. isTaker = /^(?:head|last)$/.test(methodName),
  83216. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  83217. retUnwrapped = isTaker || /^find/.test(methodName);
  83218. if (!lodashFunc) {
  83219. return;
  83220. }
  83221. lodash.prototype[methodName] = function() {
  83222. var value = this.__wrapped__,
  83223. args = isTaker ? [1] : arguments,
  83224. isLazy = value instanceof LazyWrapper,
  83225. iteratee = args[0],
  83226. useLazy = isLazy || isArray(value);
  83227. var interceptor = function(value) {
  83228. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  83229. return (isTaker && chainAll) ? result[0] : result;
  83230. };
  83231. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  83232. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  83233. isLazy = useLazy = false;
  83234. }
  83235. var chainAll = this.__chain__,
  83236. isHybrid = !!this.__actions__.length,
  83237. isUnwrapped = retUnwrapped && !chainAll,
  83238. onlyLazy = isLazy && !isHybrid;
  83239. if (!retUnwrapped && useLazy) {
  83240. value = onlyLazy ? value : new LazyWrapper(this);
  83241. var result = func.apply(value, args);
  83242. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  83243. return new LodashWrapper(result, chainAll);
  83244. }
  83245. if (isUnwrapped && onlyLazy) {
  83246. return func.apply(this, args);
  83247. }
  83248. result = this.thru(interceptor);
  83249. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  83250. };
  83251. });
  83252. // Add `Array` methods to `lodash.prototype`.
  83253. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  83254. var func = arrayProto[methodName],
  83255. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  83256. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  83257. lodash.prototype[methodName] = function() {
  83258. var args = arguments;
  83259. if (retUnwrapped && !this.__chain__) {
  83260. var value = this.value();
  83261. return func.apply(isArray(value) ? value : [], args);
  83262. }
  83263. return this[chainName](function(value) {
  83264. return func.apply(isArray(value) ? value : [], args);
  83265. });
  83266. };
  83267. });
  83268. // Map minified method names to their real names.
  83269. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  83270. var lodashFunc = lodash[methodName];
  83271. if (lodashFunc) {
  83272. var key = lodashFunc.name + '';
  83273. if (!hasOwnProperty.call(realNames, key)) {
  83274. realNames[key] = [];
  83275. }
  83276. realNames[key].push({ 'name': methodName, 'func': lodashFunc });
  83277. }
  83278. });
  83279. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  83280. 'name': 'wrapper',
  83281. 'func': undefined
  83282. }];
  83283. // Add methods to `LazyWrapper`.
  83284. LazyWrapper.prototype.clone = lazyClone;
  83285. LazyWrapper.prototype.reverse = lazyReverse;
  83286. LazyWrapper.prototype.value = lazyValue;
  83287. // Add chain sequence methods to the `lodash` wrapper.
  83288. lodash.prototype.at = wrapperAt;
  83289. lodash.prototype.chain = wrapperChain;
  83290. lodash.prototype.commit = wrapperCommit;
  83291. lodash.prototype.next = wrapperNext;
  83292. lodash.prototype.plant = wrapperPlant;
  83293. lodash.prototype.reverse = wrapperReverse;
  83294. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  83295. // Add lazy aliases.
  83296. lodash.prototype.first = lodash.prototype.head;
  83297. if (symIterator) {
  83298. lodash.prototype[symIterator] = wrapperToIterator;
  83299. }
  83300. return lodash;
  83301. });
  83302. /*--------------------------------------------------------------------------*/
  83303. // Export lodash.
  83304. var _ = runInContext();
  83305. // Some AMD build optimizers, like r.js, check for condition patterns like:
  83306. if (true) {
  83307. // Expose Lodash on the global object to prevent errors when Lodash is
  83308. // loaded by a script tag in the presence of an AMD loader.
  83309. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  83310. // Use `_.noConflict` to remove Lodash from the global object.
  83311. root._ = _;
  83312. // Define as an anonymous module so, through path mapping, it can be
  83313. // referenced as the "underscore" module.
  83314. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  83315. return _;
  83316. }).call(exports, __webpack_require__, exports, module),
  83317. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  83318. }
  83319. // Check for `exports` after `define` in case a build optimizer adds it.
  83320. else {}
  83321. }.call(this));
  83322. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js"), __webpack_require__(/*! ./../_webpack@4.46.0@webpack/buildin/module.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/module.js")(module)))
  83323. /***/ }),
  83324. /***/ "./node_modules/_node-libs-browser@2.2.1@node-libs-browser/mock/process.js":
  83325. /*!*********************************************************************************!*\
  83326. !*** ./node_modules/_node-libs-browser@2.2.1@node-libs-browser/mock/process.js ***!
  83327. \*********************************************************************************/
  83328. /*! no static exports found */
  83329. /***/ (function(module, exports, __webpack_require__) {
  83330. exports.nextTick = function nextTick(fn) {
  83331. var args = Array.prototype.slice.call(arguments);
  83332. args.shift();
  83333. setTimeout(function () {
  83334. fn.apply(null, args);
  83335. }, 0);
  83336. };
  83337. exports.platform = exports.arch =
  83338. exports.execPath = exports.title = 'browser';
  83339. exports.pid = 1;
  83340. exports.browser = true;
  83341. exports.env = {};
  83342. exports.argv = [];
  83343. exports.binding = function (name) {
  83344. throw new Error('No such module. (Possibly not yet loaded)')
  83345. };
  83346. (function () {
  83347. var cwd = '/';
  83348. var path;
  83349. exports.cwd = function () { return cwd };
  83350. exports.chdir = function (dir) {
  83351. if (!path) path = __webpack_require__(/*! path */ "./node_modules/_path-browserify@0.0.1@path-browserify/index.js");
  83352. cwd = path.resolve(dir, cwd);
  83353. };
  83354. })();
  83355. exports.exit = exports.kill =
  83356. exports.umask = exports.dlopen =
  83357. exports.uptime = exports.memoryUsage =
  83358. exports.uvCounters = function() {};
  83359. exports.features = {};
  83360. /***/ }),
  83361. /***/ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/index.js":
  83362. /*!**********************************************************************!*\
  83363. !*** ./node_modules/_normalize-wheel@1.0.1@normalize-wheel/index.js ***!
  83364. \**********************************************************************/
  83365. /*! no static exports found */
  83366. /***/ (function(module, exports, __webpack_require__) {
  83367. module.exports = __webpack_require__(/*! ./src/normalizeWheel.js */ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/normalizeWheel.js");
  83368. /***/ }),
  83369. /***/ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/ExecutionEnvironment.js":
  83370. /*!*****************************************************************************************!*\
  83371. !*** ./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/ExecutionEnvironment.js ***!
  83372. \*****************************************************************************************/
  83373. /*! no static exports found */
  83374. /***/ (function(module, exports, __webpack_require__) {
  83375. "use strict";
  83376. /**
  83377. * Copyright (c) 2015, Facebook, Inc.
  83378. * All rights reserved.
  83379. *
  83380. * This source code is licensed under the BSD-style license found in the
  83381. * LICENSE file in the root directory of this source tree. An additional grant
  83382. * of patent rights can be found in the PATENTS file in the same directory.
  83383. *
  83384. * @providesModule ExecutionEnvironment
  83385. */
  83386. /*jslint evil: true */
  83387. var canUseDOM = !!(
  83388. typeof window !== 'undefined' &&
  83389. window.document &&
  83390. window.document.createElement
  83391. );
  83392. /**
  83393. * Simple, lightweight module assisting with the detection and context of
  83394. * Worker. Helps avoid circular dependencies and allows code to reason about
  83395. * whether or not they are in a Worker, even if they never include the main
  83396. * `ReactWorker` dependency.
  83397. */
  83398. var ExecutionEnvironment = {
  83399. canUseDOM: canUseDOM,
  83400. canUseWorkers: typeof Worker !== 'undefined',
  83401. canUseEventListeners:
  83402. canUseDOM && !!(window.addEventListener || window.attachEvent),
  83403. canUseViewport: canUseDOM && !!window.screen,
  83404. isInWorker: !canUseDOM // For now, this is true - might change in the future.
  83405. };
  83406. module.exports = ExecutionEnvironment;
  83407. /***/ }),
  83408. /***/ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/UserAgent_DEPRECATED.js":
  83409. /*!*****************************************************************************************!*\
  83410. !*** ./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/UserAgent_DEPRECATED.js ***!
  83411. \*****************************************************************************************/
  83412. /*! no static exports found */
  83413. /***/ (function(module, exports) {
  83414. /**
  83415. * Copyright 2004-present Facebook. All Rights Reserved.
  83416. *
  83417. * @providesModule UserAgent_DEPRECATED
  83418. */
  83419. /**
  83420. * Provides entirely client-side User Agent and OS detection. You should prefer
  83421. * the non-deprecated UserAgent module when possible, which exposes our
  83422. * authoritative server-side PHP-based detection to the client.
  83423. *
  83424. * Usage is straightforward:
  83425. *
  83426. * if (UserAgent_DEPRECATED.ie()) {
  83427. * // IE
  83428. * }
  83429. *
  83430. * You can also do version checks:
  83431. *
  83432. * if (UserAgent_DEPRECATED.ie() >= 7) {
  83433. * // IE7 or better
  83434. * }
  83435. *
  83436. * The browser functions will return NaN if the browser does not match, so
  83437. * you can also do version compares the other way:
  83438. *
  83439. * if (UserAgent_DEPRECATED.ie() < 7) {
  83440. * // IE6 or worse
  83441. * }
  83442. *
  83443. * Note that the version is a float and may include a minor version number,
  83444. * so you should always use range operators to perform comparisons, not
  83445. * strict equality.
  83446. *
  83447. * **Note:** You should **strongly** prefer capability detection to browser
  83448. * version detection where it's reasonable:
  83449. *
  83450. * http://www.quirksmode.org/js/support.html
  83451. *
  83452. * Further, we have a large number of mature wrapper functions and classes
  83453. * which abstract away many browser irregularities. Check the documentation,
  83454. * grep for things, or ask on javascript@lists.facebook.com before writing yet
  83455. * another copy of "event || window.event".
  83456. *
  83457. */
  83458. var _populated = false;
  83459. // Browsers
  83460. var _ie, _firefox, _opera, _webkit, _chrome;
  83461. // Actual IE browser for compatibility mode
  83462. var _ie_real_version;
  83463. // Platforms
  83464. var _osx, _windows, _linux, _android;
  83465. // Architectures
  83466. var _win64;
  83467. // Devices
  83468. var _iphone, _ipad, _native;
  83469. var _mobile;
  83470. function _populate() {
  83471. if (_populated) {
  83472. return;
  83473. }
  83474. _populated = true;
  83475. // To work around buggy JS libraries that can't handle multi-digit
  83476. // version numbers, Opera 10's user agent string claims it's Opera
  83477. // 9, then later includes a Version/X.Y field:
  83478. //
  83479. // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
  83480. var uas = navigator.userAgent;
  83481. var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
  83482. var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
  83483. _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
  83484. _ipad = /\b(iP[ao]d)/.exec(uas);
  83485. _android = /Android/i.exec(uas);
  83486. _native = /FBAN\/\w+;/i.exec(uas);
  83487. _mobile = /Mobile/i.exec(uas);
  83488. // Note that the IE team blog would have you believe you should be checking
  83489. // for 'Win64; x64'. But MSDN then reveals that you can actually be coming
  83490. // from either x64 or ia64; so ultimately, you should just check for Win64
  83491. // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
  83492. // Windows will send 'WOW64' instead.
  83493. _win64 = !!(/Win64/.exec(uas));
  83494. if (agent) {
  83495. _ie = agent[1] ? parseFloat(agent[1]) : (
  83496. agent[5] ? parseFloat(agent[5]) : NaN);
  83497. // IE compatibility mode
  83498. if (_ie && document && document.documentMode) {
  83499. _ie = document.documentMode;
  83500. }
  83501. // grab the "true" ie version from the trident token if available
  83502. var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
  83503. _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
  83504. _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
  83505. _opera = agent[3] ? parseFloat(agent[3]) : NaN;
  83506. _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
  83507. if (_webkit) {
  83508. // We do not add the regexp to the above test, because it will always
  83509. // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
  83510. // the userAgent string.
  83511. agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
  83512. _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
  83513. } else {
  83514. _chrome = NaN;
  83515. }
  83516. } else {
  83517. _ie = _firefox = _opera = _chrome = _webkit = NaN;
  83518. }
  83519. if (os) {
  83520. if (os[1]) {
  83521. // Detect OS X version. If no version number matches, set _osx to true.
  83522. // Version examples: 10, 10_6_1, 10.7
  83523. // Parses version number as a float, taking only first two sets of
  83524. // digits. If only one set of digits is found, returns just the major
  83525. // version number.
  83526. var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
  83527. _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
  83528. } else {
  83529. _osx = false;
  83530. }
  83531. _windows = !!os[2];
  83532. _linux = !!os[3];
  83533. } else {
  83534. _osx = _windows = _linux = false;
  83535. }
  83536. }
  83537. var UserAgent_DEPRECATED = {
  83538. /**
  83539. * Check if the UA is Internet Explorer.
  83540. *
  83541. *
  83542. * @return float|NaN Version number (if match) or NaN.
  83543. */
  83544. ie: function() {
  83545. return _populate() || _ie;
  83546. },
  83547. /**
  83548. * Check if we're in Internet Explorer compatibility mode.
  83549. *
  83550. * @return bool true if in compatibility mode, false if
  83551. * not compatibility mode or not ie
  83552. */
  83553. ieCompatibilityMode: function() {
  83554. return _populate() || (_ie_real_version > _ie);
  83555. },
  83556. /**
  83557. * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
  83558. * only need this because Skype can't handle 64-bit IE yet. We need to remove
  83559. * this when we don't need it -- tracked by #601957.
  83560. */
  83561. ie64: function() {
  83562. return UserAgent_DEPRECATED.ie() && _win64;
  83563. },
  83564. /**
  83565. * Check if the UA is Firefox.
  83566. *
  83567. *
  83568. * @return float|NaN Version number (if match) or NaN.
  83569. */
  83570. firefox: function() {
  83571. return _populate() || _firefox;
  83572. },
  83573. /**
  83574. * Check if the UA is Opera.
  83575. *
  83576. *
  83577. * @return float|NaN Version number (if match) or NaN.
  83578. */
  83579. opera: function() {
  83580. return _populate() || _opera;
  83581. },
  83582. /**
  83583. * Check if the UA is WebKit.
  83584. *
  83585. *
  83586. * @return float|NaN Version number (if match) or NaN.
  83587. */
  83588. webkit: function() {
  83589. return _populate() || _webkit;
  83590. },
  83591. /**
  83592. * For Push
  83593. * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
  83594. */
  83595. safari: function() {
  83596. return UserAgent_DEPRECATED.webkit();
  83597. },
  83598. /**
  83599. * Check if the UA is a Chrome browser.
  83600. *
  83601. *
  83602. * @return float|NaN Version number (if match) or NaN.
  83603. */
  83604. chrome : function() {
  83605. return _populate() || _chrome;
  83606. },
  83607. /**
  83608. * Check if the user is running Windows.
  83609. *
  83610. * @return bool `true' if the user's OS is Windows.
  83611. */
  83612. windows: function() {
  83613. return _populate() || _windows;
  83614. },
  83615. /**
  83616. * Check if the user is running Mac OS X.
  83617. *
  83618. * @return float|bool Returns a float if a version number is detected,
  83619. * otherwise true/false.
  83620. */
  83621. osx: function() {
  83622. return _populate() || _osx;
  83623. },
  83624. /**
  83625. * Check if the user is running Linux.
  83626. *
  83627. * @return bool `true' if the user's OS is some flavor of Linux.
  83628. */
  83629. linux: function() {
  83630. return _populate() || _linux;
  83631. },
  83632. /**
  83633. * Check if the user is running on an iPhone or iPod platform.
  83634. *
  83635. * @return bool `true' if the user is running some flavor of the
  83636. * iPhone OS.
  83637. */
  83638. iphone: function() {
  83639. return _populate() || _iphone;
  83640. },
  83641. mobile: function() {
  83642. return _populate() || (_iphone || _ipad || _android || _mobile);
  83643. },
  83644. nativeApp: function() {
  83645. // webviews inside of the native apps
  83646. return _populate() || _native;
  83647. },
  83648. android: function() {
  83649. return _populate() || _android;
  83650. },
  83651. ipad: function() {
  83652. return _populate() || _ipad;
  83653. }
  83654. };
  83655. module.exports = UserAgent_DEPRECATED;
  83656. /***/ }),
  83657. /***/ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/isEventSupported.js":
  83658. /*!*************************************************************************************!*\
  83659. !*** ./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/isEventSupported.js ***!
  83660. \*************************************************************************************/
  83661. /*! no static exports found */
  83662. /***/ (function(module, exports, __webpack_require__) {
  83663. "use strict";
  83664. /**
  83665. * Copyright 2013-2015, Facebook, Inc.
  83666. * All rights reserved.
  83667. *
  83668. * This source code is licensed under the BSD-style license found in the
  83669. * LICENSE file in the root directory of this source tree. An additional grant
  83670. * of patent rights can be found in the PATENTS file in the same directory.
  83671. *
  83672. * @providesModule isEventSupported
  83673. */
  83674. var ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/ExecutionEnvironment.js");
  83675. var useHasFeature;
  83676. if (ExecutionEnvironment.canUseDOM) {
  83677. useHasFeature =
  83678. document.implementation &&
  83679. document.implementation.hasFeature &&
  83680. // always returns true in newer browsers as per the standard.
  83681. // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
  83682. document.implementation.hasFeature('', '') !== true;
  83683. }
  83684. /**
  83685. * Checks if an event is supported in the current execution environment.
  83686. *
  83687. * NOTE: This will not work correctly for non-generic events such as `change`,
  83688. * `reset`, `load`, `error`, and `select`.
  83689. *
  83690. * Borrows from Modernizr.
  83691. *
  83692. * @param {string} eventNameSuffix Event name, e.g. "click".
  83693. * @param {?boolean} capture Check if the capture phase is supported.
  83694. * @return {boolean} True if the event is supported.
  83695. * @internal
  83696. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  83697. */
  83698. function isEventSupported(eventNameSuffix, capture) {
  83699. if (!ExecutionEnvironment.canUseDOM ||
  83700. capture && !('addEventListener' in document)) {
  83701. return false;
  83702. }
  83703. var eventName = 'on' + eventNameSuffix;
  83704. var isSupported = eventName in document;
  83705. if (!isSupported) {
  83706. var element = document.createElement('div');
  83707. element.setAttribute(eventName, 'return;');
  83708. isSupported = typeof element[eventName] === 'function';
  83709. }
  83710. if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
  83711. // This is the only way to test support for the `wheel` event in IE9+.
  83712. isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
  83713. }
  83714. return isSupported;
  83715. }
  83716. module.exports = isEventSupported;
  83717. /***/ }),
  83718. /***/ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/normalizeWheel.js":
  83719. /*!***********************************************************************************!*\
  83720. !*** ./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/normalizeWheel.js ***!
  83721. \***********************************************************************************/
  83722. /*! no static exports found */
  83723. /***/ (function(module, exports, __webpack_require__) {
  83724. "use strict";
  83725. /**
  83726. * Copyright (c) 2015, Facebook, Inc.
  83727. * All rights reserved.
  83728. *
  83729. * This source code is licensed under the BSD-style license found in the
  83730. * LICENSE file in the root directory of this source tree. An additional grant
  83731. * of patent rights can be found in the PATENTS file in the same directory.
  83732. *
  83733. * @providesModule normalizeWheel
  83734. * @typechecks
  83735. */
  83736. var UserAgent_DEPRECATED = __webpack_require__(/*! ./UserAgent_DEPRECATED */ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/UserAgent_DEPRECATED.js");
  83737. var isEventSupported = __webpack_require__(/*! ./isEventSupported */ "./node_modules/_normalize-wheel@1.0.1@normalize-wheel/src/isEventSupported.js");
  83738. // Reasonable defaults
  83739. var PIXEL_STEP = 10;
  83740. var LINE_HEIGHT = 40;
  83741. var PAGE_HEIGHT = 800;
  83742. /**
  83743. * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
  83744. * complicated, thus this doc is long and (hopefully) detailed enough to answer
  83745. * your questions.
  83746. *
  83747. * If you need to react to the mouse wheel in a predictable way, this code is
  83748. * like your bestest friend. * hugs *
  83749. *
  83750. * As of today, there are 4 DOM event types you can listen to:
  83751. *
  83752. * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
  83753. * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
  83754. * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
  83755. * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
  83756. *
  83757. * So what to do? The is the best:
  83758. *
  83759. * normalizeWheel.getEventType();
  83760. *
  83761. * In your event callback, use this code to get sane interpretation of the
  83762. * deltas. This code will return an object with properties:
  83763. *
  83764. * spinX -- normalized spin speed (use for zoom) - x plane
  83765. * spinY -- " - y plane
  83766. * pixelX -- normalized distance (to pixels) - x plane
  83767. * pixelY -- " - y plane
  83768. *
  83769. * Wheel values are provided by the browser assuming you are using the wheel to
  83770. * scroll a web page by a number of lines or pixels (or pages). Values can vary
  83771. * significantly on different platforms and browsers, forgetting that you can
  83772. * scroll at different speeds. Some devices (like trackpads) emit more events
  83773. * at smaller increments with fine granularity, and some emit massive jumps with
  83774. * linear speed or acceleration.
  83775. *
  83776. * This code does its best to normalize the deltas for you:
  83777. *
  83778. * - spin is trying to normalize how far the wheel was spun (or trackpad
  83779. * dragged). This is super useful for zoom support where you want to
  83780. * throw away the chunky scroll steps on the PC and make those equal to
  83781. * the slow and smooth tiny steps on the Mac. Key data: This code tries to
  83782. * resolve a single slow step on a wheel to 1.
  83783. *
  83784. * - pixel is normalizing the desired scroll delta in pixel units. You'll
  83785. * get the crazy differences between browsers, but at least it'll be in
  83786. * pixels!
  83787. *
  83788. * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
  83789. * should translate to positive value zooming IN, negative zooming OUT.
  83790. * This matches the newer 'wheel' event.
  83791. *
  83792. * Why are there spinX, spinY (or pixels)?
  83793. *
  83794. * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
  83795. * with a mouse. It results in side-scrolling in the browser by default.
  83796. *
  83797. * - spinY is what you expect -- it's the classic axis of a mouse wheel.
  83798. *
  83799. * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
  83800. * probably is by browsers in conjunction with fancy 3D controllers .. but
  83801. * you know.
  83802. *
  83803. * Implementation info:
  83804. *
  83805. * Examples of 'wheel' event if you scroll slowly (down) by one step with an
  83806. * average mouse:
  83807. *
  83808. * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
  83809. * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
  83810. * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
  83811. * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
  83812. * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
  83813. *
  83814. * On the trackpad:
  83815. *
  83816. * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
  83817. * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
  83818. *
  83819. * On other/older browsers.. it's more complicated as there can be multiple and
  83820. * also missing delta values.
  83821. *
  83822. * The 'wheel' event is more standard:
  83823. *
  83824. * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
  83825. *
  83826. * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
  83827. * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
  83828. * backward compatibility with older events. Those other values help us
  83829. * better normalize spin speed. Example of what the browsers provide:
  83830. *
  83831. * | event.wheelDelta | event.detail
  83832. * ------------------+------------------+--------------
  83833. * Safari v5/OS X | -120 | 0
  83834. * Safari v5/Win7 | -120 | 0
  83835. * Chrome v17/OS X | -120 | 0
  83836. * Chrome v17/Win7 | -120 | 0
  83837. * IE9/Win7 | -120 | undefined
  83838. * Firefox v4/OS X | undefined | 1
  83839. * Firefox v4/Win7 | undefined | 3
  83840. *
  83841. */
  83842. function normalizeWheel(/*object*/ event) /*object*/ {
  83843. var sX = 0, sY = 0, // spinX, spinY
  83844. pX = 0, pY = 0; // pixelX, pixelY
  83845. // Legacy
  83846. if ('detail' in event) { sY = event.detail; }
  83847. if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
  83848. if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
  83849. if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
  83850. // side scrolling on FF with DOMMouseScroll
  83851. if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
  83852. sX = sY;
  83853. sY = 0;
  83854. }
  83855. pX = sX * PIXEL_STEP;
  83856. pY = sY * PIXEL_STEP;
  83857. if ('deltaY' in event) { pY = event.deltaY; }
  83858. if ('deltaX' in event) { pX = event.deltaX; }
  83859. if ((pX || pY) && event.deltaMode) {
  83860. if (event.deltaMode == 1) { // delta in LINE units
  83861. pX *= LINE_HEIGHT;
  83862. pY *= LINE_HEIGHT;
  83863. } else { // delta in PAGE units
  83864. pX *= PAGE_HEIGHT;
  83865. pY *= PAGE_HEIGHT;
  83866. }
  83867. }
  83868. // Fall-back if spin cannot be determined
  83869. if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
  83870. if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
  83871. return { spinX : sX,
  83872. spinY : sY,
  83873. pixelX : pX,
  83874. pixelY : pY };
  83875. }
  83876. /**
  83877. * The best combination if you prefer spinX + spinY normalization. It favors
  83878. * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
  83879. * 'wheel' event, making spin speed determination impossible.
  83880. */
  83881. normalizeWheel.getEventType = function() /*string*/ {
  83882. return (UserAgent_DEPRECATED.firefox())
  83883. ? 'DOMMouseScroll'
  83884. : (isEventSupported('wheel'))
  83885. ? 'wheel'
  83886. : 'mousewheel';
  83887. };
  83888. module.exports = normalizeWheel;
  83889. /***/ }),
  83890. /***/ "./node_modules/_nprogress@0.2.0@nprogress/nprogress.css":
  83891. /*!***************************************************************!*\
  83892. !*** ./node_modules/_nprogress@0.2.0@nprogress/nprogress.css ***!
  83893. \***************************************************************/
  83894. /*! no static exports found */
  83895. /***/ (function(module, exports, __webpack_require__) {
  83896. // style-loader: Adds some css to the DOM by adding a <style> tag
  83897. // load the styles
  83898. var content = __webpack_require__(/*! !../_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!../_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./nprogress.css */ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_nprogress@0.2.0@nprogress/nprogress.css");
  83899. if(content.__esModule) content = content.default;
  83900. if(typeof content === 'string') content = [[module.i, content, '']];
  83901. if(content.locals) module.exports = content.locals;
  83902. // add the styles to the DOM
  83903. var add = __webpack_require__(/*! ../_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js */ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js").default
  83904. var update = add("33f23c36", content, false, {"sourceMap":true,"shadowMode":false});
  83905. // Hot Module Replacement
  83906. if(false) {}
  83907. /***/ }),
  83908. /***/ "./node_modules/_nprogress@0.2.0@nprogress/nprogress.js":
  83909. /*!**************************************************************!*\
  83910. !*** ./node_modules/_nprogress@0.2.0@nprogress/nprogress.js ***!
  83911. \**************************************************************/
  83912. /*! no static exports found */
  83913. /***/ (function(module, exports, __webpack_require__) {
  83914. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
  83915. * @license MIT */
  83916. ;(function(root, factory) {
  83917. if (true) {
  83918. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  83919. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  83920. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  83921. __WEBPACK_AMD_DEFINE_FACTORY__),
  83922. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  83923. } else {}
  83924. })(this, function() {
  83925. var NProgress = {};
  83926. NProgress.version = '0.2.0';
  83927. var Settings = NProgress.settings = {
  83928. minimum: 0.08,
  83929. easing: 'ease',
  83930. positionUsing: '',
  83931. speed: 200,
  83932. trickle: true,
  83933. trickleRate: 0.02,
  83934. trickleSpeed: 800,
  83935. showSpinner: true,
  83936. barSelector: '[role="bar"]',
  83937. spinnerSelector: '[role="spinner"]',
  83938. parent: 'body',
  83939. template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
  83940. };
  83941. /**
  83942. * Updates configuration.
  83943. *
  83944. * NProgress.configure({
  83945. * minimum: 0.1
  83946. * });
  83947. */
  83948. NProgress.configure = function(options) {
  83949. var key, value;
  83950. for (key in options) {
  83951. value = options[key];
  83952. if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
  83953. }
  83954. return this;
  83955. };
  83956. /**
  83957. * Last number.
  83958. */
  83959. NProgress.status = null;
  83960. /**
  83961. * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
  83962. *
  83963. * NProgress.set(0.4);
  83964. * NProgress.set(1.0);
  83965. */
  83966. NProgress.set = function(n) {
  83967. var started = NProgress.isStarted();
  83968. n = clamp(n, Settings.minimum, 1);
  83969. NProgress.status = (n === 1 ? null : n);
  83970. var progress = NProgress.render(!started),
  83971. bar = progress.querySelector(Settings.barSelector),
  83972. speed = Settings.speed,
  83973. ease = Settings.easing;
  83974. progress.offsetWidth; /* Repaint */
  83975. queue(function(next) {
  83976. // Set positionUsing if it hasn't already been set
  83977. if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
  83978. // Add transition
  83979. css(bar, barPositionCSS(n, speed, ease));
  83980. if (n === 1) {
  83981. // Fade out
  83982. css(progress, {
  83983. transition: 'none',
  83984. opacity: 1
  83985. });
  83986. progress.offsetWidth; /* Repaint */
  83987. setTimeout(function() {
  83988. css(progress, {
  83989. transition: 'all ' + speed + 'ms linear',
  83990. opacity: 0
  83991. });
  83992. setTimeout(function() {
  83993. NProgress.remove();
  83994. next();
  83995. }, speed);
  83996. }, speed);
  83997. } else {
  83998. setTimeout(next, speed);
  83999. }
  84000. });
  84001. return this;
  84002. };
  84003. NProgress.isStarted = function() {
  84004. return typeof NProgress.status === 'number';
  84005. };
  84006. /**
  84007. * Shows the progress bar.
  84008. * This is the same as setting the status to 0%, except that it doesn't go backwards.
  84009. *
  84010. * NProgress.start();
  84011. *
  84012. */
  84013. NProgress.start = function() {
  84014. if (!NProgress.status) NProgress.set(0);
  84015. var work = function() {
  84016. setTimeout(function() {
  84017. if (!NProgress.status) return;
  84018. NProgress.trickle();
  84019. work();
  84020. }, Settings.trickleSpeed);
  84021. };
  84022. if (Settings.trickle) work();
  84023. return this;
  84024. };
  84025. /**
  84026. * Hides the progress bar.
  84027. * This is the *sort of* the same as setting the status to 100%, with the
  84028. * difference being `done()` makes some placebo effect of some realistic motion.
  84029. *
  84030. * NProgress.done();
  84031. *
  84032. * If `true` is passed, it will show the progress bar even if its hidden.
  84033. *
  84034. * NProgress.done(true);
  84035. */
  84036. NProgress.done = function(force) {
  84037. if (!force && !NProgress.status) return this;
  84038. return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
  84039. };
  84040. /**
  84041. * Increments by a random amount.
  84042. */
  84043. NProgress.inc = function(amount) {
  84044. var n = NProgress.status;
  84045. if (!n) {
  84046. return NProgress.start();
  84047. } else {
  84048. if (typeof amount !== 'number') {
  84049. amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);
  84050. }
  84051. n = clamp(n + amount, 0, 0.994);
  84052. return NProgress.set(n);
  84053. }
  84054. };
  84055. NProgress.trickle = function() {
  84056. return NProgress.inc(Math.random() * Settings.trickleRate);
  84057. };
  84058. /**
  84059. * Waits for all supplied jQuery promises and
  84060. * increases the progress as the promises resolve.
  84061. *
  84062. * @param $promise jQUery Promise
  84063. */
  84064. (function() {
  84065. var initial = 0, current = 0;
  84066. NProgress.promise = function($promise) {
  84067. if (!$promise || $promise.state() === "resolved") {
  84068. return this;
  84069. }
  84070. if (current === 0) {
  84071. NProgress.start();
  84072. }
  84073. initial++;
  84074. current++;
  84075. $promise.always(function() {
  84076. current--;
  84077. if (current === 0) {
  84078. initial = 0;
  84079. NProgress.done();
  84080. } else {
  84081. NProgress.set((initial - current) / initial);
  84082. }
  84083. });
  84084. return this;
  84085. };
  84086. })();
  84087. /**
  84088. * (Internal) renders the progress bar markup based on the `template`
  84089. * setting.
  84090. */
  84091. NProgress.render = function(fromStart) {
  84092. if (NProgress.isRendered()) return document.getElementById('nprogress');
  84093. addClass(document.documentElement, 'nprogress-busy');
  84094. var progress = document.createElement('div');
  84095. progress.id = 'nprogress';
  84096. progress.innerHTML = Settings.template;
  84097. var bar = progress.querySelector(Settings.barSelector),
  84098. perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
  84099. parent = document.querySelector(Settings.parent),
  84100. spinner;
  84101. css(bar, {
  84102. transition: 'all 0 linear',
  84103. transform: 'translate3d(' + perc + '%,0,0)'
  84104. });
  84105. if (!Settings.showSpinner) {
  84106. spinner = progress.querySelector(Settings.spinnerSelector);
  84107. spinner && removeElement(spinner);
  84108. }
  84109. if (parent != document.body) {
  84110. addClass(parent, 'nprogress-custom-parent');
  84111. }
  84112. parent.appendChild(progress);
  84113. return progress;
  84114. };
  84115. /**
  84116. * Removes the element. Opposite of render().
  84117. */
  84118. NProgress.remove = function() {
  84119. removeClass(document.documentElement, 'nprogress-busy');
  84120. removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
  84121. var progress = document.getElementById('nprogress');
  84122. progress && removeElement(progress);
  84123. };
  84124. /**
  84125. * Checks if the progress bar is rendered.
  84126. */
  84127. NProgress.isRendered = function() {
  84128. return !!document.getElementById('nprogress');
  84129. };
  84130. /**
  84131. * Determine which positioning CSS rule to use.
  84132. */
  84133. NProgress.getPositioningCSS = function() {
  84134. // Sniff on document.body.style
  84135. var bodyStyle = document.body.style;
  84136. // Sniff prefixes
  84137. var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
  84138. ('MozTransform' in bodyStyle) ? 'Moz' :
  84139. ('msTransform' in bodyStyle) ? 'ms' :
  84140. ('OTransform' in bodyStyle) ? 'O' : '';
  84141. if (vendorPrefix + 'Perspective' in bodyStyle) {
  84142. // Modern browsers with 3D support, e.g. Webkit, IE10
  84143. return 'translate3d';
  84144. } else if (vendorPrefix + 'Transform' in bodyStyle) {
  84145. // Browsers without 3D support, e.g. IE9
  84146. return 'translate';
  84147. } else {
  84148. // Browsers without translate() support, e.g. IE7-8
  84149. return 'margin';
  84150. }
  84151. };
  84152. /**
  84153. * Helpers
  84154. */
  84155. function clamp(n, min, max) {
  84156. if (n < min) return min;
  84157. if (n > max) return max;
  84158. return n;
  84159. }
  84160. /**
  84161. * (Internal) converts a percentage (`0..1`) to a bar translateX
  84162. * percentage (`-100%..0%`).
  84163. */
  84164. function toBarPerc(n) {
  84165. return (-1 + n) * 100;
  84166. }
  84167. /**
  84168. * (Internal) returns the correct CSS for changing the bar's
  84169. * position given an n percentage, and speed and ease from Settings
  84170. */
  84171. function barPositionCSS(n, speed, ease) {
  84172. var barCSS;
  84173. if (Settings.positionUsing === 'translate3d') {
  84174. barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
  84175. } else if (Settings.positionUsing === 'translate') {
  84176. barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };
  84177. } else {
  84178. barCSS = { 'margin-left': toBarPerc(n)+'%' };
  84179. }
  84180. barCSS.transition = 'all '+speed+'ms '+ease;
  84181. return barCSS;
  84182. }
  84183. /**
  84184. * (Internal) Queues a function to be executed.
  84185. */
  84186. var queue = (function() {
  84187. var pending = [];
  84188. function next() {
  84189. var fn = pending.shift();
  84190. if (fn) {
  84191. fn(next);
  84192. }
  84193. }
  84194. return function(fn) {
  84195. pending.push(fn);
  84196. if (pending.length == 1) next();
  84197. };
  84198. })();
  84199. /**
  84200. * (Internal) Applies css properties to an element, similar to the jQuery
  84201. * css method.
  84202. *
  84203. * While this helper does assist with vendor prefixed property names, it
  84204. * does not perform any manipulation of values prior to setting styles.
  84205. */
  84206. var css = (function() {
  84207. var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
  84208. cssProps = {};
  84209. function camelCase(string) {
  84210. return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
  84211. return letter.toUpperCase();
  84212. });
  84213. }
  84214. function getVendorProp(name) {
  84215. var style = document.body.style;
  84216. if (name in style) return name;
  84217. var i = cssPrefixes.length,
  84218. capName = name.charAt(0).toUpperCase() + name.slice(1),
  84219. vendorName;
  84220. while (i--) {
  84221. vendorName = cssPrefixes[i] + capName;
  84222. if (vendorName in style) return vendorName;
  84223. }
  84224. return name;
  84225. }
  84226. function getStyleProp(name) {
  84227. name = camelCase(name);
  84228. return cssProps[name] || (cssProps[name] = getVendorProp(name));
  84229. }
  84230. function applyCss(element, prop, value) {
  84231. prop = getStyleProp(prop);
  84232. element.style[prop] = value;
  84233. }
  84234. return function(element, properties) {
  84235. var args = arguments,
  84236. prop,
  84237. value;
  84238. if (args.length == 2) {
  84239. for (prop in properties) {
  84240. value = properties[prop];
  84241. if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
  84242. }
  84243. } else {
  84244. applyCss(element, args[1], args[2]);
  84245. }
  84246. }
  84247. })();
  84248. /**
  84249. * (Internal) Determines if an element or space separated list of class names contains a class name.
  84250. */
  84251. function hasClass(element, name) {
  84252. var list = typeof element == 'string' ? element : classList(element);
  84253. return list.indexOf(' ' + name + ' ') >= 0;
  84254. }
  84255. /**
  84256. * (Internal) Adds a class to an element.
  84257. */
  84258. function addClass(element, name) {
  84259. var oldList = classList(element),
  84260. newList = oldList + name;
  84261. if (hasClass(oldList, name)) return;
  84262. // Trim the opening space.
  84263. element.className = newList.substring(1);
  84264. }
  84265. /**
  84266. * (Internal) Removes a class from an element.
  84267. */
  84268. function removeClass(element, name) {
  84269. var oldList = classList(element),
  84270. newList;
  84271. if (!hasClass(element, name)) return;
  84272. // Replace the class name.
  84273. newList = oldList.replace(' ' + name + ' ', ' ');
  84274. // Trim the opening and closing spaces.
  84275. element.className = newList.substring(1, newList.length - 1);
  84276. }
  84277. /**
  84278. * (Internal) Gets a space separated list of the class names on the element.
  84279. * The list is wrapped with a single space on each end to facilitate finding
  84280. * matches within the list.
  84281. */
  84282. function classList(element) {
  84283. return (' ' + (element.className || '') + ' ').replace(/\s+/gi, ' ');
  84284. }
  84285. /**
  84286. * (Internal) Removes an element from the DOM.
  84287. */
  84288. function removeElement(element) {
  84289. element && element.parentNode && element.parentNode.removeChild(element);
  84290. }
  84291. return NProgress;
  84292. });
  84293. /***/ }),
  84294. /***/ "./node_modules/_object-inspect@1.12.2@object-inspect/index.js":
  84295. /*!*********************************************************************!*\
  84296. !*** ./node_modules/_object-inspect@1.12.2@object-inspect/index.js ***!
  84297. \*********************************************************************/
  84298. /*! no static exports found */
  84299. /***/ (function(module, exports, __webpack_require__) {
  84300. var hasMap = typeof Map === 'function' && Map.prototype;
  84301. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
  84302. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
  84303. var mapForEach = hasMap && Map.prototype.forEach;
  84304. var hasSet = typeof Set === 'function' && Set.prototype;
  84305. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
  84306. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
  84307. var setForEach = hasSet && Set.prototype.forEach;
  84308. var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
  84309. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  84310. var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
  84311. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  84312. var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
  84313. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  84314. var booleanValueOf = Boolean.prototype.valueOf;
  84315. var objectToString = Object.prototype.toString;
  84316. var functionToString = Function.prototype.toString;
  84317. var $match = String.prototype.match;
  84318. var $slice = String.prototype.slice;
  84319. var $replace = String.prototype.replace;
  84320. var $toUpperCase = String.prototype.toUpperCase;
  84321. var $toLowerCase = String.prototype.toLowerCase;
  84322. var $test = RegExp.prototype.test;
  84323. var $concat = Array.prototype.concat;
  84324. var $join = Array.prototype.join;
  84325. var $arrSlice = Array.prototype.slice;
  84326. var $floor = Math.floor;
  84327. var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
  84328. var gOPS = Object.getOwnPropertySymbols;
  84329. var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
  84330. var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
  84331. // ie, `has-tostringtag/shams
  84332. var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
  84333. ? Symbol.toStringTag
  84334. : null;
  84335. var isEnumerable = Object.prototype.propertyIsEnumerable;
  84336. var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
  84337. [].__proto__ === Array.prototype // eslint-disable-line no-proto
  84338. ? function (O) {
  84339. return O.__proto__; // eslint-disable-line no-proto
  84340. }
  84341. : null
  84342. );
  84343. function addNumericSeparator(num, str) {
  84344. if (
  84345. num === Infinity
  84346. || num === -Infinity
  84347. || num !== num
  84348. || (num && num > -1000 && num < 1000)
  84349. || $test.call(/e/, str)
  84350. ) {
  84351. return str;
  84352. }
  84353. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  84354. if (typeof num === 'number') {
  84355. var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
  84356. if (int !== num) {
  84357. var intStr = String(int);
  84358. var dec = $slice.call(str, intStr.length + 1);
  84359. return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
  84360. }
  84361. }
  84362. return $replace.call(str, sepRegex, '$&_');
  84363. }
  84364. var utilInspect = __webpack_require__(/*! ./util.inspect */ 1);
  84365. var inspectCustom = utilInspect.custom;
  84366. var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
  84367. module.exports = function inspect_(obj, options, depth, seen) {
  84368. var opts = options || {};
  84369. if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
  84370. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  84371. }
  84372. if (
  84373. has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
  84374. ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
  84375. : opts.maxStringLength !== null
  84376. )
  84377. ) {
  84378. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  84379. }
  84380. var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
  84381. if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
  84382. throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
  84383. }
  84384. if (
  84385. has(opts, 'indent')
  84386. && opts.indent !== null
  84387. && opts.indent !== '\t'
  84388. && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
  84389. ) {
  84390. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  84391. }
  84392. if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
  84393. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  84394. }
  84395. var numericSeparator = opts.numericSeparator;
  84396. if (typeof obj === 'undefined') {
  84397. return 'undefined';
  84398. }
  84399. if (obj === null) {
  84400. return 'null';
  84401. }
  84402. if (typeof obj === 'boolean') {
  84403. return obj ? 'true' : 'false';
  84404. }
  84405. if (typeof obj === 'string') {
  84406. return inspectString(obj, opts);
  84407. }
  84408. if (typeof obj === 'number') {
  84409. if (obj === 0) {
  84410. return Infinity / obj > 0 ? '0' : '-0';
  84411. }
  84412. var str = String(obj);
  84413. return numericSeparator ? addNumericSeparator(obj, str) : str;
  84414. }
  84415. if (typeof obj === 'bigint') {
  84416. var bigIntStr = String(obj) + 'n';
  84417. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  84418. }
  84419. var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
  84420. if (typeof depth === 'undefined') { depth = 0; }
  84421. if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
  84422. return isArray(obj) ? '[Array]' : '[Object]';
  84423. }
  84424. var indent = getIndent(opts, depth);
  84425. if (typeof seen === 'undefined') {
  84426. seen = [];
  84427. } else if (indexOf(seen, obj) >= 0) {
  84428. return '[Circular]';
  84429. }
  84430. function inspect(value, from, noIndent) {
  84431. if (from) {
  84432. seen = $arrSlice.call(seen);
  84433. seen.push(from);
  84434. }
  84435. if (noIndent) {
  84436. var newOpts = {
  84437. depth: opts.depth
  84438. };
  84439. if (has(opts, 'quoteStyle')) {
  84440. newOpts.quoteStyle = opts.quoteStyle;
  84441. }
  84442. return inspect_(value, newOpts, depth + 1, seen);
  84443. }
  84444. return inspect_(value, opts, depth + 1, seen);
  84445. }
  84446. if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
  84447. var name = nameOf(obj);
  84448. var keys = arrObjKeys(obj, inspect);
  84449. return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
  84450. }
  84451. if (isSymbol(obj)) {
  84452. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
  84453. return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
  84454. }
  84455. if (isElement(obj)) {
  84456. var s = '<' + $toLowerCase.call(String(obj.nodeName));
  84457. var attrs = obj.attributes || [];
  84458. for (var i = 0; i < attrs.length; i++) {
  84459. s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
  84460. }
  84461. s += '>';
  84462. if (obj.childNodes && obj.childNodes.length) { s += '...'; }
  84463. s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
  84464. return s;
  84465. }
  84466. if (isArray(obj)) {
  84467. if (obj.length === 0) { return '[]'; }
  84468. var xs = arrObjKeys(obj, inspect);
  84469. if (indent && !singleLineValues(xs)) {
  84470. return '[' + indentedJoin(xs, indent) + ']';
  84471. }
  84472. return '[ ' + $join.call(xs, ', ') + ' ]';
  84473. }
  84474. if (isError(obj)) {
  84475. var parts = arrObjKeys(obj, inspect);
  84476. if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
  84477. return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
  84478. }
  84479. if (parts.length === 0) { return '[' + String(obj) + ']'; }
  84480. return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
  84481. }
  84482. if (typeof obj === 'object' && customInspect) {
  84483. if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
  84484. return utilInspect(obj, { depth: maxDepth - depth });
  84485. } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
  84486. return obj.inspect();
  84487. }
  84488. }
  84489. if (isMap(obj)) {
  84490. var mapParts = [];
  84491. mapForEach.call(obj, function (value, key) {
  84492. mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
  84493. });
  84494. return collectionOf('Map', mapSize.call(obj), mapParts, indent);
  84495. }
  84496. if (isSet(obj)) {
  84497. var setParts = [];
  84498. setForEach.call(obj, function (value) {
  84499. setParts.push(inspect(value, obj));
  84500. });
  84501. return collectionOf('Set', setSize.call(obj), setParts, indent);
  84502. }
  84503. if (isWeakMap(obj)) {
  84504. return weakCollectionOf('WeakMap');
  84505. }
  84506. if (isWeakSet(obj)) {
  84507. return weakCollectionOf('WeakSet');
  84508. }
  84509. if (isWeakRef(obj)) {
  84510. return weakCollectionOf('WeakRef');
  84511. }
  84512. if (isNumber(obj)) {
  84513. return markBoxed(inspect(Number(obj)));
  84514. }
  84515. if (isBigInt(obj)) {
  84516. return markBoxed(inspect(bigIntValueOf.call(obj)));
  84517. }
  84518. if (isBoolean(obj)) {
  84519. return markBoxed(booleanValueOf.call(obj));
  84520. }
  84521. if (isString(obj)) {
  84522. return markBoxed(inspect(String(obj)));
  84523. }
  84524. if (!isDate(obj) && !isRegExp(obj)) {
  84525. var ys = arrObjKeys(obj, inspect);
  84526. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  84527. var protoTag = obj instanceof Object ? '' : 'null prototype';
  84528. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
  84529. var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
  84530. var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
  84531. if (ys.length === 0) { return tag + '{}'; }
  84532. if (indent) {
  84533. return tag + '{' + indentedJoin(ys, indent) + '}';
  84534. }
  84535. return tag + '{ ' + $join.call(ys, ', ') + ' }';
  84536. }
  84537. return String(obj);
  84538. };
  84539. function wrapQuotes(s, defaultStyle, opts) {
  84540. var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
  84541. return quoteChar + s + quoteChar;
  84542. }
  84543. function quote(s) {
  84544. return $replace.call(String(s), /"/g, '&quot;');
  84545. }
  84546. function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  84547. function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  84548. function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  84549. function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  84550. function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  84551. function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  84552. function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  84553. // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
  84554. function isSymbol(obj) {
  84555. if (hasShammedSymbols) {
  84556. return obj && typeof obj === 'object' && obj instanceof Symbol;
  84557. }
  84558. if (typeof obj === 'symbol') {
  84559. return true;
  84560. }
  84561. if (!obj || typeof obj !== 'object' || !symToString) {
  84562. return false;
  84563. }
  84564. try {
  84565. symToString.call(obj);
  84566. return true;
  84567. } catch (e) {}
  84568. return false;
  84569. }
  84570. function isBigInt(obj) {
  84571. if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
  84572. return false;
  84573. }
  84574. try {
  84575. bigIntValueOf.call(obj);
  84576. return true;
  84577. } catch (e) {}
  84578. return false;
  84579. }
  84580. var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
  84581. function has(obj, key) {
  84582. return hasOwn.call(obj, key);
  84583. }
  84584. function toStr(obj) {
  84585. return objectToString.call(obj);
  84586. }
  84587. function nameOf(f) {
  84588. if (f.name) { return f.name; }
  84589. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  84590. if (m) { return m[1]; }
  84591. return null;
  84592. }
  84593. function indexOf(xs, x) {
  84594. if (xs.indexOf) { return xs.indexOf(x); }
  84595. for (var i = 0, l = xs.length; i < l; i++) {
  84596. if (xs[i] === x) { return i; }
  84597. }
  84598. return -1;
  84599. }
  84600. function isMap(x) {
  84601. if (!mapSize || !x || typeof x !== 'object') {
  84602. return false;
  84603. }
  84604. try {
  84605. mapSize.call(x);
  84606. try {
  84607. setSize.call(x);
  84608. } catch (s) {
  84609. return true;
  84610. }
  84611. return x instanceof Map; // core-js workaround, pre-v2.5.0
  84612. } catch (e) {}
  84613. return false;
  84614. }
  84615. function isWeakMap(x) {
  84616. if (!weakMapHas || !x || typeof x !== 'object') {
  84617. return false;
  84618. }
  84619. try {
  84620. weakMapHas.call(x, weakMapHas);
  84621. try {
  84622. weakSetHas.call(x, weakSetHas);
  84623. } catch (s) {
  84624. return true;
  84625. }
  84626. return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
  84627. } catch (e) {}
  84628. return false;
  84629. }
  84630. function isWeakRef(x) {
  84631. if (!weakRefDeref || !x || typeof x !== 'object') {
  84632. return false;
  84633. }
  84634. try {
  84635. weakRefDeref.call(x);
  84636. return true;
  84637. } catch (e) {}
  84638. return false;
  84639. }
  84640. function isSet(x) {
  84641. if (!setSize || !x || typeof x !== 'object') {
  84642. return false;
  84643. }
  84644. try {
  84645. setSize.call(x);
  84646. try {
  84647. mapSize.call(x);
  84648. } catch (m) {
  84649. return true;
  84650. }
  84651. return x instanceof Set; // core-js workaround, pre-v2.5.0
  84652. } catch (e) {}
  84653. return false;
  84654. }
  84655. function isWeakSet(x) {
  84656. if (!weakSetHas || !x || typeof x !== 'object') {
  84657. return false;
  84658. }
  84659. try {
  84660. weakSetHas.call(x, weakSetHas);
  84661. try {
  84662. weakMapHas.call(x, weakMapHas);
  84663. } catch (s) {
  84664. return true;
  84665. }
  84666. return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
  84667. } catch (e) {}
  84668. return false;
  84669. }
  84670. function isElement(x) {
  84671. if (!x || typeof x !== 'object') { return false; }
  84672. if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
  84673. return true;
  84674. }
  84675. return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
  84676. }
  84677. function inspectString(str, opts) {
  84678. if (str.length > opts.maxStringLength) {
  84679. var remaining = str.length - opts.maxStringLength;
  84680. var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
  84681. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  84682. }
  84683. // eslint-disable-next-line no-control-regex
  84684. var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
  84685. return wrapQuotes(s, 'single', opts);
  84686. }
  84687. function lowbyte(c) {
  84688. var n = c.charCodeAt(0);
  84689. var x = {
  84690. 8: 'b',
  84691. 9: 't',
  84692. 10: 'n',
  84693. 12: 'f',
  84694. 13: 'r'
  84695. }[n];
  84696. if (x) { return '\\' + x; }
  84697. return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
  84698. }
  84699. function markBoxed(str) {
  84700. return 'Object(' + str + ')';
  84701. }
  84702. function weakCollectionOf(type) {
  84703. return type + ' { ? }';
  84704. }
  84705. function collectionOf(type, size, entries, indent) {
  84706. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
  84707. return type + ' (' + size + ') {' + joinedEntries + '}';
  84708. }
  84709. function singleLineValues(xs) {
  84710. for (var i = 0; i < xs.length; i++) {
  84711. if (indexOf(xs[i], '\n') >= 0) {
  84712. return false;
  84713. }
  84714. }
  84715. return true;
  84716. }
  84717. function getIndent(opts, depth) {
  84718. var baseIndent;
  84719. if (opts.indent === '\t') {
  84720. baseIndent = '\t';
  84721. } else if (typeof opts.indent === 'number' && opts.indent > 0) {
  84722. baseIndent = $join.call(Array(opts.indent + 1), ' ');
  84723. } else {
  84724. return null;
  84725. }
  84726. return {
  84727. base: baseIndent,
  84728. prev: $join.call(Array(depth + 1), baseIndent)
  84729. };
  84730. }
  84731. function indentedJoin(xs, indent) {
  84732. if (xs.length === 0) { return ''; }
  84733. var lineJoiner = '\n' + indent.prev + indent.base;
  84734. return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
  84735. }
  84736. function arrObjKeys(obj, inspect) {
  84737. var isArr = isArray(obj);
  84738. var xs = [];
  84739. if (isArr) {
  84740. xs.length = obj.length;
  84741. for (var i = 0; i < obj.length; i++) {
  84742. xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
  84743. }
  84744. }
  84745. var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
  84746. var symMap;
  84747. if (hasShammedSymbols) {
  84748. symMap = {};
  84749. for (var k = 0; k < syms.length; k++) {
  84750. symMap['$' + syms[k]] = syms[k];
  84751. }
  84752. }
  84753. for (var key in obj) { // eslint-disable-line no-restricted-syntax
  84754. if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  84755. if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  84756. if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
  84757. // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
  84758. continue; // eslint-disable-line no-restricted-syntax, no-continue
  84759. } else if ($test.call(/[^\w$]/, key)) {
  84760. xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
  84761. } else {
  84762. xs.push(key + ': ' + inspect(obj[key], obj));
  84763. }
  84764. }
  84765. if (typeof gOPS === 'function') {
  84766. for (var j = 0; j < syms.length; j++) {
  84767. if (isEnumerable.call(obj, syms[j])) {
  84768. xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
  84769. }
  84770. }
  84771. }
  84772. return xs;
  84773. }
  84774. /***/ }),
  84775. /***/ "./node_modules/_path-browserify@0.0.1@path-browserify/index.js":
  84776. /*!**********************************************************************!*\
  84777. !*** ./node_modules/_path-browserify@0.0.1@path-browserify/index.js ***!
  84778. \**********************************************************************/
  84779. /*! no static exports found */
  84780. /***/ (function(module, exports, __webpack_require__) {
  84781. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  84782. // backported and transplited with Babel, with backwards-compat fixes
  84783. // Copyright Joyent, Inc. and other Node contributors.
  84784. //
  84785. // Permission is hereby granted, free of charge, to any person obtaining a
  84786. // copy of this software and associated documentation files (the
  84787. // "Software"), to deal in the Software without restriction, including
  84788. // without limitation the rights to use, copy, modify, merge, publish,
  84789. // distribute, sublicense, and/or sell copies of the Software, and to permit
  84790. // persons to whom the Software is furnished to do so, subject to the
  84791. // following conditions:
  84792. //
  84793. // The above copyright notice and this permission notice shall be included
  84794. // in all copies or substantial portions of the Software.
  84795. //
  84796. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  84797. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  84798. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  84799. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  84800. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  84801. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  84802. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  84803. // resolves . and .. elements in a path array with directory names there
  84804. // must be no slashes, empty elements, or device names (c:\) in the array
  84805. // (so also no leading and trailing slashes - it does not distinguish
  84806. // relative and absolute paths)
  84807. function normalizeArray(parts, allowAboveRoot) {
  84808. // if the path tries to go above the root, `up` ends up > 0
  84809. var up = 0;
  84810. for (var i = parts.length - 1; i >= 0; i--) {
  84811. var last = parts[i];
  84812. if (last === '.') {
  84813. parts.splice(i, 1);
  84814. } else if (last === '..') {
  84815. parts.splice(i, 1);
  84816. up++;
  84817. } else if (up) {
  84818. parts.splice(i, 1);
  84819. up--;
  84820. }
  84821. }
  84822. // if the path is allowed to go above the root, restore leading ..s
  84823. if (allowAboveRoot) {
  84824. for (; up--; up) {
  84825. parts.unshift('..');
  84826. }
  84827. }
  84828. return parts;
  84829. }
  84830. // path.resolve([from ...], to)
  84831. // posix version
  84832. exports.resolve = function() {
  84833. var resolvedPath = '',
  84834. resolvedAbsolute = false;
  84835. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  84836. var path = (i >= 0) ? arguments[i] : process.cwd();
  84837. // Skip empty and invalid entries
  84838. if (typeof path !== 'string') {
  84839. throw new TypeError('Arguments to path.resolve must be strings');
  84840. } else if (!path) {
  84841. continue;
  84842. }
  84843. resolvedPath = path + '/' + resolvedPath;
  84844. resolvedAbsolute = path.charAt(0) === '/';
  84845. }
  84846. // At this point the path should be resolved to a full absolute path, but
  84847. // handle relative paths to be safe (might happen when process.cwd() fails)
  84848. // Normalize the path
  84849. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  84850. return !!p;
  84851. }), !resolvedAbsolute).join('/');
  84852. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  84853. };
  84854. // path.normalize(path)
  84855. // posix version
  84856. exports.normalize = function(path) {
  84857. var isAbsolute = exports.isAbsolute(path),
  84858. trailingSlash = substr(path, -1) === '/';
  84859. // Normalize the path
  84860. path = normalizeArray(filter(path.split('/'), function(p) {
  84861. return !!p;
  84862. }), !isAbsolute).join('/');
  84863. if (!path && !isAbsolute) {
  84864. path = '.';
  84865. }
  84866. if (path && trailingSlash) {
  84867. path += '/';
  84868. }
  84869. return (isAbsolute ? '/' : '') + path;
  84870. };
  84871. // posix version
  84872. exports.isAbsolute = function(path) {
  84873. return path.charAt(0) === '/';
  84874. };
  84875. // posix version
  84876. exports.join = function() {
  84877. var paths = Array.prototype.slice.call(arguments, 0);
  84878. return exports.normalize(filter(paths, function(p, index) {
  84879. if (typeof p !== 'string') {
  84880. throw new TypeError('Arguments to path.join must be strings');
  84881. }
  84882. return p;
  84883. }).join('/'));
  84884. };
  84885. // path.relative(from, to)
  84886. // posix version
  84887. exports.relative = function(from, to) {
  84888. from = exports.resolve(from).substr(1);
  84889. to = exports.resolve(to).substr(1);
  84890. function trim(arr) {
  84891. var start = 0;
  84892. for (; start < arr.length; start++) {
  84893. if (arr[start] !== '') break;
  84894. }
  84895. var end = arr.length - 1;
  84896. for (; end >= 0; end--) {
  84897. if (arr[end] !== '') break;
  84898. }
  84899. if (start > end) return [];
  84900. return arr.slice(start, end - start + 1);
  84901. }
  84902. var fromParts = trim(from.split('/'));
  84903. var toParts = trim(to.split('/'));
  84904. var length = Math.min(fromParts.length, toParts.length);
  84905. var samePartsLength = length;
  84906. for (var i = 0; i < length; i++) {
  84907. if (fromParts[i] !== toParts[i]) {
  84908. samePartsLength = i;
  84909. break;
  84910. }
  84911. }
  84912. var outputParts = [];
  84913. for (var i = samePartsLength; i < fromParts.length; i++) {
  84914. outputParts.push('..');
  84915. }
  84916. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  84917. return outputParts.join('/');
  84918. };
  84919. exports.sep = '/';
  84920. exports.delimiter = ':';
  84921. exports.dirname = function (path) {
  84922. if (typeof path !== 'string') path = path + '';
  84923. if (path.length === 0) return '.';
  84924. var code = path.charCodeAt(0);
  84925. var hasRoot = code === 47 /*/*/;
  84926. var end = -1;
  84927. var matchedSlash = true;
  84928. for (var i = path.length - 1; i >= 1; --i) {
  84929. code = path.charCodeAt(i);
  84930. if (code === 47 /*/*/) {
  84931. if (!matchedSlash) {
  84932. end = i;
  84933. break;
  84934. }
  84935. } else {
  84936. // We saw the first non-path separator
  84937. matchedSlash = false;
  84938. }
  84939. }
  84940. if (end === -1) return hasRoot ? '/' : '.';
  84941. if (hasRoot && end === 1) {
  84942. // return '//';
  84943. // Backwards-compat fix:
  84944. return '/';
  84945. }
  84946. return path.slice(0, end);
  84947. };
  84948. function basename(path) {
  84949. if (typeof path !== 'string') path = path + '';
  84950. var start = 0;
  84951. var end = -1;
  84952. var matchedSlash = true;
  84953. var i;
  84954. for (i = path.length - 1; i >= 0; --i) {
  84955. if (path.charCodeAt(i) === 47 /*/*/) {
  84956. // If we reached a path separator that was not part of a set of path
  84957. // separators at the end of the string, stop now
  84958. if (!matchedSlash) {
  84959. start = i + 1;
  84960. break;
  84961. }
  84962. } else if (end === -1) {
  84963. // We saw the first non-path separator, mark this as the end of our
  84964. // path component
  84965. matchedSlash = false;
  84966. end = i + 1;
  84967. }
  84968. }
  84969. if (end === -1) return '';
  84970. return path.slice(start, end);
  84971. }
  84972. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  84973. // in new Node.js versions, so only basename() above is backported here
  84974. exports.basename = function (path, ext) {
  84975. var f = basename(path);
  84976. if (ext && f.substr(-1 * ext.length) === ext) {
  84977. f = f.substr(0, f.length - ext.length);
  84978. }
  84979. return f;
  84980. };
  84981. exports.extname = function (path) {
  84982. if (typeof path !== 'string') path = path + '';
  84983. var startDot = -1;
  84984. var startPart = 0;
  84985. var end = -1;
  84986. var matchedSlash = true;
  84987. // Track the state of characters (if any) we see before our first dot and
  84988. // after any path separator we find
  84989. var preDotState = 0;
  84990. for (var i = path.length - 1; i >= 0; --i) {
  84991. var code = path.charCodeAt(i);
  84992. if (code === 47 /*/*/) {
  84993. // If we reached a path separator that was not part of a set of path
  84994. // separators at the end of the string, stop now
  84995. if (!matchedSlash) {
  84996. startPart = i + 1;
  84997. break;
  84998. }
  84999. continue;
  85000. }
  85001. if (end === -1) {
  85002. // We saw the first non-path separator, mark this as the end of our
  85003. // extension
  85004. matchedSlash = false;
  85005. end = i + 1;
  85006. }
  85007. if (code === 46 /*.*/) {
  85008. // If this is our first dot, mark it as the start of our extension
  85009. if (startDot === -1)
  85010. startDot = i;
  85011. else if (preDotState !== 1)
  85012. preDotState = 1;
  85013. } else if (startDot !== -1) {
  85014. // We saw a non-dot and non-path separator before our dot, so we should
  85015. // have a good chance at having a non-empty extension
  85016. preDotState = -1;
  85017. }
  85018. }
  85019. if (startDot === -1 || end === -1 ||
  85020. // We saw a non-dot character immediately before the dot
  85021. preDotState === 0 ||
  85022. // The (right-most) trimmed path component is exactly '..'
  85023. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  85024. return '';
  85025. }
  85026. return path.slice(startDot, end);
  85027. };
  85028. function filter (xs, f) {
  85029. if (xs.filter) return xs.filter(f);
  85030. var res = [];
  85031. for (var i = 0; i < xs.length; i++) {
  85032. if (f(xs[i], i, xs)) res.push(xs[i]);
  85033. }
  85034. return res;
  85035. }
  85036. // String.prototype.substr - negative index don't work in IE8
  85037. var substr = 'ab'.substr(-1) === 'b'
  85038. ? function (str, start, len) { return str.substr(start, len) }
  85039. : function (str, start, len) {
  85040. if (start < 0) start = str.length + start;
  85041. return str.substr(start, len);
  85042. }
  85043. ;
  85044. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../_node-libs-browser@2.2.1@node-libs-browser/mock/process.js */ "./node_modules/_node-libs-browser@2.2.1@node-libs-browser/mock/process.js")))
  85045. /***/ }),
  85046. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/browser.js":
  85047. /*!**********************************************************!*\
  85048. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/browser.js ***!
  85049. \**********************************************************/
  85050. /*! no static exports found */
  85051. /***/ (function(module, exports, __webpack_require__) {
  85052. const canPromise = __webpack_require__(/*! ./can-promise */ "./node_modules/_qrcode@1.5.1@qrcode/lib/can-promise.js")
  85053. const QRCode = __webpack_require__(/*! ./core/qrcode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/qrcode.js")
  85054. const CanvasRenderer = __webpack_require__(/*! ./renderer/canvas */ "./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/canvas.js")
  85055. const SvgRenderer = __webpack_require__(/*! ./renderer/svg-tag.js */ "./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/svg-tag.js")
  85056. function renderCanvas (renderFunc, canvas, text, opts, cb) {
  85057. const args = [].slice.call(arguments, 1)
  85058. const argsNum = args.length
  85059. const isLastArgCb = typeof args[argsNum - 1] === 'function'
  85060. if (!isLastArgCb && !canPromise()) {
  85061. throw new Error('Callback required as last argument')
  85062. }
  85063. if (isLastArgCb) {
  85064. if (argsNum < 2) {
  85065. throw new Error('Too few arguments provided')
  85066. }
  85067. if (argsNum === 2) {
  85068. cb = text
  85069. text = canvas
  85070. canvas = opts = undefined
  85071. } else if (argsNum === 3) {
  85072. if (canvas.getContext && typeof cb === 'undefined') {
  85073. cb = opts
  85074. opts = undefined
  85075. } else {
  85076. cb = opts
  85077. opts = text
  85078. text = canvas
  85079. canvas = undefined
  85080. }
  85081. }
  85082. } else {
  85083. if (argsNum < 1) {
  85084. throw new Error('Too few arguments provided')
  85085. }
  85086. if (argsNum === 1) {
  85087. text = canvas
  85088. canvas = opts = undefined
  85089. } else if (argsNum === 2 && !canvas.getContext) {
  85090. opts = text
  85091. text = canvas
  85092. canvas = undefined
  85093. }
  85094. return new Promise(function (resolve, reject) {
  85095. try {
  85096. const data = QRCode.create(text, opts)
  85097. resolve(renderFunc(data, canvas, opts))
  85098. } catch (e) {
  85099. reject(e)
  85100. }
  85101. })
  85102. }
  85103. try {
  85104. const data = QRCode.create(text, opts)
  85105. cb(null, renderFunc(data, canvas, opts))
  85106. } catch (e) {
  85107. cb(e)
  85108. }
  85109. }
  85110. exports.create = QRCode.create
  85111. exports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)
  85112. exports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)
  85113. // only svg for now.
  85114. exports.toString = renderCanvas.bind(null, function (data, _, opts) {
  85115. return SvgRenderer.render(data, opts)
  85116. })
  85117. /***/ }),
  85118. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/can-promise.js":
  85119. /*!**************************************************************!*\
  85120. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/can-promise.js ***!
  85121. \**************************************************************/
  85122. /*! no static exports found */
  85123. /***/ (function(module, exports) {
  85124. // can-promise has a crash in some versions of react native that dont have
  85125. // standard global objects
  85126. // https://github.com/soldair/node-qrcode/issues/157
  85127. module.exports = function () {
  85128. return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
  85129. }
  85130. /***/ }),
  85131. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/alignment-pattern.js":
  85132. /*!*************************************************************************!*\
  85133. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/alignment-pattern.js ***!
  85134. \*************************************************************************/
  85135. /*! no static exports found */
  85136. /***/ (function(module, exports, __webpack_require__) {
  85137. /**
  85138. * Alignment pattern are fixed reference pattern in defined positions
  85139. * in a matrix symbology, which enables the decode software to re-synchronise
  85140. * the coordinate mapping of the image modules in the event of moderate amounts
  85141. * of distortion of the image.
  85142. *
  85143. * Alignment patterns are present only in QR Code symbols of version 2 or larger
  85144. * and their number depends on the symbol version.
  85145. */
  85146. const getSymbolSize = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js").getSymbolSize
  85147. /**
  85148. * Calculate the row/column coordinates of the center module of each alignment pattern
  85149. * for the specified QR Code version.
  85150. *
  85151. * The alignment patterns are positioned symmetrically on either side of the diagonal
  85152. * running from the top left corner of the symbol to the bottom right corner.
  85153. *
  85154. * Since positions are simmetrical only half of the coordinates are returned.
  85155. * Each item of the array will represent in turn the x and y coordinate.
  85156. * @see {@link getPositions}
  85157. *
  85158. * @param {Number} version QR Code version
  85159. * @return {Array} Array of coordinate
  85160. */
  85161. exports.getRowColCoords = function getRowColCoords (version) {
  85162. if (version === 1) return []
  85163. const posCount = Math.floor(version / 7) + 2
  85164. const size = getSymbolSize(version)
  85165. const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2
  85166. const positions = [size - 7] // Last coord is always (size - 7)
  85167. for (let i = 1; i < posCount - 1; i++) {
  85168. positions[i] = positions[i - 1] - intervals
  85169. }
  85170. positions.push(6) // First coord is always 6
  85171. return positions.reverse()
  85172. }
  85173. /**
  85174. * Returns an array containing the positions of each alignment pattern.
  85175. * Each array's element represent the center point of the pattern as (x, y) coordinates
  85176. *
  85177. * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
  85178. * and filtering out the items that overlaps with finder pattern
  85179. *
  85180. * @example
  85181. * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
  85182. * The alignment patterns, therefore, are to be centered on (row, column)
  85183. * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
  85184. * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
  85185. * and are not therefore used for alignment patterns.
  85186. *
  85187. * let pos = getPositions(7)
  85188. * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
  85189. *
  85190. * @param {Number} version QR Code version
  85191. * @return {Array} Array of coordinates
  85192. */
  85193. exports.getPositions = function getPositions (version) {
  85194. const coords = []
  85195. const pos = exports.getRowColCoords(version)
  85196. const posLength = pos.length
  85197. for (let i = 0; i < posLength; i++) {
  85198. for (let j = 0; j < posLength; j++) {
  85199. // Skip if position is occupied by finder patterns
  85200. if ((i === 0 && j === 0) || // top-left
  85201. (i === 0 && j === posLength - 1) || // bottom-left
  85202. (i === posLength - 1 && j === 0)) { // top-right
  85203. continue
  85204. }
  85205. coords.push([pos[i], pos[j]])
  85206. }
  85207. }
  85208. return coords
  85209. }
  85210. /***/ }),
  85211. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/alphanumeric-data.js":
  85212. /*!*************************************************************************!*\
  85213. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/alphanumeric-data.js ***!
  85214. \*************************************************************************/
  85215. /*! no static exports found */
  85216. /***/ (function(module, exports, __webpack_require__) {
  85217. const Mode = __webpack_require__(/*! ./mode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js")
  85218. /**
  85219. * Array of characters available in alphanumeric mode
  85220. *
  85221. * As per QR Code specification, to each character
  85222. * is assigned a value from 0 to 44 which in this case coincides
  85223. * with the array index
  85224. *
  85225. * @type {Array}
  85226. */
  85227. const ALPHA_NUM_CHARS = [
  85228. '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
  85229. 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  85230. 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
  85231. ' ', '$', '%', '*', '+', '-', '.', '/', ':'
  85232. ]
  85233. function AlphanumericData (data) {
  85234. this.mode = Mode.ALPHANUMERIC
  85235. this.data = data
  85236. }
  85237. AlphanumericData.getBitsLength = function getBitsLength (length) {
  85238. return 11 * Math.floor(length / 2) + 6 * (length % 2)
  85239. }
  85240. AlphanumericData.prototype.getLength = function getLength () {
  85241. return this.data.length
  85242. }
  85243. AlphanumericData.prototype.getBitsLength = function getBitsLength () {
  85244. return AlphanumericData.getBitsLength(this.data.length)
  85245. }
  85246. AlphanumericData.prototype.write = function write (bitBuffer) {
  85247. let i
  85248. // Input data characters are divided into groups of two characters
  85249. // and encoded as 11-bit binary codes.
  85250. for (i = 0; i + 2 <= this.data.length; i += 2) {
  85251. // The character value of the first character is multiplied by 45
  85252. let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45
  85253. // The character value of the second digit is added to the product
  85254. value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])
  85255. // The sum is then stored as 11-bit binary number
  85256. bitBuffer.put(value, 11)
  85257. }
  85258. // If the number of input data characters is not a multiple of two,
  85259. // the character value of the final character is encoded as a 6-bit binary number.
  85260. if (this.data.length % 2) {
  85261. bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)
  85262. }
  85263. }
  85264. module.exports = AlphanumericData
  85265. /***/ }),
  85266. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/bit-buffer.js":
  85267. /*!******************************************************************!*\
  85268. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/bit-buffer.js ***!
  85269. \******************************************************************/
  85270. /*! no static exports found */
  85271. /***/ (function(module, exports) {
  85272. function BitBuffer () {
  85273. this.buffer = []
  85274. this.length = 0
  85275. }
  85276. BitBuffer.prototype = {
  85277. get: function (index) {
  85278. const bufIndex = Math.floor(index / 8)
  85279. return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1
  85280. },
  85281. put: function (num, length) {
  85282. for (let i = 0; i < length; i++) {
  85283. this.putBit(((num >>> (length - i - 1)) & 1) === 1)
  85284. }
  85285. },
  85286. getLengthInBits: function () {
  85287. return this.length
  85288. },
  85289. putBit: function (bit) {
  85290. const bufIndex = Math.floor(this.length / 8)
  85291. if (this.buffer.length <= bufIndex) {
  85292. this.buffer.push(0)
  85293. }
  85294. if (bit) {
  85295. this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))
  85296. }
  85297. this.length++
  85298. }
  85299. }
  85300. module.exports = BitBuffer
  85301. /***/ }),
  85302. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/bit-matrix.js":
  85303. /*!******************************************************************!*\
  85304. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/bit-matrix.js ***!
  85305. \******************************************************************/
  85306. /*! no static exports found */
  85307. /***/ (function(module, exports) {
  85308. /**
  85309. * Helper class to handle QR Code symbol modules
  85310. *
  85311. * @param {Number} size Symbol size
  85312. */
  85313. function BitMatrix (size) {
  85314. if (!size || size < 1) {
  85315. throw new Error('BitMatrix size must be defined and greater than 0')
  85316. }
  85317. this.size = size
  85318. this.data = new Uint8Array(size * size)
  85319. this.reservedBit = new Uint8Array(size * size)
  85320. }
  85321. /**
  85322. * Set bit value at specified location
  85323. * If reserved flag is set, this bit will be ignored during masking process
  85324. *
  85325. * @param {Number} row
  85326. * @param {Number} col
  85327. * @param {Boolean} value
  85328. * @param {Boolean} reserved
  85329. */
  85330. BitMatrix.prototype.set = function (row, col, value, reserved) {
  85331. const index = row * this.size + col
  85332. this.data[index] = value
  85333. if (reserved) this.reservedBit[index] = true
  85334. }
  85335. /**
  85336. * Returns bit value at specified location
  85337. *
  85338. * @param {Number} row
  85339. * @param {Number} col
  85340. * @return {Boolean}
  85341. */
  85342. BitMatrix.prototype.get = function (row, col) {
  85343. return this.data[row * this.size + col]
  85344. }
  85345. /**
  85346. * Applies xor operator at specified location
  85347. * (used during masking process)
  85348. *
  85349. * @param {Number} row
  85350. * @param {Number} col
  85351. * @param {Boolean} value
  85352. */
  85353. BitMatrix.prototype.xor = function (row, col, value) {
  85354. this.data[row * this.size + col] ^= value
  85355. }
  85356. /**
  85357. * Check if bit at specified location is reserved
  85358. *
  85359. * @param {Number} row
  85360. * @param {Number} col
  85361. * @return {Boolean}
  85362. */
  85363. BitMatrix.prototype.isReserved = function (row, col) {
  85364. return this.reservedBit[row * this.size + col]
  85365. }
  85366. module.exports = BitMatrix
  85367. /***/ }),
  85368. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/byte-data.js":
  85369. /*!*****************************************************************!*\
  85370. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/byte-data.js ***!
  85371. \*****************************************************************/
  85372. /*! no static exports found */
  85373. /***/ (function(module, exports, __webpack_require__) {
  85374. const encodeUtf8 = __webpack_require__(/*! encode-utf8 */ "./node_modules/_encode-utf8@1.0.3@encode-utf8/index.js")
  85375. const Mode = __webpack_require__(/*! ./mode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js")
  85376. function ByteData (data) {
  85377. this.mode = Mode.BYTE
  85378. if (typeof (data) === 'string') {
  85379. data = encodeUtf8(data)
  85380. }
  85381. this.data = new Uint8Array(data)
  85382. }
  85383. ByteData.getBitsLength = function getBitsLength (length) {
  85384. return length * 8
  85385. }
  85386. ByteData.prototype.getLength = function getLength () {
  85387. return this.data.length
  85388. }
  85389. ByteData.prototype.getBitsLength = function getBitsLength () {
  85390. return ByteData.getBitsLength(this.data.length)
  85391. }
  85392. ByteData.prototype.write = function (bitBuffer) {
  85393. for (let i = 0, l = this.data.length; i < l; i++) {
  85394. bitBuffer.put(this.data[i], 8)
  85395. }
  85396. }
  85397. module.exports = ByteData
  85398. /***/ }),
  85399. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-code.js":
  85400. /*!*****************************************************************************!*\
  85401. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-code.js ***!
  85402. \*****************************************************************************/
  85403. /*! no static exports found */
  85404. /***/ (function(module, exports, __webpack_require__) {
  85405. const ECLevel = __webpack_require__(/*! ./error-correction-level */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-level.js")
  85406. const EC_BLOCKS_TABLE = [
  85407. // L M Q H
  85408. 1, 1, 1, 1,
  85409. 1, 1, 1, 1,
  85410. 1, 1, 2, 2,
  85411. 1, 2, 2, 4,
  85412. 1, 2, 4, 4,
  85413. 2, 4, 4, 4,
  85414. 2, 4, 6, 5,
  85415. 2, 4, 6, 6,
  85416. 2, 5, 8, 8,
  85417. 4, 5, 8, 8,
  85418. 4, 5, 8, 11,
  85419. 4, 8, 10, 11,
  85420. 4, 9, 12, 16,
  85421. 4, 9, 16, 16,
  85422. 6, 10, 12, 18,
  85423. 6, 10, 17, 16,
  85424. 6, 11, 16, 19,
  85425. 6, 13, 18, 21,
  85426. 7, 14, 21, 25,
  85427. 8, 16, 20, 25,
  85428. 8, 17, 23, 25,
  85429. 9, 17, 23, 34,
  85430. 9, 18, 25, 30,
  85431. 10, 20, 27, 32,
  85432. 12, 21, 29, 35,
  85433. 12, 23, 34, 37,
  85434. 12, 25, 34, 40,
  85435. 13, 26, 35, 42,
  85436. 14, 28, 38, 45,
  85437. 15, 29, 40, 48,
  85438. 16, 31, 43, 51,
  85439. 17, 33, 45, 54,
  85440. 18, 35, 48, 57,
  85441. 19, 37, 51, 60,
  85442. 19, 38, 53, 63,
  85443. 20, 40, 56, 66,
  85444. 21, 43, 59, 70,
  85445. 22, 45, 62, 74,
  85446. 24, 47, 65, 77,
  85447. 25, 49, 68, 81
  85448. ]
  85449. const EC_CODEWORDS_TABLE = [
  85450. // L M Q H
  85451. 7, 10, 13, 17,
  85452. 10, 16, 22, 28,
  85453. 15, 26, 36, 44,
  85454. 20, 36, 52, 64,
  85455. 26, 48, 72, 88,
  85456. 36, 64, 96, 112,
  85457. 40, 72, 108, 130,
  85458. 48, 88, 132, 156,
  85459. 60, 110, 160, 192,
  85460. 72, 130, 192, 224,
  85461. 80, 150, 224, 264,
  85462. 96, 176, 260, 308,
  85463. 104, 198, 288, 352,
  85464. 120, 216, 320, 384,
  85465. 132, 240, 360, 432,
  85466. 144, 280, 408, 480,
  85467. 168, 308, 448, 532,
  85468. 180, 338, 504, 588,
  85469. 196, 364, 546, 650,
  85470. 224, 416, 600, 700,
  85471. 224, 442, 644, 750,
  85472. 252, 476, 690, 816,
  85473. 270, 504, 750, 900,
  85474. 300, 560, 810, 960,
  85475. 312, 588, 870, 1050,
  85476. 336, 644, 952, 1110,
  85477. 360, 700, 1020, 1200,
  85478. 390, 728, 1050, 1260,
  85479. 420, 784, 1140, 1350,
  85480. 450, 812, 1200, 1440,
  85481. 480, 868, 1290, 1530,
  85482. 510, 924, 1350, 1620,
  85483. 540, 980, 1440, 1710,
  85484. 570, 1036, 1530, 1800,
  85485. 570, 1064, 1590, 1890,
  85486. 600, 1120, 1680, 1980,
  85487. 630, 1204, 1770, 2100,
  85488. 660, 1260, 1860, 2220,
  85489. 720, 1316, 1950, 2310,
  85490. 750, 1372, 2040, 2430
  85491. ]
  85492. /**
  85493. * Returns the number of error correction block that the QR Code should contain
  85494. * for the specified version and error correction level.
  85495. *
  85496. * @param {Number} version QR Code version
  85497. * @param {Number} errorCorrectionLevel Error correction level
  85498. * @return {Number} Number of error correction blocks
  85499. */
  85500. exports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {
  85501. switch (errorCorrectionLevel) {
  85502. case ECLevel.L:
  85503. return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]
  85504. case ECLevel.M:
  85505. return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]
  85506. case ECLevel.Q:
  85507. return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]
  85508. case ECLevel.H:
  85509. return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]
  85510. default:
  85511. return undefined
  85512. }
  85513. }
  85514. /**
  85515. * Returns the number of error correction codewords to use for the specified
  85516. * version and error correction level.
  85517. *
  85518. * @param {Number} version QR Code version
  85519. * @param {Number} errorCorrectionLevel Error correction level
  85520. * @return {Number} Number of error correction codewords
  85521. */
  85522. exports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {
  85523. switch (errorCorrectionLevel) {
  85524. case ECLevel.L:
  85525. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]
  85526. case ECLevel.M:
  85527. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]
  85528. case ECLevel.Q:
  85529. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]
  85530. case ECLevel.H:
  85531. return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]
  85532. default:
  85533. return undefined
  85534. }
  85535. }
  85536. /***/ }),
  85537. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-level.js":
  85538. /*!******************************************************************************!*\
  85539. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-level.js ***!
  85540. \******************************************************************************/
  85541. /*! no static exports found */
  85542. /***/ (function(module, exports) {
  85543. exports.L = { bit: 1 }
  85544. exports.M = { bit: 0 }
  85545. exports.Q = { bit: 3 }
  85546. exports.H = { bit: 2 }
  85547. function fromString (string) {
  85548. if (typeof string !== 'string') {
  85549. throw new Error('Param is not a string')
  85550. }
  85551. const lcStr = string.toLowerCase()
  85552. switch (lcStr) {
  85553. case 'l':
  85554. case 'low':
  85555. return exports.L
  85556. case 'm':
  85557. case 'medium':
  85558. return exports.M
  85559. case 'q':
  85560. case 'quartile':
  85561. return exports.Q
  85562. case 'h':
  85563. case 'high':
  85564. return exports.H
  85565. default:
  85566. throw new Error('Unknown EC Level: ' + string)
  85567. }
  85568. }
  85569. exports.isValid = function isValid (level) {
  85570. return level && typeof level.bit !== 'undefined' &&
  85571. level.bit >= 0 && level.bit < 4
  85572. }
  85573. exports.from = function from (value, defaultValue) {
  85574. if (exports.isValid(value)) {
  85575. return value
  85576. }
  85577. try {
  85578. return fromString(value)
  85579. } catch (e) {
  85580. return defaultValue
  85581. }
  85582. }
  85583. /***/ }),
  85584. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/finder-pattern.js":
  85585. /*!**********************************************************************!*\
  85586. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/finder-pattern.js ***!
  85587. \**********************************************************************/
  85588. /*! no static exports found */
  85589. /***/ (function(module, exports, __webpack_require__) {
  85590. const getSymbolSize = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js").getSymbolSize
  85591. const FINDER_PATTERN_SIZE = 7
  85592. /**
  85593. * Returns an array containing the positions of each finder pattern.
  85594. * Each array's element represent the top-left point of the pattern as (x, y) coordinates
  85595. *
  85596. * @param {Number} version QR Code version
  85597. * @return {Array} Array of coordinates
  85598. */
  85599. exports.getPositions = function getPositions (version) {
  85600. const size = getSymbolSize(version)
  85601. return [
  85602. // top-left
  85603. [0, 0],
  85604. // top-right
  85605. [size - FINDER_PATTERN_SIZE, 0],
  85606. // bottom-left
  85607. [0, size - FINDER_PATTERN_SIZE]
  85608. ]
  85609. }
  85610. /***/ }),
  85611. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/format-info.js":
  85612. /*!*******************************************************************!*\
  85613. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/format-info.js ***!
  85614. \*******************************************************************/
  85615. /*! no static exports found */
  85616. /***/ (function(module, exports, __webpack_require__) {
  85617. const Utils = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js")
  85618. const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)
  85619. const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)
  85620. const G15_BCH = Utils.getBCHDigit(G15)
  85621. /**
  85622. * Returns format information with relative error correction bits
  85623. *
  85624. * The format information is a 15-bit sequence containing 5 data bits,
  85625. * with 10 error correction bits calculated using the (15, 5) BCH code.
  85626. *
  85627. * @param {Number} errorCorrectionLevel Error correction level
  85628. * @param {Number} mask Mask pattern
  85629. * @return {Number} Encoded format information bits
  85630. */
  85631. exports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
  85632. const data = ((errorCorrectionLevel.bit << 3) | mask)
  85633. let d = data << 10
  85634. while (Utils.getBCHDigit(d) - G15_BCH >= 0) {
  85635. d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))
  85636. }
  85637. // xor final data with mask pattern in order to ensure that
  85638. // no combination of Error Correction Level and data mask pattern
  85639. // will result in an all-zero data string
  85640. return ((data << 10) | d) ^ G15_MASK
  85641. }
  85642. /***/ }),
  85643. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/galois-field.js":
  85644. /*!********************************************************************!*\
  85645. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/galois-field.js ***!
  85646. \********************************************************************/
  85647. /*! no static exports found */
  85648. /***/ (function(module, exports) {
  85649. const EXP_TABLE = new Uint8Array(512)
  85650. const LOG_TABLE = new Uint8Array(256)
  85651. /**
  85652. * Precompute the log and anti-log tables for faster computation later
  85653. *
  85654. * For each possible value in the galois field 2^8, we will pre-compute
  85655. * the logarithm and anti-logarithm (exponential) of this value
  85656. *
  85657. * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
  85658. */
  85659. ;(function initTables () {
  85660. let x = 1
  85661. for (let i = 0; i < 255; i++) {
  85662. EXP_TABLE[i] = x
  85663. LOG_TABLE[x] = i
  85664. x <<= 1 // multiply by 2
  85665. // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
  85666. // This means that when a number is 256 or larger, it should be XORed with 0x11D.
  85667. if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)
  85668. x ^= 0x11D
  85669. }
  85670. }
  85671. // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
  85672. // stay inside the bounds (because we will mainly use this table for the multiplication of
  85673. // two GF numbers, no more).
  85674. // @see {@link mul}
  85675. for (let i = 255; i < 512; i++) {
  85676. EXP_TABLE[i] = EXP_TABLE[i - 255]
  85677. }
  85678. }())
  85679. /**
  85680. * Returns log value of n inside Galois Field
  85681. *
  85682. * @param {Number} n
  85683. * @return {Number}
  85684. */
  85685. exports.log = function log (n) {
  85686. if (n < 1) throw new Error('log(' + n + ')')
  85687. return LOG_TABLE[n]
  85688. }
  85689. /**
  85690. * Returns anti-log value of n inside Galois Field
  85691. *
  85692. * @param {Number} n
  85693. * @return {Number}
  85694. */
  85695. exports.exp = function exp (n) {
  85696. return EXP_TABLE[n]
  85697. }
  85698. /**
  85699. * Multiplies two number inside Galois Field
  85700. *
  85701. * @param {Number} x
  85702. * @param {Number} y
  85703. * @return {Number}
  85704. */
  85705. exports.mul = function mul (x, y) {
  85706. if (x === 0 || y === 0) return 0
  85707. // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
  85708. // @see {@link initTables}
  85709. return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]
  85710. }
  85711. /***/ }),
  85712. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/kanji-data.js":
  85713. /*!******************************************************************!*\
  85714. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/kanji-data.js ***!
  85715. \******************************************************************/
  85716. /*! no static exports found */
  85717. /***/ (function(module, exports, __webpack_require__) {
  85718. const Mode = __webpack_require__(/*! ./mode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js")
  85719. const Utils = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js")
  85720. function KanjiData (data) {
  85721. this.mode = Mode.KANJI
  85722. this.data = data
  85723. }
  85724. KanjiData.getBitsLength = function getBitsLength (length) {
  85725. return length * 13
  85726. }
  85727. KanjiData.prototype.getLength = function getLength () {
  85728. return this.data.length
  85729. }
  85730. KanjiData.prototype.getBitsLength = function getBitsLength () {
  85731. return KanjiData.getBitsLength(this.data.length)
  85732. }
  85733. KanjiData.prototype.write = function (bitBuffer) {
  85734. let i
  85735. // In the Shift JIS system, Kanji characters are represented by a two byte combination.
  85736. // These byte values are shifted from the JIS X 0208 values.
  85737. // JIS X 0208 gives details of the shift coded representation.
  85738. for (i = 0; i < this.data.length; i++) {
  85739. let value = Utils.toSJIS(this.data[i])
  85740. // For characters with Shift JIS values from 0x8140 to 0x9FFC:
  85741. if (value >= 0x8140 && value <= 0x9FFC) {
  85742. // Subtract 0x8140 from Shift JIS value
  85743. value -= 0x8140
  85744. // For characters with Shift JIS values from 0xE040 to 0xEBBF
  85745. } else if (value >= 0xE040 && value <= 0xEBBF) {
  85746. // Subtract 0xC140 from Shift JIS value
  85747. value -= 0xC140
  85748. } else {
  85749. throw new Error(
  85750. 'Invalid SJIS character: ' + this.data[i] + '\n' +
  85751. 'Make sure your charset is UTF-8')
  85752. }
  85753. // Multiply most significant byte of result by 0xC0
  85754. // and add least significant byte to product
  85755. value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)
  85756. // Convert result to a 13-bit binary string
  85757. bitBuffer.put(value, 13)
  85758. }
  85759. }
  85760. module.exports = KanjiData
  85761. /***/ }),
  85762. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mask-pattern.js":
  85763. /*!********************************************************************!*\
  85764. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/mask-pattern.js ***!
  85765. \********************************************************************/
  85766. /*! no static exports found */
  85767. /***/ (function(module, exports) {
  85768. /**
  85769. * Data mask pattern reference
  85770. * @type {Object}
  85771. */
  85772. exports.Patterns = {
  85773. PATTERN000: 0,
  85774. PATTERN001: 1,
  85775. PATTERN010: 2,
  85776. PATTERN011: 3,
  85777. PATTERN100: 4,
  85778. PATTERN101: 5,
  85779. PATTERN110: 6,
  85780. PATTERN111: 7
  85781. }
  85782. /**
  85783. * Weighted penalty scores for the undesirable features
  85784. * @type {Object}
  85785. */
  85786. const PenaltyScores = {
  85787. N1: 3,
  85788. N2: 3,
  85789. N3: 40,
  85790. N4: 10
  85791. }
  85792. /**
  85793. * Check if mask pattern value is valid
  85794. *
  85795. * @param {Number} mask Mask pattern
  85796. * @return {Boolean} true if valid, false otherwise
  85797. */
  85798. exports.isValid = function isValid (mask) {
  85799. return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7
  85800. }
  85801. /**
  85802. * Returns mask pattern from a value.
  85803. * If value is not valid, returns undefined
  85804. *
  85805. * @param {Number|String} value Mask pattern value
  85806. * @return {Number} Valid mask pattern or undefined
  85807. */
  85808. exports.from = function from (value) {
  85809. return exports.isValid(value) ? parseInt(value, 10) : undefined
  85810. }
  85811. /**
  85812. * Find adjacent modules in row/column with the same color
  85813. * and assign a penalty value.
  85814. *
  85815. * Points: N1 + i
  85816. * i is the amount by which the number of adjacent modules of the same color exceeds 5
  85817. */
  85818. exports.getPenaltyN1 = function getPenaltyN1 (data) {
  85819. const size = data.size
  85820. let points = 0
  85821. let sameCountCol = 0
  85822. let sameCountRow = 0
  85823. let lastCol = null
  85824. let lastRow = null
  85825. for (let row = 0; row < size; row++) {
  85826. sameCountCol = sameCountRow = 0
  85827. lastCol = lastRow = null
  85828. for (let col = 0; col < size; col++) {
  85829. let module = data.get(row, col)
  85830. if (module === lastCol) {
  85831. sameCountCol++
  85832. } else {
  85833. if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)
  85834. lastCol = module
  85835. sameCountCol = 1
  85836. }
  85837. module = data.get(col, row)
  85838. if (module === lastRow) {
  85839. sameCountRow++
  85840. } else {
  85841. if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)
  85842. lastRow = module
  85843. sameCountRow = 1
  85844. }
  85845. }
  85846. if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)
  85847. if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)
  85848. }
  85849. return points
  85850. }
  85851. /**
  85852. * Find 2x2 blocks with the same color and assign a penalty value
  85853. *
  85854. * Points: N2 * (m - 1) * (n - 1)
  85855. */
  85856. exports.getPenaltyN2 = function getPenaltyN2 (data) {
  85857. const size = data.size
  85858. let points = 0
  85859. for (let row = 0; row < size - 1; row++) {
  85860. for (let col = 0; col < size - 1; col++) {
  85861. const last = data.get(row, col) +
  85862. data.get(row, col + 1) +
  85863. data.get(row + 1, col) +
  85864. data.get(row + 1, col + 1)
  85865. if (last === 4 || last === 0) points++
  85866. }
  85867. }
  85868. return points * PenaltyScores.N2
  85869. }
  85870. /**
  85871. * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
  85872. * preceded or followed by light area 4 modules wide
  85873. *
  85874. * Points: N3 * number of pattern found
  85875. */
  85876. exports.getPenaltyN3 = function getPenaltyN3 (data) {
  85877. const size = data.size
  85878. let points = 0
  85879. let bitsCol = 0
  85880. let bitsRow = 0
  85881. for (let row = 0; row < size; row++) {
  85882. bitsCol = bitsRow = 0
  85883. for (let col = 0; col < size; col++) {
  85884. bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)
  85885. if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++
  85886. bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)
  85887. if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++
  85888. }
  85889. }
  85890. return points * PenaltyScores.N3
  85891. }
  85892. /**
  85893. * Calculate proportion of dark modules in entire symbol
  85894. *
  85895. * Points: N4 * k
  85896. *
  85897. * k is the rating of the deviation of the proportion of dark modules
  85898. * in the symbol from 50% in steps of 5%
  85899. */
  85900. exports.getPenaltyN4 = function getPenaltyN4 (data) {
  85901. let darkCount = 0
  85902. const modulesCount = data.data.length
  85903. for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]
  85904. const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)
  85905. return k * PenaltyScores.N4
  85906. }
  85907. /**
  85908. * Return mask value at given position
  85909. *
  85910. * @param {Number} maskPattern Pattern reference value
  85911. * @param {Number} i Row
  85912. * @param {Number} j Column
  85913. * @return {Boolean} Mask value
  85914. */
  85915. function getMaskAt (maskPattern, i, j) {
  85916. switch (maskPattern) {
  85917. case exports.Patterns.PATTERN000: return (i + j) % 2 === 0
  85918. case exports.Patterns.PATTERN001: return i % 2 === 0
  85919. case exports.Patterns.PATTERN010: return j % 3 === 0
  85920. case exports.Patterns.PATTERN011: return (i + j) % 3 === 0
  85921. case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0
  85922. case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0
  85923. case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0
  85924. case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0
  85925. default: throw new Error('bad maskPattern:' + maskPattern)
  85926. }
  85927. }
  85928. /**
  85929. * Apply a mask pattern to a BitMatrix
  85930. *
  85931. * @param {Number} pattern Pattern reference number
  85932. * @param {BitMatrix} data BitMatrix data
  85933. */
  85934. exports.applyMask = function applyMask (pattern, data) {
  85935. const size = data.size
  85936. for (let col = 0; col < size; col++) {
  85937. for (let row = 0; row < size; row++) {
  85938. if (data.isReserved(row, col)) continue
  85939. data.xor(row, col, getMaskAt(pattern, row, col))
  85940. }
  85941. }
  85942. }
  85943. /**
  85944. * Returns the best mask pattern for data
  85945. *
  85946. * @param {BitMatrix} data
  85947. * @return {Number} Mask pattern reference number
  85948. */
  85949. exports.getBestMask = function getBestMask (data, setupFormatFunc) {
  85950. const numPatterns = Object.keys(exports.Patterns).length
  85951. let bestPattern = 0
  85952. let lowerPenalty = Infinity
  85953. for (let p = 0; p < numPatterns; p++) {
  85954. setupFormatFunc(p)
  85955. exports.applyMask(p, data)
  85956. // Calculate penalty
  85957. const penalty =
  85958. exports.getPenaltyN1(data) +
  85959. exports.getPenaltyN2(data) +
  85960. exports.getPenaltyN3(data) +
  85961. exports.getPenaltyN4(data)
  85962. // Undo previously applied mask
  85963. exports.applyMask(p, data)
  85964. if (penalty < lowerPenalty) {
  85965. lowerPenalty = penalty
  85966. bestPattern = p
  85967. }
  85968. }
  85969. return bestPattern
  85970. }
  85971. /***/ }),
  85972. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js":
  85973. /*!************************************************************!*\
  85974. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js ***!
  85975. \************************************************************/
  85976. /*! no static exports found */
  85977. /***/ (function(module, exports, __webpack_require__) {
  85978. const VersionCheck = __webpack_require__(/*! ./version-check */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/version-check.js")
  85979. const Regex = __webpack_require__(/*! ./regex */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/regex.js")
  85980. /**
  85981. * Numeric mode encodes data from the decimal digit set (0 - 9)
  85982. * (byte values 30HEX to 39HEX).
  85983. * Normally, 3 data characters are represented by 10 bits.
  85984. *
  85985. * @type {Object}
  85986. */
  85987. exports.NUMERIC = {
  85988. id: 'Numeric',
  85989. bit: 1 << 0,
  85990. ccBits: [10, 12, 14]
  85991. }
  85992. /**
  85993. * Alphanumeric mode encodes data from a set of 45 characters,
  85994. * i.e. 10 numeric digits (0 - 9),
  85995. * 26 alphabetic characters (A - Z),
  85996. * and 9 symbols (SP, $, %, *, +, -, ., /, :).
  85997. * Normally, two input characters are represented by 11 bits.
  85998. *
  85999. * @type {Object}
  86000. */
  86001. exports.ALPHANUMERIC = {
  86002. id: 'Alphanumeric',
  86003. bit: 1 << 1,
  86004. ccBits: [9, 11, 13]
  86005. }
  86006. /**
  86007. * In byte mode, data is encoded at 8 bits per character.
  86008. *
  86009. * @type {Object}
  86010. */
  86011. exports.BYTE = {
  86012. id: 'Byte',
  86013. bit: 1 << 2,
  86014. ccBits: [8, 16, 16]
  86015. }
  86016. /**
  86017. * The Kanji mode efficiently encodes Kanji characters in accordance with
  86018. * the Shift JIS system based on JIS X 0208.
  86019. * The Shift JIS values are shifted from the JIS X 0208 values.
  86020. * JIS X 0208 gives details of the shift coded representation.
  86021. * Each two-byte character value is compacted to a 13-bit binary codeword.
  86022. *
  86023. * @type {Object}
  86024. */
  86025. exports.KANJI = {
  86026. id: 'Kanji',
  86027. bit: 1 << 3,
  86028. ccBits: [8, 10, 12]
  86029. }
  86030. /**
  86031. * Mixed mode will contain a sequences of data in a combination of any of
  86032. * the modes described above
  86033. *
  86034. * @type {Object}
  86035. */
  86036. exports.MIXED = {
  86037. bit: -1
  86038. }
  86039. /**
  86040. * Returns the number of bits needed to store the data length
  86041. * according to QR Code specifications.
  86042. *
  86043. * @param {Mode} mode Data mode
  86044. * @param {Number} version QR Code version
  86045. * @return {Number} Number of bits
  86046. */
  86047. exports.getCharCountIndicator = function getCharCountIndicator (mode, version) {
  86048. if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)
  86049. if (!VersionCheck.isValid(version)) {
  86050. throw new Error('Invalid version: ' + version)
  86051. }
  86052. if (version >= 1 && version < 10) return mode.ccBits[0]
  86053. else if (version < 27) return mode.ccBits[1]
  86054. return mode.ccBits[2]
  86055. }
  86056. /**
  86057. * Returns the most efficient mode to store the specified data
  86058. *
  86059. * @param {String} dataStr Input data string
  86060. * @return {Mode} Best mode
  86061. */
  86062. exports.getBestModeForData = function getBestModeForData (dataStr) {
  86063. if (Regex.testNumeric(dataStr)) return exports.NUMERIC
  86064. else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC
  86065. else if (Regex.testKanji(dataStr)) return exports.KANJI
  86066. else return exports.BYTE
  86067. }
  86068. /**
  86069. * Return mode name as string
  86070. *
  86071. * @param {Mode} mode Mode object
  86072. * @returns {String} Mode name
  86073. */
  86074. exports.toString = function toString (mode) {
  86075. if (mode && mode.id) return mode.id
  86076. throw new Error('Invalid mode')
  86077. }
  86078. /**
  86079. * Check if input param is a valid mode object
  86080. *
  86081. * @param {Mode} mode Mode object
  86082. * @returns {Boolean} True if valid mode, false otherwise
  86083. */
  86084. exports.isValid = function isValid (mode) {
  86085. return mode && mode.bit && mode.ccBits
  86086. }
  86087. /**
  86088. * Get mode object from its name
  86089. *
  86090. * @param {String} string Mode name
  86091. * @returns {Mode} Mode object
  86092. */
  86093. function fromString (string) {
  86094. if (typeof string !== 'string') {
  86095. throw new Error('Param is not a string')
  86096. }
  86097. const lcStr = string.toLowerCase()
  86098. switch (lcStr) {
  86099. case 'numeric':
  86100. return exports.NUMERIC
  86101. case 'alphanumeric':
  86102. return exports.ALPHANUMERIC
  86103. case 'kanji':
  86104. return exports.KANJI
  86105. case 'byte':
  86106. return exports.BYTE
  86107. default:
  86108. throw new Error('Unknown mode: ' + string)
  86109. }
  86110. }
  86111. /**
  86112. * Returns mode from a value.
  86113. * If value is not a valid mode, returns defaultValue
  86114. *
  86115. * @param {Mode|String} value Encoding mode
  86116. * @param {Mode} defaultValue Fallback value
  86117. * @return {Mode} Encoding mode
  86118. */
  86119. exports.from = function from (value, defaultValue) {
  86120. if (exports.isValid(value)) {
  86121. return value
  86122. }
  86123. try {
  86124. return fromString(value)
  86125. } catch (e) {
  86126. return defaultValue
  86127. }
  86128. }
  86129. /***/ }),
  86130. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/numeric-data.js":
  86131. /*!********************************************************************!*\
  86132. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/numeric-data.js ***!
  86133. \********************************************************************/
  86134. /*! no static exports found */
  86135. /***/ (function(module, exports, __webpack_require__) {
  86136. const Mode = __webpack_require__(/*! ./mode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js")
  86137. function NumericData (data) {
  86138. this.mode = Mode.NUMERIC
  86139. this.data = data.toString()
  86140. }
  86141. NumericData.getBitsLength = function getBitsLength (length) {
  86142. return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)
  86143. }
  86144. NumericData.prototype.getLength = function getLength () {
  86145. return this.data.length
  86146. }
  86147. NumericData.prototype.getBitsLength = function getBitsLength () {
  86148. return NumericData.getBitsLength(this.data.length)
  86149. }
  86150. NumericData.prototype.write = function write (bitBuffer) {
  86151. let i, group, value
  86152. // The input data string is divided into groups of three digits,
  86153. // and each group is converted to its 10-bit binary equivalent.
  86154. for (i = 0; i + 3 <= this.data.length; i += 3) {
  86155. group = this.data.substr(i, 3)
  86156. value = parseInt(group, 10)
  86157. bitBuffer.put(value, 10)
  86158. }
  86159. // If the number of input digits is not an exact multiple of three,
  86160. // the final one or two digits are converted to 4 or 7 bits respectively.
  86161. const remainingNum = this.data.length - i
  86162. if (remainingNum > 0) {
  86163. group = this.data.substr(i)
  86164. value = parseInt(group, 10)
  86165. bitBuffer.put(value, remainingNum * 3 + 1)
  86166. }
  86167. }
  86168. module.exports = NumericData
  86169. /***/ }),
  86170. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/polynomial.js":
  86171. /*!******************************************************************!*\
  86172. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/polynomial.js ***!
  86173. \******************************************************************/
  86174. /*! no static exports found */
  86175. /***/ (function(module, exports, __webpack_require__) {
  86176. const GF = __webpack_require__(/*! ./galois-field */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/galois-field.js")
  86177. /**
  86178. * Multiplies two polynomials inside Galois Field
  86179. *
  86180. * @param {Uint8Array} p1 Polynomial
  86181. * @param {Uint8Array} p2 Polynomial
  86182. * @return {Uint8Array} Product of p1 and p2
  86183. */
  86184. exports.mul = function mul (p1, p2) {
  86185. const coeff = new Uint8Array(p1.length + p2.length - 1)
  86186. for (let i = 0; i < p1.length; i++) {
  86187. for (let j = 0; j < p2.length; j++) {
  86188. coeff[i + j] ^= GF.mul(p1[i], p2[j])
  86189. }
  86190. }
  86191. return coeff
  86192. }
  86193. /**
  86194. * Calculate the remainder of polynomials division
  86195. *
  86196. * @param {Uint8Array} divident Polynomial
  86197. * @param {Uint8Array} divisor Polynomial
  86198. * @return {Uint8Array} Remainder
  86199. */
  86200. exports.mod = function mod (divident, divisor) {
  86201. let result = new Uint8Array(divident)
  86202. while ((result.length - divisor.length) >= 0) {
  86203. const coeff = result[0]
  86204. for (let i = 0; i < divisor.length; i++) {
  86205. result[i] ^= GF.mul(divisor[i], coeff)
  86206. }
  86207. // remove all zeros from buffer head
  86208. let offset = 0
  86209. while (offset < result.length && result[offset] === 0) offset++
  86210. result = result.slice(offset)
  86211. }
  86212. return result
  86213. }
  86214. /**
  86215. * Generate an irreducible generator polynomial of specified degree
  86216. * (used by Reed-Solomon encoder)
  86217. *
  86218. * @param {Number} degree Degree of the generator polynomial
  86219. * @return {Uint8Array} Buffer containing polynomial coefficients
  86220. */
  86221. exports.generateECPolynomial = function generateECPolynomial (degree) {
  86222. let poly = new Uint8Array([1])
  86223. for (let i = 0; i < degree; i++) {
  86224. poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))
  86225. }
  86226. return poly
  86227. }
  86228. /***/ }),
  86229. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/qrcode.js":
  86230. /*!**************************************************************!*\
  86231. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/qrcode.js ***!
  86232. \**************************************************************/
  86233. /*! no static exports found */
  86234. /***/ (function(module, exports, __webpack_require__) {
  86235. const Utils = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js")
  86236. const ECLevel = __webpack_require__(/*! ./error-correction-level */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-level.js")
  86237. const BitBuffer = __webpack_require__(/*! ./bit-buffer */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/bit-buffer.js")
  86238. const BitMatrix = __webpack_require__(/*! ./bit-matrix */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/bit-matrix.js")
  86239. const AlignmentPattern = __webpack_require__(/*! ./alignment-pattern */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/alignment-pattern.js")
  86240. const FinderPattern = __webpack_require__(/*! ./finder-pattern */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/finder-pattern.js")
  86241. const MaskPattern = __webpack_require__(/*! ./mask-pattern */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mask-pattern.js")
  86242. const ECCode = __webpack_require__(/*! ./error-correction-code */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-code.js")
  86243. const ReedSolomonEncoder = __webpack_require__(/*! ./reed-solomon-encoder */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/reed-solomon-encoder.js")
  86244. const Version = __webpack_require__(/*! ./version */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/version.js")
  86245. const FormatInfo = __webpack_require__(/*! ./format-info */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/format-info.js")
  86246. const Mode = __webpack_require__(/*! ./mode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js")
  86247. const Segments = __webpack_require__(/*! ./segments */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/segments.js")
  86248. /**
  86249. * QRCode for JavaScript
  86250. *
  86251. * modified by Ryan Day for nodejs support
  86252. * Copyright (c) 2011 Ryan Day
  86253. *
  86254. * Licensed under the MIT license:
  86255. * http://www.opensource.org/licenses/mit-license.php
  86256. *
  86257. //---------------------------------------------------------------------
  86258. // QRCode for JavaScript
  86259. //
  86260. // Copyright (c) 2009 Kazuhiko Arase
  86261. //
  86262. // URL: http://www.d-project.com/
  86263. //
  86264. // Licensed under the MIT license:
  86265. // http://www.opensource.org/licenses/mit-license.php
  86266. //
  86267. // The word "QR Code" is registered trademark of
  86268. // DENSO WAVE INCORPORATED
  86269. // http://www.denso-wave.com/qrcode/faqpatent-e.html
  86270. //
  86271. //---------------------------------------------------------------------
  86272. */
  86273. /**
  86274. * Add finder patterns bits to matrix
  86275. *
  86276. * @param {BitMatrix} matrix Modules matrix
  86277. * @param {Number} version QR Code version
  86278. */
  86279. function setupFinderPattern (matrix, version) {
  86280. const size = matrix.size
  86281. const pos = FinderPattern.getPositions(version)
  86282. for (let i = 0; i < pos.length; i++) {
  86283. const row = pos[i][0]
  86284. const col = pos[i][1]
  86285. for (let r = -1; r <= 7; r++) {
  86286. if (row + r <= -1 || size <= row + r) continue
  86287. for (let c = -1; c <= 7; c++) {
  86288. if (col + c <= -1 || size <= col + c) continue
  86289. if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
  86290. (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
  86291. (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
  86292. matrix.set(row + r, col + c, true, true)
  86293. } else {
  86294. matrix.set(row + r, col + c, false, true)
  86295. }
  86296. }
  86297. }
  86298. }
  86299. }
  86300. /**
  86301. * Add timing pattern bits to matrix
  86302. *
  86303. * Note: this function must be called before {@link setupAlignmentPattern}
  86304. *
  86305. * @param {BitMatrix} matrix Modules matrix
  86306. */
  86307. function setupTimingPattern (matrix) {
  86308. const size = matrix.size
  86309. for (let r = 8; r < size - 8; r++) {
  86310. const value = r % 2 === 0
  86311. matrix.set(r, 6, value, true)
  86312. matrix.set(6, r, value, true)
  86313. }
  86314. }
  86315. /**
  86316. * Add alignment patterns bits to matrix
  86317. *
  86318. * Note: this function must be called after {@link setupTimingPattern}
  86319. *
  86320. * @param {BitMatrix} matrix Modules matrix
  86321. * @param {Number} version QR Code version
  86322. */
  86323. function setupAlignmentPattern (matrix, version) {
  86324. const pos = AlignmentPattern.getPositions(version)
  86325. for (let i = 0; i < pos.length; i++) {
  86326. const row = pos[i][0]
  86327. const col = pos[i][1]
  86328. for (let r = -2; r <= 2; r++) {
  86329. for (let c = -2; c <= 2; c++) {
  86330. if (r === -2 || r === 2 || c === -2 || c === 2 ||
  86331. (r === 0 && c === 0)) {
  86332. matrix.set(row + r, col + c, true, true)
  86333. } else {
  86334. matrix.set(row + r, col + c, false, true)
  86335. }
  86336. }
  86337. }
  86338. }
  86339. }
  86340. /**
  86341. * Add version info bits to matrix
  86342. *
  86343. * @param {BitMatrix} matrix Modules matrix
  86344. * @param {Number} version QR Code version
  86345. */
  86346. function setupVersionInfo (matrix, version) {
  86347. const size = matrix.size
  86348. const bits = Version.getEncodedBits(version)
  86349. let row, col, mod
  86350. for (let i = 0; i < 18; i++) {
  86351. row = Math.floor(i / 3)
  86352. col = i % 3 + size - 8 - 3
  86353. mod = ((bits >> i) & 1) === 1
  86354. matrix.set(row, col, mod, true)
  86355. matrix.set(col, row, mod, true)
  86356. }
  86357. }
  86358. /**
  86359. * Add format info bits to matrix
  86360. *
  86361. * @param {BitMatrix} matrix Modules matrix
  86362. * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
  86363. * @param {Number} maskPattern Mask pattern reference value
  86364. */
  86365. function setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {
  86366. const size = matrix.size
  86367. const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)
  86368. let i, mod
  86369. for (i = 0; i < 15; i++) {
  86370. mod = ((bits >> i) & 1) === 1
  86371. // vertical
  86372. if (i < 6) {
  86373. matrix.set(i, 8, mod, true)
  86374. } else if (i < 8) {
  86375. matrix.set(i + 1, 8, mod, true)
  86376. } else {
  86377. matrix.set(size - 15 + i, 8, mod, true)
  86378. }
  86379. // horizontal
  86380. if (i < 8) {
  86381. matrix.set(8, size - i - 1, mod, true)
  86382. } else if (i < 9) {
  86383. matrix.set(8, 15 - i - 1 + 1, mod, true)
  86384. } else {
  86385. matrix.set(8, 15 - i - 1, mod, true)
  86386. }
  86387. }
  86388. // fixed module
  86389. matrix.set(size - 8, 8, 1, true)
  86390. }
  86391. /**
  86392. * Add encoded data bits to matrix
  86393. *
  86394. * @param {BitMatrix} matrix Modules matrix
  86395. * @param {Uint8Array} data Data codewords
  86396. */
  86397. function setupData (matrix, data) {
  86398. const size = matrix.size
  86399. let inc = -1
  86400. let row = size - 1
  86401. let bitIndex = 7
  86402. let byteIndex = 0
  86403. for (let col = size - 1; col > 0; col -= 2) {
  86404. if (col === 6) col--
  86405. while (true) {
  86406. for (let c = 0; c < 2; c++) {
  86407. if (!matrix.isReserved(row, col - c)) {
  86408. let dark = false
  86409. if (byteIndex < data.length) {
  86410. dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)
  86411. }
  86412. matrix.set(row, col - c, dark)
  86413. bitIndex--
  86414. if (bitIndex === -1) {
  86415. byteIndex++
  86416. bitIndex = 7
  86417. }
  86418. }
  86419. }
  86420. row += inc
  86421. if (row < 0 || size <= row) {
  86422. row -= inc
  86423. inc = -inc
  86424. break
  86425. }
  86426. }
  86427. }
  86428. }
  86429. /**
  86430. * Create encoded codewords from data input
  86431. *
  86432. * @param {Number} version QR Code version
  86433. * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
  86434. * @param {ByteData} data Data input
  86435. * @return {Uint8Array} Buffer containing encoded codewords
  86436. */
  86437. function createData (version, errorCorrectionLevel, segments) {
  86438. // Prepare data buffer
  86439. const buffer = new BitBuffer()
  86440. segments.forEach(function (data) {
  86441. // prefix data with mode indicator (4 bits)
  86442. buffer.put(data.mode.bit, 4)
  86443. // Prefix data with character count indicator.
  86444. // The character count indicator is a string of bits that represents the
  86445. // number of characters that are being encoded.
  86446. // The character count indicator must be placed after the mode indicator
  86447. // and must be a certain number of bits long, depending on the QR version
  86448. // and data mode
  86449. // @see {@link Mode.getCharCountIndicator}.
  86450. buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))
  86451. // add binary data sequence to buffer
  86452. data.write(buffer)
  86453. })
  86454. // Calculate required number of bits
  86455. const totalCodewords = Utils.getSymbolTotalCodewords(version)
  86456. const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)
  86457. const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8
  86458. // Add a terminator.
  86459. // If the bit string is shorter than the total number of required bits,
  86460. // a terminator of up to four 0s must be added to the right side of the string.
  86461. // If the bit string is more than four bits shorter than the required number of bits,
  86462. // add four 0s to the end.
  86463. if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
  86464. buffer.put(0, 4)
  86465. }
  86466. // If the bit string is fewer than four bits shorter, add only the number of 0s that
  86467. // are needed to reach the required number of bits.
  86468. // After adding the terminator, if the number of bits in the string is not a multiple of 8,
  86469. // pad the string on the right with 0s to make the string's length a multiple of 8.
  86470. while (buffer.getLengthInBits() % 8 !== 0) {
  86471. buffer.putBit(0)
  86472. }
  86473. // Add pad bytes if the string is still shorter than the total number of required bits.
  86474. // Extend the buffer to fill the data capacity of the symbol corresponding to
  86475. // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
  86476. // and 00010001 (0x11) alternately.
  86477. const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8
  86478. for (let i = 0; i < remainingByte; i++) {
  86479. buffer.put(i % 2 ? 0x11 : 0xEC, 8)
  86480. }
  86481. return createCodewords(buffer, version, errorCorrectionLevel)
  86482. }
  86483. /**
  86484. * Encode input data with Reed-Solomon and return codewords with
  86485. * relative error correction bits
  86486. *
  86487. * @param {BitBuffer} bitBuffer Data to encode
  86488. * @param {Number} version QR Code version
  86489. * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
  86490. * @return {Uint8Array} Buffer containing encoded codewords
  86491. */
  86492. function createCodewords (bitBuffer, version, errorCorrectionLevel) {
  86493. // Total codewords for this QR code version (Data + Error correction)
  86494. const totalCodewords = Utils.getSymbolTotalCodewords(version)
  86495. // Total number of error correction codewords
  86496. const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)
  86497. // Total number of data codewords
  86498. const dataTotalCodewords = totalCodewords - ecTotalCodewords
  86499. // Total number of blocks
  86500. const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)
  86501. // Calculate how many blocks each group should contain
  86502. const blocksInGroup2 = totalCodewords % ecTotalBlocks
  86503. const blocksInGroup1 = ecTotalBlocks - blocksInGroup2
  86504. const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)
  86505. const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)
  86506. const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1
  86507. // Number of EC codewords is the same for both groups
  86508. const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1
  86509. // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
  86510. const rs = new ReedSolomonEncoder(ecCount)
  86511. let offset = 0
  86512. const dcData = new Array(ecTotalBlocks)
  86513. const ecData = new Array(ecTotalBlocks)
  86514. let maxDataSize = 0
  86515. const buffer = new Uint8Array(bitBuffer.buffer)
  86516. // Divide the buffer into the required number of blocks
  86517. for (let b = 0; b < ecTotalBlocks; b++) {
  86518. const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2
  86519. // extract a block of data from buffer
  86520. dcData[b] = buffer.slice(offset, offset + dataSize)
  86521. // Calculate EC codewords for this data block
  86522. ecData[b] = rs.encode(dcData[b])
  86523. offset += dataSize
  86524. maxDataSize = Math.max(maxDataSize, dataSize)
  86525. }
  86526. // Create final data
  86527. // Interleave the data and error correction codewords from each block
  86528. const data = new Uint8Array(totalCodewords)
  86529. let index = 0
  86530. let i, r
  86531. // Add data codewords
  86532. for (i = 0; i < maxDataSize; i++) {
  86533. for (r = 0; r < ecTotalBlocks; r++) {
  86534. if (i < dcData[r].length) {
  86535. data[index++] = dcData[r][i]
  86536. }
  86537. }
  86538. }
  86539. // Apped EC codewords
  86540. for (i = 0; i < ecCount; i++) {
  86541. for (r = 0; r < ecTotalBlocks; r++) {
  86542. data[index++] = ecData[r][i]
  86543. }
  86544. }
  86545. return data
  86546. }
  86547. /**
  86548. * Build QR Code symbol
  86549. *
  86550. * @param {String} data Input string
  86551. * @param {Number} version QR Code version
  86552. * @param {ErrorCorretionLevel} errorCorrectionLevel Error level
  86553. * @param {MaskPattern} maskPattern Mask pattern
  86554. * @return {Object} Object containing symbol data
  86555. */
  86556. function createSymbol (data, version, errorCorrectionLevel, maskPattern) {
  86557. let segments
  86558. if (Array.isArray(data)) {
  86559. segments = Segments.fromArray(data)
  86560. } else if (typeof data === 'string') {
  86561. let estimatedVersion = version
  86562. if (!estimatedVersion) {
  86563. const rawSegments = Segments.rawSplit(data)
  86564. // Estimate best version that can contain raw splitted segments
  86565. estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)
  86566. }
  86567. // Build optimized segments
  86568. // If estimated version is undefined, try with the highest version
  86569. segments = Segments.fromString(data, estimatedVersion || 40)
  86570. } else {
  86571. throw new Error('Invalid data')
  86572. }
  86573. // Get the min version that can contain data
  86574. const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)
  86575. // If no version is found, data cannot be stored
  86576. if (!bestVersion) {
  86577. throw new Error('The amount of data is too big to be stored in a QR Code')
  86578. }
  86579. // If not specified, use min version as default
  86580. if (!version) {
  86581. version = bestVersion
  86582. // Check if the specified version can contain the data
  86583. } else if (version < bestVersion) {
  86584. throw new Error('\n' +
  86585. 'The chosen QR Code version cannot contain this amount of data.\n' +
  86586. 'Minimum version required to store current data is: ' + bestVersion + '.\n'
  86587. )
  86588. }
  86589. const dataBits = createData(version, errorCorrectionLevel, segments)
  86590. // Allocate matrix buffer
  86591. const moduleCount = Utils.getSymbolSize(version)
  86592. const modules = new BitMatrix(moduleCount)
  86593. // Add function modules
  86594. setupFinderPattern(modules, version)
  86595. setupTimingPattern(modules)
  86596. setupAlignmentPattern(modules, version)
  86597. // Add temporary dummy bits for format info just to set them as reserved.
  86598. // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
  86599. // since the masking operation must be performed only on the encoding region.
  86600. // These blocks will be replaced with correct values later in code.
  86601. setupFormatInfo(modules, errorCorrectionLevel, 0)
  86602. if (version >= 7) {
  86603. setupVersionInfo(modules, version)
  86604. }
  86605. // Add data codewords
  86606. setupData(modules, dataBits)
  86607. if (isNaN(maskPattern)) {
  86608. // Find best mask pattern
  86609. maskPattern = MaskPattern.getBestMask(modules,
  86610. setupFormatInfo.bind(null, modules, errorCorrectionLevel))
  86611. }
  86612. // Apply mask pattern
  86613. MaskPattern.applyMask(maskPattern, modules)
  86614. // Replace format info bits with correct values
  86615. setupFormatInfo(modules, errorCorrectionLevel, maskPattern)
  86616. return {
  86617. modules: modules,
  86618. version: version,
  86619. errorCorrectionLevel: errorCorrectionLevel,
  86620. maskPattern: maskPattern,
  86621. segments: segments
  86622. }
  86623. }
  86624. /**
  86625. * QR Code
  86626. *
  86627. * @param {String | Array} data Input data
  86628. * @param {Object} options Optional configurations
  86629. * @param {Number} options.version QR Code version
  86630. * @param {String} options.errorCorrectionLevel Error correction level
  86631. * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis
  86632. */
  86633. exports.create = function create (data, options) {
  86634. if (typeof data === 'undefined' || data === '') {
  86635. throw new Error('No input text')
  86636. }
  86637. let errorCorrectionLevel = ECLevel.M
  86638. let version
  86639. let mask
  86640. if (typeof options !== 'undefined') {
  86641. // Use higher error correction level as default
  86642. errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)
  86643. version = Version.from(options.version)
  86644. mask = MaskPattern.from(options.maskPattern)
  86645. if (options.toSJISFunc) {
  86646. Utils.setToSJISFunction(options.toSJISFunc)
  86647. }
  86648. }
  86649. return createSymbol(data, version, errorCorrectionLevel, mask)
  86650. }
  86651. /***/ }),
  86652. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/reed-solomon-encoder.js":
  86653. /*!****************************************************************************!*\
  86654. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/reed-solomon-encoder.js ***!
  86655. \****************************************************************************/
  86656. /*! no static exports found */
  86657. /***/ (function(module, exports, __webpack_require__) {
  86658. const Polynomial = __webpack_require__(/*! ./polynomial */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/polynomial.js")
  86659. function ReedSolomonEncoder (degree) {
  86660. this.genPoly = undefined
  86661. this.degree = degree
  86662. if (this.degree) this.initialize(this.degree)
  86663. }
  86664. /**
  86665. * Initialize the encoder.
  86666. * The input param should correspond to the number of error correction codewords.
  86667. *
  86668. * @param {Number} degree
  86669. */
  86670. ReedSolomonEncoder.prototype.initialize = function initialize (degree) {
  86671. // create an irreducible generator polynomial
  86672. this.degree = degree
  86673. this.genPoly = Polynomial.generateECPolynomial(this.degree)
  86674. }
  86675. /**
  86676. * Encodes a chunk of data
  86677. *
  86678. * @param {Uint8Array} data Buffer containing input data
  86679. * @return {Uint8Array} Buffer containing encoded data
  86680. */
  86681. ReedSolomonEncoder.prototype.encode = function encode (data) {
  86682. if (!this.genPoly) {
  86683. throw new Error('Encoder not initialized')
  86684. }
  86685. // Calculate EC for this data block
  86686. // extends data size to data+genPoly size
  86687. const paddedData = new Uint8Array(data.length + this.degree)
  86688. paddedData.set(data)
  86689. // The error correction codewords are the remainder after dividing the data codewords
  86690. // by a generator polynomial
  86691. const remainder = Polynomial.mod(paddedData, this.genPoly)
  86692. // return EC data blocks (last n byte, where n is the degree of genPoly)
  86693. // If coefficients number in remainder are less than genPoly degree,
  86694. // pad with 0s to the left to reach the needed number of coefficients
  86695. const start = this.degree - remainder.length
  86696. if (start > 0) {
  86697. const buff = new Uint8Array(this.degree)
  86698. buff.set(remainder, start)
  86699. return buff
  86700. }
  86701. return remainder
  86702. }
  86703. module.exports = ReedSolomonEncoder
  86704. /***/ }),
  86705. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/regex.js":
  86706. /*!*************************************************************!*\
  86707. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/regex.js ***!
  86708. \*************************************************************/
  86709. /*! no static exports found */
  86710. /***/ (function(module, exports) {
  86711. const numeric = '[0-9]+'
  86712. const alphanumeric = '[A-Z $%*+\\-./:]+'
  86713. let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
  86714. '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
  86715. '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
  86716. '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'
  86717. kanji = kanji.replace(/u/g, '\\u')
  86718. const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+'
  86719. exports.KANJI = new RegExp(kanji, 'g')
  86720. exports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g')
  86721. exports.BYTE = new RegExp(byte, 'g')
  86722. exports.NUMERIC = new RegExp(numeric, 'g')
  86723. exports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')
  86724. const TEST_KANJI = new RegExp('^' + kanji + '$')
  86725. const TEST_NUMERIC = new RegExp('^' + numeric + '$')
  86726. const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$')
  86727. exports.testKanji = function testKanji (str) {
  86728. return TEST_KANJI.test(str)
  86729. }
  86730. exports.testNumeric = function testNumeric (str) {
  86731. return TEST_NUMERIC.test(str)
  86732. }
  86733. exports.testAlphanumeric = function testAlphanumeric (str) {
  86734. return TEST_ALPHANUMERIC.test(str)
  86735. }
  86736. /***/ }),
  86737. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/segments.js":
  86738. /*!****************************************************************!*\
  86739. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/segments.js ***!
  86740. \****************************************************************/
  86741. /*! no static exports found */
  86742. /***/ (function(module, exports, __webpack_require__) {
  86743. const Mode = __webpack_require__(/*! ./mode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js")
  86744. const NumericData = __webpack_require__(/*! ./numeric-data */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/numeric-data.js")
  86745. const AlphanumericData = __webpack_require__(/*! ./alphanumeric-data */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/alphanumeric-data.js")
  86746. const ByteData = __webpack_require__(/*! ./byte-data */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/byte-data.js")
  86747. const KanjiData = __webpack_require__(/*! ./kanji-data */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/kanji-data.js")
  86748. const Regex = __webpack_require__(/*! ./regex */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/regex.js")
  86749. const Utils = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js")
  86750. const dijkstra = __webpack_require__(/*! dijkstrajs */ "./node_modules/_dijkstrajs@1.0.2@dijkstrajs/dijkstra.js")
  86751. /**
  86752. * Returns UTF8 byte length
  86753. *
  86754. * @param {String} str Input string
  86755. * @return {Number} Number of byte
  86756. */
  86757. function getStringByteLength (str) {
  86758. return unescape(encodeURIComponent(str)).length
  86759. }
  86760. /**
  86761. * Get a list of segments of the specified mode
  86762. * from a string
  86763. *
  86764. * @param {Mode} mode Segment mode
  86765. * @param {String} str String to process
  86766. * @return {Array} Array of object with segments data
  86767. */
  86768. function getSegments (regex, mode, str) {
  86769. const segments = []
  86770. let result
  86771. while ((result = regex.exec(str)) !== null) {
  86772. segments.push({
  86773. data: result[0],
  86774. index: result.index,
  86775. mode: mode,
  86776. length: result[0].length
  86777. })
  86778. }
  86779. return segments
  86780. }
  86781. /**
  86782. * Extracts a series of segments with the appropriate
  86783. * modes from a string
  86784. *
  86785. * @param {String} dataStr Input string
  86786. * @return {Array} Array of object with segments data
  86787. */
  86788. function getSegmentsFromString (dataStr) {
  86789. const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)
  86790. const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)
  86791. let byteSegs
  86792. let kanjiSegs
  86793. if (Utils.isKanjiModeEnabled()) {
  86794. byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)
  86795. kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)
  86796. } else {
  86797. byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)
  86798. kanjiSegs = []
  86799. }
  86800. const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)
  86801. return segs
  86802. .sort(function (s1, s2) {
  86803. return s1.index - s2.index
  86804. })
  86805. .map(function (obj) {
  86806. return {
  86807. data: obj.data,
  86808. mode: obj.mode,
  86809. length: obj.length
  86810. }
  86811. })
  86812. }
  86813. /**
  86814. * Returns how many bits are needed to encode a string of
  86815. * specified length with the specified mode
  86816. *
  86817. * @param {Number} length String length
  86818. * @param {Mode} mode Segment mode
  86819. * @return {Number} Bit length
  86820. */
  86821. function getSegmentBitsLength (length, mode) {
  86822. switch (mode) {
  86823. case Mode.NUMERIC:
  86824. return NumericData.getBitsLength(length)
  86825. case Mode.ALPHANUMERIC:
  86826. return AlphanumericData.getBitsLength(length)
  86827. case Mode.KANJI:
  86828. return KanjiData.getBitsLength(length)
  86829. case Mode.BYTE:
  86830. return ByteData.getBitsLength(length)
  86831. }
  86832. }
  86833. /**
  86834. * Merges adjacent segments which have the same mode
  86835. *
  86836. * @param {Array} segs Array of object with segments data
  86837. * @return {Array} Array of object with segments data
  86838. */
  86839. function mergeSegments (segs) {
  86840. return segs.reduce(function (acc, curr) {
  86841. const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null
  86842. if (prevSeg && prevSeg.mode === curr.mode) {
  86843. acc[acc.length - 1].data += curr.data
  86844. return acc
  86845. }
  86846. acc.push(curr)
  86847. return acc
  86848. }, [])
  86849. }
  86850. /**
  86851. * Generates a list of all possible nodes combination which
  86852. * will be used to build a segments graph.
  86853. *
  86854. * Nodes are divided by groups. Each group will contain a list of all the modes
  86855. * in which is possible to encode the given text.
  86856. *
  86857. * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
  86858. * The group for '12345' will contain then 3 objects, one for each
  86859. * possible encoding mode.
  86860. *
  86861. * Each node represents a possible segment.
  86862. *
  86863. * @param {Array} segs Array of object with segments data
  86864. * @return {Array} Array of object with segments data
  86865. */
  86866. function buildNodes (segs) {
  86867. const nodes = []
  86868. for (let i = 0; i < segs.length; i++) {
  86869. const seg = segs[i]
  86870. switch (seg.mode) {
  86871. case Mode.NUMERIC:
  86872. nodes.push([seg,
  86873. { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },
  86874. { data: seg.data, mode: Mode.BYTE, length: seg.length }
  86875. ])
  86876. break
  86877. case Mode.ALPHANUMERIC:
  86878. nodes.push([seg,
  86879. { data: seg.data, mode: Mode.BYTE, length: seg.length }
  86880. ])
  86881. break
  86882. case Mode.KANJI:
  86883. nodes.push([seg,
  86884. { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
  86885. ])
  86886. break
  86887. case Mode.BYTE:
  86888. nodes.push([
  86889. { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
  86890. ])
  86891. }
  86892. }
  86893. return nodes
  86894. }
  86895. /**
  86896. * Builds a graph from a list of nodes.
  86897. * All segments in each node group will be connected with all the segments of
  86898. * the next group and so on.
  86899. *
  86900. * At each connection will be assigned a weight depending on the
  86901. * segment's byte length.
  86902. *
  86903. * @param {Array} nodes Array of object with segments data
  86904. * @param {Number} version QR Code version
  86905. * @return {Object} Graph of all possible segments
  86906. */
  86907. function buildGraph (nodes, version) {
  86908. const table = {}
  86909. const graph = { start: {} }
  86910. let prevNodeIds = ['start']
  86911. for (let i = 0; i < nodes.length; i++) {
  86912. const nodeGroup = nodes[i]
  86913. const currentNodeIds = []
  86914. for (let j = 0; j < nodeGroup.length; j++) {
  86915. const node = nodeGroup[j]
  86916. const key = '' + i + j
  86917. currentNodeIds.push(key)
  86918. table[key] = { node: node, lastCount: 0 }
  86919. graph[key] = {}
  86920. for (let n = 0; n < prevNodeIds.length; n++) {
  86921. const prevNodeId = prevNodeIds[n]
  86922. if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
  86923. graph[prevNodeId][key] =
  86924. getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
  86925. getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)
  86926. table[prevNodeId].lastCount += node.length
  86927. } else {
  86928. if (table[prevNodeId]) table[prevNodeId].lastCount = node.length
  86929. graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
  86930. 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost
  86931. }
  86932. }
  86933. }
  86934. prevNodeIds = currentNodeIds
  86935. }
  86936. for (let n = 0; n < prevNodeIds.length; n++) {
  86937. graph[prevNodeIds[n]].end = 0
  86938. }
  86939. return { map: graph, table: table }
  86940. }
  86941. /**
  86942. * Builds a segment from a specified data and mode.
  86943. * If a mode is not specified, the more suitable will be used.
  86944. *
  86945. * @param {String} data Input data
  86946. * @param {Mode | String} modesHint Data mode
  86947. * @return {Segment} Segment
  86948. */
  86949. function buildSingleSegment (data, modesHint) {
  86950. let mode
  86951. const bestMode = Mode.getBestModeForData(data)
  86952. mode = Mode.from(modesHint, bestMode)
  86953. // Make sure data can be encoded
  86954. if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {
  86955. throw new Error('"' + data + '"' +
  86956. ' cannot be encoded with mode ' + Mode.toString(mode) +
  86957. '.\n Suggested mode is: ' + Mode.toString(bestMode))
  86958. }
  86959. // Use Mode.BYTE if Kanji support is disabled
  86960. if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {
  86961. mode = Mode.BYTE
  86962. }
  86963. switch (mode) {
  86964. case Mode.NUMERIC:
  86965. return new NumericData(data)
  86966. case Mode.ALPHANUMERIC:
  86967. return new AlphanumericData(data)
  86968. case Mode.KANJI:
  86969. return new KanjiData(data)
  86970. case Mode.BYTE:
  86971. return new ByteData(data)
  86972. }
  86973. }
  86974. /**
  86975. * Builds a list of segments from an array.
  86976. * Array can contain Strings or Objects with segment's info.
  86977. *
  86978. * For each item which is a string, will be generated a segment with the given
  86979. * string and the more appropriate encoding mode.
  86980. *
  86981. * For each item which is an object, will be generated a segment with the given
  86982. * data and mode.
  86983. * Objects must contain at least the property "data".
  86984. * If property "mode" is not present, the more suitable mode will be used.
  86985. *
  86986. * @param {Array} array Array of objects with segments data
  86987. * @return {Array} Array of Segments
  86988. */
  86989. exports.fromArray = function fromArray (array) {
  86990. return array.reduce(function (acc, seg) {
  86991. if (typeof seg === 'string') {
  86992. acc.push(buildSingleSegment(seg, null))
  86993. } else if (seg.data) {
  86994. acc.push(buildSingleSegment(seg.data, seg.mode))
  86995. }
  86996. return acc
  86997. }, [])
  86998. }
  86999. /**
  87000. * Builds an optimized sequence of segments from a string,
  87001. * which will produce the shortest possible bitstream.
  87002. *
  87003. * @param {String} data Input string
  87004. * @param {Number} version QR Code version
  87005. * @return {Array} Array of segments
  87006. */
  87007. exports.fromString = function fromString (data, version) {
  87008. const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())
  87009. const nodes = buildNodes(segs)
  87010. const graph = buildGraph(nodes, version)
  87011. const path = dijkstra.find_path(graph.map, 'start', 'end')
  87012. const optimizedSegs = []
  87013. for (let i = 1; i < path.length - 1; i++) {
  87014. optimizedSegs.push(graph.table[path[i]].node)
  87015. }
  87016. return exports.fromArray(mergeSegments(optimizedSegs))
  87017. }
  87018. /**
  87019. * Splits a string in various segments with the modes which
  87020. * best represent their content.
  87021. * The produced segments are far from being optimized.
  87022. * The output of this function is only used to estimate a QR Code version
  87023. * which may contain the data.
  87024. *
  87025. * @param {string} data Input string
  87026. * @return {Array} Array of segments
  87027. */
  87028. exports.rawSplit = function rawSplit (data) {
  87029. return exports.fromArray(
  87030. getSegmentsFromString(data, Utils.isKanjiModeEnabled())
  87031. )
  87032. }
  87033. /***/ }),
  87034. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js":
  87035. /*!*************************************************************!*\
  87036. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js ***!
  87037. \*************************************************************/
  87038. /*! no static exports found */
  87039. /***/ (function(module, exports) {
  87040. let toSJISFunction
  87041. const CODEWORDS_COUNT = [
  87042. 0, // Not used
  87043. 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
  87044. 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
  87045. 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
  87046. 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
  87047. ]
  87048. /**
  87049. * Returns the QR Code size for the specified version
  87050. *
  87051. * @param {Number} version QR Code version
  87052. * @return {Number} size of QR code
  87053. */
  87054. exports.getSymbolSize = function getSymbolSize (version) {
  87055. if (!version) throw new Error('"version" cannot be null or undefined')
  87056. if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40')
  87057. return version * 4 + 17
  87058. }
  87059. /**
  87060. * Returns the total number of codewords used to store data and EC information.
  87061. *
  87062. * @param {Number} version QR Code version
  87063. * @return {Number} Data length in bits
  87064. */
  87065. exports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {
  87066. return CODEWORDS_COUNT[version]
  87067. }
  87068. /**
  87069. * Encode data with Bose-Chaudhuri-Hocquenghem
  87070. *
  87071. * @param {Number} data Value to encode
  87072. * @return {Number} Encoded value
  87073. */
  87074. exports.getBCHDigit = function (data) {
  87075. let digit = 0
  87076. while (data !== 0) {
  87077. digit++
  87078. data >>>= 1
  87079. }
  87080. return digit
  87081. }
  87082. exports.setToSJISFunction = function setToSJISFunction (f) {
  87083. if (typeof f !== 'function') {
  87084. throw new Error('"toSJISFunc" is not a valid function.')
  87085. }
  87086. toSJISFunction = f
  87087. }
  87088. exports.isKanjiModeEnabled = function () {
  87089. return typeof toSJISFunction !== 'undefined'
  87090. }
  87091. exports.toSJIS = function toSJIS (kanji) {
  87092. return toSJISFunction(kanji)
  87093. }
  87094. /***/ }),
  87095. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/version-check.js":
  87096. /*!*********************************************************************!*\
  87097. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/version-check.js ***!
  87098. \*********************************************************************/
  87099. /*! no static exports found */
  87100. /***/ (function(module, exports) {
  87101. /**
  87102. * Check if QR Code version is valid
  87103. *
  87104. * @param {Number} version QR Code version
  87105. * @return {Boolean} true if valid version, false otherwise
  87106. */
  87107. exports.isValid = function isValid (version) {
  87108. return !isNaN(version) && version >= 1 && version <= 40
  87109. }
  87110. /***/ }),
  87111. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/version.js":
  87112. /*!***************************************************************!*\
  87113. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/core/version.js ***!
  87114. \***************************************************************/
  87115. /*! no static exports found */
  87116. /***/ (function(module, exports, __webpack_require__) {
  87117. const Utils = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/utils.js")
  87118. const ECCode = __webpack_require__(/*! ./error-correction-code */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-code.js")
  87119. const ECLevel = __webpack_require__(/*! ./error-correction-level */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/error-correction-level.js")
  87120. const Mode = __webpack_require__(/*! ./mode */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/mode.js")
  87121. const VersionCheck = __webpack_require__(/*! ./version-check */ "./node_modules/_qrcode@1.5.1@qrcode/lib/core/version-check.js")
  87122. // Generator polynomial used to encode version information
  87123. const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)
  87124. const G18_BCH = Utils.getBCHDigit(G18)
  87125. function getBestVersionForDataLength (mode, length, errorCorrectionLevel) {
  87126. for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
  87127. if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
  87128. return currentVersion
  87129. }
  87130. }
  87131. return undefined
  87132. }
  87133. function getReservedBitsCount (mode, version) {
  87134. // Character count indicator + mode indicator bits
  87135. return Mode.getCharCountIndicator(mode, version) + 4
  87136. }
  87137. function getTotalBitsFromDataArray (segments, version) {
  87138. let totalBits = 0
  87139. segments.forEach(function (data) {
  87140. const reservedBits = getReservedBitsCount(data.mode, version)
  87141. totalBits += reservedBits + data.getBitsLength()
  87142. })
  87143. return totalBits
  87144. }
  87145. function getBestVersionForMixedData (segments, errorCorrectionLevel) {
  87146. for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
  87147. const length = getTotalBitsFromDataArray(segments, currentVersion)
  87148. if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {
  87149. return currentVersion
  87150. }
  87151. }
  87152. return undefined
  87153. }
  87154. /**
  87155. * Returns version number from a value.
  87156. * If value is not a valid version, returns defaultValue
  87157. *
  87158. * @param {Number|String} value QR Code version
  87159. * @param {Number} defaultValue Fallback value
  87160. * @return {Number} QR Code version number
  87161. */
  87162. exports.from = function from (value, defaultValue) {
  87163. if (VersionCheck.isValid(value)) {
  87164. return parseInt(value, 10)
  87165. }
  87166. return defaultValue
  87167. }
  87168. /**
  87169. * Returns how much data can be stored with the specified QR code version
  87170. * and error correction level
  87171. *
  87172. * @param {Number} version QR Code version (1-40)
  87173. * @param {Number} errorCorrectionLevel Error correction level
  87174. * @param {Mode} mode Data mode
  87175. * @return {Number} Quantity of storable data
  87176. */
  87177. exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {
  87178. if (!VersionCheck.isValid(version)) {
  87179. throw new Error('Invalid QR Code version')
  87180. }
  87181. // Use Byte mode as default
  87182. if (typeof mode === 'undefined') mode = Mode.BYTE
  87183. // Total codewords for this QR code version (Data + Error correction)
  87184. const totalCodewords = Utils.getSymbolTotalCodewords(version)
  87185. // Total number of error correction codewords
  87186. const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)
  87187. // Total number of data codewords
  87188. const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8
  87189. if (mode === Mode.MIXED) return dataTotalCodewordsBits
  87190. const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)
  87191. // Return max number of storable codewords
  87192. switch (mode) {
  87193. case Mode.NUMERIC:
  87194. return Math.floor((usableBits / 10) * 3)
  87195. case Mode.ALPHANUMERIC:
  87196. return Math.floor((usableBits / 11) * 2)
  87197. case Mode.KANJI:
  87198. return Math.floor(usableBits / 13)
  87199. case Mode.BYTE:
  87200. default:
  87201. return Math.floor(usableBits / 8)
  87202. }
  87203. }
  87204. /**
  87205. * Returns the minimum version needed to contain the amount of data
  87206. *
  87207. * @param {Segment} data Segment of data
  87208. * @param {Number} [errorCorrectionLevel=H] Error correction level
  87209. * @param {Mode} mode Data mode
  87210. * @return {Number} QR Code version
  87211. */
  87212. exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {
  87213. let seg
  87214. const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)
  87215. if (Array.isArray(data)) {
  87216. if (data.length > 1) {
  87217. return getBestVersionForMixedData(data, ecl)
  87218. }
  87219. if (data.length === 0) {
  87220. return 1
  87221. }
  87222. seg = data[0]
  87223. } else {
  87224. seg = data
  87225. }
  87226. return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)
  87227. }
  87228. /**
  87229. * Returns version information with relative error correction bits
  87230. *
  87231. * The version information is included in QR Code symbols of version 7 or larger.
  87232. * It consists of an 18-bit sequence containing 6 data bits,
  87233. * with 12 error correction bits calculated using the (18, 6) Golay code.
  87234. *
  87235. * @param {Number} version QR Code version
  87236. * @return {Number} Encoded version info bits
  87237. */
  87238. exports.getEncodedBits = function getEncodedBits (version) {
  87239. if (!VersionCheck.isValid(version) || version < 7) {
  87240. throw new Error('Invalid QR Code version')
  87241. }
  87242. let d = version << 12
  87243. while (Utils.getBCHDigit(d) - G18_BCH >= 0) {
  87244. d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))
  87245. }
  87246. return (version << 12) | d
  87247. }
  87248. /***/ }),
  87249. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/canvas.js":
  87250. /*!******************************************************************!*\
  87251. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/canvas.js ***!
  87252. \******************************************************************/
  87253. /*! no static exports found */
  87254. /***/ (function(module, exports, __webpack_require__) {
  87255. const Utils = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/utils.js")
  87256. function clearCanvas (ctx, canvas, size) {
  87257. ctx.clearRect(0, 0, canvas.width, canvas.height)
  87258. if (!canvas.style) canvas.style = {}
  87259. canvas.height = size
  87260. canvas.width = size
  87261. canvas.style.height = size + 'px'
  87262. canvas.style.width = size + 'px'
  87263. }
  87264. function getCanvasElement () {
  87265. try {
  87266. return document.createElement('canvas')
  87267. } catch (e) {
  87268. throw new Error('You need to specify a canvas element')
  87269. }
  87270. }
  87271. exports.render = function render (qrData, canvas, options) {
  87272. let opts = options
  87273. let canvasEl = canvas
  87274. if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
  87275. opts = canvas
  87276. canvas = undefined
  87277. }
  87278. if (!canvas) {
  87279. canvasEl = getCanvasElement()
  87280. }
  87281. opts = Utils.getOptions(opts)
  87282. const size = Utils.getImageWidth(qrData.modules.size, opts)
  87283. const ctx = canvasEl.getContext('2d')
  87284. const image = ctx.createImageData(size, size)
  87285. Utils.qrToImageData(image.data, qrData, opts)
  87286. clearCanvas(ctx, canvasEl, size)
  87287. ctx.putImageData(image, 0, 0)
  87288. return canvasEl
  87289. }
  87290. exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
  87291. let opts = options
  87292. if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
  87293. opts = canvas
  87294. canvas = undefined
  87295. }
  87296. if (!opts) opts = {}
  87297. const canvasEl = exports.render(qrData, canvas, opts)
  87298. const type = opts.type || 'image/png'
  87299. const rendererOpts = opts.rendererOpts || {}
  87300. return canvasEl.toDataURL(type, rendererOpts.quality)
  87301. }
  87302. /***/ }),
  87303. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/svg-tag.js":
  87304. /*!*******************************************************************!*\
  87305. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/svg-tag.js ***!
  87306. \*******************************************************************/
  87307. /*! no static exports found */
  87308. /***/ (function(module, exports, __webpack_require__) {
  87309. const Utils = __webpack_require__(/*! ./utils */ "./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/utils.js")
  87310. function getColorAttrib (color, attrib) {
  87311. const alpha = color.a / 255
  87312. const str = attrib + '="' + color.hex + '"'
  87313. return alpha < 1
  87314. ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
  87315. : str
  87316. }
  87317. function svgCmd (cmd, x, y) {
  87318. let str = cmd + x
  87319. if (typeof y !== 'undefined') str += ' ' + y
  87320. return str
  87321. }
  87322. function qrToPath (data, size, margin) {
  87323. let path = ''
  87324. let moveBy = 0
  87325. let newRow = false
  87326. let lineLength = 0
  87327. for (let i = 0; i < data.length; i++) {
  87328. const col = Math.floor(i % size)
  87329. const row = Math.floor(i / size)
  87330. if (!col && !newRow) newRow = true
  87331. if (data[i]) {
  87332. lineLength++
  87333. if (!(i > 0 && col > 0 && data[i - 1])) {
  87334. path += newRow
  87335. ? svgCmd('M', col + margin, 0.5 + row + margin)
  87336. : svgCmd('m', moveBy, 0)
  87337. moveBy = 0
  87338. newRow = false
  87339. }
  87340. if (!(col + 1 < size && data[i + 1])) {
  87341. path += svgCmd('h', lineLength)
  87342. lineLength = 0
  87343. }
  87344. } else {
  87345. moveBy++
  87346. }
  87347. }
  87348. return path
  87349. }
  87350. exports.render = function render (qrData, options, cb) {
  87351. const opts = Utils.getOptions(options)
  87352. const size = qrData.modules.size
  87353. const data = qrData.modules.data
  87354. const qrcodesize = size + opts.margin * 2
  87355. const bg = !opts.color.light.a
  87356. ? ''
  87357. : '<path ' + getColorAttrib(opts.color.light, 'fill') +
  87358. ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>'
  87359. const path =
  87360. '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
  87361. ' d="' + qrToPath(data, size, opts.margin) + '"/>'
  87362. const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"'
  87363. const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" '
  87364. const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n'
  87365. if (typeof cb === 'function') {
  87366. cb(null, svgTag)
  87367. }
  87368. return svgTag
  87369. }
  87370. /***/ }),
  87371. /***/ "./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/utils.js":
  87372. /*!*****************************************************************!*\
  87373. !*** ./node_modules/_qrcode@1.5.1@qrcode/lib/renderer/utils.js ***!
  87374. \*****************************************************************/
  87375. /*! no static exports found */
  87376. /***/ (function(module, exports) {
  87377. function hex2rgba (hex) {
  87378. if (typeof hex === 'number') {
  87379. hex = hex.toString()
  87380. }
  87381. if (typeof hex !== 'string') {
  87382. throw new Error('Color should be defined as hex string')
  87383. }
  87384. let hexCode = hex.slice().replace('#', '').split('')
  87385. if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
  87386. throw new Error('Invalid hex color: ' + hex)
  87387. }
  87388. // Convert from short to long form (fff -> ffffff)
  87389. if (hexCode.length === 3 || hexCode.length === 4) {
  87390. hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
  87391. return [c, c]
  87392. }))
  87393. }
  87394. // Add default alpha value
  87395. if (hexCode.length === 6) hexCode.push('F', 'F')
  87396. const hexValue = parseInt(hexCode.join(''), 16)
  87397. return {
  87398. r: (hexValue >> 24) & 255,
  87399. g: (hexValue >> 16) & 255,
  87400. b: (hexValue >> 8) & 255,
  87401. a: hexValue & 255,
  87402. hex: '#' + hexCode.slice(0, 6).join('')
  87403. }
  87404. }
  87405. exports.getOptions = function getOptions (options) {
  87406. if (!options) options = {}
  87407. if (!options.color) options.color = {}
  87408. const margin = typeof options.margin === 'undefined' ||
  87409. options.margin === null ||
  87410. options.margin < 0
  87411. ? 4
  87412. : options.margin
  87413. const width = options.width && options.width >= 21 ? options.width : undefined
  87414. const scale = options.scale || 4
  87415. return {
  87416. width: width,
  87417. scale: width ? 4 : scale,
  87418. margin: margin,
  87419. color: {
  87420. dark: hex2rgba(options.color.dark || '#000000ff'),
  87421. light: hex2rgba(options.color.light || '#ffffffff')
  87422. },
  87423. type: options.type,
  87424. rendererOpts: options.rendererOpts || {}
  87425. }
  87426. }
  87427. exports.getScale = function getScale (qrSize, opts) {
  87428. return opts.width && opts.width >= qrSize + opts.margin * 2
  87429. ? opts.width / (qrSize + opts.margin * 2)
  87430. : opts.scale
  87431. }
  87432. exports.getImageWidth = function getImageWidth (qrSize, opts) {
  87433. const scale = exports.getScale(qrSize, opts)
  87434. return Math.floor((qrSize + opts.margin * 2) * scale)
  87435. }
  87436. exports.qrToImageData = function qrToImageData (imgData, qr, opts) {
  87437. const size = qr.modules.size
  87438. const data = qr.modules.data
  87439. const scale = exports.getScale(size, opts)
  87440. const symbolSize = Math.floor((size + opts.margin * 2) * scale)
  87441. const scaledMargin = opts.margin * scale
  87442. const palette = [opts.color.light, opts.color.dark]
  87443. for (let i = 0; i < symbolSize; i++) {
  87444. for (let j = 0; j < symbolSize; j++) {
  87445. let posDst = (i * symbolSize + j) * 4
  87446. let pxColor = opts.color.light
  87447. if (i >= scaledMargin && j >= scaledMargin &&
  87448. i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
  87449. const iSrc = Math.floor((i - scaledMargin) / scale)
  87450. const jSrc = Math.floor((j - scaledMargin) / scale)
  87451. pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]
  87452. }
  87453. imgData[posDst++] = pxColor.r
  87454. imgData[posDst++] = pxColor.g
  87455. imgData[posDst++] = pxColor.b
  87456. imgData[posDst] = pxColor.a
  87457. }
  87458. }
  87459. }
  87460. /***/ }),
  87461. /***/ "./node_modules/_qs@6.11.0@qs/lib/formats.js":
  87462. /*!***************************************************!*\
  87463. !*** ./node_modules/_qs@6.11.0@qs/lib/formats.js ***!
  87464. \***************************************************/
  87465. /*! no static exports found */
  87466. /***/ (function(module, exports, __webpack_require__) {
  87467. "use strict";
  87468. var replace = String.prototype.replace;
  87469. var percentTwenties = /%20/g;
  87470. var Format = {
  87471. RFC1738: 'RFC1738',
  87472. RFC3986: 'RFC3986'
  87473. };
  87474. module.exports = {
  87475. 'default': Format.RFC3986,
  87476. formatters: {
  87477. RFC1738: function (value) {
  87478. return replace.call(value, percentTwenties, '+');
  87479. },
  87480. RFC3986: function (value) {
  87481. return String(value);
  87482. }
  87483. },
  87484. RFC1738: Format.RFC1738,
  87485. RFC3986: Format.RFC3986
  87486. };
  87487. /***/ }),
  87488. /***/ "./node_modules/_qs@6.11.0@qs/lib/index.js":
  87489. /*!*************************************************!*\
  87490. !*** ./node_modules/_qs@6.11.0@qs/lib/index.js ***!
  87491. \*************************************************/
  87492. /*! no static exports found */
  87493. /***/ (function(module, exports, __webpack_require__) {
  87494. "use strict";
  87495. var stringify = __webpack_require__(/*! ./stringify */ "./node_modules/_qs@6.11.0@qs/lib/stringify.js");
  87496. var parse = __webpack_require__(/*! ./parse */ "./node_modules/_qs@6.11.0@qs/lib/parse.js");
  87497. var formats = __webpack_require__(/*! ./formats */ "./node_modules/_qs@6.11.0@qs/lib/formats.js");
  87498. module.exports = {
  87499. formats: formats,
  87500. parse: parse,
  87501. stringify: stringify
  87502. };
  87503. /***/ }),
  87504. /***/ "./node_modules/_qs@6.11.0@qs/lib/parse.js":
  87505. /*!*************************************************!*\
  87506. !*** ./node_modules/_qs@6.11.0@qs/lib/parse.js ***!
  87507. \*************************************************/
  87508. /*! no static exports found */
  87509. /***/ (function(module, exports, __webpack_require__) {
  87510. "use strict";
  87511. var utils = __webpack_require__(/*! ./utils */ "./node_modules/_qs@6.11.0@qs/lib/utils.js");
  87512. var has = Object.prototype.hasOwnProperty;
  87513. var isArray = Array.isArray;
  87514. var defaults = {
  87515. allowDots: false,
  87516. allowPrototypes: false,
  87517. allowSparse: false,
  87518. arrayLimit: 20,
  87519. charset: 'utf-8',
  87520. charsetSentinel: false,
  87521. comma: false,
  87522. decoder: utils.decode,
  87523. delimiter: '&',
  87524. depth: 5,
  87525. ignoreQueryPrefix: false,
  87526. interpretNumericEntities: false,
  87527. parameterLimit: 1000,
  87528. parseArrays: true,
  87529. plainObjects: false,
  87530. strictNullHandling: false
  87531. };
  87532. var interpretNumericEntities = function (str) {
  87533. return str.replace(/&#(\d+);/g, function ($0, numberStr) {
  87534. return String.fromCharCode(parseInt(numberStr, 10));
  87535. });
  87536. };
  87537. var parseArrayValue = function (val, options) {
  87538. if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
  87539. return val.split(',');
  87540. }
  87541. return val;
  87542. };
  87543. // This is what browsers will submit when the ✓ character occurs in an
  87544. // application/x-www-form-urlencoded body and the encoding of the page containing
  87545. // the form is iso-8859-1, or when the submitted form has an accept-charset
  87546. // attribute of iso-8859-1. Presumably also with other charsets that do not contain
  87547. // the ✓ character, such as us-ascii.
  87548. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
  87549. // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
  87550. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
  87551. var parseValues = function parseQueryStringValues(str, options) {
  87552. var obj = {};
  87553. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
  87554. var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
  87555. var parts = cleanStr.split(options.delimiter, limit);
  87556. var skipIndex = -1; // Keep track of where the utf8 sentinel was found
  87557. var i;
  87558. var charset = options.charset;
  87559. if (options.charsetSentinel) {
  87560. for (i = 0; i < parts.length; ++i) {
  87561. if (parts[i].indexOf('utf8=') === 0) {
  87562. if (parts[i] === charsetSentinel) {
  87563. charset = 'utf-8';
  87564. } else if (parts[i] === isoSentinel) {
  87565. charset = 'iso-8859-1';
  87566. }
  87567. skipIndex = i;
  87568. i = parts.length; // The eslint settings do not allow break;
  87569. }
  87570. }
  87571. }
  87572. for (i = 0; i < parts.length; ++i) {
  87573. if (i === skipIndex) {
  87574. continue;
  87575. }
  87576. var part = parts[i];
  87577. var bracketEqualsPos = part.indexOf(']=');
  87578. var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
  87579. var key, val;
  87580. if (pos === -1) {
  87581. key = options.decoder(part, defaults.decoder, charset, 'key');
  87582. val = options.strictNullHandling ? null : '';
  87583. } else {
  87584. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
  87585. val = utils.maybeMap(
  87586. parseArrayValue(part.slice(pos + 1), options),
  87587. function (encodedVal) {
  87588. return options.decoder(encodedVal, defaults.decoder, charset, 'value');
  87589. }
  87590. );
  87591. }
  87592. if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
  87593. val = interpretNumericEntities(val);
  87594. }
  87595. if (part.indexOf('[]=') > -1) {
  87596. val = isArray(val) ? [val] : val;
  87597. }
  87598. if (has.call(obj, key)) {
  87599. obj[key] = utils.combine(obj[key], val);
  87600. } else {
  87601. obj[key] = val;
  87602. }
  87603. }
  87604. return obj;
  87605. };
  87606. var parseObject = function (chain, val, options, valuesParsed) {
  87607. var leaf = valuesParsed ? val : parseArrayValue(val, options);
  87608. for (var i = chain.length - 1; i >= 0; --i) {
  87609. var obj;
  87610. var root = chain[i];
  87611. if (root === '[]' && options.parseArrays) {
  87612. obj = [].concat(leaf);
  87613. } else {
  87614. obj = options.plainObjects ? Object.create(null) : {};
  87615. var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
  87616. var index = parseInt(cleanRoot, 10);
  87617. if (!options.parseArrays && cleanRoot === '') {
  87618. obj = { 0: leaf };
  87619. } else if (
  87620. !isNaN(index)
  87621. && root !== cleanRoot
  87622. && String(index) === cleanRoot
  87623. && index >= 0
  87624. && (options.parseArrays && index <= options.arrayLimit)
  87625. ) {
  87626. obj = [];
  87627. obj[index] = leaf;
  87628. } else if (cleanRoot !== '__proto__') {
  87629. obj[cleanRoot] = leaf;
  87630. }
  87631. }
  87632. leaf = obj;
  87633. }
  87634. return leaf;
  87635. };
  87636. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  87637. if (!givenKey) {
  87638. return;
  87639. }
  87640. // Transform dot notation to bracket notation
  87641. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
  87642. // The regex chunks
  87643. var brackets = /(\[[^[\]]*])/;
  87644. var child = /(\[[^[\]]*])/g;
  87645. // Get the parent
  87646. var segment = options.depth > 0 && brackets.exec(key);
  87647. var parent = segment ? key.slice(0, segment.index) : key;
  87648. // Stash the parent if it exists
  87649. var keys = [];
  87650. if (parent) {
  87651. // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
  87652. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  87653. if (!options.allowPrototypes) {
  87654. return;
  87655. }
  87656. }
  87657. keys.push(parent);
  87658. }
  87659. // Loop through children appending to the array until we hit depth
  87660. var i = 0;
  87661. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  87662. i += 1;
  87663. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  87664. if (!options.allowPrototypes) {
  87665. return;
  87666. }
  87667. }
  87668. keys.push(segment[1]);
  87669. }
  87670. // If there's a remainder, just add whatever is left
  87671. if (segment) {
  87672. keys.push('[' + key.slice(segment.index) + ']');
  87673. }
  87674. return parseObject(keys, val, options, valuesParsed);
  87675. };
  87676. var normalizeParseOptions = function normalizeParseOptions(opts) {
  87677. if (!opts) {
  87678. return defaults;
  87679. }
  87680. if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
  87681. throw new TypeError('Decoder has to be a function.');
  87682. }
  87683. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  87684. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  87685. }
  87686. var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
  87687. return {
  87688. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  87689. allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
  87690. allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
  87691. arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
  87692. charset: charset,
  87693. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  87694. comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
  87695. decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
  87696. delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  87697. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  87698. depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
  87699. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  87700. interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  87701. parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
  87702. parseArrays: opts.parseArrays !== false,
  87703. plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
  87704. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  87705. };
  87706. };
  87707. module.exports = function (str, opts) {
  87708. var options = normalizeParseOptions(opts);
  87709. if (str === '' || str === null || typeof str === 'undefined') {
  87710. return options.plainObjects ? Object.create(null) : {};
  87711. }
  87712. var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
  87713. var obj = options.plainObjects ? Object.create(null) : {};
  87714. // Iterate over the keys and setup the new object
  87715. var keys = Object.keys(tempObj);
  87716. for (var i = 0; i < keys.length; ++i) {
  87717. var key = keys[i];
  87718. var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
  87719. obj = utils.merge(obj, newObj, options);
  87720. }
  87721. if (options.allowSparse === true) {
  87722. return obj;
  87723. }
  87724. return utils.compact(obj);
  87725. };
  87726. /***/ }),
  87727. /***/ "./node_modules/_qs@6.11.0@qs/lib/stringify.js":
  87728. /*!*****************************************************!*\
  87729. !*** ./node_modules/_qs@6.11.0@qs/lib/stringify.js ***!
  87730. \*****************************************************/
  87731. /*! no static exports found */
  87732. /***/ (function(module, exports, __webpack_require__) {
  87733. "use strict";
  87734. var getSideChannel = __webpack_require__(/*! side-channel */ "./node_modules/_side-channel@1.0.4@side-channel/index.js");
  87735. var utils = __webpack_require__(/*! ./utils */ "./node_modules/_qs@6.11.0@qs/lib/utils.js");
  87736. var formats = __webpack_require__(/*! ./formats */ "./node_modules/_qs@6.11.0@qs/lib/formats.js");
  87737. var has = Object.prototype.hasOwnProperty;
  87738. var arrayPrefixGenerators = {
  87739. brackets: function brackets(prefix) {
  87740. return prefix + '[]';
  87741. },
  87742. comma: 'comma',
  87743. indices: function indices(prefix, key) {
  87744. return prefix + '[' + key + ']';
  87745. },
  87746. repeat: function repeat(prefix) {
  87747. return prefix;
  87748. }
  87749. };
  87750. var isArray = Array.isArray;
  87751. var split = String.prototype.split;
  87752. var push = Array.prototype.push;
  87753. var pushToArray = function (arr, valueOrArray) {
  87754. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  87755. };
  87756. var toISO = Date.prototype.toISOString;
  87757. var defaultFormat = formats['default'];
  87758. var defaults = {
  87759. addQueryPrefix: false,
  87760. allowDots: false,
  87761. charset: 'utf-8',
  87762. charsetSentinel: false,
  87763. delimiter: '&',
  87764. encode: true,
  87765. encoder: utils.encode,
  87766. encodeValuesOnly: false,
  87767. format: defaultFormat,
  87768. formatter: formats.formatters[defaultFormat],
  87769. // deprecated
  87770. indices: false,
  87771. serializeDate: function serializeDate(date) {
  87772. return toISO.call(date);
  87773. },
  87774. skipNulls: false,
  87775. strictNullHandling: false
  87776. };
  87777. var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
  87778. return typeof v === 'string'
  87779. || typeof v === 'number'
  87780. || typeof v === 'boolean'
  87781. || typeof v === 'symbol'
  87782. || typeof v === 'bigint';
  87783. };
  87784. var sentinel = {};
  87785. var stringify = function stringify(
  87786. object,
  87787. prefix,
  87788. generateArrayPrefix,
  87789. commaRoundTrip,
  87790. strictNullHandling,
  87791. skipNulls,
  87792. encoder,
  87793. filter,
  87794. sort,
  87795. allowDots,
  87796. serializeDate,
  87797. format,
  87798. formatter,
  87799. encodeValuesOnly,
  87800. charset,
  87801. sideChannel
  87802. ) {
  87803. var obj = object;
  87804. var tmpSc = sideChannel;
  87805. var step = 0;
  87806. var findFlag = false;
  87807. while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
  87808. // Where object last appeared in the ref tree
  87809. var pos = tmpSc.get(object);
  87810. step += 1;
  87811. if (typeof pos !== 'undefined') {
  87812. if (pos === step) {
  87813. throw new RangeError('Cyclic object value');
  87814. } else {
  87815. findFlag = true; // Break while
  87816. }
  87817. }
  87818. if (typeof tmpSc.get(sentinel) === 'undefined') {
  87819. step = 0;
  87820. }
  87821. }
  87822. if (typeof filter === 'function') {
  87823. obj = filter(prefix, obj);
  87824. } else if (obj instanceof Date) {
  87825. obj = serializeDate(obj);
  87826. } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
  87827. obj = utils.maybeMap(obj, function (value) {
  87828. if (value instanceof Date) {
  87829. return serializeDate(value);
  87830. }
  87831. return value;
  87832. });
  87833. }
  87834. if (obj === null) {
  87835. if (strictNullHandling) {
  87836. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
  87837. }
  87838. obj = '';
  87839. }
  87840. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  87841. if (encoder) {
  87842. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
  87843. if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
  87844. var valuesArray = split.call(String(obj), ',');
  87845. var valuesJoined = '';
  87846. for (var i = 0; i < valuesArray.length; ++i) {
  87847. valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
  87848. }
  87849. return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
  87850. }
  87851. return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
  87852. }
  87853. return [formatter(prefix) + '=' + formatter(String(obj))];
  87854. }
  87855. var values = [];
  87856. if (typeof obj === 'undefined') {
  87857. return values;
  87858. }
  87859. var objKeys;
  87860. if (generateArrayPrefix === 'comma' && isArray(obj)) {
  87861. // we need to join elements in
  87862. objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
  87863. } else if (isArray(filter)) {
  87864. objKeys = filter;
  87865. } else {
  87866. var keys = Object.keys(obj);
  87867. objKeys = sort ? keys.sort(sort) : keys;
  87868. }
  87869. var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
  87870. for (var j = 0; j < objKeys.length; ++j) {
  87871. var key = objKeys[j];
  87872. var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
  87873. if (skipNulls && value === null) {
  87874. continue;
  87875. }
  87876. var keyPrefix = isArray(obj)
  87877. ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
  87878. : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
  87879. sideChannel.set(object, step);
  87880. var valueSideChannel = getSideChannel();
  87881. valueSideChannel.set(sentinel, sideChannel);
  87882. pushToArray(values, stringify(
  87883. value,
  87884. keyPrefix,
  87885. generateArrayPrefix,
  87886. commaRoundTrip,
  87887. strictNullHandling,
  87888. skipNulls,
  87889. encoder,
  87890. filter,
  87891. sort,
  87892. allowDots,
  87893. serializeDate,
  87894. format,
  87895. formatter,
  87896. encodeValuesOnly,
  87897. charset,
  87898. valueSideChannel
  87899. ));
  87900. }
  87901. return values;
  87902. };
  87903. var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
  87904. if (!opts) {
  87905. return defaults;
  87906. }
  87907. if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
  87908. throw new TypeError('Encoder has to be a function.');
  87909. }
  87910. var charset = opts.charset || defaults.charset;
  87911. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  87912. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  87913. }
  87914. var format = formats['default'];
  87915. if (typeof opts.format !== 'undefined') {
  87916. if (!has.call(formats.formatters, opts.format)) {
  87917. throw new TypeError('Unknown format option provided.');
  87918. }
  87919. format = opts.format;
  87920. }
  87921. var formatter = formats.formatters[format];
  87922. var filter = defaults.filter;
  87923. if (typeof opts.filter === 'function' || isArray(opts.filter)) {
  87924. filter = opts.filter;
  87925. }
  87926. return {
  87927. addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
  87928. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  87929. charset: charset,
  87930. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  87931. delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
  87932. encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
  87933. encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
  87934. encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  87935. filter: filter,
  87936. format: format,
  87937. formatter: formatter,
  87938. serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
  87939. skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
  87940. sort: typeof opts.sort === 'function' ? opts.sort : null,
  87941. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  87942. };
  87943. };
  87944. module.exports = function (object, opts) {
  87945. var obj = object;
  87946. var options = normalizeStringifyOptions(opts);
  87947. var objKeys;
  87948. var filter;
  87949. if (typeof options.filter === 'function') {
  87950. filter = options.filter;
  87951. obj = filter('', obj);
  87952. } else if (isArray(options.filter)) {
  87953. filter = options.filter;
  87954. objKeys = filter;
  87955. }
  87956. var keys = [];
  87957. if (typeof obj !== 'object' || obj === null) {
  87958. return '';
  87959. }
  87960. var arrayFormat;
  87961. if (opts && opts.arrayFormat in arrayPrefixGenerators) {
  87962. arrayFormat = opts.arrayFormat;
  87963. } else if (opts && 'indices' in opts) {
  87964. arrayFormat = opts.indices ? 'indices' : 'repeat';
  87965. } else {
  87966. arrayFormat = 'indices';
  87967. }
  87968. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  87969. if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
  87970. throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
  87971. }
  87972. var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
  87973. if (!objKeys) {
  87974. objKeys = Object.keys(obj);
  87975. }
  87976. if (options.sort) {
  87977. objKeys.sort(options.sort);
  87978. }
  87979. var sideChannel = getSideChannel();
  87980. for (var i = 0; i < objKeys.length; ++i) {
  87981. var key = objKeys[i];
  87982. if (options.skipNulls && obj[key] === null) {
  87983. continue;
  87984. }
  87985. pushToArray(keys, stringify(
  87986. obj[key],
  87987. key,
  87988. generateArrayPrefix,
  87989. commaRoundTrip,
  87990. options.strictNullHandling,
  87991. options.skipNulls,
  87992. options.encode ? options.encoder : null,
  87993. options.filter,
  87994. options.sort,
  87995. options.allowDots,
  87996. options.serializeDate,
  87997. options.format,
  87998. options.formatter,
  87999. options.encodeValuesOnly,
  88000. options.charset,
  88001. sideChannel
  88002. ));
  88003. }
  88004. var joined = keys.join(options.delimiter);
  88005. var prefix = options.addQueryPrefix === true ? '?' : '';
  88006. if (options.charsetSentinel) {
  88007. if (options.charset === 'iso-8859-1') {
  88008. // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
  88009. prefix += 'utf8=%26%2310003%3B&';
  88010. } else {
  88011. // encodeURIComponent('✓')
  88012. prefix += 'utf8=%E2%9C%93&';
  88013. }
  88014. }
  88015. return joined.length > 0 ? prefix + joined : '';
  88016. };
  88017. /***/ }),
  88018. /***/ "./node_modules/_qs@6.11.0@qs/lib/utils.js":
  88019. /*!*************************************************!*\
  88020. !*** ./node_modules/_qs@6.11.0@qs/lib/utils.js ***!
  88021. \*************************************************/
  88022. /*! no static exports found */
  88023. /***/ (function(module, exports, __webpack_require__) {
  88024. "use strict";
  88025. var formats = __webpack_require__(/*! ./formats */ "./node_modules/_qs@6.11.0@qs/lib/formats.js");
  88026. var has = Object.prototype.hasOwnProperty;
  88027. var isArray = Array.isArray;
  88028. var hexTable = (function () {
  88029. var array = [];
  88030. for (var i = 0; i < 256; ++i) {
  88031. array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
  88032. }
  88033. return array;
  88034. }());
  88035. var compactQueue = function compactQueue(queue) {
  88036. while (queue.length > 1) {
  88037. var item = queue.pop();
  88038. var obj = item.obj[item.prop];
  88039. if (isArray(obj)) {
  88040. var compacted = [];
  88041. for (var j = 0; j < obj.length; ++j) {
  88042. if (typeof obj[j] !== 'undefined') {
  88043. compacted.push(obj[j]);
  88044. }
  88045. }
  88046. item.obj[item.prop] = compacted;
  88047. }
  88048. }
  88049. };
  88050. var arrayToObject = function arrayToObject(source, options) {
  88051. var obj = options && options.plainObjects ? Object.create(null) : {};
  88052. for (var i = 0; i < source.length; ++i) {
  88053. if (typeof source[i] !== 'undefined') {
  88054. obj[i] = source[i];
  88055. }
  88056. }
  88057. return obj;
  88058. };
  88059. var merge = function merge(target, source, options) {
  88060. /* eslint no-param-reassign: 0 */
  88061. if (!source) {
  88062. return target;
  88063. }
  88064. if (typeof source !== 'object') {
  88065. if (isArray(target)) {
  88066. target.push(source);
  88067. } else if (target && typeof target === 'object') {
  88068. if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
  88069. target[source] = true;
  88070. }
  88071. } else {
  88072. return [target, source];
  88073. }
  88074. return target;
  88075. }
  88076. if (!target || typeof target !== 'object') {
  88077. return [target].concat(source);
  88078. }
  88079. var mergeTarget = target;
  88080. if (isArray(target) && !isArray(source)) {
  88081. mergeTarget = arrayToObject(target, options);
  88082. }
  88083. if (isArray(target) && isArray(source)) {
  88084. source.forEach(function (item, i) {
  88085. if (has.call(target, i)) {
  88086. var targetItem = target[i];
  88087. if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
  88088. target[i] = merge(targetItem, item, options);
  88089. } else {
  88090. target.push(item);
  88091. }
  88092. } else {
  88093. target[i] = item;
  88094. }
  88095. });
  88096. return target;
  88097. }
  88098. return Object.keys(source).reduce(function (acc, key) {
  88099. var value = source[key];
  88100. if (has.call(acc, key)) {
  88101. acc[key] = merge(acc[key], value, options);
  88102. } else {
  88103. acc[key] = value;
  88104. }
  88105. return acc;
  88106. }, mergeTarget);
  88107. };
  88108. var assign = function assignSingleSource(target, source) {
  88109. return Object.keys(source).reduce(function (acc, key) {
  88110. acc[key] = source[key];
  88111. return acc;
  88112. }, target);
  88113. };
  88114. var decode = function (str, decoder, charset) {
  88115. var strWithoutPlus = str.replace(/\+/g, ' ');
  88116. if (charset === 'iso-8859-1') {
  88117. // unescape never throws, no try...catch needed:
  88118. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  88119. }
  88120. // utf-8
  88121. try {
  88122. return decodeURIComponent(strWithoutPlus);
  88123. } catch (e) {
  88124. return strWithoutPlus;
  88125. }
  88126. };
  88127. var encode = function encode(str, defaultEncoder, charset, kind, format) {
  88128. // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
  88129. // It has been adapted here for stricter adherence to RFC 3986
  88130. if (str.length === 0) {
  88131. return str;
  88132. }
  88133. var string = str;
  88134. if (typeof str === 'symbol') {
  88135. string = Symbol.prototype.toString.call(str);
  88136. } else if (typeof str !== 'string') {
  88137. string = String(str);
  88138. }
  88139. if (charset === 'iso-8859-1') {
  88140. return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
  88141. return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
  88142. });
  88143. }
  88144. var out = '';
  88145. for (var i = 0; i < string.length; ++i) {
  88146. var c = string.charCodeAt(i);
  88147. if (
  88148. c === 0x2D // -
  88149. || c === 0x2E // .
  88150. || c === 0x5F // _
  88151. || c === 0x7E // ~
  88152. || (c >= 0x30 && c <= 0x39) // 0-9
  88153. || (c >= 0x41 && c <= 0x5A) // a-z
  88154. || (c >= 0x61 && c <= 0x7A) // A-Z
  88155. || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
  88156. ) {
  88157. out += string.charAt(i);
  88158. continue;
  88159. }
  88160. if (c < 0x80) {
  88161. out = out + hexTable[c];
  88162. continue;
  88163. }
  88164. if (c < 0x800) {
  88165. out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
  88166. continue;
  88167. }
  88168. if (c < 0xD800 || c >= 0xE000) {
  88169. out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
  88170. continue;
  88171. }
  88172. i += 1;
  88173. c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
  88174. /* eslint operator-linebreak: [2, "before"] */
  88175. out += hexTable[0xF0 | (c >> 18)]
  88176. + hexTable[0x80 | ((c >> 12) & 0x3F)]
  88177. + hexTable[0x80 | ((c >> 6) & 0x3F)]
  88178. + hexTable[0x80 | (c & 0x3F)];
  88179. }
  88180. return out;
  88181. };
  88182. var compact = function compact(value) {
  88183. var queue = [{ obj: { o: value }, prop: 'o' }];
  88184. var refs = [];
  88185. for (var i = 0; i < queue.length; ++i) {
  88186. var item = queue[i];
  88187. var obj = item.obj[item.prop];
  88188. var keys = Object.keys(obj);
  88189. for (var j = 0; j < keys.length; ++j) {
  88190. var key = keys[j];
  88191. var val = obj[key];
  88192. if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
  88193. queue.push({ obj: obj, prop: key });
  88194. refs.push(val);
  88195. }
  88196. }
  88197. }
  88198. compactQueue(queue);
  88199. return value;
  88200. };
  88201. var isRegExp = function isRegExp(obj) {
  88202. return Object.prototype.toString.call(obj) === '[object RegExp]';
  88203. };
  88204. var isBuffer = function isBuffer(obj) {
  88205. if (!obj || typeof obj !== 'object') {
  88206. return false;
  88207. }
  88208. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  88209. };
  88210. var combine = function combine(a, b) {
  88211. return [].concat(a, b);
  88212. };
  88213. var maybeMap = function maybeMap(val, fn) {
  88214. if (isArray(val)) {
  88215. var mapped = [];
  88216. for (var i = 0; i < val.length; i += 1) {
  88217. mapped.push(fn(val[i]));
  88218. }
  88219. return mapped;
  88220. }
  88221. return fn(val);
  88222. };
  88223. module.exports = {
  88224. arrayToObject: arrayToObject,
  88225. assign: assign,
  88226. combine: combine,
  88227. compact: compact,
  88228. decode: decode,
  88229. encode: encode,
  88230. isBuffer: isBuffer,
  88231. isRegExp: isRegExp,
  88232. maybeMap: maybeMap,
  88233. merge: merge
  88234. };
  88235. /***/ }),
  88236. /***/ "./node_modules/_resize-observer-polyfill@1.5.1@resize-observer-polyfill/dist/ResizeObserver.es.js":
  88237. /*!*********************************************************************************************************!*\
  88238. !*** ./node_modules/_resize-observer-polyfill@1.5.1@resize-observer-polyfill/dist/ResizeObserver.es.js ***!
  88239. \*********************************************************************************************************/
  88240. /*! exports provided: default */
  88241. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  88242. "use strict";
  88243. __webpack_require__.r(__webpack_exports__);
  88244. /* WEBPACK VAR INJECTION */(function(global) {/**
  88245. * A collection of shims that provide minimal functionality of the ES6 collections.
  88246. *
  88247. * These implementations are not meant to be used outside of the ResizeObserver
  88248. * modules as they cover only a limited range of use cases.
  88249. */
  88250. /* eslint-disable require-jsdoc, valid-jsdoc */
  88251. var MapShim = (function () {
  88252. if (typeof Map !== 'undefined') {
  88253. return Map;
  88254. }
  88255. /**
  88256. * Returns index in provided array that matches the specified key.
  88257. *
  88258. * @param {Array<Array>} arr
  88259. * @param {*} key
  88260. * @returns {number}
  88261. */
  88262. function getIndex(arr, key) {
  88263. var result = -1;
  88264. arr.some(function (entry, index) {
  88265. if (entry[0] === key) {
  88266. result = index;
  88267. return true;
  88268. }
  88269. return false;
  88270. });
  88271. return result;
  88272. }
  88273. return /** @class */ (function () {
  88274. function class_1() {
  88275. this.__entries__ = [];
  88276. }
  88277. Object.defineProperty(class_1.prototype, "size", {
  88278. /**
  88279. * @returns {boolean}
  88280. */
  88281. get: function () {
  88282. return this.__entries__.length;
  88283. },
  88284. enumerable: true,
  88285. configurable: true
  88286. });
  88287. /**
  88288. * @param {*} key
  88289. * @returns {*}
  88290. */
  88291. class_1.prototype.get = function (key) {
  88292. var index = getIndex(this.__entries__, key);
  88293. var entry = this.__entries__[index];
  88294. return entry && entry[1];
  88295. };
  88296. /**
  88297. * @param {*} key
  88298. * @param {*} value
  88299. * @returns {void}
  88300. */
  88301. class_1.prototype.set = function (key, value) {
  88302. var index = getIndex(this.__entries__, key);
  88303. if (~index) {
  88304. this.__entries__[index][1] = value;
  88305. }
  88306. else {
  88307. this.__entries__.push([key, value]);
  88308. }
  88309. };
  88310. /**
  88311. * @param {*} key
  88312. * @returns {void}
  88313. */
  88314. class_1.prototype.delete = function (key) {
  88315. var entries = this.__entries__;
  88316. var index = getIndex(entries, key);
  88317. if (~index) {
  88318. entries.splice(index, 1);
  88319. }
  88320. };
  88321. /**
  88322. * @param {*} key
  88323. * @returns {void}
  88324. */
  88325. class_1.prototype.has = function (key) {
  88326. return !!~getIndex(this.__entries__, key);
  88327. };
  88328. /**
  88329. * @returns {void}
  88330. */
  88331. class_1.prototype.clear = function () {
  88332. this.__entries__.splice(0);
  88333. };
  88334. /**
  88335. * @param {Function} callback
  88336. * @param {*} [ctx=null]
  88337. * @returns {void}
  88338. */
  88339. class_1.prototype.forEach = function (callback, ctx) {
  88340. if (ctx === void 0) { ctx = null; }
  88341. for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
  88342. var entry = _a[_i];
  88343. callback.call(ctx, entry[1], entry[0]);
  88344. }
  88345. };
  88346. return class_1;
  88347. }());
  88348. })();
  88349. /**
  88350. * Detects whether window and document objects are available in current environment.
  88351. */
  88352. var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
  88353. // Returns global object of a current environment.
  88354. var global$1 = (function () {
  88355. if (typeof global !== 'undefined' && global.Math === Math) {
  88356. return global;
  88357. }
  88358. if (typeof self !== 'undefined' && self.Math === Math) {
  88359. return self;
  88360. }
  88361. if (typeof window !== 'undefined' && window.Math === Math) {
  88362. return window;
  88363. }
  88364. // eslint-disable-next-line no-new-func
  88365. return Function('return this')();
  88366. })();
  88367. /**
  88368. * A shim for the requestAnimationFrame which falls back to the setTimeout if
  88369. * first one is not supported.
  88370. *
  88371. * @returns {number} Requests' identifier.
  88372. */
  88373. var requestAnimationFrame$1 = (function () {
  88374. if (typeof requestAnimationFrame === 'function') {
  88375. // It's required to use a bounded function because IE sometimes throws
  88376. // an "Invalid calling object" error if rAF is invoked without the global
  88377. // object on the left hand side.
  88378. return requestAnimationFrame.bind(global$1);
  88379. }
  88380. return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
  88381. })();
  88382. // Defines minimum timeout before adding a trailing call.
  88383. var trailingTimeout = 2;
  88384. /**
  88385. * Creates a wrapper function which ensures that provided callback will be
  88386. * invoked only once during the specified delay period.
  88387. *
  88388. * @param {Function} callback - Function to be invoked after the delay period.
  88389. * @param {number} delay - Delay after which to invoke callback.
  88390. * @returns {Function}
  88391. */
  88392. function throttle (callback, delay) {
  88393. var leadingCall = false, trailingCall = false, lastCallTime = 0;
  88394. /**
  88395. * Invokes the original callback function and schedules new invocation if
  88396. * the "proxy" was called during current request.
  88397. *
  88398. * @returns {void}
  88399. */
  88400. function resolvePending() {
  88401. if (leadingCall) {
  88402. leadingCall = false;
  88403. callback();
  88404. }
  88405. if (trailingCall) {
  88406. proxy();
  88407. }
  88408. }
  88409. /**
  88410. * Callback invoked after the specified delay. It will further postpone
  88411. * invocation of the original function delegating it to the
  88412. * requestAnimationFrame.
  88413. *
  88414. * @returns {void}
  88415. */
  88416. function timeoutCallback() {
  88417. requestAnimationFrame$1(resolvePending);
  88418. }
  88419. /**
  88420. * Schedules invocation of the original function.
  88421. *
  88422. * @returns {void}
  88423. */
  88424. function proxy() {
  88425. var timeStamp = Date.now();
  88426. if (leadingCall) {
  88427. // Reject immediately following calls.
  88428. if (timeStamp - lastCallTime < trailingTimeout) {
  88429. return;
  88430. }
  88431. // Schedule new call to be in invoked when the pending one is resolved.
  88432. // This is important for "transitions" which never actually start
  88433. // immediately so there is a chance that we might miss one if change
  88434. // happens amids the pending invocation.
  88435. trailingCall = true;
  88436. }
  88437. else {
  88438. leadingCall = true;
  88439. trailingCall = false;
  88440. setTimeout(timeoutCallback, delay);
  88441. }
  88442. lastCallTime = timeStamp;
  88443. }
  88444. return proxy;
  88445. }
  88446. // Minimum delay before invoking the update of observers.
  88447. var REFRESH_DELAY = 20;
  88448. // A list of substrings of CSS properties used to find transition events that
  88449. // might affect dimensions of observed elements.
  88450. var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
  88451. // Check if MutationObserver is available.
  88452. var mutationObserverSupported = typeof MutationObserver !== 'undefined';
  88453. /**
  88454. * Singleton controller class which handles updates of ResizeObserver instances.
  88455. */
  88456. var ResizeObserverController = /** @class */ (function () {
  88457. /**
  88458. * Creates a new instance of ResizeObserverController.
  88459. *
  88460. * @private
  88461. */
  88462. function ResizeObserverController() {
  88463. /**
  88464. * Indicates whether DOM listeners have been added.
  88465. *
  88466. * @private {boolean}
  88467. */
  88468. this.connected_ = false;
  88469. /**
  88470. * Tells that controller has subscribed for Mutation Events.
  88471. *
  88472. * @private {boolean}
  88473. */
  88474. this.mutationEventsAdded_ = false;
  88475. /**
  88476. * Keeps reference to the instance of MutationObserver.
  88477. *
  88478. * @private {MutationObserver}
  88479. */
  88480. this.mutationsObserver_ = null;
  88481. /**
  88482. * A list of connected observers.
  88483. *
  88484. * @private {Array<ResizeObserverSPI>}
  88485. */
  88486. this.observers_ = [];
  88487. this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
  88488. this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
  88489. }
  88490. /**
  88491. * Adds observer to observers list.
  88492. *
  88493. * @param {ResizeObserverSPI} observer - Observer to be added.
  88494. * @returns {void}
  88495. */
  88496. ResizeObserverController.prototype.addObserver = function (observer) {
  88497. if (!~this.observers_.indexOf(observer)) {
  88498. this.observers_.push(observer);
  88499. }
  88500. // Add listeners if they haven't been added yet.
  88501. if (!this.connected_) {
  88502. this.connect_();
  88503. }
  88504. };
  88505. /**
  88506. * Removes observer from observers list.
  88507. *
  88508. * @param {ResizeObserverSPI} observer - Observer to be removed.
  88509. * @returns {void}
  88510. */
  88511. ResizeObserverController.prototype.removeObserver = function (observer) {
  88512. var observers = this.observers_;
  88513. var index = observers.indexOf(observer);
  88514. // Remove observer if it's present in registry.
  88515. if (~index) {
  88516. observers.splice(index, 1);
  88517. }
  88518. // Remove listeners if controller has no connected observers.
  88519. if (!observers.length && this.connected_) {
  88520. this.disconnect_();
  88521. }
  88522. };
  88523. /**
  88524. * Invokes the update of observers. It will continue running updates insofar
  88525. * it detects changes.
  88526. *
  88527. * @returns {void}
  88528. */
  88529. ResizeObserverController.prototype.refresh = function () {
  88530. var changesDetected = this.updateObservers_();
  88531. // Continue running updates if changes have been detected as there might
  88532. // be future ones caused by CSS transitions.
  88533. if (changesDetected) {
  88534. this.refresh();
  88535. }
  88536. };
  88537. /**
  88538. * Updates every observer from observers list and notifies them of queued
  88539. * entries.
  88540. *
  88541. * @private
  88542. * @returns {boolean} Returns "true" if any observer has detected changes in
  88543. * dimensions of it's elements.
  88544. */
  88545. ResizeObserverController.prototype.updateObservers_ = function () {
  88546. // Collect observers that have active observations.
  88547. var activeObservers = this.observers_.filter(function (observer) {
  88548. return observer.gatherActive(), observer.hasActive();
  88549. });
  88550. // Deliver notifications in a separate cycle in order to avoid any
  88551. // collisions between observers, e.g. when multiple instances of
  88552. // ResizeObserver are tracking the same element and the callback of one
  88553. // of them changes content dimensions of the observed target. Sometimes
  88554. // this may result in notifications being blocked for the rest of observers.
  88555. activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
  88556. return activeObservers.length > 0;
  88557. };
  88558. /**
  88559. * Initializes DOM listeners.
  88560. *
  88561. * @private
  88562. * @returns {void}
  88563. */
  88564. ResizeObserverController.prototype.connect_ = function () {
  88565. // Do nothing if running in a non-browser environment or if listeners
  88566. // have been already added.
  88567. if (!isBrowser || this.connected_) {
  88568. return;
  88569. }
  88570. // Subscription to the "Transitionend" event is used as a workaround for
  88571. // delayed transitions. This way it's possible to capture at least the
  88572. // final state of an element.
  88573. document.addEventListener('transitionend', this.onTransitionEnd_);
  88574. window.addEventListener('resize', this.refresh);
  88575. if (mutationObserverSupported) {
  88576. this.mutationsObserver_ = new MutationObserver(this.refresh);
  88577. this.mutationsObserver_.observe(document, {
  88578. attributes: true,
  88579. childList: true,
  88580. characterData: true,
  88581. subtree: true
  88582. });
  88583. }
  88584. else {
  88585. document.addEventListener('DOMSubtreeModified', this.refresh);
  88586. this.mutationEventsAdded_ = true;
  88587. }
  88588. this.connected_ = true;
  88589. };
  88590. /**
  88591. * Removes DOM listeners.
  88592. *
  88593. * @private
  88594. * @returns {void}
  88595. */
  88596. ResizeObserverController.prototype.disconnect_ = function () {
  88597. // Do nothing if running in a non-browser environment or if listeners
  88598. // have been already removed.
  88599. if (!isBrowser || !this.connected_) {
  88600. return;
  88601. }
  88602. document.removeEventListener('transitionend', this.onTransitionEnd_);
  88603. window.removeEventListener('resize', this.refresh);
  88604. if (this.mutationsObserver_) {
  88605. this.mutationsObserver_.disconnect();
  88606. }
  88607. if (this.mutationEventsAdded_) {
  88608. document.removeEventListener('DOMSubtreeModified', this.refresh);
  88609. }
  88610. this.mutationsObserver_ = null;
  88611. this.mutationEventsAdded_ = false;
  88612. this.connected_ = false;
  88613. };
  88614. /**
  88615. * "Transitionend" event handler.
  88616. *
  88617. * @private
  88618. * @param {TransitionEvent} event
  88619. * @returns {void}
  88620. */
  88621. ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
  88622. var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
  88623. // Detect whether transition may affect dimensions of an element.
  88624. var isReflowProperty = transitionKeys.some(function (key) {
  88625. return !!~propertyName.indexOf(key);
  88626. });
  88627. if (isReflowProperty) {
  88628. this.refresh();
  88629. }
  88630. };
  88631. /**
  88632. * Returns instance of the ResizeObserverController.
  88633. *
  88634. * @returns {ResizeObserverController}
  88635. */
  88636. ResizeObserverController.getInstance = function () {
  88637. if (!this.instance_) {
  88638. this.instance_ = new ResizeObserverController();
  88639. }
  88640. return this.instance_;
  88641. };
  88642. /**
  88643. * Holds reference to the controller's instance.
  88644. *
  88645. * @private {ResizeObserverController}
  88646. */
  88647. ResizeObserverController.instance_ = null;
  88648. return ResizeObserverController;
  88649. }());
  88650. /**
  88651. * Defines non-writable/enumerable properties of the provided target object.
  88652. *
  88653. * @param {Object} target - Object for which to define properties.
  88654. * @param {Object} props - Properties to be defined.
  88655. * @returns {Object} Target object.
  88656. */
  88657. var defineConfigurable = (function (target, props) {
  88658. for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
  88659. var key = _a[_i];
  88660. Object.defineProperty(target, key, {
  88661. value: props[key],
  88662. enumerable: false,
  88663. writable: false,
  88664. configurable: true
  88665. });
  88666. }
  88667. return target;
  88668. });
  88669. /**
  88670. * Returns the global object associated with provided element.
  88671. *
  88672. * @param {Object} target
  88673. * @returns {Object}
  88674. */
  88675. var getWindowOf = (function (target) {
  88676. // Assume that the element is an instance of Node, which means that it
  88677. // has the "ownerDocument" property from which we can retrieve a
  88678. // corresponding global object.
  88679. var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
  88680. // Return the local global object if it's not possible extract one from
  88681. // provided element.
  88682. return ownerGlobal || global$1;
  88683. });
  88684. // Placeholder of an empty content rectangle.
  88685. var emptyRect = createRectInit(0, 0, 0, 0);
  88686. /**
  88687. * Converts provided string to a number.
  88688. *
  88689. * @param {number|string} value
  88690. * @returns {number}
  88691. */
  88692. function toFloat(value) {
  88693. return parseFloat(value) || 0;
  88694. }
  88695. /**
  88696. * Extracts borders size from provided styles.
  88697. *
  88698. * @param {CSSStyleDeclaration} styles
  88699. * @param {...string} positions - Borders positions (top, right, ...)
  88700. * @returns {number}
  88701. */
  88702. function getBordersSize(styles) {
  88703. var positions = [];
  88704. for (var _i = 1; _i < arguments.length; _i++) {
  88705. positions[_i - 1] = arguments[_i];
  88706. }
  88707. return positions.reduce(function (size, position) {
  88708. var value = styles['border-' + position + '-width'];
  88709. return size + toFloat(value);
  88710. }, 0);
  88711. }
  88712. /**
  88713. * Extracts paddings sizes from provided styles.
  88714. *
  88715. * @param {CSSStyleDeclaration} styles
  88716. * @returns {Object} Paddings box.
  88717. */
  88718. function getPaddings(styles) {
  88719. var positions = ['top', 'right', 'bottom', 'left'];
  88720. var paddings = {};
  88721. for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
  88722. var position = positions_1[_i];
  88723. var value = styles['padding-' + position];
  88724. paddings[position] = toFloat(value);
  88725. }
  88726. return paddings;
  88727. }
  88728. /**
  88729. * Calculates content rectangle of provided SVG element.
  88730. *
  88731. * @param {SVGGraphicsElement} target - Element content rectangle of which needs
  88732. * to be calculated.
  88733. * @returns {DOMRectInit}
  88734. */
  88735. function getSVGContentRect(target) {
  88736. var bbox = target.getBBox();
  88737. return createRectInit(0, 0, bbox.width, bbox.height);
  88738. }
  88739. /**
  88740. * Calculates content rectangle of provided HTMLElement.
  88741. *
  88742. * @param {HTMLElement} target - Element for which to calculate the content rectangle.
  88743. * @returns {DOMRectInit}
  88744. */
  88745. function getHTMLElementContentRect(target) {
  88746. // Client width & height properties can't be
  88747. // used exclusively as they provide rounded values.
  88748. var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
  88749. // By this condition we can catch all non-replaced inline, hidden and
  88750. // detached elements. Though elements with width & height properties less
  88751. // than 0.5 will be discarded as well.
  88752. //
  88753. // Without it we would need to implement separate methods for each of
  88754. // those cases and it's not possible to perform a precise and performance
  88755. // effective test for hidden elements. E.g. even jQuery's ':visible' filter
  88756. // gives wrong results for elements with width & height less than 0.5.
  88757. if (!clientWidth && !clientHeight) {
  88758. return emptyRect;
  88759. }
  88760. var styles = getWindowOf(target).getComputedStyle(target);
  88761. var paddings = getPaddings(styles);
  88762. var horizPad = paddings.left + paddings.right;
  88763. var vertPad = paddings.top + paddings.bottom;
  88764. // Computed styles of width & height are being used because they are the
  88765. // only dimensions available to JS that contain non-rounded values. It could
  88766. // be possible to utilize the getBoundingClientRect if only it's data wasn't
  88767. // affected by CSS transformations let alone paddings, borders and scroll bars.
  88768. var width = toFloat(styles.width), height = toFloat(styles.height);
  88769. // Width & height include paddings and borders when the 'border-box' box
  88770. // model is applied (except for IE).
  88771. if (styles.boxSizing === 'border-box') {
  88772. // Following conditions are required to handle Internet Explorer which
  88773. // doesn't include paddings and borders to computed CSS dimensions.
  88774. //
  88775. // We can say that if CSS dimensions + paddings are equal to the "client"
  88776. // properties then it's either IE, and thus we don't need to subtract
  88777. // anything, or an element merely doesn't have paddings/borders styles.
  88778. if (Math.round(width + horizPad) !== clientWidth) {
  88779. width -= getBordersSize(styles, 'left', 'right') + horizPad;
  88780. }
  88781. if (Math.round(height + vertPad) !== clientHeight) {
  88782. height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
  88783. }
  88784. }
  88785. // Following steps can't be applied to the document's root element as its
  88786. // client[Width/Height] properties represent viewport area of the window.
  88787. // Besides, it's as well not necessary as the <html> itself neither has
  88788. // rendered scroll bars nor it can be clipped.
  88789. if (!isDocumentElement(target)) {
  88790. // In some browsers (only in Firefox, actually) CSS width & height
  88791. // include scroll bars size which can be removed at this step as scroll
  88792. // bars are the only difference between rounded dimensions + paddings
  88793. // and "client" properties, though that is not always true in Chrome.
  88794. var vertScrollbar = Math.round(width + horizPad) - clientWidth;
  88795. var horizScrollbar = Math.round(height + vertPad) - clientHeight;
  88796. // Chrome has a rather weird rounding of "client" properties.
  88797. // E.g. for an element with content width of 314.2px it sometimes gives
  88798. // the client width of 315px and for the width of 314.7px it may give
  88799. // 314px. And it doesn't happen all the time. So just ignore this delta
  88800. // as a non-relevant.
  88801. if (Math.abs(vertScrollbar) !== 1) {
  88802. width -= vertScrollbar;
  88803. }
  88804. if (Math.abs(horizScrollbar) !== 1) {
  88805. height -= horizScrollbar;
  88806. }
  88807. }
  88808. return createRectInit(paddings.left, paddings.top, width, height);
  88809. }
  88810. /**
  88811. * Checks whether provided element is an instance of the SVGGraphicsElement.
  88812. *
  88813. * @param {Element} target - Element to be checked.
  88814. * @returns {boolean}
  88815. */
  88816. var isSVGGraphicsElement = (function () {
  88817. // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
  88818. // interface.
  88819. if (typeof SVGGraphicsElement !== 'undefined') {
  88820. return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
  88821. }
  88822. // If it's so, then check that element is at least an instance of the
  88823. // SVGElement and that it has the "getBBox" method.
  88824. // eslint-disable-next-line no-extra-parens
  88825. return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
  88826. typeof target.getBBox === 'function'); };
  88827. })();
  88828. /**
  88829. * Checks whether provided element is a document element (<html>).
  88830. *
  88831. * @param {Element} target - Element to be checked.
  88832. * @returns {boolean}
  88833. */
  88834. function isDocumentElement(target) {
  88835. return target === getWindowOf(target).document.documentElement;
  88836. }
  88837. /**
  88838. * Calculates an appropriate content rectangle for provided html or svg element.
  88839. *
  88840. * @param {Element} target - Element content rectangle of which needs to be calculated.
  88841. * @returns {DOMRectInit}
  88842. */
  88843. function getContentRect(target) {
  88844. if (!isBrowser) {
  88845. return emptyRect;
  88846. }
  88847. if (isSVGGraphicsElement(target)) {
  88848. return getSVGContentRect(target);
  88849. }
  88850. return getHTMLElementContentRect(target);
  88851. }
  88852. /**
  88853. * Creates rectangle with an interface of the DOMRectReadOnly.
  88854. * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
  88855. *
  88856. * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
  88857. * @returns {DOMRectReadOnly}
  88858. */
  88859. function createReadOnlyRect(_a) {
  88860. var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
  88861. // If DOMRectReadOnly is available use it as a prototype for the rectangle.
  88862. var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
  88863. var rect = Object.create(Constr.prototype);
  88864. // Rectangle's properties are not writable and non-enumerable.
  88865. defineConfigurable(rect, {
  88866. x: x, y: y, width: width, height: height,
  88867. top: y,
  88868. right: x + width,
  88869. bottom: height + y,
  88870. left: x
  88871. });
  88872. return rect;
  88873. }
  88874. /**
  88875. * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
  88876. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
  88877. *
  88878. * @param {number} x - X coordinate.
  88879. * @param {number} y - Y coordinate.
  88880. * @param {number} width - Rectangle's width.
  88881. * @param {number} height - Rectangle's height.
  88882. * @returns {DOMRectInit}
  88883. */
  88884. function createRectInit(x, y, width, height) {
  88885. return { x: x, y: y, width: width, height: height };
  88886. }
  88887. /**
  88888. * Class that is responsible for computations of the content rectangle of
  88889. * provided DOM element and for keeping track of it's changes.
  88890. */
  88891. var ResizeObservation = /** @class */ (function () {
  88892. /**
  88893. * Creates an instance of ResizeObservation.
  88894. *
  88895. * @param {Element} target - Element to be observed.
  88896. */
  88897. function ResizeObservation(target) {
  88898. /**
  88899. * Broadcasted width of content rectangle.
  88900. *
  88901. * @type {number}
  88902. */
  88903. this.broadcastWidth = 0;
  88904. /**
  88905. * Broadcasted height of content rectangle.
  88906. *
  88907. * @type {number}
  88908. */
  88909. this.broadcastHeight = 0;
  88910. /**
  88911. * Reference to the last observed content rectangle.
  88912. *
  88913. * @private {DOMRectInit}
  88914. */
  88915. this.contentRect_ = createRectInit(0, 0, 0, 0);
  88916. this.target = target;
  88917. }
  88918. /**
  88919. * Updates content rectangle and tells whether it's width or height properties
  88920. * have changed since the last broadcast.
  88921. *
  88922. * @returns {boolean}
  88923. */
  88924. ResizeObservation.prototype.isActive = function () {
  88925. var rect = getContentRect(this.target);
  88926. this.contentRect_ = rect;
  88927. return (rect.width !== this.broadcastWidth ||
  88928. rect.height !== this.broadcastHeight);
  88929. };
  88930. /**
  88931. * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
  88932. * from the corresponding properties of the last observed content rectangle.
  88933. *
  88934. * @returns {DOMRectInit} Last observed content rectangle.
  88935. */
  88936. ResizeObservation.prototype.broadcastRect = function () {
  88937. var rect = this.contentRect_;
  88938. this.broadcastWidth = rect.width;
  88939. this.broadcastHeight = rect.height;
  88940. return rect;
  88941. };
  88942. return ResizeObservation;
  88943. }());
  88944. var ResizeObserverEntry = /** @class */ (function () {
  88945. /**
  88946. * Creates an instance of ResizeObserverEntry.
  88947. *
  88948. * @param {Element} target - Element that is being observed.
  88949. * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
  88950. */
  88951. function ResizeObserverEntry(target, rectInit) {
  88952. var contentRect = createReadOnlyRect(rectInit);
  88953. // According to the specification following properties are not writable
  88954. // and are also not enumerable in the native implementation.
  88955. //
  88956. // Property accessors are not being used as they'd require to define a
  88957. // private WeakMap storage which may cause memory leaks in browsers that
  88958. // don't support this type of collections.
  88959. defineConfigurable(this, { target: target, contentRect: contentRect });
  88960. }
  88961. return ResizeObserverEntry;
  88962. }());
  88963. var ResizeObserverSPI = /** @class */ (function () {
  88964. /**
  88965. * Creates a new instance of ResizeObserver.
  88966. *
  88967. * @param {ResizeObserverCallback} callback - Callback function that is invoked
  88968. * when one of the observed elements changes it's content dimensions.
  88969. * @param {ResizeObserverController} controller - Controller instance which
  88970. * is responsible for the updates of observer.
  88971. * @param {ResizeObserver} callbackCtx - Reference to the public
  88972. * ResizeObserver instance which will be passed to callback function.
  88973. */
  88974. function ResizeObserverSPI(callback, controller, callbackCtx) {
  88975. /**
  88976. * Collection of resize observations that have detected changes in dimensions
  88977. * of elements.
  88978. *
  88979. * @private {Array<ResizeObservation>}
  88980. */
  88981. this.activeObservations_ = [];
  88982. /**
  88983. * Registry of the ResizeObservation instances.
  88984. *
  88985. * @private {Map<Element, ResizeObservation>}
  88986. */
  88987. this.observations_ = new MapShim();
  88988. if (typeof callback !== 'function') {
  88989. throw new TypeError('The callback provided as parameter 1 is not a function.');
  88990. }
  88991. this.callback_ = callback;
  88992. this.controller_ = controller;
  88993. this.callbackCtx_ = callbackCtx;
  88994. }
  88995. /**
  88996. * Starts observing provided element.
  88997. *
  88998. * @param {Element} target - Element to be observed.
  88999. * @returns {void}
  89000. */
  89001. ResizeObserverSPI.prototype.observe = function (target) {
  89002. if (!arguments.length) {
  89003. throw new TypeError('1 argument required, but only 0 present.');
  89004. }
  89005. // Do nothing if current environment doesn't have the Element interface.
  89006. if (typeof Element === 'undefined' || !(Element instanceof Object)) {
  89007. return;
  89008. }
  89009. if (!(target instanceof getWindowOf(target).Element)) {
  89010. throw new TypeError('parameter 1 is not of type "Element".');
  89011. }
  89012. var observations = this.observations_;
  89013. // Do nothing if element is already being observed.
  89014. if (observations.has(target)) {
  89015. return;
  89016. }
  89017. observations.set(target, new ResizeObservation(target));
  89018. this.controller_.addObserver(this);
  89019. // Force the update of observations.
  89020. this.controller_.refresh();
  89021. };
  89022. /**
  89023. * Stops observing provided element.
  89024. *
  89025. * @param {Element} target - Element to stop observing.
  89026. * @returns {void}
  89027. */
  89028. ResizeObserverSPI.prototype.unobserve = function (target) {
  89029. if (!arguments.length) {
  89030. throw new TypeError('1 argument required, but only 0 present.');
  89031. }
  89032. // Do nothing if current environment doesn't have the Element interface.
  89033. if (typeof Element === 'undefined' || !(Element instanceof Object)) {
  89034. return;
  89035. }
  89036. if (!(target instanceof getWindowOf(target).Element)) {
  89037. throw new TypeError('parameter 1 is not of type "Element".');
  89038. }
  89039. var observations = this.observations_;
  89040. // Do nothing if element is not being observed.
  89041. if (!observations.has(target)) {
  89042. return;
  89043. }
  89044. observations.delete(target);
  89045. if (!observations.size) {
  89046. this.controller_.removeObserver(this);
  89047. }
  89048. };
  89049. /**
  89050. * Stops observing all elements.
  89051. *
  89052. * @returns {void}
  89053. */
  89054. ResizeObserverSPI.prototype.disconnect = function () {
  89055. this.clearActive();
  89056. this.observations_.clear();
  89057. this.controller_.removeObserver(this);
  89058. };
  89059. /**
  89060. * Collects observation instances the associated element of which has changed
  89061. * it's content rectangle.
  89062. *
  89063. * @returns {void}
  89064. */
  89065. ResizeObserverSPI.prototype.gatherActive = function () {
  89066. var _this = this;
  89067. this.clearActive();
  89068. this.observations_.forEach(function (observation) {
  89069. if (observation.isActive()) {
  89070. _this.activeObservations_.push(observation);
  89071. }
  89072. });
  89073. };
  89074. /**
  89075. * Invokes initial callback function with a list of ResizeObserverEntry
  89076. * instances collected from active resize observations.
  89077. *
  89078. * @returns {void}
  89079. */
  89080. ResizeObserverSPI.prototype.broadcastActive = function () {
  89081. // Do nothing if observer doesn't have active observations.
  89082. if (!this.hasActive()) {
  89083. return;
  89084. }
  89085. var ctx = this.callbackCtx_;
  89086. // Create ResizeObserverEntry instance for every active observation.
  89087. var entries = this.activeObservations_.map(function (observation) {
  89088. return new ResizeObserverEntry(observation.target, observation.broadcastRect());
  89089. });
  89090. this.callback_.call(ctx, entries, ctx);
  89091. this.clearActive();
  89092. };
  89093. /**
  89094. * Clears the collection of active observations.
  89095. *
  89096. * @returns {void}
  89097. */
  89098. ResizeObserverSPI.prototype.clearActive = function () {
  89099. this.activeObservations_.splice(0);
  89100. };
  89101. /**
  89102. * Tells whether observer has active observations.
  89103. *
  89104. * @returns {boolean}
  89105. */
  89106. ResizeObserverSPI.prototype.hasActive = function () {
  89107. return this.activeObservations_.length > 0;
  89108. };
  89109. return ResizeObserverSPI;
  89110. }());
  89111. // Registry of internal observers. If WeakMap is not available use current shim
  89112. // for the Map collection as it has all required methods and because WeakMap
  89113. // can't be fully polyfilled anyway.
  89114. var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
  89115. /**
  89116. * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
  89117. * exposing only those methods and properties that are defined in the spec.
  89118. */
  89119. var ResizeObserver = /** @class */ (function () {
  89120. /**
  89121. * Creates a new instance of ResizeObserver.
  89122. *
  89123. * @param {ResizeObserverCallback} callback - Callback that is invoked when
  89124. * dimensions of the observed elements change.
  89125. */
  89126. function ResizeObserver(callback) {
  89127. if (!(this instanceof ResizeObserver)) {
  89128. throw new TypeError('Cannot call a class as a function.');
  89129. }
  89130. if (!arguments.length) {
  89131. throw new TypeError('1 argument required, but only 0 present.');
  89132. }
  89133. var controller = ResizeObserverController.getInstance();
  89134. var observer = new ResizeObserverSPI(callback, controller, this);
  89135. observers.set(this, observer);
  89136. }
  89137. return ResizeObserver;
  89138. }());
  89139. // Expose public methods of ResizeObserver.
  89140. [
  89141. 'observe',
  89142. 'unobserve',
  89143. 'disconnect'
  89144. ].forEach(function (method) {
  89145. ResizeObserver.prototype[method] = function () {
  89146. var _a;
  89147. return (_a = observers.get(this))[method].apply(_a, arguments);
  89148. };
  89149. });
  89150. var index = (function () {
  89151. // Export existing implementation if available.
  89152. if (typeof global$1.ResizeObserver !== 'undefined') {
  89153. return global$1.ResizeObserver;
  89154. }
  89155. return ResizeObserver;
  89156. })();
  89157. /* harmony default export */ __webpack_exports__["default"] = (index);
  89158. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  89159. /***/ }),
  89160. /***/ "./node_modules/_screenfull@5.2.0@screenfull/dist/screenfull.js":
  89161. /*!**********************************************************************!*\
  89162. !*** ./node_modules/_screenfull@5.2.0@screenfull/dist/screenfull.js ***!
  89163. \**********************************************************************/
  89164. /*! no static exports found */
  89165. /***/ (function(module, exports, __webpack_require__) {
  89166. /*!
  89167. * screenfull
  89168. * v5.2.0 - 2021-11-03
  89169. * (c) Sindre Sorhus; MIT License
  89170. */
  89171. (function () {
  89172. 'use strict';
  89173. var document = typeof window !== 'undefined' && typeof window.document !== 'undefined' ? window.document : {};
  89174. var isCommonjs = true && module.exports;
  89175. var fn = (function () {
  89176. var val;
  89177. var fnMap = [
  89178. [
  89179. 'requestFullscreen',
  89180. 'exitFullscreen',
  89181. 'fullscreenElement',
  89182. 'fullscreenEnabled',
  89183. 'fullscreenchange',
  89184. 'fullscreenerror'
  89185. ],
  89186. // New WebKit
  89187. [
  89188. 'webkitRequestFullscreen',
  89189. 'webkitExitFullscreen',
  89190. 'webkitFullscreenElement',
  89191. 'webkitFullscreenEnabled',
  89192. 'webkitfullscreenchange',
  89193. 'webkitfullscreenerror'
  89194. ],
  89195. // Old WebKit
  89196. [
  89197. 'webkitRequestFullScreen',
  89198. 'webkitCancelFullScreen',
  89199. 'webkitCurrentFullScreenElement',
  89200. 'webkitCancelFullScreen',
  89201. 'webkitfullscreenchange',
  89202. 'webkitfullscreenerror'
  89203. ],
  89204. [
  89205. 'mozRequestFullScreen',
  89206. 'mozCancelFullScreen',
  89207. 'mozFullScreenElement',
  89208. 'mozFullScreenEnabled',
  89209. 'mozfullscreenchange',
  89210. 'mozfullscreenerror'
  89211. ],
  89212. [
  89213. 'msRequestFullscreen',
  89214. 'msExitFullscreen',
  89215. 'msFullscreenElement',
  89216. 'msFullscreenEnabled',
  89217. 'MSFullscreenChange',
  89218. 'MSFullscreenError'
  89219. ]
  89220. ];
  89221. var i = 0;
  89222. var l = fnMap.length;
  89223. var ret = {};
  89224. for (; i < l; i++) {
  89225. val = fnMap[i];
  89226. if (val && val[1] in document) {
  89227. for (i = 0; i < val.length; i++) {
  89228. ret[fnMap[0][i]] = val[i];
  89229. }
  89230. return ret;
  89231. }
  89232. }
  89233. return false;
  89234. })();
  89235. var eventNameMap = {
  89236. change: fn.fullscreenchange,
  89237. error: fn.fullscreenerror
  89238. };
  89239. var screenfull = {
  89240. request: function (element, options) {
  89241. return new Promise(function (resolve, reject) {
  89242. var onFullScreenEntered = function () {
  89243. this.off('change', onFullScreenEntered);
  89244. resolve();
  89245. }.bind(this);
  89246. this.on('change', onFullScreenEntered);
  89247. element = element || document.documentElement;
  89248. var returnPromise = element[fn.requestFullscreen](options);
  89249. if (returnPromise instanceof Promise) {
  89250. returnPromise.then(onFullScreenEntered).catch(reject);
  89251. }
  89252. }.bind(this));
  89253. },
  89254. exit: function () {
  89255. return new Promise(function (resolve, reject) {
  89256. if (!this.isFullscreen) {
  89257. resolve();
  89258. return;
  89259. }
  89260. var onFullScreenExit = function () {
  89261. this.off('change', onFullScreenExit);
  89262. resolve();
  89263. }.bind(this);
  89264. this.on('change', onFullScreenExit);
  89265. var returnPromise = document[fn.exitFullscreen]();
  89266. if (returnPromise instanceof Promise) {
  89267. returnPromise.then(onFullScreenExit).catch(reject);
  89268. }
  89269. }.bind(this));
  89270. },
  89271. toggle: function (element, options) {
  89272. return this.isFullscreen ? this.exit() : this.request(element, options);
  89273. },
  89274. onchange: function (callback) {
  89275. this.on('change', callback);
  89276. },
  89277. onerror: function (callback) {
  89278. this.on('error', callback);
  89279. },
  89280. on: function (event, callback) {
  89281. var eventName = eventNameMap[event];
  89282. if (eventName) {
  89283. document.addEventListener(eventName, callback, false);
  89284. }
  89285. },
  89286. off: function (event, callback) {
  89287. var eventName = eventNameMap[event];
  89288. if (eventName) {
  89289. document.removeEventListener(eventName, callback, false);
  89290. }
  89291. },
  89292. raw: fn
  89293. };
  89294. if (!fn) {
  89295. if (isCommonjs) {
  89296. module.exports = {isEnabled: false};
  89297. } else {
  89298. window.screenfull = {isEnabled: false};
  89299. }
  89300. return;
  89301. }
  89302. Object.defineProperties(screenfull, {
  89303. isFullscreen: {
  89304. get: function () {
  89305. return Boolean(document[fn.fullscreenElement]);
  89306. }
  89307. },
  89308. element: {
  89309. enumerable: true,
  89310. get: function () {
  89311. return document[fn.fullscreenElement];
  89312. }
  89313. },
  89314. isEnabled: {
  89315. enumerable: true,
  89316. get: function () {
  89317. // Coerce to boolean in case of old WebKit
  89318. return Boolean(document[fn.fullscreenEnabled]);
  89319. }
  89320. }
  89321. });
  89322. if (isCommonjs) {
  89323. module.exports = screenfull;
  89324. } else {
  89325. window.screenfull = screenfull;
  89326. }
  89327. })();
  89328. /***/ }),
  89329. /***/ "./node_modules/_side-channel@1.0.4@side-channel/index.js":
  89330. /*!****************************************************************!*\
  89331. !*** ./node_modules/_side-channel@1.0.4@side-channel/index.js ***!
  89332. \****************************************************************/
  89333. /*! no static exports found */
  89334. /***/ (function(module, exports, __webpack_require__) {
  89335. "use strict";
  89336. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/_get-intrinsic@1.1.2@get-intrinsic/index.js");
  89337. var callBound = __webpack_require__(/*! call-bind/callBound */ "./node_modules/_call-bind@1.0.2@call-bind/callBound.js");
  89338. var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/_object-inspect@1.12.2@object-inspect/index.js");
  89339. var $TypeError = GetIntrinsic('%TypeError%');
  89340. var $WeakMap = GetIntrinsic('%WeakMap%', true);
  89341. var $Map = GetIntrinsic('%Map%', true);
  89342. var $weakMapGet = callBound('WeakMap.prototype.get', true);
  89343. var $weakMapSet = callBound('WeakMap.prototype.set', true);
  89344. var $weakMapHas = callBound('WeakMap.prototype.has', true);
  89345. var $mapGet = callBound('Map.prototype.get', true);
  89346. var $mapSet = callBound('Map.prototype.set', true);
  89347. var $mapHas = callBound('Map.prototype.has', true);
  89348. /*
  89349. * This function traverses the list returning the node corresponding to the
  89350. * given key.
  89351. *
  89352. * That node is also moved to the head of the list, so that if it's accessed
  89353. * again we don't need to traverse the whole list. By doing so, all the recently
  89354. * used nodes can be accessed relatively quickly.
  89355. */
  89356. var listGetNode = function (list, key) { // eslint-disable-line consistent-return
  89357. for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
  89358. if (curr.key === key) {
  89359. prev.next = curr.next;
  89360. curr.next = list.next;
  89361. list.next = curr; // eslint-disable-line no-param-reassign
  89362. return curr;
  89363. }
  89364. }
  89365. };
  89366. var listGet = function (objects, key) {
  89367. var node = listGetNode(objects, key);
  89368. return node && node.value;
  89369. };
  89370. var listSet = function (objects, key, value) {
  89371. var node = listGetNode(objects, key);
  89372. if (node) {
  89373. node.value = value;
  89374. } else {
  89375. // Prepend the new node to the beginning of the list
  89376. objects.next = { // eslint-disable-line no-param-reassign
  89377. key: key,
  89378. next: objects.next,
  89379. value: value
  89380. };
  89381. }
  89382. };
  89383. var listHas = function (objects, key) {
  89384. return !!listGetNode(objects, key);
  89385. };
  89386. module.exports = function getSideChannel() {
  89387. var $wm;
  89388. var $m;
  89389. var $o;
  89390. var channel = {
  89391. assert: function (key) {
  89392. if (!channel.has(key)) {
  89393. throw new $TypeError('Side channel does not contain ' + inspect(key));
  89394. }
  89395. },
  89396. get: function (key) { // eslint-disable-line consistent-return
  89397. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  89398. if ($wm) {
  89399. return $weakMapGet($wm, key);
  89400. }
  89401. } else if ($Map) {
  89402. if ($m) {
  89403. return $mapGet($m, key);
  89404. }
  89405. } else {
  89406. if ($o) { // eslint-disable-line no-lonely-if
  89407. return listGet($o, key);
  89408. }
  89409. }
  89410. },
  89411. has: function (key) {
  89412. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  89413. if ($wm) {
  89414. return $weakMapHas($wm, key);
  89415. }
  89416. } else if ($Map) {
  89417. if ($m) {
  89418. return $mapHas($m, key);
  89419. }
  89420. } else {
  89421. if ($o) { // eslint-disable-line no-lonely-if
  89422. return listHas($o, key);
  89423. }
  89424. }
  89425. return false;
  89426. },
  89427. set: function (key, value) {
  89428. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  89429. if (!$wm) {
  89430. $wm = new $WeakMap();
  89431. }
  89432. $weakMapSet($wm, key, value);
  89433. } else if ($Map) {
  89434. if (!$m) {
  89435. $m = new $Map();
  89436. }
  89437. $mapSet($m, key, value);
  89438. } else {
  89439. if (!$o) {
  89440. /*
  89441. * Initialize the linked list as an empty node, so that we don't have
  89442. * to special-case handling of the first node: we can always refer to
  89443. * it as (previous node).next, instead of something like (list).head
  89444. */
  89445. $o = { key: {}, next: null };
  89446. }
  89447. listSet($o, key, value);
  89448. }
  89449. }
  89450. };
  89451. return channel;
  89452. };
  89453. /***/ }),
  89454. /***/ "./node_modules/_svg-baker-runtime@1.4.7@svg-baker-runtime/browser-symbol.js":
  89455. /*!***********************************************************************************!*\
  89456. !*** ./node_modules/_svg-baker-runtime@1.4.7@svg-baker-runtime/browser-symbol.js ***!
  89457. \***********************************************************************************/
  89458. /*! no static exports found */
  89459. /***/ (function(module, exports, __webpack_require__) {
  89460. /* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {
  89461. true ? module.exports = factory() :
  89462. undefined;
  89463. }(this, (function () { 'use strict';
  89464. var SpriteSymbol = function SpriteSymbol(ref) {
  89465. var id = ref.id;
  89466. var viewBox = ref.viewBox;
  89467. var content = ref.content;
  89468. this.id = id;
  89469. this.viewBox = viewBox;
  89470. this.content = content;
  89471. };
  89472. /**
  89473. * @return {string}
  89474. */
  89475. SpriteSymbol.prototype.stringify = function stringify () {
  89476. return this.content;
  89477. };
  89478. /**
  89479. * @return {string}
  89480. */
  89481. SpriteSymbol.prototype.toString = function toString () {
  89482. return this.stringify();
  89483. };
  89484. SpriteSymbol.prototype.destroy = function destroy () {
  89485. var this$1 = this;
  89486. ['id', 'viewBox', 'content'].forEach(function (prop) { return delete this$1[prop]; });
  89487. };
  89488. /**
  89489. * @param {string} content
  89490. * @return {Element}
  89491. */
  89492. var parse = function (content) {
  89493. var hasImportNode = !!document.importNode;
  89494. var doc = new DOMParser().parseFromString(content, 'image/svg+xml').documentElement;
  89495. /**
  89496. * Fix for browser which are throwing WrongDocumentError
  89497. * if you insert an element which is not part of the document
  89498. * @see http://stackoverflow.com/a/7986519/4624403
  89499. */
  89500. if (hasImportNode) {
  89501. return document.importNode(doc, true);
  89502. }
  89503. return doc;
  89504. };
  89505. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  89506. function createCommonjsModule(fn, module) {
  89507. return module = { exports: {} }, fn(module, module.exports), module.exports;
  89508. }
  89509. var deepmerge = createCommonjsModule(function (module, exports) {
  89510. (function (root, factory) {
  89511. if (false) {} else {
  89512. module.exports = factory();
  89513. }
  89514. }(commonjsGlobal, function () {
  89515. function isMergeableObject(val) {
  89516. var nonNullObject = val && typeof val === 'object';
  89517. return nonNullObject
  89518. && Object.prototype.toString.call(val) !== '[object RegExp]'
  89519. && Object.prototype.toString.call(val) !== '[object Date]'
  89520. }
  89521. function emptyTarget(val) {
  89522. return Array.isArray(val) ? [] : {}
  89523. }
  89524. function cloneIfNecessary(value, optionsArgument) {
  89525. var clone = optionsArgument && optionsArgument.clone === true;
  89526. return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
  89527. }
  89528. function defaultArrayMerge(target, source, optionsArgument) {
  89529. var destination = target.slice();
  89530. source.forEach(function(e, i) {
  89531. if (typeof destination[i] === 'undefined') {
  89532. destination[i] = cloneIfNecessary(e, optionsArgument);
  89533. } else if (isMergeableObject(e)) {
  89534. destination[i] = deepmerge(target[i], e, optionsArgument);
  89535. } else if (target.indexOf(e) === -1) {
  89536. destination.push(cloneIfNecessary(e, optionsArgument));
  89537. }
  89538. });
  89539. return destination
  89540. }
  89541. function mergeObject(target, source, optionsArgument) {
  89542. var destination = {};
  89543. if (isMergeableObject(target)) {
  89544. Object.keys(target).forEach(function (key) {
  89545. destination[key] = cloneIfNecessary(target[key], optionsArgument);
  89546. });
  89547. }
  89548. Object.keys(source).forEach(function (key) {
  89549. if (!isMergeableObject(source[key]) || !target[key]) {
  89550. destination[key] = cloneIfNecessary(source[key], optionsArgument);
  89551. } else {
  89552. destination[key] = deepmerge(target[key], source[key], optionsArgument);
  89553. }
  89554. });
  89555. return destination
  89556. }
  89557. function deepmerge(target, source, optionsArgument) {
  89558. var array = Array.isArray(source);
  89559. var options = optionsArgument || { arrayMerge: defaultArrayMerge };
  89560. var arrayMerge = options.arrayMerge || defaultArrayMerge;
  89561. if (array) {
  89562. return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument)
  89563. } else {
  89564. return mergeObject(target, source, optionsArgument)
  89565. }
  89566. }
  89567. deepmerge.all = function deepmergeAll(array, optionsArgument) {
  89568. if (!Array.isArray(array) || array.length < 2) {
  89569. throw new Error('first argument should be an array with at least two elements')
  89570. }
  89571. // we are sure there are at least 2 values, so it is safe to have no initial value
  89572. return array.reduce(function(prev, next) {
  89573. return deepmerge(prev, next, optionsArgument)
  89574. })
  89575. };
  89576. return deepmerge
  89577. }));
  89578. });
  89579. var namespaces_1 = createCommonjsModule(function (module, exports) {
  89580. var namespaces = {
  89581. svg: {
  89582. name: 'xmlns',
  89583. uri: 'http://www.w3.org/2000/svg'
  89584. },
  89585. xlink: {
  89586. name: 'xmlns:xlink',
  89587. uri: 'http://www.w3.org/1999/xlink'
  89588. }
  89589. };
  89590. exports.default = namespaces;
  89591. module.exports = exports.default;
  89592. });
  89593. /**
  89594. * @param {Object} attrs
  89595. * @return {string}
  89596. */
  89597. var objectToAttrsString = function (attrs) {
  89598. return Object.keys(attrs).map(function (attr) {
  89599. var value = attrs[attr].toString().replace(/"/g, '&quot;');
  89600. return (attr + "=\"" + value + "\"");
  89601. }).join(' ');
  89602. };
  89603. var svg = namespaces_1.svg;
  89604. var xlink = namespaces_1.xlink;
  89605. var defaultAttrs = {};
  89606. defaultAttrs[svg.name] = svg.uri;
  89607. defaultAttrs[xlink.name] = xlink.uri;
  89608. /**
  89609. * @param {string} [content]
  89610. * @param {Object} [attributes]
  89611. * @return {string}
  89612. */
  89613. var wrapInSvgString = function (content, attributes) {
  89614. if ( content === void 0 ) content = '';
  89615. var attrs = deepmerge(defaultAttrs, attributes || {});
  89616. var attrsRendered = objectToAttrsString(attrs);
  89617. return ("<svg " + attrsRendered + ">" + content + "</svg>");
  89618. };
  89619. var BrowserSpriteSymbol = (function (SpriteSymbol$$1) {
  89620. function BrowserSpriteSymbol () {
  89621. SpriteSymbol$$1.apply(this, arguments);
  89622. }
  89623. if ( SpriteSymbol$$1 ) BrowserSpriteSymbol.__proto__ = SpriteSymbol$$1;
  89624. BrowserSpriteSymbol.prototype = Object.create( SpriteSymbol$$1 && SpriteSymbol$$1.prototype );
  89625. BrowserSpriteSymbol.prototype.constructor = BrowserSpriteSymbol;
  89626. var prototypeAccessors = { isMounted: {} };
  89627. prototypeAccessors.isMounted.get = function () {
  89628. return !!this.node;
  89629. };
  89630. /**
  89631. * @param {Element} node
  89632. * @return {BrowserSpriteSymbol}
  89633. */
  89634. BrowserSpriteSymbol.createFromExistingNode = function createFromExistingNode (node) {
  89635. return new BrowserSpriteSymbol({
  89636. id: node.getAttribute('id'),
  89637. viewBox: node.getAttribute('viewBox'),
  89638. content: node.outerHTML
  89639. });
  89640. };
  89641. BrowserSpriteSymbol.prototype.destroy = function destroy () {
  89642. if (this.isMounted) {
  89643. this.unmount();
  89644. }
  89645. SpriteSymbol$$1.prototype.destroy.call(this);
  89646. };
  89647. /**
  89648. * @param {Element|string} target
  89649. * @return {Element}
  89650. */
  89651. BrowserSpriteSymbol.prototype.mount = function mount (target) {
  89652. if (this.isMounted) {
  89653. return this.node;
  89654. }
  89655. var mountTarget = typeof target === 'string' ? document.querySelector(target) : target;
  89656. var node = this.render();
  89657. this.node = node;
  89658. mountTarget.appendChild(node);
  89659. return node;
  89660. };
  89661. /**
  89662. * @return {Element}
  89663. */
  89664. BrowserSpriteSymbol.prototype.render = function render () {
  89665. var content = this.stringify();
  89666. return parse(wrapInSvgString(content)).childNodes[0];
  89667. };
  89668. BrowserSpriteSymbol.prototype.unmount = function unmount () {
  89669. this.node.parentNode.removeChild(this.node);
  89670. };
  89671. Object.defineProperties( BrowserSpriteSymbol.prototype, prototypeAccessors );
  89672. return BrowserSpriteSymbol;
  89673. }(SpriteSymbol));
  89674. return BrowserSpriteSymbol;
  89675. })));
  89676. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  89677. /***/ }),
  89678. /***/ "./node_modules/_svg-sprite-loader@6.0.11@svg-sprite-loader/runtime/browser-sprite.build.js":
  89679. /*!**************************************************************************************************!*\
  89680. !*** ./node_modules/_svg-sprite-loader@6.0.11@svg-sprite-loader/runtime/browser-sprite.build.js ***!
  89681. \**************************************************************************************************/
  89682. /*! no static exports found */
  89683. /***/ (function(module, exports, __webpack_require__) {
  89684. /* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {
  89685. true ? module.exports = factory() :
  89686. undefined;
  89687. }(this, (function () { 'use strict';
  89688. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  89689. function createCommonjsModule(fn, module) {
  89690. return module = { exports: {} }, fn(module, module.exports), module.exports;
  89691. }
  89692. var deepmerge = createCommonjsModule(function (module, exports) {
  89693. (function (root, factory) {
  89694. if (false) {} else {
  89695. module.exports = factory();
  89696. }
  89697. }(commonjsGlobal, function () {
  89698. function isMergeableObject(val) {
  89699. var nonNullObject = val && typeof val === 'object';
  89700. return nonNullObject
  89701. && Object.prototype.toString.call(val) !== '[object RegExp]'
  89702. && Object.prototype.toString.call(val) !== '[object Date]'
  89703. }
  89704. function emptyTarget(val) {
  89705. return Array.isArray(val) ? [] : {}
  89706. }
  89707. function cloneIfNecessary(value, optionsArgument) {
  89708. var clone = optionsArgument && optionsArgument.clone === true;
  89709. return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
  89710. }
  89711. function defaultArrayMerge(target, source, optionsArgument) {
  89712. var destination = target.slice();
  89713. source.forEach(function(e, i) {
  89714. if (typeof destination[i] === 'undefined') {
  89715. destination[i] = cloneIfNecessary(e, optionsArgument);
  89716. } else if (isMergeableObject(e)) {
  89717. destination[i] = deepmerge(target[i], e, optionsArgument);
  89718. } else if (target.indexOf(e) === -1) {
  89719. destination.push(cloneIfNecessary(e, optionsArgument));
  89720. }
  89721. });
  89722. return destination
  89723. }
  89724. function mergeObject(target, source, optionsArgument) {
  89725. var destination = {};
  89726. if (isMergeableObject(target)) {
  89727. Object.keys(target).forEach(function (key) {
  89728. destination[key] = cloneIfNecessary(target[key], optionsArgument);
  89729. });
  89730. }
  89731. Object.keys(source).forEach(function (key) {
  89732. if (!isMergeableObject(source[key]) || !target[key]) {
  89733. destination[key] = cloneIfNecessary(source[key], optionsArgument);
  89734. } else {
  89735. destination[key] = deepmerge(target[key], source[key], optionsArgument);
  89736. }
  89737. });
  89738. return destination
  89739. }
  89740. function deepmerge(target, source, optionsArgument) {
  89741. var array = Array.isArray(source);
  89742. var options = optionsArgument || { arrayMerge: defaultArrayMerge };
  89743. var arrayMerge = options.arrayMerge || defaultArrayMerge;
  89744. if (array) {
  89745. return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument)
  89746. } else {
  89747. return mergeObject(target, source, optionsArgument)
  89748. }
  89749. }
  89750. deepmerge.all = function deepmergeAll(array, optionsArgument) {
  89751. if (!Array.isArray(array) || array.length < 2) {
  89752. throw new Error('first argument should be an array with at least two elements')
  89753. }
  89754. // we are sure there are at least 2 values, so it is safe to have no initial value
  89755. return array.reduce(function(prev, next) {
  89756. return deepmerge(prev, next, optionsArgument)
  89757. })
  89758. };
  89759. return deepmerge
  89760. }));
  89761. });
  89762. //
  89763. // An event handler can take an optional event argument
  89764. // and should not return a value
  89765. // An array of all currently registered event handlers for a type
  89766. // A map of event types and their corresponding event handlers.
  89767. /** Mitt: Tiny (~200b) functional event emitter / pubsub.
  89768. * @name mitt
  89769. * @returns {Mitt}
  89770. */
  89771. function mitt(all ) {
  89772. all = all || Object.create(null);
  89773. return {
  89774. /**
  89775. * Register an event handler for the given type.
  89776. *
  89777. * @param {String} type Type of event to listen for, or `"*"` for all events
  89778. * @param {Function} handler Function to call in response to given event
  89779. * @memberOf mitt
  89780. */
  89781. on: function on(type , handler ) {
  89782. (all[type] || (all[type] = [])).push(handler);
  89783. },
  89784. /**
  89785. * Remove an event handler for the given type.
  89786. *
  89787. * @param {String} type Type of event to unregister `handler` from, or `"*"`
  89788. * @param {Function} handler Handler function to remove
  89789. * @memberOf mitt
  89790. */
  89791. off: function off(type , handler ) {
  89792. if (all[type]) {
  89793. all[type].splice(all[type].indexOf(handler) >>> 0, 1);
  89794. }
  89795. },
  89796. /**
  89797. * Invoke all handlers for the given type.
  89798. * If present, `"*"` handlers are invoked after type-matched handlers.
  89799. *
  89800. * @param {String} type The event type to invoke
  89801. * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
  89802. * @memberof mitt
  89803. */
  89804. emit: function emit(type , evt ) {
  89805. (all[type] || []).map(function (handler) { handler(evt); });
  89806. (all['*'] || []).map(function (handler) { handler(type, evt); });
  89807. }
  89808. };
  89809. }
  89810. var namespaces_1 = createCommonjsModule(function (module, exports) {
  89811. var namespaces = {
  89812. svg: {
  89813. name: 'xmlns',
  89814. uri: 'http://www.w3.org/2000/svg'
  89815. },
  89816. xlink: {
  89817. name: 'xmlns:xlink',
  89818. uri: 'http://www.w3.org/1999/xlink'
  89819. }
  89820. };
  89821. exports.default = namespaces;
  89822. module.exports = exports.default;
  89823. });
  89824. /**
  89825. * @param {Object} attrs
  89826. * @return {string}
  89827. */
  89828. var objectToAttrsString = function (attrs) {
  89829. return Object.keys(attrs).map(function (attr) {
  89830. var value = attrs[attr].toString().replace(/"/g, '&quot;');
  89831. return (attr + "=\"" + value + "\"");
  89832. }).join(' ');
  89833. };
  89834. var svg = namespaces_1.svg;
  89835. var xlink = namespaces_1.xlink;
  89836. var defaultAttrs = {};
  89837. defaultAttrs[svg.name] = svg.uri;
  89838. defaultAttrs[xlink.name] = xlink.uri;
  89839. /**
  89840. * @param {string} [content]
  89841. * @param {Object} [attributes]
  89842. * @return {string}
  89843. */
  89844. var wrapInSvgString = function (content, attributes) {
  89845. if ( content === void 0 ) content = '';
  89846. var attrs = deepmerge(defaultAttrs, attributes || {});
  89847. var attrsRendered = objectToAttrsString(attrs);
  89848. return ("<svg " + attrsRendered + ">" + content + "</svg>");
  89849. };
  89850. var svg$1 = namespaces_1.svg;
  89851. var xlink$1 = namespaces_1.xlink;
  89852. var defaultConfig = {
  89853. attrs: ( obj = {
  89854. style: ['position: absolute', 'width: 0', 'height: 0'].join('; '),
  89855. 'aria-hidden': 'true'
  89856. }, obj[svg$1.name] = svg$1.uri, obj[xlink$1.name] = xlink$1.uri, obj )
  89857. };
  89858. var obj;
  89859. var Sprite = function Sprite(config) {
  89860. this.config = deepmerge(defaultConfig, config || {});
  89861. this.symbols = [];
  89862. };
  89863. /**
  89864. * Add new symbol. If symbol with the same id exists it will be replaced.
  89865. * @param {SpriteSymbol} symbol
  89866. * @return {boolean} `true` - symbol was added, `false` - replaced
  89867. */
  89868. Sprite.prototype.add = function add (symbol) {
  89869. var ref = this;
  89870. var symbols = ref.symbols;
  89871. var existing = this.find(symbol.id);
  89872. if (existing) {
  89873. symbols[symbols.indexOf(existing)] = symbol;
  89874. return false;
  89875. }
  89876. symbols.push(symbol);
  89877. return true;
  89878. };
  89879. /**
  89880. * Remove symbol & destroy it
  89881. * @param {string} id
  89882. * @return {boolean} `true` - symbol was found & successfully destroyed, `false` - otherwise
  89883. */
  89884. Sprite.prototype.remove = function remove (id) {
  89885. var ref = this;
  89886. var symbols = ref.symbols;
  89887. var symbol = this.find(id);
  89888. if (symbol) {
  89889. symbols.splice(symbols.indexOf(symbol), 1);
  89890. symbol.destroy();
  89891. return true;
  89892. }
  89893. return false;
  89894. };
  89895. /**
  89896. * @param {string} id
  89897. * @return {SpriteSymbol|null}
  89898. */
  89899. Sprite.prototype.find = function find (id) {
  89900. return this.symbols.filter(function (s) { return s.id === id; })[0] || null;
  89901. };
  89902. /**
  89903. * @param {string} id
  89904. * @return {boolean}
  89905. */
  89906. Sprite.prototype.has = function has (id) {
  89907. return this.find(id) !== null;
  89908. };
  89909. /**
  89910. * @return {string}
  89911. */
  89912. Sprite.prototype.stringify = function stringify () {
  89913. var ref = this.config;
  89914. var attrs = ref.attrs;
  89915. var stringifiedSymbols = this.symbols.map(function (s) { return s.stringify(); }).join('');
  89916. return wrapInSvgString(stringifiedSymbols, attrs);
  89917. };
  89918. /**
  89919. * @return {string}
  89920. */
  89921. Sprite.prototype.toString = function toString () {
  89922. return this.stringify();
  89923. };
  89924. Sprite.prototype.destroy = function destroy () {
  89925. this.symbols.forEach(function (s) { return s.destroy(); });
  89926. };
  89927. var SpriteSymbol = function SpriteSymbol(ref) {
  89928. var id = ref.id;
  89929. var viewBox = ref.viewBox;
  89930. var content = ref.content;
  89931. this.id = id;
  89932. this.viewBox = viewBox;
  89933. this.content = content;
  89934. };
  89935. /**
  89936. * @return {string}
  89937. */
  89938. SpriteSymbol.prototype.stringify = function stringify () {
  89939. return this.content;
  89940. };
  89941. /**
  89942. * @return {string}
  89943. */
  89944. SpriteSymbol.prototype.toString = function toString () {
  89945. return this.stringify();
  89946. };
  89947. SpriteSymbol.prototype.destroy = function destroy () {
  89948. var this$1 = this;
  89949. ['id', 'viewBox', 'content'].forEach(function (prop) { return delete this$1[prop]; });
  89950. };
  89951. /**
  89952. * @param {string} content
  89953. * @return {Element}
  89954. */
  89955. var parse = function (content) {
  89956. var hasImportNode = !!document.importNode;
  89957. var doc = new DOMParser().parseFromString(content, 'image/svg+xml').documentElement;
  89958. /**
  89959. * Fix for browser which are throwing WrongDocumentError
  89960. * if you insert an element which is not part of the document
  89961. * @see http://stackoverflow.com/a/7986519/4624403
  89962. */
  89963. if (hasImportNode) {
  89964. return document.importNode(doc, true);
  89965. }
  89966. return doc;
  89967. };
  89968. var BrowserSpriteSymbol = (function (SpriteSymbol$$1) {
  89969. function BrowserSpriteSymbol () {
  89970. SpriteSymbol$$1.apply(this, arguments);
  89971. }
  89972. if ( SpriteSymbol$$1 ) BrowserSpriteSymbol.__proto__ = SpriteSymbol$$1;
  89973. BrowserSpriteSymbol.prototype = Object.create( SpriteSymbol$$1 && SpriteSymbol$$1.prototype );
  89974. BrowserSpriteSymbol.prototype.constructor = BrowserSpriteSymbol;
  89975. var prototypeAccessors = { isMounted: {} };
  89976. prototypeAccessors.isMounted.get = function () {
  89977. return !!this.node;
  89978. };
  89979. /**
  89980. * @param {Element} node
  89981. * @return {BrowserSpriteSymbol}
  89982. */
  89983. BrowserSpriteSymbol.createFromExistingNode = function createFromExistingNode (node) {
  89984. return new BrowserSpriteSymbol({
  89985. id: node.getAttribute('id'),
  89986. viewBox: node.getAttribute('viewBox'),
  89987. content: node.outerHTML
  89988. });
  89989. };
  89990. BrowserSpriteSymbol.prototype.destroy = function destroy () {
  89991. if (this.isMounted) {
  89992. this.unmount();
  89993. }
  89994. SpriteSymbol$$1.prototype.destroy.call(this);
  89995. };
  89996. /**
  89997. * @param {Element|string} target
  89998. * @return {Element}
  89999. */
  90000. BrowserSpriteSymbol.prototype.mount = function mount (target) {
  90001. if (this.isMounted) {
  90002. return this.node;
  90003. }
  90004. var mountTarget = typeof target === 'string' ? document.querySelector(target) : target;
  90005. var node = this.render();
  90006. this.node = node;
  90007. mountTarget.appendChild(node);
  90008. return node;
  90009. };
  90010. /**
  90011. * @return {Element}
  90012. */
  90013. BrowserSpriteSymbol.prototype.render = function render () {
  90014. var content = this.stringify();
  90015. return parse(wrapInSvgString(content)).childNodes[0];
  90016. };
  90017. BrowserSpriteSymbol.prototype.unmount = function unmount () {
  90018. this.node.parentNode.removeChild(this.node);
  90019. };
  90020. Object.defineProperties( BrowserSpriteSymbol.prototype, prototypeAccessors );
  90021. return BrowserSpriteSymbol;
  90022. }(SpriteSymbol));
  90023. var defaultConfig$1 = {
  90024. /**
  90025. * Should following options be automatically configured:
  90026. * - `syncUrlsWithBaseTag`
  90027. * - `locationChangeAngularEmitter`
  90028. * - `moveGradientsOutsideSymbol`
  90029. * @type {boolean}
  90030. */
  90031. autoConfigure: true,
  90032. /**
  90033. * Default mounting selector
  90034. * @type {string}
  90035. */
  90036. mountTo: 'body',
  90037. /**
  90038. * Fix disappearing SVG elements when <base href> exists.
  90039. * Executes when sprite mounted.
  90040. * @see http://stackoverflow.com/a/18265336/796152
  90041. * @see https://github.com/everdimension/angular-svg-base-fix
  90042. * @see https://github.com/angular/angular.js/issues/8934#issuecomment-56568466
  90043. * @type {boolean}
  90044. */
  90045. syncUrlsWithBaseTag: false,
  90046. /**
  90047. * Should sprite listen custom location change event
  90048. * @type {boolean}
  90049. */
  90050. listenLocationChangeEvent: true,
  90051. /**
  90052. * Custom window event name which should be emitted to update sprite urls
  90053. * @type {string}
  90054. */
  90055. locationChangeEvent: 'locationChange',
  90056. /**
  90057. * Emit location change event in Angular automatically
  90058. * @type {boolean}
  90059. */
  90060. locationChangeAngularEmitter: false,
  90061. /**
  90062. * Selector to find symbols usages when updating sprite urls
  90063. * @type {string}
  90064. */
  90065. usagesToUpdate: 'use[*|href]',
  90066. /**
  90067. * Fix Firefox bug when gradients and patterns don't work if they are within a symbol.
  90068. * Executes when sprite is rendered, but not mounted.
  90069. * @see https://bugzilla.mozilla.org/show_bug.cgi?id=306674
  90070. * @see https://bugzilla.mozilla.org/show_bug.cgi?id=353575
  90071. * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1235364
  90072. * @type {boolean}
  90073. */
  90074. moveGradientsOutsideSymbol: false
  90075. };
  90076. /**
  90077. * @param {*} arrayLike
  90078. * @return {Array}
  90079. */
  90080. var arrayFrom = function (arrayLike) {
  90081. return Array.prototype.slice.call(arrayLike, 0);
  90082. };
  90083. var browser = {
  90084. isChrome: function () { return /chrome/i.test(navigator.userAgent); },
  90085. isFirefox: function () { return /firefox/i.test(navigator.userAgent); },
  90086. // https://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
  90087. isIE: function () { return /msie/i.test(navigator.userAgent) || /trident/i.test(navigator.userAgent); },
  90088. isEdge: function () { return /edge/i.test(navigator.userAgent); }
  90089. };
  90090. /**
  90091. * @param {string} name
  90092. * @param {*} data
  90093. */
  90094. var dispatchEvent = function (name, data) {
  90095. var event = document.createEvent('CustomEvent');
  90096. event.initCustomEvent(name, false, false, data);
  90097. window.dispatchEvent(event);
  90098. };
  90099. /**
  90100. * IE doesn't evaluate <style> tags in SVGs that are dynamically added to the page.
  90101. * This trick will trigger IE to read and use any existing SVG <style> tags.
  90102. * @see https://github.com/iconic/SVGInjector/issues/23
  90103. * @see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/
  90104. *
  90105. * @param {Element} node DOM Element to search <style> tags in
  90106. * @return {Array<HTMLStyleElement>}
  90107. */
  90108. var evalStylesIEWorkaround = function (node) {
  90109. var updatedNodes = [];
  90110. arrayFrom(node.querySelectorAll('style'))
  90111. .forEach(function (style) {
  90112. style.textContent += '';
  90113. updatedNodes.push(style);
  90114. });
  90115. return updatedNodes;
  90116. };
  90117. /**
  90118. * @param {string} [url] If not provided - current URL will be used
  90119. * @return {string}
  90120. */
  90121. var getUrlWithoutFragment = function (url) {
  90122. return (url || window.location.href).split('#')[0];
  90123. };
  90124. /* global angular */
  90125. /**
  90126. * @param {string} eventName
  90127. */
  90128. var locationChangeAngularEmitter = function (eventName) {
  90129. angular.module('ng').run(['$rootScope', function ($rootScope) {
  90130. $rootScope.$on('$locationChangeSuccess', function (e, newUrl, oldUrl) {
  90131. dispatchEvent(eventName, { oldUrl: oldUrl, newUrl: newUrl });
  90132. });
  90133. }]);
  90134. };
  90135. var defaultSelector = 'linearGradient, radialGradient, pattern, mask, clipPath';
  90136. /**
  90137. * @param {Element} svg
  90138. * @param {string} [selector]
  90139. * @return {Element}
  90140. */
  90141. var moveGradientsOutsideSymbol = function (svg, selector) {
  90142. if ( selector === void 0 ) selector = defaultSelector;
  90143. arrayFrom(svg.querySelectorAll('symbol')).forEach(function (symbol) {
  90144. arrayFrom(symbol.querySelectorAll(selector)).forEach(function (node) {
  90145. symbol.parentNode.insertBefore(node, symbol);
  90146. });
  90147. });
  90148. return svg;
  90149. };
  90150. /**
  90151. * @param {NodeList} nodes
  90152. * @param {Function} [matcher]
  90153. * @return {Attr[]}
  90154. */
  90155. function selectAttributes(nodes, matcher) {
  90156. var attrs = arrayFrom(nodes).reduce(function (acc, node) {
  90157. if (!node.attributes) {
  90158. return acc;
  90159. }
  90160. var arrayfied = arrayFrom(node.attributes);
  90161. var matched = matcher ? arrayfied.filter(matcher) : arrayfied;
  90162. return acc.concat(matched);
  90163. }, []);
  90164. return attrs;
  90165. }
  90166. /**
  90167. * @param {NodeList|Node} nodes
  90168. * @param {boolean} [clone=true]
  90169. * @return {string}
  90170. */
  90171. var xLinkNS = namespaces_1.xlink.uri;
  90172. var xLinkAttrName = 'xlink:href';
  90173. // eslint-disable-next-line no-useless-escape
  90174. var specialUrlCharsPattern = /[{}|\\\^\[\]`"<>]/g;
  90175. function encoder(url) {
  90176. return url.replace(specialUrlCharsPattern, function (match) {
  90177. return ("%" + (match[0].charCodeAt(0).toString(16).toUpperCase()));
  90178. });
  90179. }
  90180. function escapeRegExp(str) {
  90181. return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
  90182. }
  90183. /**
  90184. * @param {NodeList} nodes
  90185. * @param {string} startsWith
  90186. * @param {string} replaceWith
  90187. * @return {NodeList}
  90188. */
  90189. function updateReferences(nodes, startsWith, replaceWith) {
  90190. arrayFrom(nodes).forEach(function (node) {
  90191. var href = node.getAttribute(xLinkAttrName);
  90192. if (href && href.indexOf(startsWith) === 0) {
  90193. var newUrl = href.replace(startsWith, replaceWith);
  90194. node.setAttributeNS(xLinkNS, xLinkAttrName, newUrl);
  90195. }
  90196. });
  90197. return nodes;
  90198. }
  90199. /**
  90200. * List of SVG attributes to update url() target in them
  90201. */
  90202. var attList = [
  90203. 'clipPath',
  90204. 'colorProfile',
  90205. 'src',
  90206. 'cursor',
  90207. 'fill',
  90208. 'filter',
  90209. 'marker',
  90210. 'markerStart',
  90211. 'markerMid',
  90212. 'markerEnd',
  90213. 'mask',
  90214. 'stroke',
  90215. 'style'
  90216. ];
  90217. var attSelector = attList.map(function (attr) { return ("[" + attr + "]"); }).join(',');
  90218. /**
  90219. * Update URLs in svg image (like `fill="url(...)"`) and update referencing elements
  90220. * @param {Element} svg
  90221. * @param {NodeList} references
  90222. * @param {string|RegExp} startsWith
  90223. * @param {string} replaceWith
  90224. * @return {void}
  90225. *
  90226. * @example
  90227. * const sprite = document.querySelector('svg.sprite');
  90228. * const usages = document.querySelectorAll('use');
  90229. * updateUrls(sprite, usages, '#', 'prefix#');
  90230. */
  90231. var updateUrls = function (svg, references, startsWith, replaceWith) {
  90232. var startsWithEncoded = encoder(startsWith);
  90233. var replaceWithEncoded = encoder(replaceWith);
  90234. var nodes = svg.querySelectorAll(attSelector);
  90235. var attrs = selectAttributes(nodes, function (ref) {
  90236. var localName = ref.localName;
  90237. var value = ref.value;
  90238. return attList.indexOf(localName) !== -1 && value.indexOf(("url(" + startsWithEncoded)) !== -1;
  90239. });
  90240. attrs.forEach(function (attr) { return attr.value = attr.value.replace(new RegExp(escapeRegExp(startsWithEncoded), 'g'), replaceWithEncoded); });
  90241. updateReferences(references, startsWithEncoded, replaceWithEncoded);
  90242. };
  90243. /**
  90244. * Internal emitter events
  90245. * @enum
  90246. * @private
  90247. */
  90248. var Events = {
  90249. MOUNT: 'mount',
  90250. SYMBOL_MOUNT: 'symbol_mount'
  90251. };
  90252. var BrowserSprite = (function (Sprite$$1) {
  90253. function BrowserSprite(cfg) {
  90254. var this$1 = this;
  90255. if ( cfg === void 0 ) cfg = {};
  90256. Sprite$$1.call(this, deepmerge(defaultConfig$1, cfg));
  90257. var emitter = mitt();
  90258. this._emitter = emitter;
  90259. this.node = null;
  90260. var ref = this;
  90261. var config = ref.config;
  90262. if (config.autoConfigure) {
  90263. this._autoConfigure(cfg);
  90264. }
  90265. if (config.syncUrlsWithBaseTag) {
  90266. var baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');
  90267. emitter.on(Events.MOUNT, function () { return this$1.updateUrls('#', baseUrl); });
  90268. }
  90269. var handleLocationChange = this._handleLocationChange.bind(this);
  90270. this._handleLocationChange = handleLocationChange;
  90271. // Provide way to update sprite urls externally via dispatching custom window event
  90272. if (config.listenLocationChangeEvent) {
  90273. window.addEventListener(config.locationChangeEvent, handleLocationChange);
  90274. }
  90275. // Emit location change event in Angular automatically
  90276. if (config.locationChangeAngularEmitter) {
  90277. locationChangeAngularEmitter(config.locationChangeEvent);
  90278. }
  90279. // After sprite mounted
  90280. emitter.on(Events.MOUNT, function (spriteNode) {
  90281. if (config.moveGradientsOutsideSymbol) {
  90282. moveGradientsOutsideSymbol(spriteNode);
  90283. }
  90284. });
  90285. // After symbol mounted into sprite
  90286. emitter.on(Events.SYMBOL_MOUNT, function (symbolNode) {
  90287. if (config.moveGradientsOutsideSymbol) {
  90288. moveGradientsOutsideSymbol(symbolNode.parentNode);
  90289. }
  90290. if (browser.isIE() || browser.isEdge()) {
  90291. evalStylesIEWorkaround(symbolNode);
  90292. }
  90293. });
  90294. }
  90295. if ( Sprite$$1 ) BrowserSprite.__proto__ = Sprite$$1;
  90296. BrowserSprite.prototype = Object.create( Sprite$$1 && Sprite$$1.prototype );
  90297. BrowserSprite.prototype.constructor = BrowserSprite;
  90298. var prototypeAccessors = { isMounted: {} };
  90299. /**
  90300. * @return {boolean}
  90301. */
  90302. prototypeAccessors.isMounted.get = function () {
  90303. return !!this.node;
  90304. };
  90305. /**
  90306. * Automatically configure following options
  90307. * - `syncUrlsWithBaseTag`
  90308. * - `locationChangeAngularEmitter`
  90309. * - `moveGradientsOutsideSymbol`
  90310. * @param {Object} cfg
  90311. * @private
  90312. */
  90313. BrowserSprite.prototype._autoConfigure = function _autoConfigure (cfg) {
  90314. var ref = this;
  90315. var config = ref.config;
  90316. if (typeof cfg.syncUrlsWithBaseTag === 'undefined') {
  90317. config.syncUrlsWithBaseTag = typeof document.getElementsByTagName('base')[0] !== 'undefined';
  90318. }
  90319. if (typeof cfg.locationChangeAngularEmitter === 'undefined') {
  90320. config.locationChangeAngularEmitter = typeof window.angular !== 'undefined';
  90321. }
  90322. if (typeof cfg.moveGradientsOutsideSymbol === 'undefined') {
  90323. config.moveGradientsOutsideSymbol = browser.isFirefox();
  90324. }
  90325. };
  90326. /**
  90327. * @param {Event} event
  90328. * @param {Object} event.detail
  90329. * @param {string} event.detail.oldUrl
  90330. * @param {string} event.detail.newUrl
  90331. * @private
  90332. */
  90333. BrowserSprite.prototype._handleLocationChange = function _handleLocationChange (event) {
  90334. var ref = event.detail;
  90335. var oldUrl = ref.oldUrl;
  90336. var newUrl = ref.newUrl;
  90337. this.updateUrls(oldUrl, newUrl);
  90338. };
  90339. /**
  90340. * Add new symbol. If symbol with the same id exists it will be replaced.
  90341. * If sprite already mounted - `symbol.mount(sprite.node)` will be called.
  90342. * @fires Events#SYMBOL_MOUNT
  90343. * @param {BrowserSpriteSymbol} symbol
  90344. * @return {boolean} `true` - symbol was added, `false` - replaced
  90345. */
  90346. BrowserSprite.prototype.add = function add (symbol) {
  90347. var sprite = this;
  90348. var isNewSymbol = Sprite$$1.prototype.add.call(this, symbol);
  90349. if (this.isMounted && isNewSymbol) {
  90350. symbol.mount(sprite.node);
  90351. this._emitter.emit(Events.SYMBOL_MOUNT, symbol.node);
  90352. }
  90353. return isNewSymbol;
  90354. };
  90355. /**
  90356. * Attach to existing DOM node
  90357. * @param {string|Element} target
  90358. * @return {Element|null} attached DOM Element. null if node to attach not found.
  90359. */
  90360. BrowserSprite.prototype.attach = function attach (target) {
  90361. var this$1 = this;
  90362. var sprite = this;
  90363. if (sprite.isMounted) {
  90364. return sprite.node;
  90365. }
  90366. /** @type Element */
  90367. var node = typeof target === 'string' ? document.querySelector(target) : target;
  90368. sprite.node = node;
  90369. // Already added symbols needs to be mounted
  90370. this.symbols.forEach(function (symbol) {
  90371. symbol.mount(sprite.node);
  90372. this$1._emitter.emit(Events.SYMBOL_MOUNT, symbol.node);
  90373. });
  90374. // Create symbols from existing DOM nodes, add and mount them
  90375. arrayFrom(node.querySelectorAll('symbol'))
  90376. .forEach(function (symbolNode) {
  90377. var symbol = BrowserSpriteSymbol.createFromExistingNode(symbolNode);
  90378. symbol.node = symbolNode; // hack to prevent symbol mounting to sprite when adding
  90379. sprite.add(symbol);
  90380. });
  90381. this._emitter.emit(Events.MOUNT, node);
  90382. return node;
  90383. };
  90384. BrowserSprite.prototype.destroy = function destroy () {
  90385. var ref = this;
  90386. var config = ref.config;
  90387. var symbols = ref.symbols;
  90388. var _emitter = ref._emitter;
  90389. symbols.forEach(function (s) { return s.destroy(); });
  90390. _emitter.off('*');
  90391. window.removeEventListener(config.locationChangeEvent, this._handleLocationChange);
  90392. if (this.isMounted) {
  90393. this.unmount();
  90394. }
  90395. };
  90396. /**
  90397. * @fires Events#MOUNT
  90398. * @param {string|Element} [target]
  90399. * @param {boolean} [prepend=false]
  90400. * @return {Element|null} rendered sprite node. null if mount node not found.
  90401. */
  90402. BrowserSprite.prototype.mount = function mount (target, prepend) {
  90403. if ( target === void 0 ) target = this.config.mountTo;
  90404. if ( prepend === void 0 ) prepend = false;
  90405. var sprite = this;
  90406. if (sprite.isMounted) {
  90407. return sprite.node;
  90408. }
  90409. var mountNode = typeof target === 'string' ? document.querySelector(target) : target;
  90410. var node = sprite.render();
  90411. this.node = node;
  90412. if (prepend && mountNode.childNodes[0]) {
  90413. mountNode.insertBefore(node, mountNode.childNodes[0]);
  90414. } else {
  90415. mountNode.appendChild(node);
  90416. }
  90417. this._emitter.emit(Events.MOUNT, node);
  90418. return node;
  90419. };
  90420. /**
  90421. * @return {Element}
  90422. */
  90423. BrowserSprite.prototype.render = function render () {
  90424. return parse(this.stringify());
  90425. };
  90426. /**
  90427. * Detach sprite from the DOM
  90428. */
  90429. BrowserSprite.prototype.unmount = function unmount () {
  90430. this.node.parentNode.removeChild(this.node);
  90431. };
  90432. /**
  90433. * Update URLs in sprite and usage elements
  90434. * @param {string} oldUrl
  90435. * @param {string} newUrl
  90436. * @return {boolean} `true` - URLs was updated, `false` - sprite is not mounted
  90437. */
  90438. BrowserSprite.prototype.updateUrls = function updateUrls$1 (oldUrl, newUrl) {
  90439. if (!this.isMounted) {
  90440. return false;
  90441. }
  90442. var usages = document.querySelectorAll(this.config.usagesToUpdate);
  90443. updateUrls(
  90444. this.node,
  90445. usages,
  90446. ((getUrlWithoutFragment(oldUrl)) + "#"),
  90447. ((getUrlWithoutFragment(newUrl)) + "#")
  90448. );
  90449. return true;
  90450. };
  90451. Object.defineProperties( BrowserSprite.prototype, prototypeAccessors );
  90452. return BrowserSprite;
  90453. }(Sprite));
  90454. var ready$1 = createCommonjsModule(function (module) {
  90455. /*!
  90456. * domready (c) Dustin Diaz 2014 - License MIT
  90457. */
  90458. !function (name, definition) {
  90459. { module.exports = definition(); }
  90460. }('domready', function () {
  90461. var fns = [], listener
  90462. , doc = document
  90463. , hack = doc.documentElement.doScroll
  90464. , domContentLoaded = 'DOMContentLoaded'
  90465. , loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);
  90466. if (!loaded)
  90467. { doc.addEventListener(domContentLoaded, listener = function () {
  90468. doc.removeEventListener(domContentLoaded, listener);
  90469. loaded = 1;
  90470. while (listener = fns.shift()) { listener(); }
  90471. }); }
  90472. return function (fn) {
  90473. loaded ? setTimeout(fn, 0) : fns.push(fn);
  90474. }
  90475. });
  90476. });
  90477. var spriteNodeId = '__SVG_SPRITE_NODE__';
  90478. var spriteGlobalVarName = '__SVG_SPRITE__';
  90479. var isSpriteExists = !!window[spriteGlobalVarName];
  90480. // eslint-disable-next-line import/no-mutable-exports
  90481. var sprite;
  90482. if (isSpriteExists) {
  90483. sprite = window[spriteGlobalVarName];
  90484. } else {
  90485. sprite = new BrowserSprite({
  90486. attrs: {
  90487. id: spriteNodeId,
  90488. 'aria-hidden': 'true'
  90489. }
  90490. });
  90491. window[spriteGlobalVarName] = sprite;
  90492. }
  90493. var loadSprite = function () {
  90494. /**
  90495. * Check for page already contains sprite node
  90496. * If found - attach to and reuse it's content
  90497. * If not - render and mount the new sprite
  90498. */
  90499. var existing = document.getElementById(spriteNodeId);
  90500. if (existing) {
  90501. sprite.attach(existing);
  90502. } else {
  90503. sprite.mount(document.body, true);
  90504. }
  90505. };
  90506. if (document.body) {
  90507. loadSprite();
  90508. } else {
  90509. ready$1(loadSprite);
  90510. }
  90511. var sprite$1 = sprite;
  90512. return sprite$1;
  90513. })));
  90514. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  90515. /***/ }),
  90516. /***/ "./node_modules/_swiper@4.5.1@swiper/dist/css/swiper.min.css":
  90517. /*!*******************************************************************!*\
  90518. !*** ./node_modules/_swiper@4.5.1@swiper/dist/css/swiper.min.css ***!
  90519. \*******************************************************************/
  90520. /*! no static exports found */
  90521. /***/ (function(module, exports, __webpack_require__) {
  90522. // style-loader: Adds some css to the DOM by adding a <style> tag
  90523. // load the styles
  90524. var content = __webpack_require__(/*! !../../../_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!../../../_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./swiper.min.css */ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_swiper@4.5.1@swiper/dist/css/swiper.min.css");
  90525. if(content.__esModule) content = content.default;
  90526. if(typeof content === 'string') content = [[module.i, content, '']];
  90527. if(content.locals) module.exports = content.locals;
  90528. // add the styles to the DOM
  90529. var add = __webpack_require__(/*! ../../../_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js */ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js").default
  90530. var update = add("03ef3ec4", content, false, {"sourceMap":true,"shadowMode":false});
  90531. // Hot Module Replacement
  90532. if(false) {}
  90533. /***/ }),
  90534. /***/ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/debounce.js":
  90535. /*!*****************************************************************************!*\
  90536. !*** ./node_modules/_throttle-debounce@1.1.0@throttle-debounce/debounce.js ***!
  90537. \*****************************************************************************/
  90538. /*! no static exports found */
  90539. /***/ (function(module, exports, __webpack_require__) {
  90540. /* eslint-disable no-undefined */
  90541. var throttle = __webpack_require__(/*! ./throttle */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/throttle.js");
  90542. /**
  90543. * Debounce execution of a function. Debouncing, unlike throttling,
  90544. * guarantees that a function is only executed a single time, either at the
  90545. * very beginning of a series of calls, or at the very end.
  90546. *
  90547. * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
  90548. * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
  90549. * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
  90550. * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
  90551. * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
  90552. * to `callback` when the debounced-function is executed.
  90553. *
  90554. * @return {Function} A new, debounced function.
  90555. */
  90556. module.exports = function ( delay, atBegin, callback ) {
  90557. return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
  90558. };
  90559. /***/ }),
  90560. /***/ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/index.js":
  90561. /*!**************************************************************************!*\
  90562. !*** ./node_modules/_throttle-debounce@1.1.0@throttle-debounce/index.js ***!
  90563. \**************************************************************************/
  90564. /*! no static exports found */
  90565. /***/ (function(module, exports, __webpack_require__) {
  90566. var throttle = __webpack_require__(/*! ./throttle */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/throttle.js");
  90567. var debounce = __webpack_require__(/*! ./debounce */ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/debounce.js");
  90568. module.exports = {
  90569. throttle: throttle,
  90570. debounce: debounce
  90571. };
  90572. /***/ }),
  90573. /***/ "./node_modules/_throttle-debounce@1.1.0@throttle-debounce/throttle.js":
  90574. /*!*****************************************************************************!*\
  90575. !*** ./node_modules/_throttle-debounce@1.1.0@throttle-debounce/throttle.js ***!
  90576. \*****************************************************************************/
  90577. /*! no static exports found */
  90578. /***/ (function(module, exports) {
  90579. /* eslint-disable no-undefined,no-param-reassign,no-shadow */
  90580. /**
  90581. * Throttle execution of a function. Especially useful for rate limiting
  90582. * execution of handlers on events like resize and scroll.
  90583. *
  90584. * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
  90585. * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the
  90586. * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time
  90587. * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,
  90588. * the internal counter is reset)
  90589. * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
  90590. * to `callback` when the throttled-function is executed.
  90591. * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
  90592. * schedule `callback` to execute after `delay` ms.
  90593. *
  90594. * @return {Function} A new, throttled, function.
  90595. */
  90596. module.exports = function ( delay, noTrailing, callback, debounceMode ) {
  90597. // After wrapper has stopped being called, this timeout ensures that
  90598. // `callback` is executed at the proper times in `throttle` and `end`
  90599. // debounce modes.
  90600. var timeoutID;
  90601. // Keep track of the last time `callback` was executed.
  90602. var lastExec = 0;
  90603. // `noTrailing` defaults to falsy.
  90604. if ( typeof noTrailing !== 'boolean' ) {
  90605. debounceMode = callback;
  90606. callback = noTrailing;
  90607. noTrailing = undefined;
  90608. }
  90609. // The `wrapper` function encapsulates all of the throttling / debouncing
  90610. // functionality and when executed will limit the rate at which `callback`
  90611. // is executed.
  90612. function wrapper () {
  90613. var self = this;
  90614. var elapsed = Number(new Date()) - lastExec;
  90615. var args = arguments;
  90616. // Execute `callback` and update the `lastExec` timestamp.
  90617. function exec () {
  90618. lastExec = Number(new Date());
  90619. callback.apply(self, args);
  90620. }
  90621. // If `debounceMode` is true (at begin) this is used to clear the flag
  90622. // to allow future `callback` executions.
  90623. function clear () {
  90624. timeoutID = undefined;
  90625. }
  90626. if ( debounceMode && !timeoutID ) {
  90627. // Since `wrapper` is being called for the first time and
  90628. // `debounceMode` is true (at begin), execute `callback`.
  90629. exec();
  90630. }
  90631. // Clear any existing timeout.
  90632. if ( timeoutID ) {
  90633. clearTimeout(timeoutID);
  90634. }
  90635. if ( debounceMode === undefined && elapsed > delay ) {
  90636. // In throttle mode, if `delay` time has been exceeded, execute
  90637. // `callback`.
  90638. exec();
  90639. } else if ( noTrailing !== true ) {
  90640. // In trailing throttle mode, since `delay` time has not been
  90641. // exceeded, schedule `callback` to execute `delay` ms after most
  90642. // recent execution.
  90643. //
  90644. // If `debounceMode` is true (at begin), schedule `clear` to execute
  90645. // after `delay` ms.
  90646. //
  90647. // If `debounceMode` is false (at end), schedule `callback` to
  90648. // execute after `delay` ms.
  90649. timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
  90650. }
  90651. }
  90652. // Return the wrapper function.
  90653. return wrapper;
  90654. };
  90655. /***/ }),
  90656. /***/ "./node_modules/_tinymce@5.10.5@tinymce/tinymce.js":
  90657. /*!*********************************************************!*\
  90658. !*** ./node_modules/_tinymce@5.10.5@tinymce/tinymce.js ***!
  90659. \*********************************************************/
  90660. /*! no static exports found */
  90661. /***/ (function(module, exports, __webpack_require__) {
  90662. /* WEBPACK VAR INJECTION */(function(global) {/**
  90663. * Copyright (c) Tiny Technologies, Inc. All rights reserved.
  90664. * Licensed under the LGPL or a commercial license.
  90665. * For LGPL see License.txt in the project root for license information.
  90666. * For commercial licenses see https://www.tiny.cloud/
  90667. *
  90668. * Version: 5.10.5 (2022-05-25)
  90669. */
  90670. (function () {
  90671. 'use strict';
  90672. var typeOf$1 = function (x) {
  90673. if (x === null) {
  90674. return 'null';
  90675. }
  90676. if (x === undefined) {
  90677. return 'undefined';
  90678. }
  90679. var t = typeof x;
  90680. if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
  90681. return 'array';
  90682. }
  90683. if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
  90684. return 'string';
  90685. }
  90686. return t;
  90687. };
  90688. var isEquatableType = function (x) {
  90689. return [
  90690. 'undefined',
  90691. 'boolean',
  90692. 'number',
  90693. 'string',
  90694. 'function',
  90695. 'xml',
  90696. 'null'
  90697. ].indexOf(x) !== -1;
  90698. };
  90699. var sort$1 = function (xs, compareFn) {
  90700. var clone = Array.prototype.slice.call(xs);
  90701. return clone.sort(compareFn);
  90702. };
  90703. var contramap = function (eqa, f) {
  90704. return eq$2(function (x, y) {
  90705. return eqa.eq(f(x), f(y));
  90706. });
  90707. };
  90708. var eq$2 = function (f) {
  90709. return { eq: f };
  90710. };
  90711. var tripleEq = eq$2(function (x, y) {
  90712. return x === y;
  90713. });
  90714. var eqString = tripleEq;
  90715. var eqArray = function (eqa) {
  90716. return eq$2(function (x, y) {
  90717. if (x.length !== y.length) {
  90718. return false;
  90719. }
  90720. var len = x.length;
  90721. for (var i = 0; i < len; i++) {
  90722. if (!eqa.eq(x[i], y[i])) {
  90723. return false;
  90724. }
  90725. }
  90726. return true;
  90727. });
  90728. };
  90729. var eqSortedArray = function (eqa, compareFn) {
  90730. return contramap(eqArray(eqa), function (xs) {
  90731. return sort$1(xs, compareFn);
  90732. });
  90733. };
  90734. var eqRecord = function (eqa) {
  90735. return eq$2(function (x, y) {
  90736. var kx = Object.keys(x);
  90737. var ky = Object.keys(y);
  90738. if (!eqSortedArray(eqString).eq(kx, ky)) {
  90739. return false;
  90740. }
  90741. var len = kx.length;
  90742. for (var i = 0; i < len; i++) {
  90743. var q = kx[i];
  90744. if (!eqa.eq(x[q], y[q])) {
  90745. return false;
  90746. }
  90747. }
  90748. return true;
  90749. });
  90750. };
  90751. var eqAny = eq$2(function (x, y) {
  90752. if (x === y) {
  90753. return true;
  90754. }
  90755. var tx = typeOf$1(x);
  90756. var ty = typeOf$1(y);
  90757. if (tx !== ty) {
  90758. return false;
  90759. }
  90760. if (isEquatableType(tx)) {
  90761. return x === y;
  90762. } else if (tx === 'array') {
  90763. return eqArray(eqAny).eq(x, y);
  90764. } else if (tx === 'object') {
  90765. return eqRecord(eqAny).eq(x, y);
  90766. }
  90767. return false;
  90768. });
  90769. var typeOf = function (x) {
  90770. var t = typeof x;
  90771. if (x === null) {
  90772. return 'null';
  90773. } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
  90774. return 'array';
  90775. } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
  90776. return 'string';
  90777. } else {
  90778. return t;
  90779. }
  90780. };
  90781. var isType$1 = function (type) {
  90782. return function (value) {
  90783. return typeOf(value) === type;
  90784. };
  90785. };
  90786. var isSimpleType = function (type) {
  90787. return function (value) {
  90788. return typeof value === type;
  90789. };
  90790. };
  90791. var eq$1 = function (t) {
  90792. return function (a) {
  90793. return t === a;
  90794. };
  90795. };
  90796. var isString$1 = isType$1('string');
  90797. var isObject = isType$1('object');
  90798. var isArray$1 = isType$1('array');
  90799. var isNull = eq$1(null);
  90800. var isBoolean = isSimpleType('boolean');
  90801. var isUndefined = eq$1(undefined);
  90802. var isNullable = function (a) {
  90803. return a === null || a === undefined;
  90804. };
  90805. var isNonNullable = function (a) {
  90806. return !isNullable(a);
  90807. };
  90808. var isFunction = isSimpleType('function');
  90809. var isNumber = isSimpleType('number');
  90810. var noop = function () {
  90811. };
  90812. var compose = function (fa, fb) {
  90813. return function () {
  90814. var args = [];
  90815. for (var _i = 0; _i < arguments.length; _i++) {
  90816. args[_i] = arguments[_i];
  90817. }
  90818. return fa(fb.apply(null, args));
  90819. };
  90820. };
  90821. var compose1 = function (fbc, fab) {
  90822. return function (a) {
  90823. return fbc(fab(a));
  90824. };
  90825. };
  90826. var constant = function (value) {
  90827. return function () {
  90828. return value;
  90829. };
  90830. };
  90831. var identity = function (x) {
  90832. return x;
  90833. };
  90834. var tripleEquals = function (a, b) {
  90835. return a === b;
  90836. };
  90837. function curry(fn) {
  90838. var initialArgs = [];
  90839. for (var _i = 1; _i < arguments.length; _i++) {
  90840. initialArgs[_i - 1] = arguments[_i];
  90841. }
  90842. return function () {
  90843. var restArgs = [];
  90844. for (var _i = 0; _i < arguments.length; _i++) {
  90845. restArgs[_i] = arguments[_i];
  90846. }
  90847. var all = initialArgs.concat(restArgs);
  90848. return fn.apply(null, all);
  90849. };
  90850. }
  90851. var not = function (f) {
  90852. return function (t) {
  90853. return !f(t);
  90854. };
  90855. };
  90856. var die = function (msg) {
  90857. return function () {
  90858. throw new Error(msg);
  90859. };
  90860. };
  90861. var apply = function (f) {
  90862. return f();
  90863. };
  90864. var call = function (f) {
  90865. f();
  90866. };
  90867. var never = constant(false);
  90868. var always = constant(true);
  90869. var none = function () {
  90870. return NONE;
  90871. };
  90872. var NONE = function () {
  90873. var call = function (thunk) {
  90874. return thunk();
  90875. };
  90876. var id = identity;
  90877. var me = {
  90878. fold: function (n, _s) {
  90879. return n();
  90880. },
  90881. isSome: never,
  90882. isNone: always,
  90883. getOr: id,
  90884. getOrThunk: call,
  90885. getOrDie: function (msg) {
  90886. throw new Error(msg || 'error: getOrDie called on none.');
  90887. },
  90888. getOrNull: constant(null),
  90889. getOrUndefined: constant(undefined),
  90890. or: id,
  90891. orThunk: call,
  90892. map: none,
  90893. each: noop,
  90894. bind: none,
  90895. exists: never,
  90896. forall: always,
  90897. filter: function () {
  90898. return none();
  90899. },
  90900. toArray: function () {
  90901. return [];
  90902. },
  90903. toString: constant('none()')
  90904. };
  90905. return me;
  90906. }();
  90907. var some = function (a) {
  90908. var constant_a = constant(a);
  90909. var self = function () {
  90910. return me;
  90911. };
  90912. var bind = function (f) {
  90913. return f(a);
  90914. };
  90915. var me = {
  90916. fold: function (n, s) {
  90917. return s(a);
  90918. },
  90919. isSome: always,
  90920. isNone: never,
  90921. getOr: constant_a,
  90922. getOrThunk: constant_a,
  90923. getOrDie: constant_a,
  90924. getOrNull: constant_a,
  90925. getOrUndefined: constant_a,
  90926. or: self,
  90927. orThunk: self,
  90928. map: function (f) {
  90929. return some(f(a));
  90930. },
  90931. each: function (f) {
  90932. f(a);
  90933. },
  90934. bind: bind,
  90935. exists: bind,
  90936. forall: bind,
  90937. filter: function (f) {
  90938. return f(a) ? me : NONE;
  90939. },
  90940. toArray: function () {
  90941. return [a];
  90942. },
  90943. toString: function () {
  90944. return 'some(' + a + ')';
  90945. }
  90946. };
  90947. return me;
  90948. };
  90949. var from$1 = function (value) {
  90950. return value === null || value === undefined ? NONE : some(value);
  90951. };
  90952. var Optional = {
  90953. some: some,
  90954. none: none,
  90955. from: from$1
  90956. };
  90957. var nativeSlice = Array.prototype.slice;
  90958. var nativeIndexOf = Array.prototype.indexOf;
  90959. var nativePush = Array.prototype.push;
  90960. var rawIndexOf = function (ts, t) {
  90961. return nativeIndexOf.call(ts, t);
  90962. };
  90963. var indexOf$2 = function (xs, x) {
  90964. var r = rawIndexOf(xs, x);
  90965. return r === -1 ? Optional.none() : Optional.some(r);
  90966. };
  90967. var contains$3 = function (xs, x) {
  90968. return rawIndexOf(xs, x) > -1;
  90969. };
  90970. var exists = function (xs, pred) {
  90971. for (var i = 0, len = xs.length; i < len; i++) {
  90972. var x = xs[i];
  90973. if (pred(x, i)) {
  90974. return true;
  90975. }
  90976. }
  90977. return false;
  90978. };
  90979. var map$3 = function (xs, f) {
  90980. var len = xs.length;
  90981. var r = new Array(len);
  90982. for (var i = 0; i < len; i++) {
  90983. var x = xs[i];
  90984. r[i] = f(x, i);
  90985. }
  90986. return r;
  90987. };
  90988. var each$k = function (xs, f) {
  90989. for (var i = 0, len = xs.length; i < len; i++) {
  90990. var x = xs[i];
  90991. f(x, i);
  90992. }
  90993. };
  90994. var eachr = function (xs, f) {
  90995. for (var i = xs.length - 1; i >= 0; i--) {
  90996. var x = xs[i];
  90997. f(x, i);
  90998. }
  90999. };
  91000. var partition = function (xs, pred) {
  91001. var pass = [];
  91002. var fail = [];
  91003. for (var i = 0, len = xs.length; i < len; i++) {
  91004. var x = xs[i];
  91005. var arr = pred(x, i) ? pass : fail;
  91006. arr.push(x);
  91007. }
  91008. return {
  91009. pass: pass,
  91010. fail: fail
  91011. };
  91012. };
  91013. var filter$4 = function (xs, pred) {
  91014. var r = [];
  91015. for (var i = 0, len = xs.length; i < len; i++) {
  91016. var x = xs[i];
  91017. if (pred(x, i)) {
  91018. r.push(x);
  91019. }
  91020. }
  91021. return r;
  91022. };
  91023. var foldr = function (xs, f, acc) {
  91024. eachr(xs, function (x, i) {
  91025. acc = f(acc, x, i);
  91026. });
  91027. return acc;
  91028. };
  91029. var foldl = function (xs, f, acc) {
  91030. each$k(xs, function (x, i) {
  91031. acc = f(acc, x, i);
  91032. });
  91033. return acc;
  91034. };
  91035. var findUntil$1 = function (xs, pred, until) {
  91036. for (var i = 0, len = xs.length; i < len; i++) {
  91037. var x = xs[i];
  91038. if (pred(x, i)) {
  91039. return Optional.some(x);
  91040. } else if (until(x, i)) {
  91041. break;
  91042. }
  91043. }
  91044. return Optional.none();
  91045. };
  91046. var find$3 = function (xs, pred) {
  91047. return findUntil$1(xs, pred, never);
  91048. };
  91049. var findIndex$2 = function (xs, pred) {
  91050. for (var i = 0, len = xs.length; i < len; i++) {
  91051. var x = xs[i];
  91052. if (pred(x, i)) {
  91053. return Optional.some(i);
  91054. }
  91055. }
  91056. return Optional.none();
  91057. };
  91058. var flatten = function (xs) {
  91059. var r = [];
  91060. for (var i = 0, len = xs.length; i < len; ++i) {
  91061. if (!isArray$1(xs[i])) {
  91062. throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
  91063. }
  91064. nativePush.apply(r, xs[i]);
  91065. }
  91066. return r;
  91067. };
  91068. var bind = function (xs, f) {
  91069. return flatten(map$3(xs, f));
  91070. };
  91071. var forall = function (xs, pred) {
  91072. for (var i = 0, len = xs.length; i < len; ++i) {
  91073. var x = xs[i];
  91074. if (pred(x, i) !== true) {
  91075. return false;
  91076. }
  91077. }
  91078. return true;
  91079. };
  91080. var reverse = function (xs) {
  91081. var r = nativeSlice.call(xs, 0);
  91082. r.reverse();
  91083. return r;
  91084. };
  91085. var difference = function (a1, a2) {
  91086. return filter$4(a1, function (x) {
  91087. return !contains$3(a2, x);
  91088. });
  91089. };
  91090. var mapToObject = function (xs, f) {
  91091. var r = {};
  91092. for (var i = 0, len = xs.length; i < len; i++) {
  91093. var x = xs[i];
  91094. r[String(x)] = f(x, i);
  91095. }
  91096. return r;
  91097. };
  91098. var sort = function (xs, comparator) {
  91099. var copy = nativeSlice.call(xs, 0);
  91100. copy.sort(comparator);
  91101. return copy;
  91102. };
  91103. var get$a = function (xs, i) {
  91104. return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
  91105. };
  91106. var head = function (xs) {
  91107. return get$a(xs, 0);
  91108. };
  91109. var last$2 = function (xs) {
  91110. return get$a(xs, xs.length - 1);
  91111. };
  91112. var from = isFunction(Array.from) ? Array.from : function (x) {
  91113. return nativeSlice.call(x);
  91114. };
  91115. var findMap = function (arr, f) {
  91116. for (var i = 0; i < arr.length; i++) {
  91117. var r = f(arr[i], i);
  91118. if (r.isSome()) {
  91119. return r;
  91120. }
  91121. }
  91122. return Optional.none();
  91123. };
  91124. var keys = Object.keys;
  91125. var hasOwnProperty$1 = Object.hasOwnProperty;
  91126. var each$j = function (obj, f) {
  91127. var props = keys(obj);
  91128. for (var k = 0, len = props.length; k < len; k++) {
  91129. var i = props[k];
  91130. var x = obj[i];
  91131. f(x, i);
  91132. }
  91133. };
  91134. var map$2 = function (obj, f) {
  91135. return tupleMap(obj, function (x, i) {
  91136. return {
  91137. k: i,
  91138. v: f(x, i)
  91139. };
  91140. });
  91141. };
  91142. var tupleMap = function (obj, f) {
  91143. var r = {};
  91144. each$j(obj, function (x, i) {
  91145. var tuple = f(x, i);
  91146. r[tuple.k] = tuple.v;
  91147. });
  91148. return r;
  91149. };
  91150. var objAcc = function (r) {
  91151. return function (x, i) {
  91152. r[i] = x;
  91153. };
  91154. };
  91155. var internalFilter = function (obj, pred, onTrue, onFalse) {
  91156. var r = {};
  91157. each$j(obj, function (x, i) {
  91158. (pred(x, i) ? onTrue : onFalse)(x, i);
  91159. });
  91160. return r;
  91161. };
  91162. var bifilter = function (obj, pred) {
  91163. var t = {};
  91164. var f = {};
  91165. internalFilter(obj, pred, objAcc(t), objAcc(f));
  91166. return {
  91167. t: t,
  91168. f: f
  91169. };
  91170. };
  91171. var filter$3 = function (obj, pred) {
  91172. var t = {};
  91173. internalFilter(obj, pred, objAcc(t), noop);
  91174. return t;
  91175. };
  91176. var mapToArray = function (obj, f) {
  91177. var r = [];
  91178. each$j(obj, function (value, name) {
  91179. r.push(f(value, name));
  91180. });
  91181. return r;
  91182. };
  91183. var values = function (obj) {
  91184. return mapToArray(obj, identity);
  91185. };
  91186. var get$9 = function (obj, key) {
  91187. return has$2(obj, key) ? Optional.from(obj[key]) : Optional.none();
  91188. };
  91189. var has$2 = function (obj, key) {
  91190. return hasOwnProperty$1.call(obj, key);
  91191. };
  91192. var hasNonNullableKey = function (obj, key) {
  91193. return has$2(obj, key) && obj[key] !== undefined && obj[key] !== null;
  91194. };
  91195. var equal$1 = function (a1, a2, eq) {
  91196. if (eq === void 0) {
  91197. eq = eqAny;
  91198. }
  91199. return eqRecord(eq).eq(a1, a2);
  91200. };
  91201. var isArray = Array.isArray;
  91202. var toArray$1 = function (obj) {
  91203. if (!isArray(obj)) {
  91204. var array = [];
  91205. for (var i = 0, l = obj.length; i < l; i++) {
  91206. array[i] = obj[i];
  91207. }
  91208. return array;
  91209. } else {
  91210. return obj;
  91211. }
  91212. };
  91213. var each$i = function (o, cb, s) {
  91214. var n, l;
  91215. if (!o) {
  91216. return false;
  91217. }
  91218. s = s || o;
  91219. if (o.length !== undefined) {
  91220. for (n = 0, l = o.length; n < l; n++) {
  91221. if (cb.call(s, o[n], n, o) === false) {
  91222. return false;
  91223. }
  91224. }
  91225. } else {
  91226. for (n in o) {
  91227. if (has$2(o, n)) {
  91228. if (cb.call(s, o[n], n, o) === false) {
  91229. return false;
  91230. }
  91231. }
  91232. }
  91233. }
  91234. return true;
  91235. };
  91236. var map$1 = function (array, callback) {
  91237. var out = [];
  91238. each$i(array, function (item, index) {
  91239. out.push(callback(item, index, array));
  91240. });
  91241. return out;
  91242. };
  91243. var filter$2 = function (a, f) {
  91244. var o = [];
  91245. each$i(a, function (v, index) {
  91246. if (!f || f(v, index, a)) {
  91247. o.push(v);
  91248. }
  91249. });
  91250. return o;
  91251. };
  91252. var indexOf$1 = function (a, v) {
  91253. if (a) {
  91254. for (var i = 0, l = a.length; i < l; i++) {
  91255. if (a[i] === v) {
  91256. return i;
  91257. }
  91258. }
  91259. }
  91260. return -1;
  91261. };
  91262. var reduce = function (collection, iteratee, accumulator, thisArg) {
  91263. var acc = isUndefined(accumulator) ? collection[0] : accumulator;
  91264. for (var i = 0; i < collection.length; i++) {
  91265. acc = iteratee.call(thisArg, acc, collection[i], i);
  91266. }
  91267. return acc;
  91268. };
  91269. var findIndex$1 = function (array, predicate, thisArg) {
  91270. var i, l;
  91271. for (i = 0, l = array.length; i < l; i++) {
  91272. if (predicate.call(thisArg, array[i], i, array)) {
  91273. return i;
  91274. }
  91275. }
  91276. return -1;
  91277. };
  91278. var last$1 = function (collection) {
  91279. return collection[collection.length - 1];
  91280. };
  91281. var __assign = function () {
  91282. __assign = Object.assign || function __assign(t) {
  91283. for (var s, i = 1, n = arguments.length; i < n; i++) {
  91284. s = arguments[i];
  91285. for (var p in s)
  91286. if (Object.prototype.hasOwnProperty.call(s, p))
  91287. t[p] = s[p];
  91288. }
  91289. return t;
  91290. };
  91291. return __assign.apply(this, arguments);
  91292. };
  91293. function __rest(s, e) {
  91294. var t = {};
  91295. for (var p in s)
  91296. if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  91297. t[p] = s[p];
  91298. if (s != null && typeof Object.getOwnPropertySymbols === 'function')
  91299. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  91300. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  91301. t[p[i]] = s[p[i]];
  91302. }
  91303. return t;
  91304. }
  91305. function __spreadArray(to, from, pack) {
  91306. if (pack || arguments.length === 2)
  91307. for (var i = 0, l = from.length, ar; i < l; i++) {
  91308. if (ar || !(i in from)) {
  91309. if (!ar)
  91310. ar = Array.prototype.slice.call(from, 0, i);
  91311. ar[i] = from[i];
  91312. }
  91313. }
  91314. return to.concat(ar || Array.prototype.slice.call(from));
  91315. }
  91316. var cached = function (f) {
  91317. var called = false;
  91318. var r;
  91319. return function () {
  91320. var args = [];
  91321. for (var _i = 0; _i < arguments.length; _i++) {
  91322. args[_i] = arguments[_i];
  91323. }
  91324. if (!called) {
  91325. called = true;
  91326. r = f.apply(null, args);
  91327. }
  91328. return r;
  91329. };
  91330. };
  91331. var DeviceType = function (os, browser, userAgent, mediaMatch) {
  91332. var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
  91333. var isiPhone = os.isiOS() && !isiPad;
  91334. var isMobile = os.isiOS() || os.isAndroid();
  91335. var isTouch = isMobile || mediaMatch('(pointer:coarse)');
  91336. var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
  91337. var isPhone = isiPhone || isMobile && !isTablet;
  91338. var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
  91339. var isDesktop = !isPhone && !isTablet && !iOSwebview;
  91340. return {
  91341. isiPad: constant(isiPad),
  91342. isiPhone: constant(isiPhone),
  91343. isTablet: constant(isTablet),
  91344. isPhone: constant(isPhone),
  91345. isTouch: constant(isTouch),
  91346. isAndroid: os.isAndroid,
  91347. isiOS: os.isiOS,
  91348. isWebView: constant(iOSwebview),
  91349. isDesktop: constant(isDesktop)
  91350. };
  91351. };
  91352. var firstMatch = function (regexes, s) {
  91353. for (var i = 0; i < regexes.length; i++) {
  91354. var x = regexes[i];
  91355. if (x.test(s)) {
  91356. return x;
  91357. }
  91358. }
  91359. return undefined;
  91360. };
  91361. var find$2 = function (regexes, agent) {
  91362. var r = firstMatch(regexes, agent);
  91363. if (!r) {
  91364. return {
  91365. major: 0,
  91366. minor: 0
  91367. };
  91368. }
  91369. var group = function (i) {
  91370. return Number(agent.replace(r, '$' + i));
  91371. };
  91372. return nu$4(group(1), group(2));
  91373. };
  91374. var detect$3 = function (versionRegexes, agent) {
  91375. var cleanedAgent = String(agent).toLowerCase();
  91376. if (versionRegexes.length === 0) {
  91377. return unknown$2();
  91378. }
  91379. return find$2(versionRegexes, cleanedAgent);
  91380. };
  91381. var unknown$2 = function () {
  91382. return nu$4(0, 0);
  91383. };
  91384. var nu$4 = function (major, minor) {
  91385. return {
  91386. major: major,
  91387. minor: minor
  91388. };
  91389. };
  91390. var Version = {
  91391. nu: nu$4,
  91392. detect: detect$3,
  91393. unknown: unknown$2
  91394. };
  91395. var detectBrowser$1 = function (browsers, userAgentData) {
  91396. return findMap(userAgentData.brands, function (uaBrand) {
  91397. var lcBrand = uaBrand.brand.toLowerCase();
  91398. return find$3(browsers, function (browser) {
  91399. var _a;
  91400. return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());
  91401. }).map(function (info) {
  91402. return {
  91403. current: info.name,
  91404. version: Version.nu(parseInt(uaBrand.version, 10), 0)
  91405. };
  91406. });
  91407. });
  91408. };
  91409. var detect$2 = function (candidates, userAgent) {
  91410. var agent = String(userAgent).toLowerCase();
  91411. return find$3(candidates, function (candidate) {
  91412. return candidate.search(agent);
  91413. });
  91414. };
  91415. var detectBrowser = function (browsers, userAgent) {
  91416. return detect$2(browsers, userAgent).map(function (browser) {
  91417. var version = Version.detect(browser.versionRegexes, userAgent);
  91418. return {
  91419. current: browser.name,
  91420. version: version
  91421. };
  91422. });
  91423. };
  91424. var detectOs = function (oses, userAgent) {
  91425. return detect$2(oses, userAgent).map(function (os) {
  91426. var version = Version.detect(os.versionRegexes, userAgent);
  91427. return {
  91428. current: os.name,
  91429. version: version
  91430. };
  91431. });
  91432. };
  91433. var removeFromStart = function (str, numChars) {
  91434. return str.substring(numChars);
  91435. };
  91436. var checkRange = function (str, substr, start) {
  91437. return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
  91438. };
  91439. var removeLeading = function (str, prefix) {
  91440. return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;
  91441. };
  91442. var contains$2 = function (str, substr) {
  91443. return str.indexOf(substr) !== -1;
  91444. };
  91445. var startsWith = function (str, prefix) {
  91446. return checkRange(str, prefix, 0);
  91447. };
  91448. var blank = function (r) {
  91449. return function (s) {
  91450. return s.replace(r, '');
  91451. };
  91452. };
  91453. var trim$4 = blank(/^\s+|\s+$/g);
  91454. var lTrim = blank(/^\s+/g);
  91455. var rTrim = blank(/\s+$/g);
  91456. var isNotEmpty = function (s) {
  91457. return s.length > 0;
  91458. };
  91459. var isEmpty$3 = function (s) {
  91460. return !isNotEmpty(s);
  91461. };
  91462. var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
  91463. var checkContains = function (target) {
  91464. return function (uastring) {
  91465. return contains$2(uastring, target);
  91466. };
  91467. };
  91468. var browsers = [
  91469. {
  91470. name: 'Edge',
  91471. versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
  91472. search: function (uastring) {
  91473. return contains$2(uastring, 'edge/') && contains$2(uastring, 'chrome') && contains$2(uastring, 'safari') && contains$2(uastring, 'applewebkit');
  91474. }
  91475. },
  91476. {
  91477. name: 'Chrome',
  91478. brand: 'Chromium',
  91479. versionRegexes: [
  91480. /.*?chrome\/([0-9]+)\.([0-9]+).*/,
  91481. normalVersionRegex
  91482. ],
  91483. search: function (uastring) {
  91484. return contains$2(uastring, 'chrome') && !contains$2(uastring, 'chromeframe');
  91485. }
  91486. },
  91487. {
  91488. name: 'IE',
  91489. versionRegexes: [
  91490. /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
  91491. /.*?rv:([0-9]+)\.([0-9]+).*/
  91492. ],
  91493. search: function (uastring) {
  91494. return contains$2(uastring, 'msie') || contains$2(uastring, 'trident');
  91495. }
  91496. },
  91497. {
  91498. name: 'Opera',
  91499. versionRegexes: [
  91500. normalVersionRegex,
  91501. /.*?opera\/([0-9]+)\.([0-9]+).*/
  91502. ],
  91503. search: checkContains('opera')
  91504. },
  91505. {
  91506. name: 'Firefox',
  91507. versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
  91508. search: checkContains('firefox')
  91509. },
  91510. {
  91511. name: 'Safari',
  91512. versionRegexes: [
  91513. normalVersionRegex,
  91514. /.*?cpu os ([0-9]+)_([0-9]+).*/
  91515. ],
  91516. search: function (uastring) {
  91517. return (contains$2(uastring, 'safari') || contains$2(uastring, 'mobile/')) && contains$2(uastring, 'applewebkit');
  91518. }
  91519. }
  91520. ];
  91521. var oses = [
  91522. {
  91523. name: 'Windows',
  91524. search: checkContains('win'),
  91525. versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
  91526. },
  91527. {
  91528. name: 'iOS',
  91529. search: function (uastring) {
  91530. return contains$2(uastring, 'iphone') || contains$2(uastring, 'ipad');
  91531. },
  91532. versionRegexes: [
  91533. /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
  91534. /.*cpu os ([0-9]+)_([0-9]+).*/,
  91535. /.*cpu iphone os ([0-9]+)_([0-9]+).*/
  91536. ]
  91537. },
  91538. {
  91539. name: 'Android',
  91540. search: checkContains('android'),
  91541. versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
  91542. },
  91543. {
  91544. name: 'OSX',
  91545. search: checkContains('mac os x'),
  91546. versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
  91547. },
  91548. {
  91549. name: 'Linux',
  91550. search: checkContains('linux'),
  91551. versionRegexes: []
  91552. },
  91553. {
  91554. name: 'Solaris',
  91555. search: checkContains('sunos'),
  91556. versionRegexes: []
  91557. },
  91558. {
  91559. name: 'FreeBSD',
  91560. search: checkContains('freebsd'),
  91561. versionRegexes: []
  91562. },
  91563. {
  91564. name: 'ChromeOS',
  91565. search: checkContains('cros'),
  91566. versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
  91567. }
  91568. ];
  91569. var PlatformInfo = {
  91570. browsers: constant(browsers),
  91571. oses: constant(oses)
  91572. };
  91573. var edge = 'Edge';
  91574. var chrome = 'Chrome';
  91575. var ie$1 = 'IE';
  91576. var opera = 'Opera';
  91577. var firefox = 'Firefox';
  91578. var safari = 'Safari';
  91579. var unknown$1 = function () {
  91580. return nu$3({
  91581. current: undefined,
  91582. version: Version.unknown()
  91583. });
  91584. };
  91585. var nu$3 = function (info) {
  91586. var current = info.current;
  91587. var version = info.version;
  91588. var isBrowser = function (name) {
  91589. return function () {
  91590. return current === name;
  91591. };
  91592. };
  91593. return {
  91594. current: current,
  91595. version: version,
  91596. isEdge: isBrowser(edge),
  91597. isChrome: isBrowser(chrome),
  91598. isIE: isBrowser(ie$1),
  91599. isOpera: isBrowser(opera),
  91600. isFirefox: isBrowser(firefox),
  91601. isSafari: isBrowser(safari)
  91602. };
  91603. };
  91604. var Browser = {
  91605. unknown: unknown$1,
  91606. nu: nu$3,
  91607. edge: constant(edge),
  91608. chrome: constant(chrome),
  91609. ie: constant(ie$1),
  91610. opera: constant(opera),
  91611. firefox: constant(firefox),
  91612. safari: constant(safari)
  91613. };
  91614. var windows = 'Windows';
  91615. var ios = 'iOS';
  91616. var android = 'Android';
  91617. var linux = 'Linux';
  91618. var osx = 'OSX';
  91619. var solaris = 'Solaris';
  91620. var freebsd = 'FreeBSD';
  91621. var chromeos = 'ChromeOS';
  91622. var unknown = function () {
  91623. return nu$2({
  91624. current: undefined,
  91625. version: Version.unknown()
  91626. });
  91627. };
  91628. var nu$2 = function (info) {
  91629. var current = info.current;
  91630. var version = info.version;
  91631. var isOS = function (name) {
  91632. return function () {
  91633. return current === name;
  91634. };
  91635. };
  91636. return {
  91637. current: current,
  91638. version: version,
  91639. isWindows: isOS(windows),
  91640. isiOS: isOS(ios),
  91641. isAndroid: isOS(android),
  91642. isOSX: isOS(osx),
  91643. isLinux: isOS(linux),
  91644. isSolaris: isOS(solaris),
  91645. isFreeBSD: isOS(freebsd),
  91646. isChromeOS: isOS(chromeos)
  91647. };
  91648. };
  91649. var OperatingSystem = {
  91650. unknown: unknown,
  91651. nu: nu$2,
  91652. windows: constant(windows),
  91653. ios: constant(ios),
  91654. android: constant(android),
  91655. linux: constant(linux),
  91656. osx: constant(osx),
  91657. solaris: constant(solaris),
  91658. freebsd: constant(freebsd),
  91659. chromeos: constant(chromeos)
  91660. };
  91661. var detect$1 = function (userAgent, userAgentDataOpt, mediaMatch) {
  91662. var browsers = PlatformInfo.browsers();
  91663. var oses = PlatformInfo.oses();
  91664. var browser = userAgentDataOpt.bind(function (userAgentData) {
  91665. return detectBrowser$1(browsers, userAgentData);
  91666. }).orThunk(function () {
  91667. return detectBrowser(browsers, userAgent);
  91668. }).fold(Browser.unknown, Browser.nu);
  91669. var os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
  91670. var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
  91671. return {
  91672. browser: browser,
  91673. os: os,
  91674. deviceType: deviceType
  91675. };
  91676. };
  91677. var PlatformDetection = { detect: detect$1 };
  91678. var mediaMatch = function (query) {
  91679. return window.matchMedia(query).matches;
  91680. };
  91681. var platform$2 = cached(function () {
  91682. return PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch);
  91683. });
  91684. var detect = function () {
  91685. return platform$2();
  91686. };
  91687. var userAgent = navigator.userAgent;
  91688. var platform$1 = detect();
  91689. var browser$4 = platform$1.browser;
  91690. var os = platform$1.os;
  91691. var deviceType = platform$1.deviceType;
  91692. var webkit = /WebKit/.test(userAgent) && !browser$4.isEdge();
  91693. var fileApi = 'FormData' in window && 'FileReader' in window && 'URL' in window && !!URL.createObjectURL;
  91694. var windowsPhone = userAgent.indexOf('Windows Phone') !== -1;
  91695. var Env = {
  91696. opera: browser$4.isOpera(),
  91697. webkit: webkit,
  91698. ie: browser$4.isIE() || browser$4.isEdge() ? browser$4.version.major : false,
  91699. gecko: browser$4.isFirefox(),
  91700. mac: os.isOSX() || os.isiOS(),
  91701. iOS: deviceType.isiPad() || deviceType.isiPhone(),
  91702. android: os.isAndroid(),
  91703. contentEditable: true,
  91704. transparentSrc: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
  91705. caretAfter: true,
  91706. range: window.getSelection && 'Range' in window,
  91707. documentMode: browser$4.isIE() ? document.documentMode || 7 : 10,
  91708. fileApi: fileApi,
  91709. ceFalse: true,
  91710. cacheSuffix: null,
  91711. container: null,
  91712. experimentalShadowDom: false,
  91713. canHaveCSP: !browser$4.isIE(),
  91714. desktop: deviceType.isDesktop(),
  91715. windowsPhone: windowsPhone,
  91716. browser: {
  91717. current: browser$4.current,
  91718. version: browser$4.version,
  91719. isChrome: browser$4.isChrome,
  91720. isEdge: browser$4.isEdge,
  91721. isFirefox: browser$4.isFirefox,
  91722. isIE: browser$4.isIE,
  91723. isOpera: browser$4.isOpera,
  91724. isSafari: browser$4.isSafari
  91725. },
  91726. os: {
  91727. current: os.current,
  91728. version: os.version,
  91729. isAndroid: os.isAndroid,
  91730. isChromeOS: os.isChromeOS,
  91731. isFreeBSD: os.isFreeBSD,
  91732. isiOS: os.isiOS,
  91733. isLinux: os.isLinux,
  91734. isOSX: os.isOSX,
  91735. isSolaris: os.isSolaris,
  91736. isWindows: os.isWindows
  91737. },
  91738. deviceType: {
  91739. isDesktop: deviceType.isDesktop,
  91740. isiPad: deviceType.isiPad,
  91741. isiPhone: deviceType.isiPhone,
  91742. isPhone: deviceType.isPhone,
  91743. isTablet: deviceType.isTablet,
  91744. isTouch: deviceType.isTouch,
  91745. isWebView: deviceType.isWebView
  91746. }
  91747. };
  91748. var whiteSpaceRegExp$2 = /^\s*|\s*$/g;
  91749. var trim$3 = function (str) {
  91750. return str === null || str === undefined ? '' : ('' + str).replace(whiteSpaceRegExp$2, '');
  91751. };
  91752. var is$3 = function (obj, type) {
  91753. if (!type) {
  91754. return obj !== undefined;
  91755. }
  91756. if (type === 'array' && isArray(obj)) {
  91757. return true;
  91758. }
  91759. return typeof obj === type;
  91760. };
  91761. var makeMap$4 = function (items, delim, map) {
  91762. var i;
  91763. items = items || [];
  91764. delim = delim || ',';
  91765. if (typeof items === 'string') {
  91766. items = items.split(delim);
  91767. }
  91768. map = map || {};
  91769. i = items.length;
  91770. while (i--) {
  91771. map[items[i]] = {};
  91772. }
  91773. return map;
  91774. };
  91775. var hasOwnProperty = has$2;
  91776. var create$9 = function (s, p, root) {
  91777. var self = this;
  91778. var sp, scn, c, de = 0;
  91779. s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);
  91780. var cn = s[3].match(/(^|\.)(\w+)$/i)[2];
  91781. var ns = self.createNS(s[3].replace(/\.\w+$/, ''), root);
  91782. if (ns[cn]) {
  91783. return;
  91784. }
  91785. if (s[2] === 'static') {
  91786. ns[cn] = p;
  91787. if (this.onCreate) {
  91788. this.onCreate(s[2], s[3], ns[cn]);
  91789. }
  91790. return;
  91791. }
  91792. if (!p[cn]) {
  91793. p[cn] = function () {
  91794. };
  91795. de = 1;
  91796. }
  91797. ns[cn] = p[cn];
  91798. self.extend(ns[cn].prototype, p);
  91799. if (s[5]) {
  91800. sp = self.resolve(s[5]).prototype;
  91801. scn = s[5].match(/\.(\w+)$/i)[1];
  91802. c = ns[cn];
  91803. if (de) {
  91804. ns[cn] = function () {
  91805. return sp[scn].apply(this, arguments);
  91806. };
  91807. } else {
  91808. ns[cn] = function () {
  91809. this.parent = sp[scn];
  91810. return c.apply(this, arguments);
  91811. };
  91812. }
  91813. ns[cn].prototype[cn] = ns[cn];
  91814. self.each(sp, function (f, n) {
  91815. ns[cn].prototype[n] = sp[n];
  91816. });
  91817. self.each(p, function (f, n) {
  91818. if (sp[n]) {
  91819. ns[cn].prototype[n] = function () {
  91820. this.parent = sp[n];
  91821. return f.apply(this, arguments);
  91822. };
  91823. } else {
  91824. if (n !== cn) {
  91825. ns[cn].prototype[n] = f;
  91826. }
  91827. }
  91828. });
  91829. }
  91830. self.each(p.static, function (f, n) {
  91831. ns[cn][n] = f;
  91832. });
  91833. };
  91834. var extend$6 = function (obj) {
  91835. var exts = [];
  91836. for (var _i = 1; _i < arguments.length; _i++) {
  91837. exts[_i - 1] = arguments[_i];
  91838. }
  91839. for (var i = 0; i < exts.length; i++) {
  91840. var ext = exts[i];
  91841. for (var name_1 in ext) {
  91842. if (has$2(ext, name_1)) {
  91843. var value = ext[name_1];
  91844. if (value !== undefined) {
  91845. obj[name_1] = value;
  91846. }
  91847. }
  91848. }
  91849. }
  91850. return obj;
  91851. };
  91852. var walk$3 = function (o, f, n, s) {
  91853. s = s || this;
  91854. if (o) {
  91855. if (n) {
  91856. o = o[n];
  91857. }
  91858. each$i(o, function (o, i) {
  91859. if (f.call(s, o, i, n) === false) {
  91860. return false;
  91861. }
  91862. walk$3(o, f, n, s);
  91863. });
  91864. }
  91865. };
  91866. var createNS = function (n, o) {
  91867. var i, v;
  91868. o = o || window;
  91869. n = n.split('.');
  91870. for (i = 0; i < n.length; i++) {
  91871. v = n[i];
  91872. if (!o[v]) {
  91873. o[v] = {};
  91874. }
  91875. o = o[v];
  91876. }
  91877. return o;
  91878. };
  91879. var resolve$3 = function (n, o) {
  91880. var i, l;
  91881. o = o || window;
  91882. n = n.split('.');
  91883. for (i = 0, l = n.length; i < l; i++) {
  91884. o = o[n[i]];
  91885. if (!o) {
  91886. break;
  91887. }
  91888. }
  91889. return o;
  91890. };
  91891. var explode$4 = function (s, d) {
  91892. if (!s || is$3(s, 'array')) {
  91893. return s;
  91894. }
  91895. return map$1(s.split(d || ','), trim$3);
  91896. };
  91897. var _addCacheSuffix = function (url) {
  91898. var cacheSuffix = Env.cacheSuffix;
  91899. if (cacheSuffix) {
  91900. url += (url.indexOf('?') === -1 ? '?' : '&') + cacheSuffix;
  91901. }
  91902. return url;
  91903. };
  91904. var Tools = {
  91905. trim: trim$3,
  91906. isArray: isArray,
  91907. is: is$3,
  91908. toArray: toArray$1,
  91909. makeMap: makeMap$4,
  91910. each: each$i,
  91911. map: map$1,
  91912. grep: filter$2,
  91913. inArray: indexOf$1,
  91914. hasOwn: hasOwnProperty,
  91915. extend: extend$6,
  91916. create: create$9,
  91917. walk: walk$3,
  91918. createNS: createNS,
  91919. resolve: resolve$3,
  91920. explode: explode$4,
  91921. _addCacheSuffix: _addCacheSuffix
  91922. };
  91923. var fromHtml$1 = function (html, scope) {
  91924. var doc = scope || document;
  91925. var div = doc.createElement('div');
  91926. div.innerHTML = html;
  91927. if (!div.hasChildNodes() || div.childNodes.length > 1) {
  91928. console.error('HTML does not have a single root node', html);
  91929. throw new Error('HTML must have a single root node');
  91930. }
  91931. return fromDom$2(div.childNodes[0]);
  91932. };
  91933. var fromTag = function (tag, scope) {
  91934. var doc = scope || document;
  91935. var node = doc.createElement(tag);
  91936. return fromDom$2(node);
  91937. };
  91938. var fromText = function (text, scope) {
  91939. var doc = scope || document;
  91940. var node = doc.createTextNode(text);
  91941. return fromDom$2(node);
  91942. };
  91943. var fromDom$2 = function (node) {
  91944. if (node === null || node === undefined) {
  91945. throw new Error('Node cannot be null or undefined');
  91946. }
  91947. return { dom: node };
  91948. };
  91949. var fromPoint$1 = function (docElm, x, y) {
  91950. return Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$2);
  91951. };
  91952. var SugarElement = {
  91953. fromHtml: fromHtml$1,
  91954. fromTag: fromTag,
  91955. fromText: fromText,
  91956. fromDom: fromDom$2,
  91957. fromPoint: fromPoint$1
  91958. };
  91959. var toArray = function (target, f) {
  91960. var r = [];
  91961. var recurse = function (e) {
  91962. r.push(e);
  91963. return f(e);
  91964. };
  91965. var cur = f(target);
  91966. do {
  91967. cur = cur.bind(recurse);
  91968. } while (cur.isSome());
  91969. return r;
  91970. };
  91971. var compareDocumentPosition = function (a, b, match) {
  91972. return (a.compareDocumentPosition(b) & match) !== 0;
  91973. };
  91974. var documentPositionContainedBy = function (a, b) {
  91975. return compareDocumentPosition(a, b, Node.DOCUMENT_POSITION_CONTAINED_BY);
  91976. };
  91977. var COMMENT = 8;
  91978. var DOCUMENT = 9;
  91979. var DOCUMENT_FRAGMENT = 11;
  91980. var ELEMENT = 1;
  91981. var TEXT = 3;
  91982. var is$2 = function (element, selector) {
  91983. var dom = element.dom;
  91984. if (dom.nodeType !== ELEMENT) {
  91985. return false;
  91986. } else {
  91987. var elem = dom;
  91988. if (elem.matches !== undefined) {
  91989. return elem.matches(selector);
  91990. } else if (elem.msMatchesSelector !== undefined) {
  91991. return elem.msMatchesSelector(selector);
  91992. } else if (elem.webkitMatchesSelector !== undefined) {
  91993. return elem.webkitMatchesSelector(selector);
  91994. } else if (elem.mozMatchesSelector !== undefined) {
  91995. return elem.mozMatchesSelector(selector);
  91996. } else {
  91997. throw new Error('Browser lacks native selectors');
  91998. }
  91999. }
  92000. };
  92001. var bypassSelector = function (dom) {
  92002. return dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
  92003. };
  92004. var all = function (selector, scope) {
  92005. var base = scope === undefined ? document : scope.dom;
  92006. return bypassSelector(base) ? [] : map$3(base.querySelectorAll(selector), SugarElement.fromDom);
  92007. };
  92008. var one = function (selector, scope) {
  92009. var base = scope === undefined ? document : scope.dom;
  92010. return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);
  92011. };
  92012. var eq = function (e1, e2) {
  92013. return e1.dom === e2.dom;
  92014. };
  92015. var regularContains = function (e1, e2) {
  92016. var d1 = e1.dom;
  92017. var d2 = e2.dom;
  92018. return d1 === d2 ? false : d1.contains(d2);
  92019. };
  92020. var ieContains = function (e1, e2) {
  92021. return documentPositionContainedBy(e1.dom, e2.dom);
  92022. };
  92023. var contains$1 = function (e1, e2) {
  92024. return detect().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
  92025. };
  92026. typeof window !== 'undefined' ? window : Function('return this;')();
  92027. var name = function (element) {
  92028. var r = element.dom.nodeName;
  92029. return r.toLowerCase();
  92030. };
  92031. var type = function (element) {
  92032. return element.dom.nodeType;
  92033. };
  92034. var isType = function (t) {
  92035. return function (element) {
  92036. return type(element) === t;
  92037. };
  92038. };
  92039. var isComment$1 = function (element) {
  92040. return type(element) === COMMENT || name(element) === '#comment';
  92041. };
  92042. var isElement$6 = isType(ELEMENT);
  92043. var isText$8 = isType(TEXT);
  92044. var isDocument$2 = isType(DOCUMENT);
  92045. var isDocumentFragment$1 = isType(DOCUMENT_FRAGMENT);
  92046. var isTag = function (tag) {
  92047. return function (e) {
  92048. return isElement$6(e) && name(e) === tag;
  92049. };
  92050. };
  92051. var owner$1 = function (element) {
  92052. return SugarElement.fromDom(element.dom.ownerDocument);
  92053. };
  92054. var documentOrOwner = function (dos) {
  92055. return isDocument$2(dos) ? dos : owner$1(dos);
  92056. };
  92057. var documentElement = function (element) {
  92058. return SugarElement.fromDom(documentOrOwner(element).dom.documentElement);
  92059. };
  92060. var defaultView = function (element) {
  92061. return SugarElement.fromDom(documentOrOwner(element).dom.defaultView);
  92062. };
  92063. var parent = function (element) {
  92064. return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
  92065. };
  92066. var parents$1 = function (element, isRoot) {
  92067. var stop = isFunction(isRoot) ? isRoot : never;
  92068. var dom = element.dom;
  92069. var ret = [];
  92070. while (dom.parentNode !== null && dom.parentNode !== undefined) {
  92071. var rawParent = dom.parentNode;
  92072. var p = SugarElement.fromDom(rawParent);
  92073. ret.push(p);
  92074. if (stop(p) === true) {
  92075. break;
  92076. } else {
  92077. dom = rawParent;
  92078. }
  92079. }
  92080. return ret;
  92081. };
  92082. var siblings = function (element) {
  92083. var filterSelf = function (elements) {
  92084. return filter$4(elements, function (x) {
  92085. return !eq(element, x);
  92086. });
  92087. };
  92088. return parent(element).map(children).map(filterSelf).getOr([]);
  92089. };
  92090. var prevSibling = function (element) {
  92091. return Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);
  92092. };
  92093. var nextSibling = function (element) {
  92094. return Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);
  92095. };
  92096. var prevSiblings = function (element) {
  92097. return reverse(toArray(element, prevSibling));
  92098. };
  92099. var nextSiblings = function (element) {
  92100. return toArray(element, nextSibling);
  92101. };
  92102. var children = function (element) {
  92103. return map$3(element.dom.childNodes, SugarElement.fromDom);
  92104. };
  92105. var child$1 = function (element, index) {
  92106. var cs = element.dom.childNodes;
  92107. return Optional.from(cs[index]).map(SugarElement.fromDom);
  92108. };
  92109. var firstChild = function (element) {
  92110. return child$1(element, 0);
  92111. };
  92112. var lastChild = function (element) {
  92113. return child$1(element, element.dom.childNodes.length - 1);
  92114. };
  92115. var childNodesCount = function (element) {
  92116. return element.dom.childNodes.length;
  92117. };
  92118. var getHead = function (doc) {
  92119. var b = doc.dom.head;
  92120. if (b === null || b === undefined) {
  92121. throw new Error('Head is not available yet');
  92122. }
  92123. return SugarElement.fromDom(b);
  92124. };
  92125. var isShadowRoot = function (dos) {
  92126. return isDocumentFragment$1(dos) && isNonNullable(dos.dom.host);
  92127. };
  92128. var supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
  92129. var isSupported$1 = constant(supported);
  92130. var getRootNode = supported ? function (e) {
  92131. return SugarElement.fromDom(e.dom.getRootNode());
  92132. } : documentOrOwner;
  92133. var getStyleContainer = function (dos) {
  92134. return isShadowRoot(dos) ? dos : getHead(documentOrOwner(dos));
  92135. };
  92136. var getShadowRoot = function (e) {
  92137. var r = getRootNode(e);
  92138. return isShadowRoot(r) ? Optional.some(r) : Optional.none();
  92139. };
  92140. var getShadowHost = function (e) {
  92141. return SugarElement.fromDom(e.dom.host);
  92142. };
  92143. var getOriginalEventTarget = function (event) {
  92144. if (isSupported$1() && isNonNullable(event.target)) {
  92145. var el = SugarElement.fromDom(event.target);
  92146. if (isElement$6(el) && isOpenShadowHost(el)) {
  92147. if (event.composed && event.composedPath) {
  92148. var composedPath = event.composedPath();
  92149. if (composedPath) {
  92150. return head(composedPath);
  92151. }
  92152. }
  92153. }
  92154. }
  92155. return Optional.from(event.target);
  92156. };
  92157. var isOpenShadowHost = function (element) {
  92158. return isNonNullable(element.dom.shadowRoot);
  92159. };
  92160. var before$4 = function (marker, element) {
  92161. var parent$1 = parent(marker);
  92162. parent$1.each(function (v) {
  92163. v.dom.insertBefore(element.dom, marker.dom);
  92164. });
  92165. };
  92166. var after$3 = function (marker, element) {
  92167. var sibling = nextSibling(marker);
  92168. sibling.fold(function () {
  92169. var parent$1 = parent(marker);
  92170. parent$1.each(function (v) {
  92171. append$1(v, element);
  92172. });
  92173. }, function (v) {
  92174. before$4(v, element);
  92175. });
  92176. };
  92177. var prepend = function (parent, element) {
  92178. var firstChild$1 = firstChild(parent);
  92179. firstChild$1.fold(function () {
  92180. append$1(parent, element);
  92181. }, function (v) {
  92182. parent.dom.insertBefore(element.dom, v.dom);
  92183. });
  92184. };
  92185. var append$1 = function (parent, element) {
  92186. parent.dom.appendChild(element.dom);
  92187. };
  92188. var wrap$3 = function (element, wrapper) {
  92189. before$4(element, wrapper);
  92190. append$1(wrapper, element);
  92191. };
  92192. var before$3 = function (marker, elements) {
  92193. each$k(elements, function (x) {
  92194. before$4(marker, x);
  92195. });
  92196. };
  92197. var append = function (parent, elements) {
  92198. each$k(elements, function (x) {
  92199. append$1(parent, x);
  92200. });
  92201. };
  92202. var empty = function (element) {
  92203. element.dom.textContent = '';
  92204. each$k(children(element), function (rogue) {
  92205. remove$7(rogue);
  92206. });
  92207. };
  92208. var remove$7 = function (element) {
  92209. var dom = element.dom;
  92210. if (dom.parentNode !== null) {
  92211. dom.parentNode.removeChild(dom);
  92212. }
  92213. };
  92214. var unwrap = function (wrapper) {
  92215. var children$1 = children(wrapper);
  92216. if (children$1.length > 0) {
  92217. before$3(wrapper, children$1);
  92218. }
  92219. remove$7(wrapper);
  92220. };
  92221. var inBody = function (element) {
  92222. var dom = isText$8(element) ? element.dom.parentNode : element.dom;
  92223. if (dom === undefined || dom === null || dom.ownerDocument === null) {
  92224. return false;
  92225. }
  92226. var doc = dom.ownerDocument;
  92227. return getShadowRoot(SugarElement.fromDom(dom)).fold(function () {
  92228. return doc.body.contains(dom);
  92229. }, compose1(inBody, getShadowHost));
  92230. };
  92231. var r = function (left, top) {
  92232. var translate = function (x, y) {
  92233. return r(left + x, top + y);
  92234. };
  92235. return {
  92236. left: left,
  92237. top: top,
  92238. translate: translate
  92239. };
  92240. };
  92241. var SugarPosition = r;
  92242. var boxPosition = function (dom) {
  92243. var box = dom.getBoundingClientRect();
  92244. return SugarPosition(box.left, box.top);
  92245. };
  92246. var firstDefinedOrZero = function (a, b) {
  92247. if (a !== undefined) {
  92248. return a;
  92249. } else {
  92250. return b !== undefined ? b : 0;
  92251. }
  92252. };
  92253. var absolute = function (element) {
  92254. var doc = element.dom.ownerDocument;
  92255. var body = doc.body;
  92256. var win = doc.defaultView;
  92257. var html = doc.documentElement;
  92258. if (body === element.dom) {
  92259. return SugarPosition(body.offsetLeft, body.offsetTop);
  92260. }
  92261. var scrollTop = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageYOffset, html.scrollTop);
  92262. var scrollLeft = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageXOffset, html.scrollLeft);
  92263. var clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);
  92264. var clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);
  92265. return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);
  92266. };
  92267. var viewport = function (element) {
  92268. var dom = element.dom;
  92269. var doc = dom.ownerDocument;
  92270. var body = doc.body;
  92271. if (body === dom) {
  92272. return SugarPosition(body.offsetLeft, body.offsetTop);
  92273. }
  92274. if (!inBody(element)) {
  92275. return SugarPosition(0, 0);
  92276. }
  92277. return boxPosition(dom);
  92278. };
  92279. var get$8 = function (_DOC) {
  92280. var doc = _DOC !== undefined ? _DOC.dom : document;
  92281. var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
  92282. var y = doc.body.scrollTop || doc.documentElement.scrollTop;
  92283. return SugarPosition(x, y);
  92284. };
  92285. var to = function (x, y, _DOC) {
  92286. var doc = _DOC !== undefined ? _DOC.dom : document;
  92287. var win = doc.defaultView;
  92288. if (win) {
  92289. win.scrollTo(x, y);
  92290. }
  92291. };
  92292. var intoView = function (element, alignToTop) {
  92293. var isSafari = detect().browser.isSafari();
  92294. if (isSafari && isFunction(element.dom.scrollIntoViewIfNeeded)) {
  92295. element.dom.scrollIntoViewIfNeeded(false);
  92296. } else {
  92297. element.dom.scrollIntoView(alignToTop);
  92298. }
  92299. };
  92300. var get$7 = function (_win) {
  92301. var win = _win === undefined ? window : _win;
  92302. if (detect().browser.isFirefox()) {
  92303. return Optional.none();
  92304. } else {
  92305. return Optional.from(win['visualViewport']);
  92306. }
  92307. };
  92308. var bounds = function (x, y, width, height) {
  92309. return {
  92310. x: x,
  92311. y: y,
  92312. width: width,
  92313. height: height,
  92314. right: x + width,
  92315. bottom: y + height
  92316. };
  92317. };
  92318. var getBounds = function (_win) {
  92319. var win = _win === undefined ? window : _win;
  92320. var doc = win.document;
  92321. var scroll = get$8(SugarElement.fromDom(doc));
  92322. return get$7(win).fold(function () {
  92323. var html = win.document.documentElement;
  92324. var width = html.clientWidth;
  92325. var height = html.clientHeight;
  92326. return bounds(scroll.left, scroll.top, width, height);
  92327. }, function (visualViewport) {
  92328. return bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height);
  92329. });
  92330. };
  92331. var isNodeType = function (type) {
  92332. return function (node) {
  92333. return !!node && node.nodeType === type;
  92334. };
  92335. };
  92336. var isRestrictedNode = function (node) {
  92337. return !!node && !Object.getPrototypeOf(node);
  92338. };
  92339. var isElement$5 = isNodeType(1);
  92340. var matchNodeNames = function (names) {
  92341. var lowercasedNames = names.map(function (s) {
  92342. return s.toLowerCase();
  92343. });
  92344. return function (node) {
  92345. if (node && node.nodeName) {
  92346. var nodeName = node.nodeName.toLowerCase();
  92347. return contains$3(lowercasedNames, nodeName);
  92348. }
  92349. return false;
  92350. };
  92351. };
  92352. var matchStyleValues = function (name, values) {
  92353. var items = values.toLowerCase().split(' ');
  92354. return function (node) {
  92355. if (isElement$5(node)) {
  92356. for (var i = 0; i < items.length; i++) {
  92357. var computed = node.ownerDocument.defaultView.getComputedStyle(node, null);
  92358. var cssValue = computed ? computed.getPropertyValue(name) : null;
  92359. if (cssValue === items[i]) {
  92360. return true;
  92361. }
  92362. }
  92363. }
  92364. return false;
  92365. };
  92366. };
  92367. var hasAttribute = function (attrName) {
  92368. return function (node) {
  92369. return isElement$5(node) && node.hasAttribute(attrName);
  92370. };
  92371. };
  92372. var hasAttributeValue = function (attrName, attrValue) {
  92373. return function (node) {
  92374. return isElement$5(node) && node.getAttribute(attrName) === attrValue;
  92375. };
  92376. };
  92377. var isBogus$2 = function (node) {
  92378. return isElement$5(node) && node.hasAttribute('data-mce-bogus');
  92379. };
  92380. var isBogusAll$1 = function (node) {
  92381. return isElement$5(node) && node.getAttribute('data-mce-bogus') === 'all';
  92382. };
  92383. var isTable$3 = function (node) {
  92384. return isElement$5(node) && node.tagName === 'TABLE';
  92385. };
  92386. var hasContentEditableState = function (value) {
  92387. return function (node) {
  92388. if (isElement$5(node)) {
  92389. if (node.contentEditable === value) {
  92390. return true;
  92391. }
  92392. if (node.getAttribute('data-mce-contenteditable') === value) {
  92393. return true;
  92394. }
  92395. }
  92396. return false;
  92397. };
  92398. };
  92399. var isTextareaOrInput = matchNodeNames([
  92400. 'textarea',
  92401. 'input'
  92402. ]);
  92403. var isText$7 = isNodeType(3);
  92404. var isComment = isNodeType(8);
  92405. var isDocument$1 = isNodeType(9);
  92406. var isDocumentFragment = isNodeType(11);
  92407. var isBr$5 = matchNodeNames(['br']);
  92408. var isImg = matchNodeNames(['img']);
  92409. var isContentEditableTrue$4 = hasContentEditableState('true');
  92410. var isContentEditableFalse$b = hasContentEditableState('false');
  92411. var isTableCell$5 = matchNodeNames([
  92412. 'td',
  92413. 'th'
  92414. ]);
  92415. var isMedia$2 = matchNodeNames([
  92416. 'video',
  92417. 'audio',
  92418. 'object',
  92419. 'embed'
  92420. ]);
  92421. var is$1 = function (lhs, rhs, comparator) {
  92422. if (comparator === void 0) {
  92423. comparator = tripleEquals;
  92424. }
  92425. return lhs.exists(function (left) {
  92426. return comparator(left, rhs);
  92427. });
  92428. };
  92429. var cat = function (arr) {
  92430. var r = [];
  92431. var push = function (x) {
  92432. r.push(x);
  92433. };
  92434. for (var i = 0; i < arr.length; i++) {
  92435. arr[i].each(push);
  92436. }
  92437. return r;
  92438. };
  92439. var lift2 = function (oa, ob, f) {
  92440. return oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();
  92441. };
  92442. var lift3 = function (oa, ob, oc, f) {
  92443. return oa.isSome() && ob.isSome() && oc.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Optional.none();
  92444. };
  92445. var someIf = function (b, a) {
  92446. return b ? Optional.some(a) : Optional.none();
  92447. };
  92448. var isSupported = function (dom) {
  92449. return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
  92450. };
  92451. var rawSet = function (dom, key, value) {
  92452. if (isString$1(value) || isBoolean(value) || isNumber(value)) {
  92453. dom.setAttribute(key, value + '');
  92454. } else {
  92455. console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);
  92456. throw new Error('Attribute value was not simple');
  92457. }
  92458. };
  92459. var set$1 = function (element, key, value) {
  92460. rawSet(element.dom, key, value);
  92461. };
  92462. var setAll$1 = function (element, attrs) {
  92463. var dom = element.dom;
  92464. each$j(attrs, function (v, k) {
  92465. rawSet(dom, k, v);
  92466. });
  92467. };
  92468. var get$6 = function (element, key) {
  92469. var v = element.dom.getAttribute(key);
  92470. return v === null ? undefined : v;
  92471. };
  92472. var getOpt = function (element, key) {
  92473. return Optional.from(get$6(element, key));
  92474. };
  92475. var has$1 = function (element, key) {
  92476. var dom = element.dom;
  92477. return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;
  92478. };
  92479. var remove$6 = function (element, key) {
  92480. element.dom.removeAttribute(key);
  92481. };
  92482. var clone$3 = function (element) {
  92483. return foldl(element.dom.attributes, function (acc, attr) {
  92484. acc[attr.name] = attr.value;
  92485. return acc;
  92486. }, {});
  92487. };
  92488. var internalSet = function (dom, property, value) {
  92489. if (!isString$1(value)) {
  92490. console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
  92491. throw new Error('CSS value must be a string: ' + value);
  92492. }
  92493. if (isSupported(dom)) {
  92494. dom.style.setProperty(property, value);
  92495. }
  92496. };
  92497. var setAll = function (element, css) {
  92498. var dom = element.dom;
  92499. each$j(css, function (v, k) {
  92500. internalSet(dom, k, v);
  92501. });
  92502. };
  92503. var get$5 = function (element, property) {
  92504. var dom = element.dom;
  92505. var styles = window.getComputedStyle(dom);
  92506. var r = styles.getPropertyValue(property);
  92507. return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
  92508. };
  92509. var getUnsafeProperty = function (dom, property) {
  92510. return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
  92511. };
  92512. var getRaw = function (element, property) {
  92513. var dom = element.dom;
  92514. var raw = getUnsafeProperty(dom, property);
  92515. return Optional.from(raw).filter(function (r) {
  92516. return r.length > 0;
  92517. });
  92518. };
  92519. var getAllRaw = function (element) {
  92520. var css = {};
  92521. var dom = element.dom;
  92522. if (isSupported(dom)) {
  92523. for (var i = 0; i < dom.style.length; i++) {
  92524. var ruleName = dom.style.item(i);
  92525. css[ruleName] = dom.style[ruleName];
  92526. }
  92527. }
  92528. return css;
  92529. };
  92530. var reflow = function (e) {
  92531. return e.dom.offsetWidth;
  92532. };
  92533. var browser$3 = detect().browser;
  92534. var firstElement = function (nodes) {
  92535. return find$3(nodes, isElement$6);
  92536. };
  92537. var getTableCaptionDeltaY = function (elm) {
  92538. if (browser$3.isFirefox() && name(elm) === 'table') {
  92539. return firstElement(children(elm)).filter(function (elm) {
  92540. return name(elm) === 'caption';
  92541. }).bind(function (caption) {
  92542. return firstElement(nextSiblings(caption)).map(function (body) {
  92543. var bodyTop = body.dom.offsetTop;
  92544. var captionTop = caption.dom.offsetTop;
  92545. var captionHeight = caption.dom.offsetHeight;
  92546. return bodyTop <= captionTop ? -captionHeight : 0;
  92547. });
  92548. }).getOr(0);
  92549. } else {
  92550. return 0;
  92551. }
  92552. };
  92553. var hasChild = function (elm, child) {
  92554. return elm.children && contains$3(elm.children, child);
  92555. };
  92556. var getPos = function (body, elm, rootElm) {
  92557. var x = 0, y = 0;
  92558. var doc = body.ownerDocument;
  92559. rootElm = rootElm ? rootElm : body;
  92560. if (elm) {
  92561. if (rootElm === body && elm.getBoundingClientRect && get$5(SugarElement.fromDom(body), 'position') === 'static') {
  92562. var pos = elm.getBoundingClientRect();
  92563. x = pos.left + (doc.documentElement.scrollLeft || body.scrollLeft) - doc.documentElement.clientLeft;
  92564. y = pos.top + (doc.documentElement.scrollTop || body.scrollTop) - doc.documentElement.clientTop;
  92565. return {
  92566. x: x,
  92567. y: y
  92568. };
  92569. }
  92570. var offsetParent = elm;
  92571. while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {
  92572. var castOffsetParent = offsetParent;
  92573. x += castOffsetParent.offsetLeft || 0;
  92574. y += castOffsetParent.offsetTop || 0;
  92575. offsetParent = castOffsetParent.offsetParent;
  92576. }
  92577. offsetParent = elm.parentNode;
  92578. while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {
  92579. x -= offsetParent.scrollLeft || 0;
  92580. y -= offsetParent.scrollTop || 0;
  92581. offsetParent = offsetParent.parentNode;
  92582. }
  92583. y += getTableCaptionDeltaY(SugarElement.fromDom(elm));
  92584. }
  92585. return {
  92586. x: x,
  92587. y: y
  92588. };
  92589. };
  92590. var exports$1 = {}, module$1 = { exports: exports$1 };
  92591. (function (define, exports, module, require) {
  92592. (function (global, factory) {
  92593. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EphoxContactWrapper = factory());
  92594. }(this, function () {
  92595. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  92596. var promise = { exports: {} };
  92597. (function (module) {
  92598. (function (root) {
  92599. var setTimeoutFunc = setTimeout;
  92600. function noop() {
  92601. }
  92602. function bind(fn, thisArg) {
  92603. return function () {
  92604. fn.apply(thisArg, arguments);
  92605. };
  92606. }
  92607. function Promise(fn) {
  92608. if (typeof this !== 'object')
  92609. throw new TypeError('Promises must be constructed via new');
  92610. if (typeof fn !== 'function')
  92611. throw new TypeError('not a function');
  92612. this._state = 0;
  92613. this._handled = false;
  92614. this._value = undefined;
  92615. this._deferreds = [];
  92616. doResolve(fn, this);
  92617. }
  92618. function handle(self, deferred) {
  92619. while (self._state === 3) {
  92620. self = self._value;
  92621. }
  92622. if (self._state === 0) {
  92623. self._deferreds.push(deferred);
  92624. return;
  92625. }
  92626. self._handled = true;
  92627. Promise._immediateFn(function () {
  92628. var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
  92629. if (cb === null) {
  92630. (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
  92631. return;
  92632. }
  92633. var ret;
  92634. try {
  92635. ret = cb(self._value);
  92636. } catch (e) {
  92637. reject(deferred.promise, e);
  92638. return;
  92639. }
  92640. resolve(deferred.promise, ret);
  92641. });
  92642. }
  92643. function resolve(self, newValue) {
  92644. try {
  92645. if (newValue === self)
  92646. throw new TypeError('A promise cannot be resolved with itself.');
  92647. if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
  92648. var then = newValue.then;
  92649. if (newValue instanceof Promise) {
  92650. self._state = 3;
  92651. self._value = newValue;
  92652. finale(self);
  92653. return;
  92654. } else if (typeof then === 'function') {
  92655. doResolve(bind(then, newValue), self);
  92656. return;
  92657. }
  92658. }
  92659. self._state = 1;
  92660. self._value = newValue;
  92661. finale(self);
  92662. } catch (e) {
  92663. reject(self, e);
  92664. }
  92665. }
  92666. function reject(self, newValue) {
  92667. self._state = 2;
  92668. self._value = newValue;
  92669. finale(self);
  92670. }
  92671. function finale(self) {
  92672. if (self._state === 2 && self._deferreds.length === 0) {
  92673. Promise._immediateFn(function () {
  92674. if (!self._handled) {
  92675. Promise._unhandledRejectionFn(self._value);
  92676. }
  92677. });
  92678. }
  92679. for (var i = 0, len = self._deferreds.length; i < len; i++) {
  92680. handle(self, self._deferreds[i]);
  92681. }
  92682. self._deferreds = null;
  92683. }
  92684. function Handler(onFulfilled, onRejected, promise) {
  92685. this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
  92686. this.onRejected = typeof onRejected === 'function' ? onRejected : null;
  92687. this.promise = promise;
  92688. }
  92689. function doResolve(fn, self) {
  92690. var done = false;
  92691. try {
  92692. fn(function (value) {
  92693. if (done)
  92694. return;
  92695. done = true;
  92696. resolve(self, value);
  92697. }, function (reason) {
  92698. if (done)
  92699. return;
  92700. done = true;
  92701. reject(self, reason);
  92702. });
  92703. } catch (ex) {
  92704. if (done)
  92705. return;
  92706. done = true;
  92707. reject(self, ex);
  92708. }
  92709. }
  92710. Promise.prototype['catch'] = function (onRejected) {
  92711. return this.then(null, onRejected);
  92712. };
  92713. Promise.prototype.then = function (onFulfilled, onRejected) {
  92714. var prom = new this.constructor(noop);
  92715. handle(this, new Handler(onFulfilled, onRejected, prom));
  92716. return prom;
  92717. };
  92718. Promise.all = function (arr) {
  92719. var args = Array.prototype.slice.call(arr);
  92720. return new Promise(function (resolve, reject) {
  92721. if (args.length === 0)
  92722. return resolve([]);
  92723. var remaining = args.length;
  92724. function res(i, val) {
  92725. try {
  92726. if (val && (typeof val === 'object' || typeof val === 'function')) {
  92727. var then = val.then;
  92728. if (typeof then === 'function') {
  92729. then.call(val, function (val) {
  92730. res(i, val);
  92731. }, reject);
  92732. return;
  92733. }
  92734. }
  92735. args[i] = val;
  92736. if (--remaining === 0) {
  92737. resolve(args);
  92738. }
  92739. } catch (ex) {
  92740. reject(ex);
  92741. }
  92742. }
  92743. for (var i = 0; i < args.length; i++) {
  92744. res(i, args[i]);
  92745. }
  92746. });
  92747. };
  92748. Promise.resolve = function (value) {
  92749. if (value && typeof value === 'object' && value.constructor === Promise) {
  92750. return value;
  92751. }
  92752. return new Promise(function (resolve) {
  92753. resolve(value);
  92754. });
  92755. };
  92756. Promise.reject = function (value) {
  92757. return new Promise(function (resolve, reject) {
  92758. reject(value);
  92759. });
  92760. };
  92761. Promise.race = function (values) {
  92762. return new Promise(function (resolve, reject) {
  92763. for (var i = 0, len = values.length; i < len; i++) {
  92764. values[i].then(resolve, reject);
  92765. }
  92766. });
  92767. };
  92768. Promise._immediateFn = typeof setImmediate === 'function' ? function (fn) {
  92769. setImmediate(fn);
  92770. } : function (fn) {
  92771. setTimeoutFunc(fn, 0);
  92772. };
  92773. Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
  92774. if (typeof console !== 'undefined' && console) {
  92775. console.warn('Possible Unhandled Promise Rejection:', err);
  92776. }
  92777. };
  92778. Promise._setImmediateFn = function _setImmediateFn(fn) {
  92779. Promise._immediateFn = fn;
  92780. };
  92781. Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
  92782. Promise._unhandledRejectionFn = fn;
  92783. };
  92784. if (module.exports) {
  92785. module.exports = Promise;
  92786. } else if (!root.Promise) {
  92787. root.Promise = Promise;
  92788. }
  92789. }(commonjsGlobal));
  92790. }(promise));
  92791. var promisePolyfill = promise.exports;
  92792. var Global = function () {
  92793. if (typeof window !== 'undefined') {
  92794. return window;
  92795. } else {
  92796. return Function('return this;')();
  92797. }
  92798. }();
  92799. var promisePolyfill_1 = { boltExport: Global.Promise || promisePolyfill };
  92800. return promisePolyfill_1;
  92801. }));
  92802. }(undefined, exports$1, module$1));
  92803. var Promise$1 = module$1.exports.boltExport;
  92804. var nu$1 = function (baseFn) {
  92805. var data = Optional.none();
  92806. var callbacks = [];
  92807. var map = function (f) {
  92808. return nu$1(function (nCallback) {
  92809. get(function (data) {
  92810. nCallback(f(data));
  92811. });
  92812. });
  92813. };
  92814. var get = function (nCallback) {
  92815. if (isReady()) {
  92816. call(nCallback);
  92817. } else {
  92818. callbacks.push(nCallback);
  92819. }
  92820. };
  92821. var set = function (x) {
  92822. if (!isReady()) {
  92823. data = Optional.some(x);
  92824. run(callbacks);
  92825. callbacks = [];
  92826. }
  92827. };
  92828. var isReady = function () {
  92829. return data.isSome();
  92830. };
  92831. var run = function (cbs) {
  92832. each$k(cbs, call);
  92833. };
  92834. var call = function (cb) {
  92835. data.each(function (x) {
  92836. setTimeout(function () {
  92837. cb(x);
  92838. }, 0);
  92839. });
  92840. };
  92841. baseFn(set);
  92842. return {
  92843. get: get,
  92844. map: map,
  92845. isReady: isReady
  92846. };
  92847. };
  92848. var pure$1 = function (a) {
  92849. return nu$1(function (callback) {
  92850. callback(a);
  92851. });
  92852. };
  92853. var LazyValue = {
  92854. nu: nu$1,
  92855. pure: pure$1
  92856. };
  92857. var errorReporter = function (err) {
  92858. setTimeout(function () {
  92859. throw err;
  92860. }, 0);
  92861. };
  92862. var make = function (run) {
  92863. var get = function (callback) {
  92864. run().then(callback, errorReporter);
  92865. };
  92866. var map = function (fab) {
  92867. return make(function () {
  92868. return run().then(fab);
  92869. });
  92870. };
  92871. var bind = function (aFutureB) {
  92872. return make(function () {
  92873. return run().then(function (v) {
  92874. return aFutureB(v).toPromise();
  92875. });
  92876. });
  92877. };
  92878. var anonBind = function (futureB) {
  92879. return make(function () {
  92880. return run().then(function () {
  92881. return futureB.toPromise();
  92882. });
  92883. });
  92884. };
  92885. var toLazy = function () {
  92886. return LazyValue.nu(get);
  92887. };
  92888. var toCached = function () {
  92889. var cache = null;
  92890. return make(function () {
  92891. if (cache === null) {
  92892. cache = run();
  92893. }
  92894. return cache;
  92895. });
  92896. };
  92897. var toPromise = run;
  92898. return {
  92899. map: map,
  92900. bind: bind,
  92901. anonBind: anonBind,
  92902. toLazy: toLazy,
  92903. toCached: toCached,
  92904. toPromise: toPromise,
  92905. get: get
  92906. };
  92907. };
  92908. var nu = function (baseFn) {
  92909. return make(function () {
  92910. return new Promise$1(baseFn);
  92911. });
  92912. };
  92913. var pure = function (a) {
  92914. return make(function () {
  92915. return Promise$1.resolve(a);
  92916. });
  92917. };
  92918. var Future = {
  92919. nu: nu,
  92920. pure: pure
  92921. };
  92922. var par$1 = function (asyncValues, nu) {
  92923. return nu(function (callback) {
  92924. var r = [];
  92925. var count = 0;
  92926. var cb = function (i) {
  92927. return function (value) {
  92928. r[i] = value;
  92929. count++;
  92930. if (count >= asyncValues.length) {
  92931. callback(r);
  92932. }
  92933. };
  92934. };
  92935. if (asyncValues.length === 0) {
  92936. callback([]);
  92937. } else {
  92938. each$k(asyncValues, function (asyncValue, i) {
  92939. asyncValue.get(cb(i));
  92940. });
  92941. }
  92942. });
  92943. };
  92944. var par = function (futures) {
  92945. return par$1(futures, Future.nu);
  92946. };
  92947. var value$1 = function (o) {
  92948. var or = function (_opt) {
  92949. return value$1(o);
  92950. };
  92951. var orThunk = function (_f) {
  92952. return value$1(o);
  92953. };
  92954. var map = function (f) {
  92955. return value$1(f(o));
  92956. };
  92957. var mapError = function (_f) {
  92958. return value$1(o);
  92959. };
  92960. var each = function (f) {
  92961. f(o);
  92962. };
  92963. var bind = function (f) {
  92964. return f(o);
  92965. };
  92966. var fold = function (_, onValue) {
  92967. return onValue(o);
  92968. };
  92969. var exists = function (f) {
  92970. return f(o);
  92971. };
  92972. var forall = function (f) {
  92973. return f(o);
  92974. };
  92975. var toOptional = function () {
  92976. return Optional.some(o);
  92977. };
  92978. return {
  92979. isValue: always,
  92980. isError: never,
  92981. getOr: constant(o),
  92982. getOrThunk: constant(o),
  92983. getOrDie: constant(o),
  92984. or: or,
  92985. orThunk: orThunk,
  92986. fold: fold,
  92987. map: map,
  92988. mapError: mapError,
  92989. each: each,
  92990. bind: bind,
  92991. exists: exists,
  92992. forall: forall,
  92993. toOptional: toOptional
  92994. };
  92995. };
  92996. var error = function (message) {
  92997. var getOrThunk = function (f) {
  92998. return f();
  92999. };
  93000. var getOrDie = function () {
  93001. return die(String(message))();
  93002. };
  93003. var or = identity;
  93004. var orThunk = function (f) {
  93005. return f();
  93006. };
  93007. var map = function (_f) {
  93008. return error(message);
  93009. };
  93010. var mapError = function (f) {
  93011. return error(f(message));
  93012. };
  93013. var bind = function (_f) {
  93014. return error(message);
  93015. };
  93016. var fold = function (onError, _) {
  93017. return onError(message);
  93018. };
  93019. return {
  93020. isValue: never,
  93021. isError: always,
  93022. getOr: identity,
  93023. getOrThunk: getOrThunk,
  93024. getOrDie: getOrDie,
  93025. or: or,
  93026. orThunk: orThunk,
  93027. fold: fold,
  93028. map: map,
  93029. mapError: mapError,
  93030. each: noop,
  93031. bind: bind,
  93032. exists: never,
  93033. forall: always,
  93034. toOptional: Optional.none
  93035. };
  93036. };
  93037. var fromOption = function (opt, err) {
  93038. return opt.fold(function () {
  93039. return error(err);
  93040. }, value$1);
  93041. };
  93042. var Result = {
  93043. value: value$1,
  93044. error: error,
  93045. fromOption: fromOption
  93046. };
  93047. var generate$1 = function (cases) {
  93048. if (!isArray$1(cases)) {
  93049. throw new Error('cases must be an array');
  93050. }
  93051. if (cases.length === 0) {
  93052. throw new Error('there must be at least one case');
  93053. }
  93054. var constructors = [];
  93055. var adt = {};
  93056. each$k(cases, function (acase, count) {
  93057. var keys$1 = keys(acase);
  93058. if (keys$1.length !== 1) {
  93059. throw new Error('one and only one name per case');
  93060. }
  93061. var key = keys$1[0];
  93062. var value = acase[key];
  93063. if (adt[key] !== undefined) {
  93064. throw new Error('duplicate key detected:' + key);
  93065. } else if (key === 'cata') {
  93066. throw new Error('cannot have a case named cata (sorry)');
  93067. } else if (!isArray$1(value)) {
  93068. throw new Error('case arguments must be an array');
  93069. }
  93070. constructors.push(key);
  93071. adt[key] = function () {
  93072. var args = [];
  93073. for (var _i = 0; _i < arguments.length; _i++) {
  93074. args[_i] = arguments[_i];
  93075. }
  93076. var argLength = args.length;
  93077. if (argLength !== value.length) {
  93078. throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
  93079. }
  93080. var match = function (branches) {
  93081. var branchKeys = keys(branches);
  93082. if (constructors.length !== branchKeys.length) {
  93083. throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
  93084. }
  93085. var allReqd = forall(constructors, function (reqKey) {
  93086. return contains$3(branchKeys, reqKey);
  93087. });
  93088. if (!allReqd) {
  93089. throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
  93090. }
  93091. return branches[key].apply(null, args);
  93092. };
  93093. return {
  93094. fold: function () {
  93095. var foldArgs = [];
  93096. for (var _i = 0; _i < arguments.length; _i++) {
  93097. foldArgs[_i] = arguments[_i];
  93098. }
  93099. if (foldArgs.length !== cases.length) {
  93100. throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length);
  93101. }
  93102. var target = foldArgs[count];
  93103. return target.apply(null, args);
  93104. },
  93105. match: match,
  93106. log: function (label) {
  93107. console.log(label, {
  93108. constructors: constructors,
  93109. constructor: key,
  93110. params: args
  93111. });
  93112. }
  93113. };
  93114. };
  93115. });
  93116. return adt;
  93117. };
  93118. var Adt = { generate: generate$1 };
  93119. Adt.generate([
  93120. {
  93121. bothErrors: [
  93122. 'error1',
  93123. 'error2'
  93124. ]
  93125. },
  93126. {
  93127. firstError: [
  93128. 'error1',
  93129. 'value2'
  93130. ]
  93131. },
  93132. {
  93133. secondError: [
  93134. 'value1',
  93135. 'error2'
  93136. ]
  93137. },
  93138. {
  93139. bothValues: [
  93140. 'value1',
  93141. 'value2'
  93142. ]
  93143. }
  93144. ]);
  93145. var unite = function (result) {
  93146. return result.fold(identity, identity);
  93147. };
  93148. function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
  93149. if (is(scope, a)) {
  93150. return Optional.some(scope);
  93151. } else if (isFunction(isRoot) && isRoot(scope)) {
  93152. return Optional.none();
  93153. } else {
  93154. return ancestor(scope, a, isRoot);
  93155. }
  93156. }
  93157. var ancestor$3 = function (scope, predicate, isRoot) {
  93158. var element = scope.dom;
  93159. var stop = isFunction(isRoot) ? isRoot : never;
  93160. while (element.parentNode) {
  93161. element = element.parentNode;
  93162. var el = SugarElement.fromDom(element);
  93163. if (predicate(el)) {
  93164. return Optional.some(el);
  93165. } else if (stop(el)) {
  93166. break;
  93167. }
  93168. }
  93169. return Optional.none();
  93170. };
  93171. var closest$3 = function (scope, predicate, isRoot) {
  93172. var is = function (s, test) {
  93173. return test(s);
  93174. };
  93175. return ClosestOrAncestor(is, ancestor$3, scope, predicate, isRoot);
  93176. };
  93177. var sibling$2 = function (scope, predicate) {
  93178. var element = scope.dom;
  93179. if (!element.parentNode) {
  93180. return Optional.none();
  93181. }
  93182. return child(SugarElement.fromDom(element.parentNode), function (x) {
  93183. return !eq(scope, x) && predicate(x);
  93184. });
  93185. };
  93186. var child = function (scope, predicate) {
  93187. var pred = function (node) {
  93188. return predicate(SugarElement.fromDom(node));
  93189. };
  93190. var result = find$3(scope.dom.childNodes, pred);
  93191. return result.map(SugarElement.fromDom);
  93192. };
  93193. var ancestor$2 = function (scope, selector, isRoot) {
  93194. return ancestor$3(scope, function (e) {
  93195. return is$2(e, selector);
  93196. }, isRoot);
  93197. };
  93198. var descendant = function (scope, selector) {
  93199. return one(selector, scope);
  93200. };
  93201. var closest$2 = function (scope, selector, isRoot) {
  93202. var is = function (element, selector) {
  93203. return is$2(element, selector);
  93204. };
  93205. return ClosestOrAncestor(is, ancestor$2, scope, selector, isRoot);
  93206. };
  93207. var promiseObj = window.Promise ? window.Promise : Promise$1;
  93208. var requestAnimationFramePromise;
  93209. var requestAnimationFrame = function (callback, element) {
  93210. var requestAnimationFrameFunc = window.requestAnimationFrame;
  93211. var vendors = [
  93212. 'ms',
  93213. 'moz',
  93214. 'webkit'
  93215. ];
  93216. var featurefill = function (cb) {
  93217. window.setTimeout(cb, 0);
  93218. };
  93219. for (var i = 0; i < vendors.length && !requestAnimationFrameFunc; i++) {
  93220. requestAnimationFrameFunc = window[vendors[i] + 'RequestAnimationFrame'];
  93221. }
  93222. if (!requestAnimationFrameFunc) {
  93223. requestAnimationFrameFunc = featurefill;
  93224. }
  93225. requestAnimationFrameFunc(callback, element);
  93226. };
  93227. var wrappedSetTimeout = function (callback, time) {
  93228. if (typeof time !== 'number') {
  93229. time = 0;
  93230. }
  93231. return setTimeout(callback, time);
  93232. };
  93233. var wrappedSetInterval = function (callback, time) {
  93234. if (typeof time !== 'number') {
  93235. time = 1;
  93236. }
  93237. return setInterval(callback, time);
  93238. };
  93239. var wrappedClearTimeout = function (id) {
  93240. return clearTimeout(id);
  93241. };
  93242. var wrappedClearInterval = function (id) {
  93243. return clearInterval(id);
  93244. };
  93245. var debounce = function (callback, time) {
  93246. var timer;
  93247. var func = function () {
  93248. var args = [];
  93249. for (var _i = 0; _i < arguments.length; _i++) {
  93250. args[_i] = arguments[_i];
  93251. }
  93252. clearTimeout(timer);
  93253. timer = wrappedSetTimeout(function () {
  93254. callback.apply(this, args);
  93255. }, time);
  93256. };
  93257. func.stop = function () {
  93258. clearTimeout(timer);
  93259. };
  93260. return func;
  93261. };
  93262. var Delay = {
  93263. requestAnimationFrame: function (callback, element) {
  93264. if (requestAnimationFramePromise) {
  93265. requestAnimationFramePromise.then(callback);
  93266. return;
  93267. }
  93268. requestAnimationFramePromise = new promiseObj(function (resolve) {
  93269. if (!element) {
  93270. element = document.body;
  93271. }
  93272. requestAnimationFrame(resolve, element);
  93273. }).then(callback);
  93274. },
  93275. setTimeout: wrappedSetTimeout,
  93276. setInterval: wrappedSetInterval,
  93277. setEditorTimeout: function (editor, callback, time) {
  93278. return wrappedSetTimeout(function () {
  93279. if (!editor.removed) {
  93280. callback();
  93281. }
  93282. }, time);
  93283. },
  93284. setEditorInterval: function (editor, callback, time) {
  93285. var timer = wrappedSetInterval(function () {
  93286. if (!editor.removed) {
  93287. callback();
  93288. } else {
  93289. clearInterval(timer);
  93290. }
  93291. }, time);
  93292. return timer;
  93293. },
  93294. debounce: debounce,
  93295. throttle: debounce,
  93296. clearInterval: wrappedClearInterval,
  93297. clearTimeout: wrappedClearTimeout
  93298. };
  93299. var StyleSheetLoader = function (documentOrShadowRoot, settings) {
  93300. if (settings === void 0) {
  93301. settings = {};
  93302. }
  93303. var idCount = 0;
  93304. var loadedStates = {};
  93305. var edos = SugarElement.fromDom(documentOrShadowRoot);
  93306. var doc = documentOrOwner(edos);
  93307. var maxLoadTime = settings.maxLoadTime || 5000;
  93308. var _setReferrerPolicy = function (referrerPolicy) {
  93309. settings.referrerPolicy = referrerPolicy;
  93310. };
  93311. var addStyle = function (element) {
  93312. append$1(getStyleContainer(edos), element);
  93313. };
  93314. var removeStyle = function (id) {
  93315. var styleContainer = getStyleContainer(edos);
  93316. descendant(styleContainer, '#' + id).each(remove$7);
  93317. };
  93318. var getOrCreateState = function (url) {
  93319. return get$9(loadedStates, url).getOrThunk(function () {
  93320. return {
  93321. id: 'mce-u' + idCount++,
  93322. passed: [],
  93323. failed: [],
  93324. count: 0
  93325. };
  93326. });
  93327. };
  93328. var load = function (url, success, failure) {
  93329. var link;
  93330. var urlWithSuffix = Tools._addCacheSuffix(url);
  93331. var state = getOrCreateState(urlWithSuffix);
  93332. loadedStates[urlWithSuffix] = state;
  93333. state.count++;
  93334. var resolve = function (callbacks, status) {
  93335. var i = callbacks.length;
  93336. while (i--) {
  93337. callbacks[i]();
  93338. }
  93339. state.status = status;
  93340. state.passed = [];
  93341. state.failed = [];
  93342. if (link) {
  93343. link.onload = null;
  93344. link.onerror = null;
  93345. link = null;
  93346. }
  93347. };
  93348. var passed = function () {
  93349. return resolve(state.passed, 2);
  93350. };
  93351. var failed = function () {
  93352. return resolve(state.failed, 3);
  93353. };
  93354. var wait = function (testCallback, waitCallback) {
  93355. if (!testCallback()) {
  93356. if (Date.now() - startTime < maxLoadTime) {
  93357. Delay.setTimeout(waitCallback);
  93358. } else {
  93359. failed();
  93360. }
  93361. }
  93362. };
  93363. var waitForWebKitLinkLoaded = function () {
  93364. wait(function () {
  93365. var styleSheets = documentOrShadowRoot.styleSheets;
  93366. var i = styleSheets.length;
  93367. while (i--) {
  93368. var styleSheet = styleSheets[i];
  93369. var owner = styleSheet.ownerNode;
  93370. if (owner && owner.id === link.id) {
  93371. passed();
  93372. return true;
  93373. }
  93374. }
  93375. return false;
  93376. }, waitForWebKitLinkLoaded);
  93377. };
  93378. if (success) {
  93379. state.passed.push(success);
  93380. }
  93381. if (failure) {
  93382. state.failed.push(failure);
  93383. }
  93384. if (state.status === 1) {
  93385. return;
  93386. }
  93387. if (state.status === 2) {
  93388. passed();
  93389. return;
  93390. }
  93391. if (state.status === 3) {
  93392. failed();
  93393. return;
  93394. }
  93395. state.status = 1;
  93396. var linkElem = SugarElement.fromTag('link', doc.dom);
  93397. setAll$1(linkElem, {
  93398. rel: 'stylesheet',
  93399. type: 'text/css',
  93400. id: state.id
  93401. });
  93402. var startTime = Date.now();
  93403. if (settings.contentCssCors) {
  93404. set$1(linkElem, 'crossOrigin', 'anonymous');
  93405. }
  93406. if (settings.referrerPolicy) {
  93407. set$1(linkElem, 'referrerpolicy', settings.referrerPolicy);
  93408. }
  93409. link = linkElem.dom;
  93410. link.onload = waitForWebKitLinkLoaded;
  93411. link.onerror = failed;
  93412. addStyle(linkElem);
  93413. set$1(linkElem, 'href', urlWithSuffix);
  93414. };
  93415. var loadF = function (url) {
  93416. return Future.nu(function (resolve) {
  93417. load(url, compose(resolve, constant(Result.value(url))), compose(resolve, constant(Result.error(url))));
  93418. });
  93419. };
  93420. var loadAll = function (urls, success, failure) {
  93421. par(map$3(urls, loadF)).get(function (result) {
  93422. var parts = partition(result, function (r) {
  93423. return r.isValue();
  93424. });
  93425. if (parts.fail.length > 0) {
  93426. failure(parts.fail.map(unite));
  93427. } else {
  93428. success(parts.pass.map(unite));
  93429. }
  93430. });
  93431. };
  93432. var unload = function (url) {
  93433. var urlWithSuffix = Tools._addCacheSuffix(url);
  93434. get$9(loadedStates, urlWithSuffix).each(function (state) {
  93435. var count = --state.count;
  93436. if (count === 0) {
  93437. delete loadedStates[urlWithSuffix];
  93438. removeStyle(state.id);
  93439. }
  93440. });
  93441. };
  93442. var unloadAll = function (urls) {
  93443. each$k(urls, function (url) {
  93444. unload(url);
  93445. });
  93446. };
  93447. return {
  93448. load: load,
  93449. loadAll: loadAll,
  93450. unload: unload,
  93451. unloadAll: unloadAll,
  93452. _setReferrerPolicy: _setReferrerPolicy
  93453. };
  93454. };
  93455. var create$8 = function () {
  93456. var map = new WeakMap();
  93457. var forElement = function (referenceElement, settings) {
  93458. var root = getRootNode(referenceElement);
  93459. var rootDom = root.dom;
  93460. return Optional.from(map.get(rootDom)).getOrThunk(function () {
  93461. var sl = StyleSheetLoader(rootDom, settings);
  93462. map.set(rootDom, sl);
  93463. return sl;
  93464. });
  93465. };
  93466. return { forElement: forElement };
  93467. };
  93468. var instance = create$8();
  93469. var DomTreeWalker = function () {
  93470. function DomTreeWalker(startNode, rootNode) {
  93471. this.node = startNode;
  93472. this.rootNode = rootNode;
  93473. this.current = this.current.bind(this);
  93474. this.next = this.next.bind(this);
  93475. this.prev = this.prev.bind(this);
  93476. this.prev2 = this.prev2.bind(this);
  93477. }
  93478. DomTreeWalker.prototype.current = function () {
  93479. return this.node;
  93480. };
  93481. DomTreeWalker.prototype.next = function (shallow) {
  93482. this.node = this.findSibling(this.node, 'firstChild', 'nextSibling', shallow);
  93483. return this.node;
  93484. };
  93485. DomTreeWalker.prototype.prev = function (shallow) {
  93486. this.node = this.findSibling(this.node, 'lastChild', 'previousSibling', shallow);
  93487. return this.node;
  93488. };
  93489. DomTreeWalker.prototype.prev2 = function (shallow) {
  93490. this.node = this.findPreviousNode(this.node, 'lastChild', 'previousSibling', shallow);
  93491. return this.node;
  93492. };
  93493. DomTreeWalker.prototype.findSibling = function (node, startName, siblingName, shallow) {
  93494. var sibling, parent;
  93495. if (node) {
  93496. if (!shallow && node[startName]) {
  93497. return node[startName];
  93498. }
  93499. if (node !== this.rootNode) {
  93500. sibling = node[siblingName];
  93501. if (sibling) {
  93502. return sibling;
  93503. }
  93504. for (parent = node.parentNode; parent && parent !== this.rootNode; parent = parent.parentNode) {
  93505. sibling = parent[siblingName];
  93506. if (sibling) {
  93507. return sibling;
  93508. }
  93509. }
  93510. }
  93511. }
  93512. };
  93513. DomTreeWalker.prototype.findPreviousNode = function (node, startName, siblingName, shallow) {
  93514. var sibling, parent, child;
  93515. if (node) {
  93516. sibling = node[siblingName];
  93517. if (this.rootNode && sibling === this.rootNode) {
  93518. return;
  93519. }
  93520. if (sibling) {
  93521. if (!shallow) {
  93522. for (child = sibling[startName]; child; child = child[startName]) {
  93523. if (!child[startName]) {
  93524. return child;
  93525. }
  93526. }
  93527. }
  93528. return sibling;
  93529. }
  93530. parent = node.parentNode;
  93531. if (parent && parent !== this.rootNode) {
  93532. return parent;
  93533. }
  93534. }
  93535. };
  93536. return DomTreeWalker;
  93537. }();
  93538. var blocks = [
  93539. 'article',
  93540. 'aside',
  93541. 'details',
  93542. 'div',
  93543. 'dt',
  93544. 'figcaption',
  93545. 'footer',
  93546. 'form',
  93547. 'fieldset',
  93548. 'header',
  93549. 'hgroup',
  93550. 'html',
  93551. 'main',
  93552. 'nav',
  93553. 'section',
  93554. 'summary',
  93555. 'body',
  93556. 'p',
  93557. 'dl',
  93558. 'multicol',
  93559. 'dd',
  93560. 'figure',
  93561. 'address',
  93562. 'center',
  93563. 'blockquote',
  93564. 'h1',
  93565. 'h2',
  93566. 'h3',
  93567. 'h4',
  93568. 'h5',
  93569. 'h6',
  93570. 'listing',
  93571. 'xmp',
  93572. 'pre',
  93573. 'plaintext',
  93574. 'menu',
  93575. 'dir',
  93576. 'ul',
  93577. 'ol',
  93578. 'li',
  93579. 'hr',
  93580. 'table',
  93581. 'tbody',
  93582. 'thead',
  93583. 'tfoot',
  93584. 'th',
  93585. 'tr',
  93586. 'td',
  93587. 'caption'
  93588. ];
  93589. var tableCells = [
  93590. 'td',
  93591. 'th'
  93592. ];
  93593. var tableSections = [
  93594. 'thead',
  93595. 'tbody',
  93596. 'tfoot'
  93597. ];
  93598. var textBlocks = [
  93599. 'h1',
  93600. 'h2',
  93601. 'h3',
  93602. 'h4',
  93603. 'h5',
  93604. 'h6',
  93605. 'p',
  93606. 'div',
  93607. 'address',
  93608. 'pre',
  93609. 'form',
  93610. 'blockquote',
  93611. 'center',
  93612. 'dir',
  93613. 'fieldset',
  93614. 'header',
  93615. 'footer',
  93616. 'article',
  93617. 'section',
  93618. 'hgroup',
  93619. 'aside',
  93620. 'nav',
  93621. 'figure'
  93622. ];
  93623. var headings = [
  93624. 'h1',
  93625. 'h2',
  93626. 'h3',
  93627. 'h4',
  93628. 'h5',
  93629. 'h6'
  93630. ];
  93631. var listItems$1 = [
  93632. 'li',
  93633. 'dd',
  93634. 'dt'
  93635. ];
  93636. var lists = [
  93637. 'ul',
  93638. 'ol',
  93639. 'dl'
  93640. ];
  93641. var wsElements = [
  93642. 'pre',
  93643. 'script',
  93644. 'textarea',
  93645. 'style'
  93646. ];
  93647. var lazyLookup = function (items) {
  93648. var lookup;
  93649. return function (node) {
  93650. lookup = lookup ? lookup : mapToObject(items, always);
  93651. return has$2(lookup, name(node));
  93652. };
  93653. };
  93654. var isHeading = lazyLookup(headings);
  93655. var isBlock$2 = lazyLookup(blocks);
  93656. var isTable$2 = function (node) {
  93657. return name(node) === 'table';
  93658. };
  93659. var isInline$1 = function (node) {
  93660. return isElement$6(node) && !isBlock$2(node);
  93661. };
  93662. var isBr$4 = function (node) {
  93663. return isElement$6(node) && name(node) === 'br';
  93664. };
  93665. var isTextBlock$2 = lazyLookup(textBlocks);
  93666. var isList = lazyLookup(lists);
  93667. var isListItem = lazyLookup(listItems$1);
  93668. var isTableSection = lazyLookup(tableSections);
  93669. var isTableCell$4 = lazyLookup(tableCells);
  93670. var isWsPreserveElement = lazyLookup(wsElements);
  93671. var ancestor$1 = function (scope, selector, isRoot) {
  93672. return ancestor$2(scope, selector, isRoot).isSome();
  93673. };
  93674. var zeroWidth = '\uFEFF';
  93675. var nbsp = '\xA0';
  93676. var isZwsp$1 = function (char) {
  93677. return char === zeroWidth;
  93678. };
  93679. var removeZwsp = function (s) {
  93680. return s.replace(/\uFEFF/g, '');
  93681. };
  93682. var ZWSP$1 = zeroWidth;
  93683. var isZwsp = isZwsp$1;
  93684. var trim$2 = removeZwsp;
  93685. var isElement$4 = isElement$5;
  93686. var isText$6 = isText$7;
  93687. var isCaretContainerBlock$1 = function (node) {
  93688. if (isText$6(node)) {
  93689. node = node.parentNode;
  93690. }
  93691. return isElement$4(node) && node.hasAttribute('data-mce-caret');
  93692. };
  93693. var isCaretContainerInline = function (node) {
  93694. return isText$6(node) && isZwsp(node.data);
  93695. };
  93696. var isCaretContainer$2 = function (node) {
  93697. return isCaretContainerBlock$1(node) || isCaretContainerInline(node);
  93698. };
  93699. var hasContent = function (node) {
  93700. return node.firstChild !== node.lastChild || !isBr$5(node.firstChild);
  93701. };
  93702. var insertInline$1 = function (node, before) {
  93703. var doc = node.ownerDocument;
  93704. var textNode = doc.createTextNode(ZWSP$1);
  93705. var parentNode = node.parentNode;
  93706. if (!before) {
  93707. var sibling = node.nextSibling;
  93708. if (isText$6(sibling)) {
  93709. if (isCaretContainer$2(sibling)) {
  93710. return sibling;
  93711. }
  93712. if (startsWithCaretContainer$1(sibling)) {
  93713. sibling.splitText(1);
  93714. return sibling;
  93715. }
  93716. }
  93717. if (node.nextSibling) {
  93718. parentNode.insertBefore(textNode, node.nextSibling);
  93719. } else {
  93720. parentNode.appendChild(textNode);
  93721. }
  93722. } else {
  93723. var sibling = node.previousSibling;
  93724. if (isText$6(sibling)) {
  93725. if (isCaretContainer$2(sibling)) {
  93726. return sibling;
  93727. }
  93728. if (endsWithCaretContainer$1(sibling)) {
  93729. return sibling.splitText(sibling.data.length - 1);
  93730. }
  93731. }
  93732. parentNode.insertBefore(textNode, node);
  93733. }
  93734. return textNode;
  93735. };
  93736. var isBeforeInline = function (pos) {
  93737. var container = pos.container();
  93738. if (!isText$7(container)) {
  93739. return false;
  93740. }
  93741. return container.data.charAt(pos.offset()) === ZWSP$1 || pos.isAtStart() && isCaretContainerInline(container.previousSibling);
  93742. };
  93743. var isAfterInline = function (pos) {
  93744. var container = pos.container();
  93745. if (!isText$7(container)) {
  93746. return false;
  93747. }
  93748. return container.data.charAt(pos.offset() - 1) === ZWSP$1 || pos.isAtEnd() && isCaretContainerInline(container.nextSibling);
  93749. };
  93750. var createBogusBr = function () {
  93751. var br = document.createElement('br');
  93752. br.setAttribute('data-mce-bogus', '1');
  93753. return br;
  93754. };
  93755. var insertBlock$1 = function (blockName, node, before) {
  93756. var doc = node.ownerDocument;
  93757. var blockNode = doc.createElement(blockName);
  93758. blockNode.setAttribute('data-mce-caret', before ? 'before' : 'after');
  93759. blockNode.setAttribute('data-mce-bogus', 'all');
  93760. blockNode.appendChild(createBogusBr());
  93761. var parentNode = node.parentNode;
  93762. if (!before) {
  93763. if (node.nextSibling) {
  93764. parentNode.insertBefore(blockNode, node.nextSibling);
  93765. } else {
  93766. parentNode.appendChild(blockNode);
  93767. }
  93768. } else {
  93769. parentNode.insertBefore(blockNode, node);
  93770. }
  93771. return blockNode;
  93772. };
  93773. var startsWithCaretContainer$1 = function (node) {
  93774. return isText$6(node) && node.data[0] === ZWSP$1;
  93775. };
  93776. var endsWithCaretContainer$1 = function (node) {
  93777. return isText$6(node) && node.data[node.data.length - 1] === ZWSP$1;
  93778. };
  93779. var trimBogusBr = function (elm) {
  93780. var brs = elm.getElementsByTagName('br');
  93781. var lastBr = brs[brs.length - 1];
  93782. if (isBogus$2(lastBr)) {
  93783. lastBr.parentNode.removeChild(lastBr);
  93784. }
  93785. };
  93786. var showCaretContainerBlock = function (caretContainer) {
  93787. if (caretContainer && caretContainer.hasAttribute('data-mce-caret')) {
  93788. trimBogusBr(caretContainer);
  93789. caretContainer.removeAttribute('data-mce-caret');
  93790. caretContainer.removeAttribute('data-mce-bogus');
  93791. caretContainer.removeAttribute('style');
  93792. caretContainer.removeAttribute('_moz_abspos');
  93793. return caretContainer;
  93794. }
  93795. return null;
  93796. };
  93797. var isRangeInCaretContainerBlock = function (range) {
  93798. return isCaretContainerBlock$1(range.startContainer);
  93799. };
  93800. var isContentEditableTrue$3 = isContentEditableTrue$4;
  93801. var isContentEditableFalse$a = isContentEditableFalse$b;
  93802. var isBr$3 = isBr$5;
  93803. var isText$5 = isText$7;
  93804. var isInvalidTextElement = matchNodeNames([
  93805. 'script',
  93806. 'style',
  93807. 'textarea'
  93808. ]);
  93809. var isAtomicInline = matchNodeNames([
  93810. 'img',
  93811. 'input',
  93812. 'textarea',
  93813. 'hr',
  93814. 'iframe',
  93815. 'video',
  93816. 'audio',
  93817. 'object',
  93818. 'embed'
  93819. ]);
  93820. var isTable$1 = matchNodeNames(['table']);
  93821. var isCaretContainer$1 = isCaretContainer$2;
  93822. var isCaretCandidate$3 = function (node) {
  93823. if (isCaretContainer$1(node)) {
  93824. return false;
  93825. }
  93826. if (isText$5(node)) {
  93827. return !isInvalidTextElement(node.parentNode);
  93828. }
  93829. return isAtomicInline(node) || isBr$3(node) || isTable$1(node) || isNonUiContentEditableFalse(node);
  93830. };
  93831. var isUnselectable = function (node) {
  93832. return isElement$5(node) && node.getAttribute('unselectable') === 'true';
  93833. };
  93834. var isNonUiContentEditableFalse = function (node) {
  93835. return isUnselectable(node) === false && isContentEditableFalse$a(node);
  93836. };
  93837. var isInEditable = function (node, root) {
  93838. for (node = node.parentNode; node && node !== root; node = node.parentNode) {
  93839. if (isNonUiContentEditableFalse(node)) {
  93840. return false;
  93841. }
  93842. if (isContentEditableTrue$3(node)) {
  93843. return true;
  93844. }
  93845. }
  93846. return true;
  93847. };
  93848. var isAtomicContentEditableFalse = function (node) {
  93849. if (!isNonUiContentEditableFalse(node)) {
  93850. return false;
  93851. }
  93852. return foldl(from(node.getElementsByTagName('*')), function (result, elm) {
  93853. return result || isContentEditableTrue$3(elm);
  93854. }, false) !== true;
  93855. };
  93856. var isAtomic$1 = function (node) {
  93857. return isAtomicInline(node) || isAtomicContentEditableFalse(node);
  93858. };
  93859. var isEditableCaretCandidate$1 = function (node, root) {
  93860. return isCaretCandidate$3(node) && isInEditable(node, root);
  93861. };
  93862. var whiteSpaceRegExp$1 = /^[ \t\r\n]*$/;
  93863. var isWhitespaceText = function (text) {
  93864. return whiteSpaceRegExp$1.test(text);
  93865. };
  93866. var hasWhitespacePreserveParent = function (node, rootNode) {
  93867. var rootElement = SugarElement.fromDom(rootNode);
  93868. var startNode = SugarElement.fromDom(node);
  93869. return ancestor$1(startNode, 'pre,code', curry(eq, rootElement));
  93870. };
  93871. var isWhitespace = function (node, rootNode) {
  93872. return isText$7(node) && isWhitespaceText(node.data) && hasWhitespacePreserveParent(node, rootNode) === false;
  93873. };
  93874. var isNamedAnchor = function (node) {
  93875. return isElement$5(node) && node.nodeName === 'A' && !node.hasAttribute('href') && (node.hasAttribute('name') || node.hasAttribute('id'));
  93876. };
  93877. var isContent$1 = function (node, rootNode) {
  93878. return isCaretCandidate$3(node) && isWhitespace(node, rootNode) === false || isNamedAnchor(node) || isBookmark(node);
  93879. };
  93880. var isBookmark = hasAttribute('data-mce-bookmark');
  93881. var isBogus$1 = hasAttribute('data-mce-bogus');
  93882. var isBogusAll = hasAttributeValue('data-mce-bogus', 'all');
  93883. var isEmptyNode = function (targetNode, skipBogus) {
  93884. var brCount = 0;
  93885. if (isContent$1(targetNode, targetNode)) {
  93886. return false;
  93887. } else {
  93888. var node = targetNode.firstChild;
  93889. if (!node) {
  93890. return true;
  93891. }
  93892. var walker = new DomTreeWalker(node, targetNode);
  93893. do {
  93894. if (skipBogus) {
  93895. if (isBogusAll(node)) {
  93896. node = walker.next(true);
  93897. continue;
  93898. }
  93899. if (isBogus$1(node)) {
  93900. node = walker.next();
  93901. continue;
  93902. }
  93903. }
  93904. if (isBr$5(node)) {
  93905. brCount++;
  93906. node = walker.next();
  93907. continue;
  93908. }
  93909. if (isContent$1(node, targetNode)) {
  93910. return false;
  93911. }
  93912. node = walker.next();
  93913. } while (node);
  93914. return brCount <= 1;
  93915. }
  93916. };
  93917. var isEmpty$2 = function (elm, skipBogus) {
  93918. if (skipBogus === void 0) {
  93919. skipBogus = true;
  93920. }
  93921. return isEmptyNode(elm.dom, skipBogus);
  93922. };
  93923. var isSpan = function (node) {
  93924. return node.nodeName.toLowerCase() === 'span';
  93925. };
  93926. var isInlineContent = function (node, root) {
  93927. return isNonNullable(node) && (isContent$1(node, root) || isInline$1(SugarElement.fromDom(node)));
  93928. };
  93929. var surroundedByInlineContent = function (node, root) {
  93930. var prev = new DomTreeWalker(node, root).prev(false);
  93931. var next = new DomTreeWalker(node, root).next(false);
  93932. var prevIsInline = isUndefined(prev) || isInlineContent(prev, root);
  93933. var nextIsInline = isUndefined(next) || isInlineContent(next, root);
  93934. return prevIsInline && nextIsInline;
  93935. };
  93936. var isBookmarkNode$2 = function (node) {
  93937. return isSpan(node) && node.getAttribute('data-mce-type') === 'bookmark';
  93938. };
  93939. var isKeepTextNode = function (node, root) {
  93940. return isText$7(node) && node.data.length > 0 && surroundedByInlineContent(node, root);
  93941. };
  93942. var isKeepElement = function (node) {
  93943. return isElement$5(node) ? node.childNodes.length > 0 : false;
  93944. };
  93945. var isDocument = function (node) {
  93946. return isDocumentFragment(node) || isDocument$1(node);
  93947. };
  93948. var trimNode = function (dom, node, root) {
  93949. var rootNode = root || node;
  93950. if (isElement$5(node) && isBookmarkNode$2(node)) {
  93951. return node;
  93952. }
  93953. var children = node.childNodes;
  93954. for (var i = children.length - 1; i >= 0; i--) {
  93955. trimNode(dom, children[i], rootNode);
  93956. }
  93957. if (isElement$5(node)) {
  93958. var currentChildren = node.childNodes;
  93959. if (currentChildren.length === 1 && isBookmarkNode$2(currentChildren[0])) {
  93960. node.parentNode.insertBefore(currentChildren[0], node);
  93961. }
  93962. }
  93963. if (!isDocument(node) && !isContent$1(node, rootNode) && !isKeepElement(node) && !isKeepTextNode(node, rootNode)) {
  93964. dom.remove(node);
  93965. }
  93966. return node;
  93967. };
  93968. var makeMap$3 = Tools.makeMap;
  93969. var attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  93970. var textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  93971. var rawCharsRegExp = /[<>&\"\']/g;
  93972. var entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi;
  93973. var asciiMap = {
  93974. 128: '\u20AC',
  93975. 130: '\u201A',
  93976. 131: '\u0192',
  93977. 132: '\u201E',
  93978. 133: '\u2026',
  93979. 134: '\u2020',
  93980. 135: '\u2021',
  93981. 136: '\u02c6',
  93982. 137: '\u2030',
  93983. 138: '\u0160',
  93984. 139: '\u2039',
  93985. 140: '\u0152',
  93986. 142: '\u017d',
  93987. 145: '\u2018',
  93988. 146: '\u2019',
  93989. 147: '\u201C',
  93990. 148: '\u201D',
  93991. 149: '\u2022',
  93992. 150: '\u2013',
  93993. 151: '\u2014',
  93994. 152: '\u02DC',
  93995. 153: '\u2122',
  93996. 154: '\u0161',
  93997. 155: '\u203A',
  93998. 156: '\u0153',
  93999. 158: '\u017e',
  94000. 159: '\u0178'
  94001. };
  94002. var baseEntities = {
  94003. '"': '&quot;',
  94004. '\'': '&#39;',
  94005. '<': '&lt;',
  94006. '>': '&gt;',
  94007. '&': '&amp;',
  94008. '`': '&#96;'
  94009. };
  94010. var reverseEntities = {
  94011. '&lt;': '<',
  94012. '&gt;': '>',
  94013. '&amp;': '&',
  94014. '&quot;': '"',
  94015. '&apos;': '\''
  94016. };
  94017. var nativeDecode = function (text) {
  94018. var elm = SugarElement.fromTag('div').dom;
  94019. elm.innerHTML = text;
  94020. return elm.textContent || elm.innerText || text;
  94021. };
  94022. var buildEntitiesLookup = function (items, radix) {
  94023. var i, chr, entity;
  94024. var lookup = {};
  94025. if (items) {
  94026. items = items.split(',');
  94027. radix = radix || 10;
  94028. for (i = 0; i < items.length; i += 2) {
  94029. chr = String.fromCharCode(parseInt(items[i], radix));
  94030. if (!baseEntities[chr]) {
  94031. entity = '&' + items[i + 1] + ';';
  94032. lookup[chr] = entity;
  94033. lookup[entity] = chr;
  94034. }
  94035. }
  94036. return lookup;
  94037. }
  94038. };
  94039. var namedEntities = buildEntitiesLookup('50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' + '5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' + '5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' + '5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' + '68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' + '6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' + '6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' + '75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' + '7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' + '7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' + 'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' + 'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' + 't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' + 'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' + 'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' + '81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' + '8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' + '8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' + '8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' + '8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' + 'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' + 'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' + 'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' + '80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' + '811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro', 32);
  94040. var encodeRaw = function (text, attr) {
  94041. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  94042. return baseEntities[chr] || chr;
  94043. });
  94044. };
  94045. var encodeAllRaw = function (text) {
  94046. return ('' + text).replace(rawCharsRegExp, function (chr) {
  94047. return baseEntities[chr] || chr;
  94048. });
  94049. };
  94050. var encodeNumeric = function (text, attr) {
  94051. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  94052. if (chr.length > 1) {
  94053. return '&#' + ((chr.charCodeAt(0) - 55296) * 1024 + (chr.charCodeAt(1) - 56320) + 65536) + ';';
  94054. }
  94055. return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';
  94056. });
  94057. };
  94058. var encodeNamed = function (text, attr, entities) {
  94059. entities = entities || namedEntities;
  94060. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  94061. return baseEntities[chr] || entities[chr] || chr;
  94062. });
  94063. };
  94064. var getEncodeFunc = function (name, entities) {
  94065. var entitiesMap = buildEntitiesLookup(entities) || namedEntities;
  94066. var encodeNamedAndNumeric = function (text, attr) {
  94067. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  94068. if (baseEntities[chr] !== undefined) {
  94069. return baseEntities[chr];
  94070. }
  94071. if (entitiesMap[chr] !== undefined) {
  94072. return entitiesMap[chr];
  94073. }
  94074. if (chr.length > 1) {
  94075. return '&#' + ((chr.charCodeAt(0) - 55296) * 1024 + (chr.charCodeAt(1) - 56320) + 65536) + ';';
  94076. }
  94077. return '&#' + chr.charCodeAt(0) + ';';
  94078. });
  94079. };
  94080. var encodeCustomNamed = function (text, attr) {
  94081. return encodeNamed(text, attr, entitiesMap);
  94082. };
  94083. var nameMap = makeMap$3(name.replace(/\+/g, ','));
  94084. if (nameMap.named && nameMap.numeric) {
  94085. return encodeNamedAndNumeric;
  94086. }
  94087. if (nameMap.named) {
  94088. if (entities) {
  94089. return encodeCustomNamed;
  94090. }
  94091. return encodeNamed;
  94092. }
  94093. if (nameMap.numeric) {
  94094. return encodeNumeric;
  94095. }
  94096. return encodeRaw;
  94097. };
  94098. var decode = function (text) {
  94099. return text.replace(entityRegExp, function (all, numeric) {
  94100. if (numeric) {
  94101. if (numeric.charAt(0).toLowerCase() === 'x') {
  94102. numeric = parseInt(numeric.substr(1), 16);
  94103. } else {
  94104. numeric = parseInt(numeric, 10);
  94105. }
  94106. if (numeric > 65535) {
  94107. numeric -= 65536;
  94108. return String.fromCharCode(55296 + (numeric >> 10), 56320 + (numeric & 1023));
  94109. }
  94110. return asciiMap[numeric] || String.fromCharCode(numeric);
  94111. }
  94112. return reverseEntities[all] || namedEntities[all] || nativeDecode(all);
  94113. });
  94114. };
  94115. var Entities = {
  94116. encodeRaw: encodeRaw,
  94117. encodeAllRaw: encodeAllRaw,
  94118. encodeNumeric: encodeNumeric,
  94119. encodeNamed: encodeNamed,
  94120. getEncodeFunc: getEncodeFunc,
  94121. decode: decode
  94122. };
  94123. var mapCache = {}, dummyObj = {};
  94124. var makeMap$2 = Tools.makeMap, each$h = Tools.each, extend$5 = Tools.extend, explode$3 = Tools.explode, inArray$2 = Tools.inArray;
  94125. var split$1 = function (items, delim) {
  94126. items = Tools.trim(items);
  94127. return items ? items.split(delim || ' ') : [];
  94128. };
  94129. var createMap = function (defaultValue, extendWith) {
  94130. var value = makeMap$2(defaultValue, ' ', makeMap$2(defaultValue.toUpperCase(), ' '));
  94131. return extend$5(value, extendWith);
  94132. };
  94133. var getTextRootBlockElements = function (schema) {
  94134. return createMap('td th li dt dd figcaption caption details summary', schema.getTextBlockElements());
  94135. };
  94136. var compileSchema = function (type) {
  94137. var schema = {};
  94138. var globalAttributes, blockContent;
  94139. var phrasingContent, flowContent, html4BlockContent, html4PhrasingContent;
  94140. var add = function (name, attributes, children) {
  94141. var ni, attributesOrder, element;
  94142. var arrayToMap = function (array, obj) {
  94143. var map = {};
  94144. var i, l;
  94145. for (i = 0, l = array.length; i < l; i++) {
  94146. map[array[i]] = obj || {};
  94147. }
  94148. return map;
  94149. };
  94150. children = children || [];
  94151. attributes = attributes || '';
  94152. if (typeof children === 'string') {
  94153. children = split$1(children);
  94154. }
  94155. var names = split$1(name);
  94156. ni = names.length;
  94157. while (ni--) {
  94158. attributesOrder = split$1([
  94159. globalAttributes,
  94160. attributes
  94161. ].join(' '));
  94162. element = {
  94163. attributes: arrayToMap(attributesOrder),
  94164. attributesOrder: attributesOrder,
  94165. children: arrayToMap(children, dummyObj)
  94166. };
  94167. schema[names[ni]] = element;
  94168. }
  94169. };
  94170. var addAttrs = function (name, attributes) {
  94171. var ni, schemaItem, i, l;
  94172. var names = split$1(name);
  94173. ni = names.length;
  94174. var attrs = split$1(attributes);
  94175. while (ni--) {
  94176. schemaItem = schema[names[ni]];
  94177. for (i = 0, l = attrs.length; i < l; i++) {
  94178. schemaItem.attributes[attrs[i]] = {};
  94179. schemaItem.attributesOrder.push(attrs[i]);
  94180. }
  94181. }
  94182. };
  94183. if (mapCache[type]) {
  94184. return mapCache[type];
  94185. }
  94186. globalAttributes = 'id accesskey class dir lang style tabindex title role';
  94187. blockContent = 'address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul';
  94188. phrasingContent = 'a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd ' + 'label map noscript object q s samp script select small span strong sub sup ' + 'textarea u var #text #comment';
  94189. if (type !== 'html4') {
  94190. globalAttributes += ' contenteditable contextmenu draggable dropzone ' + 'hidden spellcheck translate';
  94191. blockContent += ' article aside details dialog figure main header footer hgroup section nav';
  94192. phrasingContent += ' audio canvas command datalist mark meter output picture ' + 'progress time wbr video ruby bdi keygen';
  94193. }
  94194. if (type !== 'html5-strict') {
  94195. globalAttributes += ' xml:lang';
  94196. html4PhrasingContent = 'acronym applet basefont big font strike tt';
  94197. phrasingContent = [
  94198. phrasingContent,
  94199. html4PhrasingContent
  94200. ].join(' ');
  94201. each$h(split$1(html4PhrasingContent), function (name) {
  94202. add(name, '', phrasingContent);
  94203. });
  94204. html4BlockContent = 'center dir isindex noframes';
  94205. blockContent = [
  94206. blockContent,
  94207. html4BlockContent
  94208. ].join(' ');
  94209. flowContent = [
  94210. blockContent,
  94211. phrasingContent
  94212. ].join(' ');
  94213. each$h(split$1(html4BlockContent), function (name) {
  94214. add(name, '', flowContent);
  94215. });
  94216. }
  94217. flowContent = flowContent || [
  94218. blockContent,
  94219. phrasingContent
  94220. ].join(' ');
  94221. add('html', 'manifest', 'head body');
  94222. add('head', '', 'base command link meta noscript script style title');
  94223. add('title hr noscript br');
  94224. add('base', 'href target');
  94225. add('link', 'href rel media hreflang type sizes hreflang');
  94226. add('meta', 'name http-equiv content charset');
  94227. add('style', 'media type scoped');
  94228. add('script', 'src async defer type charset');
  94229. add('body', 'onafterprint onbeforeprint onbeforeunload onblur onerror onfocus ' + 'onhashchange onload onmessage onoffline ononline onpagehide onpageshow ' + 'onpopstate onresize onscroll onstorage onunload', flowContent);
  94230. add('address dt dd div caption', '', flowContent);
  94231. add('h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn', '', phrasingContent);
  94232. add('blockquote', 'cite', flowContent);
  94233. add('ol', 'reversed start type', 'li');
  94234. add('ul', '', 'li');
  94235. add('li', 'value', flowContent);
  94236. add('dl', '', 'dt dd');
  94237. add('a', 'href target rel media hreflang type', phrasingContent);
  94238. add('q', 'cite', phrasingContent);
  94239. add('ins del', 'cite datetime', flowContent);
  94240. add('img', 'src sizes srcset alt usemap ismap width height');
  94241. add('iframe', 'src name width height', flowContent);
  94242. add('embed', 'src type width height');
  94243. add('object', 'data type typemustmatch name usemap form width height', [
  94244. flowContent,
  94245. 'param'
  94246. ].join(' '));
  94247. add('param', 'name value');
  94248. add('map', 'name', [
  94249. flowContent,
  94250. 'area'
  94251. ].join(' '));
  94252. add('area', 'alt coords shape href target rel media hreflang type');
  94253. add('table', 'border', 'caption colgroup thead tfoot tbody tr' + (type === 'html4' ? ' col' : ''));
  94254. add('colgroup', 'span', 'col');
  94255. add('col', 'span');
  94256. add('tbody thead tfoot', '', 'tr');
  94257. add('tr', '', 'td th');
  94258. add('td', 'colspan rowspan headers', flowContent);
  94259. add('th', 'colspan rowspan headers scope abbr', flowContent);
  94260. add('form', 'accept-charset action autocomplete enctype method name novalidate target', flowContent);
  94261. add('fieldset', 'disabled form name', [
  94262. flowContent,
  94263. 'legend'
  94264. ].join(' '));
  94265. add('label', 'form for', phrasingContent);
  94266. add('input', 'accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate ' + 'formtarget height list max maxlength min multiple name pattern readonly required size src step type value width');
  94267. add('button', 'disabled form formaction formenctype formmethod formnovalidate formtarget name type value', type === 'html4' ? flowContent : phrasingContent);
  94268. add('select', 'disabled form multiple name required size', 'option optgroup');
  94269. add('optgroup', 'disabled label', 'option');
  94270. add('option', 'disabled label selected value');
  94271. add('textarea', 'cols dirname disabled form maxlength name readonly required rows wrap');
  94272. add('menu', 'type label', [
  94273. flowContent,
  94274. 'li'
  94275. ].join(' '));
  94276. add('noscript', '', flowContent);
  94277. if (type !== 'html4') {
  94278. add('wbr');
  94279. add('ruby', '', [
  94280. phrasingContent,
  94281. 'rt rp'
  94282. ].join(' '));
  94283. add('figcaption', '', flowContent);
  94284. add('mark rt rp summary bdi', '', phrasingContent);
  94285. add('canvas', 'width height', flowContent);
  94286. add('video', 'src crossorigin poster preload autoplay mediagroup loop ' + 'muted controls width height buffered', [
  94287. flowContent,
  94288. 'track source'
  94289. ].join(' '));
  94290. add('audio', 'src crossorigin preload autoplay mediagroup loop muted controls ' + 'buffered volume', [
  94291. flowContent,
  94292. 'track source'
  94293. ].join(' '));
  94294. add('picture', '', 'img source');
  94295. add('source', 'src srcset type media sizes');
  94296. add('track', 'kind src srclang label default');
  94297. add('datalist', '', [
  94298. phrasingContent,
  94299. 'option'
  94300. ].join(' '));
  94301. add('article section nav aside main header footer', '', flowContent);
  94302. add('hgroup', '', 'h1 h2 h3 h4 h5 h6');
  94303. add('figure', '', [
  94304. flowContent,
  94305. 'figcaption'
  94306. ].join(' '));
  94307. add('time', 'datetime', phrasingContent);
  94308. add('dialog', 'open', flowContent);
  94309. add('command', 'type label icon disabled checked radiogroup command');
  94310. add('output', 'for form name', phrasingContent);
  94311. add('progress', 'value max', phrasingContent);
  94312. add('meter', 'value min max low high optimum', phrasingContent);
  94313. add('details', 'open', [
  94314. flowContent,
  94315. 'summary'
  94316. ].join(' '));
  94317. add('keygen', 'autofocus challenge disabled form keytype name');
  94318. }
  94319. if (type !== 'html5-strict') {
  94320. addAttrs('script', 'language xml:space');
  94321. addAttrs('style', 'xml:space');
  94322. addAttrs('object', 'declare classid code codebase codetype archive standby align border hspace vspace');
  94323. addAttrs('embed', 'align name hspace vspace');
  94324. addAttrs('param', 'valuetype type');
  94325. addAttrs('a', 'charset name rev shape coords');
  94326. addAttrs('br', 'clear');
  94327. addAttrs('applet', 'codebase archive code object alt name width height align hspace vspace');
  94328. addAttrs('img', 'name longdesc align border hspace vspace');
  94329. addAttrs('iframe', 'longdesc frameborder marginwidth marginheight scrolling align');
  94330. addAttrs('font basefont', 'size color face');
  94331. addAttrs('input', 'usemap align');
  94332. addAttrs('select');
  94333. addAttrs('textarea');
  94334. addAttrs('h1 h2 h3 h4 h5 h6 div p legend caption', 'align');
  94335. addAttrs('ul', 'type compact');
  94336. addAttrs('li', 'type');
  94337. addAttrs('ol dl menu dir', 'compact');
  94338. addAttrs('pre', 'width xml:space');
  94339. addAttrs('hr', 'align noshade size width');
  94340. addAttrs('isindex', 'prompt');
  94341. addAttrs('table', 'summary width frame rules cellspacing cellpadding align bgcolor');
  94342. addAttrs('col', 'width align char charoff valign');
  94343. addAttrs('colgroup', 'width align char charoff valign');
  94344. addAttrs('thead', 'align char charoff valign');
  94345. addAttrs('tr', 'align char charoff valign bgcolor');
  94346. addAttrs('th', 'axis align char charoff valign nowrap bgcolor width height');
  94347. addAttrs('form', 'accept');
  94348. addAttrs('td', 'abbr axis scope align char charoff valign nowrap bgcolor width height');
  94349. addAttrs('tfoot', 'align char charoff valign');
  94350. addAttrs('tbody', 'align char charoff valign');
  94351. addAttrs('area', 'nohref');
  94352. addAttrs('body', 'background bgcolor text link vlink alink');
  94353. }
  94354. if (type !== 'html4') {
  94355. addAttrs('input button select textarea', 'autofocus');
  94356. addAttrs('input textarea', 'placeholder');
  94357. addAttrs('a', 'download');
  94358. addAttrs('link script img', 'crossorigin');
  94359. addAttrs('img', 'loading');
  94360. addAttrs('iframe', 'sandbox seamless allowfullscreen loading');
  94361. }
  94362. each$h(split$1('a form meter progress dfn'), function (name) {
  94363. if (schema[name]) {
  94364. delete schema[name].children[name];
  94365. }
  94366. });
  94367. delete schema.caption.children.table;
  94368. delete schema.script;
  94369. mapCache[type] = schema;
  94370. return schema;
  94371. };
  94372. var compileElementMap = function (value, mode) {
  94373. var styles;
  94374. if (value) {
  94375. styles = {};
  94376. if (typeof value === 'string') {
  94377. value = { '*': value };
  94378. }
  94379. each$h(value, function (value, key) {
  94380. styles[key] = styles[key.toUpperCase()] = mode === 'map' ? makeMap$2(value, /[, ]/) : explode$3(value, /[, ]/);
  94381. });
  94382. }
  94383. return styles;
  94384. };
  94385. var Schema = function (settings) {
  94386. var elements = {};
  94387. var children = {};
  94388. var patternElements = [];
  94389. var customElementsMap = {}, specialElements = {};
  94390. var createLookupTable = function (option, defaultValue, extendWith) {
  94391. var value = settings[option];
  94392. if (!value) {
  94393. value = mapCache[option];
  94394. if (!value) {
  94395. value = createMap(defaultValue, extendWith);
  94396. mapCache[option] = value;
  94397. }
  94398. } else {
  94399. value = makeMap$2(value, /[, ]/, makeMap$2(value.toUpperCase(), /[, ]/));
  94400. }
  94401. return value;
  94402. };
  94403. settings = settings || {};
  94404. var schemaItems = compileSchema(settings.schema);
  94405. if (settings.verify_html === false) {
  94406. settings.valid_elements = '*[*]';
  94407. }
  94408. var validStyles = compileElementMap(settings.valid_styles);
  94409. var invalidStyles = compileElementMap(settings.invalid_styles, 'map');
  94410. var validClasses = compileElementMap(settings.valid_classes, 'map');
  94411. var whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea video audio iframe object code');
  94412. var selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
  94413. var shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link ' + 'meta param embed source wbr track');
  94414. var boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize ' + 'noshade nowrap readonly selected autoplay loop controls');
  94415. var nonEmptyOrMoveCaretBeforeOnEnter = 'td th iframe video audio object script code';
  94416. var nonEmptyElementsMap = createLookupTable('non_empty_elements', nonEmptyOrMoveCaretBeforeOnEnter + ' pre', shortEndedElementsMap);
  94417. var moveCaretBeforeOnEnterElementsMap = createLookupTable('move_caret_before_on_enter_elements', nonEmptyOrMoveCaretBeforeOnEnter + ' table', shortEndedElementsMap);
  94418. var textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' + 'blockquote center dir fieldset header footer article section hgroup aside main nav figure');
  94419. var blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' + 'th tr td li ol ul caption dl dt dd noscript menu isindex option ' + 'datalist select optgroup figcaption details summary', textBlockElementsMap);
  94420. var textInlineElementsMap = createLookupTable('text_inline_elements', 'span strong b em i font s strike u var cite ' + 'dfn code mark q sup sub samp');
  94421. each$h((settings.special || 'script noscript iframe noframes noembed title style textarea xmp').split(' '), function (name) {
  94422. specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
  94423. });
  94424. var patternToRegExp = function (str) {
  94425. return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');
  94426. };
  94427. var addValidElements = function (validElements) {
  94428. var ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder, prefix, outputName, globalAttributes, globalAttributesOrder, value;
  94429. var elementRuleRegExp = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/, attrRuleRegExp = /^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/, hasPatternsRegExp = /[*?+]/;
  94430. if (validElements) {
  94431. var validElementsArr = split$1(validElements, ',');
  94432. if (elements['@']) {
  94433. globalAttributes = elements['@'].attributes;
  94434. globalAttributesOrder = elements['@'].attributesOrder;
  94435. }
  94436. for (ei = 0, el = validElementsArr.length; ei < el; ei++) {
  94437. matches = elementRuleRegExp.exec(validElementsArr[ei]);
  94438. if (matches) {
  94439. prefix = matches[1];
  94440. elementName = matches[2];
  94441. outputName = matches[3];
  94442. attrData = matches[5];
  94443. attributes = {};
  94444. attributesOrder = [];
  94445. element = {
  94446. attributes: attributes,
  94447. attributesOrder: attributesOrder
  94448. };
  94449. if (prefix === '#') {
  94450. element.paddEmpty = true;
  94451. }
  94452. if (prefix === '-') {
  94453. element.removeEmpty = true;
  94454. }
  94455. if (matches[4] === '!') {
  94456. element.removeEmptyAttrs = true;
  94457. }
  94458. if (globalAttributes) {
  94459. each$j(globalAttributes, function (value, key) {
  94460. attributes[key] = value;
  94461. });
  94462. attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
  94463. }
  94464. if (attrData) {
  94465. attrData = split$1(attrData, '|');
  94466. for (ai = 0, al = attrData.length; ai < al; ai++) {
  94467. matches = attrRuleRegExp.exec(attrData[ai]);
  94468. if (matches) {
  94469. attr = {};
  94470. attrType = matches[1];
  94471. attrName = matches[2].replace(/[\\:]:/g, ':');
  94472. prefix = matches[3];
  94473. value = matches[4];
  94474. if (attrType === '!') {
  94475. element.attributesRequired = element.attributesRequired || [];
  94476. element.attributesRequired.push(attrName);
  94477. attr.required = true;
  94478. }
  94479. if (attrType === '-') {
  94480. delete attributes[attrName];
  94481. attributesOrder.splice(inArray$2(attributesOrder, attrName), 1);
  94482. continue;
  94483. }
  94484. if (prefix) {
  94485. if (prefix === '=') {
  94486. element.attributesDefault = element.attributesDefault || [];
  94487. element.attributesDefault.push({
  94488. name: attrName,
  94489. value: value
  94490. });
  94491. attr.defaultValue = value;
  94492. }
  94493. if (prefix === ':') {
  94494. element.attributesForced = element.attributesForced || [];
  94495. element.attributesForced.push({
  94496. name: attrName,
  94497. value: value
  94498. });
  94499. attr.forcedValue = value;
  94500. }
  94501. if (prefix === '<') {
  94502. attr.validValues = makeMap$2(value, '?');
  94503. }
  94504. }
  94505. if (hasPatternsRegExp.test(attrName)) {
  94506. element.attributePatterns = element.attributePatterns || [];
  94507. attr.pattern = patternToRegExp(attrName);
  94508. element.attributePatterns.push(attr);
  94509. } else {
  94510. if (!attributes[attrName]) {
  94511. attributesOrder.push(attrName);
  94512. }
  94513. attributes[attrName] = attr;
  94514. }
  94515. }
  94516. }
  94517. }
  94518. if (!globalAttributes && elementName === '@') {
  94519. globalAttributes = attributes;
  94520. globalAttributesOrder = attributesOrder;
  94521. }
  94522. if (outputName) {
  94523. element.outputName = elementName;
  94524. elements[outputName] = element;
  94525. }
  94526. if (hasPatternsRegExp.test(elementName)) {
  94527. element.pattern = patternToRegExp(elementName);
  94528. patternElements.push(element);
  94529. } else {
  94530. elements[elementName] = element;
  94531. }
  94532. }
  94533. }
  94534. }
  94535. };
  94536. var setValidElements = function (validElements) {
  94537. elements = {};
  94538. patternElements = [];
  94539. addValidElements(validElements);
  94540. each$h(schemaItems, function (element, name) {
  94541. children[name] = element.children;
  94542. });
  94543. };
  94544. var addCustomElements = function (customElements) {
  94545. var customElementRegExp = /^(~)?(.+)$/;
  94546. if (customElements) {
  94547. mapCache.text_block_elements = mapCache.block_elements = null;
  94548. each$h(split$1(customElements, ','), function (rule) {
  94549. var matches = customElementRegExp.exec(rule), inline = matches[1] === '~', cloneName = inline ? 'span' : 'div', name = matches[2];
  94550. children[name] = children[cloneName];
  94551. customElementsMap[name] = cloneName;
  94552. if (!inline) {
  94553. blockElementsMap[name.toUpperCase()] = {};
  94554. blockElementsMap[name] = {};
  94555. }
  94556. if (!elements[name]) {
  94557. var customRule = elements[cloneName];
  94558. customRule = extend$5({}, customRule);
  94559. delete customRule.removeEmptyAttrs;
  94560. delete customRule.removeEmpty;
  94561. elements[name] = customRule;
  94562. }
  94563. each$h(children, function (element, elmName) {
  94564. if (element[cloneName]) {
  94565. children[elmName] = element = extend$5({}, children[elmName]);
  94566. element[name] = element[cloneName];
  94567. }
  94568. });
  94569. });
  94570. }
  94571. };
  94572. var addValidChildren = function (validChildren) {
  94573. var childRuleRegExp = /^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;
  94574. mapCache[settings.schema] = null;
  94575. if (validChildren) {
  94576. each$h(split$1(validChildren, ','), function (rule) {
  94577. var matches = childRuleRegExp.exec(rule);
  94578. var parent, prefix;
  94579. if (matches) {
  94580. prefix = matches[1];
  94581. if (prefix) {
  94582. parent = children[matches[2]];
  94583. } else {
  94584. parent = children[matches[2]] = { '#comment': {} };
  94585. }
  94586. parent = children[matches[2]];
  94587. each$h(split$1(matches[3], '|'), function (child) {
  94588. if (prefix === '-') {
  94589. delete parent[child];
  94590. } else {
  94591. parent[child] = {};
  94592. }
  94593. });
  94594. }
  94595. });
  94596. }
  94597. };
  94598. var getElementRule = function (name) {
  94599. var element = elements[name], i;
  94600. if (element) {
  94601. return element;
  94602. }
  94603. i = patternElements.length;
  94604. while (i--) {
  94605. element = patternElements[i];
  94606. if (element.pattern.test(name)) {
  94607. return element;
  94608. }
  94609. }
  94610. };
  94611. if (!settings.valid_elements) {
  94612. each$h(schemaItems, function (element, name) {
  94613. elements[name] = {
  94614. attributes: element.attributes,
  94615. attributesOrder: element.attributesOrder
  94616. };
  94617. children[name] = element.children;
  94618. });
  94619. if (settings.schema !== 'html5') {
  94620. each$h(split$1('strong/b em/i'), function (item) {
  94621. var items = split$1(item, '/');
  94622. elements[items[1]].outputName = items[0];
  94623. });
  94624. }
  94625. each$h(textInlineElementsMap, function (_val, name) {
  94626. if (elements[name]) {
  94627. if (settings.padd_empty_block_inline_children) {
  94628. elements[name].paddInEmptyBlock = true;
  94629. }
  94630. elements[name].removeEmpty = true;
  94631. }
  94632. });
  94633. each$h(split$1('ol ul blockquote a table tbody'), function (name) {
  94634. if (elements[name]) {
  94635. elements[name].removeEmpty = true;
  94636. }
  94637. });
  94638. each$h(split$1('p h1 h2 h3 h4 h5 h6 th td pre div address caption li'), function (name) {
  94639. elements[name].paddEmpty = true;
  94640. });
  94641. each$h(split$1('span'), function (name) {
  94642. elements[name].removeEmptyAttrs = true;
  94643. });
  94644. } else {
  94645. setValidElements(settings.valid_elements);
  94646. }
  94647. addCustomElements(settings.custom_elements);
  94648. addValidChildren(settings.valid_children);
  94649. addValidElements(settings.extended_valid_elements);
  94650. addValidChildren('+ol[ul|ol],+ul[ul|ol]');
  94651. each$h({
  94652. dd: 'dl',
  94653. dt: 'dl',
  94654. li: 'ul ol',
  94655. td: 'tr',
  94656. th: 'tr',
  94657. tr: 'tbody thead tfoot',
  94658. tbody: 'table',
  94659. thead: 'table',
  94660. tfoot: 'table',
  94661. legend: 'fieldset',
  94662. area: 'map',
  94663. param: 'video audio object'
  94664. }, function (parents, item) {
  94665. if (elements[item]) {
  94666. elements[item].parentsRequired = split$1(parents);
  94667. }
  94668. });
  94669. if (settings.invalid_elements) {
  94670. each$h(explode$3(settings.invalid_elements), function (item) {
  94671. if (elements[item]) {
  94672. delete elements[item];
  94673. }
  94674. });
  94675. }
  94676. if (!getElementRule('span')) {
  94677. addValidElements('span[!data-mce-type|*]');
  94678. }
  94679. var getValidStyles = constant(validStyles);
  94680. var getInvalidStyles = constant(invalidStyles);
  94681. var getValidClasses = constant(validClasses);
  94682. var getBoolAttrs = constant(boolAttrMap);
  94683. var getBlockElements = constant(blockElementsMap);
  94684. var getTextBlockElements = constant(textBlockElementsMap);
  94685. var getTextInlineElements = constant(textInlineElementsMap);
  94686. var getShortEndedElements = constant(shortEndedElementsMap);
  94687. var getSelfClosingElements = constant(selfClosingElementsMap);
  94688. var getNonEmptyElements = constant(nonEmptyElementsMap);
  94689. var getMoveCaretBeforeOnEnterElements = constant(moveCaretBeforeOnEnterElementsMap);
  94690. var getWhiteSpaceElements = constant(whiteSpaceElementsMap);
  94691. var getSpecialElements = constant(specialElements);
  94692. var isValidChild = function (name, child) {
  94693. var parent = children[name.toLowerCase()];
  94694. return !!(parent && parent[child.toLowerCase()]);
  94695. };
  94696. var isValid = function (name, attr) {
  94697. var attrPatterns, i;
  94698. var rule = getElementRule(name);
  94699. if (rule) {
  94700. if (attr) {
  94701. if (rule.attributes[attr]) {
  94702. return true;
  94703. }
  94704. attrPatterns = rule.attributePatterns;
  94705. if (attrPatterns) {
  94706. i = attrPatterns.length;
  94707. while (i--) {
  94708. if (attrPatterns[i].pattern.test(name)) {
  94709. return true;
  94710. }
  94711. }
  94712. }
  94713. } else {
  94714. return true;
  94715. }
  94716. }
  94717. return false;
  94718. };
  94719. var getCustomElements = constant(customElementsMap);
  94720. return {
  94721. children: children,
  94722. elements: elements,
  94723. getValidStyles: getValidStyles,
  94724. getValidClasses: getValidClasses,
  94725. getBlockElements: getBlockElements,
  94726. getInvalidStyles: getInvalidStyles,
  94727. getShortEndedElements: getShortEndedElements,
  94728. getTextBlockElements: getTextBlockElements,
  94729. getTextInlineElements: getTextInlineElements,
  94730. getBoolAttrs: getBoolAttrs,
  94731. getElementRule: getElementRule,
  94732. getSelfClosingElements: getSelfClosingElements,
  94733. getNonEmptyElements: getNonEmptyElements,
  94734. getMoveCaretBeforeOnEnterElements: getMoveCaretBeforeOnEnterElements,
  94735. getWhiteSpaceElements: getWhiteSpaceElements,
  94736. getSpecialElements: getSpecialElements,
  94737. isValidChild: isValidChild,
  94738. isValid: isValid,
  94739. getCustomElements: getCustomElements,
  94740. addValidElements: addValidElements,
  94741. setValidElements: setValidElements,
  94742. addCustomElements: addCustomElements,
  94743. addValidChildren: addValidChildren
  94744. };
  94745. };
  94746. var toHex = function (match, r, g, b) {
  94747. var hex = function (val) {
  94748. val = parseInt(val, 10).toString(16);
  94749. return val.length > 1 ? val : '0' + val;
  94750. };
  94751. return '#' + hex(r) + hex(g) + hex(b);
  94752. };
  94753. var Styles = function (settings, schema) {
  94754. var _this = this;
  94755. var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi;
  94756. var urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi;
  94757. var styleRegExp = /\s*([^:]+):\s*([^;]+);?/g;
  94758. var trimRightRegExp = /\s+$/;
  94759. var i;
  94760. var encodingLookup = {};
  94761. var validStyles;
  94762. var invalidStyles;
  94763. var invisibleChar = zeroWidth;
  94764. settings = settings || {};
  94765. if (schema) {
  94766. validStyles = schema.getValidStyles();
  94767. invalidStyles = schema.getInvalidStyles();
  94768. }
  94769. var encodingItems = ('\\" \\\' \\; \\: ; : ' + invisibleChar).split(' ');
  94770. for (i = 0; i < encodingItems.length; i++) {
  94771. encodingLookup[encodingItems[i]] = invisibleChar + i;
  94772. encodingLookup[invisibleChar + i] = encodingItems[i];
  94773. }
  94774. return {
  94775. toHex: function (color) {
  94776. return color.replace(rgbRegExp, toHex);
  94777. },
  94778. parse: function (css) {
  94779. var styles = {};
  94780. var matches, name, value, isEncoded;
  94781. var urlConverter = settings.url_converter;
  94782. var urlConverterScope = settings.url_converter_scope || _this;
  94783. var compress = function (prefix, suffix, noJoin) {
  94784. var top = styles[prefix + '-top' + suffix];
  94785. if (!top) {
  94786. return;
  94787. }
  94788. var right = styles[prefix + '-right' + suffix];
  94789. if (!right) {
  94790. return;
  94791. }
  94792. var bottom = styles[prefix + '-bottom' + suffix];
  94793. if (!bottom) {
  94794. return;
  94795. }
  94796. var left = styles[prefix + '-left' + suffix];
  94797. if (!left) {
  94798. return;
  94799. }
  94800. var box = [
  94801. top,
  94802. right,
  94803. bottom,
  94804. left
  94805. ];
  94806. i = box.length - 1;
  94807. while (i--) {
  94808. if (box[i] !== box[i + 1]) {
  94809. break;
  94810. }
  94811. }
  94812. if (i > -1 && noJoin) {
  94813. return;
  94814. }
  94815. styles[prefix + suffix] = i === -1 ? box[0] : box.join(' ');
  94816. delete styles[prefix + '-top' + suffix];
  94817. delete styles[prefix + '-right' + suffix];
  94818. delete styles[prefix + '-bottom' + suffix];
  94819. delete styles[prefix + '-left' + suffix];
  94820. };
  94821. var canCompress = function (key) {
  94822. var value = styles[key], i;
  94823. if (!value) {
  94824. return;
  94825. }
  94826. value = value.split(' ');
  94827. i = value.length;
  94828. while (i--) {
  94829. if (value[i] !== value[0]) {
  94830. return false;
  94831. }
  94832. }
  94833. styles[key] = value[0];
  94834. return true;
  94835. };
  94836. var compress2 = function (target, a, b, c) {
  94837. if (!canCompress(a)) {
  94838. return;
  94839. }
  94840. if (!canCompress(b)) {
  94841. return;
  94842. }
  94843. if (!canCompress(c)) {
  94844. return;
  94845. }
  94846. styles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c];
  94847. delete styles[a];
  94848. delete styles[b];
  94849. delete styles[c];
  94850. };
  94851. var encode = function (str) {
  94852. isEncoded = true;
  94853. return encodingLookup[str];
  94854. };
  94855. var decode = function (str, keepSlashes) {
  94856. if (isEncoded) {
  94857. str = str.replace(/\uFEFF[0-9]/g, function (str) {
  94858. return encodingLookup[str];
  94859. });
  94860. }
  94861. if (!keepSlashes) {
  94862. str = str.replace(/\\([\'\";:])/g, '$1');
  94863. }
  94864. return str;
  94865. };
  94866. var decodeSingleHexSequence = function (escSeq) {
  94867. return String.fromCharCode(parseInt(escSeq.slice(1), 16));
  94868. };
  94869. var decodeHexSequences = function (value) {
  94870. return value.replace(/\\[0-9a-f]+/gi, decodeSingleHexSequence);
  94871. };
  94872. var processUrl = function (match, url, url2, url3, str, str2) {
  94873. str = str || str2;
  94874. if (str) {
  94875. str = decode(str);
  94876. return '\'' + str.replace(/\'/g, '\\\'') + '\'';
  94877. }
  94878. url = decode(url || url2 || url3);
  94879. if (!settings.allow_script_urls) {
  94880. var scriptUrl = url.replace(/[\s\r\n]+/g, '');
  94881. if (/(java|vb)script:/i.test(scriptUrl)) {
  94882. return '';
  94883. }
  94884. if (!settings.allow_svg_data_urls && /^data:image\/svg/i.test(scriptUrl)) {
  94885. return '';
  94886. }
  94887. }
  94888. if (urlConverter) {
  94889. url = urlConverter.call(urlConverterScope, url, 'style');
  94890. }
  94891. return 'url(\'' + url.replace(/\'/g, '\\\'') + '\')';
  94892. };
  94893. if (css) {
  94894. css = css.replace(/[\u0000-\u001F]/g, '');
  94895. css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function (str) {
  94896. return str.replace(/[;:]/g, encode);
  94897. });
  94898. while (matches = styleRegExp.exec(css)) {
  94899. styleRegExp.lastIndex = matches.index + matches[0].length;
  94900. name = matches[1].replace(trimRightRegExp, '').toLowerCase();
  94901. value = matches[2].replace(trimRightRegExp, '');
  94902. if (name && value) {
  94903. name = decodeHexSequences(name);
  94904. value = decodeHexSequences(value);
  94905. if (name.indexOf(invisibleChar) !== -1 || name.indexOf('"') !== -1) {
  94906. continue;
  94907. }
  94908. if (!settings.allow_script_urls && (name === 'behavior' || /expression\s*\(|\/\*|\*\//.test(value))) {
  94909. continue;
  94910. }
  94911. if (name === 'font-weight' && value === '700') {
  94912. value = 'bold';
  94913. } else if (name === 'color' || name === 'background-color') {
  94914. value = value.toLowerCase();
  94915. }
  94916. value = value.replace(rgbRegExp, toHex);
  94917. value = value.replace(urlOrStrRegExp, processUrl);
  94918. styles[name] = isEncoded ? decode(value, true) : value;
  94919. }
  94920. }
  94921. compress('border', '', true);
  94922. compress('border', '-width');
  94923. compress('border', '-color');
  94924. compress('border', '-style');
  94925. compress('padding', '');
  94926. compress('margin', '');
  94927. compress2('border', 'border-width', 'border-style', 'border-color');
  94928. if (styles.border === 'medium none') {
  94929. delete styles.border;
  94930. }
  94931. if (styles['border-image'] === 'none') {
  94932. delete styles['border-image'];
  94933. }
  94934. }
  94935. return styles;
  94936. },
  94937. serialize: function (styles, elementName) {
  94938. var css = '';
  94939. var serializeStyles = function (name) {
  94940. var value;
  94941. var styleList = validStyles[name];
  94942. if (styleList) {
  94943. for (var i_1 = 0, l = styleList.length; i_1 < l; i_1++) {
  94944. name = styleList[i_1];
  94945. value = styles[name];
  94946. if (value) {
  94947. css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
  94948. }
  94949. }
  94950. }
  94951. };
  94952. var isValid = function (name, elementName) {
  94953. var styleMap = invalidStyles['*'];
  94954. if (styleMap && styleMap[name]) {
  94955. return false;
  94956. }
  94957. styleMap = invalidStyles[elementName];
  94958. return !(styleMap && styleMap[name]);
  94959. };
  94960. if (elementName && validStyles) {
  94961. serializeStyles('*');
  94962. serializeStyles(elementName);
  94963. } else {
  94964. each$j(styles, function (value, name) {
  94965. if (value && (!invalidStyles || isValid(name, elementName))) {
  94966. css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
  94967. }
  94968. });
  94969. }
  94970. return css;
  94971. }
  94972. };
  94973. };
  94974. var deprecated = {
  94975. keyLocation: true,
  94976. layerX: true,
  94977. layerY: true,
  94978. returnValue: true,
  94979. webkitMovementX: true,
  94980. webkitMovementY: true,
  94981. keyIdentifier: true,
  94982. mozPressure: true
  94983. };
  94984. var isNativeEvent = function (event) {
  94985. return event instanceof Event || isFunction(event.initEvent);
  94986. };
  94987. var hasIsDefaultPrevented = function (event) {
  94988. return event.isDefaultPrevented === always || event.isDefaultPrevented === never;
  94989. };
  94990. var needsNormalizing = function (event) {
  94991. return isNullable(event.preventDefault) || isNativeEvent(event);
  94992. };
  94993. var clone$2 = function (originalEvent, data) {
  94994. var event = data !== null && data !== void 0 ? data : {};
  94995. for (var name_1 in originalEvent) {
  94996. if (!has$2(deprecated, name_1)) {
  94997. event[name_1] = originalEvent[name_1];
  94998. }
  94999. }
  95000. if (isNonNullable(event.composedPath)) {
  95001. event.composedPath = function () {
  95002. return originalEvent.composedPath();
  95003. };
  95004. }
  95005. return event;
  95006. };
  95007. var normalize$3 = function (type, originalEvent, fallbackTarget, data) {
  95008. var _a;
  95009. var event = clone$2(originalEvent, data);
  95010. event.type = type;
  95011. if (isNullable(event.target)) {
  95012. event.target = (_a = event.srcElement) !== null && _a !== void 0 ? _a : fallbackTarget;
  95013. }
  95014. if (needsNormalizing(originalEvent)) {
  95015. event.preventDefault = function () {
  95016. event.defaultPrevented = true;
  95017. event.isDefaultPrevented = always;
  95018. if (isFunction(originalEvent.preventDefault)) {
  95019. originalEvent.preventDefault();
  95020. } else if (isNativeEvent(originalEvent)) {
  95021. originalEvent.returnValue = false;
  95022. }
  95023. };
  95024. event.stopPropagation = function () {
  95025. event.cancelBubble = true;
  95026. event.isPropagationStopped = always;
  95027. if (isFunction(originalEvent.stopPropagation)) {
  95028. originalEvent.stopPropagation();
  95029. } else if (isNativeEvent(originalEvent)) {
  95030. originalEvent.cancelBubble = true;
  95031. }
  95032. };
  95033. event.stopImmediatePropagation = function () {
  95034. event.isImmediatePropagationStopped = always;
  95035. event.stopPropagation();
  95036. };
  95037. if (!hasIsDefaultPrevented(event)) {
  95038. event.isDefaultPrevented = event.defaultPrevented === true ? always : never;
  95039. event.isPropagationStopped = event.cancelBubble === true ? always : never;
  95040. event.isImmediatePropagationStopped = never;
  95041. }
  95042. }
  95043. return event;
  95044. };
  95045. var eventExpandoPrefix = 'mce-data-';
  95046. var mouseEventRe = /^(?:mouse|contextmenu)|click/;
  95047. var addEvent = function (target, name, callback, capture) {
  95048. if (target.addEventListener) {
  95049. target.addEventListener(name, callback, capture || false);
  95050. } else if (target.attachEvent) {
  95051. target.attachEvent('on' + name, callback);
  95052. }
  95053. };
  95054. var removeEvent = function (target, name, callback, capture) {
  95055. if (target.removeEventListener) {
  95056. target.removeEventListener(name, callback, capture || false);
  95057. } else if (target.detachEvent) {
  95058. target.detachEvent('on' + name, callback);
  95059. }
  95060. };
  95061. var isMouseEvent = function (event) {
  95062. return isNonNullable(event) && mouseEventRe.test(event.type);
  95063. };
  95064. var fix = function (originalEvent, data) {
  95065. var event = normalize$3(originalEvent.type, originalEvent, document, data);
  95066. if (isMouseEvent(originalEvent) && isUndefined(originalEvent.pageX) && !isUndefined(originalEvent.clientX)) {
  95067. var eventDoc = event.target.ownerDocument || document;
  95068. var doc = eventDoc.documentElement;
  95069. var body = eventDoc.body;
  95070. var mouseEvent = event;
  95071. mouseEvent.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
  95072. mouseEvent.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
  95073. }
  95074. if (isUndefined(event.metaKey)) {
  95075. event.metaKey = false;
  95076. }
  95077. return event;
  95078. };
  95079. var bindOnReady = function (win, callback, eventUtils) {
  95080. var doc = win.document, event = { type: 'ready' };
  95081. if (eventUtils.domLoaded) {
  95082. callback(event);
  95083. return;
  95084. }
  95085. var isDocReady = function () {
  95086. return doc.readyState === 'complete' || doc.readyState === 'interactive' && doc.body;
  95087. };
  95088. var readyHandler = function () {
  95089. removeEvent(win, 'DOMContentLoaded', readyHandler);
  95090. removeEvent(win, 'load', readyHandler);
  95091. if (!eventUtils.domLoaded) {
  95092. eventUtils.domLoaded = true;
  95093. callback(event);
  95094. }
  95095. win = null;
  95096. };
  95097. if (isDocReady()) {
  95098. readyHandler();
  95099. } else {
  95100. addEvent(win, 'DOMContentLoaded', readyHandler);
  95101. }
  95102. if (!eventUtils.domLoaded) {
  95103. addEvent(win, 'load', readyHandler);
  95104. }
  95105. };
  95106. var EventUtils = function () {
  95107. function EventUtils() {
  95108. this.domLoaded = false;
  95109. this.events = {};
  95110. this.count = 1;
  95111. this.expando = eventExpandoPrefix + (+new Date()).toString(32);
  95112. this.hasMouseEnterLeave = 'onmouseenter' in document.documentElement;
  95113. this.hasFocusIn = 'onfocusin' in document.documentElement;
  95114. this.count = 1;
  95115. }
  95116. EventUtils.prototype.bind = function (target, names, callback, scope) {
  95117. var self = this;
  95118. var id, callbackList, i, name, fakeName, nativeHandler, capture;
  95119. var win = window;
  95120. var defaultNativeHandler = function (evt) {
  95121. self.executeHandlers(fix(evt || win.event), id);
  95122. };
  95123. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  95124. return;
  95125. }
  95126. if (!target[self.expando]) {
  95127. id = self.count++;
  95128. target[self.expando] = id;
  95129. self.events[id] = {};
  95130. } else {
  95131. id = target[self.expando];
  95132. }
  95133. scope = scope || target;
  95134. var namesList = names.split(' ');
  95135. i = namesList.length;
  95136. while (i--) {
  95137. name = namesList[i];
  95138. nativeHandler = defaultNativeHandler;
  95139. fakeName = capture = false;
  95140. if (name === 'DOMContentLoaded') {
  95141. name = 'ready';
  95142. }
  95143. if (self.domLoaded && name === 'ready' && target.readyState === 'complete') {
  95144. callback.call(scope, fix({ type: name }));
  95145. continue;
  95146. }
  95147. if (!self.hasMouseEnterLeave) {
  95148. fakeName = self.mouseEnterLeave[name];
  95149. if (fakeName) {
  95150. nativeHandler = function (evt) {
  95151. var current = evt.currentTarget;
  95152. var related = evt.relatedTarget;
  95153. if (related && current.contains) {
  95154. related = current.contains(related);
  95155. } else {
  95156. while (related && related !== current) {
  95157. related = related.parentNode;
  95158. }
  95159. }
  95160. if (!related) {
  95161. evt = fix(evt || win.event);
  95162. evt.type = evt.type === 'mouseout' ? 'mouseleave' : 'mouseenter';
  95163. evt.target = current;
  95164. self.executeHandlers(evt, id);
  95165. }
  95166. };
  95167. }
  95168. }
  95169. if (!self.hasFocusIn && (name === 'focusin' || name === 'focusout')) {
  95170. capture = true;
  95171. fakeName = name === 'focusin' ? 'focus' : 'blur';
  95172. nativeHandler = function (evt) {
  95173. evt = fix(evt || win.event);
  95174. evt.type = evt.type === 'focus' ? 'focusin' : 'focusout';
  95175. self.executeHandlers(evt, id);
  95176. };
  95177. }
  95178. callbackList = self.events[id][name];
  95179. if (!callbackList) {
  95180. self.events[id][name] = callbackList = [{
  95181. func: callback,
  95182. scope: scope
  95183. }];
  95184. callbackList.fakeName = fakeName;
  95185. callbackList.capture = capture;
  95186. callbackList.nativeHandler = nativeHandler;
  95187. if (name === 'ready') {
  95188. bindOnReady(target, nativeHandler, self);
  95189. } else {
  95190. addEvent(target, fakeName || name, nativeHandler, capture);
  95191. }
  95192. } else {
  95193. if (name === 'ready' && self.domLoaded) {
  95194. callback(fix({ type: name }));
  95195. } else {
  95196. callbackList.push({
  95197. func: callback,
  95198. scope: scope
  95199. });
  95200. }
  95201. }
  95202. }
  95203. target = callbackList = null;
  95204. return callback;
  95205. };
  95206. EventUtils.prototype.unbind = function (target, names, callback) {
  95207. var callbackList, i, ci, name, eventMap;
  95208. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  95209. return this;
  95210. }
  95211. var id = target[this.expando];
  95212. if (id) {
  95213. eventMap = this.events[id];
  95214. if (names) {
  95215. var namesList = names.split(' ');
  95216. i = namesList.length;
  95217. while (i--) {
  95218. name = namesList[i];
  95219. callbackList = eventMap[name];
  95220. if (callbackList) {
  95221. if (callback) {
  95222. ci = callbackList.length;
  95223. while (ci--) {
  95224. if (callbackList[ci].func === callback) {
  95225. var nativeHandler = callbackList.nativeHandler;
  95226. var fakeName = callbackList.fakeName, capture = callbackList.capture;
  95227. callbackList = callbackList.slice(0, ci).concat(callbackList.slice(ci + 1));
  95228. callbackList.nativeHandler = nativeHandler;
  95229. callbackList.fakeName = fakeName;
  95230. callbackList.capture = capture;
  95231. eventMap[name] = callbackList;
  95232. }
  95233. }
  95234. }
  95235. if (!callback || callbackList.length === 0) {
  95236. delete eventMap[name];
  95237. removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
  95238. }
  95239. }
  95240. }
  95241. } else {
  95242. each$j(eventMap, function (callbackList, name) {
  95243. removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
  95244. });
  95245. eventMap = {};
  95246. }
  95247. for (name in eventMap) {
  95248. if (has$2(eventMap, name)) {
  95249. return this;
  95250. }
  95251. }
  95252. delete this.events[id];
  95253. try {
  95254. delete target[this.expando];
  95255. } catch (ex) {
  95256. target[this.expando] = null;
  95257. }
  95258. }
  95259. return this;
  95260. };
  95261. EventUtils.prototype.fire = function (target, name, args) {
  95262. var id;
  95263. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  95264. return this;
  95265. }
  95266. var event = fix({
  95267. type: name,
  95268. target: target
  95269. }, args);
  95270. do {
  95271. id = target[this.expando];
  95272. if (id) {
  95273. this.executeHandlers(event, id);
  95274. }
  95275. target = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow;
  95276. } while (target && !event.isPropagationStopped());
  95277. return this;
  95278. };
  95279. EventUtils.prototype.clean = function (target) {
  95280. var i, children;
  95281. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  95282. return this;
  95283. }
  95284. if (target[this.expando]) {
  95285. this.unbind(target);
  95286. }
  95287. if (!target.getElementsByTagName) {
  95288. target = target.document;
  95289. }
  95290. if (target && target.getElementsByTagName) {
  95291. this.unbind(target);
  95292. children = target.getElementsByTagName('*');
  95293. i = children.length;
  95294. while (i--) {
  95295. target = children[i];
  95296. if (target[this.expando]) {
  95297. this.unbind(target);
  95298. }
  95299. }
  95300. }
  95301. return this;
  95302. };
  95303. EventUtils.prototype.destroy = function () {
  95304. this.events = {};
  95305. };
  95306. EventUtils.prototype.cancel = function (e) {
  95307. if (e) {
  95308. e.preventDefault();
  95309. e.stopImmediatePropagation();
  95310. }
  95311. return false;
  95312. };
  95313. EventUtils.prototype.executeHandlers = function (evt, id) {
  95314. var container = this.events[id];
  95315. var callbackList = container && container[evt.type];
  95316. if (callbackList) {
  95317. for (var i = 0, l = callbackList.length; i < l; i++) {
  95318. var callback = callbackList[i];
  95319. if (callback && callback.func.call(callback.scope, evt) === false) {
  95320. evt.preventDefault();
  95321. }
  95322. if (evt.isImmediatePropagationStopped()) {
  95323. return;
  95324. }
  95325. }
  95326. }
  95327. };
  95328. EventUtils.Event = new EventUtils();
  95329. return EventUtils;
  95330. }();
  95331. var support, Expr, getText, isXML, tokenize, compile, select$1, outermostContext, sortInput, hasDuplicate, setDocument, document$1, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, expando = 'sizzle' + -new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function (a, b) {
  95332. if (a === b) {
  95333. hasDuplicate = true;
  95334. }
  95335. return 0;
  95336. }, strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, hasOwn = {}.hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push$1 = arr.push, slice$1 = arr.slice, indexOf = arr.indexOf || function (elem) {
  95337. var i = 0, len = this.length;
  95338. for (; i < len; i++) {
  95339. if (this[i] === elem) {
  95340. return i;
  95341. }
  95342. }
  95343. return -1;
  95344. }, booleans = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped', whitespace = '[\\x20\\t\\r\\n\\f]', identifier = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+', attributes = '\\[' + whitespace + '*(' + identifier + ')(?:' + whitespace + '*([*^$|!~]?=)' + whitespace + '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' + identifier + '))|)' + whitespace + '*\\]', pseudos = ':(' + identifier + ')(?:\\((' + '(\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|' + '((?:\\\\.|[^\\\\()[\\]]|' + attributes + ')*)|' + '.*' + ')\\)|)', rtrim = new RegExp('^' + whitespace + '+|((?:^|[^\\\\])(?:\\\\.)*)' + whitespace + '+$', 'g'), rcomma = new RegExp('^' + whitespace + '*,' + whitespace + '*'), rcombinators = new RegExp('^' + whitespace + '*([>+~]|' + whitespace + ')' + whitespace + '*'), rattributeQuotes = new RegExp('=' + whitespace + '*([^\\]\'"]*?)' + whitespace + '*\\]', 'g'), rpseudo = new RegExp(pseudos), ridentifier = new RegExp('^' + identifier + '$'), matchExpr = {
  95345. ID: new RegExp('^#(' + identifier + ')'),
  95346. CLASS: new RegExp('^\\.(' + identifier + ')'),
  95347. TAG: new RegExp('^(' + identifier + '|[*])'),
  95348. ATTR: new RegExp('^' + attributes),
  95349. PSEUDO: new RegExp('^' + pseudos),
  95350. CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + whitespace + '*(even|odd|(([+-]|)(\\d*)n|)' + whitespace + '*(?:([+-]|)' + whitespace + '*(\\d+)|))' + whitespace + '*\\)|)', 'i'),
  95351. bool: new RegExp('^(?:' + booleans + ')$', 'i'),
  95352. needsContext: new RegExp('^' + whitespace + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + whitespace + '*((?:-\\d)?\\d*)' + whitespace + '*\\)|)(?=[^-]|$)', 'i')
  95353. }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, rquickExpr$1 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, runescape = new RegExp('\\\\([\\da-f]{1,6}' + whitespace + '?|(' + whitespace + ')|.)', 'ig'), funescape = function (_, escaped, escapedWhitespace) {
  95354. var high = '0x' + escaped - 65536;
  95355. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
  95356. };
  95357. try {
  95358. push$1.apply(arr = slice$1.call(preferredDoc.childNodes), preferredDoc.childNodes);
  95359. arr[preferredDoc.childNodes.length].nodeType;
  95360. } catch (e) {
  95361. push$1 = {
  95362. apply: arr.length ? function (target, els) {
  95363. push_native.apply(target, slice$1.call(els));
  95364. } : function (target, els) {
  95365. var j = target.length, i = 0;
  95366. while (target[j++] = els[i++]) {
  95367. }
  95368. target.length = j - 1;
  95369. }
  95370. };
  95371. }
  95372. var Sizzle = function (selector, context, results, seed) {
  95373. var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector;
  95374. if ((context ? context.ownerDocument || context : preferredDoc) !== document$1) {
  95375. setDocument(context);
  95376. }
  95377. context = context || document$1;
  95378. results = results || [];
  95379. if (!selector || typeof selector !== 'string') {
  95380. return results;
  95381. }
  95382. if ((nodeType = context.nodeType) !== 1 && nodeType !== 9) {
  95383. return [];
  95384. }
  95385. if (documentIsHTML && !seed) {
  95386. if (match = rquickExpr$1.exec(selector)) {
  95387. if (m = match[1]) {
  95388. if (nodeType === 9) {
  95389. elem = context.getElementById(m);
  95390. if (elem && elem.parentNode) {
  95391. if (elem.id === m) {
  95392. results.push(elem);
  95393. return results;
  95394. }
  95395. } else {
  95396. return results;
  95397. }
  95398. } else {
  95399. if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) {
  95400. results.push(elem);
  95401. return results;
  95402. }
  95403. }
  95404. } else if (match[2]) {
  95405. push$1.apply(results, context.getElementsByTagName(selector));
  95406. return results;
  95407. } else if ((m = match[3]) && support.getElementsByClassName) {
  95408. push$1.apply(results, context.getElementsByClassName(m));
  95409. return results;
  95410. }
  95411. }
  95412. if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
  95413. nid = old = expando;
  95414. newContext = context;
  95415. newSelector = nodeType === 9 && selector;
  95416. if (nodeType === 1 && context.nodeName.toLowerCase() !== 'object') {
  95417. groups = tokenize(selector);
  95418. if (old = context.getAttribute('id')) {
  95419. nid = old.replace(rescape, '\\$&');
  95420. } else {
  95421. context.setAttribute('id', nid);
  95422. }
  95423. nid = '[id=\'' + nid + '\'] ';
  95424. i = groups.length;
  95425. while (i--) {
  95426. groups[i] = nid + toSelector(groups[i]);
  95427. }
  95428. newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
  95429. newSelector = groups.join(',');
  95430. }
  95431. if (newSelector) {
  95432. try {
  95433. push$1.apply(results, newContext.querySelectorAll(newSelector));
  95434. return results;
  95435. } catch (qsaError) {
  95436. } finally {
  95437. if (!old) {
  95438. context.removeAttribute('id');
  95439. }
  95440. }
  95441. }
  95442. }
  95443. }
  95444. return select$1(selector.replace(rtrim, '$1'), context, results, seed);
  95445. };
  95446. function createCache() {
  95447. var keys = [];
  95448. function cache(key, value) {
  95449. if (keys.push(key + ' ') > Expr.cacheLength) {
  95450. delete cache[keys.shift()];
  95451. }
  95452. return cache[key + ' '] = value;
  95453. }
  95454. return cache;
  95455. }
  95456. function markFunction(fn) {
  95457. fn[expando] = true;
  95458. return fn;
  95459. }
  95460. function siblingCheck(a, b) {
  95461. var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE);
  95462. if (diff) {
  95463. return diff;
  95464. }
  95465. if (cur) {
  95466. while (cur = cur.nextSibling) {
  95467. if (cur === b) {
  95468. return -1;
  95469. }
  95470. }
  95471. }
  95472. return a ? 1 : -1;
  95473. }
  95474. function createInputPseudo(type) {
  95475. return function (elem) {
  95476. var name = elem.nodeName.toLowerCase();
  95477. return name === 'input' && elem.type === type;
  95478. };
  95479. }
  95480. function createButtonPseudo(type) {
  95481. return function (elem) {
  95482. var name = elem.nodeName.toLowerCase();
  95483. return (name === 'input' || name === 'button') && elem.type === type;
  95484. };
  95485. }
  95486. function createPositionalPseudo(fn) {
  95487. return markFunction(function (argument) {
  95488. argument = +argument;
  95489. return markFunction(function (seed, matches) {
  95490. var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length;
  95491. while (i--) {
  95492. if (seed[j = matchIndexes[i]]) {
  95493. seed[j] = !(matches[j] = seed[j]);
  95494. }
  95495. }
  95496. });
  95497. });
  95498. }
  95499. function testContext(context) {
  95500. return context && typeof context.getElementsByTagName !== strundefined && context;
  95501. }
  95502. support = Sizzle.support = {};
  95503. isXML = Sizzle.isXML = function (elem) {
  95504. var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  95505. return documentElement ? documentElement.nodeName !== 'HTML' : false;
  95506. };
  95507. setDocument = Sizzle.setDocument = function (node) {
  95508. var hasCompare, doc = node ? node.ownerDocument || node : preferredDoc, parent = doc.defaultView;
  95509. function getTop(win) {
  95510. try {
  95511. return win.top;
  95512. } catch (ex) {
  95513. }
  95514. return null;
  95515. }
  95516. if (doc === document$1 || doc.nodeType !== 9 || !doc.documentElement) {
  95517. return document$1;
  95518. }
  95519. document$1 = doc;
  95520. docElem = doc.documentElement;
  95521. documentIsHTML = !isXML(doc);
  95522. if (parent && parent !== getTop(parent)) {
  95523. if (parent.addEventListener) {
  95524. parent.addEventListener('unload', function () {
  95525. setDocument();
  95526. }, false);
  95527. } else if (parent.attachEvent) {
  95528. parent.attachEvent('onunload', function () {
  95529. setDocument();
  95530. });
  95531. }
  95532. }
  95533. support.attributes = true;
  95534. support.getElementsByTagName = true;
  95535. support.getElementsByClassName = rnative.test(doc.getElementsByClassName);
  95536. support.getById = true;
  95537. Expr.find.ID = function (id, context) {
  95538. if (typeof context.getElementById !== strundefined && documentIsHTML) {
  95539. var m = context.getElementById(id);
  95540. return m && m.parentNode ? [m] : [];
  95541. }
  95542. };
  95543. Expr.filter.ID = function (id) {
  95544. var attrId = id.replace(runescape, funescape);
  95545. return function (elem) {
  95546. return elem.getAttribute('id') === attrId;
  95547. };
  95548. };
  95549. Expr.find.TAG = support.getElementsByTagName ? function (tag, context) {
  95550. if (typeof context.getElementsByTagName !== strundefined) {
  95551. return context.getElementsByTagName(tag);
  95552. }
  95553. } : function (tag, context) {
  95554. var elem, tmp = [], i = 0, results = context.getElementsByTagName(tag);
  95555. if (tag === '*') {
  95556. while (elem = results[i++]) {
  95557. if (elem.nodeType === 1) {
  95558. tmp.push(elem);
  95559. }
  95560. }
  95561. return tmp;
  95562. }
  95563. return results;
  95564. };
  95565. Expr.find.CLASS = support.getElementsByClassName && function (className, context) {
  95566. if (documentIsHTML) {
  95567. return context.getElementsByClassName(className);
  95568. }
  95569. };
  95570. rbuggyMatches = [];
  95571. rbuggyQSA = [];
  95572. support.disconnectedMatch = true;
  95573. rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join('|'));
  95574. rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join('|'));
  95575. hasCompare = rnative.test(docElem.compareDocumentPosition);
  95576. contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
  95577. var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode;
  95578. return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
  95579. } : function (a, b) {
  95580. if (b) {
  95581. while (b = b.parentNode) {
  95582. if (b === a) {
  95583. return true;
  95584. }
  95585. }
  95586. }
  95587. return false;
  95588. };
  95589. sortOrder = hasCompare ? function (a, b) {
  95590. if (a === b) {
  95591. hasDuplicate = true;
  95592. return 0;
  95593. }
  95594. var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  95595. if (compare) {
  95596. return compare;
  95597. }
  95598. compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
  95599. if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
  95600. if (a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
  95601. return -1;
  95602. }
  95603. if (b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
  95604. return 1;
  95605. }
  95606. return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
  95607. }
  95608. return compare & 4 ? -1 : 1;
  95609. } : function (a, b) {
  95610. if (a === b) {
  95611. hasDuplicate = true;
  95612. return 0;
  95613. }
  95614. var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [a], bp = [b];
  95615. if (!aup || !bup) {
  95616. return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
  95617. } else if (aup === bup) {
  95618. return siblingCheck(a, b);
  95619. }
  95620. cur = a;
  95621. while (cur = cur.parentNode) {
  95622. ap.unshift(cur);
  95623. }
  95624. cur = b;
  95625. while (cur = cur.parentNode) {
  95626. bp.unshift(cur);
  95627. }
  95628. while (ap[i] === bp[i]) {
  95629. i++;
  95630. }
  95631. return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
  95632. };
  95633. return doc;
  95634. };
  95635. Sizzle.matches = function (expr, elements) {
  95636. return Sizzle(expr, null, null, elements);
  95637. };
  95638. Sizzle.matchesSelector = function (elem, expr) {
  95639. if ((elem.ownerDocument || elem) !== document$1) {
  95640. setDocument(elem);
  95641. }
  95642. expr = expr.replace(rattributeQuotes, '=\'$1\']');
  95643. if (support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
  95644. try {
  95645. var ret = matches.call(elem, expr);
  95646. if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) {
  95647. return ret;
  95648. }
  95649. } catch (e) {
  95650. }
  95651. }
  95652. return Sizzle(expr, document$1, null, [elem]).length > 0;
  95653. };
  95654. Sizzle.contains = function (context, elem) {
  95655. if ((context.ownerDocument || context) !== document$1) {
  95656. setDocument(context);
  95657. }
  95658. return contains(context, elem);
  95659. };
  95660. Sizzle.attr = function (elem, name) {
  95661. if ((elem.ownerDocument || elem) !== document$1) {
  95662. setDocument(elem);
  95663. }
  95664. var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
  95665. return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
  95666. };
  95667. Sizzle.error = function (msg) {
  95668. throw new Error('Syntax error, unrecognized expression: ' + msg);
  95669. };
  95670. Sizzle.uniqueSort = function (results) {
  95671. var elem, duplicates = [], j = 0, i = 0;
  95672. hasDuplicate = !support.detectDuplicates;
  95673. sortInput = !support.sortStable && results.slice(0);
  95674. results.sort(sortOrder);
  95675. if (hasDuplicate) {
  95676. while (elem = results[i++]) {
  95677. if (elem === results[i]) {
  95678. j = duplicates.push(i);
  95679. }
  95680. }
  95681. while (j--) {
  95682. results.splice(duplicates[j], 1);
  95683. }
  95684. }
  95685. sortInput = null;
  95686. return results;
  95687. };
  95688. getText = Sizzle.getText = function (elem) {
  95689. var node, ret = '', i = 0, nodeType = elem.nodeType;
  95690. if (!nodeType) {
  95691. while (node = elem[i++]) {
  95692. ret += getText(node);
  95693. }
  95694. } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
  95695. if (typeof elem.textContent === 'string') {
  95696. return elem.textContent;
  95697. } else {
  95698. for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  95699. ret += getText(elem);
  95700. }
  95701. }
  95702. } else if (nodeType === 3 || nodeType === 4) {
  95703. return elem.nodeValue;
  95704. }
  95705. return ret;
  95706. };
  95707. Expr = Sizzle.selectors = {
  95708. cacheLength: 50,
  95709. createPseudo: markFunction,
  95710. match: matchExpr,
  95711. attrHandle: {},
  95712. find: {},
  95713. relative: {
  95714. '>': {
  95715. dir: 'parentNode',
  95716. first: true
  95717. },
  95718. ' ': { dir: 'parentNode' },
  95719. '+': {
  95720. dir: 'previousSibling',
  95721. first: true
  95722. },
  95723. '~': { dir: 'previousSibling' }
  95724. },
  95725. preFilter: {
  95726. ATTR: function (match) {
  95727. match[1] = match[1].replace(runescape, funescape);
  95728. match[3] = (match[3] || match[4] || match[5] || '').replace(runescape, funescape);
  95729. if (match[2] === '~=') {
  95730. match[3] = ' ' + match[3] + ' ';
  95731. }
  95732. return match.slice(0, 4);
  95733. },
  95734. CHILD: function (match) {
  95735. match[1] = match[1].toLowerCase();
  95736. if (match[1].slice(0, 3) === 'nth') {
  95737. if (!match[3]) {
  95738. Sizzle.error(match[0]);
  95739. }
  95740. match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === 'even' || match[3] === 'odd'));
  95741. match[5] = +(match[7] + match[8] || match[3] === 'odd');
  95742. } else if (match[3]) {
  95743. Sizzle.error(match[0]);
  95744. }
  95745. return match;
  95746. },
  95747. PSEUDO: function (match) {
  95748. var excess, unquoted = !match[6] && match[2];
  95749. if (matchExpr.CHILD.test(match[0])) {
  95750. return null;
  95751. }
  95752. if (match[3]) {
  95753. match[2] = match[4] || match[5] || '';
  95754. } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(')', unquoted.length - excess) - unquoted.length)) {
  95755. match[0] = match[0].slice(0, excess);
  95756. match[2] = unquoted.slice(0, excess);
  95757. }
  95758. return match.slice(0, 3);
  95759. }
  95760. },
  95761. filter: {
  95762. TAG: function (nodeNameSelector) {
  95763. var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
  95764. return nodeNameSelector === '*' ? function () {
  95765. return true;
  95766. } : function (elem) {
  95767. return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
  95768. };
  95769. },
  95770. CLASS: function (className) {
  95771. var pattern = classCache[className + ' '];
  95772. return pattern || (pattern = new RegExp('(^|' + whitespace + ')' + className + '(' + whitespace + '|$)')) && classCache(className, function (elem) {
  95773. return pattern.test(typeof elem.className === 'string' && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute('class') || '');
  95774. });
  95775. },
  95776. ATTR: function (name, operator, check) {
  95777. return function (elem) {
  95778. var result = Sizzle.attr(elem, name);
  95779. if (result == null) {
  95780. return operator === '!=';
  95781. }
  95782. if (!operator) {
  95783. return true;
  95784. }
  95785. result += '';
  95786. return operator === '=' ? result === check : operator === '!=' ? result !== check : operator === '^=' ? check && result.indexOf(check) === 0 : operator === '*=' ? check && result.indexOf(check) > -1 : operator === '$=' ? check && result.slice(-check.length) === check : operator === '~=' ? (' ' + result + ' ').indexOf(check) > -1 : operator === '|=' ? result === check || result.slice(0, check.length + 1) === check + '-' : false;
  95787. };
  95788. },
  95789. CHILD: function (type, what, argument, first, last) {
  95790. var simple = type.slice(0, 3) !== 'nth', forward = type.slice(-4) !== 'last', ofType = what === 'of-type';
  95791. return first === 1 && last === 0 ? function (elem) {
  95792. return !!elem.parentNode;
  95793. } : function (elem, context, xml) {
  95794. var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? 'nextSibling' : 'previousSibling', parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType;
  95795. if (parent) {
  95796. if (simple) {
  95797. while (dir) {
  95798. node = elem;
  95799. while (node = node[dir]) {
  95800. if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
  95801. return false;
  95802. }
  95803. }
  95804. start = dir = type === 'only' && !start && 'nextSibling';
  95805. }
  95806. return true;
  95807. }
  95808. start = [forward ? parent.firstChild : parent.lastChild];
  95809. if (forward && useCache) {
  95810. outerCache = parent[expando] || (parent[expando] = {});
  95811. cache = outerCache[type] || [];
  95812. nodeIndex = cache[0] === dirruns && cache[1];
  95813. diff = cache[0] === dirruns && cache[2];
  95814. node = nodeIndex && parent.childNodes[nodeIndex];
  95815. while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
  95816. if (node.nodeType === 1 && ++diff && node === elem) {
  95817. outerCache[type] = [
  95818. dirruns,
  95819. nodeIndex,
  95820. diff
  95821. ];
  95822. break;
  95823. }
  95824. }
  95825. } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
  95826. diff = cache[1];
  95827. } else {
  95828. while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
  95829. if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
  95830. if (useCache) {
  95831. (node[expando] || (node[expando] = {}))[type] = [
  95832. dirruns,
  95833. diff
  95834. ];
  95835. }
  95836. if (node === elem) {
  95837. break;
  95838. }
  95839. }
  95840. }
  95841. }
  95842. diff -= last;
  95843. return diff === first || diff % first === 0 && diff / first >= 0;
  95844. }
  95845. };
  95846. },
  95847. PSEUDO: function (pseudo, argument) {
  95848. var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error('unsupported pseudo: ' + pseudo);
  95849. if (fn[expando]) {
  95850. return fn(argument);
  95851. }
  95852. if (fn.length > 1) {
  95853. args = [
  95854. pseudo,
  95855. pseudo,
  95856. '',
  95857. argument
  95858. ];
  95859. return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
  95860. var idx, matched = fn(seed, argument), i = matched.length;
  95861. while (i--) {
  95862. idx = indexOf.call(seed, matched[i]);
  95863. seed[idx] = !(matches[idx] = matched[i]);
  95864. }
  95865. }) : function (elem) {
  95866. return fn(elem, 0, args);
  95867. };
  95868. }
  95869. return fn;
  95870. }
  95871. },
  95872. pseudos: {
  95873. not: markFunction(function (selector) {
  95874. var input = [], results = [], matcher = compile(selector.replace(rtrim, '$1'));
  95875. return matcher[expando] ? markFunction(function (seed, matches, context, xml) {
  95876. var elem, unmatched = matcher(seed, null, xml, []), i = seed.length;
  95877. while (i--) {
  95878. if (elem = unmatched[i]) {
  95879. seed[i] = !(matches[i] = elem);
  95880. }
  95881. }
  95882. }) : function (elem, context, xml) {
  95883. input[0] = elem;
  95884. matcher(input, null, xml, results);
  95885. input[0] = null;
  95886. return !results.pop();
  95887. };
  95888. }),
  95889. has: markFunction(function (selector) {
  95890. return function (elem) {
  95891. return Sizzle(selector, elem).length > 0;
  95892. };
  95893. }),
  95894. contains: markFunction(function (text) {
  95895. text = text.replace(runescape, funescape);
  95896. return function (elem) {
  95897. return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;
  95898. };
  95899. }),
  95900. lang: markFunction(function (lang) {
  95901. if (!ridentifier.test(lang || '')) {
  95902. Sizzle.error('unsupported lang: ' + lang);
  95903. }
  95904. lang = lang.replace(runescape, funescape).toLowerCase();
  95905. return function (elem) {
  95906. var elemLang;
  95907. do {
  95908. if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute('xml:lang') || elem.getAttribute('lang')) {
  95909. elemLang = elemLang.toLowerCase();
  95910. return elemLang === lang || elemLang.indexOf(lang + '-') === 0;
  95911. }
  95912. } while ((elem = elem.parentNode) && elem.nodeType === 1);
  95913. return false;
  95914. };
  95915. }),
  95916. target: function (elem) {
  95917. var hash = window.location && window.location.hash;
  95918. return hash && hash.slice(1) === elem.id;
  95919. },
  95920. root: function (elem) {
  95921. return elem === docElem;
  95922. },
  95923. focus: function (elem) {
  95924. return elem === document$1.activeElement && (!document$1.hasFocus || document$1.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
  95925. },
  95926. enabled: function (elem) {
  95927. return elem.disabled === false;
  95928. },
  95929. disabled: function (elem) {
  95930. return elem.disabled === true;
  95931. },
  95932. checked: function (elem) {
  95933. var nodeName = elem.nodeName.toLowerCase();
  95934. return nodeName === 'input' && !!elem.checked || nodeName === 'option' && !!elem.selected;
  95935. },
  95936. selected: function (elem) {
  95937. if (elem.parentNode) {
  95938. elem.parentNode.selectedIndex;
  95939. }
  95940. return elem.selected === true;
  95941. },
  95942. empty: function (elem) {
  95943. for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  95944. if (elem.nodeType < 6) {
  95945. return false;
  95946. }
  95947. }
  95948. return true;
  95949. },
  95950. parent: function (elem) {
  95951. return !Expr.pseudos.empty(elem);
  95952. },
  95953. header: function (elem) {
  95954. return rheader.test(elem.nodeName);
  95955. },
  95956. input: function (elem) {
  95957. return rinputs.test(elem.nodeName);
  95958. },
  95959. button: function (elem) {
  95960. var name = elem.nodeName.toLowerCase();
  95961. return name === 'input' && elem.type === 'button' || name === 'button';
  95962. },
  95963. text: function (elem) {
  95964. var attr;
  95965. return elem.nodeName.toLowerCase() === 'input' && elem.type === 'text' && ((attr = elem.getAttribute('type')) == null || attr.toLowerCase() === 'text');
  95966. },
  95967. first: createPositionalPseudo(function () {
  95968. return [0];
  95969. }),
  95970. last: createPositionalPseudo(function (matchIndexes, length) {
  95971. return [length - 1];
  95972. }),
  95973. eq: createPositionalPseudo(function (matchIndexes, length, argument) {
  95974. return [argument < 0 ? argument + length : argument];
  95975. }),
  95976. even: createPositionalPseudo(function (matchIndexes, length) {
  95977. var i = 0;
  95978. for (; i < length; i += 2) {
  95979. matchIndexes.push(i);
  95980. }
  95981. return matchIndexes;
  95982. }),
  95983. odd: createPositionalPseudo(function (matchIndexes, length) {
  95984. var i = 1;
  95985. for (; i < length; i += 2) {
  95986. matchIndexes.push(i);
  95987. }
  95988. return matchIndexes;
  95989. }),
  95990. lt: createPositionalPseudo(function (matchIndexes, length, argument) {
  95991. var i = argument < 0 ? argument + length : argument;
  95992. for (; --i >= 0;) {
  95993. matchIndexes.push(i);
  95994. }
  95995. return matchIndexes;
  95996. }),
  95997. gt: createPositionalPseudo(function (matchIndexes, length, argument) {
  95998. var i = argument < 0 ? argument + length : argument;
  95999. for (; ++i < length;) {
  96000. matchIndexes.push(i);
  96001. }
  96002. return matchIndexes;
  96003. })
  96004. }
  96005. };
  96006. Expr.pseudos.nth = Expr.pseudos.eq;
  96007. each$k([
  96008. 'radio',
  96009. 'checkbox',
  96010. 'file',
  96011. 'password',
  96012. 'image'
  96013. ], function (i) {
  96014. Expr.pseudos[i] = createInputPseudo(i);
  96015. });
  96016. each$k([
  96017. 'submit',
  96018. 'reset'
  96019. ], function (i) {
  96020. Expr.pseudos[i] = createButtonPseudo(i);
  96021. });
  96022. function setFilters() {
  96023. }
  96024. setFilters.prototype = Expr.filters = Expr.pseudos;
  96025. Expr.setFilters = new setFilters();
  96026. tokenize = Sizzle.tokenize = function (selector, parseOnly) {
  96027. var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + ' '];
  96028. if (cached) {
  96029. return parseOnly ? 0 : cached.slice(0);
  96030. }
  96031. soFar = selector;
  96032. groups = [];
  96033. preFilters = Expr.preFilter;
  96034. while (soFar) {
  96035. if (!matched || (match = rcomma.exec(soFar))) {
  96036. if (match) {
  96037. soFar = soFar.slice(match[0].length) || soFar;
  96038. }
  96039. groups.push(tokens = []);
  96040. }
  96041. matched = false;
  96042. if (match = rcombinators.exec(soFar)) {
  96043. matched = match.shift();
  96044. tokens.push({
  96045. value: matched,
  96046. type: match[0].replace(rtrim, ' ')
  96047. });
  96048. soFar = soFar.slice(matched.length);
  96049. }
  96050. for (type in Expr.filter) {
  96051. if (!Expr.filter.hasOwnProperty(type)) {
  96052. continue;
  96053. }
  96054. if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
  96055. matched = match.shift();
  96056. tokens.push({
  96057. value: matched,
  96058. type: type,
  96059. matches: match
  96060. });
  96061. soFar = soFar.slice(matched.length);
  96062. }
  96063. }
  96064. if (!matched) {
  96065. break;
  96066. }
  96067. }
  96068. return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
  96069. };
  96070. function toSelector(tokens) {
  96071. var i = 0, len = tokens.length, selector = '';
  96072. for (; i < len; i++) {
  96073. selector += tokens[i].value;
  96074. }
  96075. return selector;
  96076. }
  96077. function addCombinator(matcher, combinator, base) {
  96078. var dir = combinator.dir, checkNonElements = base && dir === 'parentNode', doneName = done++;
  96079. return combinator.first ? function (elem, context, xml) {
  96080. while (elem = elem[dir]) {
  96081. if (elem.nodeType === 1 || checkNonElements) {
  96082. return matcher(elem, context, xml);
  96083. }
  96084. }
  96085. } : function (elem, context, xml) {
  96086. var oldCache, outerCache, newCache = [
  96087. dirruns,
  96088. doneName
  96089. ];
  96090. if (xml) {
  96091. while (elem = elem[dir]) {
  96092. if (elem.nodeType === 1 || checkNonElements) {
  96093. if (matcher(elem, context, xml)) {
  96094. return true;
  96095. }
  96096. }
  96097. }
  96098. } else {
  96099. while (elem = elem[dir]) {
  96100. if (elem.nodeType === 1 || checkNonElements) {
  96101. outerCache = elem[expando] || (elem[expando] = {});
  96102. if ((oldCache = outerCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
  96103. return newCache[2] = oldCache[2];
  96104. } else {
  96105. outerCache[dir] = newCache;
  96106. if (newCache[2] = matcher(elem, context, xml)) {
  96107. return true;
  96108. }
  96109. }
  96110. }
  96111. }
  96112. }
  96113. };
  96114. }
  96115. function elementMatcher(matchers) {
  96116. return matchers.length > 1 ? function (elem, context, xml) {
  96117. var i = matchers.length;
  96118. while (i--) {
  96119. if (!matchers[i](elem, context, xml)) {
  96120. return false;
  96121. }
  96122. }
  96123. return true;
  96124. } : matchers[0];
  96125. }
  96126. function multipleContexts(selector, contexts, results) {
  96127. var i = 0, len = contexts.length;
  96128. for (; i < len; i++) {
  96129. Sizzle(selector, contexts[i], results);
  96130. }
  96131. return results;
  96132. }
  96133. function condense(unmatched, map, filter, context, xml) {
  96134. var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null;
  96135. for (; i < len; i++) {
  96136. if (elem = unmatched[i]) {
  96137. if (!filter || filter(elem, context, xml)) {
  96138. newUnmatched.push(elem);
  96139. if (mapped) {
  96140. map.push(i);
  96141. }
  96142. }
  96143. }
  96144. }
  96145. return newUnmatched;
  96146. }
  96147. function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
  96148. if (postFilter && !postFilter[expando]) {
  96149. postFilter = setMatcher(postFilter);
  96150. }
  96151. if (postFinder && !postFinder[expando]) {
  96152. postFinder = setMatcher(postFinder, postSelector);
  96153. }
  96154. return markFunction(function (seed, results, context, xml) {
  96155. var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(selector || '*', context.nodeType ? [context] : context, []), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
  96156. if (matcher) {
  96157. matcher(matcherIn, matcherOut, context, xml);
  96158. }
  96159. if (postFilter) {
  96160. temp = condense(matcherOut, postMap);
  96161. postFilter(temp, [], context, xml);
  96162. i = temp.length;
  96163. while (i--) {
  96164. if (elem = temp[i]) {
  96165. matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
  96166. }
  96167. }
  96168. }
  96169. if (seed) {
  96170. if (postFinder || preFilter) {
  96171. if (postFinder) {
  96172. temp = [];
  96173. i = matcherOut.length;
  96174. while (i--) {
  96175. if (elem = matcherOut[i]) {
  96176. temp.push(matcherIn[i] = elem);
  96177. }
  96178. }
  96179. postFinder(null, matcherOut = [], temp, xml);
  96180. }
  96181. i = matcherOut.length;
  96182. while (i--) {
  96183. if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1) {
  96184. seed[temp] = !(results[temp] = elem);
  96185. }
  96186. }
  96187. }
  96188. } else {
  96189. matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
  96190. if (postFinder) {
  96191. postFinder(null, results, matcherOut, xml);
  96192. } else {
  96193. push$1.apply(results, matcherOut);
  96194. }
  96195. }
  96196. });
  96197. }
  96198. function matcherFromTokens(tokens) {
  96199. var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[' '], i = leadingRelative ? 1 : 0, matchContext = addCombinator(function (elem) {
  96200. return elem === checkContext;
  96201. }, implicitRelative, true), matchAnyContext = addCombinator(function (elem) {
  96202. return indexOf.call(checkContext, elem) > -1;
  96203. }, implicitRelative, true), matchers = [function (elem, context, xml) {
  96204. var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
  96205. checkContext = null;
  96206. return ret;
  96207. }];
  96208. for (; i < len; i++) {
  96209. if (matcher = Expr.relative[tokens[i].type]) {
  96210. matchers = [addCombinator(elementMatcher(matchers), matcher)];
  96211. } else {
  96212. matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
  96213. if (matcher[expando]) {
  96214. j = ++i;
  96215. for (; j < len; j++) {
  96216. if (Expr.relative[tokens[j].type]) {
  96217. break;
  96218. }
  96219. }
  96220. return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === ' ' ? '*' : '' })).replace(rtrim, '$1'), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
  96221. }
  96222. matchers.push(matcher);
  96223. }
  96224. }
  96225. return elementMatcher(matchers);
  96226. }
  96227. function matcherFromGroupMatchers(elementMatchers, setMatchers) {
  96228. var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function (seed, context, xml, results, outermost) {
  96229. var elem, j, matcher, matchedCount = 0, i = '0', unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG('*', outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
  96230. if (outermost) {
  96231. outermostContext = context !== document$1 && context;
  96232. }
  96233. for (; i !== len && (elem = elems[i]) != null; i++) {
  96234. if (byElement && elem) {
  96235. j = 0;
  96236. while (matcher = elementMatchers[j++]) {
  96237. if (matcher(elem, context, xml)) {
  96238. results.push(elem);
  96239. break;
  96240. }
  96241. }
  96242. if (outermost) {
  96243. dirruns = dirrunsUnique;
  96244. }
  96245. }
  96246. if (bySet) {
  96247. if (elem = !matcher && elem) {
  96248. matchedCount--;
  96249. }
  96250. if (seed) {
  96251. unmatched.push(elem);
  96252. }
  96253. }
  96254. }
  96255. matchedCount += i;
  96256. if (bySet && i !== matchedCount) {
  96257. j = 0;
  96258. while (matcher = setMatchers[j++]) {
  96259. matcher(unmatched, setMatched, context, xml);
  96260. }
  96261. if (seed) {
  96262. if (matchedCount > 0) {
  96263. while (i--) {
  96264. if (!(unmatched[i] || setMatched[i])) {
  96265. setMatched[i] = pop.call(results);
  96266. }
  96267. }
  96268. }
  96269. setMatched = condense(setMatched);
  96270. }
  96271. push$1.apply(results, setMatched);
  96272. if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
  96273. Sizzle.uniqueSort(results);
  96274. }
  96275. }
  96276. if (outermost) {
  96277. dirruns = dirrunsUnique;
  96278. outermostContext = contextBackup;
  96279. }
  96280. return unmatched;
  96281. };
  96282. return bySet ? markFunction(superMatcher) : superMatcher;
  96283. }
  96284. compile = Sizzle.compile = function (selector, match) {
  96285. var i, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + ' '];
  96286. if (!cached) {
  96287. if (!match) {
  96288. match = tokenize(selector);
  96289. }
  96290. i = match.length;
  96291. while (i--) {
  96292. cached = matcherFromTokens(match[i]);
  96293. if (cached[expando]) {
  96294. setMatchers.push(cached);
  96295. } else {
  96296. elementMatchers.push(cached);
  96297. }
  96298. }
  96299. cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
  96300. cached.selector = selector;
  96301. }
  96302. return cached;
  96303. };
  96304. select$1 = Sizzle.select = function (selector, context, results, seed) {
  96305. var i, tokens, token, type, find, compiled = typeof selector === 'function' && selector, match = !seed && tokenize(selector = compiled.selector || selector);
  96306. results = results || [];
  96307. if (match.length === 1) {
  96308. tokens = match[0] = match[0].slice(0);
  96309. if (tokens.length > 2 && (token = tokens[0]).type === 'ID' && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
  96310. context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0];
  96311. if (!context) {
  96312. return results;
  96313. } else if (compiled) {
  96314. context = context.parentNode;
  96315. }
  96316. selector = selector.slice(tokens.shift().value.length);
  96317. }
  96318. i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
  96319. while (i--) {
  96320. token = tokens[i];
  96321. if (Expr.relative[type = token.type]) {
  96322. break;
  96323. }
  96324. if (find = Expr.find[type]) {
  96325. if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
  96326. tokens.splice(i, 1);
  96327. selector = seed.length && toSelector(tokens);
  96328. if (!selector) {
  96329. push$1.apply(results, seed);
  96330. return results;
  96331. }
  96332. break;
  96333. }
  96334. }
  96335. }
  96336. }
  96337. (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, rsibling.test(selector) && testContext(context.parentNode) || context);
  96338. return results;
  96339. };
  96340. support.sortStable = expando.split('').sort(sortOrder).join('') === expando;
  96341. support.detectDuplicates = !!hasDuplicate;
  96342. setDocument();
  96343. support.sortDetached = true;
  96344. var doc = document;
  96345. var push = Array.prototype.push;
  96346. var slice = Array.prototype.slice;
  96347. var rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;
  96348. var Event$1 = EventUtils.Event;
  96349. var skipUniques = Tools.makeMap('children,contents,next,prev');
  96350. var isDefined = function (obj) {
  96351. return typeof obj !== 'undefined';
  96352. };
  96353. var isString = function (obj) {
  96354. return typeof obj === 'string';
  96355. };
  96356. var isWindow = function (obj) {
  96357. return obj && obj === obj.window;
  96358. };
  96359. var createFragment$1 = function (html, fragDoc) {
  96360. fragDoc = fragDoc || doc;
  96361. var container = fragDoc.createElement('div');
  96362. var frag = fragDoc.createDocumentFragment();
  96363. container.innerHTML = html;
  96364. var node;
  96365. while (node = container.firstChild) {
  96366. frag.appendChild(node);
  96367. }
  96368. return frag;
  96369. };
  96370. var domManipulate = function (targetNodes, sourceItem, callback, reverse) {
  96371. var i;
  96372. if (isString(sourceItem)) {
  96373. sourceItem = createFragment$1(sourceItem, getElementDocument(targetNodes[0]));
  96374. } else if (sourceItem.length && !sourceItem.nodeType) {
  96375. sourceItem = DomQuery.makeArray(sourceItem);
  96376. if (reverse) {
  96377. for (i = sourceItem.length - 1; i >= 0; i--) {
  96378. domManipulate(targetNodes, sourceItem[i], callback, reverse);
  96379. }
  96380. } else {
  96381. for (i = 0; i < sourceItem.length; i++) {
  96382. domManipulate(targetNodes, sourceItem[i], callback, reverse);
  96383. }
  96384. }
  96385. return targetNodes;
  96386. }
  96387. if (sourceItem.nodeType) {
  96388. i = targetNodes.length;
  96389. while (i--) {
  96390. callback.call(targetNodes[i], sourceItem);
  96391. }
  96392. }
  96393. return targetNodes;
  96394. };
  96395. var hasClass = function (node, className) {
  96396. return node && className && (' ' + node.className + ' ').indexOf(' ' + className + ' ') !== -1;
  96397. };
  96398. var wrap$2 = function (elements, wrapper, all) {
  96399. var lastParent, newWrapper;
  96400. wrapper = DomQuery(wrapper)[0];
  96401. elements.each(function () {
  96402. var self = this;
  96403. if (!all || lastParent !== self.parentNode) {
  96404. lastParent = self.parentNode;
  96405. newWrapper = wrapper.cloneNode(false);
  96406. self.parentNode.insertBefore(newWrapper, self);
  96407. newWrapper.appendChild(self);
  96408. } else {
  96409. newWrapper.appendChild(self);
  96410. }
  96411. });
  96412. return elements;
  96413. };
  96414. var numericCssMap = Tools.makeMap('fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom', ' ');
  96415. var booleanMap = Tools.makeMap('checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected', ' ');
  96416. var propFix = {
  96417. for: 'htmlFor',
  96418. class: 'className',
  96419. readonly: 'readOnly'
  96420. };
  96421. var cssFix = { float: 'cssFloat' };
  96422. var attrHooks = {}, cssHooks = {};
  96423. var DomQueryConstructor = function (selector, context) {
  96424. return new DomQuery.fn.init(selector, context);
  96425. };
  96426. var inArray$1 = function (item, array) {
  96427. var i;
  96428. if (array.indexOf) {
  96429. return array.indexOf(item);
  96430. }
  96431. i = array.length;
  96432. while (i--) {
  96433. if (array[i] === item) {
  96434. return i;
  96435. }
  96436. }
  96437. return -1;
  96438. };
  96439. var whiteSpaceRegExp = /^\s*|\s*$/g;
  96440. var trim$1 = function (str) {
  96441. return str === null || str === undefined ? '' : ('' + str).replace(whiteSpaceRegExp, '');
  96442. };
  96443. var each$g = function (obj, callback) {
  96444. var length, key, i, value;
  96445. if (obj) {
  96446. length = obj.length;
  96447. if (length === undefined) {
  96448. for (key in obj) {
  96449. if (obj.hasOwnProperty(key)) {
  96450. value = obj[key];
  96451. if (callback.call(value, key, value) === false) {
  96452. break;
  96453. }
  96454. }
  96455. }
  96456. } else {
  96457. for (i = 0; i < length; i++) {
  96458. value = obj[i];
  96459. if (callback.call(value, i, value) === false) {
  96460. break;
  96461. }
  96462. }
  96463. }
  96464. }
  96465. return obj;
  96466. };
  96467. var grep$2 = function (array, callback) {
  96468. var out = [];
  96469. each$g(array, function (i, item) {
  96470. if (callback(item, i)) {
  96471. out.push(item);
  96472. }
  96473. });
  96474. return out;
  96475. };
  96476. var getElementDocument = function (element) {
  96477. if (!element) {
  96478. return doc;
  96479. }
  96480. if (element.nodeType === 9) {
  96481. return element;
  96482. }
  96483. return element.ownerDocument;
  96484. };
  96485. DomQueryConstructor.fn = DomQueryConstructor.prototype = {
  96486. constructor: DomQueryConstructor,
  96487. selector: '',
  96488. context: null,
  96489. length: 0,
  96490. init: function (selector, context) {
  96491. var self = this;
  96492. var match, node;
  96493. if (!selector) {
  96494. return self;
  96495. }
  96496. if (selector.nodeType) {
  96497. self.context = self[0] = selector;
  96498. self.length = 1;
  96499. return self;
  96500. }
  96501. if (context && context.nodeType) {
  96502. self.context = context;
  96503. } else {
  96504. if (context) {
  96505. return DomQuery(selector).attr(context);
  96506. }
  96507. self.context = context = document;
  96508. }
  96509. if (isString(selector)) {
  96510. self.selector = selector;
  96511. if (selector.charAt(0) === '<' && selector.charAt(selector.length - 1) === '>' && selector.length >= 3) {
  96512. match = [
  96513. null,
  96514. selector,
  96515. null
  96516. ];
  96517. } else {
  96518. match = rquickExpr.exec(selector);
  96519. }
  96520. if (match) {
  96521. if (match[1]) {
  96522. node = createFragment$1(selector, getElementDocument(context)).firstChild;
  96523. while (node) {
  96524. push.call(self, node);
  96525. node = node.nextSibling;
  96526. }
  96527. } else {
  96528. node = getElementDocument(context).getElementById(match[2]);
  96529. if (!node) {
  96530. return self;
  96531. }
  96532. if (node.id !== match[2]) {
  96533. return self.find(selector);
  96534. }
  96535. self.length = 1;
  96536. self[0] = node;
  96537. }
  96538. } else {
  96539. return DomQuery(context).find(selector);
  96540. }
  96541. } else {
  96542. this.add(selector, false);
  96543. }
  96544. return self;
  96545. },
  96546. toArray: function () {
  96547. return Tools.toArray(this);
  96548. },
  96549. add: function (items, sort) {
  96550. var self = this;
  96551. var nodes, i;
  96552. if (isString(items)) {
  96553. return self.add(DomQuery(items));
  96554. }
  96555. if (sort !== false) {
  96556. nodes = DomQuery.unique(self.toArray().concat(DomQuery.makeArray(items)));
  96557. self.length = nodes.length;
  96558. for (i = 0; i < nodes.length; i++) {
  96559. self[i] = nodes[i];
  96560. }
  96561. } else {
  96562. push.apply(self, DomQuery.makeArray(items));
  96563. }
  96564. return self;
  96565. },
  96566. attr: function (name, value) {
  96567. var self = this;
  96568. var hook;
  96569. if (typeof name === 'object') {
  96570. each$g(name, function (name, value) {
  96571. self.attr(name, value);
  96572. });
  96573. } else if (isDefined(value)) {
  96574. this.each(function () {
  96575. var hook;
  96576. if (this.nodeType === 1) {
  96577. hook = attrHooks[name];
  96578. if (hook && hook.set) {
  96579. hook.set(this, value);
  96580. return;
  96581. }
  96582. if (value === null) {
  96583. this.removeAttribute(name, 2);
  96584. } else {
  96585. this.setAttribute(name, value, 2);
  96586. }
  96587. }
  96588. });
  96589. } else {
  96590. if (self[0] && self[0].nodeType === 1) {
  96591. hook = attrHooks[name];
  96592. if (hook && hook.get) {
  96593. return hook.get(self[0], name);
  96594. }
  96595. if (booleanMap[name]) {
  96596. return self.prop(name) ? name : undefined;
  96597. }
  96598. value = self[0].getAttribute(name, 2);
  96599. if (value === null) {
  96600. value = undefined;
  96601. }
  96602. }
  96603. return value;
  96604. }
  96605. return self;
  96606. },
  96607. removeAttr: function (name) {
  96608. return this.attr(name, null);
  96609. },
  96610. prop: function (name, value) {
  96611. var self = this;
  96612. name = propFix[name] || name;
  96613. if (typeof name === 'object') {
  96614. each$g(name, function (name, value) {
  96615. self.prop(name, value);
  96616. });
  96617. } else if (isDefined(value)) {
  96618. this.each(function () {
  96619. if (this.nodeType === 1) {
  96620. this[name] = value;
  96621. }
  96622. });
  96623. } else {
  96624. if (self[0] && self[0].nodeType && name in self[0]) {
  96625. return self[0][name];
  96626. }
  96627. return value;
  96628. }
  96629. return self;
  96630. },
  96631. css: function (name, value) {
  96632. var self = this;
  96633. var elm, hook;
  96634. var camel = function (name) {
  96635. return name.replace(/-(\D)/g, function (a, b) {
  96636. return b.toUpperCase();
  96637. });
  96638. };
  96639. var dashed = function (name) {
  96640. return name.replace(/[A-Z]/g, function (a) {
  96641. return '-' + a;
  96642. });
  96643. };
  96644. if (typeof name === 'object') {
  96645. each$g(name, function (name, value) {
  96646. self.css(name, value);
  96647. });
  96648. } else {
  96649. if (isDefined(value)) {
  96650. name = camel(name);
  96651. if (typeof value === 'number' && !numericCssMap[name]) {
  96652. value = value.toString() + 'px';
  96653. }
  96654. self.each(function () {
  96655. var style = this.style;
  96656. hook = cssHooks[name];
  96657. if (hook && hook.set) {
  96658. hook.set(this, value);
  96659. return;
  96660. }
  96661. try {
  96662. this.style[cssFix[name] || name] = value;
  96663. } catch (ex) {
  96664. }
  96665. if (value === null || value === '') {
  96666. if (style.removeProperty) {
  96667. style.removeProperty(dashed(name));
  96668. } else {
  96669. style.removeAttribute(name);
  96670. }
  96671. }
  96672. });
  96673. } else {
  96674. elm = self[0];
  96675. hook = cssHooks[name];
  96676. if (hook && hook.get) {
  96677. return hook.get(elm);
  96678. }
  96679. if (elm.ownerDocument.defaultView) {
  96680. try {
  96681. return elm.ownerDocument.defaultView.getComputedStyle(elm, null).getPropertyValue(dashed(name));
  96682. } catch (ex) {
  96683. return undefined;
  96684. }
  96685. } else if (elm.currentStyle) {
  96686. return elm.currentStyle[camel(name)];
  96687. } else {
  96688. return '';
  96689. }
  96690. }
  96691. }
  96692. return self;
  96693. },
  96694. remove: function () {
  96695. var self = this;
  96696. var node, i = this.length;
  96697. while (i--) {
  96698. node = self[i];
  96699. Event$1.clean(node);
  96700. if (node.parentNode) {
  96701. node.parentNode.removeChild(node);
  96702. }
  96703. }
  96704. return this;
  96705. },
  96706. empty: function () {
  96707. var self = this;
  96708. var node, i = this.length;
  96709. while (i--) {
  96710. node = self[i];
  96711. while (node.firstChild) {
  96712. node.removeChild(node.firstChild);
  96713. }
  96714. }
  96715. return this;
  96716. },
  96717. html: function (value) {
  96718. var self = this;
  96719. var i;
  96720. if (isDefined(value)) {
  96721. i = self.length;
  96722. try {
  96723. while (i--) {
  96724. self[i].innerHTML = value;
  96725. }
  96726. } catch (ex) {
  96727. DomQuery(self[i]).empty().append(value);
  96728. }
  96729. return self;
  96730. }
  96731. return self[0] ? self[0].innerHTML : '';
  96732. },
  96733. text: function (value) {
  96734. var self = this;
  96735. var i;
  96736. if (isDefined(value)) {
  96737. i = self.length;
  96738. while (i--) {
  96739. if ('innerText' in self[i]) {
  96740. self[i].innerText = value;
  96741. } else {
  96742. self[0].textContent = value;
  96743. }
  96744. }
  96745. return self;
  96746. }
  96747. return self[0] ? self[0].innerText || self[0].textContent : '';
  96748. },
  96749. append: function () {
  96750. return domManipulate(this, arguments, function (node) {
  96751. if (this.nodeType === 1 || this.host && this.host.nodeType === 1) {
  96752. this.appendChild(node);
  96753. }
  96754. });
  96755. },
  96756. prepend: function () {
  96757. return domManipulate(this, arguments, function (node) {
  96758. if (this.nodeType === 1 || this.host && this.host.nodeType === 1) {
  96759. this.insertBefore(node, this.firstChild);
  96760. }
  96761. }, true);
  96762. },
  96763. before: function () {
  96764. var self = this;
  96765. if (self[0] && self[0].parentNode) {
  96766. return domManipulate(self, arguments, function (node) {
  96767. this.parentNode.insertBefore(node, this);
  96768. });
  96769. }
  96770. return self;
  96771. },
  96772. after: function () {
  96773. var self = this;
  96774. if (self[0] && self[0].parentNode) {
  96775. return domManipulate(self, arguments, function (node) {
  96776. this.parentNode.insertBefore(node, this.nextSibling);
  96777. }, true);
  96778. }
  96779. return self;
  96780. },
  96781. appendTo: function (val) {
  96782. DomQuery(val).append(this);
  96783. return this;
  96784. },
  96785. prependTo: function (val) {
  96786. DomQuery(val).prepend(this);
  96787. return this;
  96788. },
  96789. replaceWith: function (content) {
  96790. return this.before(content).remove();
  96791. },
  96792. wrap: function (content) {
  96793. return wrap$2(this, content);
  96794. },
  96795. wrapAll: function (content) {
  96796. return wrap$2(this, content, true);
  96797. },
  96798. wrapInner: function (content) {
  96799. this.each(function () {
  96800. DomQuery(this).contents().wrapAll(content);
  96801. });
  96802. return this;
  96803. },
  96804. unwrap: function () {
  96805. return this.parent().each(function () {
  96806. DomQuery(this).replaceWith(this.childNodes);
  96807. });
  96808. },
  96809. clone: function () {
  96810. var result = [];
  96811. this.each(function () {
  96812. result.push(this.cloneNode(true));
  96813. });
  96814. return DomQuery(result);
  96815. },
  96816. addClass: function (className) {
  96817. return this.toggleClass(className, true);
  96818. },
  96819. removeClass: function (className) {
  96820. return this.toggleClass(className, false);
  96821. },
  96822. toggleClass: function (className, state) {
  96823. var self = this;
  96824. if (typeof className !== 'string') {
  96825. return self;
  96826. }
  96827. if (className.indexOf(' ') !== -1) {
  96828. each$g(className.split(' '), function () {
  96829. self.toggleClass(this, state);
  96830. });
  96831. } else {
  96832. self.each(function (index, node) {
  96833. var classState = hasClass(node, className);
  96834. if (classState !== state) {
  96835. var existingClassName = node.className;
  96836. if (classState) {
  96837. node.className = trim$1((' ' + existingClassName + ' ').replace(' ' + className + ' ', ' '));
  96838. } else {
  96839. node.className += existingClassName ? ' ' + className : className;
  96840. }
  96841. }
  96842. });
  96843. }
  96844. return self;
  96845. },
  96846. hasClass: function (className) {
  96847. return hasClass(this[0], className);
  96848. },
  96849. each: function (callback) {
  96850. return each$g(this, callback);
  96851. },
  96852. on: function (name, callback) {
  96853. return this.each(function () {
  96854. Event$1.bind(this, name, callback);
  96855. });
  96856. },
  96857. off: function (name, callback) {
  96858. return this.each(function () {
  96859. Event$1.unbind(this, name, callback);
  96860. });
  96861. },
  96862. trigger: function (name) {
  96863. return this.each(function () {
  96864. if (typeof name === 'object') {
  96865. Event$1.fire(this, name.type, name);
  96866. } else {
  96867. Event$1.fire(this, name);
  96868. }
  96869. });
  96870. },
  96871. show: function () {
  96872. return this.css('display', '');
  96873. },
  96874. hide: function () {
  96875. return this.css('display', 'none');
  96876. },
  96877. slice: function () {
  96878. return DomQuery(slice.apply(this, arguments));
  96879. },
  96880. eq: function (index) {
  96881. return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
  96882. },
  96883. first: function () {
  96884. return this.eq(0);
  96885. },
  96886. last: function () {
  96887. return this.eq(-1);
  96888. },
  96889. find: function (selector) {
  96890. var i, l;
  96891. var ret = [];
  96892. for (i = 0, l = this.length; i < l; i++) {
  96893. DomQuery.find(selector, this[i], ret);
  96894. }
  96895. return DomQuery(ret);
  96896. },
  96897. filter: function (selector) {
  96898. if (typeof selector === 'function') {
  96899. return DomQuery(grep$2(this.toArray(), function (item, i) {
  96900. return selector(i, item);
  96901. }));
  96902. }
  96903. return DomQuery(DomQuery.filter(selector, this.toArray()));
  96904. },
  96905. closest: function (selector) {
  96906. var result = [];
  96907. if (selector instanceof DomQuery) {
  96908. selector = selector[0];
  96909. }
  96910. this.each(function (i, node) {
  96911. while (node) {
  96912. if (typeof selector === 'string' && DomQuery(node).is(selector)) {
  96913. result.push(node);
  96914. break;
  96915. } else if (node === selector) {
  96916. result.push(node);
  96917. break;
  96918. }
  96919. node = node.parentNode;
  96920. }
  96921. });
  96922. return DomQuery(result);
  96923. },
  96924. offset: function (offset) {
  96925. var elm, doc, docElm;
  96926. var x = 0, y = 0, pos;
  96927. if (!offset) {
  96928. elm = this[0];
  96929. if (elm) {
  96930. doc = elm.ownerDocument;
  96931. docElm = doc.documentElement;
  96932. if (elm.getBoundingClientRect) {
  96933. pos = elm.getBoundingClientRect();
  96934. x = pos.left + (docElm.scrollLeft || doc.body.scrollLeft) - docElm.clientLeft;
  96935. y = pos.top + (docElm.scrollTop || doc.body.scrollTop) - docElm.clientTop;
  96936. }
  96937. }
  96938. return {
  96939. left: x,
  96940. top: y
  96941. };
  96942. }
  96943. return this.css(offset);
  96944. },
  96945. push: push,
  96946. sort: Array.prototype.sort,
  96947. splice: Array.prototype.splice
  96948. };
  96949. Tools.extend(DomQueryConstructor, {
  96950. extend: Tools.extend,
  96951. makeArray: function (object) {
  96952. if (isWindow(object) || object.nodeType) {
  96953. return [object];
  96954. }
  96955. return Tools.toArray(object);
  96956. },
  96957. inArray: inArray$1,
  96958. isArray: Tools.isArray,
  96959. each: each$g,
  96960. trim: trim$1,
  96961. grep: grep$2,
  96962. find: Sizzle,
  96963. expr: Sizzle.selectors,
  96964. unique: Sizzle.uniqueSort,
  96965. text: Sizzle.getText,
  96966. contains: Sizzle.contains,
  96967. filter: function (expr, elems, not) {
  96968. var i = elems.length;
  96969. if (not) {
  96970. expr = ':not(' + expr + ')';
  96971. }
  96972. while (i--) {
  96973. if (elems[i].nodeType !== 1) {
  96974. elems.splice(i, 1);
  96975. }
  96976. }
  96977. if (elems.length === 1) {
  96978. elems = DomQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [];
  96979. } else {
  96980. elems = DomQuery.find.matches(expr, elems);
  96981. }
  96982. return elems;
  96983. }
  96984. });
  96985. var dir = function (el, prop, until) {
  96986. var matched = [];
  96987. var cur = el[prop];
  96988. if (typeof until !== 'string' && until instanceof DomQuery) {
  96989. until = until[0];
  96990. }
  96991. while (cur && cur.nodeType !== 9) {
  96992. if (until !== undefined) {
  96993. if (cur === until) {
  96994. break;
  96995. }
  96996. if (typeof until === 'string' && DomQuery(cur).is(until)) {
  96997. break;
  96998. }
  96999. }
  97000. if (cur.nodeType === 1) {
  97001. matched.push(cur);
  97002. }
  97003. cur = cur[prop];
  97004. }
  97005. return matched;
  97006. };
  97007. var sibling$1 = function (node, siblingName, nodeType, until) {
  97008. var result = [];
  97009. if (until instanceof DomQuery) {
  97010. until = until[0];
  97011. }
  97012. for (; node; node = node[siblingName]) {
  97013. if (nodeType && node.nodeType !== nodeType) {
  97014. continue;
  97015. }
  97016. if (until !== undefined) {
  97017. if (node === until) {
  97018. break;
  97019. }
  97020. if (typeof until === 'string' && DomQuery(node).is(until)) {
  97021. break;
  97022. }
  97023. }
  97024. result.push(node);
  97025. }
  97026. return result;
  97027. };
  97028. var firstSibling = function (node, siblingName, nodeType) {
  97029. for (node = node[siblingName]; node; node = node[siblingName]) {
  97030. if (node.nodeType === nodeType) {
  97031. return node;
  97032. }
  97033. }
  97034. return null;
  97035. };
  97036. each$g({
  97037. parent: function (node) {
  97038. var parent = node.parentNode;
  97039. return parent && parent.nodeType !== 11 ? parent : null;
  97040. },
  97041. parents: function (node) {
  97042. return dir(node, 'parentNode');
  97043. },
  97044. next: function (node) {
  97045. return firstSibling(node, 'nextSibling', 1);
  97046. },
  97047. prev: function (node) {
  97048. return firstSibling(node, 'previousSibling', 1);
  97049. },
  97050. children: function (node) {
  97051. return sibling$1(node.firstChild, 'nextSibling', 1);
  97052. },
  97053. contents: function (node) {
  97054. return Tools.toArray((node.nodeName === 'iframe' ? node.contentDocument || node.contentWindow.document : node).childNodes);
  97055. }
  97056. }, function (name, fn) {
  97057. DomQueryConstructor.fn[name] = function (selector) {
  97058. var self = this;
  97059. var result = [];
  97060. self.each(function () {
  97061. var nodes = fn.call(result, this, selector, result);
  97062. if (nodes) {
  97063. if (DomQuery.isArray(nodes)) {
  97064. result.push.apply(result, nodes);
  97065. } else {
  97066. result.push(nodes);
  97067. }
  97068. }
  97069. });
  97070. if (this.length > 1) {
  97071. if (!skipUniques[name]) {
  97072. result = DomQuery.unique(result);
  97073. }
  97074. if (name.indexOf('parents') === 0) {
  97075. result = result.reverse();
  97076. }
  97077. }
  97078. var wrappedResult = DomQuery(result);
  97079. if (selector) {
  97080. return wrappedResult.filter(selector);
  97081. }
  97082. return wrappedResult;
  97083. };
  97084. });
  97085. each$g({
  97086. parentsUntil: function (node, until) {
  97087. return dir(node, 'parentNode', until);
  97088. },
  97089. nextUntil: function (node, until) {
  97090. return sibling$1(node, 'nextSibling', 1, until).slice(1);
  97091. },
  97092. prevUntil: function (node, until) {
  97093. return sibling$1(node, 'previousSibling', 1, until).slice(1);
  97094. }
  97095. }, function (name, fn) {
  97096. DomQueryConstructor.fn[name] = function (selector, filter) {
  97097. var self = this;
  97098. var result = [];
  97099. self.each(function () {
  97100. var nodes = fn.call(result, this, selector, result);
  97101. if (nodes) {
  97102. if (DomQuery.isArray(nodes)) {
  97103. result.push.apply(result, nodes);
  97104. } else {
  97105. result.push(nodes);
  97106. }
  97107. }
  97108. });
  97109. if (this.length > 1) {
  97110. result = DomQuery.unique(result);
  97111. if (name.indexOf('parents') === 0 || name === 'prevUntil') {
  97112. result = result.reverse();
  97113. }
  97114. }
  97115. var wrappedResult = DomQuery(result);
  97116. if (filter) {
  97117. return wrappedResult.filter(filter);
  97118. }
  97119. return wrappedResult;
  97120. };
  97121. });
  97122. DomQueryConstructor.fn.is = function (selector) {
  97123. return !!selector && this.filter(selector).length > 0;
  97124. };
  97125. DomQueryConstructor.fn.init.prototype = DomQueryConstructor.fn;
  97126. DomQueryConstructor.overrideDefaults = function (callback) {
  97127. var defaults;
  97128. var sub = function (selector, context) {
  97129. defaults = defaults || callback();
  97130. if (arguments.length === 0) {
  97131. selector = defaults.element;
  97132. }
  97133. if (!context) {
  97134. context = defaults.context;
  97135. }
  97136. return new sub.fn.init(selector, context);
  97137. };
  97138. DomQuery.extend(sub, this);
  97139. return sub;
  97140. };
  97141. DomQueryConstructor.attrHooks = attrHooks;
  97142. DomQueryConstructor.cssHooks = cssHooks;
  97143. var DomQuery = DomQueryConstructor;
  97144. var each$f = Tools.each;
  97145. var grep$1 = Tools.grep;
  97146. var isIE = Env.ie;
  97147. var simpleSelectorRe = /^([a-z0-9],?)+$/i;
  97148. var setupAttrHooks = function (styles, settings, getContext) {
  97149. var keepValues = settings.keep_values;
  97150. var keepUrlHook = {
  97151. set: function ($elm, value, name) {
  97152. if (settings.url_converter && value !== null) {
  97153. value = settings.url_converter.call(settings.url_converter_scope || getContext(), value, name, $elm[0]);
  97154. }
  97155. $elm.attr('data-mce-' + name, value).attr(name, value);
  97156. },
  97157. get: function ($elm, name) {
  97158. return $elm.attr('data-mce-' + name) || $elm.attr(name);
  97159. }
  97160. };
  97161. var attrHooks = {
  97162. style: {
  97163. set: function ($elm, value) {
  97164. if (value !== null && typeof value === 'object') {
  97165. $elm.css(value);
  97166. return;
  97167. }
  97168. if (keepValues) {
  97169. $elm.attr('data-mce-style', value);
  97170. }
  97171. if (value !== null && typeof value === 'string') {
  97172. $elm.removeAttr('style');
  97173. $elm.css(styles.parse(value));
  97174. } else {
  97175. $elm.attr('style', value);
  97176. }
  97177. },
  97178. get: function ($elm) {
  97179. var value = $elm.attr('data-mce-style') || $elm.attr('style');
  97180. value = styles.serialize(styles.parse(value), $elm[0].nodeName);
  97181. return value;
  97182. }
  97183. }
  97184. };
  97185. if (keepValues) {
  97186. attrHooks.href = attrHooks.src = keepUrlHook;
  97187. }
  97188. return attrHooks;
  97189. };
  97190. var updateInternalStyleAttr = function (styles, $elm) {
  97191. var rawValue = $elm.attr('style');
  97192. var value = styles.serialize(styles.parse(rawValue), $elm[0].nodeName);
  97193. if (!value) {
  97194. value = null;
  97195. }
  97196. $elm.attr('data-mce-style', value);
  97197. };
  97198. var findNodeIndex = function (node, normalized) {
  97199. var idx = 0, lastNodeType, nodeType;
  97200. if (node) {
  97201. for (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) {
  97202. nodeType = node.nodeType;
  97203. if (normalized && nodeType === 3) {
  97204. if (nodeType === lastNodeType || !node.nodeValue.length) {
  97205. continue;
  97206. }
  97207. }
  97208. idx++;
  97209. lastNodeType = nodeType;
  97210. }
  97211. }
  97212. return idx;
  97213. };
  97214. var DOMUtils = function (doc, settings) {
  97215. if (settings === void 0) {
  97216. settings = {};
  97217. }
  97218. var addedStyles = {};
  97219. var win = window;
  97220. var files = {};
  97221. var counter = 0;
  97222. var stdMode = true;
  97223. var boxModel = true;
  97224. var styleSheetLoader = instance.forElement(SugarElement.fromDom(doc), {
  97225. contentCssCors: settings.contentCssCors,
  97226. referrerPolicy: settings.referrerPolicy
  97227. });
  97228. var boundEvents = [];
  97229. var schema = settings.schema ? settings.schema : Schema({});
  97230. var styles = Styles({
  97231. url_converter: settings.url_converter,
  97232. url_converter_scope: settings.url_converter_scope
  97233. }, settings.schema);
  97234. var events = settings.ownEvents ? new EventUtils() : EventUtils.Event;
  97235. var blockElementsMap = schema.getBlockElements();
  97236. var $ = DomQuery.overrideDefaults(function () {
  97237. return {
  97238. context: doc,
  97239. element: self.getRoot()
  97240. };
  97241. });
  97242. var isBlock = function (node) {
  97243. if (typeof node === 'string') {
  97244. return !!blockElementsMap[node];
  97245. } else if (node) {
  97246. var type = node.nodeType;
  97247. if (type) {
  97248. return !!(type === 1 && blockElementsMap[node.nodeName]);
  97249. }
  97250. }
  97251. return false;
  97252. };
  97253. var get = function (elm) {
  97254. return elm && doc && isString$1(elm) ? doc.getElementById(elm) : elm;
  97255. };
  97256. var $$ = function (elm) {
  97257. return $(typeof elm === 'string' ? get(elm) : elm);
  97258. };
  97259. var getAttrib = function (elm, name, defaultVal) {
  97260. var hook, value;
  97261. var $elm = $$(elm);
  97262. if ($elm.length) {
  97263. hook = attrHooks[name];
  97264. if (hook && hook.get) {
  97265. value = hook.get($elm, name);
  97266. } else {
  97267. value = $elm.attr(name);
  97268. }
  97269. }
  97270. if (typeof value === 'undefined') {
  97271. value = defaultVal || '';
  97272. }
  97273. return value;
  97274. };
  97275. var getAttribs = function (elm) {
  97276. var node = get(elm);
  97277. if (!node) {
  97278. return [];
  97279. }
  97280. return node.attributes;
  97281. };
  97282. var setAttrib = function (elm, name, value) {
  97283. if (value === '') {
  97284. value = null;
  97285. }
  97286. var $elm = $$(elm);
  97287. var originalValue = $elm.attr(name);
  97288. if (!$elm.length) {
  97289. return;
  97290. }
  97291. var hook = attrHooks[name];
  97292. if (hook && hook.set) {
  97293. hook.set($elm, value, name);
  97294. } else {
  97295. $elm.attr(name, value);
  97296. }
  97297. if (originalValue !== value && settings.onSetAttrib) {
  97298. settings.onSetAttrib({
  97299. attrElm: $elm,
  97300. attrName: name,
  97301. attrValue: value
  97302. });
  97303. }
  97304. };
  97305. var clone = function (node, deep) {
  97306. if (!isIE || node.nodeType !== 1 || deep) {
  97307. return node.cloneNode(deep);
  97308. } else {
  97309. var clone_1 = doc.createElement(node.nodeName);
  97310. each$f(getAttribs(node), function (attr) {
  97311. setAttrib(clone_1, attr.nodeName, getAttrib(node, attr.nodeName));
  97312. });
  97313. return clone_1;
  97314. }
  97315. };
  97316. var getRoot = function () {
  97317. return settings.root_element || doc.body;
  97318. };
  97319. var getViewPort = function (argWin) {
  97320. var vp = getBounds(argWin);
  97321. return {
  97322. x: vp.x,
  97323. y: vp.y,
  97324. w: vp.width,
  97325. h: vp.height
  97326. };
  97327. };
  97328. var getPos$1 = function (elm, rootElm) {
  97329. return getPos(doc.body, get(elm), rootElm);
  97330. };
  97331. var setStyle = function (elm, name, value) {
  97332. var $elm = isString$1(name) ? $$(elm).css(name, value) : $$(elm).css(name);
  97333. if (settings.update_styles) {
  97334. updateInternalStyleAttr(styles, $elm);
  97335. }
  97336. };
  97337. var setStyles = function (elm, stylesArg) {
  97338. var $elm = $$(elm).css(stylesArg);
  97339. if (settings.update_styles) {
  97340. updateInternalStyleAttr(styles, $elm);
  97341. }
  97342. };
  97343. var getStyle = function (elm, name, computed) {
  97344. var $elm = $$(elm);
  97345. if (computed) {
  97346. return $elm.css(name);
  97347. }
  97348. name = name.replace(/-(\D)/g, function (a, b) {
  97349. return b.toUpperCase();
  97350. });
  97351. if (name === 'float') {
  97352. name = Env.browser.isIE() ? 'styleFloat' : 'cssFloat';
  97353. }
  97354. return $elm[0] && $elm[0].style ? $elm[0].style[name] : undefined;
  97355. };
  97356. var getSize = function (elm) {
  97357. var w, h;
  97358. elm = get(elm);
  97359. w = getStyle(elm, 'width');
  97360. h = getStyle(elm, 'height');
  97361. if (w.indexOf('px') === -1) {
  97362. w = 0;
  97363. }
  97364. if (h.indexOf('px') === -1) {
  97365. h = 0;
  97366. }
  97367. return {
  97368. w: parseInt(w, 10) || elm.offsetWidth || elm.clientWidth,
  97369. h: parseInt(h, 10) || elm.offsetHeight || elm.clientHeight
  97370. };
  97371. };
  97372. var getRect = function (elm) {
  97373. elm = get(elm);
  97374. var pos = getPos$1(elm);
  97375. var size = getSize(elm);
  97376. return {
  97377. x: pos.x,
  97378. y: pos.y,
  97379. w: size.w,
  97380. h: size.h
  97381. };
  97382. };
  97383. var is = function (elm, selector) {
  97384. var i;
  97385. if (!elm) {
  97386. return false;
  97387. }
  97388. if (!Array.isArray(elm)) {
  97389. if (selector === '*') {
  97390. return elm.nodeType === 1;
  97391. }
  97392. if (simpleSelectorRe.test(selector)) {
  97393. var selectors = selector.toLowerCase().split(/,/);
  97394. var elmName = elm.nodeName.toLowerCase();
  97395. for (i = selectors.length - 1; i >= 0; i--) {
  97396. if (selectors[i] === elmName) {
  97397. return true;
  97398. }
  97399. }
  97400. return false;
  97401. }
  97402. if (elm.nodeType && elm.nodeType !== 1) {
  97403. return false;
  97404. }
  97405. }
  97406. var elms = !Array.isArray(elm) ? [elm] : elm;
  97407. return Sizzle(selector, elms[0].ownerDocument || elms[0], null, elms).length > 0;
  97408. };
  97409. var getParents = function (elm, selector, root, collect) {
  97410. var result = [];
  97411. var selectorVal;
  97412. var node = get(elm);
  97413. collect = collect === undefined;
  97414. root = root || (getRoot().nodeName !== 'BODY' ? getRoot().parentNode : null);
  97415. if (Tools.is(selector, 'string')) {
  97416. selectorVal = selector;
  97417. if (selector === '*') {
  97418. selector = function (node) {
  97419. return node.nodeType === 1;
  97420. };
  97421. } else {
  97422. selector = function (node) {
  97423. return is(node, selectorVal);
  97424. };
  97425. }
  97426. }
  97427. while (node) {
  97428. if (node === root || isNullable(node.nodeType) || isDocument$1(node) || isDocumentFragment(node)) {
  97429. break;
  97430. }
  97431. if (!selector || typeof selector === 'function' && selector(node)) {
  97432. if (collect) {
  97433. result.push(node);
  97434. } else {
  97435. return [node];
  97436. }
  97437. }
  97438. node = node.parentNode;
  97439. }
  97440. return collect ? result : null;
  97441. };
  97442. var getParent = function (node, selector, root) {
  97443. var parents = getParents(node, selector, root, false);
  97444. return parents && parents.length > 0 ? parents[0] : null;
  97445. };
  97446. var _findSib = function (node, selector, name) {
  97447. var func = selector;
  97448. if (node) {
  97449. if (typeof selector === 'string') {
  97450. func = function (node) {
  97451. return is(node, selector);
  97452. };
  97453. }
  97454. for (node = node[name]; node; node = node[name]) {
  97455. if (typeof func === 'function' && func(node)) {
  97456. return node;
  97457. }
  97458. }
  97459. }
  97460. return null;
  97461. };
  97462. var getNext = function (node, selector) {
  97463. return _findSib(node, selector, 'nextSibling');
  97464. };
  97465. var getPrev = function (node, selector) {
  97466. return _findSib(node, selector, 'previousSibling');
  97467. };
  97468. var select = function (selector, scope) {
  97469. return Sizzle(selector, get(scope) || settings.root_element || doc, []);
  97470. };
  97471. var run = function (elm, func, scope) {
  97472. var result;
  97473. var node = typeof elm === 'string' ? get(elm) : elm;
  97474. if (!node) {
  97475. return false;
  97476. }
  97477. if (Tools.isArray(node) && (node.length || node.length === 0)) {
  97478. result = [];
  97479. each$f(node, function (elm, i) {
  97480. if (elm) {
  97481. result.push(func.call(scope, typeof elm === 'string' ? get(elm) : elm, i));
  97482. }
  97483. });
  97484. return result;
  97485. }
  97486. var context = scope ? scope : this;
  97487. return func.call(context, node);
  97488. };
  97489. var setAttribs = function (elm, attrs) {
  97490. $$(elm).each(function (i, node) {
  97491. each$f(attrs, function (value, name) {
  97492. setAttrib(node, name, value);
  97493. });
  97494. });
  97495. };
  97496. var setHTML = function (elm, html) {
  97497. var $elm = $$(elm);
  97498. if (isIE) {
  97499. $elm.each(function (i, target) {
  97500. if (target.canHaveHTML === false) {
  97501. return;
  97502. }
  97503. while (target.firstChild) {
  97504. target.removeChild(target.firstChild);
  97505. }
  97506. try {
  97507. target.innerHTML = '<br>' + html;
  97508. target.removeChild(target.firstChild);
  97509. } catch (ex) {
  97510. DomQuery('<div></div>').html('<br>' + html).contents().slice(1).appendTo(target);
  97511. }
  97512. return html;
  97513. });
  97514. } else {
  97515. $elm.html(html);
  97516. }
  97517. };
  97518. var add = function (parentElm, name, attrs, html, create) {
  97519. return run(parentElm, function (parentElm) {
  97520. var newElm = typeof name === 'string' ? doc.createElement(name) : name;
  97521. setAttribs(newElm, attrs);
  97522. if (html) {
  97523. if (typeof html !== 'string' && html.nodeType) {
  97524. newElm.appendChild(html);
  97525. } else if (typeof html === 'string') {
  97526. setHTML(newElm, html);
  97527. }
  97528. }
  97529. return !create ? parentElm.appendChild(newElm) : newElm;
  97530. });
  97531. };
  97532. var create = function (name, attrs, html) {
  97533. return add(doc.createElement(name), name, attrs, html, true);
  97534. };
  97535. var decode = Entities.decode;
  97536. var encode = Entities.encodeAllRaw;
  97537. var createHTML = function (name, attrs, html) {
  97538. var outHtml = '', key;
  97539. outHtml += '<' + name;
  97540. for (key in attrs) {
  97541. if (hasNonNullableKey(attrs, key)) {
  97542. outHtml += ' ' + key + '="' + encode(attrs[key]) + '"';
  97543. }
  97544. }
  97545. if (typeof html !== 'undefined') {
  97546. return outHtml + '>' + html + '</' + name + '>';
  97547. }
  97548. return outHtml + ' />';
  97549. };
  97550. var createFragment = function (html) {
  97551. var node;
  97552. var container = doc.createElement('div');
  97553. var frag = doc.createDocumentFragment();
  97554. frag.appendChild(container);
  97555. if (html) {
  97556. container.innerHTML = html;
  97557. }
  97558. while (node = container.firstChild) {
  97559. frag.appendChild(node);
  97560. }
  97561. frag.removeChild(container);
  97562. return frag;
  97563. };
  97564. var remove = function (node, keepChildren) {
  97565. var $node = $$(node);
  97566. if (keepChildren) {
  97567. $node.each(function () {
  97568. var child;
  97569. while (child = this.firstChild) {
  97570. if (child.nodeType === 3 && child.data.length === 0) {
  97571. this.removeChild(child);
  97572. } else {
  97573. this.parentNode.insertBefore(child, this);
  97574. }
  97575. }
  97576. }).remove();
  97577. } else {
  97578. $node.remove();
  97579. }
  97580. return $node.length > 1 ? $node.toArray() : $node[0];
  97581. };
  97582. var removeAllAttribs = function (e) {
  97583. return run(e, function (e) {
  97584. var i;
  97585. var attrs = e.attributes;
  97586. for (i = attrs.length - 1; i >= 0; i--) {
  97587. e.removeAttributeNode(attrs.item(i));
  97588. }
  97589. });
  97590. };
  97591. var parseStyle = function (cssText) {
  97592. return styles.parse(cssText);
  97593. };
  97594. var serializeStyle = function (stylesArg, name) {
  97595. return styles.serialize(stylesArg, name);
  97596. };
  97597. var addStyle = function (cssText) {
  97598. var head, styleElm;
  97599. if (self !== DOMUtils.DOM && doc === document) {
  97600. if (addedStyles[cssText]) {
  97601. return;
  97602. }
  97603. addedStyles[cssText] = true;
  97604. }
  97605. styleElm = doc.getElementById('mceDefaultStyles');
  97606. if (!styleElm) {
  97607. styleElm = doc.createElement('style');
  97608. styleElm.id = 'mceDefaultStyles';
  97609. styleElm.type = 'text/css';
  97610. head = doc.getElementsByTagName('head')[0];
  97611. if (head.firstChild) {
  97612. head.insertBefore(styleElm, head.firstChild);
  97613. } else {
  97614. head.appendChild(styleElm);
  97615. }
  97616. }
  97617. if (styleElm.styleSheet) {
  97618. styleElm.styleSheet.cssText += cssText;
  97619. } else {
  97620. styleElm.appendChild(doc.createTextNode(cssText));
  97621. }
  97622. };
  97623. var loadCSS = function (urls) {
  97624. if (!urls) {
  97625. urls = '';
  97626. }
  97627. each$k(urls.split(','), function (url) {
  97628. files[url] = true;
  97629. styleSheetLoader.load(url, noop);
  97630. });
  97631. };
  97632. var toggleClass = function (elm, cls, state) {
  97633. $$(elm).toggleClass(cls, state).each(function () {
  97634. if (this.className === '') {
  97635. DomQuery(this).attr('class', null);
  97636. }
  97637. });
  97638. };
  97639. var addClass = function (elm, cls) {
  97640. $$(elm).addClass(cls);
  97641. };
  97642. var removeClass = function (elm, cls) {
  97643. toggleClass(elm, cls, false);
  97644. };
  97645. var hasClass = function (elm, cls) {
  97646. return $$(elm).hasClass(cls);
  97647. };
  97648. var show = function (elm) {
  97649. $$(elm).show();
  97650. };
  97651. var hide = function (elm) {
  97652. $$(elm).hide();
  97653. };
  97654. var isHidden = function (elm) {
  97655. return $$(elm).css('display') === 'none';
  97656. };
  97657. var uniqueId = function (prefix) {
  97658. return (!prefix ? 'mce_' : prefix) + counter++;
  97659. };
  97660. var getOuterHTML = function (elm) {
  97661. var node = typeof elm === 'string' ? get(elm) : elm;
  97662. return isElement$5(node) ? node.outerHTML : DomQuery('<div></div>').append(DomQuery(node).clone()).html();
  97663. };
  97664. var setOuterHTML = function (elm, html) {
  97665. $$(elm).each(function () {
  97666. try {
  97667. if ('outerHTML' in this) {
  97668. this.outerHTML = html;
  97669. return;
  97670. }
  97671. } catch (ex) {
  97672. }
  97673. remove(DomQuery(this).html(html), true);
  97674. });
  97675. };
  97676. var insertAfter = function (node, reference) {
  97677. var referenceNode = get(reference);
  97678. return run(node, function (node) {
  97679. var parent = referenceNode.parentNode;
  97680. var nextSibling = referenceNode.nextSibling;
  97681. if (nextSibling) {
  97682. parent.insertBefore(node, nextSibling);
  97683. } else {
  97684. parent.appendChild(node);
  97685. }
  97686. return node;
  97687. });
  97688. };
  97689. var replace = function (newElm, oldElm, keepChildren) {
  97690. return run(oldElm, function (oldElm) {
  97691. if (Tools.is(oldElm, 'array')) {
  97692. newElm = newElm.cloneNode(true);
  97693. }
  97694. if (keepChildren) {
  97695. each$f(grep$1(oldElm.childNodes), function (node) {
  97696. newElm.appendChild(node);
  97697. });
  97698. }
  97699. return oldElm.parentNode.replaceChild(newElm, oldElm);
  97700. });
  97701. };
  97702. var rename = function (elm, name) {
  97703. var newElm;
  97704. if (elm.nodeName !== name.toUpperCase()) {
  97705. newElm = create(name);
  97706. each$f(getAttribs(elm), function (attrNode) {
  97707. setAttrib(newElm, attrNode.nodeName, getAttrib(elm, attrNode.nodeName));
  97708. });
  97709. replace(newElm, elm, true);
  97710. }
  97711. return newElm || elm;
  97712. };
  97713. var findCommonAncestor = function (a, b) {
  97714. var ps = a, pe;
  97715. while (ps) {
  97716. pe = b;
  97717. while (pe && ps !== pe) {
  97718. pe = pe.parentNode;
  97719. }
  97720. if (ps === pe) {
  97721. break;
  97722. }
  97723. ps = ps.parentNode;
  97724. }
  97725. if (!ps && a.ownerDocument) {
  97726. return a.ownerDocument.documentElement;
  97727. }
  97728. return ps;
  97729. };
  97730. var toHex = function (rgbVal) {
  97731. return styles.toHex(Tools.trim(rgbVal));
  97732. };
  97733. var isNonEmptyElement = function (node) {
  97734. if (isElement$5(node)) {
  97735. var isNamedAnchor = node.nodeName.toLowerCase() === 'a' && !getAttrib(node, 'href') && getAttrib(node, 'id');
  97736. if (getAttrib(node, 'name') || getAttrib(node, 'data-mce-bookmark') || isNamedAnchor) {
  97737. return true;
  97738. }
  97739. }
  97740. return false;
  97741. };
  97742. var isEmpty = function (node, elements) {
  97743. var type, name, brCount = 0;
  97744. if (isNonEmptyElement(node)) {
  97745. return false;
  97746. }
  97747. node = node.firstChild;
  97748. if (node) {
  97749. var walker = new DomTreeWalker(node, node.parentNode);
  97750. var whitespace = schema ? schema.getWhiteSpaceElements() : {};
  97751. elements = elements || (schema ? schema.getNonEmptyElements() : null);
  97752. do {
  97753. type = node.nodeType;
  97754. if (isElement$5(node)) {
  97755. var bogusVal = node.getAttribute('data-mce-bogus');
  97756. if (bogusVal) {
  97757. node = walker.next(bogusVal === 'all');
  97758. continue;
  97759. }
  97760. name = node.nodeName.toLowerCase();
  97761. if (elements && elements[name]) {
  97762. if (name === 'br') {
  97763. brCount++;
  97764. node = walker.next();
  97765. continue;
  97766. }
  97767. return false;
  97768. }
  97769. if (isNonEmptyElement(node)) {
  97770. return false;
  97771. }
  97772. }
  97773. if (type === 8) {
  97774. return false;
  97775. }
  97776. if (type === 3 && !isWhitespaceText(node.nodeValue)) {
  97777. return false;
  97778. }
  97779. if (type === 3 && node.parentNode && whitespace[node.parentNode.nodeName] && isWhitespaceText(node.nodeValue)) {
  97780. return false;
  97781. }
  97782. node = walker.next();
  97783. } while (node);
  97784. }
  97785. return brCount <= 1;
  97786. };
  97787. var createRng = function () {
  97788. return doc.createRange();
  97789. };
  97790. var split = function (parentElm, splitElm, replacementElm) {
  97791. var range = createRng();
  97792. var beforeFragment;
  97793. var afterFragment;
  97794. var parentNode;
  97795. if (parentElm && splitElm) {
  97796. range.setStart(parentElm.parentNode, findNodeIndex(parentElm));
  97797. range.setEnd(splitElm.parentNode, findNodeIndex(splitElm));
  97798. beforeFragment = range.extractContents();
  97799. range = createRng();
  97800. range.setStart(splitElm.parentNode, findNodeIndex(splitElm) + 1);
  97801. range.setEnd(parentElm.parentNode, findNodeIndex(parentElm) + 1);
  97802. afterFragment = range.extractContents();
  97803. parentNode = parentElm.parentNode;
  97804. parentNode.insertBefore(trimNode(self, beforeFragment), parentElm);
  97805. if (replacementElm) {
  97806. parentNode.insertBefore(replacementElm, parentElm);
  97807. } else {
  97808. parentNode.insertBefore(splitElm, parentElm);
  97809. }
  97810. parentNode.insertBefore(trimNode(self, afterFragment), parentElm);
  97811. remove(parentElm);
  97812. return replacementElm || splitElm;
  97813. }
  97814. };
  97815. var bind = function (target, name, func, scope) {
  97816. if (Tools.isArray(target)) {
  97817. var i = target.length;
  97818. var rv = [];
  97819. while (i--) {
  97820. rv[i] = bind(target[i], name, func, scope);
  97821. }
  97822. return rv;
  97823. }
  97824. if (settings.collect && (target === doc || target === win)) {
  97825. boundEvents.push([
  97826. target,
  97827. name,
  97828. func,
  97829. scope
  97830. ]);
  97831. }
  97832. var output = events.bind(target, name, func, scope || self);
  97833. return output;
  97834. };
  97835. var unbind = function (target, name, func) {
  97836. if (Tools.isArray(target)) {
  97837. var i = target.length;
  97838. var rv = [];
  97839. while (i--) {
  97840. rv[i] = unbind(target[i], name, func);
  97841. }
  97842. return rv;
  97843. } else {
  97844. if (boundEvents.length > 0 && (target === doc || target === win)) {
  97845. var i = boundEvents.length;
  97846. while (i--) {
  97847. var item = boundEvents[i];
  97848. if (target === item[0] && (!name || name === item[1]) && (!func || func === item[2])) {
  97849. events.unbind(item[0], item[1], item[2]);
  97850. }
  97851. }
  97852. }
  97853. return events.unbind(target, name, func);
  97854. }
  97855. };
  97856. var fire = function (target, name, evt) {
  97857. return events.fire(target, name, evt);
  97858. };
  97859. var getContentEditable = function (node) {
  97860. if (node && isElement$5(node)) {
  97861. var contentEditable = node.getAttribute('data-mce-contenteditable');
  97862. if (contentEditable && contentEditable !== 'inherit') {
  97863. return contentEditable;
  97864. }
  97865. return node.contentEditable !== 'inherit' ? node.contentEditable : null;
  97866. } else {
  97867. return null;
  97868. }
  97869. };
  97870. var getContentEditableParent = function (node) {
  97871. var root = getRoot();
  97872. var state = null;
  97873. for (; node && node !== root; node = node.parentNode) {
  97874. state = getContentEditable(node);
  97875. if (state !== null) {
  97876. break;
  97877. }
  97878. }
  97879. return state;
  97880. };
  97881. var destroy = function () {
  97882. if (boundEvents.length > 0) {
  97883. var i = boundEvents.length;
  97884. while (i--) {
  97885. var item = boundEvents[i];
  97886. events.unbind(item[0], item[1], item[2]);
  97887. }
  97888. }
  97889. each$j(files, function (_, url) {
  97890. styleSheetLoader.unload(url);
  97891. delete files[url];
  97892. });
  97893. if (Sizzle.setDocument) {
  97894. Sizzle.setDocument();
  97895. }
  97896. };
  97897. var isChildOf = function (node, parent) {
  97898. if (!isIE) {
  97899. return node === parent || parent.contains(node);
  97900. } else {
  97901. while (node) {
  97902. if (parent === node) {
  97903. return true;
  97904. }
  97905. node = node.parentNode;
  97906. }
  97907. return false;
  97908. }
  97909. };
  97910. var dumpRng = function (r) {
  97911. return 'startContainer: ' + r.startContainer.nodeName + ', startOffset: ' + r.startOffset + ', endContainer: ' + r.endContainer.nodeName + ', endOffset: ' + r.endOffset;
  97912. };
  97913. var self = {
  97914. doc: doc,
  97915. settings: settings,
  97916. win: win,
  97917. files: files,
  97918. stdMode: stdMode,
  97919. boxModel: boxModel,
  97920. styleSheetLoader: styleSheetLoader,
  97921. boundEvents: boundEvents,
  97922. styles: styles,
  97923. schema: schema,
  97924. events: events,
  97925. isBlock: isBlock,
  97926. $: $,
  97927. $$: $$,
  97928. root: null,
  97929. clone: clone,
  97930. getRoot: getRoot,
  97931. getViewPort: getViewPort,
  97932. getRect: getRect,
  97933. getSize: getSize,
  97934. getParent: getParent,
  97935. getParents: getParents,
  97936. get: get,
  97937. getNext: getNext,
  97938. getPrev: getPrev,
  97939. select: select,
  97940. is: is,
  97941. add: add,
  97942. create: create,
  97943. createHTML: createHTML,
  97944. createFragment: createFragment,
  97945. remove: remove,
  97946. setStyle: setStyle,
  97947. getStyle: getStyle,
  97948. setStyles: setStyles,
  97949. removeAllAttribs: removeAllAttribs,
  97950. setAttrib: setAttrib,
  97951. setAttribs: setAttribs,
  97952. getAttrib: getAttrib,
  97953. getPos: getPos$1,
  97954. parseStyle: parseStyle,
  97955. serializeStyle: serializeStyle,
  97956. addStyle: addStyle,
  97957. loadCSS: loadCSS,
  97958. addClass: addClass,
  97959. removeClass: removeClass,
  97960. hasClass: hasClass,
  97961. toggleClass: toggleClass,
  97962. show: show,
  97963. hide: hide,
  97964. isHidden: isHidden,
  97965. uniqueId: uniqueId,
  97966. setHTML: setHTML,
  97967. getOuterHTML: getOuterHTML,
  97968. setOuterHTML: setOuterHTML,
  97969. decode: decode,
  97970. encode: encode,
  97971. insertAfter: insertAfter,
  97972. replace: replace,
  97973. rename: rename,
  97974. findCommonAncestor: findCommonAncestor,
  97975. toHex: toHex,
  97976. run: run,
  97977. getAttribs: getAttribs,
  97978. isEmpty: isEmpty,
  97979. createRng: createRng,
  97980. nodeIndex: findNodeIndex,
  97981. split: split,
  97982. bind: bind,
  97983. unbind: unbind,
  97984. fire: fire,
  97985. getContentEditable: getContentEditable,
  97986. getContentEditableParent: getContentEditableParent,
  97987. destroy: destroy,
  97988. isChildOf: isChildOf,
  97989. dumpRng: dumpRng
  97990. };
  97991. var attrHooks = setupAttrHooks(styles, settings, constant(self));
  97992. return self;
  97993. };
  97994. DOMUtils.DOM = DOMUtils(document);
  97995. DOMUtils.nodeIndex = findNodeIndex;
  97996. var DOM$a = DOMUtils.DOM;
  97997. var each$e = Tools.each, grep = Tools.grep;
  97998. var QUEUED = 0;
  97999. var LOADING = 1;
  98000. var LOADED = 2;
  98001. var FAILED = 3;
  98002. var ScriptLoader = function () {
  98003. function ScriptLoader(settings) {
  98004. if (settings === void 0) {
  98005. settings = {};
  98006. }
  98007. this.states = {};
  98008. this.queue = [];
  98009. this.scriptLoadedCallbacks = {};
  98010. this.queueLoadedCallbacks = [];
  98011. this.loading = 0;
  98012. this.settings = settings;
  98013. }
  98014. ScriptLoader.prototype._setReferrerPolicy = function (referrerPolicy) {
  98015. this.settings.referrerPolicy = referrerPolicy;
  98016. };
  98017. ScriptLoader.prototype.loadScript = function (url, success, failure) {
  98018. var dom = DOM$a;
  98019. var elm;
  98020. var cleanup = function () {
  98021. dom.remove(id);
  98022. if (elm) {
  98023. elm.onerror = elm.onload = elm = null;
  98024. }
  98025. };
  98026. var done = function () {
  98027. cleanup();
  98028. success();
  98029. };
  98030. var error = function () {
  98031. cleanup();
  98032. if (isFunction(failure)) {
  98033. failure();
  98034. } else {
  98035. if (typeof console !== 'undefined' && console.log) {
  98036. console.log('Failed to load script: ' + url);
  98037. }
  98038. }
  98039. };
  98040. var id = dom.uniqueId();
  98041. elm = document.createElement('script');
  98042. elm.id = id;
  98043. elm.type = 'text/javascript';
  98044. elm.src = Tools._addCacheSuffix(url);
  98045. if (this.settings.referrerPolicy) {
  98046. dom.setAttrib(elm, 'referrerpolicy', this.settings.referrerPolicy);
  98047. }
  98048. elm.onload = done;
  98049. elm.onerror = error;
  98050. (document.getElementsByTagName('head')[0] || document.body).appendChild(elm);
  98051. };
  98052. ScriptLoader.prototype.isDone = function (url) {
  98053. return this.states[url] === LOADED;
  98054. };
  98055. ScriptLoader.prototype.markDone = function (url) {
  98056. this.states[url] = LOADED;
  98057. };
  98058. ScriptLoader.prototype.add = function (url, success, scope, failure) {
  98059. var state = this.states[url];
  98060. this.queue.push(url);
  98061. if (state === undefined) {
  98062. this.states[url] = QUEUED;
  98063. }
  98064. if (success) {
  98065. if (!this.scriptLoadedCallbacks[url]) {
  98066. this.scriptLoadedCallbacks[url] = [];
  98067. }
  98068. this.scriptLoadedCallbacks[url].push({
  98069. success: success,
  98070. failure: failure,
  98071. scope: scope || this
  98072. });
  98073. }
  98074. };
  98075. ScriptLoader.prototype.load = function (url, success, scope, failure) {
  98076. return this.add(url, success, scope, failure);
  98077. };
  98078. ScriptLoader.prototype.remove = function (url) {
  98079. delete this.states[url];
  98080. delete this.scriptLoadedCallbacks[url];
  98081. };
  98082. ScriptLoader.prototype.loadQueue = function (success, scope, failure) {
  98083. this.loadScripts(this.queue, success, scope, failure);
  98084. };
  98085. ScriptLoader.prototype.loadScripts = function (scripts, success, scope, failure) {
  98086. var self = this;
  98087. var failures = [];
  98088. var execCallbacks = function (name, url) {
  98089. each$e(self.scriptLoadedCallbacks[url], function (callback) {
  98090. if (isFunction(callback[name])) {
  98091. callback[name].call(callback.scope);
  98092. }
  98093. });
  98094. self.scriptLoadedCallbacks[url] = undefined;
  98095. };
  98096. self.queueLoadedCallbacks.push({
  98097. success: success,
  98098. failure: failure,
  98099. scope: scope || this
  98100. });
  98101. var loadScripts = function () {
  98102. var loadingScripts = grep(scripts);
  98103. scripts.length = 0;
  98104. each$e(loadingScripts, function (url) {
  98105. if (self.states[url] === LOADED) {
  98106. execCallbacks('success', url);
  98107. return;
  98108. }
  98109. if (self.states[url] === FAILED) {
  98110. execCallbacks('failure', url);
  98111. return;
  98112. }
  98113. if (self.states[url] !== LOADING) {
  98114. self.states[url] = LOADING;
  98115. self.loading++;
  98116. self.loadScript(url, function () {
  98117. self.states[url] = LOADED;
  98118. self.loading--;
  98119. execCallbacks('success', url);
  98120. loadScripts();
  98121. }, function () {
  98122. self.states[url] = FAILED;
  98123. self.loading--;
  98124. failures.push(url);
  98125. execCallbacks('failure', url);
  98126. loadScripts();
  98127. });
  98128. }
  98129. });
  98130. if (!self.loading) {
  98131. var notifyCallbacks = self.queueLoadedCallbacks.slice(0);
  98132. self.queueLoadedCallbacks.length = 0;
  98133. each$e(notifyCallbacks, function (callback) {
  98134. if (failures.length === 0) {
  98135. if (isFunction(callback.success)) {
  98136. callback.success.call(callback.scope);
  98137. }
  98138. } else {
  98139. if (isFunction(callback.failure)) {
  98140. callback.failure.call(callback.scope, failures);
  98141. }
  98142. }
  98143. });
  98144. }
  98145. };
  98146. loadScripts();
  98147. };
  98148. ScriptLoader.ScriptLoader = new ScriptLoader();
  98149. return ScriptLoader;
  98150. }();
  98151. var Cell = function (initial) {
  98152. var value = initial;
  98153. var get = function () {
  98154. return value;
  98155. };
  98156. var set = function (v) {
  98157. value = v;
  98158. };
  98159. return {
  98160. get: get,
  98161. set: set
  98162. };
  98163. };
  98164. var isRaw = function (str) {
  98165. return isObject(str) && has$2(str, 'raw');
  98166. };
  98167. var isTokenised = function (str) {
  98168. return isArray$1(str) && str.length > 1;
  98169. };
  98170. var data = {};
  98171. var currentCode = Cell('en');
  98172. var getLanguageData = function () {
  98173. return get$9(data, currentCode.get());
  98174. };
  98175. var getData = function () {
  98176. return map$2(data, function (value) {
  98177. return __assign({}, value);
  98178. });
  98179. };
  98180. var setCode = function (newCode) {
  98181. if (newCode) {
  98182. currentCode.set(newCode);
  98183. }
  98184. };
  98185. var getCode = function () {
  98186. return currentCode.get();
  98187. };
  98188. var add$4 = function (code, items) {
  98189. var langData = data[code];
  98190. if (!langData) {
  98191. data[code] = langData = {};
  98192. }
  98193. each$j(items, function (translation, name) {
  98194. langData[name.toLowerCase()] = translation;
  98195. });
  98196. };
  98197. var translate = function (text) {
  98198. var langData = getLanguageData().getOr({});
  98199. var toString = function (obj) {
  98200. if (isFunction(obj)) {
  98201. return Object.prototype.toString.call(obj);
  98202. }
  98203. return !isEmpty(obj) ? '' + obj : '';
  98204. };
  98205. var isEmpty = function (text) {
  98206. return text === '' || text === null || text === undefined;
  98207. };
  98208. var getLangData = function (text) {
  98209. var textstr = toString(text);
  98210. return get$9(langData, textstr.toLowerCase()).map(toString).getOr(textstr);
  98211. };
  98212. var removeContext = function (str) {
  98213. return str.replace(/{context:\w+}$/, '');
  98214. };
  98215. if (isEmpty(text)) {
  98216. return '';
  98217. }
  98218. if (isRaw(text)) {
  98219. return toString(text.raw);
  98220. }
  98221. if (isTokenised(text)) {
  98222. var values_1 = text.slice(1);
  98223. var substitued = getLangData(text[0]).replace(/\{([0-9]+)\}/g, function ($1, $2) {
  98224. return has$2(values_1, $2) ? toString(values_1[$2]) : $1;
  98225. });
  98226. return removeContext(substitued);
  98227. }
  98228. return removeContext(getLangData(text));
  98229. };
  98230. var isRtl$1 = function () {
  98231. return getLanguageData().bind(function (items) {
  98232. return get$9(items, '_dir');
  98233. }).exists(function (dir) {
  98234. return dir === 'rtl';
  98235. });
  98236. };
  98237. var hasCode = function (code) {
  98238. return has$2(data, code);
  98239. };
  98240. var I18n = {
  98241. getData: getData,
  98242. setCode: setCode,
  98243. getCode: getCode,
  98244. add: add$4,
  98245. translate: translate,
  98246. isRtl: isRtl$1,
  98247. hasCode: hasCode
  98248. };
  98249. var AddOnManager = function () {
  98250. var items = [];
  98251. var urls = {};
  98252. var lookup = {};
  98253. var _listeners = [];
  98254. var runListeners = function (name, state) {
  98255. var matchedListeners = filter$4(_listeners, function (listener) {
  98256. return listener.name === name && listener.state === state;
  98257. });
  98258. each$k(matchedListeners, function (listener) {
  98259. return listener.callback();
  98260. });
  98261. };
  98262. var get = function (name) {
  98263. if (lookup[name]) {
  98264. return lookup[name].instance;
  98265. }
  98266. return undefined;
  98267. };
  98268. var dependencies = function (name) {
  98269. var result;
  98270. if (lookup[name]) {
  98271. result = lookup[name].dependencies;
  98272. }
  98273. return result || [];
  98274. };
  98275. var requireLangPack = function (name, languages) {
  98276. if (AddOnManager.languageLoad !== false) {
  98277. waitFor(name, function () {
  98278. var language = I18n.getCode();
  98279. var wrappedLanguages = ',' + (languages || '') + ',';
  98280. if (!language || languages && wrappedLanguages.indexOf(',' + language + ',') === -1) {
  98281. return;
  98282. }
  98283. ScriptLoader.ScriptLoader.add(urls[name] + '/langs/' + language + '.js');
  98284. }, 'loaded');
  98285. }
  98286. };
  98287. var add = function (id, addOn, dependencies) {
  98288. var addOnConstructor = addOn;
  98289. items.push(addOnConstructor);
  98290. lookup[id] = {
  98291. instance: addOnConstructor,
  98292. dependencies: dependencies
  98293. };
  98294. runListeners(id, 'added');
  98295. return addOnConstructor;
  98296. };
  98297. var remove = function (name) {
  98298. delete urls[name];
  98299. delete lookup[name];
  98300. };
  98301. var createUrl = function (baseUrl, dep) {
  98302. if (typeof dep === 'object') {
  98303. return dep;
  98304. }
  98305. return typeof baseUrl === 'string' ? {
  98306. prefix: '',
  98307. resource: dep,
  98308. suffix: ''
  98309. } : {
  98310. prefix: baseUrl.prefix,
  98311. resource: dep,
  98312. suffix: baseUrl.suffix
  98313. };
  98314. };
  98315. var addComponents = function (pluginName, scripts) {
  98316. var pluginUrl = urls[pluginName];
  98317. each$k(scripts, function (script) {
  98318. ScriptLoader.ScriptLoader.add(pluginUrl + '/' + script);
  98319. });
  98320. };
  98321. var loadDependencies = function (name, addOnUrl, success, scope) {
  98322. var deps = dependencies(name);
  98323. each$k(deps, function (dep) {
  98324. var newUrl = createUrl(addOnUrl, dep);
  98325. load(newUrl.resource, newUrl, undefined, undefined);
  98326. });
  98327. if (success) {
  98328. if (scope) {
  98329. success.call(scope);
  98330. } else {
  98331. success.call(ScriptLoader);
  98332. }
  98333. }
  98334. };
  98335. var load = function (name, addOnUrl, success, scope, failure) {
  98336. if (urls[name]) {
  98337. return;
  98338. }
  98339. var urlString = typeof addOnUrl === 'string' ? addOnUrl : addOnUrl.prefix + addOnUrl.resource + addOnUrl.suffix;
  98340. if (urlString.indexOf('/') !== 0 && urlString.indexOf('://') === -1) {
  98341. urlString = AddOnManager.baseURL + '/' + urlString;
  98342. }
  98343. urls[name] = urlString.substring(0, urlString.lastIndexOf('/'));
  98344. var done = function () {
  98345. runListeners(name, 'loaded');
  98346. loadDependencies(name, addOnUrl, success, scope);
  98347. };
  98348. if (lookup[name]) {
  98349. done();
  98350. } else {
  98351. ScriptLoader.ScriptLoader.add(urlString, done, scope, failure);
  98352. }
  98353. };
  98354. var waitFor = function (name, callback, state) {
  98355. if (state === void 0) {
  98356. state = 'added';
  98357. }
  98358. if (has$2(lookup, name) && state === 'added') {
  98359. callback();
  98360. } else if (has$2(urls, name) && state === 'loaded') {
  98361. callback();
  98362. } else {
  98363. _listeners.push({
  98364. name: name,
  98365. state: state,
  98366. callback: callback
  98367. });
  98368. }
  98369. };
  98370. return {
  98371. items: items,
  98372. urls: urls,
  98373. lookup: lookup,
  98374. _listeners: _listeners,
  98375. get: get,
  98376. dependencies: dependencies,
  98377. requireLangPack: requireLangPack,
  98378. add: add,
  98379. remove: remove,
  98380. createUrl: createUrl,
  98381. addComponents: addComponents,
  98382. load: load,
  98383. waitFor: waitFor
  98384. };
  98385. };
  98386. AddOnManager.languageLoad = true;
  98387. AddOnManager.baseURL = '';
  98388. AddOnManager.PluginManager = AddOnManager();
  98389. AddOnManager.ThemeManager = AddOnManager();
  98390. var singleton = function (doRevoke) {
  98391. var subject = Cell(Optional.none());
  98392. var revoke = function () {
  98393. return subject.get().each(doRevoke);
  98394. };
  98395. var clear = function () {
  98396. revoke();
  98397. subject.set(Optional.none());
  98398. };
  98399. var isSet = function () {
  98400. return subject.get().isSome();
  98401. };
  98402. var get = function () {
  98403. return subject.get();
  98404. };
  98405. var set = function (s) {
  98406. revoke();
  98407. subject.set(Optional.some(s));
  98408. };
  98409. return {
  98410. clear: clear,
  98411. isSet: isSet,
  98412. get: get,
  98413. set: set
  98414. };
  98415. };
  98416. var value = function () {
  98417. var subject = singleton(noop);
  98418. var on = function (f) {
  98419. return subject.get().each(f);
  98420. };
  98421. return __assign(__assign({}, subject), { on: on });
  98422. };
  98423. var first = function (fn, rate) {
  98424. var timer = null;
  98425. var cancel = function () {
  98426. if (!isNull(timer)) {
  98427. clearTimeout(timer);
  98428. timer = null;
  98429. }
  98430. };
  98431. var throttle = function () {
  98432. var args = [];
  98433. for (var _i = 0; _i < arguments.length; _i++) {
  98434. args[_i] = arguments[_i];
  98435. }
  98436. if (isNull(timer)) {
  98437. timer = setTimeout(function () {
  98438. timer = null;
  98439. fn.apply(null, args);
  98440. }, rate);
  98441. }
  98442. };
  98443. return {
  98444. cancel: cancel,
  98445. throttle: throttle
  98446. };
  98447. };
  98448. var last = function (fn, rate) {
  98449. var timer = null;
  98450. var cancel = function () {
  98451. if (!isNull(timer)) {
  98452. clearTimeout(timer);
  98453. timer = null;
  98454. }
  98455. };
  98456. var throttle = function () {
  98457. var args = [];
  98458. for (var _i = 0; _i < arguments.length; _i++) {
  98459. args[_i] = arguments[_i];
  98460. }
  98461. cancel();
  98462. timer = setTimeout(function () {
  98463. timer = null;
  98464. fn.apply(null, args);
  98465. }, rate);
  98466. };
  98467. return {
  98468. cancel: cancel,
  98469. throttle: throttle
  98470. };
  98471. };
  98472. var read$4 = function (element, attr) {
  98473. var value = get$6(element, attr);
  98474. return value === undefined || value === '' ? [] : value.split(' ');
  98475. };
  98476. var add$3 = function (element, attr, id) {
  98477. var old = read$4(element, attr);
  98478. var nu = old.concat([id]);
  98479. set$1(element, attr, nu.join(' '));
  98480. return true;
  98481. };
  98482. var remove$5 = function (element, attr, id) {
  98483. var nu = filter$4(read$4(element, attr), function (v) {
  98484. return v !== id;
  98485. });
  98486. if (nu.length > 0) {
  98487. set$1(element, attr, nu.join(' '));
  98488. } else {
  98489. remove$6(element, attr);
  98490. }
  98491. return false;
  98492. };
  98493. var supports = function (element) {
  98494. return element.dom.classList !== undefined;
  98495. };
  98496. var get$4 = function (element) {
  98497. return read$4(element, 'class');
  98498. };
  98499. var add$2 = function (element, clazz) {
  98500. return add$3(element, 'class', clazz);
  98501. };
  98502. var remove$4 = function (element, clazz) {
  98503. return remove$5(element, 'class', clazz);
  98504. };
  98505. var add$1 = function (element, clazz) {
  98506. if (supports(element)) {
  98507. element.dom.classList.add(clazz);
  98508. } else {
  98509. add$2(element, clazz);
  98510. }
  98511. };
  98512. var cleanClass = function (element) {
  98513. var classList = supports(element) ? element.dom.classList : get$4(element);
  98514. if (classList.length === 0) {
  98515. remove$6(element, 'class');
  98516. }
  98517. };
  98518. var remove$3 = function (element, clazz) {
  98519. if (supports(element)) {
  98520. var classList = element.dom.classList;
  98521. classList.remove(clazz);
  98522. } else {
  98523. remove$4(element, clazz);
  98524. }
  98525. cleanClass(element);
  98526. };
  98527. var has = function (element, clazz) {
  98528. return supports(element) && element.dom.classList.contains(clazz);
  98529. };
  98530. var descendants$1 = function (scope, predicate) {
  98531. var result = [];
  98532. each$k(children(scope), function (x) {
  98533. if (predicate(x)) {
  98534. result = result.concat([x]);
  98535. }
  98536. result = result.concat(descendants$1(x, predicate));
  98537. });
  98538. return result;
  98539. };
  98540. var descendants = function (scope, selector) {
  98541. return all(selector, scope);
  98542. };
  98543. var annotation = constant('mce-annotation');
  98544. var dataAnnotation = constant('data-mce-annotation');
  98545. var dataAnnotationId = constant('data-mce-annotation-uid');
  98546. var identify = function (editor, annotationName) {
  98547. var rng = editor.selection.getRng();
  98548. var start = SugarElement.fromDom(rng.startContainer);
  98549. var root = SugarElement.fromDom(editor.getBody());
  98550. var selector = annotationName.fold(function () {
  98551. return '.' + annotation();
  98552. }, function (an) {
  98553. return '[' + dataAnnotation() + '="' + an + '"]';
  98554. });
  98555. var newStart = child$1(start, rng.startOffset).getOr(start);
  98556. var closest = closest$2(newStart, selector, function (n) {
  98557. return eq(n, root);
  98558. });
  98559. var getAttr = function (c, property) {
  98560. if (has$1(c, property)) {
  98561. return Optional.some(get$6(c, property));
  98562. } else {
  98563. return Optional.none();
  98564. }
  98565. };
  98566. return closest.bind(function (c) {
  98567. return getAttr(c, '' + dataAnnotationId()).bind(function (uid) {
  98568. return getAttr(c, '' + dataAnnotation()).map(function (name) {
  98569. var elements = findMarkers(editor, uid);
  98570. return {
  98571. uid: uid,
  98572. name: name,
  98573. elements: elements
  98574. };
  98575. });
  98576. });
  98577. });
  98578. };
  98579. var isAnnotation = function (elem) {
  98580. return isElement$6(elem) && has(elem, annotation());
  98581. };
  98582. var findMarkers = function (editor, uid) {
  98583. var body = SugarElement.fromDom(editor.getBody());
  98584. return descendants(body, '[' + dataAnnotationId() + '="' + uid + '"]');
  98585. };
  98586. var findAll = function (editor, name) {
  98587. var body = SugarElement.fromDom(editor.getBody());
  98588. var markers = descendants(body, '[' + dataAnnotation() + '="' + name + '"]');
  98589. var directory = {};
  98590. each$k(markers, function (m) {
  98591. var uid = get$6(m, dataAnnotationId());
  98592. var nodesAlready = get$9(directory, uid).getOr([]);
  98593. directory[uid] = nodesAlready.concat([m]);
  98594. });
  98595. return directory;
  98596. };
  98597. var setup$n = function (editor, _registry) {
  98598. var changeCallbacks = Cell({});
  98599. var initData = function () {
  98600. return {
  98601. listeners: [],
  98602. previous: value()
  98603. };
  98604. };
  98605. var withCallbacks = function (name, f) {
  98606. updateCallbacks(name, function (data) {
  98607. f(data);
  98608. return data;
  98609. });
  98610. };
  98611. var updateCallbacks = function (name, f) {
  98612. var callbackMap = changeCallbacks.get();
  98613. var data = get$9(callbackMap, name).getOrThunk(initData);
  98614. var outputData = f(data);
  98615. callbackMap[name] = outputData;
  98616. changeCallbacks.set(callbackMap);
  98617. };
  98618. var fireCallbacks = function (name, uid, elements) {
  98619. withCallbacks(name, function (data) {
  98620. each$k(data.listeners, function (f) {
  98621. return f(true, name, {
  98622. uid: uid,
  98623. nodes: map$3(elements, function (elem) {
  98624. return elem.dom;
  98625. })
  98626. });
  98627. });
  98628. });
  98629. };
  98630. var fireNoAnnotation = function (name) {
  98631. withCallbacks(name, function (data) {
  98632. each$k(data.listeners, function (f) {
  98633. return f(false, name);
  98634. });
  98635. });
  98636. };
  98637. var onNodeChange = last(function () {
  98638. var callbackMap = changeCallbacks.get();
  98639. var annotations = sort(keys(callbackMap));
  98640. each$k(annotations, function (name) {
  98641. updateCallbacks(name, function (data) {
  98642. var prev = data.previous.get();
  98643. identify(editor, Optional.some(name)).fold(function () {
  98644. if (prev.isSome()) {
  98645. fireNoAnnotation(name);
  98646. data.previous.clear();
  98647. }
  98648. }, function (_a) {
  98649. var uid = _a.uid, name = _a.name, elements = _a.elements;
  98650. if (!is$1(prev, uid)) {
  98651. fireCallbacks(name, uid, elements);
  98652. data.previous.set(uid);
  98653. }
  98654. });
  98655. return {
  98656. previous: data.previous,
  98657. listeners: data.listeners
  98658. };
  98659. });
  98660. });
  98661. }, 30);
  98662. editor.on('remove', function () {
  98663. onNodeChange.cancel();
  98664. });
  98665. editor.on('NodeChange', function () {
  98666. onNodeChange.throttle();
  98667. });
  98668. var addListener = function (name, f) {
  98669. updateCallbacks(name, function (data) {
  98670. return {
  98671. previous: data.previous,
  98672. listeners: data.listeners.concat([f])
  98673. };
  98674. });
  98675. };
  98676. return { addListener: addListener };
  98677. };
  98678. var setup$m = function (editor, registry) {
  98679. var identifyParserNode = function (span) {
  98680. return Optional.from(span.attr(dataAnnotation())).bind(registry.lookup);
  98681. };
  98682. editor.on('init', function () {
  98683. editor.serializer.addNodeFilter('span', function (spans) {
  98684. each$k(spans, function (span) {
  98685. identifyParserNode(span).each(function (settings) {
  98686. if (settings.persistent === false) {
  98687. span.unwrap();
  98688. }
  98689. });
  98690. });
  98691. });
  98692. });
  98693. };
  98694. var create$7 = function () {
  98695. var annotations = {};
  98696. var register = function (name, settings) {
  98697. annotations[name] = {
  98698. name: name,
  98699. settings: settings
  98700. };
  98701. };
  98702. var lookup = function (name) {
  98703. return get$9(annotations, name).map(function (a) {
  98704. return a.settings;
  98705. });
  98706. };
  98707. return {
  98708. register: register,
  98709. lookup: lookup
  98710. };
  98711. };
  98712. var unique = 0;
  98713. var generate = function (prefix) {
  98714. var date = new Date();
  98715. var time = date.getTime();
  98716. var random = Math.floor(Math.random() * 1000000000);
  98717. unique++;
  98718. return prefix + '_' + random + unique + String(time);
  98719. };
  98720. var add = function (element, classes) {
  98721. each$k(classes, function (x) {
  98722. add$1(element, x);
  98723. });
  98724. };
  98725. var fromHtml = function (html, scope) {
  98726. var doc = scope || document;
  98727. var div = doc.createElement('div');
  98728. div.innerHTML = html;
  98729. return children(SugarElement.fromDom(div));
  98730. };
  98731. var fromDom$1 = function (nodes) {
  98732. return map$3(nodes, SugarElement.fromDom);
  98733. };
  98734. var get$3 = function (element) {
  98735. return element.dom.innerHTML;
  98736. };
  98737. var set = function (element, content) {
  98738. var owner = owner$1(element);
  98739. var docDom = owner.dom;
  98740. var fragment = SugarElement.fromDom(docDom.createDocumentFragment());
  98741. var contentElements = fromHtml(content, docDom);
  98742. append(fragment, contentElements);
  98743. empty(element);
  98744. append$1(element, fragment);
  98745. };
  98746. var clone$1 = function (original, isDeep) {
  98747. return SugarElement.fromDom(original.dom.cloneNode(isDeep));
  98748. };
  98749. var shallow = function (original) {
  98750. return clone$1(original, false);
  98751. };
  98752. var deep$1 = function (original) {
  98753. return clone$1(original, true);
  98754. };
  98755. var TextWalker = function (startNode, rootNode, isBoundary) {
  98756. if (isBoundary === void 0) {
  98757. isBoundary = never;
  98758. }
  98759. var walker = new DomTreeWalker(startNode, rootNode);
  98760. var walk = function (direction) {
  98761. var next;
  98762. do {
  98763. next = walker[direction]();
  98764. } while (next && !isText$7(next) && !isBoundary(next));
  98765. return Optional.from(next).filter(isText$7);
  98766. };
  98767. return {
  98768. current: function () {
  98769. return Optional.from(walker.current()).filter(isText$7);
  98770. },
  98771. next: function () {
  98772. return walk('next');
  98773. },
  98774. prev: function () {
  98775. return walk('prev');
  98776. },
  98777. prev2: function () {
  98778. return walk('prev2');
  98779. }
  98780. };
  98781. };
  98782. var TextSeeker = function (dom, isBoundary) {
  98783. var isBlockBoundary = isBoundary ? isBoundary : function (node) {
  98784. return dom.isBlock(node) || isBr$5(node) || isContentEditableFalse$b(node);
  98785. };
  98786. var walk = function (node, offset, walker, process) {
  98787. if (isText$7(node)) {
  98788. var newOffset = process(node, offset, node.data);
  98789. if (newOffset !== -1) {
  98790. return Optional.some({
  98791. container: node,
  98792. offset: newOffset
  98793. });
  98794. }
  98795. }
  98796. return walker().bind(function (next) {
  98797. return walk(next.container, next.offset, walker, process);
  98798. });
  98799. };
  98800. var backwards = function (node, offset, process, root) {
  98801. var walker = TextWalker(node, root, isBlockBoundary);
  98802. return walk(node, offset, function () {
  98803. return walker.prev().map(function (prev) {
  98804. return {
  98805. container: prev,
  98806. offset: prev.length
  98807. };
  98808. });
  98809. }, process).getOrNull();
  98810. };
  98811. var forwards = function (node, offset, process, root) {
  98812. var walker = TextWalker(node, root, isBlockBoundary);
  98813. return walk(node, offset, function () {
  98814. return walker.next().map(function (next) {
  98815. return {
  98816. container: next,
  98817. offset: 0
  98818. };
  98819. });
  98820. }, process).getOrNull();
  98821. };
  98822. return {
  98823. backwards: backwards,
  98824. forwards: forwards
  98825. };
  98826. };
  98827. var round$2 = Math.round;
  98828. var clone = function (rect) {
  98829. if (!rect) {
  98830. return {
  98831. left: 0,
  98832. top: 0,
  98833. bottom: 0,
  98834. right: 0,
  98835. width: 0,
  98836. height: 0
  98837. };
  98838. }
  98839. return {
  98840. left: round$2(rect.left),
  98841. top: round$2(rect.top),
  98842. bottom: round$2(rect.bottom),
  98843. right: round$2(rect.right),
  98844. width: round$2(rect.width),
  98845. height: round$2(rect.height)
  98846. };
  98847. };
  98848. var collapse = function (rect, toStart) {
  98849. rect = clone(rect);
  98850. if (toStart) {
  98851. rect.right = rect.left;
  98852. } else {
  98853. rect.left = rect.left + rect.width;
  98854. rect.right = rect.left;
  98855. }
  98856. rect.width = 0;
  98857. return rect;
  98858. };
  98859. var isEqual = function (rect1, rect2) {
  98860. return rect1.left === rect2.left && rect1.top === rect2.top && rect1.bottom === rect2.bottom && rect1.right === rect2.right;
  98861. };
  98862. var isValidOverflow = function (overflowY, rect1, rect2) {
  98863. return overflowY >= 0 && overflowY <= Math.min(rect1.height, rect2.height) / 2;
  98864. };
  98865. var isAbove$1 = function (rect1, rect2) {
  98866. var halfHeight = Math.min(rect2.height / 2, rect1.height / 2);
  98867. if (rect1.bottom - halfHeight < rect2.top) {
  98868. return true;
  98869. }
  98870. if (rect1.top > rect2.bottom) {
  98871. return false;
  98872. }
  98873. return isValidOverflow(rect2.top - rect1.bottom, rect1, rect2);
  98874. };
  98875. var isBelow$1 = function (rect1, rect2) {
  98876. if (rect1.top > rect2.bottom) {
  98877. return true;
  98878. }
  98879. if (rect1.bottom < rect2.top) {
  98880. return false;
  98881. }
  98882. return isValidOverflow(rect2.bottom - rect1.top, rect1, rect2);
  98883. };
  98884. var containsXY = function (rect, clientX, clientY) {
  98885. return clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom;
  98886. };
  98887. var clamp$2 = function (value, min, max) {
  98888. return Math.min(Math.max(value, min), max);
  98889. };
  98890. var getSelectedNode = function (range) {
  98891. var startContainer = range.startContainer, startOffset = range.startOffset;
  98892. if (startContainer.hasChildNodes() && range.endOffset === startOffset + 1) {
  98893. return startContainer.childNodes[startOffset];
  98894. }
  98895. return null;
  98896. };
  98897. var getNode$1 = function (container, offset) {
  98898. if (isElement$5(container) && container.hasChildNodes()) {
  98899. var childNodes = container.childNodes;
  98900. var safeOffset = clamp$2(offset, 0, childNodes.length - 1);
  98901. return childNodes[safeOffset];
  98902. } else {
  98903. return container;
  98904. }
  98905. };
  98906. var getNodeUnsafe = function (container, offset) {
  98907. if (offset < 0 && isElement$5(container) && container.hasChildNodes()) {
  98908. return undefined;
  98909. } else {
  98910. return getNode$1(container, offset);
  98911. }
  98912. };
  98913. var extendingChars = new RegExp('[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a' + '\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0' + '\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c' + '\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3' + '\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc' + '\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57' + '\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56' + '\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44' + '\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9' + '\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97' + '\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074' + '\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5' + '\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18' + '\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1ABE\u1b00-\u1b03\u1b34' + '\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9' + '\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9' + '\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20DD-\u20E0\u20e1\u20E2-\u20E4\u20e5-\u20f0\u2cef-\u2cf1' + '\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\uA670-\uA672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1' + '\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc' + '\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1' + '\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]');
  98914. var isExtendingChar = function (ch) {
  98915. return typeof ch === 'string' && ch.charCodeAt(0) >= 768 && extendingChars.test(ch);
  98916. };
  98917. var or = function () {
  98918. var args = [];
  98919. for (var _i = 0; _i < arguments.length; _i++) {
  98920. args[_i] = arguments[_i];
  98921. }
  98922. return function (x) {
  98923. for (var i = 0; i < args.length; i++) {
  98924. if (args[i](x)) {
  98925. return true;
  98926. }
  98927. }
  98928. return false;
  98929. };
  98930. };
  98931. var and = function () {
  98932. var args = [];
  98933. for (var _i = 0; _i < arguments.length; _i++) {
  98934. args[_i] = arguments[_i];
  98935. }
  98936. return function (x) {
  98937. for (var i = 0; i < args.length; i++) {
  98938. if (!args[i](x)) {
  98939. return false;
  98940. }
  98941. }
  98942. return true;
  98943. };
  98944. };
  98945. var isElement$3 = isElement$5;
  98946. var isCaretCandidate$2 = isCaretCandidate$3;
  98947. var isBlock$1 = matchStyleValues('display', 'block table');
  98948. var isFloated = matchStyleValues('float', 'left right');
  98949. var isValidElementCaretCandidate = and(isElement$3, isCaretCandidate$2, not(isFloated));
  98950. var isNotPre = not(matchStyleValues('white-space', 'pre pre-line pre-wrap'));
  98951. var isText$4 = isText$7;
  98952. var isBr$2 = isBr$5;
  98953. var nodeIndex$1 = DOMUtils.nodeIndex;
  98954. var resolveIndex$1 = getNodeUnsafe;
  98955. var createRange$1 = function (doc) {
  98956. return 'createRange' in doc ? doc.createRange() : DOMUtils.DOM.createRng();
  98957. };
  98958. var isWhiteSpace$1 = function (chr) {
  98959. return chr && /[\r\n\t ]/.test(chr);
  98960. };
  98961. var isRange = function (rng) {
  98962. return !!rng.setStart && !!rng.setEnd;
  98963. };
  98964. var isHiddenWhiteSpaceRange = function (range) {
  98965. var container = range.startContainer;
  98966. var offset = range.startOffset;
  98967. if (isWhiteSpace$1(range.toString()) && isNotPre(container.parentNode) && isText$7(container)) {
  98968. var text = container.data;
  98969. if (isWhiteSpace$1(text[offset - 1]) || isWhiteSpace$1(text[offset + 1])) {
  98970. return true;
  98971. }
  98972. }
  98973. return false;
  98974. };
  98975. var getBrClientRect = function (brNode) {
  98976. var doc = brNode.ownerDocument;
  98977. var rng = createRange$1(doc);
  98978. var nbsp$1 = doc.createTextNode(nbsp);
  98979. var parentNode = brNode.parentNode;
  98980. parentNode.insertBefore(nbsp$1, brNode);
  98981. rng.setStart(nbsp$1, 0);
  98982. rng.setEnd(nbsp$1, 1);
  98983. var clientRect = clone(rng.getBoundingClientRect());
  98984. parentNode.removeChild(nbsp$1);
  98985. return clientRect;
  98986. };
  98987. var getBoundingClientRectWebKitText = function (rng) {
  98988. var sc = rng.startContainer;
  98989. var ec = rng.endContainer;
  98990. var so = rng.startOffset;
  98991. var eo = rng.endOffset;
  98992. if (sc === ec && isText$7(ec) && so === 0 && eo === 1) {
  98993. var newRng = rng.cloneRange();
  98994. newRng.setEndAfter(ec);
  98995. return getBoundingClientRect$1(newRng);
  98996. } else {
  98997. return null;
  98998. }
  98999. };
  99000. var isZeroRect = function (r) {
  99001. return r.left === 0 && r.right === 0 && r.top === 0 && r.bottom === 0;
  99002. };
  99003. var getBoundingClientRect$1 = function (item) {
  99004. var clientRect;
  99005. var clientRects = item.getClientRects();
  99006. if (clientRects.length > 0) {
  99007. clientRect = clone(clientRects[0]);
  99008. } else {
  99009. clientRect = clone(item.getBoundingClientRect());
  99010. }
  99011. if (!isRange(item) && isBr$2(item) && isZeroRect(clientRect)) {
  99012. return getBrClientRect(item);
  99013. }
  99014. if (isZeroRect(clientRect) && isRange(item)) {
  99015. return getBoundingClientRectWebKitText(item);
  99016. }
  99017. return clientRect;
  99018. };
  99019. var collapseAndInflateWidth = function (clientRect, toStart) {
  99020. var newClientRect = collapse(clientRect, toStart);
  99021. newClientRect.width = 1;
  99022. newClientRect.right = newClientRect.left + 1;
  99023. return newClientRect;
  99024. };
  99025. var getCaretPositionClientRects = function (caretPosition) {
  99026. var clientRects = [];
  99027. var addUniqueAndValidRect = function (clientRect) {
  99028. if (clientRect.height === 0) {
  99029. return;
  99030. }
  99031. if (clientRects.length > 0) {
  99032. if (isEqual(clientRect, clientRects[clientRects.length - 1])) {
  99033. return;
  99034. }
  99035. }
  99036. clientRects.push(clientRect);
  99037. };
  99038. var addCharacterOffset = function (container, offset) {
  99039. var range = createRange$1(container.ownerDocument);
  99040. if (offset < container.data.length) {
  99041. if (isExtendingChar(container.data[offset])) {
  99042. return clientRects;
  99043. }
  99044. if (isExtendingChar(container.data[offset - 1])) {
  99045. range.setStart(container, offset);
  99046. range.setEnd(container, offset + 1);
  99047. if (!isHiddenWhiteSpaceRange(range)) {
  99048. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), false));
  99049. return clientRects;
  99050. }
  99051. }
  99052. }
  99053. if (offset > 0) {
  99054. range.setStart(container, offset - 1);
  99055. range.setEnd(container, offset);
  99056. if (!isHiddenWhiteSpaceRange(range)) {
  99057. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), false));
  99058. }
  99059. }
  99060. if (offset < container.data.length) {
  99061. range.setStart(container, offset);
  99062. range.setEnd(container, offset + 1);
  99063. if (!isHiddenWhiteSpaceRange(range)) {
  99064. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), true));
  99065. }
  99066. }
  99067. };
  99068. var container = caretPosition.container();
  99069. var offset = caretPosition.offset();
  99070. if (isText$4(container)) {
  99071. addCharacterOffset(container, offset);
  99072. return clientRects;
  99073. }
  99074. if (isElement$3(container)) {
  99075. if (caretPosition.isAtEnd()) {
  99076. var node = resolveIndex$1(container, offset);
  99077. if (isText$4(node)) {
  99078. addCharacterOffset(node, node.data.length);
  99079. }
  99080. if (isValidElementCaretCandidate(node) && !isBr$2(node)) {
  99081. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), false));
  99082. }
  99083. } else {
  99084. var node = resolveIndex$1(container, offset);
  99085. if (isText$4(node)) {
  99086. addCharacterOffset(node, 0);
  99087. }
  99088. if (isValidElementCaretCandidate(node) && caretPosition.isAtEnd()) {
  99089. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), false));
  99090. return clientRects;
  99091. }
  99092. var beforeNode = resolveIndex$1(caretPosition.container(), caretPosition.offset() - 1);
  99093. if (isValidElementCaretCandidate(beforeNode) && !isBr$2(beforeNode)) {
  99094. if (isBlock$1(beforeNode) || isBlock$1(node) || !isValidElementCaretCandidate(node)) {
  99095. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(beforeNode), false));
  99096. }
  99097. }
  99098. if (isValidElementCaretCandidate(node)) {
  99099. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), true));
  99100. }
  99101. }
  99102. }
  99103. return clientRects;
  99104. };
  99105. var CaretPosition = function (container, offset, clientRects) {
  99106. var isAtStart = function () {
  99107. if (isText$4(container)) {
  99108. return offset === 0;
  99109. }
  99110. return offset === 0;
  99111. };
  99112. var isAtEnd = function () {
  99113. if (isText$4(container)) {
  99114. return offset >= container.data.length;
  99115. }
  99116. return offset >= container.childNodes.length;
  99117. };
  99118. var toRange = function () {
  99119. var range = createRange$1(container.ownerDocument);
  99120. range.setStart(container, offset);
  99121. range.setEnd(container, offset);
  99122. return range;
  99123. };
  99124. var getClientRects = function () {
  99125. if (!clientRects) {
  99126. clientRects = getCaretPositionClientRects(CaretPosition(container, offset));
  99127. }
  99128. return clientRects;
  99129. };
  99130. var isVisible = function () {
  99131. return getClientRects().length > 0;
  99132. };
  99133. var isEqual = function (caretPosition) {
  99134. return caretPosition && container === caretPosition.container() && offset === caretPosition.offset();
  99135. };
  99136. var getNode = function (before) {
  99137. return resolveIndex$1(container, before ? offset - 1 : offset);
  99138. };
  99139. return {
  99140. container: constant(container),
  99141. offset: constant(offset),
  99142. toRange: toRange,
  99143. getClientRects: getClientRects,
  99144. isVisible: isVisible,
  99145. isAtStart: isAtStart,
  99146. isAtEnd: isAtEnd,
  99147. isEqual: isEqual,
  99148. getNode: getNode
  99149. };
  99150. };
  99151. CaretPosition.fromRangeStart = function (range) {
  99152. return CaretPosition(range.startContainer, range.startOffset);
  99153. };
  99154. CaretPosition.fromRangeEnd = function (range) {
  99155. return CaretPosition(range.endContainer, range.endOffset);
  99156. };
  99157. CaretPosition.after = function (node) {
  99158. return CaretPosition(node.parentNode, nodeIndex$1(node) + 1);
  99159. };
  99160. CaretPosition.before = function (node) {
  99161. return CaretPosition(node.parentNode, nodeIndex$1(node));
  99162. };
  99163. CaretPosition.isAbove = function (pos1, pos2) {
  99164. return lift2(head(pos2.getClientRects()), last$2(pos1.getClientRects()), isAbove$1).getOr(false);
  99165. };
  99166. CaretPosition.isBelow = function (pos1, pos2) {
  99167. return lift2(last$2(pos2.getClientRects()), head(pos1.getClientRects()), isBelow$1).getOr(false);
  99168. };
  99169. CaretPosition.isAtStart = function (pos) {
  99170. return pos ? pos.isAtStart() : false;
  99171. };
  99172. CaretPosition.isAtEnd = function (pos) {
  99173. return pos ? pos.isAtEnd() : false;
  99174. };
  99175. CaretPosition.isTextPosition = function (pos) {
  99176. return pos ? isText$7(pos.container()) : false;
  99177. };
  99178. CaretPosition.isElementPosition = function (pos) {
  99179. return CaretPosition.isTextPosition(pos) === false;
  99180. };
  99181. var trimEmptyTextNode$1 = function (dom, node) {
  99182. if (isText$7(node) && node.data.length === 0) {
  99183. dom.remove(node);
  99184. }
  99185. };
  99186. var insertNode = function (dom, rng, node) {
  99187. rng.insertNode(node);
  99188. trimEmptyTextNode$1(dom, node.previousSibling);
  99189. trimEmptyTextNode$1(dom, node.nextSibling);
  99190. };
  99191. var insertFragment = function (dom, rng, frag) {
  99192. var firstChild = Optional.from(frag.firstChild);
  99193. var lastChild = Optional.from(frag.lastChild);
  99194. rng.insertNode(frag);
  99195. firstChild.each(function (child) {
  99196. return trimEmptyTextNode$1(dom, child.previousSibling);
  99197. });
  99198. lastChild.each(function (child) {
  99199. return trimEmptyTextNode$1(dom, child.nextSibling);
  99200. });
  99201. };
  99202. var rangeInsertNode = function (dom, rng, node) {
  99203. if (isDocumentFragment(node)) {
  99204. insertFragment(dom, rng, node);
  99205. } else {
  99206. insertNode(dom, rng, node);
  99207. }
  99208. };
  99209. var isText$3 = isText$7;
  99210. var isBogus = isBogus$2;
  99211. var nodeIndex = DOMUtils.nodeIndex;
  99212. var normalizedParent = function (node) {
  99213. var parentNode = node.parentNode;
  99214. if (isBogus(parentNode)) {
  99215. return normalizedParent(parentNode);
  99216. }
  99217. return parentNode;
  99218. };
  99219. var getChildNodes = function (node) {
  99220. if (!node) {
  99221. return [];
  99222. }
  99223. return reduce(node.childNodes, function (result, node) {
  99224. if (isBogus(node) && node.nodeName !== 'BR') {
  99225. result = result.concat(getChildNodes(node));
  99226. } else {
  99227. result.push(node);
  99228. }
  99229. return result;
  99230. }, []);
  99231. };
  99232. var normalizedTextOffset = function (node, offset) {
  99233. while (node = node.previousSibling) {
  99234. if (!isText$3(node)) {
  99235. break;
  99236. }
  99237. offset += node.data.length;
  99238. }
  99239. return offset;
  99240. };
  99241. var equal = function (a) {
  99242. return function (b) {
  99243. return a === b;
  99244. };
  99245. };
  99246. var normalizedNodeIndex = function (node) {
  99247. var nodes, index;
  99248. nodes = getChildNodes(normalizedParent(node));
  99249. index = findIndex$1(nodes, equal(node), node);
  99250. nodes = nodes.slice(0, index + 1);
  99251. var numTextFragments = reduce(nodes, function (result, node, i) {
  99252. if (isText$3(node) && isText$3(nodes[i - 1])) {
  99253. result++;
  99254. }
  99255. return result;
  99256. }, 0);
  99257. nodes = filter$2(nodes, matchNodeNames([node.nodeName]));
  99258. index = findIndex$1(nodes, equal(node), node);
  99259. return index - numTextFragments;
  99260. };
  99261. var createPathItem = function (node) {
  99262. var name;
  99263. if (isText$3(node)) {
  99264. name = 'text()';
  99265. } else {
  99266. name = node.nodeName.toLowerCase();
  99267. }
  99268. return name + '[' + normalizedNodeIndex(node) + ']';
  99269. };
  99270. var parentsUntil$1 = function (root, node, predicate) {
  99271. var parents = [];
  99272. for (node = node.parentNode; node !== root; node = node.parentNode) {
  99273. if (predicate && predicate(node)) {
  99274. break;
  99275. }
  99276. parents.push(node);
  99277. }
  99278. return parents;
  99279. };
  99280. var create$6 = function (root, caretPosition) {
  99281. var container, offset, path = [], outputOffset, childNodes, parents;
  99282. container = caretPosition.container();
  99283. offset = caretPosition.offset();
  99284. if (isText$3(container)) {
  99285. outputOffset = normalizedTextOffset(container, offset);
  99286. } else {
  99287. childNodes = container.childNodes;
  99288. if (offset >= childNodes.length) {
  99289. outputOffset = 'after';
  99290. offset = childNodes.length - 1;
  99291. } else {
  99292. outputOffset = 'before';
  99293. }
  99294. container = childNodes[offset];
  99295. }
  99296. path.push(createPathItem(container));
  99297. parents = parentsUntil$1(root, container);
  99298. parents = filter$2(parents, not(isBogus$2));
  99299. path = path.concat(map$1(parents, function (node) {
  99300. return createPathItem(node);
  99301. }));
  99302. return path.reverse().join('/') + ',' + outputOffset;
  99303. };
  99304. var resolvePathItem = function (node, name, index) {
  99305. var nodes = getChildNodes(node);
  99306. nodes = filter$2(nodes, function (node, index) {
  99307. return !isText$3(node) || !isText$3(nodes[index - 1]);
  99308. });
  99309. nodes = filter$2(nodes, matchNodeNames([name]));
  99310. return nodes[index];
  99311. };
  99312. var findTextPosition = function (container, offset) {
  99313. var node = container, targetOffset = 0, dataLen;
  99314. while (isText$3(node)) {
  99315. dataLen = node.data.length;
  99316. if (offset >= targetOffset && offset <= targetOffset + dataLen) {
  99317. container = node;
  99318. offset = offset - targetOffset;
  99319. break;
  99320. }
  99321. if (!isText$3(node.nextSibling)) {
  99322. container = node;
  99323. offset = dataLen;
  99324. break;
  99325. }
  99326. targetOffset += dataLen;
  99327. node = node.nextSibling;
  99328. }
  99329. if (isText$3(container) && offset > container.data.length) {
  99330. offset = container.data.length;
  99331. }
  99332. return CaretPosition(container, offset);
  99333. };
  99334. var resolve$2 = function (root, path) {
  99335. var offset;
  99336. if (!path) {
  99337. return null;
  99338. }
  99339. var parts = path.split(',');
  99340. var paths = parts[0].split('/');
  99341. offset = parts.length > 1 ? parts[1] : 'before';
  99342. var container = reduce(paths, function (result, value) {
  99343. var match = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(value);
  99344. if (!match) {
  99345. return null;
  99346. }
  99347. if (match[1] === 'text()') {
  99348. match[1] = '#text';
  99349. }
  99350. return resolvePathItem(result, match[1], parseInt(match[2], 10));
  99351. }, root);
  99352. if (!container) {
  99353. return null;
  99354. }
  99355. if (!isText$3(container)) {
  99356. if (offset === 'after') {
  99357. offset = nodeIndex(container) + 1;
  99358. } else {
  99359. offset = nodeIndex(container);
  99360. }
  99361. return CaretPosition(container.parentNode, offset);
  99362. }
  99363. return findTextPosition(container, parseInt(offset, 10));
  99364. };
  99365. var isContentEditableFalse$9 = isContentEditableFalse$b;
  99366. var getNormalizedTextOffset = function (trim, container, offset) {
  99367. var node, trimmedOffset;
  99368. trimmedOffset = trim(container.data.slice(0, offset)).length;
  99369. for (node = container.previousSibling; node && isText$7(node); node = node.previousSibling) {
  99370. trimmedOffset += trim(node.data).length;
  99371. }
  99372. return trimmedOffset;
  99373. };
  99374. var getPoint = function (dom, trim, normalized, rng, start) {
  99375. var container = rng[start ? 'startContainer' : 'endContainer'];
  99376. var offset = rng[start ? 'startOffset' : 'endOffset'];
  99377. var point = [];
  99378. var childNodes, after = 0;
  99379. var root = dom.getRoot();
  99380. if (isText$7(container)) {
  99381. point.push(normalized ? getNormalizedTextOffset(trim, container, offset) : offset);
  99382. } else {
  99383. childNodes = container.childNodes;
  99384. if (offset >= childNodes.length && childNodes.length) {
  99385. after = 1;
  99386. offset = Math.max(0, childNodes.length - 1);
  99387. }
  99388. point.push(dom.nodeIndex(childNodes[offset], normalized) + after);
  99389. }
  99390. for (; container && container !== root; container = container.parentNode) {
  99391. point.push(dom.nodeIndex(container, normalized));
  99392. }
  99393. return point;
  99394. };
  99395. var getLocation = function (trim, selection, normalized, rng) {
  99396. var dom = selection.dom, bookmark = {};
  99397. bookmark.start = getPoint(dom, trim, normalized, rng, true);
  99398. if (!selection.isCollapsed()) {
  99399. bookmark.end = getPoint(dom, trim, normalized, rng, false);
  99400. }
  99401. if (isRangeInCaretContainerBlock(rng)) {
  99402. bookmark.isFakeCaret = true;
  99403. }
  99404. return bookmark;
  99405. };
  99406. var findIndex = function (dom, name, element) {
  99407. var count = 0;
  99408. Tools.each(dom.select(name), function (node) {
  99409. if (node.getAttribute('data-mce-bogus') === 'all') {
  99410. return;
  99411. }
  99412. if (node === element) {
  99413. return false;
  99414. }
  99415. count++;
  99416. });
  99417. return count;
  99418. };
  99419. var moveEndPoint$1 = function (rng, start) {
  99420. var container, offset, childNodes;
  99421. var prefix = start ? 'start' : 'end';
  99422. container = rng[prefix + 'Container'];
  99423. offset = rng[prefix + 'Offset'];
  99424. if (isElement$5(container) && container.nodeName === 'TR') {
  99425. childNodes = container.childNodes;
  99426. container = childNodes[Math.min(start ? offset : offset - 1, childNodes.length - 1)];
  99427. if (container) {
  99428. offset = start ? 0 : container.childNodes.length;
  99429. rng['set' + (start ? 'Start' : 'End')](container, offset);
  99430. }
  99431. }
  99432. };
  99433. var normalizeTableCellSelection = function (rng) {
  99434. moveEndPoint$1(rng, true);
  99435. moveEndPoint$1(rng, false);
  99436. return rng;
  99437. };
  99438. var findSibling = function (node, offset) {
  99439. var sibling;
  99440. if (isElement$5(node)) {
  99441. node = getNode$1(node, offset);
  99442. if (isContentEditableFalse$9(node)) {
  99443. return node;
  99444. }
  99445. }
  99446. if (isCaretContainer$2(node)) {
  99447. if (isText$7(node) && isCaretContainerBlock$1(node)) {
  99448. node = node.parentNode;
  99449. }
  99450. sibling = node.previousSibling;
  99451. if (isContentEditableFalse$9(sibling)) {
  99452. return sibling;
  99453. }
  99454. sibling = node.nextSibling;
  99455. if (isContentEditableFalse$9(sibling)) {
  99456. return sibling;
  99457. }
  99458. }
  99459. };
  99460. var findAdjacentContentEditableFalseElm = function (rng) {
  99461. return findSibling(rng.startContainer, rng.startOffset) || findSibling(rng.endContainer, rng.endOffset);
  99462. };
  99463. var getOffsetBookmark = function (trim, normalized, selection) {
  99464. var element = selection.getNode();
  99465. var name = element ? element.nodeName : null;
  99466. var rng = selection.getRng();
  99467. if (isContentEditableFalse$9(element) || name === 'IMG') {
  99468. return {
  99469. name: name,
  99470. index: findIndex(selection.dom, name, element)
  99471. };
  99472. }
  99473. var sibling = findAdjacentContentEditableFalseElm(rng);
  99474. if (sibling) {
  99475. name = sibling.tagName;
  99476. return {
  99477. name: name,
  99478. index: findIndex(selection.dom, name, sibling)
  99479. };
  99480. }
  99481. return getLocation(trim, selection, normalized, rng);
  99482. };
  99483. var getCaretBookmark = function (selection) {
  99484. var rng = selection.getRng();
  99485. return {
  99486. start: create$6(selection.dom.getRoot(), CaretPosition.fromRangeStart(rng)),
  99487. end: create$6(selection.dom.getRoot(), CaretPosition.fromRangeEnd(rng))
  99488. };
  99489. };
  99490. var getRangeBookmark = function (selection) {
  99491. return { rng: selection.getRng() };
  99492. };
  99493. var createBookmarkSpan = function (dom, id, filled) {
  99494. var args = {
  99495. 'data-mce-type': 'bookmark',
  99496. id: id,
  99497. 'style': 'overflow:hidden;line-height:0px'
  99498. };
  99499. return filled ? dom.create('span', args, '&#xFEFF;') : dom.create('span', args);
  99500. };
  99501. var getPersistentBookmark = function (selection, filled) {
  99502. var dom = selection.dom;
  99503. var rng = selection.getRng();
  99504. var id = dom.uniqueId();
  99505. var collapsed = selection.isCollapsed();
  99506. var element = selection.getNode();
  99507. var name = element.nodeName;
  99508. if (name === 'IMG') {
  99509. return {
  99510. name: name,
  99511. index: findIndex(dom, name, element)
  99512. };
  99513. }
  99514. var rng2 = normalizeTableCellSelection(rng.cloneRange());
  99515. if (!collapsed) {
  99516. rng2.collapse(false);
  99517. var endBookmarkNode = createBookmarkSpan(dom, id + '_end', filled);
  99518. rangeInsertNode(dom, rng2, endBookmarkNode);
  99519. }
  99520. rng = normalizeTableCellSelection(rng);
  99521. rng.collapse(true);
  99522. var startBookmarkNode = createBookmarkSpan(dom, id + '_start', filled);
  99523. rangeInsertNode(dom, rng, startBookmarkNode);
  99524. selection.moveToBookmark({
  99525. id: id,
  99526. keep: true
  99527. });
  99528. return { id: id };
  99529. };
  99530. var getBookmark$2 = function (selection, type, normalized) {
  99531. if (type === 2) {
  99532. return getOffsetBookmark(trim$2, normalized, selection);
  99533. } else if (type === 3) {
  99534. return getCaretBookmark(selection);
  99535. } else if (type) {
  99536. return getRangeBookmark(selection);
  99537. } else {
  99538. return getPersistentBookmark(selection, false);
  99539. }
  99540. };
  99541. var getUndoBookmark = curry(getOffsetBookmark, identity, true);
  99542. var DOM$9 = DOMUtils.DOM;
  99543. var defaultPreviewStyles = 'font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow';
  99544. var getBodySetting = function (editor, name, defaultValue) {
  99545. var value = editor.getParam(name, defaultValue);
  99546. if (value.indexOf('=') !== -1) {
  99547. var bodyObj = editor.getParam(name, '', 'hash');
  99548. return get$9(bodyObj, editor.id).getOr(defaultValue);
  99549. } else {
  99550. return value;
  99551. }
  99552. };
  99553. var getIframeAttrs = function (editor) {
  99554. return editor.getParam('iframe_attrs', {});
  99555. };
  99556. var getDocType = function (editor) {
  99557. return editor.getParam('doctype', '<!DOCTYPE html>');
  99558. };
  99559. var getDocumentBaseUrl = function (editor) {
  99560. return editor.getParam('document_base_url', '');
  99561. };
  99562. var getBodyId = function (editor) {
  99563. return getBodySetting(editor, 'body_id', 'tinymce');
  99564. };
  99565. var getBodyClass = function (editor) {
  99566. return getBodySetting(editor, 'body_class', '');
  99567. };
  99568. var getContentSecurityPolicy = function (editor) {
  99569. return editor.getParam('content_security_policy', '');
  99570. };
  99571. var shouldPutBrInPre$1 = function (editor) {
  99572. return editor.getParam('br_in_pre', true);
  99573. };
  99574. var getForcedRootBlock = function (editor) {
  99575. if (editor.getParam('force_p_newlines', false)) {
  99576. return 'p';
  99577. }
  99578. var block = editor.getParam('forced_root_block', 'p');
  99579. if (block === false) {
  99580. return '';
  99581. } else if (block === true) {
  99582. return 'p';
  99583. } else {
  99584. return block;
  99585. }
  99586. };
  99587. var getForcedRootBlockAttrs = function (editor) {
  99588. return editor.getParam('forced_root_block_attrs', {});
  99589. };
  99590. var getBrNewLineSelector = function (editor) {
  99591. return editor.getParam('br_newline_selector', '.mce-toc h2,figcaption,caption');
  99592. };
  99593. var getNoNewLineSelector = function (editor) {
  99594. return editor.getParam('no_newline_selector', '');
  99595. };
  99596. var shouldKeepStyles = function (editor) {
  99597. return editor.getParam('keep_styles', true);
  99598. };
  99599. var shouldEndContainerOnEmptyBlock = function (editor) {
  99600. return editor.getParam('end_container_on_empty_block', false);
  99601. };
  99602. var getFontStyleValues = function (editor) {
  99603. return Tools.explode(editor.getParam('font_size_style_values', 'xx-small,x-small,small,medium,large,x-large,xx-large'));
  99604. };
  99605. var getFontSizeClasses = function (editor) {
  99606. return Tools.explode(editor.getParam('font_size_classes', ''));
  99607. };
  99608. var getImagesDataImgFilter = function (editor) {
  99609. return editor.getParam('images_dataimg_filter', always, 'function');
  99610. };
  99611. var isAutomaticUploadsEnabled = function (editor) {
  99612. return editor.getParam('automatic_uploads', true, 'boolean');
  99613. };
  99614. var shouldReuseFileName = function (editor) {
  99615. return editor.getParam('images_reuse_filename', false, 'boolean');
  99616. };
  99617. var shouldReplaceBlobUris = function (editor) {
  99618. return editor.getParam('images_replace_blob_uris', true, 'boolean');
  99619. };
  99620. var getIconPackName = function (editor) {
  99621. return editor.getParam('icons', '', 'string');
  99622. };
  99623. var getIconsUrl = function (editor) {
  99624. return editor.getParam('icons_url', '', 'string');
  99625. };
  99626. var getImageUploadUrl = function (editor) {
  99627. return editor.getParam('images_upload_url', '', 'string');
  99628. };
  99629. var getImageUploadBasePath = function (editor) {
  99630. return editor.getParam('images_upload_base_path', '', 'string');
  99631. };
  99632. var getImagesUploadCredentials = function (editor) {
  99633. return editor.getParam('images_upload_credentials', false, 'boolean');
  99634. };
  99635. var getImagesUploadHandler = function (editor) {
  99636. return editor.getParam('images_upload_handler', null, 'function');
  99637. };
  99638. var shouldUseContentCssCors = function (editor) {
  99639. return editor.getParam('content_css_cors', false, 'boolean');
  99640. };
  99641. var getReferrerPolicy = function (editor) {
  99642. return editor.getParam('referrer_policy', '', 'string');
  99643. };
  99644. var getLanguageCode = function (editor) {
  99645. return editor.getParam('language', 'en', 'string');
  99646. };
  99647. var getLanguageUrl = function (editor) {
  99648. return editor.getParam('language_url', '', 'string');
  99649. };
  99650. var shouldIndentUseMargin = function (editor) {
  99651. return editor.getParam('indent_use_margin', false);
  99652. };
  99653. var getIndentation = function (editor) {
  99654. return editor.getParam('indentation', '40px', 'string');
  99655. };
  99656. var getContentCss = function (editor) {
  99657. var contentCss = editor.getParam('content_css');
  99658. if (isString$1(contentCss)) {
  99659. return map$3(contentCss.split(','), trim$4);
  99660. } else if (isArray$1(contentCss)) {
  99661. return contentCss;
  99662. } else if (contentCss === false || editor.inline) {
  99663. return [];
  99664. } else {
  99665. return ['default'];
  99666. }
  99667. };
  99668. var getFontCss = function (editor) {
  99669. var fontCss = editor.getParam('font_css', []);
  99670. return isArray$1(fontCss) ? fontCss : map$3(fontCss.split(','), trim$4);
  99671. };
  99672. var getDirectionality = function (editor) {
  99673. return editor.getParam('directionality', I18n.isRtl() ? 'rtl' : undefined);
  99674. };
  99675. var getInlineBoundarySelector = function (editor) {
  99676. return editor.getParam('inline_boundaries_selector', 'a[href],code,.mce-annotation', 'string');
  99677. };
  99678. var getObjectResizing = function (editor) {
  99679. var selector = editor.getParam('object_resizing');
  99680. if (selector === false || Env.iOS) {
  99681. return false;
  99682. } else {
  99683. return isString$1(selector) ? selector : 'table,img,figure.image,div,video,iframe';
  99684. }
  99685. };
  99686. var getResizeImgProportional = function (editor) {
  99687. return editor.getParam('resize_img_proportional', true, 'boolean');
  99688. };
  99689. var getPlaceholder = function (editor) {
  99690. return editor.getParam('placeholder', DOM$9.getAttrib(editor.getElement(), 'placeholder'), 'string');
  99691. };
  99692. var getEventRoot = function (editor) {
  99693. return editor.getParam('event_root');
  99694. };
  99695. var getServiceMessage = function (editor) {
  99696. return editor.getParam('service_message');
  99697. };
  99698. var getTheme = function (editor) {
  99699. return editor.getParam('theme');
  99700. };
  99701. var shouldValidate = function (editor) {
  99702. return editor.getParam('validate');
  99703. };
  99704. var isInlineBoundariesEnabled = function (editor) {
  99705. return editor.getParam('inline_boundaries') !== false;
  99706. };
  99707. var getFormats = function (editor) {
  99708. return editor.getParam('formats');
  99709. };
  99710. var getPreviewStyles = function (editor) {
  99711. var style = editor.getParam('preview_styles', defaultPreviewStyles);
  99712. if (isString$1(style)) {
  99713. return style;
  99714. } else {
  99715. return '';
  99716. }
  99717. };
  99718. var canFormatEmptyLines = function (editor) {
  99719. return editor.getParam('format_empty_lines', false, 'boolean');
  99720. };
  99721. var getCustomUiSelector = function (editor) {
  99722. return editor.getParam('custom_ui_selector', '', 'string');
  99723. };
  99724. var getThemeUrl = function (editor) {
  99725. return editor.getParam('theme_url');
  99726. };
  99727. var isInline = function (editor) {
  99728. return editor.getParam('inline');
  99729. };
  99730. var hasHiddenInput = function (editor) {
  99731. return editor.getParam('hidden_input');
  99732. };
  99733. var shouldPatchSubmit = function (editor) {
  99734. return editor.getParam('submit_patch');
  99735. };
  99736. var isEncodingXml = function (editor) {
  99737. return editor.getParam('encoding') === 'xml';
  99738. };
  99739. var shouldAddFormSubmitTrigger = function (editor) {
  99740. return editor.getParam('add_form_submit_trigger');
  99741. };
  99742. var shouldAddUnloadTrigger = function (editor) {
  99743. return editor.getParam('add_unload_trigger');
  99744. };
  99745. var hasForcedRootBlock = function (editor) {
  99746. return getForcedRootBlock(editor) !== '';
  99747. };
  99748. var getCustomUndoRedoLevels = function (editor) {
  99749. return editor.getParam('custom_undo_redo_levels', 0, 'number');
  99750. };
  99751. var shouldDisableNodeChange = function (editor) {
  99752. return editor.getParam('disable_nodechange');
  99753. };
  99754. var isReadOnly$1 = function (editor) {
  99755. return editor.getParam('readonly');
  99756. };
  99757. var hasContentCssCors = function (editor) {
  99758. return editor.getParam('content_css_cors');
  99759. };
  99760. var getPlugins = function (editor) {
  99761. return editor.getParam('plugins', '', 'string');
  99762. };
  99763. var getExternalPlugins$1 = function (editor) {
  99764. return editor.getParam('external_plugins');
  99765. };
  99766. var shouldBlockUnsupportedDrop = function (editor) {
  99767. return editor.getParam('block_unsupported_drop', true, 'boolean');
  99768. };
  99769. var isVisualAidsEnabled = function (editor) {
  99770. return editor.getParam('visual', true, 'boolean');
  99771. };
  99772. var getVisualAidsTableClass = function (editor) {
  99773. return editor.getParam('visual_table_class', 'mce-item-table', 'string');
  99774. };
  99775. var getVisualAidsAnchorClass = function (editor) {
  99776. return editor.getParam('visual_anchor_class', 'mce-item-anchor', 'string');
  99777. };
  99778. var getIframeAriaText = function (editor) {
  99779. return editor.getParam('iframe_aria_text', 'Rich Text Area. Press ALT-0 for help.', 'string');
  99780. };
  99781. var isElement$2 = isElement$5;
  99782. var isText$2 = isText$7;
  99783. var removeNode$1 = function (node) {
  99784. var parentNode = node.parentNode;
  99785. if (parentNode) {
  99786. parentNode.removeChild(node);
  99787. }
  99788. };
  99789. var trimCount = function (text) {
  99790. var trimmedText = trim$2(text);
  99791. return {
  99792. count: text.length - trimmedText.length,
  99793. text: trimmedText
  99794. };
  99795. };
  99796. var deleteZwspChars = function (caretContainer) {
  99797. var idx;
  99798. while ((idx = caretContainer.data.lastIndexOf(ZWSP$1)) !== -1) {
  99799. caretContainer.deleteData(idx, 1);
  99800. }
  99801. };
  99802. var removeUnchanged = function (caretContainer, pos) {
  99803. remove$2(caretContainer);
  99804. return pos;
  99805. };
  99806. var removeTextAndReposition = function (caretContainer, pos) {
  99807. var before = trimCount(caretContainer.data.substr(0, pos.offset()));
  99808. var after = trimCount(caretContainer.data.substr(pos.offset()));
  99809. var text = before.text + after.text;
  99810. if (text.length > 0) {
  99811. deleteZwspChars(caretContainer);
  99812. return CaretPosition(caretContainer, pos.offset() - before.count);
  99813. } else {
  99814. return pos;
  99815. }
  99816. };
  99817. var removeElementAndReposition = function (caretContainer, pos) {
  99818. var parentNode = pos.container();
  99819. var newPosition = indexOf$2(from(parentNode.childNodes), caretContainer).map(function (index) {
  99820. return index < pos.offset() ? CaretPosition(parentNode, pos.offset() - 1) : pos;
  99821. }).getOr(pos);
  99822. remove$2(caretContainer);
  99823. return newPosition;
  99824. };
  99825. var removeTextCaretContainer = function (caretContainer, pos) {
  99826. return isText$2(caretContainer) && pos.container() === caretContainer ? removeTextAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);
  99827. };
  99828. var removeElementCaretContainer = function (caretContainer, pos) {
  99829. return pos.container() === caretContainer.parentNode ? removeElementAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);
  99830. };
  99831. var removeAndReposition = function (container, pos) {
  99832. return CaretPosition.isTextPosition(pos) ? removeTextCaretContainer(container, pos) : removeElementCaretContainer(container, pos);
  99833. };
  99834. var remove$2 = function (caretContainerNode) {
  99835. if (isElement$2(caretContainerNode) && isCaretContainer$2(caretContainerNode)) {
  99836. if (hasContent(caretContainerNode)) {
  99837. caretContainerNode.removeAttribute('data-mce-caret');
  99838. } else {
  99839. removeNode$1(caretContainerNode);
  99840. }
  99841. }
  99842. if (isText$2(caretContainerNode)) {
  99843. deleteZwspChars(caretContainerNode);
  99844. if (caretContainerNode.data.length === 0) {
  99845. removeNode$1(caretContainerNode);
  99846. }
  99847. }
  99848. };
  99849. var browser$2 = detect().browser;
  99850. var isContentEditableFalse$8 = isContentEditableFalse$b;
  99851. var isMedia$1 = isMedia$2;
  99852. var isTableCell$3 = isTableCell$5;
  99853. var inlineFakeCaretSelector = '*[contentEditable=false],video,audio,embed,object';
  99854. var getAbsoluteClientRect = function (root, element, before) {
  99855. var clientRect = collapse(element.getBoundingClientRect(), before);
  99856. var scrollX;
  99857. var scrollY;
  99858. if (root.tagName === 'BODY') {
  99859. var docElm = root.ownerDocument.documentElement;
  99860. scrollX = root.scrollLeft || docElm.scrollLeft;
  99861. scrollY = root.scrollTop || docElm.scrollTop;
  99862. } else {
  99863. var rootRect = root.getBoundingClientRect();
  99864. scrollX = root.scrollLeft - rootRect.left;
  99865. scrollY = root.scrollTop - rootRect.top;
  99866. }
  99867. clientRect.left += scrollX;
  99868. clientRect.right += scrollX;
  99869. clientRect.top += scrollY;
  99870. clientRect.bottom += scrollY;
  99871. clientRect.width = 1;
  99872. var margin = element.offsetWidth - element.clientWidth;
  99873. if (margin > 0) {
  99874. if (before) {
  99875. margin *= -1;
  99876. }
  99877. clientRect.left += margin;
  99878. clientRect.right += margin;
  99879. }
  99880. return clientRect;
  99881. };
  99882. var trimInlineCaretContainers = function (root) {
  99883. var fakeCaretTargetNodes = descendants(SugarElement.fromDom(root), inlineFakeCaretSelector);
  99884. for (var i = 0; i < fakeCaretTargetNodes.length; i++) {
  99885. var node = fakeCaretTargetNodes[i].dom;
  99886. var sibling = node.previousSibling;
  99887. if (endsWithCaretContainer$1(sibling)) {
  99888. var data = sibling.data;
  99889. if (data.length === 1) {
  99890. sibling.parentNode.removeChild(sibling);
  99891. } else {
  99892. sibling.deleteData(data.length - 1, 1);
  99893. }
  99894. }
  99895. sibling = node.nextSibling;
  99896. if (startsWithCaretContainer$1(sibling)) {
  99897. var data = sibling.data;
  99898. if (data.length === 1) {
  99899. sibling.parentNode.removeChild(sibling);
  99900. } else {
  99901. sibling.deleteData(0, 1);
  99902. }
  99903. }
  99904. }
  99905. };
  99906. var FakeCaret = function (editor, root, isBlock, hasFocus) {
  99907. var lastVisualCaret = value();
  99908. var cursorInterval;
  99909. var caretContainerNode;
  99910. var rootBlock = getForcedRootBlock(editor);
  99911. var caretBlock = rootBlock.length > 0 ? rootBlock : 'p';
  99912. var show = function (before, element) {
  99913. var rng;
  99914. hide();
  99915. if (isTableCell$3(element)) {
  99916. return null;
  99917. }
  99918. if (isBlock(element)) {
  99919. caretContainerNode = insertBlock$1(caretBlock, element, before);
  99920. var clientRect = getAbsoluteClientRect(root, element, before);
  99921. DomQuery(caretContainerNode).css('top', clientRect.top);
  99922. var caret = DomQuery('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(__assign({}, clientRect)).appendTo(root)[0];
  99923. lastVisualCaret.set({
  99924. caret: caret,
  99925. element: element,
  99926. before: before
  99927. });
  99928. if (before) {
  99929. DomQuery(caret).addClass('mce-visual-caret-before');
  99930. }
  99931. startBlink();
  99932. rng = element.ownerDocument.createRange();
  99933. rng.setStart(caretContainerNode, 0);
  99934. rng.setEnd(caretContainerNode, 0);
  99935. } else {
  99936. caretContainerNode = insertInline$1(element, before);
  99937. rng = element.ownerDocument.createRange();
  99938. if (isInlineFakeCaretTarget(caretContainerNode.nextSibling)) {
  99939. rng.setStart(caretContainerNode, 0);
  99940. rng.setEnd(caretContainerNode, 0);
  99941. } else {
  99942. rng.setStart(caretContainerNode, 1);
  99943. rng.setEnd(caretContainerNode, 1);
  99944. }
  99945. return rng;
  99946. }
  99947. return rng;
  99948. };
  99949. var hide = function () {
  99950. trimInlineCaretContainers(root);
  99951. if (caretContainerNode) {
  99952. remove$2(caretContainerNode);
  99953. caretContainerNode = null;
  99954. }
  99955. lastVisualCaret.on(function (caretState) {
  99956. DomQuery(caretState.caret).remove();
  99957. lastVisualCaret.clear();
  99958. });
  99959. if (cursorInterval) {
  99960. Delay.clearInterval(cursorInterval);
  99961. cursorInterval = undefined;
  99962. }
  99963. };
  99964. var startBlink = function () {
  99965. cursorInterval = Delay.setInterval(function () {
  99966. if (hasFocus()) {
  99967. DomQuery('div.mce-visual-caret', root).toggleClass('mce-visual-caret-hidden');
  99968. } else {
  99969. DomQuery('div.mce-visual-caret', root).addClass('mce-visual-caret-hidden');
  99970. }
  99971. }, 500);
  99972. };
  99973. var reposition = function () {
  99974. lastVisualCaret.on(function (caretState) {
  99975. var clientRect = getAbsoluteClientRect(root, caretState.element, caretState.before);
  99976. DomQuery(caretState.caret).css(__assign({}, clientRect));
  99977. });
  99978. };
  99979. var destroy = function () {
  99980. return Delay.clearInterval(cursorInterval);
  99981. };
  99982. var getCss = function () {
  99983. return '.mce-visual-caret {' + 'position: absolute;' + 'background-color: black;' + 'background-color: currentcolor;' + '}' + '.mce-visual-caret-hidden {' + 'display: none;' + '}' + '*[data-mce-caret] {' + 'position: absolute;' + 'left: -1000px;' + 'right: auto;' + 'top: 0;' + 'margin: 0;' + 'padding: 0;' + '}';
  99984. };
  99985. return {
  99986. show: show,
  99987. hide: hide,
  99988. getCss: getCss,
  99989. reposition: reposition,
  99990. destroy: destroy
  99991. };
  99992. };
  99993. var isFakeCaretTableBrowser = function () {
  99994. return browser$2.isIE() || browser$2.isEdge() || browser$2.isFirefox();
  99995. };
  99996. var isInlineFakeCaretTarget = function (node) {
  99997. return isContentEditableFalse$8(node) || isMedia$1(node);
  99998. };
  99999. var isFakeCaretTarget = function (node) {
  100000. return isInlineFakeCaretTarget(node) || isTable$3(node) && isFakeCaretTableBrowser();
  100001. };
  100002. var isContentEditableFalse$7 = isContentEditableFalse$b;
  100003. var isMedia = isMedia$2;
  100004. var isBlockLike = matchStyleValues('display', 'block table table-cell table-caption list-item');
  100005. var isCaretContainer = isCaretContainer$2;
  100006. var isCaretContainerBlock = isCaretContainerBlock$1;
  100007. var isElement$1 = isElement$5;
  100008. var isCaretCandidate$1 = isCaretCandidate$3;
  100009. var isForwards = function (direction) {
  100010. return direction > 0;
  100011. };
  100012. var isBackwards = function (direction) {
  100013. return direction < 0;
  100014. };
  100015. var skipCaretContainers = function (walk, shallow) {
  100016. var node;
  100017. while (node = walk(shallow)) {
  100018. if (!isCaretContainerBlock(node)) {
  100019. return node;
  100020. }
  100021. }
  100022. return null;
  100023. };
  100024. var findNode$1 = function (node, direction, predicateFn, rootNode, shallow) {
  100025. var walker = new DomTreeWalker(node, rootNode);
  100026. var isCefOrCaretContainer = isContentEditableFalse$7(node) || isCaretContainerBlock(node);
  100027. if (isBackwards(direction)) {
  100028. if (isCefOrCaretContainer) {
  100029. node = skipCaretContainers(walker.prev.bind(walker), true);
  100030. if (predicateFn(node)) {
  100031. return node;
  100032. }
  100033. }
  100034. while (node = skipCaretContainers(walker.prev.bind(walker), shallow)) {
  100035. if (predicateFn(node)) {
  100036. return node;
  100037. }
  100038. }
  100039. }
  100040. if (isForwards(direction)) {
  100041. if (isCefOrCaretContainer) {
  100042. node = skipCaretContainers(walker.next.bind(walker), true);
  100043. if (predicateFn(node)) {
  100044. return node;
  100045. }
  100046. }
  100047. while (node = skipCaretContainers(walker.next.bind(walker), shallow)) {
  100048. if (predicateFn(node)) {
  100049. return node;
  100050. }
  100051. }
  100052. }
  100053. return null;
  100054. };
  100055. var getParentBlock$2 = function (node, rootNode) {
  100056. while (node && node !== rootNode) {
  100057. if (isBlockLike(node)) {
  100058. return node;
  100059. }
  100060. node = node.parentNode;
  100061. }
  100062. return null;
  100063. };
  100064. var isInSameBlock = function (caretPosition1, caretPosition2, rootNode) {
  100065. return getParentBlock$2(caretPosition1.container(), rootNode) === getParentBlock$2(caretPosition2.container(), rootNode);
  100066. };
  100067. var getChildNodeAtRelativeOffset = function (relativeOffset, caretPosition) {
  100068. if (!caretPosition) {
  100069. return null;
  100070. }
  100071. var container = caretPosition.container();
  100072. var offset = caretPosition.offset();
  100073. if (!isElement$1(container)) {
  100074. return null;
  100075. }
  100076. return container.childNodes[offset + relativeOffset];
  100077. };
  100078. var beforeAfter = function (before, node) {
  100079. var range = node.ownerDocument.createRange();
  100080. if (before) {
  100081. range.setStartBefore(node);
  100082. range.setEndBefore(node);
  100083. } else {
  100084. range.setStartAfter(node);
  100085. range.setEndAfter(node);
  100086. }
  100087. return range;
  100088. };
  100089. var isNodesInSameBlock = function (root, node1, node2) {
  100090. return getParentBlock$2(node1, root) === getParentBlock$2(node2, root);
  100091. };
  100092. var lean = function (left, root, node) {
  100093. var siblingName = left ? 'previousSibling' : 'nextSibling';
  100094. while (node && node !== root) {
  100095. var sibling = node[siblingName];
  100096. if (isCaretContainer(sibling)) {
  100097. sibling = sibling[siblingName];
  100098. }
  100099. if (isContentEditableFalse$7(sibling) || isMedia(sibling)) {
  100100. if (isNodesInSameBlock(root, sibling, node)) {
  100101. return sibling;
  100102. }
  100103. break;
  100104. }
  100105. if (isCaretCandidate$1(sibling)) {
  100106. break;
  100107. }
  100108. node = node.parentNode;
  100109. }
  100110. return null;
  100111. };
  100112. var before$2 = curry(beforeAfter, true);
  100113. var after$2 = curry(beforeAfter, false);
  100114. var normalizeRange = function (direction, root, range) {
  100115. var node;
  100116. var leanLeft = curry(lean, true, root);
  100117. var leanRight = curry(lean, false, root);
  100118. var container = range.startContainer;
  100119. var offset = range.startOffset;
  100120. if (isCaretContainerBlock$1(container)) {
  100121. if (!isElement$1(container)) {
  100122. container = container.parentNode;
  100123. }
  100124. var location_1 = container.getAttribute('data-mce-caret');
  100125. if (location_1 === 'before') {
  100126. node = container.nextSibling;
  100127. if (isFakeCaretTarget(node)) {
  100128. return before$2(node);
  100129. }
  100130. }
  100131. if (location_1 === 'after') {
  100132. node = container.previousSibling;
  100133. if (isFakeCaretTarget(node)) {
  100134. return after$2(node);
  100135. }
  100136. }
  100137. }
  100138. if (!range.collapsed) {
  100139. return range;
  100140. }
  100141. if (isText$7(container)) {
  100142. if (isCaretContainer(container)) {
  100143. if (direction === 1) {
  100144. node = leanRight(container);
  100145. if (node) {
  100146. return before$2(node);
  100147. }
  100148. node = leanLeft(container);
  100149. if (node) {
  100150. return after$2(node);
  100151. }
  100152. }
  100153. if (direction === -1) {
  100154. node = leanLeft(container);
  100155. if (node) {
  100156. return after$2(node);
  100157. }
  100158. node = leanRight(container);
  100159. if (node) {
  100160. return before$2(node);
  100161. }
  100162. }
  100163. return range;
  100164. }
  100165. if (endsWithCaretContainer$1(container) && offset >= container.data.length - 1) {
  100166. if (direction === 1) {
  100167. node = leanRight(container);
  100168. if (node) {
  100169. return before$2(node);
  100170. }
  100171. }
  100172. return range;
  100173. }
  100174. if (startsWithCaretContainer$1(container) && offset <= 1) {
  100175. if (direction === -1) {
  100176. node = leanLeft(container);
  100177. if (node) {
  100178. return after$2(node);
  100179. }
  100180. }
  100181. return range;
  100182. }
  100183. if (offset === container.data.length) {
  100184. node = leanRight(container);
  100185. if (node) {
  100186. return before$2(node);
  100187. }
  100188. return range;
  100189. }
  100190. if (offset === 0) {
  100191. node = leanLeft(container);
  100192. if (node) {
  100193. return after$2(node);
  100194. }
  100195. return range;
  100196. }
  100197. }
  100198. return range;
  100199. };
  100200. var getRelativeCefElm = function (forward, caretPosition) {
  100201. return Optional.from(getChildNodeAtRelativeOffset(forward ? 0 : -1, caretPosition)).filter(isContentEditableFalse$7);
  100202. };
  100203. var getNormalizedRangeEndPoint = function (direction, root, range) {
  100204. var normalizedRange = normalizeRange(direction, root, range);
  100205. if (direction === -1) {
  100206. return CaretPosition.fromRangeStart(normalizedRange);
  100207. }
  100208. return CaretPosition.fromRangeEnd(normalizedRange);
  100209. };
  100210. var getElementFromPosition = function (pos) {
  100211. return Optional.from(pos.getNode()).map(SugarElement.fromDom);
  100212. };
  100213. var getElementFromPrevPosition = function (pos) {
  100214. return Optional.from(pos.getNode(true)).map(SugarElement.fromDom);
  100215. };
  100216. var getVisualCaretPosition = function (walkFn, caretPosition) {
  100217. while (caretPosition = walkFn(caretPosition)) {
  100218. if (caretPosition.isVisible()) {
  100219. return caretPosition;
  100220. }
  100221. }
  100222. return caretPosition;
  100223. };
  100224. var isMoveInsideSameBlock = function (from, to) {
  100225. var inSameBlock = isInSameBlock(from, to);
  100226. if (!inSameBlock && isBr$5(from.getNode())) {
  100227. return true;
  100228. }
  100229. return inSameBlock;
  100230. };
  100231. var HDirection;
  100232. (function (HDirection) {
  100233. HDirection[HDirection['Backwards'] = -1] = 'Backwards';
  100234. HDirection[HDirection['Forwards'] = 1] = 'Forwards';
  100235. }(HDirection || (HDirection = {})));
  100236. var isContentEditableFalse$6 = isContentEditableFalse$b;
  100237. var isText$1 = isText$7;
  100238. var isElement = isElement$5;
  100239. var isBr$1 = isBr$5;
  100240. var isCaretCandidate = isCaretCandidate$3;
  100241. var isAtomic = isAtomic$1;
  100242. var isEditableCaretCandidate = isEditableCaretCandidate$1;
  100243. var getParents$3 = function (node, root) {
  100244. var parents = [];
  100245. while (node && node !== root) {
  100246. parents.push(node);
  100247. node = node.parentNode;
  100248. }
  100249. return parents;
  100250. };
  100251. var nodeAtIndex = function (container, offset) {
  100252. if (container.hasChildNodes() && offset < container.childNodes.length) {
  100253. return container.childNodes[offset];
  100254. }
  100255. return null;
  100256. };
  100257. var getCaretCandidatePosition = function (direction, node) {
  100258. if (isForwards(direction)) {
  100259. if (isCaretCandidate(node.previousSibling) && !isText$1(node.previousSibling)) {
  100260. return CaretPosition.before(node);
  100261. }
  100262. if (isText$1(node)) {
  100263. return CaretPosition(node, 0);
  100264. }
  100265. }
  100266. if (isBackwards(direction)) {
  100267. if (isCaretCandidate(node.nextSibling) && !isText$1(node.nextSibling)) {
  100268. return CaretPosition.after(node);
  100269. }
  100270. if (isText$1(node)) {
  100271. return CaretPosition(node, node.data.length);
  100272. }
  100273. }
  100274. if (isBackwards(direction)) {
  100275. if (isBr$1(node)) {
  100276. return CaretPosition.before(node);
  100277. }
  100278. return CaretPosition.after(node);
  100279. }
  100280. return CaretPosition.before(node);
  100281. };
  100282. var moveForwardFromBr = function (root, nextNode) {
  100283. var nextSibling = nextNode.nextSibling;
  100284. if (nextSibling && isCaretCandidate(nextSibling)) {
  100285. if (isText$1(nextSibling)) {
  100286. return CaretPosition(nextSibling, 0);
  100287. } else {
  100288. return CaretPosition.before(nextSibling);
  100289. }
  100290. } else {
  100291. return findCaretPosition$1(HDirection.Forwards, CaretPosition.after(nextNode), root);
  100292. }
  100293. };
  100294. var findCaretPosition$1 = function (direction, startPos, root) {
  100295. var node;
  100296. var nextNode;
  100297. var innerNode;
  100298. var caretPosition;
  100299. if (!isElement(root) || !startPos) {
  100300. return null;
  100301. }
  100302. if (startPos.isEqual(CaretPosition.after(root)) && root.lastChild) {
  100303. caretPosition = CaretPosition.after(root.lastChild);
  100304. if (isBackwards(direction) && isCaretCandidate(root.lastChild) && isElement(root.lastChild)) {
  100305. return isBr$1(root.lastChild) ? CaretPosition.before(root.lastChild) : caretPosition;
  100306. }
  100307. } else {
  100308. caretPosition = startPos;
  100309. }
  100310. var container = caretPosition.container();
  100311. var offset = caretPosition.offset();
  100312. if (isText$1(container)) {
  100313. if (isBackwards(direction) && offset > 0) {
  100314. return CaretPosition(container, --offset);
  100315. }
  100316. if (isForwards(direction) && offset < container.length) {
  100317. return CaretPosition(container, ++offset);
  100318. }
  100319. node = container;
  100320. } else {
  100321. if (isBackwards(direction) && offset > 0) {
  100322. nextNode = nodeAtIndex(container, offset - 1);
  100323. if (isCaretCandidate(nextNode)) {
  100324. if (!isAtomic(nextNode)) {
  100325. innerNode = findNode$1(nextNode, direction, isEditableCaretCandidate, nextNode);
  100326. if (innerNode) {
  100327. if (isText$1(innerNode)) {
  100328. return CaretPosition(innerNode, innerNode.data.length);
  100329. }
  100330. return CaretPosition.after(innerNode);
  100331. }
  100332. }
  100333. if (isText$1(nextNode)) {
  100334. return CaretPosition(nextNode, nextNode.data.length);
  100335. }
  100336. return CaretPosition.before(nextNode);
  100337. }
  100338. }
  100339. if (isForwards(direction) && offset < container.childNodes.length) {
  100340. nextNode = nodeAtIndex(container, offset);
  100341. if (isCaretCandidate(nextNode)) {
  100342. if (isBr$1(nextNode)) {
  100343. return moveForwardFromBr(root, nextNode);
  100344. }
  100345. if (!isAtomic(nextNode)) {
  100346. innerNode = findNode$1(nextNode, direction, isEditableCaretCandidate, nextNode);
  100347. if (innerNode) {
  100348. if (isText$1(innerNode)) {
  100349. return CaretPosition(innerNode, 0);
  100350. }
  100351. return CaretPosition.before(innerNode);
  100352. }
  100353. }
  100354. if (isText$1(nextNode)) {
  100355. return CaretPosition(nextNode, 0);
  100356. }
  100357. return CaretPosition.after(nextNode);
  100358. }
  100359. }
  100360. node = nextNode ? nextNode : caretPosition.getNode();
  100361. }
  100362. if (isForwards(direction) && caretPosition.isAtEnd() || isBackwards(direction) && caretPosition.isAtStart()) {
  100363. node = findNode$1(node, direction, always, root, true);
  100364. if (isEditableCaretCandidate(node, root)) {
  100365. return getCaretCandidatePosition(direction, node);
  100366. }
  100367. }
  100368. nextNode = findNode$1(node, direction, isEditableCaretCandidate, root);
  100369. var rootContentEditableFalseElm = last$1(filter$4(getParents$3(container, root), isContentEditableFalse$6));
  100370. if (rootContentEditableFalseElm && (!nextNode || !rootContentEditableFalseElm.contains(nextNode))) {
  100371. if (isForwards(direction)) {
  100372. caretPosition = CaretPosition.after(rootContentEditableFalseElm);
  100373. } else {
  100374. caretPosition = CaretPosition.before(rootContentEditableFalseElm);
  100375. }
  100376. return caretPosition;
  100377. }
  100378. if (nextNode) {
  100379. return getCaretCandidatePosition(direction, nextNode);
  100380. }
  100381. return null;
  100382. };
  100383. var CaretWalker = function (root) {
  100384. return {
  100385. next: function (caretPosition) {
  100386. return findCaretPosition$1(HDirection.Forwards, caretPosition, root);
  100387. },
  100388. prev: function (caretPosition) {
  100389. return findCaretPosition$1(HDirection.Backwards, caretPosition, root);
  100390. }
  100391. };
  100392. };
  100393. var walkToPositionIn = function (forward, root, start) {
  100394. var position = forward ? CaretPosition.before(start) : CaretPosition.after(start);
  100395. return fromPosition(forward, root, position);
  100396. };
  100397. var afterElement = function (node) {
  100398. return isBr$5(node) ? CaretPosition.before(node) : CaretPosition.after(node);
  100399. };
  100400. var isBeforeOrStart = function (position) {
  100401. if (CaretPosition.isTextPosition(position)) {
  100402. return position.offset() === 0;
  100403. } else {
  100404. return isCaretCandidate$3(position.getNode());
  100405. }
  100406. };
  100407. var isAfterOrEnd = function (position) {
  100408. if (CaretPosition.isTextPosition(position)) {
  100409. var container = position.container();
  100410. return position.offset() === container.data.length;
  100411. } else {
  100412. return isCaretCandidate$3(position.getNode(true));
  100413. }
  100414. };
  100415. var isBeforeAfterSameElement = function (from, to) {
  100416. return !CaretPosition.isTextPosition(from) && !CaretPosition.isTextPosition(to) && from.getNode() === to.getNode(true);
  100417. };
  100418. var isAtBr = function (position) {
  100419. return !CaretPosition.isTextPosition(position) && isBr$5(position.getNode());
  100420. };
  100421. var shouldSkipPosition = function (forward, from, to) {
  100422. if (forward) {
  100423. return !isBeforeAfterSameElement(from, to) && !isAtBr(from) && isAfterOrEnd(from) && isBeforeOrStart(to);
  100424. } else {
  100425. return !isBeforeAfterSameElement(to, from) && isBeforeOrStart(from) && isAfterOrEnd(to);
  100426. }
  100427. };
  100428. var fromPosition = function (forward, root, pos) {
  100429. var walker = CaretWalker(root);
  100430. return Optional.from(forward ? walker.next(pos) : walker.prev(pos));
  100431. };
  100432. var navigate = function (forward, root, from) {
  100433. return fromPosition(forward, root, from).bind(function (to) {
  100434. if (isInSameBlock(from, to, root) && shouldSkipPosition(forward, from, to)) {
  100435. return fromPosition(forward, root, to);
  100436. } else {
  100437. return Optional.some(to);
  100438. }
  100439. });
  100440. };
  100441. var navigateIgnore = function (forward, root, from, ignoreFilter) {
  100442. return navigate(forward, root, from).bind(function (pos) {
  100443. return ignoreFilter(pos) ? navigateIgnore(forward, root, pos, ignoreFilter) : Optional.some(pos);
  100444. });
  100445. };
  100446. var positionIn = function (forward, element) {
  100447. var startNode = forward ? element.firstChild : element.lastChild;
  100448. if (isText$7(startNode)) {
  100449. return Optional.some(CaretPosition(startNode, forward ? 0 : startNode.data.length));
  100450. } else if (startNode) {
  100451. if (isCaretCandidate$3(startNode)) {
  100452. return Optional.some(forward ? CaretPosition.before(startNode) : afterElement(startNode));
  100453. } else {
  100454. return walkToPositionIn(forward, element, startNode);
  100455. }
  100456. } else {
  100457. return Optional.none();
  100458. }
  100459. };
  100460. var nextPosition = curry(fromPosition, true);
  100461. var prevPosition = curry(fromPosition, false);
  100462. var firstPositionIn = curry(positionIn, true);
  100463. var lastPositionIn = curry(positionIn, false);
  100464. var CARET_ID$1 = '_mce_caret';
  100465. var isCaretNode = function (node) {
  100466. return isElement$5(node) && node.id === CARET_ID$1;
  100467. };
  100468. var getParentCaretContainer = function (body, node) {
  100469. while (node && node !== body) {
  100470. if (node.id === CARET_ID$1) {
  100471. return node;
  100472. }
  100473. node = node.parentNode;
  100474. }
  100475. return null;
  100476. };
  100477. var isStringPathBookmark = function (bookmark) {
  100478. return isString$1(bookmark.start);
  100479. };
  100480. var isRangeBookmark = function (bookmark) {
  100481. return has$2(bookmark, 'rng');
  100482. };
  100483. var isIdBookmark = function (bookmark) {
  100484. return has$2(bookmark, 'id');
  100485. };
  100486. var isIndexBookmark = function (bookmark) {
  100487. return has$2(bookmark, 'name');
  100488. };
  100489. var isPathBookmark = function (bookmark) {
  100490. return Tools.isArray(bookmark.start);
  100491. };
  100492. var addBogus = function (dom, node) {
  100493. if (isElement$5(node) && dom.isBlock(node) && !node.innerHTML && !Env.ie) {
  100494. node.innerHTML = '<br data-mce-bogus="1" />';
  100495. }
  100496. return node;
  100497. };
  100498. var resolveCaretPositionBookmark = function (dom, bookmark) {
  100499. var pos;
  100500. var rng = dom.createRng();
  100501. pos = resolve$2(dom.getRoot(), bookmark.start);
  100502. rng.setStart(pos.container(), pos.offset());
  100503. pos = resolve$2(dom.getRoot(), bookmark.end);
  100504. rng.setEnd(pos.container(), pos.offset());
  100505. return rng;
  100506. };
  100507. var insertZwsp = function (node, rng) {
  100508. var textNode = node.ownerDocument.createTextNode(ZWSP$1);
  100509. node.appendChild(textNode);
  100510. rng.setStart(textNode, 0);
  100511. rng.setEnd(textNode, 0);
  100512. };
  100513. var isEmpty$1 = function (node) {
  100514. return node.hasChildNodes() === false;
  100515. };
  100516. var tryFindRangePosition = function (node, rng) {
  100517. return lastPositionIn(node).fold(never, function (pos) {
  100518. rng.setStart(pos.container(), pos.offset());
  100519. rng.setEnd(pos.container(), pos.offset());
  100520. return true;
  100521. });
  100522. };
  100523. var padEmptyCaretContainer = function (root, node, rng) {
  100524. if (isEmpty$1(node) && getParentCaretContainer(root, node)) {
  100525. insertZwsp(node, rng);
  100526. return true;
  100527. } else {
  100528. return false;
  100529. }
  100530. };
  100531. var setEndPoint = function (dom, start, bookmark, rng) {
  100532. var point = bookmark[start ? 'start' : 'end'];
  100533. var i, node, offset, children;
  100534. var root = dom.getRoot();
  100535. if (point) {
  100536. offset = point[0];
  100537. for (node = root, i = point.length - 1; i >= 1; i--) {
  100538. children = node.childNodes;
  100539. if (padEmptyCaretContainer(root, node, rng)) {
  100540. return true;
  100541. }
  100542. if (point[i] > children.length - 1) {
  100543. if (padEmptyCaretContainer(root, node, rng)) {
  100544. return true;
  100545. }
  100546. return tryFindRangePosition(node, rng);
  100547. }
  100548. node = children[point[i]];
  100549. }
  100550. if (node.nodeType === 3) {
  100551. offset = Math.min(point[0], node.nodeValue.length);
  100552. }
  100553. if (node.nodeType === 1) {
  100554. offset = Math.min(point[0], node.childNodes.length);
  100555. }
  100556. if (start) {
  100557. rng.setStart(node, offset);
  100558. } else {
  100559. rng.setEnd(node, offset);
  100560. }
  100561. }
  100562. return true;
  100563. };
  100564. var isValidTextNode = function (node) {
  100565. return isText$7(node) && node.data.length > 0;
  100566. };
  100567. var restoreEndPoint = function (dom, suffix, bookmark) {
  100568. var marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev;
  100569. var keep = bookmark.keep;
  100570. var container, offset;
  100571. if (marker) {
  100572. node = marker.parentNode;
  100573. if (suffix === 'start') {
  100574. if (!keep) {
  100575. idx = dom.nodeIndex(marker);
  100576. } else {
  100577. if (marker.hasChildNodes()) {
  100578. node = marker.firstChild;
  100579. idx = 1;
  100580. } else if (isValidTextNode(marker.nextSibling)) {
  100581. node = marker.nextSibling;
  100582. idx = 0;
  100583. } else if (isValidTextNode(marker.previousSibling)) {
  100584. node = marker.previousSibling;
  100585. idx = marker.previousSibling.data.length;
  100586. } else {
  100587. node = marker.parentNode;
  100588. idx = dom.nodeIndex(marker) + 1;
  100589. }
  100590. }
  100591. container = node;
  100592. offset = idx;
  100593. } else {
  100594. if (!keep) {
  100595. idx = dom.nodeIndex(marker);
  100596. } else {
  100597. if (marker.hasChildNodes()) {
  100598. node = marker.firstChild;
  100599. idx = 1;
  100600. } else if (isValidTextNode(marker.previousSibling)) {
  100601. node = marker.previousSibling;
  100602. idx = marker.previousSibling.data.length;
  100603. } else {
  100604. node = marker.parentNode;
  100605. idx = dom.nodeIndex(marker);
  100606. }
  100607. }
  100608. container = node;
  100609. offset = idx;
  100610. }
  100611. if (!keep) {
  100612. prev = marker.previousSibling;
  100613. next = marker.nextSibling;
  100614. Tools.each(Tools.grep(marker.childNodes), function (node) {
  100615. if (isText$7(node)) {
  100616. node.nodeValue = node.nodeValue.replace(/\uFEFF/g, '');
  100617. }
  100618. });
  100619. while (marker = dom.get(bookmark.id + '_' + suffix)) {
  100620. dom.remove(marker, true);
  100621. }
  100622. if (prev && next && prev.nodeType === next.nodeType && isText$7(prev) && !Env.opera) {
  100623. idx = prev.nodeValue.length;
  100624. prev.appendData(next.nodeValue);
  100625. dom.remove(next);
  100626. container = prev;
  100627. offset = idx;
  100628. }
  100629. }
  100630. return Optional.some(CaretPosition(container, offset));
  100631. } else {
  100632. return Optional.none();
  100633. }
  100634. };
  100635. var resolvePaths = function (dom, bookmark) {
  100636. var rng = dom.createRng();
  100637. if (setEndPoint(dom, true, bookmark, rng) && setEndPoint(dom, false, bookmark, rng)) {
  100638. return Optional.some(rng);
  100639. } else {
  100640. return Optional.none();
  100641. }
  100642. };
  100643. var resolveId = function (dom, bookmark) {
  100644. var startPos = restoreEndPoint(dom, 'start', bookmark);
  100645. var endPos = restoreEndPoint(dom, 'end', bookmark);
  100646. return lift2(startPos, endPos.or(startPos), function (spos, epos) {
  100647. var rng = dom.createRng();
  100648. rng.setStart(addBogus(dom, spos.container()), spos.offset());
  100649. rng.setEnd(addBogus(dom, epos.container()), epos.offset());
  100650. return rng;
  100651. });
  100652. };
  100653. var resolveIndex = function (dom, bookmark) {
  100654. return Optional.from(dom.select(bookmark.name)[bookmark.index]).map(function (elm) {
  100655. var rng = dom.createRng();
  100656. rng.selectNode(elm);
  100657. return rng;
  100658. });
  100659. };
  100660. var resolve$1 = function (selection, bookmark) {
  100661. var dom = selection.dom;
  100662. if (bookmark) {
  100663. if (isPathBookmark(bookmark)) {
  100664. return resolvePaths(dom, bookmark);
  100665. } else if (isStringPathBookmark(bookmark)) {
  100666. return Optional.some(resolveCaretPositionBookmark(dom, bookmark));
  100667. } else if (isIdBookmark(bookmark)) {
  100668. return resolveId(dom, bookmark);
  100669. } else if (isIndexBookmark(bookmark)) {
  100670. return resolveIndex(dom, bookmark);
  100671. } else if (isRangeBookmark(bookmark)) {
  100672. return Optional.some(bookmark.rng);
  100673. }
  100674. }
  100675. return Optional.none();
  100676. };
  100677. var getBookmark$1 = function (selection, type, normalized) {
  100678. return getBookmark$2(selection, type, normalized);
  100679. };
  100680. var moveToBookmark = function (selection, bookmark) {
  100681. resolve$1(selection, bookmark).each(function (rng) {
  100682. selection.setRng(rng);
  100683. });
  100684. };
  100685. var isBookmarkNode$1 = function (node) {
  100686. return isElement$5(node) && node.tagName === 'SPAN' && node.getAttribute('data-mce-type') === 'bookmark';
  100687. };
  100688. var is = function (expected) {
  100689. return function (actual) {
  100690. return expected === actual;
  100691. };
  100692. };
  100693. var isNbsp = is(nbsp);
  100694. var isWhiteSpace = function (chr) {
  100695. return chr !== '' && ' \f\n\r\t\x0B'.indexOf(chr) !== -1;
  100696. };
  100697. var isContent = function (chr) {
  100698. return !isWhiteSpace(chr) && !isNbsp(chr);
  100699. };
  100700. var isNode = function (node) {
  100701. return !!node.nodeType;
  100702. };
  100703. var isInlineBlock = function (node) {
  100704. return node && /^(IMG)$/.test(node.nodeName);
  100705. };
  100706. var moveStart = function (dom, selection, rng) {
  100707. var offset = rng.startOffset;
  100708. var container = rng.startContainer;
  100709. if (container === rng.endContainer) {
  100710. if (isInlineBlock(container.childNodes[offset])) {
  100711. return;
  100712. }
  100713. }
  100714. if (isElement$5(container)) {
  100715. var nodes = container.childNodes;
  100716. var walker = void 0;
  100717. if (offset < nodes.length) {
  100718. container = nodes[offset];
  100719. walker = new DomTreeWalker(container, dom.getParent(container, dom.isBlock));
  100720. } else {
  100721. container = nodes[nodes.length - 1];
  100722. walker = new DomTreeWalker(container, dom.getParent(container, dom.isBlock));
  100723. walker.next(true);
  100724. }
  100725. for (var node = walker.current(); node; node = walker.next()) {
  100726. if (isText$7(node) && !isWhiteSpaceNode$1(node)) {
  100727. rng.setStart(node, 0);
  100728. selection.setRng(rng);
  100729. return;
  100730. }
  100731. }
  100732. }
  100733. };
  100734. var getNonWhiteSpaceSibling = function (node, next, inc) {
  100735. if (node) {
  100736. var nextName = next ? 'nextSibling' : 'previousSibling';
  100737. for (node = inc ? node : node[nextName]; node; node = node[nextName]) {
  100738. if (isElement$5(node) || !isWhiteSpaceNode$1(node)) {
  100739. return node;
  100740. }
  100741. }
  100742. }
  100743. };
  100744. var isTextBlock$1 = function (editor, name) {
  100745. if (isNode(name)) {
  100746. name = name.nodeName;
  100747. }
  100748. return !!editor.schema.getTextBlockElements()[name.toLowerCase()];
  100749. };
  100750. var isValid = function (ed, parent, child) {
  100751. return ed.schema.isValidChild(parent, child);
  100752. };
  100753. var isWhiteSpaceNode$1 = function (node, allowSpaces) {
  100754. if (allowSpaces === void 0) {
  100755. allowSpaces = false;
  100756. }
  100757. if (isNonNullable(node) && isText$7(node)) {
  100758. var data = allowSpaces ? node.data.replace(/ /g, '\xA0') : node.data;
  100759. return isWhitespaceText(data);
  100760. } else {
  100761. return false;
  100762. }
  100763. };
  100764. var isEmptyTextNode$1 = function (node) {
  100765. return isNonNullable(node) && isText$7(node) && node.length === 0;
  100766. };
  100767. var replaceVars = function (value, vars) {
  100768. if (isFunction(value)) {
  100769. value = value(vars);
  100770. } else if (isNonNullable(vars)) {
  100771. value = value.replace(/%(\w+)/g, function (str, name) {
  100772. return vars[name] || str;
  100773. });
  100774. }
  100775. return value;
  100776. };
  100777. var isEq$5 = function (str1, str2) {
  100778. str1 = str1 || '';
  100779. str2 = str2 || '';
  100780. str1 = '' + (str1.nodeName || str1);
  100781. str2 = '' + (str2.nodeName || str2);
  100782. return str1.toLowerCase() === str2.toLowerCase();
  100783. };
  100784. var normalizeStyleValue = function (dom, value, name) {
  100785. if (name === 'color' || name === 'backgroundColor') {
  100786. value = dom.toHex(value);
  100787. }
  100788. if (name === 'fontWeight' && value === 700) {
  100789. value = 'bold';
  100790. }
  100791. if (name === 'fontFamily') {
  100792. value = value.replace(/[\'\"]/g, '').replace(/,\s+/g, ',');
  100793. }
  100794. return '' + value;
  100795. };
  100796. var getStyle = function (dom, node, name) {
  100797. return normalizeStyleValue(dom, dom.getStyle(node, name), name);
  100798. };
  100799. var getTextDecoration = function (dom, node) {
  100800. var decoration;
  100801. dom.getParent(node, function (n) {
  100802. decoration = dom.getStyle(n, 'text-decoration');
  100803. return decoration && decoration !== 'none';
  100804. });
  100805. return decoration;
  100806. };
  100807. var getParents$2 = function (dom, node, selector) {
  100808. return dom.getParents(node, selector, dom.getRoot());
  100809. };
  100810. var isVariableFormatName = function (editor, formatName) {
  100811. var hasVariableValues = function (format) {
  100812. var isVariableValue = function (val) {
  100813. return val.length > 1 && val.charAt(0) === '%';
  100814. };
  100815. return exists([
  100816. 'styles',
  100817. 'attributes'
  100818. ], function (key) {
  100819. return get$9(format, key).exists(function (field) {
  100820. var fieldValues = isArray$1(field) ? field : values(field);
  100821. return exists(fieldValues, isVariableValue);
  100822. });
  100823. });
  100824. };
  100825. return exists(editor.formatter.get(formatName), hasVariableValues);
  100826. };
  100827. var areSimilarFormats = function (editor, formatName, otherFormatName) {
  100828. var validKeys = [
  100829. 'inline',
  100830. 'block',
  100831. 'selector',
  100832. 'attributes',
  100833. 'styles',
  100834. 'classes'
  100835. ];
  100836. var filterObj = function (format) {
  100837. return filter$3(format, function (_, key) {
  100838. return exists(validKeys, function (validKey) {
  100839. return validKey === key;
  100840. });
  100841. });
  100842. };
  100843. return exists(editor.formatter.get(formatName), function (fmt1) {
  100844. var filteredFmt1 = filterObj(fmt1);
  100845. return exists(editor.formatter.get(otherFormatName), function (fmt2) {
  100846. var filteredFmt2 = filterObj(fmt2);
  100847. return equal$1(filteredFmt1, filteredFmt2);
  100848. });
  100849. });
  100850. };
  100851. var isBlockFormat = function (format) {
  100852. return hasNonNullableKey(format, 'block');
  100853. };
  100854. var isSelectorFormat = function (format) {
  100855. return hasNonNullableKey(format, 'selector');
  100856. };
  100857. var isInlineFormat = function (format) {
  100858. return hasNonNullableKey(format, 'inline');
  100859. };
  100860. var isMixedFormat = function (format) {
  100861. return isSelectorFormat(format) && isInlineFormat(format) && is$1(get$9(format, 'mixed'), true);
  100862. };
  100863. var shouldExpandToSelector = function (format) {
  100864. return isSelectorFormat(format) && format.expand !== false && !isInlineFormat(format);
  100865. };
  100866. var isBookmarkNode = isBookmarkNode$1;
  100867. var getParents$1 = getParents$2;
  100868. var isWhiteSpaceNode = isWhiteSpaceNode$1;
  100869. var isTextBlock = isTextBlock$1;
  100870. var isBogusBr = function (node) {
  100871. return isBr$5(node) && node.getAttribute('data-mce-bogus') && !node.nextSibling;
  100872. };
  100873. var findParentContentEditable = function (dom, node) {
  100874. var parent = node;
  100875. while (parent) {
  100876. if (isElement$5(parent) && dom.getContentEditable(parent)) {
  100877. return dom.getContentEditable(parent) === 'false' ? parent : node;
  100878. }
  100879. parent = parent.parentNode;
  100880. }
  100881. return node;
  100882. };
  100883. var walkText = function (start, node, offset, predicate) {
  100884. var str = node.data;
  100885. for (var i = offset; start ? i >= 0 : i < str.length; start ? i-- : i++) {
  100886. if (predicate(str.charAt(i))) {
  100887. return start ? i + 1 : i;
  100888. }
  100889. }
  100890. return -1;
  100891. };
  100892. var findSpace = function (start, node, offset) {
  100893. return walkText(start, node, offset, function (c) {
  100894. return isNbsp(c) || isWhiteSpace(c);
  100895. });
  100896. };
  100897. var findContent = function (start, node, offset) {
  100898. return walkText(start, node, offset, isContent);
  100899. };
  100900. var findWordEndPoint = function (dom, body, container, offset, start, includeTrailingSpaces) {
  100901. var lastTextNode;
  100902. var rootNode = dom.getParent(container, dom.isBlock) || body;
  100903. var walk = function (container, offset, pred) {
  100904. var textSeeker = TextSeeker(dom);
  100905. var walker = start ? textSeeker.backwards : textSeeker.forwards;
  100906. return Optional.from(walker(container, offset, function (text, textOffset) {
  100907. if (isBookmarkNode(text.parentNode)) {
  100908. return -1;
  100909. } else {
  100910. lastTextNode = text;
  100911. return pred(start, text, textOffset);
  100912. }
  100913. }, rootNode));
  100914. };
  100915. var spaceResult = walk(container, offset, findSpace);
  100916. return spaceResult.bind(function (result) {
  100917. return includeTrailingSpaces ? walk(result.container, result.offset + (start ? -1 : 0), findContent) : Optional.some(result);
  100918. }).orThunk(function () {
  100919. return lastTextNode ? Optional.some({
  100920. container: lastTextNode,
  100921. offset: start ? 0 : lastTextNode.length
  100922. }) : Optional.none();
  100923. });
  100924. };
  100925. var findSelectorEndPoint = function (dom, formatList, rng, container, siblingName) {
  100926. if (isText$7(container) && isEmpty$3(container.data) && container[siblingName]) {
  100927. container = container[siblingName];
  100928. }
  100929. var parents = getParents$1(dom, container);
  100930. for (var i = 0; i < parents.length; i++) {
  100931. for (var y = 0; y < formatList.length; y++) {
  100932. var curFormat = formatList[y];
  100933. if (isNonNullable(curFormat.collapsed) && curFormat.collapsed !== rng.collapsed) {
  100934. continue;
  100935. }
  100936. if (isSelectorFormat(curFormat) && dom.is(parents[i], curFormat.selector)) {
  100937. return parents[i];
  100938. }
  100939. }
  100940. }
  100941. return container;
  100942. };
  100943. var findBlockEndPoint = function (editor, formatList, container, siblingName) {
  100944. var node = container;
  100945. var dom = editor.dom;
  100946. var root = dom.getRoot();
  100947. var format = formatList[0];
  100948. if (isBlockFormat(format)) {
  100949. node = format.wrapper ? null : dom.getParent(container, format.block, root);
  100950. }
  100951. if (!node) {
  100952. var scopeRoot = dom.getParent(container, 'LI,TD,TH');
  100953. node = dom.getParent(isText$7(container) ? container.parentNode : container, function (node) {
  100954. return node !== root && isTextBlock(editor, node);
  100955. }, scopeRoot);
  100956. }
  100957. if (node && isBlockFormat(format) && format.wrapper) {
  100958. node = getParents$1(dom, node, 'ul,ol').reverse()[0] || node;
  100959. }
  100960. if (!node) {
  100961. node = container;
  100962. while (node[siblingName] && !dom.isBlock(node[siblingName])) {
  100963. node = node[siblingName];
  100964. if (isEq$5(node, 'br')) {
  100965. break;
  100966. }
  100967. }
  100968. }
  100969. return node || container;
  100970. };
  100971. var isAtBlockBoundary$1 = function (dom, root, container, siblingName) {
  100972. var parent = container.parentNode;
  100973. if (isNonNullable(container[siblingName])) {
  100974. return false;
  100975. } else if (parent === root || isNullable(parent) || dom.isBlock(parent)) {
  100976. return true;
  100977. } else {
  100978. return isAtBlockBoundary$1(dom, root, parent, siblingName);
  100979. }
  100980. };
  100981. var findParentContainer = function (dom, formatList, container, offset, start) {
  100982. var parent = container;
  100983. var siblingName = start ? 'previousSibling' : 'nextSibling';
  100984. var root = dom.getRoot();
  100985. if (isText$7(container) && !isWhiteSpaceNode(container)) {
  100986. if (start ? offset > 0 : offset < container.data.length) {
  100987. return container;
  100988. }
  100989. }
  100990. while (true) {
  100991. if (!formatList[0].block_expand && dom.isBlock(parent)) {
  100992. return parent;
  100993. }
  100994. for (var sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {
  100995. var allowSpaces = isText$7(sibling) && !isAtBlockBoundary$1(dom, root, sibling, siblingName);
  100996. if (!isBookmarkNode(sibling) && !isBogusBr(sibling) && !isWhiteSpaceNode(sibling, allowSpaces)) {
  100997. return parent;
  100998. }
  100999. }
  101000. if (parent === root || parent.parentNode === root) {
  101001. container = parent;
  101002. break;
  101003. }
  101004. parent = parent.parentNode;
  101005. }
  101006. return container;
  101007. };
  101008. var isSelfOrParentBookmark = function (container) {
  101009. return isBookmarkNode(container.parentNode) || isBookmarkNode(container);
  101010. };
  101011. var expandRng = function (editor, rng, formatList, includeTrailingSpace) {
  101012. if (includeTrailingSpace === void 0) {
  101013. includeTrailingSpace = false;
  101014. }
  101015. var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
  101016. var dom = editor.dom;
  101017. var format = formatList[0];
  101018. if (isElement$5(startContainer) && startContainer.hasChildNodes()) {
  101019. startContainer = getNode$1(startContainer, startOffset);
  101020. if (isText$7(startContainer)) {
  101021. startOffset = 0;
  101022. }
  101023. }
  101024. if (isElement$5(endContainer) && endContainer.hasChildNodes()) {
  101025. endContainer = getNode$1(endContainer, rng.collapsed ? endOffset : endOffset - 1);
  101026. if (isText$7(endContainer)) {
  101027. endOffset = endContainer.nodeValue.length;
  101028. }
  101029. }
  101030. startContainer = findParentContentEditable(dom, startContainer);
  101031. endContainer = findParentContentEditable(dom, endContainer);
  101032. if (isSelfOrParentBookmark(startContainer)) {
  101033. startContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode;
  101034. if (rng.collapsed) {
  101035. startContainer = startContainer.previousSibling || startContainer;
  101036. } else {
  101037. startContainer = startContainer.nextSibling || startContainer;
  101038. }
  101039. if (isText$7(startContainer)) {
  101040. startOffset = rng.collapsed ? startContainer.length : 0;
  101041. }
  101042. }
  101043. if (isSelfOrParentBookmark(endContainer)) {
  101044. endContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode;
  101045. if (rng.collapsed) {
  101046. endContainer = endContainer.nextSibling || endContainer;
  101047. } else {
  101048. endContainer = endContainer.previousSibling || endContainer;
  101049. }
  101050. if (isText$7(endContainer)) {
  101051. endOffset = rng.collapsed ? 0 : endContainer.length;
  101052. }
  101053. }
  101054. if (rng.collapsed) {
  101055. var startPoint = findWordEndPoint(dom, editor.getBody(), startContainer, startOffset, true, includeTrailingSpace);
  101056. startPoint.each(function (_a) {
  101057. var container = _a.container, offset = _a.offset;
  101058. startContainer = container;
  101059. startOffset = offset;
  101060. });
  101061. var endPoint = findWordEndPoint(dom, editor.getBody(), endContainer, endOffset, false, includeTrailingSpace);
  101062. endPoint.each(function (_a) {
  101063. var container = _a.container, offset = _a.offset;
  101064. endContainer = container;
  101065. endOffset = offset;
  101066. });
  101067. }
  101068. if (isInlineFormat(format) || format.block_expand) {
  101069. if (!isInlineFormat(format) || (!isText$7(startContainer) || startOffset === 0)) {
  101070. startContainer = findParentContainer(dom, formatList, startContainer, startOffset, true);
  101071. }
  101072. if (!isInlineFormat(format) || (!isText$7(endContainer) || endOffset === endContainer.nodeValue.length)) {
  101073. endContainer = findParentContainer(dom, formatList, endContainer, endOffset, false);
  101074. }
  101075. }
  101076. if (shouldExpandToSelector(format)) {
  101077. startContainer = findSelectorEndPoint(dom, formatList, rng, startContainer, 'previousSibling');
  101078. endContainer = findSelectorEndPoint(dom, formatList, rng, endContainer, 'nextSibling');
  101079. }
  101080. if (isBlockFormat(format) || isSelectorFormat(format)) {
  101081. startContainer = findBlockEndPoint(editor, formatList, startContainer, 'previousSibling');
  101082. endContainer = findBlockEndPoint(editor, formatList, endContainer, 'nextSibling');
  101083. if (isBlockFormat(format)) {
  101084. if (!dom.isBlock(startContainer)) {
  101085. startContainer = findParentContainer(dom, formatList, startContainer, startOffset, true);
  101086. }
  101087. if (!dom.isBlock(endContainer)) {
  101088. endContainer = findParentContainer(dom, formatList, endContainer, endOffset, false);
  101089. }
  101090. }
  101091. }
  101092. if (isElement$5(startContainer)) {
  101093. startOffset = dom.nodeIndex(startContainer);
  101094. startContainer = startContainer.parentNode;
  101095. }
  101096. if (isElement$5(endContainer)) {
  101097. endOffset = dom.nodeIndex(endContainer) + 1;
  101098. endContainer = endContainer.parentNode;
  101099. }
  101100. return {
  101101. startContainer: startContainer,
  101102. startOffset: startOffset,
  101103. endContainer: endContainer,
  101104. endOffset: endOffset
  101105. };
  101106. };
  101107. var walk$2 = function (dom, rng, callback) {
  101108. var startOffset = rng.startOffset;
  101109. var startContainer = getNode$1(rng.startContainer, startOffset);
  101110. var endOffset = rng.endOffset;
  101111. var endContainer = getNode$1(rng.endContainer, endOffset - 1);
  101112. var exclude = function (nodes) {
  101113. var firstNode = nodes[0];
  101114. if (isText$7(firstNode) && firstNode === startContainer && startOffset >= firstNode.data.length) {
  101115. nodes.splice(0, 1);
  101116. }
  101117. var lastNode = nodes[nodes.length - 1];
  101118. if (endOffset === 0 && nodes.length > 0 && lastNode === endContainer && isText$7(lastNode)) {
  101119. nodes.splice(nodes.length - 1, 1);
  101120. }
  101121. return nodes;
  101122. };
  101123. var collectSiblings = function (node, name, endNode) {
  101124. var siblings = [];
  101125. for (; node && node !== endNode; node = node[name]) {
  101126. siblings.push(node);
  101127. }
  101128. return siblings;
  101129. };
  101130. var findEndPoint = function (node, root) {
  101131. return dom.getParent(node, function (node) {
  101132. return node.parentNode === root;
  101133. }, root);
  101134. };
  101135. var walkBoundary = function (startNode, endNode, next) {
  101136. var siblingName = next ? 'nextSibling' : 'previousSibling';
  101137. for (var node = startNode, parent_1 = node.parentNode; node && node !== endNode; node = parent_1) {
  101138. parent_1 = node.parentNode;
  101139. var siblings_1 = collectSiblings(node === startNode ? node : node[siblingName], siblingName);
  101140. if (siblings_1.length) {
  101141. if (!next) {
  101142. siblings_1.reverse();
  101143. }
  101144. callback(exclude(siblings_1));
  101145. }
  101146. }
  101147. };
  101148. if (startContainer === endContainer) {
  101149. return callback(exclude([startContainer]));
  101150. }
  101151. var ancestor = dom.findCommonAncestor(startContainer, endContainer);
  101152. if (dom.isChildOf(startContainer, endContainer)) {
  101153. return walkBoundary(startContainer, ancestor, true);
  101154. }
  101155. if (dom.isChildOf(endContainer, startContainer)) {
  101156. return walkBoundary(endContainer, ancestor);
  101157. }
  101158. var startPoint = findEndPoint(startContainer, ancestor) || startContainer;
  101159. var endPoint = findEndPoint(endContainer, ancestor) || endContainer;
  101160. walkBoundary(startContainer, startPoint, true);
  101161. var siblings = collectSiblings(startPoint === startContainer ? startPoint : startPoint.nextSibling, 'nextSibling', endPoint === endContainer ? endPoint.nextSibling : endPoint);
  101162. if (siblings.length) {
  101163. callback(exclude(siblings));
  101164. }
  101165. walkBoundary(endContainer, endPoint);
  101166. };
  101167. var getRanges = function (selection) {
  101168. var ranges = [];
  101169. if (selection) {
  101170. for (var i = 0; i < selection.rangeCount; i++) {
  101171. ranges.push(selection.getRangeAt(i));
  101172. }
  101173. }
  101174. return ranges;
  101175. };
  101176. var getSelectedNodes = function (ranges) {
  101177. return bind(ranges, function (range) {
  101178. var node = getSelectedNode(range);
  101179. return node ? [SugarElement.fromDom(node)] : [];
  101180. });
  101181. };
  101182. var hasMultipleRanges = function (selection) {
  101183. return getRanges(selection).length > 1;
  101184. };
  101185. var getCellsFromRanges = function (ranges) {
  101186. return filter$4(getSelectedNodes(ranges), isTableCell$4);
  101187. };
  101188. var getCellsFromElement = function (elm) {
  101189. return descendants(elm, 'td[data-mce-selected],th[data-mce-selected]');
  101190. };
  101191. var getCellsFromElementOrRanges = function (ranges, element) {
  101192. var selectedCells = getCellsFromElement(element);
  101193. return selectedCells.length > 0 ? selectedCells : getCellsFromRanges(ranges);
  101194. };
  101195. var getCellsFromEditor = function (editor) {
  101196. return getCellsFromElementOrRanges(getRanges(editor.selection.getSel()), SugarElement.fromDom(editor.getBody()));
  101197. };
  101198. var getClosestTable = function (cell, isRoot) {
  101199. return ancestor$2(cell, 'table', isRoot);
  101200. };
  101201. var getStartNode = function (rng) {
  101202. var sc = rng.startContainer, so = rng.startOffset;
  101203. if (isText$7(sc)) {
  101204. return so === 0 ? Optional.some(SugarElement.fromDom(sc)) : Optional.none();
  101205. } else {
  101206. return Optional.from(sc.childNodes[so]).map(SugarElement.fromDom);
  101207. }
  101208. };
  101209. var getEndNode = function (rng) {
  101210. var ec = rng.endContainer, eo = rng.endOffset;
  101211. if (isText$7(ec)) {
  101212. return eo === ec.data.length ? Optional.some(SugarElement.fromDom(ec)) : Optional.none();
  101213. } else {
  101214. return Optional.from(ec.childNodes[eo - 1]).map(SugarElement.fromDom);
  101215. }
  101216. };
  101217. var getFirstChildren = function (node) {
  101218. return firstChild(node).fold(constant([node]), function (child) {
  101219. return [node].concat(getFirstChildren(child));
  101220. });
  101221. };
  101222. var getLastChildren$1 = function (node) {
  101223. return lastChild(node).fold(constant([node]), function (child) {
  101224. if (name(child) === 'br') {
  101225. return prevSibling(child).map(function (sibling) {
  101226. return [node].concat(getLastChildren$1(sibling));
  101227. }).getOr([]);
  101228. } else {
  101229. return [node].concat(getLastChildren$1(child));
  101230. }
  101231. });
  101232. };
  101233. var hasAllContentsSelected = function (elm, rng) {
  101234. return lift2(getStartNode(rng), getEndNode(rng), function (startNode, endNode) {
  101235. var start = find$3(getFirstChildren(elm), curry(eq, startNode));
  101236. var end = find$3(getLastChildren$1(elm), curry(eq, endNode));
  101237. return start.isSome() && end.isSome();
  101238. }).getOr(false);
  101239. };
  101240. var moveEndPoint = function (dom, rng, node, start) {
  101241. var root = node, walker = new DomTreeWalker(node, root);
  101242. var moveCaretBeforeOnEnterElementsMap = filter$3(dom.schema.getMoveCaretBeforeOnEnterElements(), function (_, name) {
  101243. return !contains$3([
  101244. 'td',
  101245. 'th',
  101246. 'table'
  101247. ], name.toLowerCase());
  101248. });
  101249. do {
  101250. if (isText$7(node) && Tools.trim(node.nodeValue).length !== 0) {
  101251. if (start) {
  101252. rng.setStart(node, 0);
  101253. } else {
  101254. rng.setEnd(node, node.nodeValue.length);
  101255. }
  101256. return;
  101257. }
  101258. if (moveCaretBeforeOnEnterElementsMap[node.nodeName]) {
  101259. if (start) {
  101260. rng.setStartBefore(node);
  101261. } else {
  101262. if (node.nodeName === 'BR') {
  101263. rng.setEndBefore(node);
  101264. } else {
  101265. rng.setEndAfter(node);
  101266. }
  101267. }
  101268. return;
  101269. }
  101270. } while (node = start ? walker.next() : walker.prev());
  101271. if (root.nodeName === 'BODY') {
  101272. if (start) {
  101273. rng.setStart(root, 0);
  101274. } else {
  101275. rng.setEnd(root, root.childNodes.length);
  101276. }
  101277. }
  101278. };
  101279. var hasAnyRanges = function (editor) {
  101280. var sel = editor.selection.getSel();
  101281. return sel && sel.rangeCount > 0;
  101282. };
  101283. var runOnRanges = function (editor, executor) {
  101284. var fakeSelectionNodes = getCellsFromEditor(editor);
  101285. if (fakeSelectionNodes.length > 0) {
  101286. each$k(fakeSelectionNodes, function (elem) {
  101287. var node = elem.dom;
  101288. var fakeNodeRng = editor.dom.createRng();
  101289. fakeNodeRng.setStartBefore(node);
  101290. fakeNodeRng.setEndAfter(node);
  101291. executor(fakeNodeRng, true);
  101292. });
  101293. } else {
  101294. executor(editor.selection.getRng(), false);
  101295. }
  101296. };
  101297. var preserve = function (selection, fillBookmark, executor) {
  101298. var bookmark = getPersistentBookmark(selection, fillBookmark);
  101299. executor(bookmark);
  101300. selection.moveToBookmark(bookmark);
  101301. };
  101302. var NodeValue = function (is, name) {
  101303. var get = function (element) {
  101304. if (!is(element)) {
  101305. throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
  101306. }
  101307. return getOption(element).getOr('');
  101308. };
  101309. var getOption = function (element) {
  101310. return is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();
  101311. };
  101312. var set = function (element, value) {
  101313. if (!is(element)) {
  101314. throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
  101315. }
  101316. element.dom.nodeValue = value;
  101317. };
  101318. return {
  101319. get: get,
  101320. getOption: getOption,
  101321. set: set
  101322. };
  101323. };
  101324. var api$1 = NodeValue(isText$8, 'text');
  101325. var get$2 = function (element) {
  101326. return api$1.get(element);
  101327. };
  101328. var isZeroWidth = function (elem) {
  101329. return isText$8(elem) && get$2(elem) === ZWSP$1;
  101330. };
  101331. var context = function (editor, elem, wrapName, nodeName) {
  101332. return parent(elem).fold(function () {
  101333. return 'skipping';
  101334. }, function (parent) {
  101335. if (nodeName === 'br' || isZeroWidth(elem)) {
  101336. return 'valid';
  101337. } else if (isAnnotation(elem)) {
  101338. return 'existing';
  101339. } else if (isCaretNode(elem.dom)) {
  101340. return 'caret';
  101341. } else if (!isValid(editor, wrapName, nodeName) || !isValid(editor, name(parent), wrapName)) {
  101342. return 'invalid-child';
  101343. } else {
  101344. return 'valid';
  101345. }
  101346. });
  101347. };
  101348. var applyWordGrab = function (editor, rng) {
  101349. var r = expandRng(editor, rng, [{ inline: 'span' }]);
  101350. rng.setStart(r.startContainer, r.startOffset);
  101351. rng.setEnd(r.endContainer, r.endOffset);
  101352. editor.selection.setRng(rng);
  101353. };
  101354. var makeAnnotation = function (eDoc, _a, annotationName, decorate) {
  101355. var _b = _a.uid, uid = _b === void 0 ? generate('mce-annotation') : _b, data = __rest(_a, ['uid']);
  101356. var master = SugarElement.fromTag('span', eDoc);
  101357. add$1(master, annotation());
  101358. set$1(master, '' + dataAnnotationId(), uid);
  101359. set$1(master, '' + dataAnnotation(), annotationName);
  101360. var _c = decorate(uid, data), _d = _c.attributes, attributes = _d === void 0 ? {} : _d, _e = _c.classes, classes = _e === void 0 ? [] : _e;
  101361. setAll$1(master, attributes);
  101362. add(master, classes);
  101363. return master;
  101364. };
  101365. var annotate = function (editor, rng, annotationName, decorate, data) {
  101366. var newWrappers = [];
  101367. var master = makeAnnotation(editor.getDoc(), data, annotationName, decorate);
  101368. var wrapper = value();
  101369. var finishWrapper = function () {
  101370. wrapper.clear();
  101371. };
  101372. var getOrOpenWrapper = function () {
  101373. return wrapper.get().getOrThunk(function () {
  101374. var nu = shallow(master);
  101375. newWrappers.push(nu);
  101376. wrapper.set(nu);
  101377. return nu;
  101378. });
  101379. };
  101380. var processElements = function (elems) {
  101381. each$k(elems, processElement);
  101382. };
  101383. var processElement = function (elem) {
  101384. var ctx = context(editor, elem, 'span', name(elem));
  101385. switch (ctx) {
  101386. case 'invalid-child': {
  101387. finishWrapper();
  101388. var children$1 = children(elem);
  101389. processElements(children$1);
  101390. finishWrapper();
  101391. break;
  101392. }
  101393. case 'valid': {
  101394. var w = getOrOpenWrapper();
  101395. wrap$3(elem, w);
  101396. break;
  101397. }
  101398. }
  101399. };
  101400. var processNodes = function (nodes) {
  101401. var elems = map$3(nodes, SugarElement.fromDom);
  101402. processElements(elems);
  101403. };
  101404. walk$2(editor.dom, rng, function (nodes) {
  101405. finishWrapper();
  101406. processNodes(nodes);
  101407. });
  101408. return newWrappers;
  101409. };
  101410. var annotateWithBookmark = function (editor, name, settings, data) {
  101411. editor.undoManager.transact(function () {
  101412. var selection = editor.selection;
  101413. var initialRng = selection.getRng();
  101414. var hasFakeSelection = getCellsFromEditor(editor).length > 0;
  101415. if (initialRng.collapsed && !hasFakeSelection) {
  101416. applyWordGrab(editor, initialRng);
  101417. }
  101418. if (selection.getRng().collapsed && !hasFakeSelection) {
  101419. var wrapper = makeAnnotation(editor.getDoc(), data, name, settings.decorate);
  101420. set(wrapper, nbsp);
  101421. selection.getRng().insertNode(wrapper.dom);
  101422. selection.select(wrapper.dom);
  101423. } else {
  101424. preserve(selection, false, function () {
  101425. runOnRanges(editor, function (selectionRng) {
  101426. annotate(editor, selectionRng, name, settings.decorate, data);
  101427. });
  101428. });
  101429. }
  101430. });
  101431. };
  101432. var Annotator = function (editor) {
  101433. var registry = create$7();
  101434. setup$m(editor, registry);
  101435. var changes = setup$n(editor);
  101436. return {
  101437. register: function (name, settings) {
  101438. registry.register(name, settings);
  101439. },
  101440. annotate: function (name, data) {
  101441. registry.lookup(name).each(function (settings) {
  101442. annotateWithBookmark(editor, name, settings, data);
  101443. });
  101444. },
  101445. annotationChanged: function (name, callback) {
  101446. changes.addListener(name, callback);
  101447. },
  101448. remove: function (name) {
  101449. identify(editor, Optional.some(name)).each(function (_a) {
  101450. var elements = _a.elements;
  101451. each$k(elements, unwrap);
  101452. });
  101453. },
  101454. getAll: function (name) {
  101455. var directory = findAll(editor, name);
  101456. return map$2(directory, function (elems) {
  101457. return map$3(elems, function (elem) {
  101458. return elem.dom;
  101459. });
  101460. });
  101461. }
  101462. };
  101463. };
  101464. var BookmarkManager = function (selection) {
  101465. return {
  101466. getBookmark: curry(getBookmark$1, selection),
  101467. moveToBookmark: curry(moveToBookmark, selection)
  101468. };
  101469. };
  101470. BookmarkManager.isBookmarkNode = isBookmarkNode$1;
  101471. var getContentEditableRoot$1 = function (root, node) {
  101472. while (node && node !== root) {
  101473. if (isContentEditableTrue$4(node) || isContentEditableFalse$b(node)) {
  101474. return node;
  101475. }
  101476. node = node.parentNode;
  101477. }
  101478. return null;
  101479. };
  101480. var isXYWithinRange = function (clientX, clientY, range) {
  101481. if (range.collapsed) {
  101482. return false;
  101483. }
  101484. if (Env.browser.isIE() && range.startOffset === range.endOffset - 1 && range.startContainer === range.endContainer) {
  101485. var elm = range.startContainer.childNodes[range.startOffset];
  101486. if (isElement$5(elm)) {
  101487. return exists(elm.getClientRects(), function (rect) {
  101488. return containsXY(rect, clientX, clientY);
  101489. });
  101490. }
  101491. }
  101492. return exists(range.getClientRects(), function (rect) {
  101493. return containsXY(rect, clientX, clientY);
  101494. });
  101495. };
  101496. var firePreProcess = function (editor, args) {
  101497. return editor.fire('PreProcess', args);
  101498. };
  101499. var firePostProcess = function (editor, args) {
  101500. return editor.fire('PostProcess', args);
  101501. };
  101502. var fireRemove = function (editor) {
  101503. return editor.fire('remove');
  101504. };
  101505. var fireDetach = function (editor) {
  101506. return editor.fire('detach');
  101507. };
  101508. var fireSwitchMode = function (editor, mode) {
  101509. return editor.fire('SwitchMode', { mode: mode });
  101510. };
  101511. var fireObjectResizeStart = function (editor, target, width, height, origin) {
  101512. editor.fire('ObjectResizeStart', {
  101513. target: target,
  101514. width: width,
  101515. height: height,
  101516. origin: origin
  101517. });
  101518. };
  101519. var fireObjectResized = function (editor, target, width, height, origin) {
  101520. editor.fire('ObjectResized', {
  101521. target: target,
  101522. width: width,
  101523. height: height,
  101524. origin: origin
  101525. });
  101526. };
  101527. var firePreInit = function (editor) {
  101528. return editor.fire('PreInit');
  101529. };
  101530. var firePostRender = function (editor) {
  101531. return editor.fire('PostRender');
  101532. };
  101533. var fireInit = function (editor) {
  101534. return editor.fire('Init');
  101535. };
  101536. var firePlaceholderToggle = function (editor, state) {
  101537. return editor.fire('PlaceholderToggle', { state: state });
  101538. };
  101539. var fireError = function (editor, errorType, error) {
  101540. return editor.fire(errorType, error);
  101541. };
  101542. var fireFormatApply = function (editor, format, node, vars) {
  101543. return editor.fire('FormatApply', {
  101544. format: format,
  101545. node: node,
  101546. vars: vars
  101547. });
  101548. };
  101549. var fireFormatRemove = function (editor, format, node, vars) {
  101550. return editor.fire('FormatRemove', {
  101551. format: format,
  101552. node: node,
  101553. vars: vars
  101554. });
  101555. };
  101556. var VK = {
  101557. BACKSPACE: 8,
  101558. DELETE: 46,
  101559. DOWN: 40,
  101560. ENTER: 13,
  101561. ESC: 27,
  101562. LEFT: 37,
  101563. RIGHT: 39,
  101564. SPACEBAR: 32,
  101565. TAB: 9,
  101566. UP: 38,
  101567. PAGE_UP: 33,
  101568. PAGE_DOWN: 34,
  101569. END: 35,
  101570. HOME: 36,
  101571. modifierPressed: function (e) {
  101572. return e.shiftKey || e.ctrlKey || e.altKey || VK.metaKeyPressed(e);
  101573. },
  101574. metaKeyPressed: function (e) {
  101575. return Env.mac ? e.metaKey : e.ctrlKey && !e.altKey;
  101576. }
  101577. };
  101578. var isContentEditableFalse$5 = isContentEditableFalse$b;
  101579. var ControlSelection = function (selection, editor) {
  101580. var elementSelectionAttr = 'data-mce-selected';
  101581. var dom = editor.dom, each = Tools.each;
  101582. var selectedElm, selectedElmGhost, resizeHelper, selectedHandle, resizeBackdrop;
  101583. var startX, startY, selectedElmX, selectedElmY, startW, startH, ratio, resizeStarted;
  101584. var width, height;
  101585. var editableDoc = editor.getDoc(), rootDocument = document;
  101586. var abs = Math.abs, round = Math.round, rootElement = editor.getBody();
  101587. var startScrollWidth, startScrollHeight;
  101588. var resizeHandles = {
  101589. nw: [
  101590. 0,
  101591. 0,
  101592. -1,
  101593. -1
  101594. ],
  101595. ne: [
  101596. 1,
  101597. 0,
  101598. 1,
  101599. -1
  101600. ],
  101601. se: [
  101602. 1,
  101603. 1,
  101604. 1,
  101605. 1
  101606. ],
  101607. sw: [
  101608. 0,
  101609. 1,
  101610. -1,
  101611. 1
  101612. ]
  101613. };
  101614. var isImage = function (elm) {
  101615. return elm && (elm.nodeName === 'IMG' || editor.dom.is(elm, 'figure.image'));
  101616. };
  101617. var isMedia = function (elm) {
  101618. return isMedia$2(elm) || dom.hasClass(elm, 'mce-preview-object');
  101619. };
  101620. var isEventOnImageOutsideRange = function (evt, range) {
  101621. if (evt.type === 'longpress' || evt.type.indexOf('touch') === 0) {
  101622. var touch = evt.touches[0];
  101623. return isImage(evt.target) && !isXYWithinRange(touch.clientX, touch.clientY, range);
  101624. } else {
  101625. return isImage(evt.target) && !isXYWithinRange(evt.clientX, evt.clientY, range);
  101626. }
  101627. };
  101628. var contextMenuSelectImage = function (evt) {
  101629. var target = evt.target;
  101630. if (isEventOnImageOutsideRange(evt, editor.selection.getRng()) && !evt.isDefaultPrevented()) {
  101631. editor.selection.select(target);
  101632. }
  101633. };
  101634. var getResizeTargets = function (elm) {
  101635. if (dom.is(elm, 'figure.image')) {
  101636. return [elm.querySelector('img')];
  101637. } else if (dom.hasClass(elm, 'mce-preview-object') && isNonNullable(elm.firstElementChild)) {
  101638. return [
  101639. elm,
  101640. elm.firstElementChild
  101641. ];
  101642. } else {
  101643. return [elm];
  101644. }
  101645. };
  101646. var isResizable = function (elm) {
  101647. var selector = getObjectResizing(editor);
  101648. if (!selector) {
  101649. return false;
  101650. }
  101651. if (elm.getAttribute('data-mce-resize') === 'false') {
  101652. return false;
  101653. }
  101654. if (elm === editor.getBody()) {
  101655. return false;
  101656. }
  101657. if (dom.hasClass(elm, 'mce-preview-object')) {
  101658. return is$2(SugarElement.fromDom(elm.firstElementChild), selector);
  101659. } else {
  101660. return is$2(SugarElement.fromDom(elm), selector);
  101661. }
  101662. };
  101663. var createGhostElement = function (elm) {
  101664. if (isMedia(elm)) {
  101665. return dom.create('img', { src: Env.transparentSrc });
  101666. } else {
  101667. return elm.cloneNode(true);
  101668. }
  101669. };
  101670. var setSizeProp = function (element, name, value) {
  101671. if (isNonNullable(value)) {
  101672. var targets = getResizeTargets(element);
  101673. each$k(targets, function (target) {
  101674. if (target.style[name] || !editor.schema.isValid(target.nodeName.toLowerCase(), name)) {
  101675. dom.setStyle(target, name, value);
  101676. } else {
  101677. dom.setAttrib(target, name, '' + value);
  101678. }
  101679. });
  101680. }
  101681. };
  101682. var setGhostElmSize = function (ghostElm, width, height) {
  101683. setSizeProp(ghostElm, 'width', width);
  101684. setSizeProp(ghostElm, 'height', height);
  101685. };
  101686. var resizeGhostElement = function (e) {
  101687. var deltaX, deltaY, proportional;
  101688. var resizeHelperX, resizeHelperY;
  101689. deltaX = e.screenX - startX;
  101690. deltaY = e.screenY - startY;
  101691. width = deltaX * selectedHandle[2] + startW;
  101692. height = deltaY * selectedHandle[3] + startH;
  101693. width = width < 5 ? 5 : width;
  101694. height = height < 5 ? 5 : height;
  101695. if ((isImage(selectedElm) || isMedia(selectedElm)) && getResizeImgProportional(editor) !== false) {
  101696. proportional = !VK.modifierPressed(e);
  101697. } else {
  101698. proportional = VK.modifierPressed(e);
  101699. }
  101700. if (proportional) {
  101701. if (abs(deltaX) > abs(deltaY)) {
  101702. height = round(width * ratio);
  101703. width = round(height / ratio);
  101704. } else {
  101705. width = round(height / ratio);
  101706. height = round(width * ratio);
  101707. }
  101708. }
  101709. setGhostElmSize(selectedElmGhost, width, height);
  101710. resizeHelperX = selectedHandle.startPos.x + deltaX;
  101711. resizeHelperY = selectedHandle.startPos.y + deltaY;
  101712. resizeHelperX = resizeHelperX > 0 ? resizeHelperX : 0;
  101713. resizeHelperY = resizeHelperY > 0 ? resizeHelperY : 0;
  101714. dom.setStyles(resizeHelper, {
  101715. left: resizeHelperX,
  101716. top: resizeHelperY,
  101717. display: 'block'
  101718. });
  101719. resizeHelper.innerHTML = width + ' &times; ' + height;
  101720. if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {
  101721. dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));
  101722. }
  101723. if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {
  101724. dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));
  101725. }
  101726. deltaX = rootElement.scrollWidth - startScrollWidth;
  101727. deltaY = rootElement.scrollHeight - startScrollHeight;
  101728. if (deltaX + deltaY !== 0) {
  101729. dom.setStyles(resizeHelper, {
  101730. left: resizeHelperX - deltaX,
  101731. top: resizeHelperY - deltaY
  101732. });
  101733. }
  101734. if (!resizeStarted) {
  101735. fireObjectResizeStart(editor, selectedElm, startW, startH, 'corner-' + selectedHandle.name);
  101736. resizeStarted = true;
  101737. }
  101738. };
  101739. var endGhostResize = function () {
  101740. var wasResizeStarted = resizeStarted;
  101741. resizeStarted = false;
  101742. if (wasResizeStarted) {
  101743. setSizeProp(selectedElm, 'width', width);
  101744. setSizeProp(selectedElm, 'height', height);
  101745. }
  101746. dom.unbind(editableDoc, 'mousemove', resizeGhostElement);
  101747. dom.unbind(editableDoc, 'mouseup', endGhostResize);
  101748. if (rootDocument !== editableDoc) {
  101749. dom.unbind(rootDocument, 'mousemove', resizeGhostElement);
  101750. dom.unbind(rootDocument, 'mouseup', endGhostResize);
  101751. }
  101752. dom.remove(selectedElmGhost);
  101753. dom.remove(resizeHelper);
  101754. dom.remove(resizeBackdrop);
  101755. showResizeRect(selectedElm);
  101756. if (wasResizeStarted) {
  101757. fireObjectResized(editor, selectedElm, width, height, 'corner-' + selectedHandle.name);
  101758. dom.setAttrib(selectedElm, 'style', dom.getAttrib(selectedElm, 'style'));
  101759. }
  101760. editor.nodeChanged();
  101761. };
  101762. var showResizeRect = function (targetElm) {
  101763. unbindResizeHandleEvents();
  101764. var position = dom.getPos(targetElm, rootElement);
  101765. var selectedElmX = position.x;
  101766. var selectedElmY = position.y;
  101767. var rect = targetElm.getBoundingClientRect();
  101768. var targetWidth = rect.width || rect.right - rect.left;
  101769. var targetHeight = rect.height || rect.bottom - rect.top;
  101770. if (selectedElm !== targetElm) {
  101771. hideResizeRect();
  101772. selectedElm = targetElm;
  101773. width = height = 0;
  101774. }
  101775. var e = editor.fire('ObjectSelected', { target: targetElm });
  101776. var selectedValue = dom.getAttrib(selectedElm, elementSelectionAttr, '1');
  101777. if (isResizable(targetElm) && !e.isDefaultPrevented()) {
  101778. each(resizeHandles, function (handle, name) {
  101779. var handleElm;
  101780. var startDrag = function (e) {
  101781. var target = getResizeTargets(selectedElm)[0];
  101782. startX = e.screenX;
  101783. startY = e.screenY;
  101784. startW = target.clientWidth;
  101785. startH = target.clientHeight;
  101786. ratio = startH / startW;
  101787. selectedHandle = handle;
  101788. selectedHandle.name = name;
  101789. selectedHandle.startPos = {
  101790. x: targetWidth * handle[0] + selectedElmX,
  101791. y: targetHeight * handle[1] + selectedElmY
  101792. };
  101793. startScrollWidth = rootElement.scrollWidth;
  101794. startScrollHeight = rootElement.scrollHeight;
  101795. resizeBackdrop = dom.add(rootElement, 'div', {
  101796. 'class': 'mce-resize-backdrop',
  101797. 'data-mce-bogus': 'all'
  101798. });
  101799. dom.setStyles(resizeBackdrop, {
  101800. position: 'fixed',
  101801. left: '0',
  101802. top: '0',
  101803. width: '100%',
  101804. height: '100%'
  101805. });
  101806. selectedElmGhost = createGhostElement(selectedElm);
  101807. dom.addClass(selectedElmGhost, 'mce-clonedresizable');
  101808. dom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all');
  101809. selectedElmGhost.contentEditable = 'false';
  101810. dom.setStyles(selectedElmGhost, {
  101811. left: selectedElmX,
  101812. top: selectedElmY,
  101813. margin: 0
  101814. });
  101815. setGhostElmSize(selectedElmGhost, targetWidth, targetHeight);
  101816. selectedElmGhost.removeAttribute(elementSelectionAttr);
  101817. rootElement.appendChild(selectedElmGhost);
  101818. dom.bind(editableDoc, 'mousemove', resizeGhostElement);
  101819. dom.bind(editableDoc, 'mouseup', endGhostResize);
  101820. if (rootDocument !== editableDoc) {
  101821. dom.bind(rootDocument, 'mousemove', resizeGhostElement);
  101822. dom.bind(rootDocument, 'mouseup', endGhostResize);
  101823. }
  101824. resizeHelper = dom.add(rootElement, 'div', {
  101825. 'class': 'mce-resize-helper',
  101826. 'data-mce-bogus': 'all'
  101827. }, startW + ' &times; ' + startH);
  101828. };
  101829. handleElm = dom.get('mceResizeHandle' + name);
  101830. if (handleElm) {
  101831. dom.remove(handleElm);
  101832. }
  101833. handleElm = dom.add(rootElement, 'div', {
  101834. 'id': 'mceResizeHandle' + name,
  101835. 'data-mce-bogus': 'all',
  101836. 'class': 'mce-resizehandle',
  101837. 'unselectable': true,
  101838. 'style': 'cursor:' + name + '-resize; margin:0; padding:0'
  101839. });
  101840. if (Env.ie === 11) {
  101841. handleElm.contentEditable = false;
  101842. }
  101843. dom.bind(handleElm, 'mousedown', function (e) {
  101844. e.stopImmediatePropagation();
  101845. e.preventDefault();
  101846. startDrag(e);
  101847. });
  101848. handle.elm = handleElm;
  101849. dom.setStyles(handleElm, {
  101850. left: targetWidth * handle[0] + selectedElmX - handleElm.offsetWidth / 2,
  101851. top: targetHeight * handle[1] + selectedElmY - handleElm.offsetHeight / 2
  101852. });
  101853. });
  101854. } else {
  101855. hideResizeRect();
  101856. }
  101857. if (!dom.getAttrib(selectedElm, elementSelectionAttr)) {
  101858. selectedElm.setAttribute(elementSelectionAttr, selectedValue);
  101859. }
  101860. };
  101861. var hideResizeRect = function () {
  101862. unbindResizeHandleEvents();
  101863. if (selectedElm) {
  101864. selectedElm.removeAttribute(elementSelectionAttr);
  101865. }
  101866. each$j(resizeHandles, function (value, name) {
  101867. var handleElm = dom.get('mceResizeHandle' + name);
  101868. if (handleElm) {
  101869. dom.unbind(handleElm);
  101870. dom.remove(handleElm);
  101871. }
  101872. });
  101873. };
  101874. var updateResizeRect = function (e) {
  101875. var startElm, controlElm;
  101876. var isChildOrEqual = function (node, parent) {
  101877. if (node) {
  101878. do {
  101879. if (node === parent) {
  101880. return true;
  101881. }
  101882. } while (node = node.parentNode);
  101883. }
  101884. };
  101885. if (resizeStarted || editor.removed) {
  101886. return;
  101887. }
  101888. each(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function (img) {
  101889. img.removeAttribute(elementSelectionAttr);
  101890. });
  101891. controlElm = e.type === 'mousedown' ? e.target : selection.getNode();
  101892. controlElm = dom.$(controlElm).closest('table,img,figure.image,hr,video,span.mce-preview-object')[0];
  101893. if (isChildOrEqual(controlElm, rootElement)) {
  101894. disableGeckoResize();
  101895. startElm = selection.getStart(true);
  101896. if (isChildOrEqual(startElm, controlElm) && isChildOrEqual(selection.getEnd(true), controlElm)) {
  101897. showResizeRect(controlElm);
  101898. return;
  101899. }
  101900. }
  101901. hideResizeRect();
  101902. };
  101903. var isWithinContentEditableFalse = function (elm) {
  101904. return isContentEditableFalse$5(getContentEditableRoot$1(editor.getBody(), elm));
  101905. };
  101906. var unbindResizeHandleEvents = function () {
  101907. each$j(resizeHandles, function (handle) {
  101908. if (handle.elm) {
  101909. dom.unbind(handle.elm);
  101910. delete handle.elm;
  101911. }
  101912. });
  101913. };
  101914. var disableGeckoResize = function () {
  101915. try {
  101916. editor.getDoc().execCommand('enableObjectResizing', false, 'false');
  101917. } catch (ex) {
  101918. }
  101919. };
  101920. editor.on('init', function () {
  101921. disableGeckoResize();
  101922. if (Env.browser.isIE() || Env.browser.isEdge()) {
  101923. editor.on('mousedown click', function (e) {
  101924. var target = e.target, nodeName = target.nodeName;
  101925. if (!resizeStarted && /^(TABLE|IMG|HR)$/.test(nodeName) && !isWithinContentEditableFalse(target)) {
  101926. if (e.button !== 2) {
  101927. editor.selection.select(target, nodeName === 'TABLE');
  101928. }
  101929. if (e.type === 'mousedown') {
  101930. editor.nodeChanged();
  101931. }
  101932. }
  101933. });
  101934. var handleMSControlSelect_1 = function (e) {
  101935. var delayedSelect = function (node) {
  101936. Delay.setEditorTimeout(editor, function () {
  101937. return editor.selection.select(node);
  101938. });
  101939. };
  101940. if (isWithinContentEditableFalse(e.target) || isMedia$2(e.target)) {
  101941. e.preventDefault();
  101942. delayedSelect(e.target);
  101943. return;
  101944. }
  101945. if (/^(TABLE|IMG|HR)$/.test(e.target.nodeName)) {
  101946. e.preventDefault();
  101947. if (e.target.tagName === 'IMG') {
  101948. delayedSelect(e.target);
  101949. }
  101950. }
  101951. };
  101952. dom.bind(rootElement, 'mscontrolselect', handleMSControlSelect_1);
  101953. editor.on('remove', function () {
  101954. return dom.unbind(rootElement, 'mscontrolselect', handleMSControlSelect_1);
  101955. });
  101956. }
  101957. var throttledUpdateResizeRect = Delay.throttle(function (e) {
  101958. if (!editor.composing) {
  101959. updateResizeRect(e);
  101960. }
  101961. });
  101962. editor.on('nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged', throttledUpdateResizeRect);
  101963. editor.on('keyup compositionend', function (e) {
  101964. if (selectedElm && selectedElm.nodeName === 'TABLE') {
  101965. throttledUpdateResizeRect(e);
  101966. }
  101967. });
  101968. editor.on('hide blur', hideResizeRect);
  101969. editor.on('contextmenu longpress', contextMenuSelectImage, true);
  101970. });
  101971. editor.on('remove', unbindResizeHandleEvents);
  101972. var destroy = function () {
  101973. selectedElm = selectedElmGhost = resizeBackdrop = null;
  101974. };
  101975. return {
  101976. isResizable: isResizable,
  101977. showResizeRect: showResizeRect,
  101978. hideResizeRect: hideResizeRect,
  101979. updateResizeRect: updateResizeRect,
  101980. destroy: destroy
  101981. };
  101982. };
  101983. var hasCeProperty = function (node) {
  101984. return isContentEditableTrue$4(node) || isContentEditableFalse$b(node);
  101985. };
  101986. var findParent$1 = function (node, rootNode, predicate) {
  101987. while (node && node !== rootNode) {
  101988. if (predicate(node)) {
  101989. return node;
  101990. }
  101991. node = node.parentNode;
  101992. }
  101993. return null;
  101994. };
  101995. var findClosestIeRange = function (clientX, clientY, doc) {
  101996. var rects;
  101997. var element = doc.elementFromPoint(clientX, clientY);
  101998. var rng = doc.body.createTextRange();
  101999. if (!element || element.tagName === 'HTML') {
  102000. element = doc.body;
  102001. }
  102002. rng.moveToElementText(element);
  102003. rects = Tools.toArray(rng.getClientRects());
  102004. rects = rects.sort(function (a, b) {
  102005. a = Math.abs(Math.max(a.top - clientY, a.bottom - clientY));
  102006. b = Math.abs(Math.max(b.top - clientY, b.bottom - clientY));
  102007. return a - b;
  102008. });
  102009. if (rects.length > 0) {
  102010. clientY = (rects[0].bottom + rects[0].top) / 2;
  102011. try {
  102012. rng.moveToPoint(clientX, clientY);
  102013. rng.collapse(true);
  102014. return rng;
  102015. } catch (ex) {
  102016. }
  102017. }
  102018. return null;
  102019. };
  102020. var moveOutOfContentEditableFalse = function (rng, rootNode) {
  102021. var parentElement = rng && rng.parentElement ? rng.parentElement() : null;
  102022. return isContentEditableFalse$b(findParent$1(parentElement, rootNode, hasCeProperty)) ? null : rng;
  102023. };
  102024. var fromPoint = function (clientX, clientY, doc) {
  102025. var rng, point;
  102026. var pointDoc = doc;
  102027. if (pointDoc.caretPositionFromPoint) {
  102028. point = pointDoc.caretPositionFromPoint(clientX, clientY);
  102029. if (point) {
  102030. rng = doc.createRange();
  102031. rng.setStart(point.offsetNode, point.offset);
  102032. rng.collapse(true);
  102033. }
  102034. } else if (pointDoc.caretRangeFromPoint) {
  102035. rng = pointDoc.caretRangeFromPoint(clientX, clientY);
  102036. } else if (pointDoc.body.createTextRange) {
  102037. rng = pointDoc.body.createTextRange();
  102038. try {
  102039. rng.moveToPoint(clientX, clientY);
  102040. rng.collapse(true);
  102041. } catch (ex) {
  102042. rng = findClosestIeRange(clientX, clientY, doc);
  102043. }
  102044. return moveOutOfContentEditableFalse(rng, doc.body);
  102045. }
  102046. return rng;
  102047. };
  102048. var isEq$4 = function (rng1, rng2) {
  102049. return rng1 && rng2 && (rng1.startContainer === rng2.startContainer && rng1.startOffset === rng2.startOffset) && (rng1.endContainer === rng2.endContainer && rng1.endOffset === rng2.endOffset);
  102050. };
  102051. var findParent = function (node, rootNode, predicate) {
  102052. while (node && node !== rootNode) {
  102053. if (predicate(node)) {
  102054. return node;
  102055. }
  102056. node = node.parentNode;
  102057. }
  102058. return null;
  102059. };
  102060. var hasParent$1 = function (node, rootNode, predicate) {
  102061. return findParent(node, rootNode, predicate) !== null;
  102062. };
  102063. var hasParentWithName = function (node, rootNode, name) {
  102064. return hasParent$1(node, rootNode, function (node) {
  102065. return node.nodeName === name;
  102066. });
  102067. };
  102068. var isTable = function (node) {
  102069. return node && node.nodeName === 'TABLE';
  102070. };
  102071. var isTableCell$2 = function (node) {
  102072. return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
  102073. };
  102074. var isCeFalseCaretContainer = function (node, rootNode) {
  102075. return isCaretContainer$2(node) && hasParent$1(node, rootNode, isCaretNode) === false;
  102076. };
  102077. var hasBrBeforeAfter = function (dom, node, left) {
  102078. var walker = new DomTreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || dom.getRoot());
  102079. while (node = walker[left ? 'prev' : 'next']()) {
  102080. if (isBr$5(node)) {
  102081. return true;
  102082. }
  102083. }
  102084. };
  102085. var isPrevNode = function (node, name) {
  102086. return node.previousSibling && node.previousSibling.nodeName === name;
  102087. };
  102088. var hasContentEditableFalseParent = function (body, node) {
  102089. while (node && node !== body) {
  102090. if (isContentEditableFalse$b(node)) {
  102091. return true;
  102092. }
  102093. node = node.parentNode;
  102094. }
  102095. return false;
  102096. };
  102097. var findTextNodeRelative = function (dom, isAfterNode, collapsed, left, startNode) {
  102098. var lastInlineElement;
  102099. var body = dom.getRoot();
  102100. var node;
  102101. var nonEmptyElementsMap = dom.schema.getNonEmptyElements();
  102102. var parentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body;
  102103. if (left && isBr$5(startNode) && isAfterNode && dom.isEmpty(parentBlockContainer)) {
  102104. return Optional.some(CaretPosition(startNode.parentNode, dom.nodeIndex(startNode)));
  102105. }
  102106. var walker = new DomTreeWalker(startNode, parentBlockContainer);
  102107. while (node = walker[left ? 'prev' : 'next']()) {
  102108. if (dom.getContentEditableParent(node) === 'false' || isCeFalseCaretContainer(node, body)) {
  102109. return Optional.none();
  102110. }
  102111. if (isText$7(node) && node.nodeValue.length > 0) {
  102112. if (hasParentWithName(node, body, 'A') === false) {
  102113. return Optional.some(CaretPosition(node, left ? node.nodeValue.length : 0));
  102114. }
  102115. return Optional.none();
  102116. }
  102117. if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
  102118. return Optional.none();
  102119. }
  102120. lastInlineElement = node;
  102121. }
  102122. if (collapsed && lastInlineElement) {
  102123. return Optional.some(CaretPosition(lastInlineElement, 0));
  102124. }
  102125. return Optional.none();
  102126. };
  102127. var normalizeEndPoint = function (dom, collapsed, start, rng) {
  102128. var container, offset;
  102129. var body = dom.getRoot();
  102130. var node;
  102131. var directionLeft, normalized = false;
  102132. container = rng[(start ? 'start' : 'end') + 'Container'];
  102133. offset = rng[(start ? 'start' : 'end') + 'Offset'];
  102134. var isAfterNode = isElement$5(container) && offset === container.childNodes.length;
  102135. var nonEmptyElementsMap = dom.schema.getNonEmptyElements();
  102136. directionLeft = start;
  102137. if (isCaretContainer$2(container)) {
  102138. return Optional.none();
  102139. }
  102140. if (isElement$5(container) && offset > container.childNodes.length - 1) {
  102141. directionLeft = false;
  102142. }
  102143. if (isDocument$1(container)) {
  102144. container = body;
  102145. offset = 0;
  102146. }
  102147. if (container === body) {
  102148. if (directionLeft) {
  102149. node = container.childNodes[offset > 0 ? offset - 1 : 0];
  102150. if (node) {
  102151. if (isCaretContainer$2(node)) {
  102152. return Optional.none();
  102153. }
  102154. if (nonEmptyElementsMap[node.nodeName] || isTable(node)) {
  102155. return Optional.none();
  102156. }
  102157. }
  102158. }
  102159. if (container.hasChildNodes()) {
  102160. offset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1);
  102161. container = container.childNodes[offset];
  102162. offset = isText$7(container) && isAfterNode ? container.data.length : 0;
  102163. if (!collapsed && container === body.lastChild && isTable(container)) {
  102164. return Optional.none();
  102165. }
  102166. if (hasContentEditableFalseParent(body, container) || isCaretContainer$2(container)) {
  102167. return Optional.none();
  102168. }
  102169. if (container.hasChildNodes() && isTable(container) === false) {
  102170. node = container;
  102171. var walker = new DomTreeWalker(container, body);
  102172. do {
  102173. if (isContentEditableFalse$b(node) || isCaretContainer$2(node)) {
  102174. normalized = false;
  102175. break;
  102176. }
  102177. if (isText$7(node) && node.nodeValue.length > 0) {
  102178. offset = directionLeft ? 0 : node.nodeValue.length;
  102179. container = node;
  102180. normalized = true;
  102181. break;
  102182. }
  102183. if (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !isTableCell$2(node)) {
  102184. offset = dom.nodeIndex(node);
  102185. container = node.parentNode;
  102186. if (!directionLeft) {
  102187. offset++;
  102188. }
  102189. normalized = true;
  102190. break;
  102191. }
  102192. } while (node = directionLeft ? walker.next() : walker.prev());
  102193. }
  102194. }
  102195. }
  102196. if (collapsed) {
  102197. if (isText$7(container) && offset === 0) {
  102198. findTextNodeRelative(dom, isAfterNode, collapsed, true, container).each(function (pos) {
  102199. container = pos.container();
  102200. offset = pos.offset();
  102201. normalized = true;
  102202. });
  102203. }
  102204. if (isElement$5(container)) {
  102205. node = container.childNodes[offset];
  102206. if (!node) {
  102207. node = container.childNodes[offset - 1];
  102208. }
  102209. if (node && isBr$5(node) && !isPrevNode(node, 'A') && !hasBrBeforeAfter(dom, node, false) && !hasBrBeforeAfter(dom, node, true)) {
  102210. findTextNodeRelative(dom, isAfterNode, collapsed, true, node).each(function (pos) {
  102211. container = pos.container();
  102212. offset = pos.offset();
  102213. normalized = true;
  102214. });
  102215. }
  102216. }
  102217. }
  102218. if (directionLeft && !collapsed && isText$7(container) && offset === container.nodeValue.length) {
  102219. findTextNodeRelative(dom, isAfterNode, collapsed, false, container).each(function (pos) {
  102220. container = pos.container();
  102221. offset = pos.offset();
  102222. normalized = true;
  102223. });
  102224. }
  102225. return normalized ? Optional.some(CaretPosition(container, offset)) : Optional.none();
  102226. };
  102227. var normalize$2 = function (dom, rng) {
  102228. var collapsed = rng.collapsed, normRng = rng.cloneRange();
  102229. var startPos = CaretPosition.fromRangeStart(rng);
  102230. normalizeEndPoint(dom, collapsed, true, normRng).each(function (pos) {
  102231. if (!collapsed || !CaretPosition.isAbove(startPos, pos)) {
  102232. normRng.setStart(pos.container(), pos.offset());
  102233. }
  102234. });
  102235. if (!collapsed) {
  102236. normalizeEndPoint(dom, collapsed, false, normRng).each(function (pos) {
  102237. normRng.setEnd(pos.container(), pos.offset());
  102238. });
  102239. }
  102240. if (collapsed) {
  102241. normRng.collapse(true);
  102242. }
  102243. return isEq$4(rng, normRng) ? Optional.none() : Optional.some(normRng);
  102244. };
  102245. var splitText = function (node, offset) {
  102246. return node.splitText(offset);
  102247. };
  102248. var split = function (rng) {
  102249. var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
  102250. if (startContainer === endContainer && isText$7(startContainer)) {
  102251. if (startOffset > 0 && startOffset < startContainer.nodeValue.length) {
  102252. endContainer = splitText(startContainer, startOffset);
  102253. startContainer = endContainer.previousSibling;
  102254. if (endOffset > startOffset) {
  102255. endOffset = endOffset - startOffset;
  102256. startContainer = endContainer = splitText(endContainer, endOffset).previousSibling;
  102257. endOffset = endContainer.nodeValue.length;
  102258. startOffset = 0;
  102259. } else {
  102260. endOffset = 0;
  102261. }
  102262. }
  102263. } else {
  102264. if (isText$7(startContainer) && startOffset > 0 && startOffset < startContainer.nodeValue.length) {
  102265. startContainer = splitText(startContainer, startOffset);
  102266. startOffset = 0;
  102267. }
  102268. if (isText$7(endContainer) && endOffset > 0 && endOffset < endContainer.nodeValue.length) {
  102269. endContainer = splitText(endContainer, endOffset).previousSibling;
  102270. endOffset = endContainer.nodeValue.length;
  102271. }
  102272. }
  102273. return {
  102274. startContainer: startContainer,
  102275. startOffset: startOffset,
  102276. endContainer: endContainer,
  102277. endOffset: endOffset
  102278. };
  102279. };
  102280. var RangeUtils = function (dom) {
  102281. var walk = function (rng, callback) {
  102282. return walk$2(dom, rng, callback);
  102283. };
  102284. var split$1 = split;
  102285. var normalize = function (rng) {
  102286. return normalize$2(dom, rng).fold(never, function (normalizedRng) {
  102287. rng.setStart(normalizedRng.startContainer, normalizedRng.startOffset);
  102288. rng.setEnd(normalizedRng.endContainer, normalizedRng.endOffset);
  102289. return true;
  102290. });
  102291. };
  102292. return {
  102293. walk: walk,
  102294. split: split$1,
  102295. normalize: normalize
  102296. };
  102297. };
  102298. RangeUtils.compareRanges = isEq$4;
  102299. RangeUtils.getCaretRangeFromPoint = fromPoint;
  102300. RangeUtils.getSelectedNode = getSelectedNode;
  102301. RangeUtils.getNode = getNode$1;
  102302. var Dimension = function (name, getOffset) {
  102303. var set = function (element, h) {
  102304. if (!isNumber(h) && !h.match(/^[0-9]+$/)) {
  102305. throw new Error(name + '.set accepts only positive integer values. Value was ' + h);
  102306. }
  102307. var dom = element.dom;
  102308. if (isSupported(dom)) {
  102309. dom.style[name] = h + 'px';
  102310. }
  102311. };
  102312. var get = function (element) {
  102313. var r = getOffset(element);
  102314. if (r <= 0 || r === null) {
  102315. var css = get$5(element, name);
  102316. return parseFloat(css) || 0;
  102317. }
  102318. return r;
  102319. };
  102320. var getOuter = get;
  102321. var aggregate = function (element, properties) {
  102322. return foldl(properties, function (acc, property) {
  102323. var val = get$5(element, property);
  102324. var value = val === undefined ? 0 : parseInt(val, 10);
  102325. return isNaN(value) ? acc : acc + value;
  102326. }, 0);
  102327. };
  102328. var max = function (element, value, properties) {
  102329. var cumulativeInclusions = aggregate(element, properties);
  102330. var absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;
  102331. return absoluteMax;
  102332. };
  102333. return {
  102334. set: set,
  102335. get: get,
  102336. getOuter: getOuter,
  102337. aggregate: aggregate,
  102338. max: max
  102339. };
  102340. };
  102341. var api = Dimension('height', function (element) {
  102342. var dom = element.dom;
  102343. return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;
  102344. });
  102345. var get$1 = function (element) {
  102346. return api.get(element);
  102347. };
  102348. var walkUp = function (navigation, doc) {
  102349. var frame = navigation.view(doc);
  102350. return frame.fold(constant([]), function (f) {
  102351. var parent = navigation.owner(f);
  102352. var rest = walkUp(navigation, parent);
  102353. return [f].concat(rest);
  102354. });
  102355. };
  102356. var pathTo = function (element, navigation) {
  102357. var d = navigation.owner(element);
  102358. return walkUp(navigation, d);
  102359. };
  102360. var view = function (doc) {
  102361. var _a;
  102362. var element = doc.dom === document ? Optional.none() : Optional.from((_a = doc.dom.defaultView) === null || _a === void 0 ? void 0 : _a.frameElement);
  102363. return element.map(SugarElement.fromDom);
  102364. };
  102365. var owner = function (element) {
  102366. return documentOrOwner(element);
  102367. };
  102368. var Navigation = /*#__PURE__*/Object.freeze({
  102369. __proto__: null,
  102370. view: view,
  102371. owner: owner
  102372. });
  102373. var find$1 = function (element) {
  102374. var doc = SugarElement.fromDom(document);
  102375. var scroll = get$8(doc);
  102376. var frames = pathTo(element, Navigation);
  102377. var offset = viewport(element);
  102378. var r = foldr(frames, function (b, a) {
  102379. var loc = viewport(a);
  102380. return {
  102381. left: b.left + loc.left,
  102382. top: b.top + loc.top
  102383. };
  102384. }, {
  102385. left: 0,
  102386. top: 0
  102387. });
  102388. return SugarPosition(r.left + offset.left + scroll.left, r.top + offset.top + scroll.top);
  102389. };
  102390. var excludeFromDescend = function (element) {
  102391. return name(element) === 'textarea';
  102392. };
  102393. var fireScrollIntoViewEvent = function (editor, data) {
  102394. var scrollEvent = editor.fire('ScrollIntoView', data);
  102395. return scrollEvent.isDefaultPrevented();
  102396. };
  102397. var fireAfterScrollIntoViewEvent = function (editor, data) {
  102398. editor.fire('AfterScrollIntoView', data);
  102399. };
  102400. var descend = function (element, offset) {
  102401. var children$1 = children(element);
  102402. if (children$1.length === 0 || excludeFromDescend(element)) {
  102403. return {
  102404. element: element,
  102405. offset: offset
  102406. };
  102407. } else if (offset < children$1.length && !excludeFromDescend(children$1[offset])) {
  102408. return {
  102409. element: children$1[offset],
  102410. offset: 0
  102411. };
  102412. } else {
  102413. var last = children$1[children$1.length - 1];
  102414. if (excludeFromDescend(last)) {
  102415. return {
  102416. element: element,
  102417. offset: offset
  102418. };
  102419. } else {
  102420. if (name(last) === 'img') {
  102421. return {
  102422. element: last,
  102423. offset: 1
  102424. };
  102425. } else if (isText$8(last)) {
  102426. return {
  102427. element: last,
  102428. offset: get$2(last).length
  102429. };
  102430. } else {
  102431. return {
  102432. element: last,
  102433. offset: children(last).length
  102434. };
  102435. }
  102436. }
  102437. }
  102438. };
  102439. var markerInfo = function (element, cleanupFun) {
  102440. var pos = absolute(element);
  102441. var height = get$1(element);
  102442. return {
  102443. element: element,
  102444. bottom: pos.top + height,
  102445. height: height,
  102446. pos: pos,
  102447. cleanup: cleanupFun
  102448. };
  102449. };
  102450. var createMarker = function (element, offset) {
  102451. var startPoint = descend(element, offset);
  102452. var span = SugarElement.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">' + ZWSP$1 + '</span>');
  102453. before$4(startPoint.element, span);
  102454. return markerInfo(span, function () {
  102455. return remove$7(span);
  102456. });
  102457. };
  102458. var elementMarker = function (element) {
  102459. return markerInfo(SugarElement.fromDom(element), noop);
  102460. };
  102461. var withMarker = function (editor, f, rng, alignToTop) {
  102462. preserveWith(editor, function (_s, _e) {
  102463. return applyWithMarker(editor, f, rng, alignToTop);
  102464. }, rng);
  102465. };
  102466. var withScrollEvents = function (editor, doc, f, marker, alignToTop) {
  102467. var data = {
  102468. elm: marker.element.dom,
  102469. alignToTop: alignToTop
  102470. };
  102471. if (fireScrollIntoViewEvent(editor, data)) {
  102472. return;
  102473. }
  102474. var scrollTop = get$8(doc).top;
  102475. f(doc, scrollTop, marker, alignToTop);
  102476. fireAfterScrollIntoViewEvent(editor, data);
  102477. };
  102478. var applyWithMarker = function (editor, f, rng, alignToTop) {
  102479. var body = SugarElement.fromDom(editor.getBody());
  102480. var doc = SugarElement.fromDom(editor.getDoc());
  102481. reflow(body);
  102482. var marker = createMarker(SugarElement.fromDom(rng.startContainer), rng.startOffset);
  102483. withScrollEvents(editor, doc, f, marker, alignToTop);
  102484. marker.cleanup();
  102485. };
  102486. var withElement = function (editor, element, f, alignToTop) {
  102487. var doc = SugarElement.fromDom(editor.getDoc());
  102488. withScrollEvents(editor, doc, f, elementMarker(element), alignToTop);
  102489. };
  102490. var preserveWith = function (editor, f, rng) {
  102491. var startElement = rng.startContainer;
  102492. var startOffset = rng.startOffset;
  102493. var endElement = rng.endContainer;
  102494. var endOffset = rng.endOffset;
  102495. f(SugarElement.fromDom(startElement), SugarElement.fromDom(endElement));
  102496. var newRng = editor.dom.createRng();
  102497. newRng.setStart(startElement, startOffset);
  102498. newRng.setEnd(endElement, endOffset);
  102499. editor.selection.setRng(rng);
  102500. };
  102501. var scrollToMarker = function (marker, viewHeight, alignToTop, doc) {
  102502. var pos = marker.pos;
  102503. if (alignToTop) {
  102504. to(pos.left, pos.top, doc);
  102505. } else {
  102506. var y = pos.top - viewHeight + marker.height;
  102507. to(pos.left, y, doc);
  102508. }
  102509. };
  102510. var intoWindowIfNeeded = function (doc, scrollTop, viewHeight, marker, alignToTop) {
  102511. var viewportBottom = viewHeight + scrollTop;
  102512. var markerTop = marker.pos.top;
  102513. var markerBottom = marker.bottom;
  102514. var largerThanViewport = markerBottom - markerTop >= viewHeight;
  102515. if (markerTop < scrollTop) {
  102516. scrollToMarker(marker, viewHeight, alignToTop !== false, doc);
  102517. } else if (markerTop > viewportBottom) {
  102518. var align = largerThanViewport ? alignToTop !== false : alignToTop === true;
  102519. scrollToMarker(marker, viewHeight, align, doc);
  102520. } else if (markerBottom > viewportBottom && !largerThanViewport) {
  102521. scrollToMarker(marker, viewHeight, alignToTop === true, doc);
  102522. }
  102523. };
  102524. var intoWindow = function (doc, scrollTop, marker, alignToTop) {
  102525. var viewHeight = doc.dom.defaultView.innerHeight;
  102526. intoWindowIfNeeded(doc, scrollTop, viewHeight, marker, alignToTop);
  102527. };
  102528. var intoFrame = function (doc, scrollTop, marker, alignToTop) {
  102529. var frameViewHeight = doc.dom.defaultView.innerHeight;
  102530. intoWindowIfNeeded(doc, scrollTop, frameViewHeight, marker, alignToTop);
  102531. var op = find$1(marker.element);
  102532. var viewportBounds = getBounds(window);
  102533. if (op.top < viewportBounds.y) {
  102534. intoView(marker.element, alignToTop !== false);
  102535. } else if (op.top > viewportBounds.bottom) {
  102536. intoView(marker.element, alignToTop === true);
  102537. }
  102538. };
  102539. var rangeIntoWindow = function (editor, rng, alignToTop) {
  102540. return withMarker(editor, intoWindow, rng, alignToTop);
  102541. };
  102542. var elementIntoWindow = function (editor, element, alignToTop) {
  102543. return withElement(editor, element, intoWindow, alignToTop);
  102544. };
  102545. var rangeIntoFrame = function (editor, rng, alignToTop) {
  102546. return withMarker(editor, intoFrame, rng, alignToTop);
  102547. };
  102548. var elementIntoFrame = function (editor, element, alignToTop) {
  102549. return withElement(editor, element, intoFrame, alignToTop);
  102550. };
  102551. var scrollElementIntoView = function (editor, element, alignToTop) {
  102552. var scroller = editor.inline ? elementIntoWindow : elementIntoFrame;
  102553. scroller(editor, element, alignToTop);
  102554. };
  102555. var scrollRangeIntoView = function (editor, rng, alignToTop) {
  102556. var scroller = editor.inline ? rangeIntoWindow : rangeIntoFrame;
  102557. scroller(editor, rng, alignToTop);
  102558. };
  102559. var getDocument = function () {
  102560. return SugarElement.fromDom(document);
  102561. };
  102562. var focus$1 = function (element) {
  102563. return element.dom.focus();
  102564. };
  102565. var hasFocus$1 = function (element) {
  102566. var root = getRootNode(element).dom;
  102567. return element.dom === root.activeElement;
  102568. };
  102569. var active = function (root) {
  102570. if (root === void 0) {
  102571. root = getDocument();
  102572. }
  102573. return Optional.from(root.dom.activeElement).map(SugarElement.fromDom);
  102574. };
  102575. var search = function (element) {
  102576. return active(getRootNode(element)).filter(function (e) {
  102577. return element.dom.contains(e.dom);
  102578. });
  102579. };
  102580. var create$5 = function (start, soffset, finish, foffset) {
  102581. return {
  102582. start: start,
  102583. soffset: soffset,
  102584. finish: finish,
  102585. foffset: foffset
  102586. };
  102587. };
  102588. var SimRange = { create: create$5 };
  102589. var adt$1 = Adt.generate([
  102590. { before: ['element'] },
  102591. {
  102592. on: [
  102593. 'element',
  102594. 'offset'
  102595. ]
  102596. },
  102597. { after: ['element'] }
  102598. ]);
  102599. var cata = function (subject, onBefore, onOn, onAfter) {
  102600. return subject.fold(onBefore, onOn, onAfter);
  102601. };
  102602. var getStart$2 = function (situ) {
  102603. return situ.fold(identity, identity, identity);
  102604. };
  102605. var before$1 = adt$1.before;
  102606. var on = adt$1.on;
  102607. var after$1 = adt$1.after;
  102608. var Situ = {
  102609. before: before$1,
  102610. on: on,
  102611. after: after$1,
  102612. cata: cata,
  102613. getStart: getStart$2
  102614. };
  102615. var adt = Adt.generate([
  102616. { domRange: ['rng'] },
  102617. {
  102618. relative: [
  102619. 'startSitu',
  102620. 'finishSitu'
  102621. ]
  102622. },
  102623. {
  102624. exact: [
  102625. 'start',
  102626. 'soffset',
  102627. 'finish',
  102628. 'foffset'
  102629. ]
  102630. }
  102631. ]);
  102632. var exactFromRange = function (simRange) {
  102633. return adt.exact(simRange.start, simRange.soffset, simRange.finish, simRange.foffset);
  102634. };
  102635. var getStart$1 = function (selection) {
  102636. return selection.match({
  102637. domRange: function (rng) {
  102638. return SugarElement.fromDom(rng.startContainer);
  102639. },
  102640. relative: function (startSitu, _finishSitu) {
  102641. return Situ.getStart(startSitu);
  102642. },
  102643. exact: function (start, _soffset, _finish, _foffset) {
  102644. return start;
  102645. }
  102646. });
  102647. };
  102648. var domRange = adt.domRange;
  102649. var relative = adt.relative;
  102650. var exact = adt.exact;
  102651. var getWin = function (selection) {
  102652. var start = getStart$1(selection);
  102653. return defaultView(start);
  102654. };
  102655. var range = SimRange.create;
  102656. var SimSelection = {
  102657. domRange: domRange,
  102658. relative: relative,
  102659. exact: exact,
  102660. exactFromRange: exactFromRange,
  102661. getWin: getWin,
  102662. range: range
  102663. };
  102664. var browser$1 = detect().browser;
  102665. var clamp$1 = function (offset, element) {
  102666. var max = isText$8(element) ? get$2(element).length : children(element).length + 1;
  102667. if (offset > max) {
  102668. return max;
  102669. } else if (offset < 0) {
  102670. return 0;
  102671. }
  102672. return offset;
  102673. };
  102674. var normalizeRng = function (rng) {
  102675. return SimSelection.range(rng.start, clamp$1(rng.soffset, rng.start), rng.finish, clamp$1(rng.foffset, rng.finish));
  102676. };
  102677. var isOrContains = function (root, elm) {
  102678. return !isRestrictedNode(elm.dom) && (contains$1(root, elm) || eq(root, elm));
  102679. };
  102680. var isRngInRoot = function (root) {
  102681. return function (rng) {
  102682. return isOrContains(root, rng.start) && isOrContains(root, rng.finish);
  102683. };
  102684. };
  102685. var shouldStore = function (editor) {
  102686. return editor.inline === true || browser$1.isIE();
  102687. };
  102688. var nativeRangeToSelectionRange = function (r) {
  102689. return SimSelection.range(SugarElement.fromDom(r.startContainer), r.startOffset, SugarElement.fromDom(r.endContainer), r.endOffset);
  102690. };
  102691. var readRange = function (win) {
  102692. var selection = win.getSelection();
  102693. var rng = !selection || selection.rangeCount === 0 ? Optional.none() : Optional.from(selection.getRangeAt(0));
  102694. return rng.map(nativeRangeToSelectionRange);
  102695. };
  102696. var getBookmark = function (root) {
  102697. var win = defaultView(root);
  102698. return readRange(win.dom).filter(isRngInRoot(root));
  102699. };
  102700. var validate = function (root, bookmark) {
  102701. return Optional.from(bookmark).filter(isRngInRoot(root)).map(normalizeRng);
  102702. };
  102703. var bookmarkToNativeRng = function (bookmark) {
  102704. var rng = document.createRange();
  102705. try {
  102706. rng.setStart(bookmark.start.dom, bookmark.soffset);
  102707. rng.setEnd(bookmark.finish.dom, bookmark.foffset);
  102708. return Optional.some(rng);
  102709. } catch (_) {
  102710. return Optional.none();
  102711. }
  102712. };
  102713. var store = function (editor) {
  102714. var newBookmark = shouldStore(editor) ? getBookmark(SugarElement.fromDom(editor.getBody())) : Optional.none();
  102715. editor.bookmark = newBookmark.isSome() ? newBookmark : editor.bookmark;
  102716. };
  102717. var storeNative = function (editor, rng) {
  102718. var root = SugarElement.fromDom(editor.getBody());
  102719. var range = shouldStore(editor) ? Optional.from(rng) : Optional.none();
  102720. var newBookmark = range.map(nativeRangeToSelectionRange).filter(isRngInRoot(root));
  102721. editor.bookmark = newBookmark.isSome() ? newBookmark : editor.bookmark;
  102722. };
  102723. var getRng = function (editor) {
  102724. var bookmark = editor.bookmark ? editor.bookmark : Optional.none();
  102725. return bookmark.bind(function (x) {
  102726. return validate(SugarElement.fromDom(editor.getBody()), x);
  102727. }).bind(bookmarkToNativeRng);
  102728. };
  102729. var restore = function (editor) {
  102730. getRng(editor).each(function (rng) {
  102731. return editor.selection.setRng(rng);
  102732. });
  102733. };
  102734. var isEditorUIElement$1 = function (elm) {
  102735. var className = elm.className.toString();
  102736. return className.indexOf('tox-') !== -1 || className.indexOf('mce-') !== -1;
  102737. };
  102738. var FocusManager = { isEditorUIElement: isEditorUIElement$1 };
  102739. var isManualNodeChange = function (e) {
  102740. return e.type === 'nodechange' && e.selectionChange;
  102741. };
  102742. var registerPageMouseUp = function (editor, throttledStore) {
  102743. var mouseUpPage = function () {
  102744. throttledStore.throttle();
  102745. };
  102746. DOMUtils.DOM.bind(document, 'mouseup', mouseUpPage);
  102747. editor.on('remove', function () {
  102748. DOMUtils.DOM.unbind(document, 'mouseup', mouseUpPage);
  102749. });
  102750. };
  102751. var registerFocusOut = function (editor) {
  102752. editor.on('focusout', function () {
  102753. store(editor);
  102754. });
  102755. };
  102756. var registerMouseUp = function (editor, throttledStore) {
  102757. editor.on('mouseup touchend', function (_e) {
  102758. throttledStore.throttle();
  102759. });
  102760. };
  102761. var registerEditorEvents = function (editor, throttledStore) {
  102762. var browser = detect().browser;
  102763. if (browser.isIE()) {
  102764. registerFocusOut(editor);
  102765. } else {
  102766. registerMouseUp(editor, throttledStore);
  102767. }
  102768. editor.on('keyup NodeChange', function (e) {
  102769. if (!isManualNodeChange(e)) {
  102770. store(editor);
  102771. }
  102772. });
  102773. };
  102774. var register$3 = function (editor) {
  102775. var throttledStore = first(function () {
  102776. store(editor);
  102777. }, 0);
  102778. editor.on('init', function () {
  102779. if (editor.inline) {
  102780. registerPageMouseUp(editor, throttledStore);
  102781. }
  102782. registerEditorEvents(editor, throttledStore);
  102783. });
  102784. editor.on('remove', function () {
  102785. throttledStore.cancel();
  102786. });
  102787. };
  102788. var documentFocusInHandler;
  102789. var DOM$8 = DOMUtils.DOM;
  102790. var isEditorUIElement = function (elm) {
  102791. return FocusManager.isEditorUIElement(elm);
  102792. };
  102793. var isEditorContentAreaElement = function (elm) {
  102794. var classList = elm.classList;
  102795. if (classList !== undefined) {
  102796. return classList.contains('tox-edit-area') || classList.contains('tox-edit-area__iframe') || classList.contains('mce-content-body');
  102797. } else {
  102798. return false;
  102799. }
  102800. };
  102801. var isUIElement = function (editor, elm) {
  102802. var customSelector = getCustomUiSelector(editor);
  102803. var parent = DOM$8.getParent(elm, function (elm) {
  102804. return isEditorUIElement(elm) || (customSelector ? editor.dom.is(elm, customSelector) : false);
  102805. });
  102806. return parent !== null;
  102807. };
  102808. var getActiveElement = function (editor) {
  102809. try {
  102810. var root = getRootNode(SugarElement.fromDom(editor.getElement()));
  102811. return active(root).fold(function () {
  102812. return document.body;
  102813. }, function (x) {
  102814. return x.dom;
  102815. });
  102816. } catch (ex) {
  102817. return document.body;
  102818. }
  102819. };
  102820. var registerEvents$1 = function (editorManager, e) {
  102821. var editor = e.editor;
  102822. register$3(editor);
  102823. editor.on('focusin', function () {
  102824. var focusedEditor = editorManager.focusedEditor;
  102825. if (focusedEditor !== editor) {
  102826. if (focusedEditor) {
  102827. focusedEditor.fire('blur', { focusedEditor: editor });
  102828. }
  102829. editorManager.setActive(editor);
  102830. editorManager.focusedEditor = editor;
  102831. editor.fire('focus', { blurredEditor: focusedEditor });
  102832. editor.focus(true);
  102833. }
  102834. });
  102835. editor.on('focusout', function () {
  102836. Delay.setEditorTimeout(editor, function () {
  102837. var focusedEditor = editorManager.focusedEditor;
  102838. if (!isUIElement(editor, getActiveElement(editor)) && focusedEditor === editor) {
  102839. editor.fire('blur', { focusedEditor: null });
  102840. editorManager.focusedEditor = null;
  102841. }
  102842. });
  102843. });
  102844. if (!documentFocusInHandler) {
  102845. documentFocusInHandler = function (e) {
  102846. var activeEditor = editorManager.activeEditor;
  102847. if (activeEditor) {
  102848. getOriginalEventTarget(e).each(function (target) {
  102849. if (target.ownerDocument === document) {
  102850. if (target !== document.body && !isUIElement(activeEditor, target) && editorManager.focusedEditor === activeEditor) {
  102851. activeEditor.fire('blur', { focusedEditor: null });
  102852. editorManager.focusedEditor = null;
  102853. }
  102854. }
  102855. });
  102856. }
  102857. };
  102858. DOM$8.bind(document, 'focusin', documentFocusInHandler);
  102859. }
  102860. };
  102861. var unregisterDocumentEvents = function (editorManager, e) {
  102862. if (editorManager.focusedEditor === e.editor) {
  102863. editorManager.focusedEditor = null;
  102864. }
  102865. if (!editorManager.activeEditor) {
  102866. DOM$8.unbind(document, 'focusin', documentFocusInHandler);
  102867. documentFocusInHandler = null;
  102868. }
  102869. };
  102870. var setup$l = function (editorManager) {
  102871. editorManager.on('AddEditor', curry(registerEvents$1, editorManager));
  102872. editorManager.on('RemoveEditor', curry(unregisterDocumentEvents, editorManager));
  102873. };
  102874. var getContentEditableHost = function (editor, node) {
  102875. return editor.dom.getParent(node, function (node) {
  102876. return editor.dom.getContentEditable(node) === 'true';
  102877. });
  102878. };
  102879. var getCollapsedNode = function (rng) {
  102880. return rng.collapsed ? Optional.from(getNode$1(rng.startContainer, rng.startOffset)).map(SugarElement.fromDom) : Optional.none();
  102881. };
  102882. var getFocusInElement = function (root, rng) {
  102883. return getCollapsedNode(rng).bind(function (node) {
  102884. if (isTableSection(node)) {
  102885. return Optional.some(node);
  102886. } else if (contains$1(root, node) === false) {
  102887. return Optional.some(root);
  102888. } else {
  102889. return Optional.none();
  102890. }
  102891. });
  102892. };
  102893. var normalizeSelection$1 = function (editor, rng) {
  102894. getFocusInElement(SugarElement.fromDom(editor.getBody()), rng).bind(function (elm) {
  102895. return firstPositionIn(elm.dom);
  102896. }).fold(function () {
  102897. editor.selection.normalize();
  102898. return;
  102899. }, function (caretPos) {
  102900. return editor.selection.setRng(caretPos.toRange());
  102901. });
  102902. };
  102903. var focusBody = function (body) {
  102904. if (body.setActive) {
  102905. try {
  102906. body.setActive();
  102907. } catch (ex) {
  102908. body.focus();
  102909. }
  102910. } else {
  102911. body.focus();
  102912. }
  102913. };
  102914. var hasElementFocus = function (elm) {
  102915. return hasFocus$1(elm) || search(elm).isSome();
  102916. };
  102917. var hasIframeFocus = function (editor) {
  102918. return editor.iframeElement && hasFocus$1(SugarElement.fromDom(editor.iframeElement));
  102919. };
  102920. var hasInlineFocus = function (editor) {
  102921. var rawBody = editor.getBody();
  102922. return rawBody && hasElementFocus(SugarElement.fromDom(rawBody));
  102923. };
  102924. var hasUiFocus = function (editor) {
  102925. var dos = getRootNode(SugarElement.fromDom(editor.getElement()));
  102926. return active(dos).filter(function (elem) {
  102927. return !isEditorContentAreaElement(elem.dom) && isUIElement(editor, elem.dom);
  102928. }).isSome();
  102929. };
  102930. var hasFocus = function (editor) {
  102931. return editor.inline ? hasInlineFocus(editor) : hasIframeFocus(editor);
  102932. };
  102933. var hasEditorOrUiFocus = function (editor) {
  102934. return hasFocus(editor) || hasUiFocus(editor);
  102935. };
  102936. var focusEditor = function (editor) {
  102937. var selection = editor.selection;
  102938. var body = editor.getBody();
  102939. var rng = selection.getRng();
  102940. editor.quirks.refreshContentEditable();
  102941. if (editor.bookmark !== undefined && hasFocus(editor) === false) {
  102942. getRng(editor).each(function (bookmarkRng) {
  102943. editor.selection.setRng(bookmarkRng);
  102944. rng = bookmarkRng;
  102945. });
  102946. }
  102947. var contentEditableHost = getContentEditableHost(editor, selection.getNode());
  102948. if (editor.$.contains(body, contentEditableHost)) {
  102949. focusBody(contentEditableHost);
  102950. normalizeSelection$1(editor, rng);
  102951. activateEditor(editor);
  102952. return;
  102953. }
  102954. if (!editor.inline) {
  102955. if (!Env.opera) {
  102956. focusBody(body);
  102957. }
  102958. editor.getWin().focus();
  102959. }
  102960. if (Env.gecko || editor.inline) {
  102961. focusBody(body);
  102962. normalizeSelection$1(editor, rng);
  102963. }
  102964. activateEditor(editor);
  102965. };
  102966. var activateEditor = function (editor) {
  102967. return editor.editorManager.setActive(editor);
  102968. };
  102969. var focus = function (editor, skipFocus) {
  102970. if (editor.removed) {
  102971. return;
  102972. }
  102973. if (skipFocus) {
  102974. activateEditor(editor);
  102975. } else {
  102976. focusEditor(editor);
  102977. }
  102978. };
  102979. var getEndpointElement = function (root, rng, start, real, resolve) {
  102980. var container = start ? rng.startContainer : rng.endContainer;
  102981. var offset = start ? rng.startOffset : rng.endOffset;
  102982. return Optional.from(container).map(SugarElement.fromDom).map(function (elm) {
  102983. return !real || !rng.collapsed ? child$1(elm, resolve(elm, offset)).getOr(elm) : elm;
  102984. }).bind(function (elm) {
  102985. return isElement$6(elm) ? Optional.some(elm) : parent(elm).filter(isElement$6);
  102986. }).map(function (elm) {
  102987. return elm.dom;
  102988. }).getOr(root);
  102989. };
  102990. var getStart = function (root, rng, real) {
  102991. return getEndpointElement(root, rng, true, real, function (elm, offset) {
  102992. return Math.min(childNodesCount(elm), offset);
  102993. });
  102994. };
  102995. var getEnd = function (root, rng, real) {
  102996. return getEndpointElement(root, rng, false, real, function (elm, offset) {
  102997. return offset > 0 ? offset - 1 : offset;
  102998. });
  102999. };
  103000. var skipEmptyTextNodes = function (node, forwards) {
  103001. var orig = node;
  103002. while (node && isText$7(node) && node.length === 0) {
  103003. node = forwards ? node.nextSibling : node.previousSibling;
  103004. }
  103005. return node || orig;
  103006. };
  103007. var getNode = function (root, rng) {
  103008. var elm, startContainer, endContainer;
  103009. if (!rng) {
  103010. return root;
  103011. }
  103012. startContainer = rng.startContainer;
  103013. endContainer = rng.endContainer;
  103014. var startOffset = rng.startOffset;
  103015. var endOffset = rng.endOffset;
  103016. elm = rng.commonAncestorContainer;
  103017. if (!rng.collapsed) {
  103018. if (startContainer === endContainer) {
  103019. if (endOffset - startOffset < 2) {
  103020. if (startContainer.hasChildNodes()) {
  103021. elm = startContainer.childNodes[startOffset];
  103022. }
  103023. }
  103024. }
  103025. if (startContainer.nodeType === 3 && endContainer.nodeType === 3) {
  103026. if (startContainer.length === startOffset) {
  103027. startContainer = skipEmptyTextNodes(startContainer.nextSibling, true);
  103028. } else {
  103029. startContainer = startContainer.parentNode;
  103030. }
  103031. if (endOffset === 0) {
  103032. endContainer = skipEmptyTextNodes(endContainer.previousSibling, false);
  103033. } else {
  103034. endContainer = endContainer.parentNode;
  103035. }
  103036. if (startContainer && startContainer === endContainer) {
  103037. return startContainer;
  103038. }
  103039. }
  103040. }
  103041. if (elm && elm.nodeType === 3) {
  103042. return elm.parentNode;
  103043. }
  103044. return elm;
  103045. };
  103046. var getSelectedBlocks = function (dom, rng, startElm, endElm) {
  103047. var node;
  103048. var selectedBlocks = [];
  103049. var root = dom.getRoot();
  103050. startElm = dom.getParent(startElm || getStart(root, rng, rng.collapsed), dom.isBlock);
  103051. endElm = dom.getParent(endElm || getEnd(root, rng, rng.collapsed), dom.isBlock);
  103052. if (startElm && startElm !== root) {
  103053. selectedBlocks.push(startElm);
  103054. }
  103055. if (startElm && endElm && startElm !== endElm) {
  103056. node = startElm;
  103057. var walker = new DomTreeWalker(startElm, root);
  103058. while ((node = walker.next()) && node !== endElm) {
  103059. if (dom.isBlock(node)) {
  103060. selectedBlocks.push(node);
  103061. }
  103062. }
  103063. }
  103064. if (endElm && startElm !== endElm && endElm !== root) {
  103065. selectedBlocks.push(endElm);
  103066. }
  103067. return selectedBlocks;
  103068. };
  103069. var select = function (dom, node, content) {
  103070. return Optional.from(node).map(function (node) {
  103071. var idx = dom.nodeIndex(node);
  103072. var rng = dom.createRng();
  103073. rng.setStart(node.parentNode, idx);
  103074. rng.setEnd(node.parentNode, idx + 1);
  103075. if (content) {
  103076. moveEndPoint(dom, rng, node, true);
  103077. moveEndPoint(dom, rng, node, false);
  103078. }
  103079. return rng;
  103080. });
  103081. };
  103082. var processRanges = function (editor, ranges) {
  103083. return map$3(ranges, function (range) {
  103084. var evt = editor.fire('GetSelectionRange', { range: range });
  103085. return evt.range !== range ? evt.range : range;
  103086. });
  103087. };
  103088. var typeLookup = {
  103089. '#text': 3,
  103090. '#comment': 8,
  103091. '#cdata': 4,
  103092. '#pi': 7,
  103093. '#doctype': 10,
  103094. '#document-fragment': 11
  103095. };
  103096. var walk$1 = function (node, root, prev) {
  103097. var startName = prev ? 'lastChild' : 'firstChild';
  103098. var siblingName = prev ? 'prev' : 'next';
  103099. if (node[startName]) {
  103100. return node[startName];
  103101. }
  103102. if (node !== root) {
  103103. var sibling = node[siblingName];
  103104. if (sibling) {
  103105. return sibling;
  103106. }
  103107. for (var parent_1 = node.parent; parent_1 && parent_1 !== root; parent_1 = parent_1.parent) {
  103108. sibling = parent_1[siblingName];
  103109. if (sibling) {
  103110. return sibling;
  103111. }
  103112. }
  103113. }
  103114. };
  103115. var isEmptyTextNode = function (node) {
  103116. if (!isWhitespaceText(node.value)) {
  103117. return false;
  103118. }
  103119. var parentNode = node.parent;
  103120. if (parentNode && (parentNode.name !== 'span' || parentNode.attr('style')) && /^[ ]+$/.test(node.value)) {
  103121. return false;
  103122. }
  103123. return true;
  103124. };
  103125. var isNonEmptyElement = function (node) {
  103126. var isNamedAnchor = node.name === 'a' && !node.attr('href') && node.attr('id');
  103127. return node.attr('name') || node.attr('id') && !node.firstChild || node.attr('data-mce-bookmark') || isNamedAnchor;
  103128. };
  103129. var AstNode = function () {
  103130. function AstNode(name, type) {
  103131. this.name = name;
  103132. this.type = type;
  103133. if (type === 1) {
  103134. this.attributes = [];
  103135. this.attributes.map = {};
  103136. }
  103137. }
  103138. AstNode.create = function (name, attrs) {
  103139. var node = new AstNode(name, typeLookup[name] || 1);
  103140. if (attrs) {
  103141. each$j(attrs, function (value, attrName) {
  103142. node.attr(attrName, value);
  103143. });
  103144. }
  103145. return node;
  103146. };
  103147. AstNode.prototype.replace = function (node) {
  103148. var self = this;
  103149. if (node.parent) {
  103150. node.remove();
  103151. }
  103152. self.insert(node, self);
  103153. self.remove();
  103154. return self;
  103155. };
  103156. AstNode.prototype.attr = function (name, value) {
  103157. var self = this;
  103158. var attrs;
  103159. if (typeof name !== 'string') {
  103160. if (name !== undefined && name !== null) {
  103161. each$j(name, function (value, key) {
  103162. self.attr(key, value);
  103163. });
  103164. }
  103165. return self;
  103166. }
  103167. if (attrs = self.attributes) {
  103168. if (value !== undefined) {
  103169. if (value === null) {
  103170. if (name in attrs.map) {
  103171. delete attrs.map[name];
  103172. var i = attrs.length;
  103173. while (i--) {
  103174. if (attrs[i].name === name) {
  103175. attrs.splice(i, 1);
  103176. return self;
  103177. }
  103178. }
  103179. }
  103180. return self;
  103181. }
  103182. if (name in attrs.map) {
  103183. var i = attrs.length;
  103184. while (i--) {
  103185. if (attrs[i].name === name) {
  103186. attrs[i].value = value;
  103187. break;
  103188. }
  103189. }
  103190. } else {
  103191. attrs.push({
  103192. name: name,
  103193. value: value
  103194. });
  103195. }
  103196. attrs.map[name] = value;
  103197. return self;
  103198. }
  103199. return attrs.map[name];
  103200. }
  103201. };
  103202. AstNode.prototype.clone = function () {
  103203. var self = this;
  103204. var clone = new AstNode(self.name, self.type);
  103205. var selfAttrs;
  103206. if (selfAttrs = self.attributes) {
  103207. var cloneAttrs = [];
  103208. cloneAttrs.map = {};
  103209. for (var i = 0, l = selfAttrs.length; i < l; i++) {
  103210. var selfAttr = selfAttrs[i];
  103211. if (selfAttr.name !== 'id') {
  103212. cloneAttrs[cloneAttrs.length] = {
  103213. name: selfAttr.name,
  103214. value: selfAttr.value
  103215. };
  103216. cloneAttrs.map[selfAttr.name] = selfAttr.value;
  103217. }
  103218. }
  103219. clone.attributes = cloneAttrs;
  103220. }
  103221. clone.value = self.value;
  103222. clone.shortEnded = self.shortEnded;
  103223. return clone;
  103224. };
  103225. AstNode.prototype.wrap = function (wrapper) {
  103226. var self = this;
  103227. self.parent.insert(wrapper, self);
  103228. wrapper.append(self);
  103229. return self;
  103230. };
  103231. AstNode.prototype.unwrap = function () {
  103232. var self = this;
  103233. for (var node = self.firstChild; node;) {
  103234. var next = node.next;
  103235. self.insert(node, self, true);
  103236. node = next;
  103237. }
  103238. self.remove();
  103239. };
  103240. AstNode.prototype.remove = function () {
  103241. var self = this, parent = self.parent, next = self.next, prev = self.prev;
  103242. if (parent) {
  103243. if (parent.firstChild === self) {
  103244. parent.firstChild = next;
  103245. if (next) {
  103246. next.prev = null;
  103247. }
  103248. } else {
  103249. prev.next = next;
  103250. }
  103251. if (parent.lastChild === self) {
  103252. parent.lastChild = prev;
  103253. if (prev) {
  103254. prev.next = null;
  103255. }
  103256. } else {
  103257. next.prev = prev;
  103258. }
  103259. self.parent = self.next = self.prev = null;
  103260. }
  103261. return self;
  103262. };
  103263. AstNode.prototype.append = function (node) {
  103264. var self = this;
  103265. if (node.parent) {
  103266. node.remove();
  103267. }
  103268. var last = self.lastChild;
  103269. if (last) {
  103270. last.next = node;
  103271. node.prev = last;
  103272. self.lastChild = node;
  103273. } else {
  103274. self.lastChild = self.firstChild = node;
  103275. }
  103276. node.parent = self;
  103277. return node;
  103278. };
  103279. AstNode.prototype.insert = function (node, refNode, before) {
  103280. if (node.parent) {
  103281. node.remove();
  103282. }
  103283. var parent = refNode.parent || this;
  103284. if (before) {
  103285. if (refNode === parent.firstChild) {
  103286. parent.firstChild = node;
  103287. } else {
  103288. refNode.prev.next = node;
  103289. }
  103290. node.prev = refNode.prev;
  103291. node.next = refNode;
  103292. refNode.prev = node;
  103293. } else {
  103294. if (refNode === parent.lastChild) {
  103295. parent.lastChild = node;
  103296. } else {
  103297. refNode.next.prev = node;
  103298. }
  103299. node.next = refNode.next;
  103300. node.prev = refNode;
  103301. refNode.next = node;
  103302. }
  103303. node.parent = parent;
  103304. return node;
  103305. };
  103306. AstNode.prototype.getAll = function (name) {
  103307. var self = this;
  103308. var collection = [];
  103309. for (var node = self.firstChild; node; node = walk$1(node, self)) {
  103310. if (node.name === name) {
  103311. collection.push(node);
  103312. }
  103313. }
  103314. return collection;
  103315. };
  103316. AstNode.prototype.children = function () {
  103317. var self = this;
  103318. var collection = [];
  103319. for (var node = self.firstChild; node; node = node.next) {
  103320. collection.push(node);
  103321. }
  103322. return collection;
  103323. };
  103324. AstNode.prototype.empty = function () {
  103325. var self = this;
  103326. if (self.firstChild) {
  103327. var nodes = [];
  103328. for (var node = self.firstChild; node; node = walk$1(node, self)) {
  103329. nodes.push(node);
  103330. }
  103331. var i = nodes.length;
  103332. while (i--) {
  103333. var node = nodes[i];
  103334. node.parent = node.firstChild = node.lastChild = node.next = node.prev = null;
  103335. }
  103336. }
  103337. self.firstChild = self.lastChild = null;
  103338. return self;
  103339. };
  103340. AstNode.prototype.isEmpty = function (elements, whitespace, predicate) {
  103341. if (whitespace === void 0) {
  103342. whitespace = {};
  103343. }
  103344. var self = this;
  103345. var node = self.firstChild;
  103346. if (isNonEmptyElement(self)) {
  103347. return false;
  103348. }
  103349. if (node) {
  103350. do {
  103351. if (node.type === 1) {
  103352. if (node.attr('data-mce-bogus')) {
  103353. continue;
  103354. }
  103355. if (elements[node.name]) {
  103356. return false;
  103357. }
  103358. if (isNonEmptyElement(node)) {
  103359. return false;
  103360. }
  103361. }
  103362. if (node.type === 8) {
  103363. return false;
  103364. }
  103365. if (node.type === 3 && !isEmptyTextNode(node)) {
  103366. return false;
  103367. }
  103368. if (node.type === 3 && node.parent && whitespace[node.parent.name] && isWhitespaceText(node.value)) {
  103369. return false;
  103370. }
  103371. if (predicate && predicate(node)) {
  103372. return false;
  103373. }
  103374. } while (node = walk$1(node, self));
  103375. }
  103376. return true;
  103377. };
  103378. AstNode.prototype.walk = function (prev) {
  103379. return walk$1(this, null, prev);
  103380. };
  103381. return AstNode;
  103382. }();
  103383. var extractBase64DataUris = function (html) {
  103384. var dataImageUri = /data:[^;<"'\s]+;base64,([a-z0-9\+\/=\s]+)/gi;
  103385. var chunks = [];
  103386. var uris = {};
  103387. var prefix = generate('img');
  103388. var matches;
  103389. var index = 0;
  103390. var count = 0;
  103391. while (matches = dataImageUri.exec(html)) {
  103392. var uri = matches[0];
  103393. var imageId = prefix + '_' + count++;
  103394. uris[imageId] = uri;
  103395. if (index < matches.index) {
  103396. chunks.push(html.substr(index, matches.index - index));
  103397. }
  103398. chunks.push(imageId);
  103399. index = matches.index + uri.length;
  103400. }
  103401. var re = new RegExp(prefix + '_[0-9]+', 'g');
  103402. if (index === 0) {
  103403. return {
  103404. prefix: prefix,
  103405. uris: uris,
  103406. html: html,
  103407. re: re
  103408. };
  103409. } else {
  103410. if (index < html.length) {
  103411. chunks.push(html.substr(index));
  103412. }
  103413. return {
  103414. prefix: prefix,
  103415. uris: uris,
  103416. html: chunks.join(''),
  103417. re: re
  103418. };
  103419. }
  103420. };
  103421. var restoreDataUris = function (html, result) {
  103422. return html.replace(result.re, function (imageId) {
  103423. return get$9(result.uris, imageId).getOr(imageId);
  103424. });
  103425. };
  103426. var parseDataUri$1 = function (uri) {
  103427. var matches = /data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(uri);
  103428. if (matches) {
  103429. return Optional.some({
  103430. type: matches[1],
  103431. data: decodeURIComponent(matches[2])
  103432. });
  103433. } else {
  103434. return Optional.none();
  103435. }
  103436. };
  103437. var each$d = Tools.each, trim = Tools.trim;
  103438. var queryParts = 'source protocol authority userInfo user password host port relative path directory file query anchor'.split(' ');
  103439. var DEFAULT_PORTS = {
  103440. ftp: 21,
  103441. http: 80,
  103442. https: 443,
  103443. mailto: 25
  103444. };
  103445. var safeSvgDataUrlElements = [
  103446. 'img',
  103447. 'video'
  103448. ];
  103449. var blockSvgDataUris = function (allowSvgDataUrls, tagName) {
  103450. if (isNonNullable(allowSvgDataUrls)) {
  103451. return !allowSvgDataUrls;
  103452. } else {
  103453. return isNonNullable(tagName) ? !contains$3(safeSvgDataUrlElements, tagName) : true;
  103454. }
  103455. };
  103456. var isInvalidUri = function (settings, uri, tagName) {
  103457. if (settings.allow_html_data_urls) {
  103458. return false;
  103459. } else if (/^data:image\//i.test(uri)) {
  103460. return blockSvgDataUris(settings.allow_svg_data_urls, tagName) && /^data:image\/svg\+xml/i.test(uri);
  103461. } else {
  103462. return /^data:/i.test(uri);
  103463. }
  103464. };
  103465. var URI = function () {
  103466. function URI(url, settings) {
  103467. url = trim(url);
  103468. this.settings = settings || {};
  103469. var baseUri = this.settings.base_uri;
  103470. var self = this;
  103471. if (/^([\w\-]+):([^\/]{2})/i.test(url) || /^\s*#/.test(url)) {
  103472. self.source = url;
  103473. return;
  103474. }
  103475. var isProtocolRelative = url.indexOf('//') === 0;
  103476. if (url.indexOf('/') === 0 && !isProtocolRelative) {
  103477. url = (baseUri ? baseUri.protocol || 'http' : 'http') + '://mce_host' + url;
  103478. }
  103479. if (!/^[\w\-]*:?\/\//.test(url)) {
  103480. var baseUrl = this.settings.base_uri ? this.settings.base_uri.path : new URI(document.location.href).directory;
  103481. if (this.settings.base_uri && this.settings.base_uri.protocol == '') {
  103482. url = '//mce_host' + self.toAbsPath(baseUrl, url);
  103483. } else {
  103484. var match = /([^#?]*)([#?]?.*)/.exec(url);
  103485. url = (baseUri && baseUri.protocol || 'http') + '://mce_host' + self.toAbsPath(baseUrl, match[1]) + match[2];
  103486. }
  103487. }
  103488. url = url.replace(/@@/g, '(mce_at)');
  103489. var urlMatch = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);
  103490. each$d(queryParts, function (v, i) {
  103491. var part = urlMatch[i];
  103492. if (part) {
  103493. part = part.replace(/\(mce_at\)/g, '@@');
  103494. }
  103495. self[v] = part;
  103496. });
  103497. if (baseUri) {
  103498. if (!self.protocol) {
  103499. self.protocol = baseUri.protocol;
  103500. }
  103501. if (!self.userInfo) {
  103502. self.userInfo = baseUri.userInfo;
  103503. }
  103504. if (!self.port && self.host === 'mce_host') {
  103505. self.port = baseUri.port;
  103506. }
  103507. if (!self.host || self.host === 'mce_host') {
  103508. self.host = baseUri.host;
  103509. }
  103510. self.source = '';
  103511. }
  103512. if (isProtocolRelative) {
  103513. self.protocol = '';
  103514. }
  103515. }
  103516. URI.parseDataUri = function (uri) {
  103517. var type;
  103518. var uriComponents = decodeURIComponent(uri).split(',');
  103519. var matches = /data:([^;]+)/.exec(uriComponents[0]);
  103520. if (matches) {
  103521. type = matches[1];
  103522. }
  103523. return {
  103524. type: type,
  103525. data: uriComponents[1]
  103526. };
  103527. };
  103528. URI.isDomSafe = function (uri, context, options) {
  103529. if (options === void 0) {
  103530. options = {};
  103531. }
  103532. if (options.allow_script_urls) {
  103533. return true;
  103534. } else {
  103535. var decodedUri = Entities.decode(uri).replace(/[\s\u0000-\u001F]+/g, '');
  103536. try {
  103537. decodedUri = decodeURIComponent(decodedUri);
  103538. } catch (ex) {
  103539. decodedUri = unescape(decodedUri);
  103540. }
  103541. if (/((java|vb)script|mhtml):/i.test(decodedUri)) {
  103542. return false;
  103543. }
  103544. return !isInvalidUri(options, decodedUri, context);
  103545. }
  103546. };
  103547. URI.getDocumentBaseUrl = function (loc) {
  103548. var baseUrl;
  103549. if (loc.protocol.indexOf('http') !== 0 && loc.protocol !== 'file:') {
  103550. baseUrl = loc.href;
  103551. } else {
  103552. baseUrl = loc.protocol + '//' + loc.host + loc.pathname;
  103553. }
  103554. if (/^[^:]+:\/\/\/?[^\/]+\//.test(baseUrl)) {
  103555. baseUrl = baseUrl.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
  103556. if (!/[\/\\]$/.test(baseUrl)) {
  103557. baseUrl += '/';
  103558. }
  103559. }
  103560. return baseUrl;
  103561. };
  103562. URI.prototype.setPath = function (path) {
  103563. var pathMatch = /^(.*?)\/?(\w+)?$/.exec(path);
  103564. this.path = pathMatch[0];
  103565. this.directory = pathMatch[1];
  103566. this.file = pathMatch[2];
  103567. this.source = '';
  103568. this.getURI();
  103569. };
  103570. URI.prototype.toRelative = function (uri) {
  103571. var output;
  103572. if (uri === './') {
  103573. return uri;
  103574. }
  103575. var relativeUri = new URI(uri, { base_uri: this });
  103576. if (relativeUri.host !== 'mce_host' && this.host !== relativeUri.host && relativeUri.host || this.port !== relativeUri.port || this.protocol !== relativeUri.protocol && relativeUri.protocol !== '') {
  103577. return relativeUri.getURI();
  103578. }
  103579. var tu = this.getURI(), uu = relativeUri.getURI();
  103580. if (tu === uu || tu.charAt(tu.length - 1) === '/' && tu.substr(0, tu.length - 1) === uu) {
  103581. return tu;
  103582. }
  103583. output = this.toRelPath(this.path, relativeUri.path);
  103584. if (relativeUri.query) {
  103585. output += '?' + relativeUri.query;
  103586. }
  103587. if (relativeUri.anchor) {
  103588. output += '#' + relativeUri.anchor;
  103589. }
  103590. return output;
  103591. };
  103592. URI.prototype.toAbsolute = function (uri, noHost) {
  103593. var absoluteUri = new URI(uri, { base_uri: this });
  103594. return absoluteUri.getURI(noHost && this.isSameOrigin(absoluteUri));
  103595. };
  103596. URI.prototype.isSameOrigin = function (uri) {
  103597. if (this.host == uri.host && this.protocol == uri.protocol) {
  103598. if (this.port == uri.port) {
  103599. return true;
  103600. }
  103601. var defaultPort = DEFAULT_PORTS[this.protocol];
  103602. if (defaultPort && (this.port || defaultPort) == (uri.port || defaultPort)) {
  103603. return true;
  103604. }
  103605. }
  103606. return false;
  103607. };
  103608. URI.prototype.toRelPath = function (base, path) {
  103609. var breakPoint = 0, out = '', i, l;
  103610. var normalizedBase = base.substring(0, base.lastIndexOf('/')).split('/');
  103611. var items = path.split('/');
  103612. if (normalizedBase.length >= items.length) {
  103613. for (i = 0, l = normalizedBase.length; i < l; i++) {
  103614. if (i >= items.length || normalizedBase[i] !== items[i]) {
  103615. breakPoint = i + 1;
  103616. break;
  103617. }
  103618. }
  103619. }
  103620. if (normalizedBase.length < items.length) {
  103621. for (i = 0, l = items.length; i < l; i++) {
  103622. if (i >= normalizedBase.length || normalizedBase[i] !== items[i]) {
  103623. breakPoint = i + 1;
  103624. break;
  103625. }
  103626. }
  103627. }
  103628. if (breakPoint === 1) {
  103629. return path;
  103630. }
  103631. for (i = 0, l = normalizedBase.length - (breakPoint - 1); i < l; i++) {
  103632. out += '../';
  103633. }
  103634. for (i = breakPoint - 1, l = items.length; i < l; i++) {
  103635. if (i !== breakPoint - 1) {
  103636. out += '/' + items[i];
  103637. } else {
  103638. out += items[i];
  103639. }
  103640. }
  103641. return out;
  103642. };
  103643. URI.prototype.toAbsPath = function (base, path) {
  103644. var i, nb = 0, o = [], outPath;
  103645. var tr = /\/$/.test(path) ? '/' : '';
  103646. var normalizedBase = base.split('/');
  103647. var normalizedPath = path.split('/');
  103648. each$d(normalizedBase, function (k) {
  103649. if (k) {
  103650. o.push(k);
  103651. }
  103652. });
  103653. normalizedBase = o;
  103654. for (i = normalizedPath.length - 1, o = []; i >= 0; i--) {
  103655. if (normalizedPath[i].length === 0 || normalizedPath[i] === '.') {
  103656. continue;
  103657. }
  103658. if (normalizedPath[i] === '..') {
  103659. nb++;
  103660. continue;
  103661. }
  103662. if (nb > 0) {
  103663. nb--;
  103664. continue;
  103665. }
  103666. o.push(normalizedPath[i]);
  103667. }
  103668. i = normalizedBase.length - nb;
  103669. if (i <= 0) {
  103670. outPath = reverse(o).join('/');
  103671. } else {
  103672. outPath = normalizedBase.slice(0, i).join('/') + '/' + reverse(o).join('/');
  103673. }
  103674. if (outPath.indexOf('/') !== 0) {
  103675. outPath = '/' + outPath;
  103676. }
  103677. if (tr && outPath.lastIndexOf('/') !== outPath.length - 1) {
  103678. outPath += tr;
  103679. }
  103680. return outPath;
  103681. };
  103682. URI.prototype.getURI = function (noProtoHost) {
  103683. if (noProtoHost === void 0) {
  103684. noProtoHost = false;
  103685. }
  103686. var s;
  103687. if (!this.source || noProtoHost) {
  103688. s = '';
  103689. if (!noProtoHost) {
  103690. if (this.protocol) {
  103691. s += this.protocol + '://';
  103692. } else {
  103693. s += '//';
  103694. }
  103695. if (this.userInfo) {
  103696. s += this.userInfo + '@';
  103697. }
  103698. if (this.host) {
  103699. s += this.host;
  103700. }
  103701. if (this.port) {
  103702. s += ':' + this.port;
  103703. }
  103704. }
  103705. if (this.path) {
  103706. s += this.path;
  103707. }
  103708. if (this.query) {
  103709. s += '?' + this.query;
  103710. }
  103711. if (this.anchor) {
  103712. s += '#' + this.anchor;
  103713. }
  103714. this.source = s;
  103715. }
  103716. return this.source;
  103717. };
  103718. return URI;
  103719. }();
  103720. var filteredClobberElements = Tools.makeMap('button,fieldset,form,iframe,img,image,input,object,output,select,textarea');
  103721. var isValidPrefixAttrName = function (name) {
  103722. return name.indexOf('data-') === 0 || name.indexOf('aria-') === 0;
  103723. };
  103724. var findMatchingEndTagIndex = function (schema, html, startIndex) {
  103725. var startTagRegExp = /<([!?\/])?([A-Za-z0-9\-_:.]+)/g;
  103726. var endTagRegExp = /(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g;
  103727. var shortEndedElements = schema.getShortEndedElements();
  103728. var count = 1, index = startIndex;
  103729. while (count !== 0) {
  103730. startTagRegExp.lastIndex = index;
  103731. while (true) {
  103732. var startMatch = startTagRegExp.exec(html);
  103733. if (startMatch === null) {
  103734. return index;
  103735. } else if (startMatch[1] === '!') {
  103736. if (startsWith(startMatch[2], '--')) {
  103737. index = findCommentEndIndex(html, false, startMatch.index + '!--'.length);
  103738. } else {
  103739. index = findCommentEndIndex(html, true, startMatch.index + 1);
  103740. }
  103741. break;
  103742. } else {
  103743. endTagRegExp.lastIndex = startTagRegExp.lastIndex;
  103744. var endMatch = endTagRegExp.exec(html);
  103745. if (isNull(endMatch) || endMatch.index !== startTagRegExp.lastIndex) {
  103746. continue;
  103747. }
  103748. if (startMatch[1] === '/') {
  103749. count -= 1;
  103750. } else if (!has$2(shortEndedElements, startMatch[2])) {
  103751. count += 1;
  103752. }
  103753. index = startTagRegExp.lastIndex + endMatch[0].length;
  103754. break;
  103755. }
  103756. }
  103757. }
  103758. return index;
  103759. };
  103760. var isConditionalComment = function (html, startIndex) {
  103761. return /^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(html.substr(startIndex));
  103762. };
  103763. var findCommentEndIndex = function (html, isBogus, startIndex) {
  103764. if (startIndex === void 0) {
  103765. startIndex = 0;
  103766. }
  103767. var lcHtml = html.toLowerCase();
  103768. if (lcHtml.indexOf('[if ', startIndex) !== -1 && isConditionalComment(lcHtml, startIndex)) {
  103769. var endIfIndex = lcHtml.indexOf('[endif]', startIndex);
  103770. return lcHtml.indexOf('>', endIfIndex);
  103771. } else {
  103772. if (isBogus) {
  103773. var endIndex = lcHtml.indexOf('>', startIndex);
  103774. return endIndex !== -1 ? endIndex : lcHtml.length;
  103775. } else {
  103776. var endCommentRegexp = /--!?>/g;
  103777. endCommentRegexp.lastIndex = startIndex;
  103778. var match = endCommentRegexp.exec(html);
  103779. return match ? match.index + match[0].length : lcHtml.length;
  103780. }
  103781. }
  103782. };
  103783. var checkBogusAttribute = function (regExp, attrString) {
  103784. var matches = regExp.exec(attrString);
  103785. if (matches) {
  103786. var name_1 = matches[1];
  103787. var value = matches[2];
  103788. return typeof name_1 === 'string' && name_1.toLowerCase() === 'data-mce-bogus' ? value : null;
  103789. } else {
  103790. return null;
  103791. }
  103792. };
  103793. var SaxParser = function (settings, schema) {
  103794. var _a;
  103795. if (schema === void 0) {
  103796. schema = Schema();
  103797. }
  103798. settings = settings || {};
  103799. var doc = (_a = settings.document) !== null && _a !== void 0 ? _a : document;
  103800. var form = doc.createElement('form');
  103801. if (settings.fix_self_closing !== false) {
  103802. settings.fix_self_closing = true;
  103803. }
  103804. var comment = settings.comment ? settings.comment : noop;
  103805. var cdata = settings.cdata ? settings.cdata : noop;
  103806. var text = settings.text ? settings.text : noop;
  103807. var start = settings.start ? settings.start : noop;
  103808. var end = settings.end ? settings.end : noop;
  103809. var pi = settings.pi ? settings.pi : noop;
  103810. var doctype = settings.doctype ? settings.doctype : noop;
  103811. var parseInternal = function (base64Extract, format) {
  103812. if (format === void 0) {
  103813. format = 'html';
  103814. }
  103815. var html = base64Extract.html;
  103816. var matches, index = 0, value, endRegExp;
  103817. var stack = [];
  103818. var attrList, i, textData, name;
  103819. var isInternalElement, isShortEnded;
  103820. var elementRule, isValidElement, attr, attribsValue, validAttributesMap, validAttributePatterns;
  103821. var attributesRequired, attributesDefault, attributesForced;
  103822. var anyAttributesRequired, attrValue, idCount = 0;
  103823. var decode = Entities.decode;
  103824. var filteredUrlAttrs = Tools.makeMap('src,href,data,background,action,formaction,poster,xlink:href');
  103825. var parsingMode = format === 'html' ? 0 : 1;
  103826. var processEndTag = function (name) {
  103827. var pos, i;
  103828. pos = stack.length;
  103829. while (pos--) {
  103830. if (stack[pos].name === name) {
  103831. break;
  103832. }
  103833. }
  103834. if (pos >= 0) {
  103835. for (i = stack.length - 1; i >= pos; i--) {
  103836. name = stack[i];
  103837. if (name.valid) {
  103838. end(name.name);
  103839. }
  103840. }
  103841. stack.length = pos;
  103842. }
  103843. };
  103844. var processText = function (value, raw) {
  103845. return text(restoreDataUris(value, base64Extract), raw);
  103846. };
  103847. var processComment = function (value) {
  103848. if (value === '') {
  103849. return;
  103850. }
  103851. if (value.charAt(0) === '>') {
  103852. value = ' ' + value;
  103853. }
  103854. if (!settings.allow_conditional_comments && value.substr(0, 3).toLowerCase() === '[if') {
  103855. value = ' ' + value;
  103856. }
  103857. comment(restoreDataUris(value, base64Extract));
  103858. };
  103859. var processAttr = function (value) {
  103860. return restoreDataUris(value, base64Extract);
  103861. };
  103862. var processMalformedComment = function (value, startIndex) {
  103863. var startTag = value || '';
  103864. var isBogus = !startsWith(startTag, '--');
  103865. var endIndex = findCommentEndIndex(html, isBogus, startIndex);
  103866. value = html.substr(startIndex, endIndex - startIndex);
  103867. processComment(isBogus ? startTag + value : value);
  103868. return endIndex + 1;
  103869. };
  103870. var parseAttribute = function (tagName, name, value, val2, val3) {
  103871. name = name.toLowerCase();
  103872. value = processAttr(name in fillAttrsMap ? name : decode(value || val2 || val3 || ''));
  103873. if (validate && !isInternalElement && isValidPrefixAttrName(name) === false) {
  103874. var attrRule = validAttributesMap[name];
  103875. if (!attrRule && validAttributePatterns) {
  103876. var i_1 = validAttributePatterns.length;
  103877. while (i_1--) {
  103878. attrRule = validAttributePatterns[i_1];
  103879. if (attrRule.pattern.test(name)) {
  103880. break;
  103881. }
  103882. }
  103883. if (i_1 === -1) {
  103884. attrRule = null;
  103885. }
  103886. }
  103887. if (!attrRule) {
  103888. return;
  103889. }
  103890. if (attrRule.validValues && !(value in attrRule.validValues)) {
  103891. return;
  103892. }
  103893. }
  103894. var isNameOrId = name === 'name' || name === 'id';
  103895. if (isNameOrId && tagName in filteredClobberElements && (value in doc || value in form)) {
  103896. return;
  103897. }
  103898. if (filteredUrlAttrs[name] && !URI.isDomSafe(value, tagName, settings)) {
  103899. return;
  103900. }
  103901. if (isInternalElement && (name in filteredUrlAttrs || name.indexOf('on') === 0)) {
  103902. return;
  103903. }
  103904. attrList.map[name] = value;
  103905. attrList.push({
  103906. name: name,
  103907. value: value
  103908. });
  103909. };
  103910. var tokenRegExp = new RegExp('<(?:' + '(?:!--([\\w\\W]*?)--!?>)|' + '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + '(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|' + '(?:!(--)?)|' + '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + '(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|' + '(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^\'">]+(?:"[^"]*"|\'[^\']*\'))*[^"\'>]*(?:"[^">]*|\'[^\'>]*)?|\\s*|\\/)>)' + ')', 'g');
  103911. var attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;
  103912. var shortEndedElements = schema.getShortEndedElements();
  103913. var selfClosing = settings.self_closing_elements || schema.getSelfClosingElements();
  103914. var fillAttrsMap = schema.getBoolAttrs();
  103915. var validate = settings.validate;
  103916. var removeInternalElements = settings.remove_internals;
  103917. var fixSelfClosing = settings.fix_self_closing;
  103918. var specialElements = schema.getSpecialElements();
  103919. var processHtml = html + '>';
  103920. while (matches = tokenRegExp.exec(processHtml)) {
  103921. var matchText = matches[0];
  103922. if (index < matches.index) {
  103923. processText(decode(html.substr(index, matches.index - index)));
  103924. }
  103925. if (value = matches[7]) {
  103926. value = value.toLowerCase();
  103927. if (value.charAt(0) === ':') {
  103928. value = value.substr(1);
  103929. }
  103930. processEndTag(value);
  103931. } else if (value = matches[8]) {
  103932. if (matches.index + matchText.length > html.length) {
  103933. processText(decode(html.substr(matches.index)));
  103934. index = matches.index + matchText.length;
  103935. continue;
  103936. }
  103937. value = value.toLowerCase();
  103938. if (value.charAt(0) === ':') {
  103939. value = value.substr(1);
  103940. }
  103941. isShortEnded = value in shortEndedElements;
  103942. if (fixSelfClosing && selfClosing[value] && stack.length > 0 && stack[stack.length - 1].name === value) {
  103943. processEndTag(value);
  103944. }
  103945. var bogusValue = checkBogusAttribute(attrRegExp, matches[9]);
  103946. if (bogusValue !== null) {
  103947. if (bogusValue === 'all') {
  103948. index = findMatchingEndTagIndex(schema, html, tokenRegExp.lastIndex);
  103949. tokenRegExp.lastIndex = index;
  103950. continue;
  103951. }
  103952. isValidElement = false;
  103953. }
  103954. if (!validate || (elementRule = schema.getElementRule(value))) {
  103955. isValidElement = true;
  103956. if (validate) {
  103957. validAttributesMap = elementRule.attributes;
  103958. validAttributePatterns = elementRule.attributePatterns;
  103959. }
  103960. if (attribsValue = matches[9]) {
  103961. isInternalElement = attribsValue.indexOf('data-mce-type') !== -1;
  103962. if (isInternalElement && removeInternalElements) {
  103963. isValidElement = false;
  103964. }
  103965. attrList = [];
  103966. attrList.map = {};
  103967. attribsValue.replace(attrRegExp, function (match, name, val, val2, val3) {
  103968. parseAttribute(value, name, val, val2, val3);
  103969. return '';
  103970. });
  103971. } else {
  103972. attrList = [];
  103973. attrList.map = {};
  103974. }
  103975. if (validate && !isInternalElement) {
  103976. attributesRequired = elementRule.attributesRequired;
  103977. attributesDefault = elementRule.attributesDefault;
  103978. attributesForced = elementRule.attributesForced;
  103979. anyAttributesRequired = elementRule.removeEmptyAttrs;
  103980. if (anyAttributesRequired && !attrList.length) {
  103981. isValidElement = false;
  103982. }
  103983. if (attributesForced) {
  103984. i = attributesForced.length;
  103985. while (i--) {
  103986. attr = attributesForced[i];
  103987. name = attr.name;
  103988. attrValue = attr.value;
  103989. if (attrValue === '{$uid}') {
  103990. attrValue = 'mce_' + idCount++;
  103991. }
  103992. attrList.map[name] = attrValue;
  103993. attrList.push({
  103994. name: name,
  103995. value: attrValue
  103996. });
  103997. }
  103998. }
  103999. if (attributesDefault) {
  104000. i = attributesDefault.length;
  104001. while (i--) {
  104002. attr = attributesDefault[i];
  104003. name = attr.name;
  104004. if (!(name in attrList.map)) {
  104005. attrValue = attr.value;
  104006. if (attrValue === '{$uid}') {
  104007. attrValue = 'mce_' + idCount++;
  104008. }
  104009. attrList.map[name] = attrValue;
  104010. attrList.push({
  104011. name: name,
  104012. value: attrValue
  104013. });
  104014. }
  104015. }
  104016. }
  104017. if (attributesRequired) {
  104018. i = attributesRequired.length;
  104019. while (i--) {
  104020. if (attributesRequired[i] in attrList.map) {
  104021. break;
  104022. }
  104023. }
  104024. if (i === -1) {
  104025. isValidElement = false;
  104026. }
  104027. }
  104028. if (attr = attrList.map['data-mce-bogus']) {
  104029. if (attr === 'all') {
  104030. index = findMatchingEndTagIndex(schema, html, tokenRegExp.lastIndex);
  104031. tokenRegExp.lastIndex = index;
  104032. continue;
  104033. }
  104034. isValidElement = false;
  104035. }
  104036. }
  104037. if (isValidElement) {
  104038. start(value, attrList, isShortEnded);
  104039. }
  104040. } else {
  104041. isValidElement = false;
  104042. }
  104043. if (endRegExp = specialElements[value]) {
  104044. endRegExp.lastIndex = index = matches.index + matchText.length;
  104045. if (matches = endRegExp.exec(html)) {
  104046. if (isValidElement) {
  104047. textData = html.substr(index, matches.index - index);
  104048. }
  104049. index = matches.index + matches[0].length;
  104050. } else {
  104051. textData = html.substr(index);
  104052. index = html.length;
  104053. }
  104054. if (isValidElement) {
  104055. if (textData.length > 0) {
  104056. processText(textData, true);
  104057. }
  104058. end(value);
  104059. }
  104060. tokenRegExp.lastIndex = index;
  104061. continue;
  104062. }
  104063. if (!isShortEnded) {
  104064. if (!attribsValue || attribsValue.indexOf('/') !== attribsValue.length - 1) {
  104065. stack.push({
  104066. name: value,
  104067. valid: isValidElement
  104068. });
  104069. } else if (isValidElement) {
  104070. end(value);
  104071. }
  104072. }
  104073. } else if (value = matches[1]) {
  104074. processComment(value);
  104075. } else if (value = matches[2]) {
  104076. var isValidCdataSection = parsingMode === 1 || settings.preserve_cdata || stack.length > 0 && schema.isValidChild(stack[stack.length - 1].name, '#cdata');
  104077. if (isValidCdataSection) {
  104078. cdata(value);
  104079. } else {
  104080. index = processMalformedComment('', matches.index + 2);
  104081. tokenRegExp.lastIndex = index;
  104082. continue;
  104083. }
  104084. } else if (value = matches[3]) {
  104085. doctype(value);
  104086. } else if ((value = matches[4]) || matchText === '<!') {
  104087. index = processMalformedComment(value, matches.index + matchText.length);
  104088. tokenRegExp.lastIndex = index;
  104089. continue;
  104090. } else if (value = matches[5]) {
  104091. if (parsingMode === 1) {
  104092. pi(value, matches[6]);
  104093. } else {
  104094. index = processMalformedComment('?', matches.index + 2);
  104095. tokenRegExp.lastIndex = index;
  104096. continue;
  104097. }
  104098. }
  104099. index = matches.index + matchText.length;
  104100. }
  104101. if (index < html.length) {
  104102. processText(decode(html.substr(index)));
  104103. }
  104104. for (i = stack.length - 1; i >= 0; i--) {
  104105. value = stack[i];
  104106. if (value.valid) {
  104107. end(value.name);
  104108. }
  104109. }
  104110. };
  104111. var parse = function (html, format) {
  104112. if (format === void 0) {
  104113. format = 'html';
  104114. }
  104115. parseInternal(extractBase64DataUris(html), format);
  104116. };
  104117. return { parse: parse };
  104118. };
  104119. SaxParser.findEndTag = findMatchingEndTagIndex;
  104120. var trimHtml = function (tempAttrs, html) {
  104121. var trimContentRegExp = new RegExp(['\\s?(' + tempAttrs.join('|') + ')="[^"]+"'].join('|'), 'gi');
  104122. return html.replace(trimContentRegExp, '');
  104123. };
  104124. var trimInternal = function (serializer, html) {
  104125. var bogusAllRegExp = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g;
  104126. var schema = serializer.schema;
  104127. var content = trimHtml(serializer.getTempAttrs(), html);
  104128. var shortEndedElements = schema.getShortEndedElements();
  104129. var matches;
  104130. while (matches = bogusAllRegExp.exec(content)) {
  104131. var index = bogusAllRegExp.lastIndex;
  104132. var matchLength = matches[0].length;
  104133. var endTagIndex = void 0;
  104134. if (shortEndedElements[matches[1]]) {
  104135. endTagIndex = index;
  104136. } else {
  104137. endTagIndex = SaxParser.findEndTag(schema, content, index);
  104138. }
  104139. content = content.substring(0, index - matchLength) + content.substring(endTagIndex);
  104140. bogusAllRegExp.lastIndex = index - matchLength;
  104141. }
  104142. return trim$2(content);
  104143. };
  104144. var trimExternal = trimInternal;
  104145. var trimEmptyContents = function (editor, html) {
  104146. var blockName = getForcedRootBlock(editor);
  104147. var emptyRegExp = new RegExp('^(<' + blockName + '[^>]*>(&nbsp;|&#160;|\\s|\xA0|<br \\/>|)<\\/' + blockName + '>[\r\n]*|<br \\/>[\r\n]*)$');
  104148. return html.replace(emptyRegExp, '');
  104149. };
  104150. var setupArgs$3 = function (args, format) {
  104151. return __assign(__assign({}, args), {
  104152. format: format,
  104153. get: true,
  104154. getInner: true
  104155. });
  104156. };
  104157. var getContentFromBody = function (editor, args, format, body) {
  104158. var defaultedArgs = setupArgs$3(args, format);
  104159. var updatedArgs = args.no_events ? defaultedArgs : editor.fire('BeforeGetContent', defaultedArgs);
  104160. var content;
  104161. if (updatedArgs.format === 'raw') {
  104162. content = Tools.trim(trimExternal(editor.serializer, body.innerHTML));
  104163. } else if (updatedArgs.format === 'text') {
  104164. content = editor.dom.isEmpty(body) ? '' : trim$2(body.innerText || body.textContent);
  104165. } else if (updatedArgs.format === 'tree') {
  104166. content = editor.serializer.serialize(body, updatedArgs);
  104167. } else {
  104168. content = trimEmptyContents(editor, editor.serializer.serialize(body, updatedArgs));
  104169. }
  104170. if (!contains$3([
  104171. 'text',
  104172. 'tree'
  104173. ], updatedArgs.format) && !isWsPreserveElement(SugarElement.fromDom(body))) {
  104174. updatedArgs.content = Tools.trim(content);
  104175. } else {
  104176. updatedArgs.content = content;
  104177. }
  104178. if (updatedArgs.no_events) {
  104179. return updatedArgs.content;
  104180. } else {
  104181. return editor.fire('GetContent', updatedArgs).content;
  104182. }
  104183. };
  104184. var getContentInternal = function (editor, args, format) {
  104185. return Optional.from(editor.getBody()).fold(constant(args.format === 'tree' ? new AstNode('body', 11) : ''), function (body) {
  104186. return getContentFromBody(editor, args, format, body);
  104187. });
  104188. };
  104189. var each$c = Tools.each;
  104190. var ElementUtils = function (dom) {
  104191. var compare = function (node1, node2) {
  104192. if (node1.nodeName !== node2.nodeName) {
  104193. return false;
  104194. }
  104195. var getAttribs = function (node) {
  104196. var attribs = {};
  104197. each$c(dom.getAttribs(node), function (attr) {
  104198. var name = attr.nodeName.toLowerCase();
  104199. if (name.indexOf('_') !== 0 && name !== 'style' && name.indexOf('data-') !== 0) {
  104200. attribs[name] = dom.getAttrib(node, name);
  104201. }
  104202. });
  104203. return attribs;
  104204. };
  104205. var compareObjects = function (obj1, obj2) {
  104206. var value, name;
  104207. for (name in obj1) {
  104208. if (has$2(obj1, name)) {
  104209. value = obj2[name];
  104210. if (typeof value === 'undefined') {
  104211. return false;
  104212. }
  104213. if (obj1[name] !== value) {
  104214. return false;
  104215. }
  104216. delete obj2[name];
  104217. }
  104218. }
  104219. for (name in obj2) {
  104220. if (has$2(obj2, name)) {
  104221. return false;
  104222. }
  104223. }
  104224. return true;
  104225. };
  104226. if (!compareObjects(getAttribs(node1), getAttribs(node2))) {
  104227. return false;
  104228. }
  104229. if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) {
  104230. return false;
  104231. }
  104232. return !isBookmarkNode$1(node1) && !isBookmarkNode$1(node2);
  104233. };
  104234. return { compare: compare };
  104235. };
  104236. var makeMap$1 = Tools.makeMap;
  104237. var Writer = function (settings) {
  104238. var html = [];
  104239. settings = settings || {};
  104240. var indent = settings.indent;
  104241. var indentBefore = makeMap$1(settings.indent_before || '');
  104242. var indentAfter = makeMap$1(settings.indent_after || '');
  104243. var encode = Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities);
  104244. var htmlOutput = settings.element_format === 'html';
  104245. return {
  104246. start: function (name, attrs, empty) {
  104247. var i, l, attr, value;
  104248. if (indent && indentBefore[name] && html.length > 0) {
  104249. value = html[html.length - 1];
  104250. if (value.length > 0 && value !== '\n') {
  104251. html.push('\n');
  104252. }
  104253. }
  104254. html.push('<', name);
  104255. if (attrs) {
  104256. for (i = 0, l = attrs.length; i < l; i++) {
  104257. attr = attrs[i];
  104258. html.push(' ', attr.name, '="', encode(attr.value, true), '"');
  104259. }
  104260. }
  104261. if (!empty || htmlOutput) {
  104262. html[html.length] = '>';
  104263. } else {
  104264. html[html.length] = ' />';
  104265. }
  104266. if (empty && indent && indentAfter[name] && html.length > 0) {
  104267. value = html[html.length - 1];
  104268. if (value.length > 0 && value !== '\n') {
  104269. html.push('\n');
  104270. }
  104271. }
  104272. },
  104273. end: function (name) {
  104274. var value;
  104275. html.push('</', name, '>');
  104276. if (indent && indentAfter[name] && html.length > 0) {
  104277. value = html[html.length - 1];
  104278. if (value.length > 0 && value !== '\n') {
  104279. html.push('\n');
  104280. }
  104281. }
  104282. },
  104283. text: function (text, raw) {
  104284. if (text.length > 0) {
  104285. html[html.length] = raw ? text : encode(text);
  104286. }
  104287. },
  104288. cdata: function (text) {
  104289. html.push('<![CDATA[', text, ']]>');
  104290. },
  104291. comment: function (text) {
  104292. html.push('<!--', text, '-->');
  104293. },
  104294. pi: function (name, text) {
  104295. if (text) {
  104296. html.push('<?', name, ' ', encode(text), '?>');
  104297. } else {
  104298. html.push('<?', name, '?>');
  104299. }
  104300. if (indent) {
  104301. html.push('\n');
  104302. }
  104303. },
  104304. doctype: function (text) {
  104305. html.push('<!DOCTYPE', text, '>', indent ? '\n' : '');
  104306. },
  104307. reset: function () {
  104308. html.length = 0;
  104309. },
  104310. getContent: function () {
  104311. return html.join('').replace(/\n$/, '');
  104312. }
  104313. };
  104314. };
  104315. var HtmlSerializer = function (settings, schema) {
  104316. if (schema === void 0) {
  104317. schema = Schema();
  104318. }
  104319. var writer = Writer(settings);
  104320. settings = settings || {};
  104321. settings.validate = 'validate' in settings ? settings.validate : true;
  104322. var serialize = function (node) {
  104323. var validate = settings.validate;
  104324. var handlers = {
  104325. 3: function (node) {
  104326. writer.text(node.value, node.raw);
  104327. },
  104328. 8: function (node) {
  104329. writer.comment(node.value);
  104330. },
  104331. 7: function (node) {
  104332. writer.pi(node.name, node.value);
  104333. },
  104334. 10: function (node) {
  104335. writer.doctype(node.value);
  104336. },
  104337. 4: function (node) {
  104338. writer.cdata(node.value);
  104339. },
  104340. 11: function (node) {
  104341. if (node = node.firstChild) {
  104342. do {
  104343. walk(node);
  104344. } while (node = node.next);
  104345. }
  104346. }
  104347. };
  104348. writer.reset();
  104349. var walk = function (node) {
  104350. var handler = handlers[node.type];
  104351. if (!handler) {
  104352. var name_1 = node.name;
  104353. var isEmpty = node.shortEnded;
  104354. var attrs = node.attributes;
  104355. if (validate && attrs && attrs.length > 1) {
  104356. var sortedAttrs = [];
  104357. sortedAttrs.map = {};
  104358. var elementRule = schema.getElementRule(node.name);
  104359. if (elementRule) {
  104360. for (var i = 0, l = elementRule.attributesOrder.length; i < l; i++) {
  104361. var attrName = elementRule.attributesOrder[i];
  104362. if (attrName in attrs.map) {
  104363. var attrValue = attrs.map[attrName];
  104364. sortedAttrs.map[attrName] = attrValue;
  104365. sortedAttrs.push({
  104366. name: attrName,
  104367. value: attrValue
  104368. });
  104369. }
  104370. }
  104371. for (var i = 0, l = attrs.length; i < l; i++) {
  104372. var attrName = attrs[i].name;
  104373. if (!(attrName in sortedAttrs.map)) {
  104374. var attrValue = attrs.map[attrName];
  104375. sortedAttrs.map[attrName] = attrValue;
  104376. sortedAttrs.push({
  104377. name: attrName,
  104378. value: attrValue
  104379. });
  104380. }
  104381. }
  104382. attrs = sortedAttrs;
  104383. }
  104384. }
  104385. writer.start(node.name, attrs, isEmpty);
  104386. if (!isEmpty) {
  104387. if (node = node.firstChild) {
  104388. do {
  104389. walk(node);
  104390. } while (node = node.next);
  104391. }
  104392. writer.end(name_1);
  104393. }
  104394. } else {
  104395. handler(node);
  104396. }
  104397. };
  104398. if (node.type === 1 && !settings.inner) {
  104399. walk(node);
  104400. } else {
  104401. handlers[11](node);
  104402. }
  104403. return writer.getContent();
  104404. };
  104405. return { serialize: serialize };
  104406. };
  104407. var nonInheritableStyles = new Set();
  104408. (function () {
  104409. var nonInheritableStylesArr = [
  104410. 'margin',
  104411. 'margin-left',
  104412. 'margin-right',
  104413. 'margin-top',
  104414. 'margin-bottom',
  104415. 'padding',
  104416. 'padding-left',
  104417. 'padding-right',
  104418. 'padding-top',
  104419. 'padding-bottom',
  104420. 'border',
  104421. 'border-width',
  104422. 'border-style',
  104423. 'border-color',
  104424. 'background',
  104425. 'background-attachment',
  104426. 'background-clip',
  104427. 'background-color',
  104428. 'background-image',
  104429. 'background-origin',
  104430. 'background-position',
  104431. 'background-repeat',
  104432. 'background-size',
  104433. 'float',
  104434. 'position',
  104435. 'left',
  104436. 'right',
  104437. 'top',
  104438. 'bottom',
  104439. 'z-index',
  104440. 'display',
  104441. 'transform',
  104442. 'width',
  104443. 'max-width',
  104444. 'min-width',
  104445. 'height',
  104446. 'max-height',
  104447. 'min-height',
  104448. 'overflow',
  104449. 'overflow-x',
  104450. 'overflow-y',
  104451. 'text-overflow',
  104452. 'vertical-align',
  104453. 'transition',
  104454. 'transition-delay',
  104455. 'transition-duration',
  104456. 'transition-property',
  104457. 'transition-timing-function'
  104458. ];
  104459. each$k(nonInheritableStylesArr, function (style) {
  104460. nonInheritableStyles.add(style);
  104461. });
  104462. }());
  104463. var shorthandStyleProps = [
  104464. 'font',
  104465. 'text-decoration',
  104466. 'text-emphasis'
  104467. ];
  104468. var getStyleProps = function (dom, node) {
  104469. return keys(dom.parseStyle(dom.getAttrib(node, 'style')));
  104470. };
  104471. var isNonInheritableStyle = function (style) {
  104472. return nonInheritableStyles.has(style);
  104473. };
  104474. var hasInheritableStyles = function (dom, node) {
  104475. return forall(getStyleProps(dom, node), function (style) {
  104476. return !isNonInheritableStyle(style);
  104477. });
  104478. };
  104479. var getLonghandStyleProps = function (styles) {
  104480. return filter$4(styles, function (style) {
  104481. return exists(shorthandStyleProps, function (prop) {
  104482. return startsWith(style, prop);
  104483. });
  104484. });
  104485. };
  104486. var hasStyleConflict = function (dom, node, parentNode) {
  104487. var nodeStyleProps = getStyleProps(dom, node);
  104488. var parentNodeStyleProps = getStyleProps(dom, parentNode);
  104489. var valueMismatch = function (prop) {
  104490. var nodeValue = dom.getStyle(node, prop);
  104491. var parentValue = dom.getStyle(parentNode, prop);
  104492. return isNotEmpty(nodeValue) && isNotEmpty(parentValue) && nodeValue !== parentValue;
  104493. };
  104494. return exists(nodeStyleProps, function (nodeStyleProp) {
  104495. var propExists = function (props) {
  104496. return exists(props, function (prop) {
  104497. return prop === nodeStyleProp;
  104498. });
  104499. };
  104500. if (!propExists(parentNodeStyleProps) && propExists(shorthandStyleProps)) {
  104501. var longhandProps = getLonghandStyleProps(parentNodeStyleProps);
  104502. return exists(longhandProps, valueMismatch);
  104503. } else {
  104504. return valueMismatch(nodeStyleProp);
  104505. }
  104506. });
  104507. };
  104508. var isChar = function (forward, predicate, pos) {
  104509. return Optional.from(pos.container()).filter(isText$7).exists(function (text) {
  104510. var delta = forward ? 0 : -1;
  104511. return predicate(text.data.charAt(pos.offset() + delta));
  104512. });
  104513. };
  104514. var isBeforeSpace = curry(isChar, true, isWhiteSpace);
  104515. var isAfterSpace = curry(isChar, false, isWhiteSpace);
  104516. var isEmptyText = function (pos) {
  104517. var container = pos.container();
  104518. return isText$7(container) && (container.data.length === 0 || isZwsp(container.data) && BookmarkManager.isBookmarkNode(container.parentNode));
  104519. };
  104520. var matchesElementPosition = function (before, predicate) {
  104521. return function (pos) {
  104522. return Optional.from(getChildNodeAtRelativeOffset(before ? 0 : -1, pos)).filter(predicate).isSome();
  104523. };
  104524. };
  104525. var isImageBlock = function (node) {
  104526. return isImg(node) && get$5(SugarElement.fromDom(node), 'display') === 'block';
  104527. };
  104528. var isCefNode = function (node) {
  104529. return isContentEditableFalse$b(node) && !isBogusAll$1(node);
  104530. };
  104531. var isBeforeImageBlock = matchesElementPosition(true, isImageBlock);
  104532. var isAfterImageBlock = matchesElementPosition(false, isImageBlock);
  104533. var isBeforeMedia = matchesElementPosition(true, isMedia$2);
  104534. var isAfterMedia = matchesElementPosition(false, isMedia$2);
  104535. var isBeforeTable = matchesElementPosition(true, isTable$3);
  104536. var isAfterTable = matchesElementPosition(false, isTable$3);
  104537. var isBeforeContentEditableFalse = matchesElementPosition(true, isCefNode);
  104538. var isAfterContentEditableFalse = matchesElementPosition(false, isCefNode);
  104539. var getLastChildren = function (elm) {
  104540. var children = [];
  104541. var rawNode = elm.dom;
  104542. while (rawNode) {
  104543. children.push(SugarElement.fromDom(rawNode));
  104544. rawNode = rawNode.lastChild;
  104545. }
  104546. return children;
  104547. };
  104548. var removeTrailingBr = function (elm) {
  104549. var allBrs = descendants(elm, 'br');
  104550. var brs = filter$4(getLastChildren(elm).slice(-1), isBr$4);
  104551. if (allBrs.length === brs.length) {
  104552. each$k(brs, remove$7);
  104553. }
  104554. };
  104555. var fillWithPaddingBr = function (elm) {
  104556. empty(elm);
  104557. append$1(elm, SugarElement.fromHtml('<br data-mce-bogus="1">'));
  104558. };
  104559. var trimBlockTrailingBr = function (elm) {
  104560. lastChild(elm).each(function (lastChild) {
  104561. prevSibling(lastChild).each(function (lastChildPrevSibling) {
  104562. if (isBlock$2(elm) && isBr$4(lastChild) && isBlock$2(lastChildPrevSibling)) {
  104563. remove$7(lastChild);
  104564. }
  104565. });
  104566. });
  104567. };
  104568. var dropLast = function (xs) {
  104569. return xs.slice(0, -1);
  104570. };
  104571. var parentsUntil = function (start, root, predicate) {
  104572. if (contains$1(root, start)) {
  104573. return dropLast(parents$1(start, function (elm) {
  104574. return predicate(elm) || eq(elm, root);
  104575. }));
  104576. } else {
  104577. return [];
  104578. }
  104579. };
  104580. var parents = function (start, root) {
  104581. return parentsUntil(start, root, never);
  104582. };
  104583. var parentsAndSelf = function (start, root) {
  104584. return [start].concat(parents(start, root));
  104585. };
  104586. var navigateIgnoreEmptyTextNodes = function (forward, root, from) {
  104587. return navigateIgnore(forward, root, from, isEmptyText);
  104588. };
  104589. var getClosestBlock$1 = function (root, pos) {
  104590. return find$3(parentsAndSelf(SugarElement.fromDom(pos.container()), root), isBlock$2);
  104591. };
  104592. var isAtBeforeAfterBlockBoundary = function (forward, root, pos) {
  104593. return navigateIgnoreEmptyTextNodes(forward, root.dom, pos).forall(function (newPos) {
  104594. return getClosestBlock$1(root, pos).fold(function () {
  104595. return isInSameBlock(newPos, pos, root.dom) === false;
  104596. }, function (fromBlock) {
  104597. return isInSameBlock(newPos, pos, root.dom) === false && contains$1(fromBlock, SugarElement.fromDom(newPos.container()));
  104598. });
  104599. });
  104600. };
  104601. var isAtBlockBoundary = function (forward, root, pos) {
  104602. return getClosestBlock$1(root, pos).fold(function () {
  104603. return navigateIgnoreEmptyTextNodes(forward, root.dom, pos).forall(function (newPos) {
  104604. return isInSameBlock(newPos, pos, root.dom) === false;
  104605. });
  104606. }, function (parent) {
  104607. return navigateIgnoreEmptyTextNodes(forward, parent.dom, pos).isNone();
  104608. });
  104609. };
  104610. var isAtStartOfBlock = curry(isAtBlockBoundary, false);
  104611. var isAtEndOfBlock = curry(isAtBlockBoundary, true);
  104612. var isBeforeBlock = curry(isAtBeforeAfterBlockBoundary, false);
  104613. var isAfterBlock = curry(isAtBeforeAfterBlockBoundary, true);
  104614. var isBr = function (pos) {
  104615. return getElementFromPosition(pos).exists(isBr$4);
  104616. };
  104617. var findBr = function (forward, root, pos) {
  104618. var parentBlocks = filter$4(parentsAndSelf(SugarElement.fromDom(pos.container()), root), isBlock$2);
  104619. var scope = head(parentBlocks).getOr(root);
  104620. return fromPosition(forward, scope.dom, pos).filter(isBr);
  104621. };
  104622. var isBeforeBr$1 = function (root, pos) {
  104623. return getElementFromPosition(pos).exists(isBr$4) || findBr(true, root, pos).isSome();
  104624. };
  104625. var isAfterBr = function (root, pos) {
  104626. return getElementFromPrevPosition(pos).exists(isBr$4) || findBr(false, root, pos).isSome();
  104627. };
  104628. var findPreviousBr = curry(findBr, false);
  104629. var findNextBr = curry(findBr, true);
  104630. var isInMiddleOfText = function (pos) {
  104631. return CaretPosition.isTextPosition(pos) && !pos.isAtStart() && !pos.isAtEnd();
  104632. };
  104633. var getClosestBlock = function (root, pos) {
  104634. var parentBlocks = filter$4(parentsAndSelf(SugarElement.fromDom(pos.container()), root), isBlock$2);
  104635. return head(parentBlocks).getOr(root);
  104636. };
  104637. var hasSpaceBefore = function (root, pos) {
  104638. if (isInMiddleOfText(pos)) {
  104639. return isAfterSpace(pos);
  104640. } else {
  104641. return isAfterSpace(pos) || prevPosition(getClosestBlock(root, pos).dom, pos).exists(isAfterSpace);
  104642. }
  104643. };
  104644. var hasSpaceAfter = function (root, pos) {
  104645. if (isInMiddleOfText(pos)) {
  104646. return isBeforeSpace(pos);
  104647. } else {
  104648. return isBeforeSpace(pos) || nextPosition(getClosestBlock(root, pos).dom, pos).exists(isBeforeSpace);
  104649. }
  104650. };
  104651. var isPreValue = function (value) {
  104652. return contains$3([
  104653. 'pre',
  104654. 'pre-wrap'
  104655. ], value);
  104656. };
  104657. var isInPre = function (pos) {
  104658. return getElementFromPosition(pos).bind(function (elm) {
  104659. return closest$3(elm, isElement$6);
  104660. }).exists(function (elm) {
  104661. return isPreValue(get$5(elm, 'white-space'));
  104662. });
  104663. };
  104664. var isAtBeginningOfBody = function (root, pos) {
  104665. return prevPosition(root.dom, pos).isNone();
  104666. };
  104667. var isAtEndOfBody = function (root, pos) {
  104668. return nextPosition(root.dom, pos).isNone();
  104669. };
  104670. var isAtLineBoundary = function (root, pos) {
  104671. return isAtBeginningOfBody(root, pos) || isAtEndOfBody(root, pos) || isAtStartOfBlock(root, pos) || isAtEndOfBlock(root, pos) || isAfterBr(root, pos) || isBeforeBr$1(root, pos);
  104672. };
  104673. var needsToHaveNbsp = function (root, pos) {
  104674. if (isInPre(pos)) {
  104675. return false;
  104676. } else {
  104677. return isAtLineBoundary(root, pos) || hasSpaceBefore(root, pos) || hasSpaceAfter(root, pos);
  104678. }
  104679. };
  104680. var needsToBeNbspLeft = function (root, pos) {
  104681. if (isInPre(pos)) {
  104682. return false;
  104683. } else {
  104684. return isAtStartOfBlock(root, pos) || isBeforeBlock(root, pos) || isAfterBr(root, pos) || hasSpaceBefore(root, pos);
  104685. }
  104686. };
  104687. var leanRight = function (pos) {
  104688. var container = pos.container();
  104689. var offset = pos.offset();
  104690. if (isText$7(container) && offset < container.data.length) {
  104691. return CaretPosition(container, offset + 1);
  104692. } else {
  104693. return pos;
  104694. }
  104695. };
  104696. var needsToBeNbspRight = function (root, pos) {
  104697. if (isInPre(pos)) {
  104698. return false;
  104699. } else {
  104700. return isAtEndOfBlock(root, pos) || isAfterBlock(root, pos) || isBeforeBr$1(root, pos) || hasSpaceAfter(root, pos);
  104701. }
  104702. };
  104703. var needsToBeNbsp = function (root, pos) {
  104704. return needsToBeNbspLeft(root, pos) || needsToBeNbspRight(root, leanRight(pos));
  104705. };
  104706. var isNbspAt = function (text, offset) {
  104707. return isNbsp(text.charAt(offset));
  104708. };
  104709. var hasNbsp = function (pos) {
  104710. var container = pos.container();
  104711. return isText$7(container) && contains$2(container.data, nbsp);
  104712. };
  104713. var normalizeNbspMiddle = function (text) {
  104714. var chars = text.split('');
  104715. return map$3(chars, function (chr, i) {
  104716. if (isNbsp(chr) && i > 0 && i < chars.length - 1 && isContent(chars[i - 1]) && isContent(chars[i + 1])) {
  104717. return ' ';
  104718. } else {
  104719. return chr;
  104720. }
  104721. }).join('');
  104722. };
  104723. var normalizeNbspAtStart = function (root, node) {
  104724. var text = node.data;
  104725. var firstPos = CaretPosition(node, 0);
  104726. if (isNbspAt(text, 0) && !needsToBeNbsp(root, firstPos)) {
  104727. node.data = ' ' + text.slice(1);
  104728. return true;
  104729. } else {
  104730. return false;
  104731. }
  104732. };
  104733. var normalizeNbspInMiddleOfTextNode = function (node) {
  104734. var text = node.data;
  104735. var newText = normalizeNbspMiddle(text);
  104736. if (newText !== text) {
  104737. node.data = newText;
  104738. return true;
  104739. } else {
  104740. return false;
  104741. }
  104742. };
  104743. var normalizeNbspAtEnd = function (root, node) {
  104744. var text = node.data;
  104745. var lastPos = CaretPosition(node, text.length - 1);
  104746. if (isNbspAt(text, text.length - 1) && !needsToBeNbsp(root, lastPos)) {
  104747. node.data = text.slice(0, -1) + ' ';
  104748. return true;
  104749. } else {
  104750. return false;
  104751. }
  104752. };
  104753. var normalizeNbsps = function (root, pos) {
  104754. return Optional.some(pos).filter(hasNbsp).bind(function (pos) {
  104755. var container = pos.container();
  104756. var normalized = normalizeNbspAtStart(root, container) || normalizeNbspInMiddleOfTextNode(container) || normalizeNbspAtEnd(root, container);
  104757. return normalized ? Optional.some(pos) : Optional.none();
  104758. });
  104759. };
  104760. var normalizeNbspsInEditor = function (editor) {
  104761. var root = SugarElement.fromDom(editor.getBody());
  104762. if (editor.selection.isCollapsed()) {
  104763. normalizeNbsps(root, CaretPosition.fromRangeStart(editor.selection.getRng())).each(function (pos) {
  104764. editor.selection.setRng(pos.toRange());
  104765. });
  104766. }
  104767. };
  104768. var normalizeContent = function (content, isStartOfContent, isEndOfContent) {
  104769. var result = foldl(content, function (acc, c) {
  104770. if (isWhiteSpace(c) || isNbsp(c)) {
  104771. if (acc.previousCharIsSpace || acc.str === '' && isStartOfContent || acc.str.length === content.length - 1 && isEndOfContent) {
  104772. return {
  104773. previousCharIsSpace: false,
  104774. str: acc.str + nbsp
  104775. };
  104776. } else {
  104777. return {
  104778. previousCharIsSpace: true,
  104779. str: acc.str + ' '
  104780. };
  104781. }
  104782. } else {
  104783. return {
  104784. previousCharIsSpace: false,
  104785. str: acc.str + c
  104786. };
  104787. }
  104788. }, {
  104789. previousCharIsSpace: false,
  104790. str: ''
  104791. });
  104792. return result.str;
  104793. };
  104794. var normalize$1 = function (node, offset, count) {
  104795. if (count === 0) {
  104796. return;
  104797. }
  104798. var elm = SugarElement.fromDom(node);
  104799. var root = ancestor$3(elm, isBlock$2).getOr(elm);
  104800. var whitespace = node.data.slice(offset, offset + count);
  104801. var isEndOfContent = offset + count >= node.data.length && needsToBeNbspRight(root, CaretPosition(node, node.data.length));
  104802. var isStartOfContent = offset === 0 && needsToBeNbspLeft(root, CaretPosition(node, 0));
  104803. node.replaceData(offset, count, normalizeContent(whitespace, isStartOfContent, isEndOfContent));
  104804. };
  104805. var normalizeWhitespaceAfter = function (node, offset) {
  104806. var content = node.data.slice(offset);
  104807. var whitespaceCount = content.length - lTrim(content).length;
  104808. normalize$1(node, offset, whitespaceCount);
  104809. };
  104810. var normalizeWhitespaceBefore = function (node, offset) {
  104811. var content = node.data.slice(0, offset);
  104812. var whitespaceCount = content.length - rTrim(content).length;
  104813. normalize$1(node, offset - whitespaceCount, whitespaceCount);
  104814. };
  104815. var mergeTextNodes = function (prevNode, nextNode, normalizeWhitespace, mergeToPrev) {
  104816. if (mergeToPrev === void 0) {
  104817. mergeToPrev = true;
  104818. }
  104819. var whitespaceOffset = rTrim(prevNode.data).length;
  104820. var newNode = mergeToPrev ? prevNode : nextNode;
  104821. var removeNode = mergeToPrev ? nextNode : prevNode;
  104822. if (mergeToPrev) {
  104823. newNode.appendData(removeNode.data);
  104824. } else {
  104825. newNode.insertData(0, removeNode.data);
  104826. }
  104827. remove$7(SugarElement.fromDom(removeNode));
  104828. if (normalizeWhitespace) {
  104829. normalizeWhitespaceAfter(newNode, whitespaceOffset);
  104830. }
  104831. return newNode;
  104832. };
  104833. var needsReposition = function (pos, elm) {
  104834. var container = pos.container();
  104835. var offset = pos.offset();
  104836. return CaretPosition.isTextPosition(pos) === false && container === elm.parentNode && offset > CaretPosition.before(elm).offset();
  104837. };
  104838. var reposition = function (elm, pos) {
  104839. return needsReposition(pos, elm) ? CaretPosition(pos.container(), pos.offset() - 1) : pos;
  104840. };
  104841. var beforeOrStartOf = function (node) {
  104842. return isText$7(node) ? CaretPosition(node, 0) : CaretPosition.before(node);
  104843. };
  104844. var afterOrEndOf = function (node) {
  104845. return isText$7(node) ? CaretPosition(node, node.data.length) : CaretPosition.after(node);
  104846. };
  104847. var getPreviousSiblingCaretPosition = function (elm) {
  104848. if (isCaretCandidate$3(elm.previousSibling)) {
  104849. return Optional.some(afterOrEndOf(elm.previousSibling));
  104850. } else {
  104851. return elm.previousSibling ? lastPositionIn(elm.previousSibling) : Optional.none();
  104852. }
  104853. };
  104854. var getNextSiblingCaretPosition = function (elm) {
  104855. if (isCaretCandidate$3(elm.nextSibling)) {
  104856. return Optional.some(beforeOrStartOf(elm.nextSibling));
  104857. } else {
  104858. return elm.nextSibling ? firstPositionIn(elm.nextSibling) : Optional.none();
  104859. }
  104860. };
  104861. var findCaretPositionBackwardsFromElm = function (rootElement, elm) {
  104862. var startPosition = CaretPosition.before(elm.previousSibling ? elm.previousSibling : elm.parentNode);
  104863. return prevPosition(rootElement, startPosition).fold(function () {
  104864. return nextPosition(rootElement, CaretPosition.after(elm));
  104865. }, Optional.some);
  104866. };
  104867. var findCaretPositionForwardsFromElm = function (rootElement, elm) {
  104868. return nextPosition(rootElement, CaretPosition.after(elm)).fold(function () {
  104869. return prevPosition(rootElement, CaretPosition.before(elm));
  104870. }, Optional.some);
  104871. };
  104872. var findCaretPositionBackwards = function (rootElement, elm) {
  104873. return getPreviousSiblingCaretPosition(elm).orThunk(function () {
  104874. return getNextSiblingCaretPosition(elm);
  104875. }).orThunk(function () {
  104876. return findCaretPositionBackwardsFromElm(rootElement, elm);
  104877. });
  104878. };
  104879. var findCaretPositionForward = function (rootElement, elm) {
  104880. return getNextSiblingCaretPosition(elm).orThunk(function () {
  104881. return getPreviousSiblingCaretPosition(elm);
  104882. }).orThunk(function () {
  104883. return findCaretPositionForwardsFromElm(rootElement, elm);
  104884. });
  104885. };
  104886. var findCaretPosition = function (forward, rootElement, elm) {
  104887. return forward ? findCaretPositionForward(rootElement, elm) : findCaretPositionBackwards(rootElement, elm);
  104888. };
  104889. var findCaretPosOutsideElmAfterDelete = function (forward, rootElement, elm) {
  104890. return findCaretPosition(forward, rootElement, elm).map(curry(reposition, elm));
  104891. };
  104892. var setSelection$1 = function (editor, forward, pos) {
  104893. pos.fold(function () {
  104894. editor.focus();
  104895. }, function (pos) {
  104896. editor.selection.setRng(pos.toRange(), forward);
  104897. });
  104898. };
  104899. var eqRawNode = function (rawNode) {
  104900. return function (elm) {
  104901. return elm.dom === rawNode;
  104902. };
  104903. };
  104904. var isBlock = function (editor, elm) {
  104905. return elm && has$2(editor.schema.getBlockElements(), name(elm));
  104906. };
  104907. var paddEmptyBlock = function (elm) {
  104908. if (isEmpty$2(elm)) {
  104909. var br = SugarElement.fromHtml('<br data-mce-bogus="1">');
  104910. empty(elm);
  104911. append$1(elm, br);
  104912. return Optional.some(CaretPosition.before(br.dom));
  104913. } else {
  104914. return Optional.none();
  104915. }
  104916. };
  104917. var deleteNormalized = function (elm, afterDeletePosOpt, normalizeWhitespace) {
  104918. var prevTextOpt = prevSibling(elm).filter(isText$8);
  104919. var nextTextOpt = nextSibling(elm).filter(isText$8);
  104920. remove$7(elm);
  104921. return lift3(prevTextOpt, nextTextOpt, afterDeletePosOpt, function (prev, next, pos) {
  104922. var prevNode = prev.dom, nextNode = next.dom;
  104923. var offset = prevNode.data.length;
  104924. mergeTextNodes(prevNode, nextNode, normalizeWhitespace);
  104925. return pos.container() === nextNode ? CaretPosition(prevNode, offset) : pos;
  104926. }).orThunk(function () {
  104927. if (normalizeWhitespace) {
  104928. prevTextOpt.each(function (elm) {
  104929. return normalizeWhitespaceBefore(elm.dom, elm.dom.length);
  104930. });
  104931. nextTextOpt.each(function (elm) {
  104932. return normalizeWhitespaceAfter(elm.dom, 0);
  104933. });
  104934. }
  104935. return afterDeletePosOpt;
  104936. });
  104937. };
  104938. var isInlineElement = function (editor, element) {
  104939. return has$2(editor.schema.getTextInlineElements(), name(element));
  104940. };
  104941. var deleteElement$2 = function (editor, forward, elm, moveCaret) {
  104942. if (moveCaret === void 0) {
  104943. moveCaret = true;
  104944. }
  104945. var afterDeletePos = findCaretPosOutsideElmAfterDelete(forward, editor.getBody(), elm.dom);
  104946. var parentBlock = ancestor$3(elm, curry(isBlock, editor), eqRawNode(editor.getBody()));
  104947. var normalizedAfterDeletePos = deleteNormalized(elm, afterDeletePos, isInlineElement(editor, elm));
  104948. if (editor.dom.isEmpty(editor.getBody())) {
  104949. editor.setContent('');
  104950. editor.selection.setCursorLocation();
  104951. } else {
  104952. parentBlock.bind(paddEmptyBlock).fold(function () {
  104953. if (moveCaret) {
  104954. setSelection$1(editor, forward, normalizedAfterDeletePos);
  104955. }
  104956. }, function (paddPos) {
  104957. if (moveCaret) {
  104958. setSelection$1(editor, forward, Optional.some(paddPos));
  104959. }
  104960. });
  104961. }
  104962. };
  104963. var isRootFromElement = function (root) {
  104964. return function (cur) {
  104965. return eq(root, cur);
  104966. };
  104967. };
  104968. var getTableCells = function (table) {
  104969. return descendants(table, 'td,th');
  104970. };
  104971. var getTableDetailsFromRange = function (rng, isRoot) {
  104972. var getTable = function (node) {
  104973. return getClosestTable(SugarElement.fromDom(node), isRoot);
  104974. };
  104975. var startTable = getTable(rng.startContainer);
  104976. var endTable = getTable(rng.endContainer);
  104977. var isStartInTable = startTable.isSome();
  104978. var isEndInTable = endTable.isSome();
  104979. var isSameTable = lift2(startTable, endTable, eq).getOr(false);
  104980. var isMultiTable = !isSameTable && isStartInTable && isEndInTable;
  104981. return {
  104982. startTable: startTable,
  104983. endTable: endTable,
  104984. isStartInTable: isStartInTable,
  104985. isEndInTable: isEndInTable,
  104986. isSameTable: isSameTable,
  104987. isMultiTable: isMultiTable
  104988. };
  104989. };
  104990. var tableCellRng = function (start, end) {
  104991. return {
  104992. start: start,
  104993. end: end
  104994. };
  104995. };
  104996. var tableSelection = function (rng, table, cells) {
  104997. return {
  104998. rng: rng,
  104999. table: table,
  105000. cells: cells
  105001. };
  105002. };
  105003. var deleteAction = Adt.generate([
  105004. {
  105005. singleCellTable: [
  105006. 'rng',
  105007. 'cell'
  105008. ]
  105009. },
  105010. { fullTable: ['table'] },
  105011. {
  105012. partialTable: [
  105013. 'cells',
  105014. 'outsideDetails'
  105015. ]
  105016. },
  105017. {
  105018. multiTable: [
  105019. 'startTableCells',
  105020. 'endTableCells',
  105021. 'betweenRng'
  105022. ]
  105023. }
  105024. ]);
  105025. var getClosestCell$1 = function (container, isRoot) {
  105026. return closest$2(SugarElement.fromDom(container), 'td,th', isRoot);
  105027. };
  105028. var isExpandedCellRng = function (cellRng) {
  105029. return !eq(cellRng.start, cellRng.end);
  105030. };
  105031. var getTableFromCellRng = function (cellRng, isRoot) {
  105032. return getClosestTable(cellRng.start, isRoot).bind(function (startParentTable) {
  105033. return getClosestTable(cellRng.end, isRoot).bind(function (endParentTable) {
  105034. return someIf(eq(startParentTable, endParentTable), startParentTable);
  105035. });
  105036. });
  105037. };
  105038. var isSingleCellTable = function (cellRng, isRoot) {
  105039. return !isExpandedCellRng(cellRng) && getTableFromCellRng(cellRng, isRoot).exists(function (table) {
  105040. var rows = table.dom.rows;
  105041. return rows.length === 1 && rows[0].cells.length === 1;
  105042. });
  105043. };
  105044. var getCellRng = function (rng, isRoot) {
  105045. var startCell = getClosestCell$1(rng.startContainer, isRoot);
  105046. var endCell = getClosestCell$1(rng.endContainer, isRoot);
  105047. return lift2(startCell, endCell, tableCellRng);
  105048. };
  105049. var getCellRangeFromStartTable = function (isRoot) {
  105050. return function (startCell) {
  105051. return getClosestTable(startCell, isRoot).bind(function (table) {
  105052. return last$2(getTableCells(table)).map(function (endCell) {
  105053. return tableCellRng(startCell, endCell);
  105054. });
  105055. });
  105056. };
  105057. };
  105058. var getCellRangeFromEndTable = function (isRoot) {
  105059. return function (endCell) {
  105060. return getClosestTable(endCell, isRoot).bind(function (table) {
  105061. return head(getTableCells(table)).map(function (startCell) {
  105062. return tableCellRng(startCell, endCell);
  105063. });
  105064. });
  105065. };
  105066. };
  105067. var getTableSelectionFromCellRng = function (isRoot) {
  105068. return function (cellRng) {
  105069. return getTableFromCellRng(cellRng, isRoot).map(function (table) {
  105070. return tableSelection(cellRng, table, getTableCells(table));
  105071. });
  105072. };
  105073. };
  105074. var getTableSelections = function (cellRng, selectionDetails, rng, isRoot) {
  105075. if (rng.collapsed || !cellRng.forall(isExpandedCellRng)) {
  105076. return Optional.none();
  105077. } else if (selectionDetails.isSameTable) {
  105078. var sameTableSelection = cellRng.bind(getTableSelectionFromCellRng(isRoot));
  105079. return Optional.some({
  105080. start: sameTableSelection,
  105081. end: sameTableSelection
  105082. });
  105083. } else {
  105084. var startCell = getClosestCell$1(rng.startContainer, isRoot);
  105085. var endCell = getClosestCell$1(rng.endContainer, isRoot);
  105086. var startTableSelection = startCell.bind(getCellRangeFromStartTable(isRoot)).bind(getTableSelectionFromCellRng(isRoot));
  105087. var endTableSelection = endCell.bind(getCellRangeFromEndTable(isRoot)).bind(getTableSelectionFromCellRng(isRoot));
  105088. return Optional.some({
  105089. start: startTableSelection,
  105090. end: endTableSelection
  105091. });
  105092. }
  105093. };
  105094. var getCellIndex = function (cells, cell) {
  105095. return findIndex$2(cells, function (x) {
  105096. return eq(x, cell);
  105097. });
  105098. };
  105099. var getSelectedCells = function (tableSelection) {
  105100. return lift2(getCellIndex(tableSelection.cells, tableSelection.rng.start), getCellIndex(tableSelection.cells, tableSelection.rng.end), function (startIndex, endIndex) {
  105101. return tableSelection.cells.slice(startIndex, endIndex + 1);
  105102. });
  105103. };
  105104. var isSingleCellTableContentSelected = function (optCellRng, rng, isRoot) {
  105105. return optCellRng.exists(function (cellRng) {
  105106. return isSingleCellTable(cellRng, isRoot) && hasAllContentsSelected(cellRng.start, rng);
  105107. });
  105108. };
  105109. var unselectCells = function (rng, selectionDetails) {
  105110. var startTable = selectionDetails.startTable, endTable = selectionDetails.endTable;
  105111. var otherContentRng = rng.cloneRange();
  105112. startTable.each(function (table) {
  105113. return otherContentRng.setStartAfter(table.dom);
  105114. });
  105115. endTable.each(function (table) {
  105116. return otherContentRng.setEndBefore(table.dom);
  105117. });
  105118. return otherContentRng;
  105119. };
  105120. var handleSingleTable = function (cellRng, selectionDetails, rng, isRoot) {
  105121. return getTableSelections(cellRng, selectionDetails, rng, isRoot).bind(function (_a) {
  105122. var start = _a.start, end = _a.end;
  105123. return start.or(end);
  105124. }).bind(function (tableSelection) {
  105125. var isSameTable = selectionDetails.isSameTable;
  105126. var selectedCells = getSelectedCells(tableSelection).getOr([]);
  105127. if (isSameTable && tableSelection.cells.length === selectedCells.length) {
  105128. return Optional.some(deleteAction.fullTable(tableSelection.table));
  105129. } else if (selectedCells.length > 0) {
  105130. if (isSameTable) {
  105131. return Optional.some(deleteAction.partialTable(selectedCells, Optional.none()));
  105132. } else {
  105133. var otherContentRng = unselectCells(rng, selectionDetails);
  105134. return Optional.some(deleteAction.partialTable(selectedCells, Optional.some(__assign(__assign({}, selectionDetails), { rng: otherContentRng }))));
  105135. }
  105136. } else {
  105137. return Optional.none();
  105138. }
  105139. });
  105140. };
  105141. var handleMultiTable = function (cellRng, selectionDetails, rng, isRoot) {
  105142. return getTableSelections(cellRng, selectionDetails, rng, isRoot).bind(function (_a) {
  105143. var start = _a.start, end = _a.end;
  105144. var startTableSelectedCells = start.bind(getSelectedCells).getOr([]);
  105145. var endTableSelectedCells = end.bind(getSelectedCells).getOr([]);
  105146. if (startTableSelectedCells.length > 0 && endTableSelectedCells.length > 0) {
  105147. var otherContentRng = unselectCells(rng, selectionDetails);
  105148. return Optional.some(deleteAction.multiTable(startTableSelectedCells, endTableSelectedCells, otherContentRng));
  105149. } else {
  105150. return Optional.none();
  105151. }
  105152. });
  105153. };
  105154. var getActionFromRange = function (root, rng) {
  105155. var isRoot = isRootFromElement(root);
  105156. var optCellRng = getCellRng(rng, isRoot);
  105157. var selectionDetails = getTableDetailsFromRange(rng, isRoot);
  105158. if (isSingleCellTableContentSelected(optCellRng, rng, isRoot)) {
  105159. return optCellRng.map(function (cellRng) {
  105160. return deleteAction.singleCellTable(rng, cellRng.start);
  105161. });
  105162. } else if (selectionDetails.isMultiTable) {
  105163. return handleMultiTable(optCellRng, selectionDetails, rng, isRoot);
  105164. } else {
  105165. return handleSingleTable(optCellRng, selectionDetails, rng, isRoot);
  105166. }
  105167. };
  105168. var freefallRtl = function (root) {
  105169. var child = isComment$1(root) ? prevSibling(root) : lastChild(root);
  105170. return child.bind(freefallRtl).orThunk(function () {
  105171. return Optional.some(root);
  105172. });
  105173. };
  105174. var cleanCells = function (cells) {
  105175. return each$k(cells, function (cell) {
  105176. remove$6(cell, 'contenteditable');
  105177. fillWithPaddingBr(cell);
  105178. });
  105179. };
  105180. var getOutsideBlock = function (editor, container) {
  105181. return Optional.from(editor.dom.getParent(container, editor.dom.isBlock)).map(SugarElement.fromDom);
  105182. };
  105183. var handleEmptyBlock = function (editor, startInTable, emptyBlock) {
  105184. emptyBlock.each(function (block) {
  105185. if (startInTable) {
  105186. remove$7(block);
  105187. } else {
  105188. fillWithPaddingBr(block);
  105189. editor.selection.setCursorLocation(block.dom, 0);
  105190. }
  105191. });
  105192. };
  105193. var deleteContentInsideCell = function (editor, cell, rng, isFirstCellInSelection) {
  105194. var insideTableRng = rng.cloneRange();
  105195. if (isFirstCellInSelection) {
  105196. insideTableRng.setStart(rng.startContainer, rng.startOffset);
  105197. insideTableRng.setEndAfter(cell.dom.lastChild);
  105198. } else {
  105199. insideTableRng.setStartBefore(cell.dom.firstChild);
  105200. insideTableRng.setEnd(rng.endContainer, rng.endOffset);
  105201. }
  105202. deleteCellContents(editor, insideTableRng, cell, false);
  105203. };
  105204. var collapseAndRestoreCellSelection = function (editor) {
  105205. var selectedCells = getCellsFromEditor(editor);
  105206. var selectedNode = SugarElement.fromDom(editor.selection.getNode());
  105207. if (isTableCell$5(selectedNode.dom) && isEmpty$2(selectedNode)) {
  105208. editor.selection.setCursorLocation(selectedNode.dom, 0);
  105209. } else {
  105210. editor.selection.collapse(true);
  105211. }
  105212. if (selectedCells.length > 1 && exists(selectedCells, function (cell) {
  105213. return eq(cell, selectedNode);
  105214. })) {
  105215. set$1(selectedNode, 'data-mce-selected', '1');
  105216. }
  105217. };
  105218. var emptySingleTableCells = function (editor, cells, outsideDetails) {
  105219. var editorRng = editor.selection.getRng();
  105220. var cellsToClean = outsideDetails.bind(function (_a) {
  105221. var rng = _a.rng, isStartInTable = _a.isStartInTable;
  105222. var outsideBlock = getOutsideBlock(editor, isStartInTable ? rng.endContainer : rng.startContainer);
  105223. rng.deleteContents();
  105224. handleEmptyBlock(editor, isStartInTable, outsideBlock.filter(isEmpty$2));
  105225. var endPointCell = isStartInTable ? cells[0] : cells[cells.length - 1];
  105226. deleteContentInsideCell(editor, endPointCell, editorRng, isStartInTable);
  105227. if (!isEmpty$2(endPointCell)) {
  105228. return Optional.some(isStartInTable ? cells.slice(1) : cells.slice(0, -1));
  105229. } else {
  105230. return Optional.none();
  105231. }
  105232. }).getOr(cells);
  105233. cleanCells(cellsToClean);
  105234. collapseAndRestoreCellSelection(editor);
  105235. return true;
  105236. };
  105237. var emptyMultiTableCells = function (editor, startTableCells, endTableCells, betweenRng) {
  105238. var rng = editor.selection.getRng();
  105239. var startCell = startTableCells[0];
  105240. var endCell = endTableCells[endTableCells.length - 1];
  105241. deleteContentInsideCell(editor, startCell, rng, true);
  105242. deleteContentInsideCell(editor, endCell, rng, false);
  105243. var startTableCellsToClean = isEmpty$2(startCell) ? startTableCells : startTableCells.slice(1);
  105244. var endTableCellsToClean = isEmpty$2(endCell) ? endTableCells : endTableCells.slice(0, -1);
  105245. cleanCells(startTableCellsToClean.concat(endTableCellsToClean));
  105246. betweenRng.deleteContents();
  105247. collapseAndRestoreCellSelection(editor);
  105248. return true;
  105249. };
  105250. var deleteCellContents = function (editor, rng, cell, moveSelection) {
  105251. if (moveSelection === void 0) {
  105252. moveSelection = true;
  105253. }
  105254. rng.deleteContents();
  105255. var lastNode = freefallRtl(cell).getOr(cell);
  105256. var lastBlock = SugarElement.fromDom(editor.dom.getParent(lastNode.dom, editor.dom.isBlock));
  105257. if (isEmpty$2(lastBlock)) {
  105258. fillWithPaddingBr(lastBlock);
  105259. if (moveSelection) {
  105260. editor.selection.setCursorLocation(lastBlock.dom, 0);
  105261. }
  105262. }
  105263. if (!eq(cell, lastBlock)) {
  105264. var additionalCleanupNodes = is$1(parent(lastBlock), cell) ? [] : siblings(lastBlock);
  105265. each$k(additionalCleanupNodes.concat(children(cell)), function (node) {
  105266. if (!eq(node, lastBlock) && !contains$1(node, lastBlock) && isEmpty$2(node)) {
  105267. remove$7(node);
  105268. }
  105269. });
  105270. }
  105271. return true;
  105272. };
  105273. var deleteTableElement = function (editor, table) {
  105274. deleteElement$2(editor, false, table);
  105275. return true;
  105276. };
  105277. var deleteCellRange = function (editor, rootElm, rng) {
  105278. return getActionFromRange(rootElm, rng).map(function (action) {
  105279. return action.fold(curry(deleteCellContents, editor), curry(deleteTableElement, editor), curry(emptySingleTableCells, editor), curry(emptyMultiTableCells, editor));
  105280. });
  105281. };
  105282. var deleteCaptionRange = function (editor, caption) {
  105283. return emptyElement(editor, caption);
  105284. };
  105285. var deleteTableRange = function (editor, rootElm, rng, startElm) {
  105286. return getParentCaption(rootElm, startElm).fold(function () {
  105287. return deleteCellRange(editor, rootElm, rng);
  105288. }, function (caption) {
  105289. return deleteCaptionRange(editor, caption);
  105290. }).getOr(false);
  105291. };
  105292. var deleteRange$2 = function (editor, startElm, selectedCells) {
  105293. var rootNode = SugarElement.fromDom(editor.getBody());
  105294. var rng = editor.selection.getRng();
  105295. return selectedCells.length !== 0 ? emptySingleTableCells(editor, selectedCells, Optional.none()) : deleteTableRange(editor, rootNode, rng, startElm);
  105296. };
  105297. var getParentCell = function (rootElm, elm) {
  105298. return find$3(parentsAndSelf(elm, rootElm), isTableCell$4);
  105299. };
  105300. var getParentCaption = function (rootElm, elm) {
  105301. return find$3(parentsAndSelf(elm, rootElm), isTag('caption'));
  105302. };
  105303. var deleteBetweenCells = function (editor, rootElm, forward, fromCell, from) {
  105304. return navigate(forward, editor.getBody(), from).bind(function (to) {
  105305. return getParentCell(rootElm, SugarElement.fromDom(to.getNode())).map(function (toCell) {
  105306. return eq(toCell, fromCell) === false;
  105307. });
  105308. });
  105309. };
  105310. var emptyElement = function (editor, elm) {
  105311. fillWithPaddingBr(elm);
  105312. editor.selection.setCursorLocation(elm.dom, 0);
  105313. return Optional.some(true);
  105314. };
  105315. var isDeleteOfLastCharPos = function (fromCaption, forward, from, to) {
  105316. return firstPositionIn(fromCaption.dom).bind(function (first) {
  105317. return lastPositionIn(fromCaption.dom).map(function (last) {
  105318. return forward ? from.isEqual(first) && to.isEqual(last) : from.isEqual(last) && to.isEqual(first);
  105319. });
  105320. }).getOr(true);
  105321. };
  105322. var emptyCaretCaption = function (editor, elm) {
  105323. return emptyElement(editor, elm);
  105324. };
  105325. var validateCaretCaption = function (rootElm, fromCaption, to) {
  105326. return getParentCaption(rootElm, SugarElement.fromDom(to.getNode())).map(function (toCaption) {
  105327. return eq(toCaption, fromCaption) === false;
  105328. });
  105329. };
  105330. var deleteCaretInsideCaption = function (editor, rootElm, forward, fromCaption, from) {
  105331. return navigate(forward, editor.getBody(), from).bind(function (to) {
  105332. return isDeleteOfLastCharPos(fromCaption, forward, from, to) ? emptyCaretCaption(editor, fromCaption) : validateCaretCaption(rootElm, fromCaption, to);
  105333. }).or(Optional.some(true));
  105334. };
  105335. var deleteCaretCells = function (editor, forward, rootElm, startElm) {
  105336. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  105337. return getParentCell(rootElm, startElm).bind(function (fromCell) {
  105338. return isEmpty$2(fromCell) ? emptyElement(editor, fromCell) : deleteBetweenCells(editor, rootElm, forward, fromCell, from);
  105339. }).getOr(false);
  105340. };
  105341. var deleteCaretCaption = function (editor, forward, rootElm, fromCaption) {
  105342. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  105343. return isEmpty$2(fromCaption) ? emptyElement(editor, fromCaption) : deleteCaretInsideCaption(editor, rootElm, forward, fromCaption, from);
  105344. };
  105345. var isNearTable = function (forward, pos) {
  105346. return forward ? isBeforeTable(pos) : isAfterTable(pos);
  105347. };
  105348. var isBeforeOrAfterTable = function (editor, forward) {
  105349. var fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());
  105350. return isNearTable(forward, fromPos) || fromPosition(forward, editor.getBody(), fromPos).exists(function (pos) {
  105351. return isNearTable(forward, pos);
  105352. });
  105353. };
  105354. var deleteCaret$3 = function (editor, forward, startElm) {
  105355. var rootElm = SugarElement.fromDom(editor.getBody());
  105356. return getParentCaption(rootElm, startElm).fold(function () {
  105357. return deleteCaretCells(editor, forward, rootElm, startElm) || isBeforeOrAfterTable(editor, forward);
  105358. }, function (fromCaption) {
  105359. return deleteCaretCaption(editor, forward, rootElm, fromCaption).getOr(false);
  105360. });
  105361. };
  105362. var backspaceDelete$9 = function (editor, forward) {
  105363. var startElm = SugarElement.fromDom(editor.selection.getStart(true));
  105364. var cells = getCellsFromEditor(editor);
  105365. return editor.selection.isCollapsed() && cells.length === 0 ? deleteCaret$3(editor, forward, startElm) : deleteRange$2(editor, startElm, cells);
  105366. };
  105367. var createRange = function (sc, so, ec, eo) {
  105368. var rng = document.createRange();
  105369. rng.setStart(sc, so);
  105370. rng.setEnd(ec, eo);
  105371. return rng;
  105372. };
  105373. var normalizeBlockSelectionRange = function (rng) {
  105374. var startPos = CaretPosition.fromRangeStart(rng);
  105375. var endPos = CaretPosition.fromRangeEnd(rng);
  105376. var rootNode = rng.commonAncestorContainer;
  105377. return fromPosition(false, rootNode, endPos).map(function (newEndPos) {
  105378. if (!isInSameBlock(startPos, endPos, rootNode) && isInSameBlock(startPos, newEndPos, rootNode)) {
  105379. return createRange(startPos.container(), startPos.offset(), newEndPos.container(), newEndPos.offset());
  105380. } else {
  105381. return rng;
  105382. }
  105383. }).getOr(rng);
  105384. };
  105385. var normalize = function (rng) {
  105386. return rng.collapsed ? rng : normalizeBlockSelectionRange(rng);
  105387. };
  105388. var hasOnlyOneChild$1 = function (node) {
  105389. return node.firstChild && node.firstChild === node.lastChild;
  105390. };
  105391. var isPaddingNode = function (node) {
  105392. return node.name === 'br' || node.value === nbsp;
  105393. };
  105394. var isPaddedEmptyBlock = function (schema, node) {
  105395. var blockElements = schema.getBlockElements();
  105396. return blockElements[node.name] && hasOnlyOneChild$1(node) && isPaddingNode(node.firstChild);
  105397. };
  105398. var isEmptyFragmentElement = function (schema, node) {
  105399. var nonEmptyElements = schema.getNonEmptyElements();
  105400. return node && (node.isEmpty(nonEmptyElements) || isPaddedEmptyBlock(schema, node));
  105401. };
  105402. var isListFragment = function (schema, fragment) {
  105403. var firstChild = fragment.firstChild;
  105404. var lastChild = fragment.lastChild;
  105405. if (firstChild && firstChild.name === 'meta') {
  105406. firstChild = firstChild.next;
  105407. }
  105408. if (lastChild && lastChild.attr('id') === 'mce_marker') {
  105409. lastChild = lastChild.prev;
  105410. }
  105411. if (isEmptyFragmentElement(schema, lastChild)) {
  105412. lastChild = lastChild.prev;
  105413. }
  105414. if (!firstChild || firstChild !== lastChild) {
  105415. return false;
  105416. }
  105417. return firstChild.name === 'ul' || firstChild.name === 'ol';
  105418. };
  105419. var cleanupDomFragment = function (domFragment) {
  105420. var firstChild = domFragment.firstChild;
  105421. var lastChild = domFragment.lastChild;
  105422. if (firstChild && firstChild.nodeName === 'META') {
  105423. firstChild.parentNode.removeChild(firstChild);
  105424. }
  105425. if (lastChild && lastChild.id === 'mce_marker') {
  105426. lastChild.parentNode.removeChild(lastChild);
  105427. }
  105428. return domFragment;
  105429. };
  105430. var toDomFragment = function (dom, serializer, fragment) {
  105431. var html = serializer.serialize(fragment);
  105432. var domFragment = dom.createFragment(html);
  105433. return cleanupDomFragment(domFragment);
  105434. };
  105435. var listItems = function (elm) {
  105436. return filter$4(elm.childNodes, function (child) {
  105437. return child.nodeName === 'LI';
  105438. });
  105439. };
  105440. var isPadding = function (node) {
  105441. return node.data === nbsp || isBr$5(node);
  105442. };
  105443. var isListItemPadded = function (node) {
  105444. return node && node.firstChild && node.firstChild === node.lastChild && isPadding(node.firstChild);
  105445. };
  105446. var isEmptyOrPadded = function (elm) {
  105447. return !elm.firstChild || isListItemPadded(elm);
  105448. };
  105449. var trimListItems = function (elms) {
  105450. return elms.length > 0 && isEmptyOrPadded(elms[elms.length - 1]) ? elms.slice(0, -1) : elms;
  105451. };
  105452. var getParentLi = function (dom, node) {
  105453. var parentBlock = dom.getParent(node, dom.isBlock);
  105454. return parentBlock && parentBlock.nodeName === 'LI' ? parentBlock : null;
  105455. };
  105456. var isParentBlockLi = function (dom, node) {
  105457. return !!getParentLi(dom, node);
  105458. };
  105459. var getSplit = function (parentNode, rng) {
  105460. var beforeRng = rng.cloneRange();
  105461. var afterRng = rng.cloneRange();
  105462. beforeRng.setStartBefore(parentNode);
  105463. afterRng.setEndAfter(parentNode);
  105464. return [
  105465. beforeRng.cloneContents(),
  105466. afterRng.cloneContents()
  105467. ];
  105468. };
  105469. var findFirstIn = function (node, rootNode) {
  105470. var caretPos = CaretPosition.before(node);
  105471. var caretWalker = CaretWalker(rootNode);
  105472. var newCaretPos = caretWalker.next(caretPos);
  105473. return newCaretPos ? newCaretPos.toRange() : null;
  105474. };
  105475. var findLastOf = function (node, rootNode) {
  105476. var caretPos = CaretPosition.after(node);
  105477. var caretWalker = CaretWalker(rootNode);
  105478. var newCaretPos = caretWalker.prev(caretPos);
  105479. return newCaretPos ? newCaretPos.toRange() : null;
  105480. };
  105481. var insertMiddle = function (target, elms, rootNode, rng) {
  105482. var parts = getSplit(target, rng);
  105483. var parentElm = target.parentNode;
  105484. parentElm.insertBefore(parts[0], target);
  105485. Tools.each(elms, function (li) {
  105486. parentElm.insertBefore(li, target);
  105487. });
  105488. parentElm.insertBefore(parts[1], target);
  105489. parentElm.removeChild(target);
  105490. return findLastOf(elms[elms.length - 1], rootNode);
  105491. };
  105492. var insertBefore$1 = function (target, elms, rootNode) {
  105493. var parentElm = target.parentNode;
  105494. Tools.each(elms, function (elm) {
  105495. parentElm.insertBefore(elm, target);
  105496. });
  105497. return findFirstIn(target, rootNode);
  105498. };
  105499. var insertAfter$1 = function (target, elms, rootNode, dom) {
  105500. dom.insertAfter(elms.reverse(), target);
  105501. return findLastOf(elms[0], rootNode);
  105502. };
  105503. var insertAtCaret$1 = function (serializer, dom, rng, fragment) {
  105504. var domFragment = toDomFragment(dom, serializer, fragment);
  105505. var liTarget = getParentLi(dom, rng.startContainer);
  105506. var liElms = trimListItems(listItems(domFragment.firstChild));
  105507. var BEGINNING = 1, END = 2;
  105508. var rootNode = dom.getRoot();
  105509. var isAt = function (location) {
  105510. var caretPos = CaretPosition.fromRangeStart(rng);
  105511. var caretWalker = CaretWalker(dom.getRoot());
  105512. var newPos = location === BEGINNING ? caretWalker.prev(caretPos) : caretWalker.next(caretPos);
  105513. return newPos ? getParentLi(dom, newPos.getNode()) !== liTarget : true;
  105514. };
  105515. if (isAt(BEGINNING)) {
  105516. return insertBefore$1(liTarget, liElms, rootNode);
  105517. } else if (isAt(END)) {
  105518. return insertAfter$1(liTarget, liElms, rootNode, dom);
  105519. }
  105520. return insertMiddle(liTarget, liElms, rootNode, rng);
  105521. };
  105522. var trimOrPadLeftRight = function (dom, rng, html) {
  105523. var root = SugarElement.fromDom(dom.getRoot());
  105524. if (needsToBeNbspLeft(root, CaretPosition.fromRangeStart(rng))) {
  105525. html = html.replace(/^ /, '&nbsp;');
  105526. } else {
  105527. html = html.replace(/^&nbsp;/, ' ');
  105528. }
  105529. if (needsToBeNbspRight(root, CaretPosition.fromRangeEnd(rng))) {
  105530. html = html.replace(/(&nbsp;| )(<br( \/)>)?$/, '&nbsp;');
  105531. } else {
  105532. html = html.replace(/&nbsp;(<br( \/)?>)?$/, ' ');
  105533. }
  105534. return html;
  105535. };
  105536. var isTableCell$1 = isTableCell$5;
  105537. var isTableCellContentSelected = function (dom, rng, cell) {
  105538. if (cell !== null) {
  105539. var endCell = dom.getParent(rng.endContainer, isTableCell$1);
  105540. return cell === endCell && hasAllContentsSelected(SugarElement.fromDom(cell), rng);
  105541. } else {
  105542. return false;
  105543. }
  105544. };
  105545. var validInsertion = function (editor, value, parentNode) {
  105546. if (parentNode.getAttribute('data-mce-bogus') === 'all') {
  105547. parentNode.parentNode.insertBefore(editor.dom.createFragment(value), parentNode);
  105548. } else {
  105549. var node = parentNode.firstChild;
  105550. var node2 = parentNode.lastChild;
  105551. if (!node || node === node2 && node.nodeName === 'BR') {
  105552. editor.dom.setHTML(parentNode, value);
  105553. } else {
  105554. editor.selection.setContent(value);
  105555. }
  105556. }
  105557. };
  105558. var trimBrsFromTableCell = function (dom, elm) {
  105559. Optional.from(dom.getParent(elm, 'td,th')).map(SugarElement.fromDom).each(trimBlockTrailingBr);
  105560. };
  105561. var reduceInlineTextElements = function (editor, merge) {
  105562. var textInlineElements = editor.schema.getTextInlineElements();
  105563. var dom = editor.dom;
  105564. if (merge) {
  105565. var root_1 = editor.getBody();
  105566. var elementUtils_1 = ElementUtils(dom);
  105567. Tools.each(dom.select('*[data-mce-fragment]'), function (node) {
  105568. var isInline = isNonNullable(textInlineElements[node.nodeName.toLowerCase()]);
  105569. if (isInline && hasInheritableStyles(dom, node)) {
  105570. for (var parentNode = node.parentNode; isNonNullable(parentNode) && parentNode !== root_1; parentNode = parentNode.parentNode) {
  105571. var styleConflict = hasStyleConflict(dom, node, parentNode);
  105572. if (styleConflict) {
  105573. break;
  105574. }
  105575. if (elementUtils_1.compare(parentNode, node)) {
  105576. dom.remove(node, true);
  105577. break;
  105578. }
  105579. }
  105580. }
  105581. });
  105582. }
  105583. };
  105584. var markFragmentElements = function (fragment) {
  105585. var node = fragment;
  105586. while (node = node.walk()) {
  105587. if (node.type === 1) {
  105588. node.attr('data-mce-fragment', '1');
  105589. }
  105590. }
  105591. };
  105592. var unmarkFragmentElements = function (elm) {
  105593. Tools.each(elm.getElementsByTagName('*'), function (elm) {
  105594. elm.removeAttribute('data-mce-fragment');
  105595. });
  105596. };
  105597. var isPartOfFragment = function (node) {
  105598. return !!node.getAttribute('data-mce-fragment');
  105599. };
  105600. var canHaveChildren = function (editor, node) {
  105601. return node && !editor.schema.getShortEndedElements()[node.nodeName];
  105602. };
  105603. var moveSelectionToMarker = function (editor, marker) {
  105604. var nextRng;
  105605. var dom = editor.dom;
  105606. var selection = editor.selection;
  105607. if (!marker) {
  105608. return;
  105609. }
  105610. selection.scrollIntoView(marker);
  105611. var parentEditableElm = getContentEditableRoot$1(editor.getBody(), marker);
  105612. if (dom.getContentEditable(parentEditableElm) === 'false') {
  105613. dom.remove(marker);
  105614. selection.select(parentEditableElm);
  105615. return;
  105616. }
  105617. var rng = dom.createRng();
  105618. var node = marker.previousSibling;
  105619. if (isText$7(node)) {
  105620. rng.setStart(node, node.nodeValue.length);
  105621. if (!Env.ie) {
  105622. var node2 = marker.nextSibling;
  105623. if (isText$7(node2)) {
  105624. node.appendData(node2.data);
  105625. node2.parentNode.removeChild(node2);
  105626. }
  105627. }
  105628. } else {
  105629. rng.setStartBefore(marker);
  105630. rng.setEndBefore(marker);
  105631. }
  105632. var findNextCaretRng = function (rng) {
  105633. var caretPos = CaretPosition.fromRangeStart(rng);
  105634. var caretWalker = CaretWalker(editor.getBody());
  105635. caretPos = caretWalker.next(caretPos);
  105636. if (caretPos) {
  105637. return caretPos.toRange();
  105638. }
  105639. };
  105640. var parentBlock = dom.getParent(marker, dom.isBlock);
  105641. dom.remove(marker);
  105642. if (parentBlock && dom.isEmpty(parentBlock)) {
  105643. editor.$(parentBlock).empty();
  105644. rng.setStart(parentBlock, 0);
  105645. rng.setEnd(parentBlock, 0);
  105646. if (!isTableCell$1(parentBlock) && !isPartOfFragment(parentBlock) && (nextRng = findNextCaretRng(rng))) {
  105647. rng = nextRng;
  105648. dom.remove(parentBlock);
  105649. } else {
  105650. dom.add(parentBlock, dom.create('br', { 'data-mce-bogus': '1' }));
  105651. }
  105652. }
  105653. selection.setRng(rng);
  105654. };
  105655. var deleteSelectedContent = function (editor) {
  105656. var dom = editor.dom;
  105657. var rng = normalize(editor.selection.getRng());
  105658. editor.selection.setRng(rng);
  105659. var startCell = dom.getParent(rng.startContainer, isTableCell$1);
  105660. if (isTableCellContentSelected(dom, rng, startCell)) {
  105661. deleteCellContents(editor, rng, SugarElement.fromDom(startCell));
  105662. } else {
  105663. editor.getDoc().execCommand('Delete', false, null);
  105664. }
  105665. };
  105666. var insertHtmlAtCaret = function (editor, value, details) {
  105667. var parentNode;
  105668. var rng, node;
  105669. var selection = editor.selection;
  105670. var dom = editor.dom;
  105671. if (/^ | $/.test(value)) {
  105672. value = trimOrPadLeftRight(dom, selection.getRng(), value);
  105673. }
  105674. var parser = editor.parser;
  105675. var merge = details.merge;
  105676. var serializer = HtmlSerializer({ validate: shouldValidate(editor) }, editor.schema);
  105677. var bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>';
  105678. var args = editor.fire('BeforeSetContent', {
  105679. content: value,
  105680. format: 'html',
  105681. selection: true,
  105682. paste: details.paste
  105683. });
  105684. if (args.isDefaultPrevented()) {
  105685. editor.fire('SetContent', {
  105686. content: args.content,
  105687. format: 'html',
  105688. selection: true,
  105689. paste: details.paste
  105690. });
  105691. return;
  105692. }
  105693. value = args.content;
  105694. if (value.indexOf('{$caret}') === -1) {
  105695. value += '{$caret}';
  105696. }
  105697. value = value.replace(/\{\$caret\}/, bookmarkHtml);
  105698. rng = selection.getRng();
  105699. var caretElement = rng.startContainer || (rng.parentElement ? rng.parentElement() : null);
  105700. var body = editor.getBody();
  105701. if (caretElement === body && selection.isCollapsed()) {
  105702. if (dom.isBlock(body.firstChild) && canHaveChildren(editor, body.firstChild) && dom.isEmpty(body.firstChild)) {
  105703. rng = dom.createRng();
  105704. rng.setStart(body.firstChild, 0);
  105705. rng.setEnd(body.firstChild, 0);
  105706. selection.setRng(rng);
  105707. }
  105708. }
  105709. if (!selection.isCollapsed()) {
  105710. deleteSelectedContent(editor);
  105711. }
  105712. parentNode = selection.getNode();
  105713. var parserArgs = {
  105714. context: parentNode.nodeName.toLowerCase(),
  105715. data: details.data,
  105716. insert: true
  105717. };
  105718. var fragment = parser.parse(value, parserArgs);
  105719. if (details.paste === true && isListFragment(editor.schema, fragment) && isParentBlockLi(dom, parentNode)) {
  105720. rng = insertAtCaret$1(serializer, dom, selection.getRng(), fragment);
  105721. selection.setRng(rng);
  105722. editor.fire('SetContent', args);
  105723. return;
  105724. }
  105725. markFragmentElements(fragment);
  105726. node = fragment.lastChild;
  105727. if (node.attr('id') === 'mce_marker') {
  105728. var marker = node;
  105729. for (node = node.prev; node; node = node.walk(true)) {
  105730. if (node.type === 3 || !dom.isBlock(node.name)) {
  105731. if (editor.schema.isValidChild(node.parent.name, 'span')) {
  105732. node.parent.insert(marker, node, node.name === 'br');
  105733. }
  105734. break;
  105735. }
  105736. }
  105737. }
  105738. editor._selectionOverrides.showBlockCaretContainer(parentNode);
  105739. if (!parserArgs.invalid) {
  105740. value = serializer.serialize(fragment);
  105741. validInsertion(editor, value, parentNode);
  105742. } else {
  105743. editor.selection.setContent(bookmarkHtml);
  105744. parentNode = selection.getNode();
  105745. var rootNode = editor.getBody();
  105746. if (parentNode.nodeType === 9) {
  105747. parentNode = node = rootNode;
  105748. } else {
  105749. node = parentNode;
  105750. }
  105751. while (node !== rootNode) {
  105752. parentNode = node;
  105753. node = node.parentNode;
  105754. }
  105755. value = parentNode === rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);
  105756. value = serializer.serialize(parser.parse(value.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i, function () {
  105757. return serializer.serialize(fragment);
  105758. })));
  105759. if (parentNode === rootNode) {
  105760. dom.setHTML(rootNode, value);
  105761. } else {
  105762. dom.setOuterHTML(parentNode, value);
  105763. }
  105764. }
  105765. reduceInlineTextElements(editor, merge);
  105766. moveSelectionToMarker(editor, dom.get('mce_marker'));
  105767. unmarkFragmentElements(editor.getBody());
  105768. trimBrsFromTableCell(dom, selection.getStart());
  105769. editor.fire('SetContent', args);
  105770. editor.addVisual();
  105771. };
  105772. var traverse = function (node, fn) {
  105773. fn(node);
  105774. if (node.firstChild) {
  105775. traverse(node.firstChild, fn);
  105776. }
  105777. if (node.next) {
  105778. traverse(node.next, fn);
  105779. }
  105780. };
  105781. var findMatchingNodes = function (nodeFilters, attributeFilters, node) {
  105782. var nodeMatches = {};
  105783. var attrMatches = {};
  105784. var matches = [];
  105785. if (node.firstChild) {
  105786. traverse(node.firstChild, function (node) {
  105787. each$k(nodeFilters, function (filter) {
  105788. if (filter.name === node.name) {
  105789. if (nodeMatches[filter.name]) {
  105790. nodeMatches[filter.name].nodes.push(node);
  105791. } else {
  105792. nodeMatches[filter.name] = {
  105793. filter: filter,
  105794. nodes: [node]
  105795. };
  105796. }
  105797. }
  105798. });
  105799. each$k(attributeFilters, function (filter) {
  105800. if (typeof node.attr(filter.name) === 'string') {
  105801. if (attrMatches[filter.name]) {
  105802. attrMatches[filter.name].nodes.push(node);
  105803. } else {
  105804. attrMatches[filter.name] = {
  105805. filter: filter,
  105806. nodes: [node]
  105807. };
  105808. }
  105809. }
  105810. });
  105811. });
  105812. }
  105813. for (var name_1 in nodeMatches) {
  105814. if (has$2(nodeMatches, name_1)) {
  105815. matches.push(nodeMatches[name_1]);
  105816. }
  105817. }
  105818. for (var name_2 in attrMatches) {
  105819. if (has$2(attrMatches, name_2)) {
  105820. matches.push(attrMatches[name_2]);
  105821. }
  105822. }
  105823. return matches;
  105824. };
  105825. var filter$1 = function (nodeFilters, attributeFilters, node) {
  105826. var matches = findMatchingNodes(nodeFilters, attributeFilters, node);
  105827. each$k(matches, function (match) {
  105828. each$k(match.filter.callbacks, function (callback) {
  105829. callback(match.nodes, match.filter.name, {});
  105830. });
  105831. });
  105832. };
  105833. var defaultFormat$1 = 'html';
  105834. var isTreeNode = function (content) {
  105835. return content instanceof AstNode;
  105836. };
  105837. var moveSelection = function (editor) {
  105838. if (hasFocus(editor)) {
  105839. firstPositionIn(editor.getBody()).each(function (pos) {
  105840. var node = pos.getNode();
  105841. var caretPos = isTable$3(node) ? firstPositionIn(node).getOr(pos) : pos;
  105842. editor.selection.setRng(caretPos.toRange());
  105843. });
  105844. }
  105845. };
  105846. var setEditorHtml = function (editor, html, noSelection) {
  105847. editor.dom.setHTML(editor.getBody(), html);
  105848. if (noSelection !== true) {
  105849. moveSelection(editor);
  105850. }
  105851. };
  105852. var setContentString = function (editor, body, content, args) {
  105853. if (content.length === 0 || /^\s+$/.test(content)) {
  105854. var padd = '<br data-mce-bogus="1">';
  105855. if (body.nodeName === 'TABLE') {
  105856. content = '<tr><td>' + padd + '</td></tr>';
  105857. } else if (/^(UL|OL)$/.test(body.nodeName)) {
  105858. content = '<li>' + padd + '</li>';
  105859. }
  105860. var forcedRootBlockName = getForcedRootBlock(editor);
  105861. if (forcedRootBlockName && editor.schema.isValidChild(body.nodeName.toLowerCase(), forcedRootBlockName.toLowerCase())) {
  105862. content = padd;
  105863. content = editor.dom.createHTML(forcedRootBlockName, getForcedRootBlockAttrs(editor), content);
  105864. } else if (!content) {
  105865. content = '<br data-mce-bogus="1">';
  105866. }
  105867. setEditorHtml(editor, content, args.no_selection);
  105868. editor.fire('SetContent', args);
  105869. } else {
  105870. if (args.format !== 'raw') {
  105871. content = HtmlSerializer({ validate: editor.validate }, editor.schema).serialize(editor.parser.parse(content, {
  105872. isRootContent: true,
  105873. insert: true
  105874. }));
  105875. }
  105876. args.content = isWsPreserveElement(SugarElement.fromDom(body)) ? content : Tools.trim(content);
  105877. setEditorHtml(editor, args.content, args.no_selection);
  105878. if (!args.no_events) {
  105879. editor.fire('SetContent', args);
  105880. }
  105881. }
  105882. return args.content;
  105883. };
  105884. var setContentTree = function (editor, body, content, args) {
  105885. filter$1(editor.parser.getNodeFilters(), editor.parser.getAttributeFilters(), content);
  105886. var html = HtmlSerializer({ validate: editor.validate }, editor.schema).serialize(content);
  105887. args.content = isWsPreserveElement(SugarElement.fromDom(body)) ? html : Tools.trim(html);
  105888. setEditorHtml(editor, args.content, args.no_selection);
  105889. if (!args.no_events) {
  105890. editor.fire('SetContent', args);
  105891. }
  105892. return content;
  105893. };
  105894. var setupArgs$2 = function (args, content) {
  105895. return __assign(__assign({ format: defaultFormat$1 }, args), {
  105896. set: true,
  105897. content: isTreeNode(content) ? '' : content
  105898. });
  105899. };
  105900. var setContentInternal = function (editor, content, args) {
  105901. var defaultedArgs = setupArgs$2(args, content);
  105902. var updatedArgs = args.no_events ? defaultedArgs : editor.fire('BeforeSetContent', defaultedArgs);
  105903. if (!isTreeNode(content)) {
  105904. content = updatedArgs.content;
  105905. }
  105906. return Optional.from(editor.getBody()).fold(constant(content), function (body) {
  105907. return isTreeNode(content) ? setContentTree(editor, body, content, updatedArgs) : setContentString(editor, body, content, updatedArgs);
  105908. });
  105909. };
  105910. var sibling = function (scope, predicate) {
  105911. return sibling$2(scope, predicate).isSome();
  105912. };
  105913. var ensureIsRoot = function (isRoot) {
  105914. return isFunction(isRoot) ? isRoot : never;
  105915. };
  105916. var ancestor = function (scope, transform, isRoot) {
  105917. var element = scope.dom;
  105918. var stop = ensureIsRoot(isRoot);
  105919. while (element.parentNode) {
  105920. element = element.parentNode;
  105921. var el = SugarElement.fromDom(element);
  105922. var transformed = transform(el);
  105923. if (transformed.isSome()) {
  105924. return transformed;
  105925. } else if (stop(el)) {
  105926. break;
  105927. }
  105928. }
  105929. return Optional.none();
  105930. };
  105931. var closest$1 = function (scope, transform, isRoot) {
  105932. var current = transform(scope);
  105933. var stop = ensureIsRoot(isRoot);
  105934. return current.orThunk(function () {
  105935. return stop(scope) ? Optional.none() : ancestor(scope, transform, stop);
  105936. });
  105937. };
  105938. var isEq$3 = isEq$5;
  105939. var matchesUnInheritedFormatSelector = function (ed, node, name) {
  105940. var formatList = ed.formatter.get(name);
  105941. if (formatList) {
  105942. for (var i = 0; i < formatList.length; i++) {
  105943. var format = formatList[i];
  105944. if (isSelectorFormat(format) && format.inherit === false && ed.dom.is(node, format.selector)) {
  105945. return true;
  105946. }
  105947. }
  105948. }
  105949. return false;
  105950. };
  105951. var matchParents = function (editor, node, name, vars, similar) {
  105952. var root = editor.dom.getRoot();
  105953. if (node === root) {
  105954. return false;
  105955. }
  105956. node = editor.dom.getParent(node, function (node) {
  105957. if (matchesUnInheritedFormatSelector(editor, node, name)) {
  105958. return true;
  105959. }
  105960. return node.parentNode === root || !!matchNode(editor, node, name, vars, true);
  105961. });
  105962. return !!matchNode(editor, node, name, vars, similar);
  105963. };
  105964. var matchName$1 = function (dom, node, format) {
  105965. if (isEq$3(node, format.inline)) {
  105966. return true;
  105967. }
  105968. if (isEq$3(node, format.block)) {
  105969. return true;
  105970. }
  105971. if (format.selector) {
  105972. return node.nodeType === 1 && dom.is(node, format.selector);
  105973. }
  105974. };
  105975. var matchItems = function (dom, node, format, itemName, similar, vars) {
  105976. var items = format[itemName];
  105977. if (isFunction(format.onmatch)) {
  105978. return format.onmatch(node, format, itemName);
  105979. }
  105980. if (items) {
  105981. if (isUndefined(items.length)) {
  105982. for (var key in items) {
  105983. if (has$2(items, key)) {
  105984. var value = itemName === 'attributes' ? dom.getAttrib(node, key) : getStyle(dom, node, key);
  105985. var expectedValue = replaceVars(items[key], vars);
  105986. var isEmptyValue = isNullable(value) || isEmpty$3(value);
  105987. if (isEmptyValue && isNullable(expectedValue)) {
  105988. continue;
  105989. }
  105990. if (similar && isEmptyValue && !format.exact) {
  105991. return false;
  105992. }
  105993. if ((!similar || format.exact) && !isEq$3(value, normalizeStyleValue(dom, expectedValue, key))) {
  105994. return false;
  105995. }
  105996. }
  105997. }
  105998. } else {
  105999. for (var i = 0; i < items.length; i++) {
  106000. if (itemName === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(dom, node, items[i])) {
  106001. return true;
  106002. }
  106003. }
  106004. }
  106005. }
  106006. return true;
  106007. };
  106008. var matchNode = function (ed, node, name, vars, similar) {
  106009. var formatList = ed.formatter.get(name);
  106010. var dom = ed.dom;
  106011. if (formatList && node) {
  106012. for (var i = 0; i < formatList.length; i++) {
  106013. var format = formatList[i];
  106014. if (matchName$1(ed.dom, node, format) && matchItems(dom, node, format, 'attributes', similar, vars) && matchItems(dom, node, format, 'styles', similar, vars)) {
  106015. var classes = format.classes;
  106016. if (classes) {
  106017. for (var x = 0; x < classes.length; x++) {
  106018. if (!ed.dom.hasClass(node, replaceVars(classes[x], vars))) {
  106019. return;
  106020. }
  106021. }
  106022. }
  106023. return format;
  106024. }
  106025. }
  106026. }
  106027. };
  106028. var match$2 = function (editor, name, vars, node, similar) {
  106029. if (node) {
  106030. return matchParents(editor, node, name, vars, similar);
  106031. }
  106032. node = editor.selection.getNode();
  106033. if (matchParents(editor, node, name, vars, similar)) {
  106034. return true;
  106035. }
  106036. var startNode = editor.selection.getStart();
  106037. if (startNode !== node) {
  106038. if (matchParents(editor, startNode, name, vars, similar)) {
  106039. return true;
  106040. }
  106041. }
  106042. return false;
  106043. };
  106044. var matchAll = function (editor, names, vars) {
  106045. var matchedFormatNames = [];
  106046. var checkedMap = {};
  106047. var startElement = editor.selection.getStart();
  106048. editor.dom.getParent(startElement, function (node) {
  106049. for (var i = 0; i < names.length; i++) {
  106050. var name_1 = names[i];
  106051. if (!checkedMap[name_1] && matchNode(editor, node, name_1, vars)) {
  106052. checkedMap[name_1] = true;
  106053. matchedFormatNames.push(name_1);
  106054. }
  106055. }
  106056. }, editor.dom.getRoot());
  106057. return matchedFormatNames;
  106058. };
  106059. var closest = function (editor, names) {
  106060. var isRoot = function (elm) {
  106061. return eq(elm, SugarElement.fromDom(editor.getBody()));
  106062. };
  106063. var match = function (elm, name) {
  106064. return matchNode(editor, elm.dom, name) ? Optional.some(name) : Optional.none();
  106065. };
  106066. return Optional.from(editor.selection.getStart(true)).bind(function (rawElm) {
  106067. return closest$1(SugarElement.fromDom(rawElm), function (elm) {
  106068. return findMap(names, function (name) {
  106069. return match(elm, name);
  106070. });
  106071. }, isRoot);
  106072. }).getOrNull();
  106073. };
  106074. var canApply = function (editor, name) {
  106075. var formatList = editor.formatter.get(name);
  106076. var dom = editor.dom;
  106077. if (formatList) {
  106078. var startNode = editor.selection.getStart();
  106079. var parents = getParents$2(dom, startNode);
  106080. for (var x = formatList.length - 1; x >= 0; x--) {
  106081. var format = formatList[x];
  106082. if (!isSelectorFormat(format) || isNonNullable(format.defaultBlock)) {
  106083. return true;
  106084. }
  106085. for (var i = parents.length - 1; i >= 0; i--) {
  106086. if (dom.is(parents[i], format.selector)) {
  106087. return true;
  106088. }
  106089. }
  106090. }
  106091. }
  106092. return false;
  106093. };
  106094. var matchAllOnNode = function (editor, node, formatNames) {
  106095. return foldl(formatNames, function (acc, name) {
  106096. var matchSimilar = isVariableFormatName(editor, name);
  106097. if (editor.formatter.matchNode(node, name, {}, matchSimilar)) {
  106098. return acc.concat([name]);
  106099. } else {
  106100. return acc;
  106101. }
  106102. }, []);
  106103. };
  106104. var ZWSP = ZWSP$1, CARET_ID = '_mce_caret';
  106105. var importNode = function (ownerDocument, node) {
  106106. return ownerDocument.importNode(node, true);
  106107. };
  106108. var getEmptyCaretContainers = function (node) {
  106109. var nodes = [];
  106110. while (node) {
  106111. if (node.nodeType === 3 && node.nodeValue !== ZWSP || node.childNodes.length > 1) {
  106112. return [];
  106113. }
  106114. if (node.nodeType === 1) {
  106115. nodes.push(node);
  106116. }
  106117. node = node.firstChild;
  106118. }
  106119. return nodes;
  106120. };
  106121. var isCaretContainerEmpty = function (node) {
  106122. return getEmptyCaretContainers(node).length > 0;
  106123. };
  106124. var findFirstTextNode = function (node) {
  106125. if (node) {
  106126. var walker = new DomTreeWalker(node, node);
  106127. for (node = walker.current(); node; node = walker.next()) {
  106128. if (isText$7(node)) {
  106129. return node;
  106130. }
  106131. }
  106132. }
  106133. return null;
  106134. };
  106135. var createCaretContainer = function (fill) {
  106136. var caretContainer = SugarElement.fromTag('span');
  106137. setAll$1(caretContainer, {
  106138. 'id': CARET_ID,
  106139. 'data-mce-bogus': '1',
  106140. 'data-mce-type': 'format-caret'
  106141. });
  106142. if (fill) {
  106143. append$1(caretContainer, SugarElement.fromText(ZWSP));
  106144. }
  106145. return caretContainer;
  106146. };
  106147. var trimZwspFromCaretContainer = function (caretContainerNode) {
  106148. var textNode = findFirstTextNode(caretContainerNode);
  106149. if (textNode && textNode.nodeValue.charAt(0) === ZWSP) {
  106150. textNode.deleteData(0, 1);
  106151. }
  106152. return textNode;
  106153. };
  106154. var removeCaretContainerNode = function (editor, node, moveCaret) {
  106155. if (moveCaret === void 0) {
  106156. moveCaret = true;
  106157. }
  106158. var dom = editor.dom, selection = editor.selection;
  106159. if (isCaretContainerEmpty(node)) {
  106160. deleteElement$2(editor, false, SugarElement.fromDom(node), moveCaret);
  106161. } else {
  106162. var rng = selection.getRng();
  106163. var block = dom.getParent(node, dom.isBlock);
  106164. var startContainer = rng.startContainer;
  106165. var startOffset = rng.startOffset;
  106166. var endContainer = rng.endContainer;
  106167. var endOffset = rng.endOffset;
  106168. var textNode = trimZwspFromCaretContainer(node);
  106169. dom.remove(node, true);
  106170. if (startContainer === textNode && startOffset > 0) {
  106171. rng.setStart(textNode, startOffset - 1);
  106172. }
  106173. if (endContainer === textNode && endOffset > 0) {
  106174. rng.setEnd(textNode, endOffset - 1);
  106175. }
  106176. if (block && dom.isEmpty(block)) {
  106177. fillWithPaddingBr(SugarElement.fromDom(block));
  106178. }
  106179. selection.setRng(rng);
  106180. }
  106181. };
  106182. var removeCaretContainer = function (editor, node, moveCaret) {
  106183. if (moveCaret === void 0) {
  106184. moveCaret = true;
  106185. }
  106186. var dom = editor.dom, selection = editor.selection;
  106187. if (!node) {
  106188. node = getParentCaretContainer(editor.getBody(), selection.getStart());
  106189. if (!node) {
  106190. while (node = dom.get(CARET_ID)) {
  106191. removeCaretContainerNode(editor, node, false);
  106192. }
  106193. }
  106194. } else {
  106195. removeCaretContainerNode(editor, node, moveCaret);
  106196. }
  106197. };
  106198. var insertCaretContainerNode = function (editor, caretContainer, formatNode) {
  106199. var dom = editor.dom, block = dom.getParent(formatNode, curry(isTextBlock$1, editor));
  106200. if (block && dom.isEmpty(block)) {
  106201. formatNode.parentNode.replaceChild(caretContainer, formatNode);
  106202. } else {
  106203. removeTrailingBr(SugarElement.fromDom(formatNode));
  106204. if (dom.isEmpty(formatNode)) {
  106205. formatNode.parentNode.replaceChild(caretContainer, formatNode);
  106206. } else {
  106207. dom.insertAfter(caretContainer, formatNode);
  106208. }
  106209. }
  106210. };
  106211. var appendNode = function (parentNode, node) {
  106212. parentNode.appendChild(node);
  106213. return node;
  106214. };
  106215. var insertFormatNodesIntoCaretContainer = function (formatNodes, caretContainer) {
  106216. var innerMostFormatNode = foldr(formatNodes, function (parentNode, formatNode) {
  106217. return appendNode(parentNode, formatNode.cloneNode(false));
  106218. }, caretContainer);
  106219. return appendNode(innerMostFormatNode, innerMostFormatNode.ownerDocument.createTextNode(ZWSP));
  106220. };
  106221. var cleanFormatNode = function (editor, caretContainer, formatNode, name, vars, similar) {
  106222. var formatter = editor.formatter;
  106223. var dom = editor.dom;
  106224. var validFormats = filter$4(keys(formatter.get()), function (formatName) {
  106225. return formatName !== name && !contains$2(formatName, 'removeformat');
  106226. });
  106227. var matchedFormats = matchAllOnNode(editor, formatNode, validFormats);
  106228. var uniqueFormats = filter$4(matchedFormats, function (fmtName) {
  106229. return !areSimilarFormats(editor, fmtName, name);
  106230. });
  106231. if (uniqueFormats.length > 0) {
  106232. var clonedFormatNode = formatNode.cloneNode(false);
  106233. dom.add(caretContainer, clonedFormatNode);
  106234. formatter.remove(name, vars, clonedFormatNode, similar);
  106235. dom.remove(clonedFormatNode);
  106236. return Optional.some(clonedFormatNode);
  106237. } else {
  106238. return Optional.none();
  106239. }
  106240. };
  106241. var applyCaretFormat = function (editor, name, vars) {
  106242. var caretContainer, textNode;
  106243. var selection = editor.selection;
  106244. var selectionRng = selection.getRng();
  106245. var offset = selectionRng.startOffset;
  106246. var container = selectionRng.startContainer;
  106247. var text = container.nodeValue;
  106248. caretContainer = getParentCaretContainer(editor.getBody(), selection.getStart());
  106249. if (caretContainer) {
  106250. textNode = findFirstTextNode(caretContainer);
  106251. }
  106252. var wordcharRegex = /[^\s\u00a0\u00ad\u200b\ufeff]/;
  106253. if (text && offset > 0 && offset < text.length && wordcharRegex.test(text.charAt(offset)) && wordcharRegex.test(text.charAt(offset - 1))) {
  106254. var bookmark = selection.getBookmark();
  106255. selectionRng.collapse(true);
  106256. var rng = expandRng(editor, selectionRng, editor.formatter.get(name));
  106257. rng = split(rng);
  106258. editor.formatter.apply(name, vars, rng);
  106259. selection.moveToBookmark(bookmark);
  106260. } else {
  106261. if (!caretContainer || textNode.nodeValue !== ZWSP) {
  106262. caretContainer = importNode(editor.getDoc(), createCaretContainer(true).dom);
  106263. textNode = caretContainer.firstChild;
  106264. selectionRng.insertNode(caretContainer);
  106265. offset = 1;
  106266. editor.formatter.apply(name, vars, caretContainer);
  106267. } else {
  106268. editor.formatter.apply(name, vars, caretContainer);
  106269. }
  106270. selection.setCursorLocation(textNode, offset);
  106271. }
  106272. };
  106273. var removeCaretFormat = function (editor, name, vars, similar) {
  106274. var dom = editor.dom;
  106275. var selection = editor.selection;
  106276. var hasContentAfter, node, formatNode;
  106277. var parents = [];
  106278. var rng = selection.getRng();
  106279. var container = rng.startContainer;
  106280. var offset = rng.startOffset;
  106281. node = container;
  106282. if (container.nodeType === 3) {
  106283. if (offset !== container.nodeValue.length) {
  106284. hasContentAfter = true;
  106285. }
  106286. node = node.parentNode;
  106287. }
  106288. while (node) {
  106289. if (matchNode(editor, node, name, vars, similar)) {
  106290. formatNode = node;
  106291. break;
  106292. }
  106293. if (node.nextSibling) {
  106294. hasContentAfter = true;
  106295. }
  106296. parents.push(node);
  106297. node = node.parentNode;
  106298. }
  106299. if (!formatNode) {
  106300. return;
  106301. }
  106302. if (hasContentAfter) {
  106303. var bookmark = selection.getBookmark();
  106304. rng.collapse(true);
  106305. var expandedRng = expandRng(editor, rng, editor.formatter.get(name), true);
  106306. expandedRng = split(expandedRng);
  106307. editor.formatter.remove(name, vars, expandedRng, similar);
  106308. selection.moveToBookmark(bookmark);
  106309. } else {
  106310. var caretContainer = getParentCaretContainer(editor.getBody(), formatNode);
  106311. var newCaretContainer = createCaretContainer(false).dom;
  106312. insertCaretContainerNode(editor, newCaretContainer, caretContainer !== null ? caretContainer : formatNode);
  106313. var cleanedFormatNode = cleanFormatNode(editor, newCaretContainer, formatNode, name, vars, similar);
  106314. var caretTextNode = insertFormatNodesIntoCaretContainer(parents.concat(cleanedFormatNode.toArray()), newCaretContainer);
  106315. removeCaretContainerNode(editor, caretContainer, false);
  106316. selection.setCursorLocation(caretTextNode, 1);
  106317. if (dom.isEmpty(formatNode)) {
  106318. dom.remove(formatNode);
  106319. }
  106320. }
  106321. };
  106322. var disableCaretContainer = function (editor, keyCode) {
  106323. var selection = editor.selection, body = editor.getBody();
  106324. removeCaretContainer(editor, null, false);
  106325. if ((keyCode === 8 || keyCode === 46) && selection.isCollapsed() && selection.getStart().innerHTML === ZWSP) {
  106326. removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()));
  106327. }
  106328. if (keyCode === 37 || keyCode === 39) {
  106329. removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()));
  106330. }
  106331. };
  106332. var setup$k = function (editor) {
  106333. editor.on('mouseup keydown', function (e) {
  106334. disableCaretContainer(editor, e.keyCode);
  106335. });
  106336. };
  106337. var replaceWithCaretFormat = function (targetNode, formatNodes) {
  106338. var caretContainer = createCaretContainer(false);
  106339. var innerMost = insertFormatNodesIntoCaretContainer(formatNodes, caretContainer.dom);
  106340. before$4(SugarElement.fromDom(targetNode), caretContainer);
  106341. remove$7(SugarElement.fromDom(targetNode));
  106342. return CaretPosition(innerMost, 0);
  106343. };
  106344. var isFormatElement = function (editor, element) {
  106345. var inlineElements = editor.schema.getTextInlineElements();
  106346. return has$2(inlineElements, name(element)) && !isCaretNode(element.dom) && !isBogus$2(element.dom);
  106347. };
  106348. var isEmptyCaretFormatElement = function (element) {
  106349. return isCaretNode(element.dom) && isCaretContainerEmpty(element.dom);
  106350. };
  106351. var postProcessHooks = {};
  106352. var filter = filter$2;
  106353. var each$b = each$i;
  106354. var addPostProcessHook = function (name, hook) {
  106355. var hooks = postProcessHooks[name];
  106356. if (!hooks) {
  106357. postProcessHooks[name] = [];
  106358. }
  106359. postProcessHooks[name].push(hook);
  106360. };
  106361. var postProcess$1 = function (name, editor) {
  106362. each$b(postProcessHooks[name], function (hook) {
  106363. hook(editor);
  106364. });
  106365. };
  106366. addPostProcessHook('pre', function (editor) {
  106367. var rng = editor.selection.getRng();
  106368. var blocks;
  106369. var hasPreSibling = function (pre) {
  106370. return isPre(pre.previousSibling) && indexOf$1(blocks, pre.previousSibling) !== -1;
  106371. };
  106372. var joinPre = function (pre1, pre2) {
  106373. DomQuery(pre2).remove();
  106374. DomQuery(pre1).append('<br><br>').append(pre2.childNodes);
  106375. };
  106376. var isPre = matchNodeNames(['pre']);
  106377. if (!rng.collapsed) {
  106378. blocks = editor.selection.getSelectedBlocks();
  106379. each$b(filter(filter(blocks, isPre), hasPreSibling), function (pre) {
  106380. joinPre(pre.previousSibling, pre);
  106381. });
  106382. }
  106383. });
  106384. var each$a = Tools.each;
  106385. var isElementNode$1 = function (node) {
  106386. return isElement$5(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$2(node);
  106387. };
  106388. var findElementSibling = function (node, siblingName) {
  106389. for (var sibling = node; sibling; sibling = sibling[siblingName]) {
  106390. if (isText$7(sibling) && isNotEmpty(sibling.data)) {
  106391. return node;
  106392. }
  106393. if (isElement$5(sibling) && !isBookmarkNode$1(sibling)) {
  106394. return sibling;
  106395. }
  106396. }
  106397. return node;
  106398. };
  106399. var mergeSiblingsNodes = function (dom, prev, next) {
  106400. var elementUtils = ElementUtils(dom);
  106401. if (prev && next) {
  106402. prev = findElementSibling(prev, 'previousSibling');
  106403. next = findElementSibling(next, 'nextSibling');
  106404. if (elementUtils.compare(prev, next)) {
  106405. for (var sibling = prev.nextSibling; sibling && sibling !== next;) {
  106406. var tmpSibling = sibling;
  106407. sibling = sibling.nextSibling;
  106408. prev.appendChild(tmpSibling);
  106409. }
  106410. dom.remove(next);
  106411. Tools.each(Tools.grep(next.childNodes), function (node) {
  106412. prev.appendChild(node);
  106413. });
  106414. return prev;
  106415. }
  106416. }
  106417. return next;
  106418. };
  106419. var mergeSiblings = function (dom, format, vars, node) {
  106420. if (node && format.merge_siblings !== false) {
  106421. var newNode = mergeSiblingsNodes(dom, getNonWhiteSpaceSibling(node), node);
  106422. mergeSiblingsNodes(dom, newNode, getNonWhiteSpaceSibling(newNode, true));
  106423. }
  106424. };
  106425. var clearChildStyles = function (dom, format, node) {
  106426. if (format.clear_child_styles) {
  106427. var selector = format.links ? '*:not(a)' : '*';
  106428. each$a(dom.select(selector, node), function (node) {
  106429. if (isElementNode$1(node)) {
  106430. each$a(format.styles, function (value, name) {
  106431. dom.setStyle(node, name, '');
  106432. });
  106433. }
  106434. });
  106435. }
  106436. };
  106437. var processChildElements = function (node, filter, process) {
  106438. each$a(node.childNodes, function (node) {
  106439. if (isElementNode$1(node)) {
  106440. if (filter(node)) {
  106441. process(node);
  106442. }
  106443. if (node.hasChildNodes()) {
  106444. processChildElements(node, filter, process);
  106445. }
  106446. }
  106447. });
  106448. };
  106449. var unwrapEmptySpan = function (dom, node) {
  106450. if (node.nodeName === 'SPAN' && dom.getAttribs(node).length === 0) {
  106451. dom.remove(node, true);
  106452. }
  106453. };
  106454. var hasStyle = function (dom, name) {
  106455. return function (node) {
  106456. return !!(node && getStyle(dom, node, name));
  106457. };
  106458. };
  106459. var applyStyle = function (dom, name, value) {
  106460. return function (node) {
  106461. dom.setStyle(node, name, value);
  106462. if (node.getAttribute('style') === '') {
  106463. node.removeAttribute('style');
  106464. }
  106465. unwrapEmptySpan(dom, node);
  106466. };
  106467. };
  106468. var removeResult = Adt.generate([
  106469. { keep: [] },
  106470. { rename: ['name'] },
  106471. { removed: [] }
  106472. ]);
  106473. var MCE_ATTR_RE = /^(src|href|style)$/;
  106474. var each$9 = Tools.each;
  106475. var isEq$2 = isEq$5;
  106476. var isTableCellOrRow = function (node) {
  106477. return /^(TR|TH|TD)$/.test(node.nodeName);
  106478. };
  106479. var isChildOfInlineParent = function (dom, node, parent) {
  106480. return dom.isChildOf(node, parent) && node !== parent && !dom.isBlock(parent);
  106481. };
  106482. var getContainer = function (ed, rng, start) {
  106483. var container = rng[start ? 'startContainer' : 'endContainer'];
  106484. var offset = rng[start ? 'startOffset' : 'endOffset'];
  106485. if (isElement$5(container)) {
  106486. var lastIdx = container.childNodes.length - 1;
  106487. if (!start && offset) {
  106488. offset--;
  106489. }
  106490. container = container.childNodes[offset > lastIdx ? lastIdx : offset];
  106491. }
  106492. if (isText$7(container) && start && offset >= container.nodeValue.length) {
  106493. container = new DomTreeWalker(container, ed.getBody()).next() || container;
  106494. }
  106495. if (isText$7(container) && !start && offset === 0) {
  106496. container = new DomTreeWalker(container, ed.getBody()).prev() || container;
  106497. }
  106498. return container;
  106499. };
  106500. var normalizeTableSelection = function (node, start) {
  106501. var prop = start ? 'firstChild' : 'lastChild';
  106502. if (isTableCellOrRow(node) && node[prop]) {
  106503. var childNode = node[prop];
  106504. if (node.nodeName === 'TR') {
  106505. return childNode[prop] || childNode;
  106506. } else {
  106507. return childNode;
  106508. }
  106509. }
  106510. return node;
  106511. };
  106512. var wrap$1 = function (dom, node, name, attrs) {
  106513. var wrapper = dom.create(name, attrs);
  106514. node.parentNode.insertBefore(wrapper, node);
  106515. wrapper.appendChild(node);
  106516. return wrapper;
  106517. };
  106518. var wrapWithSiblings = function (dom, node, next, name, attrs) {
  106519. var start = SugarElement.fromDom(node);
  106520. var wrapper = SugarElement.fromDom(dom.create(name, attrs));
  106521. var siblings = next ? nextSiblings(start) : prevSiblings(start);
  106522. append(wrapper, siblings);
  106523. if (next) {
  106524. before$4(start, wrapper);
  106525. prepend(wrapper, start);
  106526. } else {
  106527. after$3(start, wrapper);
  106528. append$1(wrapper, start);
  106529. }
  106530. return wrapper.dom;
  106531. };
  106532. var matchName = function (dom, node, format) {
  106533. if (isInlineFormat(format) && isEq$2(node, format.inline)) {
  106534. return true;
  106535. }
  106536. if (isBlockFormat(format) && isEq$2(node, format.block)) {
  106537. return true;
  106538. }
  106539. if (isSelectorFormat(format)) {
  106540. return isElement$5(node) && dom.is(node, format.selector);
  106541. }
  106542. };
  106543. var isColorFormatAndAnchor = function (node, format) {
  106544. return format.links && node.nodeName === 'A';
  106545. };
  106546. var find = function (dom, node, next, inc) {
  106547. var sibling = getNonWhiteSpaceSibling(node, next, inc);
  106548. return isNullable(sibling) || sibling.nodeName === 'BR' || dom.isBlock(sibling);
  106549. };
  106550. var removeNode = function (ed, node, format) {
  106551. var parentNode = node.parentNode;
  106552. var rootBlockElm;
  106553. var dom = ed.dom, forcedRootBlock = getForcedRootBlock(ed);
  106554. if (isBlockFormat(format)) {
  106555. if (!forcedRootBlock) {
  106556. if (dom.isBlock(node) && !dom.isBlock(parentNode)) {
  106557. if (!find(dom, node, false) && !find(dom, node.firstChild, true, true)) {
  106558. node.insertBefore(dom.create('br'), node.firstChild);
  106559. }
  106560. if (!find(dom, node, true) && !find(dom, node.lastChild, false, true)) {
  106561. node.appendChild(dom.create('br'));
  106562. }
  106563. }
  106564. } else {
  106565. if (parentNode === dom.getRoot()) {
  106566. if (!format.list_block || !isEq$2(node, format.list_block)) {
  106567. each$k(from(node.childNodes), function (node) {
  106568. if (isValid(ed, forcedRootBlock, node.nodeName.toLowerCase())) {
  106569. if (!rootBlockElm) {
  106570. rootBlockElm = wrap$1(dom, node, forcedRootBlock);
  106571. dom.setAttribs(rootBlockElm, ed.settings.forced_root_block_attrs);
  106572. } else {
  106573. rootBlockElm.appendChild(node);
  106574. }
  106575. } else {
  106576. rootBlockElm = null;
  106577. }
  106578. });
  106579. }
  106580. }
  106581. }
  106582. }
  106583. if (isMixedFormat(format) && !isEq$2(format.inline, node)) {
  106584. return;
  106585. }
  106586. dom.remove(node, true);
  106587. };
  106588. var removeFormatInternal = function (ed, format, vars, node, compareNode) {
  106589. var stylesModified;
  106590. var dom = ed.dom;
  106591. if (!matchName(dom, node, format) && !isColorFormatAndAnchor(node, format)) {
  106592. return removeResult.keep();
  106593. }
  106594. var elm = node;
  106595. if (isInlineFormat(format) && format.remove === 'all' && isArray$1(format.preserve_attributes)) {
  106596. var attrsToPreserve = filter$4(dom.getAttribs(elm), function (attr) {
  106597. return contains$3(format.preserve_attributes, attr.name.toLowerCase());
  106598. });
  106599. dom.removeAllAttribs(elm);
  106600. each$k(attrsToPreserve, function (attr) {
  106601. return dom.setAttrib(elm, attr.name, attr.value);
  106602. });
  106603. if (attrsToPreserve.length > 0) {
  106604. return removeResult.rename('span');
  106605. }
  106606. }
  106607. if (format.remove !== 'all') {
  106608. each$9(format.styles, function (value, name) {
  106609. value = normalizeStyleValue(dom, replaceVars(value, vars), name + '');
  106610. if (isNumber(name)) {
  106611. name = value;
  106612. compareNode = null;
  106613. }
  106614. if (format.remove_similar || (!compareNode || isEq$2(getStyle(dom, compareNode, name), value))) {
  106615. dom.setStyle(elm, name, '');
  106616. }
  106617. stylesModified = true;
  106618. });
  106619. if (stylesModified && dom.getAttrib(elm, 'style') === '') {
  106620. elm.removeAttribute('style');
  106621. elm.removeAttribute('data-mce-style');
  106622. }
  106623. each$9(format.attributes, function (value, name) {
  106624. var valueOut;
  106625. value = replaceVars(value, vars);
  106626. if (isNumber(name)) {
  106627. name = value;
  106628. compareNode = null;
  106629. }
  106630. if (format.remove_similar || (!compareNode || isEq$2(dom.getAttrib(compareNode, name), value))) {
  106631. if (name === 'class') {
  106632. value = dom.getAttrib(elm, name);
  106633. if (value) {
  106634. valueOut = '';
  106635. each$k(value.split(/\s+/), function (cls) {
  106636. if (/mce\-\w+/.test(cls)) {
  106637. valueOut += (valueOut ? ' ' : '') + cls;
  106638. }
  106639. });
  106640. if (valueOut) {
  106641. dom.setAttrib(elm, name, valueOut);
  106642. return;
  106643. }
  106644. }
  106645. }
  106646. if (MCE_ATTR_RE.test(name)) {
  106647. elm.removeAttribute('data-mce-' + name);
  106648. }
  106649. if (name === 'style' && matchNodeNames(['li'])(elm) && dom.getStyle(elm, 'list-style-type') === 'none') {
  106650. elm.removeAttribute(name);
  106651. dom.setStyle(elm, 'list-style-type', 'none');
  106652. return;
  106653. }
  106654. if (name === 'class') {
  106655. elm.removeAttribute('className');
  106656. }
  106657. elm.removeAttribute(name);
  106658. }
  106659. });
  106660. each$9(format.classes, function (value) {
  106661. value = replaceVars(value, vars);
  106662. if (!compareNode || dom.hasClass(compareNode, value)) {
  106663. dom.removeClass(elm, value);
  106664. }
  106665. });
  106666. var attrs = dom.getAttribs(elm);
  106667. for (var i = 0; i < attrs.length; i++) {
  106668. var attrName = attrs[i].nodeName;
  106669. if (attrName.indexOf('_') !== 0 && attrName.indexOf('data-') !== 0) {
  106670. return removeResult.keep();
  106671. }
  106672. }
  106673. }
  106674. if (format.remove !== 'none') {
  106675. removeNode(ed, elm, format);
  106676. return removeResult.removed();
  106677. }
  106678. return removeResult.keep();
  106679. };
  106680. var removeFormat$1 = function (ed, format, vars, node, compareNode) {
  106681. return removeFormatInternal(ed, format, vars, node, compareNode).fold(never, function (newName) {
  106682. ed.dom.rename(node, newName);
  106683. return true;
  106684. }, always);
  106685. };
  106686. var findFormatRoot = function (editor, container, name, vars, similar) {
  106687. var formatRoot;
  106688. each$k(getParents$2(editor.dom, container.parentNode).reverse(), function (parent) {
  106689. if (!formatRoot && parent.id !== '_start' && parent.id !== '_end') {
  106690. var format = matchNode(editor, parent, name, vars, similar);
  106691. if (format && format.split !== false) {
  106692. formatRoot = parent;
  106693. }
  106694. }
  106695. });
  106696. return formatRoot;
  106697. };
  106698. var removeFormatFromClone = function (editor, format, vars, clone) {
  106699. return removeFormatInternal(editor, format, vars, clone, clone).fold(constant(clone), function (newName) {
  106700. var fragment = editor.dom.createFragment();
  106701. fragment.appendChild(clone);
  106702. return editor.dom.rename(clone, newName);
  106703. }, constant(null));
  106704. };
  106705. var wrapAndSplit = function (editor, formatList, formatRoot, container, target, split, format, vars) {
  106706. var clone, lastClone, firstClone;
  106707. var dom = editor.dom;
  106708. if (formatRoot) {
  106709. var formatRootParent = formatRoot.parentNode;
  106710. for (var parent_1 = container.parentNode; parent_1 && parent_1 !== formatRootParent; parent_1 = parent_1.parentNode) {
  106711. clone = dom.clone(parent_1, false);
  106712. for (var i = 0; i < formatList.length; i++) {
  106713. clone = removeFormatFromClone(editor, formatList[i], vars, clone);
  106714. if (clone === null) {
  106715. break;
  106716. }
  106717. }
  106718. if (clone) {
  106719. if (lastClone) {
  106720. clone.appendChild(lastClone);
  106721. }
  106722. if (!firstClone) {
  106723. firstClone = clone;
  106724. }
  106725. lastClone = clone;
  106726. }
  106727. }
  106728. if (split && (!format.mixed || !dom.isBlock(formatRoot))) {
  106729. container = dom.split(formatRoot, container);
  106730. }
  106731. if (lastClone) {
  106732. target.parentNode.insertBefore(lastClone, target);
  106733. firstClone.appendChild(target);
  106734. if (isInlineFormat(format)) {
  106735. mergeSiblings(dom, format, vars, lastClone);
  106736. }
  106737. }
  106738. }
  106739. return container;
  106740. };
  106741. var remove$1 = function (ed, name, vars, node, similar) {
  106742. var formatList = ed.formatter.get(name);
  106743. var format = formatList[0];
  106744. var contentEditable = true;
  106745. var dom = ed.dom;
  106746. var selection = ed.selection;
  106747. var splitToFormatRoot = function (container) {
  106748. var formatRoot = findFormatRoot(ed, container, name, vars, similar);
  106749. return wrapAndSplit(ed, formatList, formatRoot, container, container, true, format, vars);
  106750. };
  106751. var isRemoveBookmarkNode = function (node) {
  106752. return isBookmarkNode$1(node) && isElement$5(node) && (node.id === '_start' || node.id === '_end');
  106753. };
  106754. var removeNodeFormat = function (node) {
  106755. return exists(formatList, function (fmt) {
  106756. return removeFormat$1(ed, fmt, vars, node, node);
  106757. });
  106758. };
  106759. var process = function (node) {
  106760. var lastContentEditable = true;
  106761. var hasContentEditableState = false;
  106762. if (isElement$5(node) && dom.getContentEditable(node)) {
  106763. lastContentEditable = contentEditable;
  106764. contentEditable = dom.getContentEditable(node) === 'true';
  106765. hasContentEditableState = true;
  106766. }
  106767. var children = from(node.childNodes);
  106768. if (contentEditable && !hasContentEditableState) {
  106769. var removed = removeNodeFormat(node);
  106770. var currentNodeMatches = removed || exists(formatList, function (f) {
  106771. return matchName$1(dom, node, f);
  106772. });
  106773. var parentNode = node.parentNode;
  106774. if (!currentNodeMatches && isNonNullable(parentNode) && shouldExpandToSelector(format)) {
  106775. removeNodeFormat(parentNode);
  106776. }
  106777. }
  106778. if (format.deep) {
  106779. if (children.length) {
  106780. for (var i = 0; i < children.length; i++) {
  106781. process(children[i]);
  106782. }
  106783. if (hasContentEditableState) {
  106784. contentEditable = lastContentEditable;
  106785. }
  106786. }
  106787. }
  106788. var textDecorations = [
  106789. 'underline',
  106790. 'line-through',
  106791. 'overline'
  106792. ];
  106793. each$k(textDecorations, function (decoration) {
  106794. if (isElement$5(node) && ed.dom.getStyle(node, 'text-decoration') === decoration && node.parentNode && getTextDecoration(dom, node.parentNode) === decoration) {
  106795. removeFormat$1(ed, {
  106796. deep: false,
  106797. exact: true,
  106798. inline: 'span',
  106799. styles: { textDecoration: decoration }
  106800. }, null, node);
  106801. }
  106802. });
  106803. };
  106804. var unwrap = function (start) {
  106805. var node = dom.get(start ? '_start' : '_end');
  106806. var out = node[start ? 'firstChild' : 'lastChild'];
  106807. if (isRemoveBookmarkNode(out)) {
  106808. out = out[start ? 'firstChild' : 'lastChild'];
  106809. }
  106810. if (isText$7(out) && out.data.length === 0) {
  106811. out = start ? node.previousSibling || node.nextSibling : node.nextSibling || node.previousSibling;
  106812. }
  106813. dom.remove(node, true);
  106814. return out;
  106815. };
  106816. var removeRngStyle = function (rng) {
  106817. var startContainer, endContainer;
  106818. var expandedRng = expandRng(ed, rng, formatList, rng.collapsed);
  106819. if (format.split) {
  106820. expandedRng = split(expandedRng);
  106821. startContainer = getContainer(ed, expandedRng, true);
  106822. endContainer = getContainer(ed, expandedRng);
  106823. if (startContainer !== endContainer) {
  106824. startContainer = normalizeTableSelection(startContainer, true);
  106825. endContainer = normalizeTableSelection(endContainer, false);
  106826. if (isChildOfInlineParent(dom, startContainer, endContainer)) {
  106827. var marker = Optional.from(startContainer.firstChild).getOr(startContainer);
  106828. splitToFormatRoot(wrapWithSiblings(dom, marker, true, 'span', {
  106829. 'id': '_start',
  106830. 'data-mce-type': 'bookmark'
  106831. }));
  106832. unwrap(true);
  106833. return;
  106834. }
  106835. if (isChildOfInlineParent(dom, endContainer, startContainer)) {
  106836. var marker = Optional.from(endContainer.lastChild).getOr(endContainer);
  106837. splitToFormatRoot(wrapWithSiblings(dom, marker, false, 'span', {
  106838. 'id': '_end',
  106839. 'data-mce-type': 'bookmark'
  106840. }));
  106841. unwrap(false);
  106842. return;
  106843. }
  106844. startContainer = wrap$1(dom, startContainer, 'span', {
  106845. 'id': '_start',
  106846. 'data-mce-type': 'bookmark'
  106847. });
  106848. endContainer = wrap$1(dom, endContainer, 'span', {
  106849. 'id': '_end',
  106850. 'data-mce-type': 'bookmark'
  106851. });
  106852. var newRng = dom.createRng();
  106853. newRng.setStartAfter(startContainer);
  106854. newRng.setEndBefore(endContainer);
  106855. walk$2(dom, newRng, function (nodes) {
  106856. each$k(nodes, function (n) {
  106857. if (!isBookmarkNode$1(n) && !isBookmarkNode$1(n.parentNode)) {
  106858. splitToFormatRoot(n);
  106859. }
  106860. });
  106861. });
  106862. splitToFormatRoot(startContainer);
  106863. splitToFormatRoot(endContainer);
  106864. startContainer = unwrap(true);
  106865. endContainer = unwrap();
  106866. } else {
  106867. startContainer = endContainer = splitToFormatRoot(startContainer);
  106868. }
  106869. expandedRng.startContainer = startContainer.parentNode ? startContainer.parentNode : startContainer;
  106870. expandedRng.startOffset = dom.nodeIndex(startContainer);
  106871. expandedRng.endContainer = endContainer.parentNode ? endContainer.parentNode : endContainer;
  106872. expandedRng.endOffset = dom.nodeIndex(endContainer) + 1;
  106873. }
  106874. walk$2(dom, expandedRng, function (nodes) {
  106875. each$k(nodes, process);
  106876. });
  106877. };
  106878. if (node) {
  106879. if (isNode(node)) {
  106880. var rng = dom.createRng();
  106881. rng.setStartBefore(node);
  106882. rng.setEndAfter(node);
  106883. removeRngStyle(rng);
  106884. } else {
  106885. removeRngStyle(node);
  106886. }
  106887. fireFormatRemove(ed, name, node, vars);
  106888. return;
  106889. }
  106890. if (dom.getContentEditable(selection.getNode()) === 'false') {
  106891. node = selection.getNode();
  106892. for (var i = 0; i < formatList.length; i++) {
  106893. if (formatList[i].ceFalseOverride) {
  106894. if (removeFormat$1(ed, formatList[i], vars, node, node)) {
  106895. break;
  106896. }
  106897. }
  106898. }
  106899. fireFormatRemove(ed, name, node, vars);
  106900. return;
  106901. }
  106902. if (!selection.isCollapsed() || !isInlineFormat(format) || getCellsFromEditor(ed).length) {
  106903. preserve(selection, true, function () {
  106904. runOnRanges(ed, removeRngStyle);
  106905. });
  106906. if (isInlineFormat(format) && match$2(ed, name, vars, selection.getStart())) {
  106907. moveStart(dom, selection, selection.getRng());
  106908. }
  106909. ed.nodeChanged();
  106910. } else {
  106911. removeCaretFormat(ed, name, vars, similar);
  106912. }
  106913. fireFormatRemove(ed, name, node, vars);
  106914. };
  106915. var each$8 = Tools.each;
  106916. var mergeTextDecorationsAndColor = function (dom, format, vars, node) {
  106917. var processTextDecorationsAndColor = function (n) {
  106918. if (n.nodeType === 1 && n.parentNode && n.parentNode.nodeType === 1) {
  106919. var textDecoration = getTextDecoration(dom, n.parentNode);
  106920. if (dom.getStyle(n, 'color') && textDecoration) {
  106921. dom.setStyle(n, 'text-decoration', textDecoration);
  106922. } else if (dom.getStyle(n, 'text-decoration') === textDecoration) {
  106923. dom.setStyle(n, 'text-decoration', null);
  106924. }
  106925. }
  106926. };
  106927. if (format.styles && (format.styles.color || format.styles.textDecoration)) {
  106928. Tools.walk(node, processTextDecorationsAndColor, 'childNodes');
  106929. processTextDecorationsAndColor(node);
  106930. }
  106931. };
  106932. var mergeBackgroundColorAndFontSize = function (dom, format, vars, node) {
  106933. if (format.styles && format.styles.backgroundColor) {
  106934. processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'backgroundColor', replaceVars(format.styles.backgroundColor, vars)));
  106935. }
  106936. };
  106937. var mergeSubSup = function (dom, format, vars, node) {
  106938. if (isInlineFormat(format) && (format.inline === 'sub' || format.inline === 'sup')) {
  106939. processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'fontSize', ''));
  106940. dom.remove(dom.select(format.inline === 'sup' ? 'sub' : 'sup', node), true);
  106941. }
  106942. };
  106943. var mergeWithChildren = function (editor, formatList, vars, node) {
  106944. each$8(formatList, function (format) {
  106945. if (isInlineFormat(format)) {
  106946. each$8(editor.dom.select(format.inline, node), function (child) {
  106947. if (!isElementNode$1(child)) {
  106948. return;
  106949. }
  106950. removeFormat$1(editor, format, vars, child, format.exact ? child : null);
  106951. });
  106952. }
  106953. clearChildStyles(editor.dom, format, node);
  106954. });
  106955. };
  106956. var mergeWithParents = function (editor, format, name, vars, node) {
  106957. if (matchNode(editor, node.parentNode, name, vars)) {
  106958. if (removeFormat$1(editor, format, vars, node)) {
  106959. return;
  106960. }
  106961. }
  106962. if (format.merge_with_parents) {
  106963. editor.dom.getParent(node.parentNode, function (parent) {
  106964. if (matchNode(editor, parent, name, vars)) {
  106965. removeFormat$1(editor, format, vars, node);
  106966. return true;
  106967. }
  106968. });
  106969. }
  106970. };
  106971. var each$7 = Tools.each;
  106972. var isElementNode = function (node) {
  106973. return isElement$5(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$2(node);
  106974. };
  106975. var canFormatBR = function (editor, format, node, parentName) {
  106976. if (canFormatEmptyLines(editor) && isInlineFormat(format)) {
  106977. var validBRParentElements = getTextRootBlockElements(editor.schema);
  106978. var hasCaretNodeSibling = sibling(SugarElement.fromDom(node), function (sibling) {
  106979. return isCaretNode(sibling.dom);
  106980. });
  106981. return hasNonNullableKey(validBRParentElements, parentName) && isEmpty$2(SugarElement.fromDom(node.parentNode), false) && !hasCaretNodeSibling;
  106982. } else {
  106983. return false;
  106984. }
  106985. };
  106986. var applyFormat$1 = function (ed, name, vars, node) {
  106987. var formatList = ed.formatter.get(name);
  106988. var format = formatList[0];
  106989. var isCollapsed = !node && ed.selection.isCollapsed();
  106990. var dom = ed.dom;
  106991. var selection = ed.selection;
  106992. var setElementFormat = function (elm, fmt) {
  106993. if (fmt === void 0) {
  106994. fmt = format;
  106995. }
  106996. if (isFunction(fmt.onformat)) {
  106997. fmt.onformat(elm, fmt, vars, node);
  106998. }
  106999. each$7(fmt.styles, function (value, name) {
  107000. dom.setStyle(elm, name, replaceVars(value, vars));
  107001. });
  107002. if (fmt.styles) {
  107003. var styleVal = dom.getAttrib(elm, 'style');
  107004. if (styleVal) {
  107005. dom.setAttrib(elm, 'data-mce-style', styleVal);
  107006. }
  107007. }
  107008. each$7(fmt.attributes, function (value, name) {
  107009. dom.setAttrib(elm, name, replaceVars(value, vars));
  107010. });
  107011. each$7(fmt.classes, function (value) {
  107012. value = replaceVars(value, vars);
  107013. if (!dom.hasClass(elm, value)) {
  107014. dom.addClass(elm, value);
  107015. }
  107016. });
  107017. };
  107018. var applyNodeStyle = function (formatList, node) {
  107019. var found = false;
  107020. each$7(formatList, function (format) {
  107021. if (!isSelectorFormat(format)) {
  107022. return false;
  107023. }
  107024. if (isNonNullable(format.collapsed) && format.collapsed !== isCollapsed) {
  107025. return;
  107026. }
  107027. if (dom.is(node, format.selector) && !isCaretNode(node)) {
  107028. setElementFormat(node, format);
  107029. found = true;
  107030. return false;
  107031. }
  107032. });
  107033. return found;
  107034. };
  107035. var createWrapElement = function (wrapName) {
  107036. if (isString$1(wrapName)) {
  107037. var wrapElm = dom.create(wrapName);
  107038. setElementFormat(wrapElm);
  107039. return wrapElm;
  107040. } else {
  107041. return null;
  107042. }
  107043. };
  107044. var applyRngStyle = function (dom, rng, nodeSpecific) {
  107045. var newWrappers = [];
  107046. var contentEditable = true;
  107047. var wrapName = format.inline || format.block;
  107048. var wrapElm = createWrapElement(wrapName);
  107049. walk$2(dom, rng, function (nodes) {
  107050. var currentWrapElm;
  107051. var process = function (node) {
  107052. var hasContentEditableState = false;
  107053. var lastContentEditable = contentEditable;
  107054. var nodeName = node.nodeName.toLowerCase();
  107055. var parentNode = node.parentNode;
  107056. var parentName = parentNode.nodeName.toLowerCase();
  107057. if (isElement$5(node) && dom.getContentEditable(node)) {
  107058. lastContentEditable = contentEditable;
  107059. contentEditable = dom.getContentEditable(node) === 'true';
  107060. hasContentEditableState = true;
  107061. }
  107062. if (isBr$5(node) && !canFormatBR(ed, format, node, parentName)) {
  107063. currentWrapElm = null;
  107064. if (isBlockFormat(format)) {
  107065. dom.remove(node);
  107066. }
  107067. return;
  107068. }
  107069. if (isBlockFormat(format) && format.wrapper && matchNode(ed, node, name, vars)) {
  107070. currentWrapElm = null;
  107071. return;
  107072. }
  107073. if (contentEditable && !hasContentEditableState && isBlockFormat(format) && !format.wrapper && isTextBlock$1(ed, nodeName) && isValid(ed, parentName, wrapName)) {
  107074. var elm = dom.rename(node, wrapName);
  107075. setElementFormat(elm);
  107076. newWrappers.push(elm);
  107077. currentWrapElm = null;
  107078. return;
  107079. }
  107080. if (isSelectorFormat(format)) {
  107081. var found = applyNodeStyle(formatList, node);
  107082. if (!found && isNonNullable(parentNode) && shouldExpandToSelector(format)) {
  107083. found = applyNodeStyle(formatList, parentNode);
  107084. }
  107085. if (!isInlineFormat(format) || found) {
  107086. currentWrapElm = null;
  107087. return;
  107088. }
  107089. }
  107090. if (contentEditable && !hasContentEditableState && isValid(ed, wrapName, nodeName) && isValid(ed, parentName, wrapName) && !(!nodeSpecific && isText$7(node) && isZwsp(node.data)) && !isCaretNode(node) && (!isInlineFormat(format) || !dom.isBlock(node))) {
  107091. if (!currentWrapElm) {
  107092. currentWrapElm = dom.clone(wrapElm, false);
  107093. node.parentNode.insertBefore(currentWrapElm, node);
  107094. newWrappers.push(currentWrapElm);
  107095. }
  107096. currentWrapElm.appendChild(node);
  107097. } else {
  107098. currentWrapElm = null;
  107099. each$k(from(node.childNodes), process);
  107100. if (hasContentEditableState) {
  107101. contentEditable = lastContentEditable;
  107102. }
  107103. currentWrapElm = null;
  107104. }
  107105. };
  107106. each$k(nodes, process);
  107107. });
  107108. if (format.links === true) {
  107109. each$k(newWrappers, function (node) {
  107110. var process = function (node) {
  107111. if (node.nodeName === 'A') {
  107112. setElementFormat(node, format);
  107113. }
  107114. each$k(from(node.childNodes), process);
  107115. };
  107116. process(node);
  107117. });
  107118. }
  107119. each$k(newWrappers, function (node) {
  107120. var getChildCount = function (node) {
  107121. var count = 0;
  107122. each$k(node.childNodes, function (node) {
  107123. if (!isEmptyTextNode$1(node) && !isBookmarkNode$1(node)) {
  107124. count++;
  107125. }
  107126. });
  107127. return count;
  107128. };
  107129. var mergeStyles = function (node) {
  107130. var childElement = find$3(node.childNodes, isElementNode).filter(function (child) {
  107131. return matchName$1(dom, child, format);
  107132. });
  107133. return childElement.map(function (child) {
  107134. var clone = dom.clone(child, false);
  107135. setElementFormat(clone);
  107136. dom.replace(clone, node, true);
  107137. dom.remove(child, true);
  107138. return clone;
  107139. }).getOr(node);
  107140. };
  107141. var childCount = getChildCount(node);
  107142. if ((newWrappers.length > 1 || !dom.isBlock(node)) && childCount === 0) {
  107143. dom.remove(node, true);
  107144. return;
  107145. }
  107146. if (isInlineFormat(format) || isBlockFormat(format) && format.wrapper) {
  107147. if (!format.exact && childCount === 1) {
  107148. node = mergeStyles(node);
  107149. }
  107150. mergeWithChildren(ed, formatList, vars, node);
  107151. mergeWithParents(ed, format, name, vars, node);
  107152. mergeBackgroundColorAndFontSize(dom, format, vars, node);
  107153. mergeTextDecorationsAndColor(dom, format, vars, node);
  107154. mergeSubSup(dom, format, vars, node);
  107155. mergeSiblings(dom, format, vars, node);
  107156. }
  107157. });
  107158. };
  107159. if (dom.getContentEditable(selection.getNode()) === 'false') {
  107160. node = selection.getNode();
  107161. for (var i = 0, l = formatList.length; i < l; i++) {
  107162. var formatItem = formatList[i];
  107163. if (formatItem.ceFalseOverride && isSelectorFormat(formatItem) && dom.is(node, formatItem.selector)) {
  107164. setElementFormat(node, formatItem);
  107165. break;
  107166. }
  107167. }
  107168. fireFormatApply(ed, name, node, vars);
  107169. return;
  107170. }
  107171. if (format) {
  107172. if (node) {
  107173. if (isNode(node)) {
  107174. if (!applyNodeStyle(formatList, node)) {
  107175. var rng = dom.createRng();
  107176. rng.setStartBefore(node);
  107177. rng.setEndAfter(node);
  107178. applyRngStyle(dom, expandRng(ed, rng, formatList), true);
  107179. }
  107180. } else {
  107181. applyRngStyle(dom, node, true);
  107182. }
  107183. } else {
  107184. if (!isCollapsed || !isInlineFormat(format) || getCellsFromEditor(ed).length) {
  107185. var curSelNode = selection.getNode();
  107186. var firstFormat = formatList[0];
  107187. if (!ed.settings.forced_root_block && firstFormat.defaultBlock && !dom.getParent(curSelNode, dom.isBlock)) {
  107188. applyFormat$1(ed, firstFormat.defaultBlock);
  107189. }
  107190. selection.setRng(normalize(selection.getRng()));
  107191. preserve(selection, true, function () {
  107192. runOnRanges(ed, function (selectionRng, fake) {
  107193. var expandedRng = fake ? selectionRng : expandRng(ed, selectionRng, formatList);
  107194. applyRngStyle(dom, expandedRng, false);
  107195. });
  107196. });
  107197. moveStart(dom, selection, selection.getRng());
  107198. ed.nodeChanged();
  107199. } else {
  107200. applyCaretFormat(ed, name, vars);
  107201. }
  107202. }
  107203. postProcess$1(name, ed);
  107204. }
  107205. fireFormatApply(ed, name, node, vars);
  107206. };
  107207. var hasVars = function (value) {
  107208. return has$2(value, 'vars');
  107209. };
  107210. var setup$j = function (registeredFormatListeners, editor) {
  107211. registeredFormatListeners.set({});
  107212. editor.on('NodeChange', function (e) {
  107213. updateAndFireChangeCallbacks(editor, e.element, registeredFormatListeners.get());
  107214. });
  107215. editor.on('FormatApply FormatRemove', function (e) {
  107216. var element = Optional.from(e.node).map(function (nodeOrRange) {
  107217. return isNode(nodeOrRange) ? nodeOrRange : nodeOrRange.startContainer;
  107218. }).bind(function (node) {
  107219. return isElement$5(node) ? Optional.some(node) : Optional.from(node.parentElement);
  107220. }).getOrThunk(function () {
  107221. return fallbackElement(editor);
  107222. });
  107223. updateAndFireChangeCallbacks(editor, element, registeredFormatListeners.get());
  107224. });
  107225. };
  107226. var fallbackElement = function (editor) {
  107227. return editor.selection.getStart();
  107228. };
  107229. var matchingNode = function (editor, parents, format, similar, vars) {
  107230. var isMatchingNode = function (node) {
  107231. var matchingFormat = editor.formatter.matchNode(node, format, vars !== null && vars !== void 0 ? vars : {}, similar);
  107232. return !isUndefined(matchingFormat);
  107233. };
  107234. var isUnableToMatch = function (node) {
  107235. if (matchesUnInheritedFormatSelector(editor, node, format)) {
  107236. return true;
  107237. } else {
  107238. if (!similar) {
  107239. return isNonNullable(editor.formatter.matchNode(node, format, vars, true));
  107240. } else {
  107241. return false;
  107242. }
  107243. }
  107244. };
  107245. return findUntil$1(parents, isMatchingNode, isUnableToMatch);
  107246. };
  107247. var getParents = function (editor, elm) {
  107248. var element = elm !== null && elm !== void 0 ? elm : fallbackElement(editor);
  107249. return filter$4(getParents$2(editor.dom, element), function (node) {
  107250. return isElement$5(node) && !isBogus$2(node);
  107251. });
  107252. };
  107253. var updateAndFireChangeCallbacks = function (editor, elm, registeredCallbacks) {
  107254. var parents = getParents(editor, elm);
  107255. each$j(registeredCallbacks, function (data, format) {
  107256. var runIfChanged = function (spec) {
  107257. var match = matchingNode(editor, parents, format, spec.similar, hasVars(spec) ? spec.vars : undefined);
  107258. var isSet = match.isSome();
  107259. if (spec.state.get() !== isSet) {
  107260. spec.state.set(isSet);
  107261. var node_1 = match.getOr(elm);
  107262. if (hasVars(spec)) {
  107263. spec.callback(isSet, {
  107264. node: node_1,
  107265. format: format,
  107266. parents: parents
  107267. });
  107268. } else {
  107269. each$k(spec.callbacks, function (callback) {
  107270. return callback(isSet, {
  107271. node: node_1,
  107272. format: format,
  107273. parents: parents
  107274. });
  107275. });
  107276. }
  107277. }
  107278. };
  107279. each$k([
  107280. data.withSimilar,
  107281. data.withoutSimilar
  107282. ], runIfChanged);
  107283. each$k(data.withVars, runIfChanged);
  107284. });
  107285. };
  107286. var addListeners = function (editor, registeredFormatListeners, formats, callback, similar, vars) {
  107287. var formatChangeItems = registeredFormatListeners.get();
  107288. each$k(formats.split(','), function (format) {
  107289. var group = get$9(formatChangeItems, format).getOrThunk(function () {
  107290. var base = {
  107291. withSimilar: {
  107292. state: Cell(false),
  107293. similar: true,
  107294. callbacks: []
  107295. },
  107296. withoutSimilar: {
  107297. state: Cell(false),
  107298. similar: false,
  107299. callbacks: []
  107300. },
  107301. withVars: []
  107302. };
  107303. formatChangeItems[format] = base;
  107304. return base;
  107305. });
  107306. var getCurrent = function () {
  107307. var parents = getParents(editor);
  107308. return matchingNode(editor, parents, format, similar, vars).isSome();
  107309. };
  107310. if (isUndefined(vars)) {
  107311. var toAppendTo = similar ? group.withSimilar : group.withoutSimilar;
  107312. toAppendTo.callbacks.push(callback);
  107313. if (toAppendTo.callbacks.length === 1) {
  107314. toAppendTo.state.set(getCurrent());
  107315. }
  107316. } else {
  107317. group.withVars.push({
  107318. state: Cell(getCurrent()),
  107319. similar: similar,
  107320. vars: vars,
  107321. callback: callback
  107322. });
  107323. }
  107324. });
  107325. registeredFormatListeners.set(formatChangeItems);
  107326. };
  107327. var removeListeners = function (registeredFormatListeners, formats, callback) {
  107328. var formatChangeItems = registeredFormatListeners.get();
  107329. each$k(formats.split(','), function (format) {
  107330. return get$9(formatChangeItems, format).each(function (group) {
  107331. formatChangeItems[format] = {
  107332. withSimilar: __assign(__assign({}, group.withSimilar), {
  107333. callbacks: filter$4(group.withSimilar.callbacks, function (cb) {
  107334. return cb !== callback;
  107335. })
  107336. }),
  107337. withoutSimilar: __assign(__assign({}, group.withoutSimilar), {
  107338. callbacks: filter$4(group.withoutSimilar.callbacks, function (cb) {
  107339. return cb !== callback;
  107340. })
  107341. }),
  107342. withVars: filter$4(group.withVars, function (item) {
  107343. return item.callback !== callback;
  107344. })
  107345. };
  107346. });
  107347. });
  107348. registeredFormatListeners.set(formatChangeItems);
  107349. };
  107350. var formatChangedInternal = function (editor, registeredFormatListeners, formats, callback, similar, vars) {
  107351. if (registeredFormatListeners.get() === null) {
  107352. setup$j(registeredFormatListeners, editor);
  107353. }
  107354. addListeners(editor, registeredFormatListeners, formats, callback, similar, vars);
  107355. return {
  107356. unbind: function () {
  107357. return removeListeners(registeredFormatListeners, formats, callback);
  107358. }
  107359. };
  107360. };
  107361. var toggle = function (editor, name, vars, node) {
  107362. var fmt = editor.formatter.get(name);
  107363. if (match$2(editor, name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) {
  107364. remove$1(editor, name, vars, node);
  107365. } else {
  107366. applyFormat$1(editor, name, vars, node);
  107367. }
  107368. };
  107369. var fromElements = function (elements, scope) {
  107370. var doc = scope || document;
  107371. var fragment = doc.createDocumentFragment();
  107372. each$k(elements, function (element) {
  107373. fragment.appendChild(element.dom);
  107374. });
  107375. return SugarElement.fromDom(fragment);
  107376. };
  107377. var tableModel = function (element, width, rows) {
  107378. return {
  107379. element: element,
  107380. width: width,
  107381. rows: rows
  107382. };
  107383. };
  107384. var tableRow = function (element, cells) {
  107385. return {
  107386. element: element,
  107387. cells: cells
  107388. };
  107389. };
  107390. var cellPosition = function (x, y) {
  107391. return {
  107392. x: x,
  107393. y: y
  107394. };
  107395. };
  107396. var getSpan = function (td, key) {
  107397. var value = parseInt(get$6(td, key), 10);
  107398. return isNaN(value) ? 1 : value;
  107399. };
  107400. var fillout = function (table, x, y, tr, td) {
  107401. var rowspan = getSpan(td, 'rowspan');
  107402. var colspan = getSpan(td, 'colspan');
  107403. var rows = table.rows;
  107404. for (var y2 = y; y2 < y + rowspan; y2++) {
  107405. if (!rows[y2]) {
  107406. rows[y2] = tableRow(deep$1(tr), []);
  107407. }
  107408. for (var x2 = x; x2 < x + colspan; x2++) {
  107409. var cells = rows[y2].cells;
  107410. cells[x2] = y2 === y && x2 === x ? td : shallow(td);
  107411. }
  107412. }
  107413. };
  107414. var cellExists = function (table, x, y) {
  107415. var rows = table.rows;
  107416. var cells = rows[y] ? rows[y].cells : [];
  107417. return !!cells[x];
  107418. };
  107419. var skipCellsX = function (table, x, y) {
  107420. while (cellExists(table, x, y)) {
  107421. x++;
  107422. }
  107423. return x;
  107424. };
  107425. var getWidth = function (rows) {
  107426. return foldl(rows, function (acc, row) {
  107427. return row.cells.length > acc ? row.cells.length : acc;
  107428. }, 0);
  107429. };
  107430. var findElementPos = function (table, element) {
  107431. var rows = table.rows;
  107432. for (var y = 0; y < rows.length; y++) {
  107433. var cells = rows[y].cells;
  107434. for (var x = 0; x < cells.length; x++) {
  107435. if (eq(cells[x], element)) {
  107436. return Optional.some(cellPosition(x, y));
  107437. }
  107438. }
  107439. }
  107440. return Optional.none();
  107441. };
  107442. var extractRows = function (table, sx, sy, ex, ey) {
  107443. var newRows = [];
  107444. var rows = table.rows;
  107445. for (var y = sy; y <= ey; y++) {
  107446. var cells = rows[y].cells;
  107447. var slice = sx < ex ? cells.slice(sx, ex + 1) : cells.slice(ex, sx + 1);
  107448. newRows.push(tableRow(rows[y].element, slice));
  107449. }
  107450. return newRows;
  107451. };
  107452. var subTable = function (table, startPos, endPos) {
  107453. var sx = startPos.x, sy = startPos.y;
  107454. var ex = endPos.x, ey = endPos.y;
  107455. var newRows = sy < ey ? extractRows(table, sx, sy, ex, ey) : extractRows(table, sx, ey, ex, sy);
  107456. return tableModel(table.element, getWidth(newRows), newRows);
  107457. };
  107458. var createDomTable = function (table, rows) {
  107459. var tableElement = shallow(table.element);
  107460. var tableBody = SugarElement.fromTag('tbody');
  107461. append(tableBody, rows);
  107462. append$1(tableElement, tableBody);
  107463. return tableElement;
  107464. };
  107465. var modelRowsToDomRows = function (table) {
  107466. return map$3(table.rows, function (row) {
  107467. var cells = map$3(row.cells, function (cell) {
  107468. var td = deep$1(cell);
  107469. remove$6(td, 'colspan');
  107470. remove$6(td, 'rowspan');
  107471. return td;
  107472. });
  107473. var tr = shallow(row.element);
  107474. append(tr, cells);
  107475. return tr;
  107476. });
  107477. };
  107478. var fromDom = function (tableElm) {
  107479. var table = tableModel(shallow(tableElm), 0, []);
  107480. each$k(descendants(tableElm, 'tr'), function (tr, y) {
  107481. each$k(descendants(tr, 'td,th'), function (td, x) {
  107482. fillout(table, skipCellsX(table, x, y), y, tr, td);
  107483. });
  107484. });
  107485. return tableModel(table.element, getWidth(table.rows), table.rows);
  107486. };
  107487. var toDom = function (table) {
  107488. return createDomTable(table, modelRowsToDomRows(table));
  107489. };
  107490. var subsection = function (table, startElement, endElement) {
  107491. return findElementPos(table, startElement).bind(function (startPos) {
  107492. return findElementPos(table, endElement).map(function (endPos) {
  107493. return subTable(table, startPos, endPos);
  107494. });
  107495. });
  107496. };
  107497. var findParentListContainer = function (parents) {
  107498. return find$3(parents, function (elm) {
  107499. return name(elm) === 'ul' || name(elm) === 'ol';
  107500. });
  107501. };
  107502. var getFullySelectedListWrappers = function (parents, rng) {
  107503. return find$3(parents, function (elm) {
  107504. return name(elm) === 'li' && hasAllContentsSelected(elm, rng);
  107505. }).fold(constant([]), function (_li) {
  107506. return findParentListContainer(parents).map(function (listCont) {
  107507. var listElm = SugarElement.fromTag(name(listCont));
  107508. var listStyles = filter$3(getAllRaw(listCont), function (_style, name) {
  107509. return startsWith(name, 'list-style');
  107510. });
  107511. setAll(listElm, listStyles);
  107512. return [
  107513. SugarElement.fromTag('li'),
  107514. listElm
  107515. ];
  107516. }).getOr([]);
  107517. });
  107518. };
  107519. var wrap = function (innerElm, elms) {
  107520. var wrapped = foldl(elms, function (acc, elm) {
  107521. append$1(elm, acc);
  107522. return elm;
  107523. }, innerElm);
  107524. return elms.length > 0 ? fromElements([wrapped]) : wrapped;
  107525. };
  107526. var directListWrappers = function (commonAnchorContainer) {
  107527. if (isListItem(commonAnchorContainer)) {
  107528. return parent(commonAnchorContainer).filter(isList).fold(constant([]), function (listElm) {
  107529. return [
  107530. commonAnchorContainer,
  107531. listElm
  107532. ];
  107533. });
  107534. } else {
  107535. return isList(commonAnchorContainer) ? [commonAnchorContainer] : [];
  107536. }
  107537. };
  107538. var getWrapElements = function (rootNode, rng) {
  107539. var commonAnchorContainer = SugarElement.fromDom(rng.commonAncestorContainer);
  107540. var parents = parentsAndSelf(commonAnchorContainer, rootNode);
  107541. var wrapElements = filter$4(parents, function (elm) {
  107542. return isInline$1(elm) || isHeading(elm);
  107543. });
  107544. var listWrappers = getFullySelectedListWrappers(parents, rng);
  107545. var allWrappers = wrapElements.concat(listWrappers.length ? listWrappers : directListWrappers(commonAnchorContainer));
  107546. return map$3(allWrappers, shallow);
  107547. };
  107548. var emptyFragment = function () {
  107549. return fromElements([]);
  107550. };
  107551. var getFragmentFromRange = function (rootNode, rng) {
  107552. return wrap(SugarElement.fromDom(rng.cloneContents()), getWrapElements(rootNode, rng));
  107553. };
  107554. var getParentTable = function (rootElm, cell) {
  107555. return ancestor$2(cell, 'table', curry(eq, rootElm));
  107556. };
  107557. var getTableFragment = function (rootNode, selectedTableCells) {
  107558. return getParentTable(rootNode, selectedTableCells[0]).bind(function (tableElm) {
  107559. var firstCell = selectedTableCells[0];
  107560. var lastCell = selectedTableCells[selectedTableCells.length - 1];
  107561. var fullTableModel = fromDom(tableElm);
  107562. return subsection(fullTableModel, firstCell, lastCell).map(function (sectionedTableModel) {
  107563. return fromElements([toDom(sectionedTableModel)]);
  107564. });
  107565. }).getOrThunk(emptyFragment);
  107566. };
  107567. var getSelectionFragment = function (rootNode, ranges) {
  107568. return ranges.length > 0 && ranges[0].collapsed ? emptyFragment() : getFragmentFromRange(rootNode, ranges[0]);
  107569. };
  107570. var read$3 = function (rootNode, ranges) {
  107571. var selectedCells = getCellsFromElementOrRanges(ranges, rootNode);
  107572. return selectedCells.length > 0 ? getTableFragment(rootNode, selectedCells) : getSelectionFragment(rootNode, ranges);
  107573. };
  107574. var trimLeadingCollapsibleText = function (text) {
  107575. return text.replace(/^[ \f\n\r\t\v]+/, '');
  107576. };
  107577. var isCollapsibleWhitespace = function (text, index) {
  107578. return index >= 0 && index < text.length && isWhiteSpace(text.charAt(index));
  107579. };
  107580. var getInnerText = function (bin, shouldTrim) {
  107581. var text = trim$2(bin.innerText);
  107582. return shouldTrim ? trimLeadingCollapsibleText(text) : text;
  107583. };
  107584. var getContextNodeName = function (parentBlockOpt) {
  107585. return parentBlockOpt.map(function (block) {
  107586. return block.nodeName;
  107587. }).getOr('div').toLowerCase();
  107588. };
  107589. var getTextContent = function (editor) {
  107590. return Optional.from(editor.selection.getRng()).map(function (rng) {
  107591. var parentBlockOpt = Optional.from(editor.dom.getParent(rng.commonAncestorContainer, editor.dom.isBlock));
  107592. var body = editor.getBody();
  107593. var contextNodeName = getContextNodeName(parentBlockOpt);
  107594. var shouldTrimSpaces = Env.browser.isIE() && contextNodeName !== 'pre';
  107595. var bin = editor.dom.add(body, contextNodeName, {
  107596. 'data-mce-bogus': 'all',
  107597. 'style': 'overflow: hidden; opacity: 0;'
  107598. }, rng.cloneContents());
  107599. var text = getInnerText(bin, shouldTrimSpaces);
  107600. var nonRenderedText = trim$2(bin.textContent);
  107601. editor.dom.remove(bin);
  107602. if (isCollapsibleWhitespace(nonRenderedText, 0) || isCollapsibleWhitespace(nonRenderedText, nonRenderedText.length - 1)) {
  107603. var parentBlock = parentBlockOpt.getOr(body);
  107604. var parentBlockText = getInnerText(parentBlock, shouldTrimSpaces);
  107605. var textIndex = parentBlockText.indexOf(text);
  107606. if (textIndex === -1) {
  107607. return text;
  107608. } else {
  107609. var hasProceedingSpace = isCollapsibleWhitespace(parentBlockText, textIndex - 1);
  107610. var hasTrailingSpace = isCollapsibleWhitespace(parentBlockText, textIndex + text.length);
  107611. return (hasProceedingSpace ? ' ' : '') + text + (hasTrailingSpace ? ' ' : '');
  107612. }
  107613. } else {
  107614. return text;
  107615. }
  107616. }).getOr('');
  107617. };
  107618. var getSerializedContent = function (editor, args) {
  107619. var rng = editor.selection.getRng(), tmpElm = editor.dom.create('body');
  107620. var sel = editor.selection.getSel();
  107621. var ranges = processRanges(editor, getRanges(sel));
  107622. var fragment = args.contextual ? read$3(SugarElement.fromDom(editor.getBody()), ranges).dom : rng.cloneContents();
  107623. if (fragment) {
  107624. tmpElm.appendChild(fragment);
  107625. }
  107626. return editor.selection.serializer.serialize(tmpElm, args);
  107627. };
  107628. var setupArgs$1 = function (args, format) {
  107629. return __assign(__assign({}, args), {
  107630. format: format,
  107631. get: true,
  107632. selection: true
  107633. });
  107634. };
  107635. var getSelectedContentInternal = function (editor, format, args) {
  107636. if (args === void 0) {
  107637. args = {};
  107638. }
  107639. var defaultedArgs = setupArgs$1(args, format);
  107640. var updatedArgs = editor.fire('BeforeGetContent', defaultedArgs);
  107641. if (updatedArgs.isDefaultPrevented()) {
  107642. editor.fire('GetContent', updatedArgs);
  107643. return updatedArgs.content;
  107644. }
  107645. if (updatedArgs.format === 'text') {
  107646. return getTextContent(editor);
  107647. } else {
  107648. updatedArgs.getInner = true;
  107649. var content = getSerializedContent(editor, updatedArgs);
  107650. if (updatedArgs.format === 'tree') {
  107651. return content;
  107652. } else {
  107653. updatedArgs.content = editor.selection.isCollapsed() ? '' : content;
  107654. editor.fire('GetContent', updatedArgs);
  107655. return updatedArgs.content;
  107656. }
  107657. }
  107658. };
  107659. var KEEP = 0, INSERT = 1, DELETE = 2;
  107660. var diff = function (left, right) {
  107661. var size = left.length + right.length + 2;
  107662. var vDown = new Array(size);
  107663. var vUp = new Array(size);
  107664. var snake = function (start, end, diag) {
  107665. return {
  107666. start: start,
  107667. end: end,
  107668. diag: diag
  107669. };
  107670. };
  107671. var buildScript = function (start1, end1, start2, end2, script) {
  107672. var middle = getMiddleSnake(start1, end1, start2, end2);
  107673. if (middle === null || middle.start === end1 && middle.diag === end1 - end2 || middle.end === start1 && middle.diag === start1 - start2) {
  107674. var i = start1;
  107675. var j = start2;
  107676. while (i < end1 || j < end2) {
  107677. if (i < end1 && j < end2 && left[i] === right[j]) {
  107678. script.push([
  107679. KEEP,
  107680. left[i]
  107681. ]);
  107682. ++i;
  107683. ++j;
  107684. } else {
  107685. if (end1 - start1 > end2 - start2) {
  107686. script.push([
  107687. DELETE,
  107688. left[i]
  107689. ]);
  107690. ++i;
  107691. } else {
  107692. script.push([
  107693. INSERT,
  107694. right[j]
  107695. ]);
  107696. ++j;
  107697. }
  107698. }
  107699. }
  107700. } else {
  107701. buildScript(start1, middle.start, start2, middle.start - middle.diag, script);
  107702. for (var i2 = middle.start; i2 < middle.end; ++i2) {
  107703. script.push([
  107704. KEEP,
  107705. left[i2]
  107706. ]);
  107707. }
  107708. buildScript(middle.end, end1, middle.end - middle.diag, end2, script);
  107709. }
  107710. };
  107711. var buildSnake = function (start, diag, end1, end2) {
  107712. var end = start;
  107713. while (end - diag < end2 && end < end1 && left[end] === right[end - diag]) {
  107714. ++end;
  107715. }
  107716. return snake(start, end, diag);
  107717. };
  107718. var getMiddleSnake = function (start1, end1, start2, end2) {
  107719. var m = end1 - start1;
  107720. var n = end2 - start2;
  107721. if (m === 0 || n === 0) {
  107722. return null;
  107723. }
  107724. var delta = m - n;
  107725. var sum = n + m;
  107726. var offset = (sum % 2 === 0 ? sum : sum + 1) / 2;
  107727. vDown[1 + offset] = start1;
  107728. vUp[1 + offset] = end1 + 1;
  107729. var d, k, i, x, y;
  107730. for (d = 0; d <= offset; ++d) {
  107731. for (k = -d; k <= d; k += 2) {
  107732. i = k + offset;
  107733. if (k === -d || k !== d && vDown[i - 1] < vDown[i + 1]) {
  107734. vDown[i] = vDown[i + 1];
  107735. } else {
  107736. vDown[i] = vDown[i - 1] + 1;
  107737. }
  107738. x = vDown[i];
  107739. y = x - start1 + start2 - k;
  107740. while (x < end1 && y < end2 && left[x] === right[y]) {
  107741. vDown[i] = ++x;
  107742. ++y;
  107743. }
  107744. if (delta % 2 !== 0 && delta - d <= k && k <= delta + d) {
  107745. if (vUp[i - delta] <= vDown[i]) {
  107746. return buildSnake(vUp[i - delta], k + start1 - start2, end1, end2);
  107747. }
  107748. }
  107749. }
  107750. for (k = delta - d; k <= delta + d; k += 2) {
  107751. i = k + offset - delta;
  107752. if (k === delta - d || k !== delta + d && vUp[i + 1] <= vUp[i - 1]) {
  107753. vUp[i] = vUp[i + 1] - 1;
  107754. } else {
  107755. vUp[i] = vUp[i - 1];
  107756. }
  107757. x = vUp[i] - 1;
  107758. y = x - start1 + start2 - k;
  107759. while (x >= start1 && y >= start2 && left[x] === right[y]) {
  107760. vUp[i] = x--;
  107761. y--;
  107762. }
  107763. if (delta % 2 === 0 && -d <= k && k <= d) {
  107764. if (vUp[i] <= vDown[i + delta]) {
  107765. return buildSnake(vUp[i], k + start1 - start2, end1, end2);
  107766. }
  107767. }
  107768. }
  107769. }
  107770. };
  107771. var script = [];
  107772. buildScript(0, left.length, 0, right.length, script);
  107773. return script;
  107774. };
  107775. var getOuterHtml = function (elm) {
  107776. if (isElement$5(elm)) {
  107777. return elm.outerHTML;
  107778. } else if (isText$7(elm)) {
  107779. return Entities.encodeRaw(elm.data, false);
  107780. } else if (isComment(elm)) {
  107781. return '<!--' + elm.data + '-->';
  107782. }
  107783. return '';
  107784. };
  107785. var createFragment = function (html) {
  107786. var node;
  107787. var container = document.createElement('div');
  107788. var frag = document.createDocumentFragment();
  107789. if (html) {
  107790. container.innerHTML = html;
  107791. }
  107792. while (node = container.firstChild) {
  107793. frag.appendChild(node);
  107794. }
  107795. return frag;
  107796. };
  107797. var insertAt = function (elm, html, index) {
  107798. var fragment = createFragment(html);
  107799. if (elm.hasChildNodes() && index < elm.childNodes.length) {
  107800. var target = elm.childNodes[index];
  107801. target.parentNode.insertBefore(fragment, target);
  107802. } else {
  107803. elm.appendChild(fragment);
  107804. }
  107805. };
  107806. var removeAt = function (elm, index) {
  107807. if (elm.hasChildNodes() && index < elm.childNodes.length) {
  107808. var target = elm.childNodes[index];
  107809. target.parentNode.removeChild(target);
  107810. }
  107811. };
  107812. var applyDiff = function (diff, elm) {
  107813. var index = 0;
  107814. each$k(diff, function (action) {
  107815. if (action[0] === KEEP) {
  107816. index++;
  107817. } else if (action[0] === INSERT) {
  107818. insertAt(elm, action[1], index);
  107819. index++;
  107820. } else if (action[0] === DELETE) {
  107821. removeAt(elm, index);
  107822. }
  107823. });
  107824. };
  107825. var read$2 = function (elm) {
  107826. return filter$4(map$3(from(elm.childNodes), getOuterHtml), function (item) {
  107827. return item.length > 0;
  107828. });
  107829. };
  107830. var write = function (fragments, elm) {
  107831. var currentFragments = map$3(from(elm.childNodes), getOuterHtml);
  107832. applyDiff(diff(currentFragments, fragments), elm);
  107833. return elm;
  107834. };
  107835. var lazyTempDocument = cached(function () {
  107836. return document.implementation.createHTMLDocument('undo');
  107837. });
  107838. var hasIframes = function (html) {
  107839. return html.indexOf('</iframe>') !== -1;
  107840. };
  107841. var createFragmentedLevel = function (fragments) {
  107842. return {
  107843. type: 'fragmented',
  107844. fragments: fragments,
  107845. content: '',
  107846. bookmark: null,
  107847. beforeBookmark: null
  107848. };
  107849. };
  107850. var createCompleteLevel = function (content) {
  107851. return {
  107852. type: 'complete',
  107853. fragments: null,
  107854. content: content,
  107855. bookmark: null,
  107856. beforeBookmark: null
  107857. };
  107858. };
  107859. var createFromEditor = function (editor) {
  107860. var fragments = read$2(editor.getBody());
  107861. var trimmedFragments = bind(fragments, function (html) {
  107862. var trimmed = trimInternal(editor.serializer, html);
  107863. return trimmed.length > 0 ? [trimmed] : [];
  107864. });
  107865. var content = trimmedFragments.join('');
  107866. return hasIframes(content) ? createFragmentedLevel(trimmedFragments) : createCompleteLevel(content);
  107867. };
  107868. var applyToEditor = function (editor, level, before) {
  107869. var bookmark = before ? level.beforeBookmark : level.bookmark;
  107870. if (level.type === 'fragmented') {
  107871. write(level.fragments, editor.getBody());
  107872. } else {
  107873. editor.setContent(level.content, {
  107874. format: 'raw',
  107875. no_selection: isNonNullable(bookmark) && isPathBookmark(bookmark) ? !bookmark.isFakeCaret : true
  107876. });
  107877. }
  107878. editor.selection.moveToBookmark(bookmark);
  107879. };
  107880. var getLevelContent = function (level) {
  107881. return level.type === 'fragmented' ? level.fragments.join('') : level.content;
  107882. };
  107883. var getCleanLevelContent = function (level) {
  107884. var elm = SugarElement.fromTag('body', lazyTempDocument());
  107885. set(elm, getLevelContent(level));
  107886. each$k(descendants(elm, '*[data-mce-bogus]'), unwrap);
  107887. return get$3(elm);
  107888. };
  107889. var hasEqualContent = function (level1, level2) {
  107890. return getLevelContent(level1) === getLevelContent(level2);
  107891. };
  107892. var hasEqualCleanedContent = function (level1, level2) {
  107893. return getCleanLevelContent(level1) === getCleanLevelContent(level2);
  107894. };
  107895. var isEq$1 = function (level1, level2) {
  107896. if (!level1 || !level2) {
  107897. return false;
  107898. } else if (hasEqualContent(level1, level2)) {
  107899. return true;
  107900. } else {
  107901. return hasEqualCleanedContent(level1, level2);
  107902. }
  107903. };
  107904. var isUnlocked = function (locks) {
  107905. return locks.get() === 0;
  107906. };
  107907. var setTyping = function (undoManager, typing, locks) {
  107908. if (isUnlocked(locks)) {
  107909. undoManager.typing = typing;
  107910. }
  107911. };
  107912. var endTyping = function (undoManager, locks) {
  107913. if (undoManager.typing) {
  107914. setTyping(undoManager, false, locks);
  107915. undoManager.add();
  107916. }
  107917. };
  107918. var endTypingLevelIgnoreLocks = function (undoManager) {
  107919. if (undoManager.typing) {
  107920. undoManager.typing = false;
  107921. undoManager.add();
  107922. }
  107923. };
  107924. var beforeChange$1 = function (editor, locks, beforeBookmark) {
  107925. if (isUnlocked(locks)) {
  107926. beforeBookmark.set(getUndoBookmark(editor.selection));
  107927. }
  107928. };
  107929. var addUndoLevel$1 = function (editor, undoManager, index, locks, beforeBookmark, level, event) {
  107930. var currentLevel = createFromEditor(editor);
  107931. level = level || {};
  107932. level = Tools.extend(level, currentLevel);
  107933. if (isUnlocked(locks) === false || editor.removed) {
  107934. return null;
  107935. }
  107936. var lastLevel = undoManager.data[index.get()];
  107937. if (editor.fire('BeforeAddUndo', {
  107938. level: level,
  107939. lastLevel: lastLevel,
  107940. originalEvent: event
  107941. }).isDefaultPrevented()) {
  107942. return null;
  107943. }
  107944. if (lastLevel && isEq$1(lastLevel, level)) {
  107945. return null;
  107946. }
  107947. if (undoManager.data[index.get()]) {
  107948. beforeBookmark.get().each(function (bm) {
  107949. undoManager.data[index.get()].beforeBookmark = bm;
  107950. });
  107951. }
  107952. var customUndoRedoLevels = getCustomUndoRedoLevels(editor);
  107953. if (customUndoRedoLevels) {
  107954. if (undoManager.data.length > customUndoRedoLevels) {
  107955. for (var i = 0; i < undoManager.data.length - 1; i++) {
  107956. undoManager.data[i] = undoManager.data[i + 1];
  107957. }
  107958. undoManager.data.length--;
  107959. index.set(undoManager.data.length);
  107960. }
  107961. }
  107962. level.bookmark = getUndoBookmark(editor.selection);
  107963. if (index.get() < undoManager.data.length - 1) {
  107964. undoManager.data.length = index.get() + 1;
  107965. }
  107966. undoManager.data.push(level);
  107967. index.set(undoManager.data.length - 1);
  107968. var args = {
  107969. level: level,
  107970. lastLevel: lastLevel,
  107971. originalEvent: event
  107972. };
  107973. if (index.get() > 0) {
  107974. editor.setDirty(true);
  107975. editor.fire('AddUndo', args);
  107976. editor.fire('change', args);
  107977. } else {
  107978. editor.fire('AddUndo', args);
  107979. }
  107980. return level;
  107981. };
  107982. var clear$1 = function (editor, undoManager, index) {
  107983. undoManager.data = [];
  107984. index.set(0);
  107985. undoManager.typing = false;
  107986. editor.fire('ClearUndos');
  107987. };
  107988. var extra$1 = function (editor, undoManager, index, callback1, callback2) {
  107989. if (undoManager.transact(callback1)) {
  107990. var bookmark = undoManager.data[index.get()].bookmark;
  107991. var lastLevel = undoManager.data[index.get() - 1];
  107992. applyToEditor(editor, lastLevel, true);
  107993. if (undoManager.transact(callback2)) {
  107994. undoManager.data[index.get() - 1].beforeBookmark = bookmark;
  107995. }
  107996. }
  107997. };
  107998. var redo$1 = function (editor, index, data) {
  107999. var level;
  108000. if (index.get() < data.length - 1) {
  108001. index.set(index.get() + 1);
  108002. level = data[index.get()];
  108003. applyToEditor(editor, level, false);
  108004. editor.setDirty(true);
  108005. editor.fire('Redo', { level: level });
  108006. }
  108007. return level;
  108008. };
  108009. var undo$1 = function (editor, undoManager, locks, index) {
  108010. var level;
  108011. if (undoManager.typing) {
  108012. undoManager.add();
  108013. undoManager.typing = false;
  108014. setTyping(undoManager, false, locks);
  108015. }
  108016. if (index.get() > 0) {
  108017. index.set(index.get() - 1);
  108018. level = undoManager.data[index.get()];
  108019. applyToEditor(editor, level, true);
  108020. editor.setDirty(true);
  108021. editor.fire('Undo', { level: level });
  108022. }
  108023. return level;
  108024. };
  108025. var reset$1 = function (undoManager) {
  108026. undoManager.clear();
  108027. undoManager.add();
  108028. };
  108029. var hasUndo$1 = function (editor, undoManager, index) {
  108030. return index.get() > 0 || undoManager.typing && undoManager.data[0] && !isEq$1(createFromEditor(editor), undoManager.data[0]);
  108031. };
  108032. var hasRedo$1 = function (undoManager, index) {
  108033. return index.get() < undoManager.data.length - 1 && !undoManager.typing;
  108034. };
  108035. var transact$1 = function (undoManager, locks, callback) {
  108036. endTyping(undoManager, locks);
  108037. undoManager.beforeChange();
  108038. undoManager.ignore(callback);
  108039. return undoManager.add();
  108040. };
  108041. var ignore$1 = function (locks, callback) {
  108042. try {
  108043. locks.set(locks.get() + 1);
  108044. callback();
  108045. } finally {
  108046. locks.set(locks.get() - 1);
  108047. }
  108048. };
  108049. var addVisualInternal = function (editor, elm) {
  108050. var dom = editor.dom;
  108051. var scope = isNonNullable(elm) ? elm : editor.getBody();
  108052. if (isUndefined(editor.hasVisual)) {
  108053. editor.hasVisual = isVisualAidsEnabled(editor);
  108054. }
  108055. each$k(dom.select('table,a', scope), function (matchedElm) {
  108056. switch (matchedElm.nodeName) {
  108057. case 'TABLE':
  108058. var cls = getVisualAidsTableClass(editor);
  108059. var value = dom.getAttrib(matchedElm, 'border');
  108060. if ((!value || value === '0') && editor.hasVisual) {
  108061. dom.addClass(matchedElm, cls);
  108062. } else {
  108063. dom.removeClass(matchedElm, cls);
  108064. }
  108065. break;
  108066. case 'A':
  108067. if (!dom.getAttrib(matchedElm, 'href')) {
  108068. var value_1 = dom.getAttrib(matchedElm, 'name') || matchedElm.id;
  108069. var cls_1 = getVisualAidsAnchorClass(editor);
  108070. if (value_1 && editor.hasVisual) {
  108071. dom.addClass(matchedElm, cls_1);
  108072. } else {
  108073. dom.removeClass(matchedElm, cls_1);
  108074. }
  108075. }
  108076. break;
  108077. }
  108078. });
  108079. editor.fire('VisualAid', {
  108080. element: elm,
  108081. hasVisual: editor.hasVisual
  108082. });
  108083. };
  108084. var makePlainAdaptor = function (editor) {
  108085. return {
  108086. undoManager: {
  108087. beforeChange: function (locks, beforeBookmark) {
  108088. return beforeChange$1(editor, locks, beforeBookmark);
  108089. },
  108090. add: function (undoManager, index, locks, beforeBookmark, level, event) {
  108091. return addUndoLevel$1(editor, undoManager, index, locks, beforeBookmark, level, event);
  108092. },
  108093. undo: function (undoManager, locks, index) {
  108094. return undo$1(editor, undoManager, locks, index);
  108095. },
  108096. redo: function (index, data) {
  108097. return redo$1(editor, index, data);
  108098. },
  108099. clear: function (undoManager, index) {
  108100. return clear$1(editor, undoManager, index);
  108101. },
  108102. reset: function (undoManager) {
  108103. return reset$1(undoManager);
  108104. },
  108105. hasUndo: function (undoManager, index) {
  108106. return hasUndo$1(editor, undoManager, index);
  108107. },
  108108. hasRedo: function (undoManager, index) {
  108109. return hasRedo$1(undoManager, index);
  108110. },
  108111. transact: function (undoManager, locks, callback) {
  108112. return transact$1(undoManager, locks, callback);
  108113. },
  108114. ignore: function (locks, callback) {
  108115. return ignore$1(locks, callback);
  108116. },
  108117. extra: function (undoManager, index, callback1, callback2) {
  108118. return extra$1(editor, undoManager, index, callback1, callback2);
  108119. }
  108120. },
  108121. formatter: {
  108122. match: function (name, vars, node, similar) {
  108123. return match$2(editor, name, vars, node, similar);
  108124. },
  108125. matchAll: function (names, vars) {
  108126. return matchAll(editor, names, vars);
  108127. },
  108128. matchNode: function (node, name, vars, similar) {
  108129. return matchNode(editor, node, name, vars, similar);
  108130. },
  108131. canApply: function (name) {
  108132. return canApply(editor, name);
  108133. },
  108134. closest: function (names) {
  108135. return closest(editor, names);
  108136. },
  108137. apply: function (name, vars, node) {
  108138. return applyFormat$1(editor, name, vars, node);
  108139. },
  108140. remove: function (name, vars, node, similar) {
  108141. return remove$1(editor, name, vars, node, similar);
  108142. },
  108143. toggle: function (name, vars, node) {
  108144. return toggle(editor, name, vars, node);
  108145. },
  108146. formatChanged: function (registeredFormatListeners, formats, callback, similar, vars) {
  108147. return formatChangedInternal(editor, registeredFormatListeners, formats, callback, similar, vars);
  108148. }
  108149. },
  108150. editor: {
  108151. getContent: function (args, format) {
  108152. return getContentInternal(editor, args, format);
  108153. },
  108154. setContent: function (content, args) {
  108155. return setContentInternal(editor, content, args);
  108156. },
  108157. insertContent: function (value, details) {
  108158. return insertHtmlAtCaret(editor, value, details);
  108159. },
  108160. addVisual: function (elm) {
  108161. return addVisualInternal(editor, elm);
  108162. }
  108163. },
  108164. selection: {
  108165. getContent: function (format, args) {
  108166. return getSelectedContentInternal(editor, format, args);
  108167. }
  108168. },
  108169. raw: {
  108170. getModel: function () {
  108171. return Optional.none();
  108172. }
  108173. }
  108174. };
  108175. };
  108176. var makeRtcAdaptor = function (rtcEditor) {
  108177. var defaultVars = function (vars) {
  108178. return isObject(vars) ? vars : {};
  108179. };
  108180. var undoManager = rtcEditor.undoManager, formatter = rtcEditor.formatter, editor = rtcEditor.editor, selection = rtcEditor.selection, raw = rtcEditor.raw;
  108181. return {
  108182. undoManager: {
  108183. beforeChange: undoManager.beforeChange,
  108184. add: undoManager.add,
  108185. undo: undoManager.undo,
  108186. redo: undoManager.redo,
  108187. clear: undoManager.clear,
  108188. reset: undoManager.reset,
  108189. hasUndo: undoManager.hasUndo,
  108190. hasRedo: undoManager.hasRedo,
  108191. transact: function (_undoManager, _locks, fn) {
  108192. return undoManager.transact(fn);
  108193. },
  108194. ignore: function (_locks, callback) {
  108195. return undoManager.ignore(callback);
  108196. },
  108197. extra: function (_undoManager, _index, callback1, callback2) {
  108198. return undoManager.extra(callback1, callback2);
  108199. }
  108200. },
  108201. formatter: {
  108202. match: function (name, vars, _node, similar) {
  108203. return formatter.match(name, defaultVars(vars), similar);
  108204. },
  108205. matchAll: formatter.matchAll,
  108206. matchNode: formatter.matchNode,
  108207. canApply: function (name) {
  108208. return formatter.canApply(name);
  108209. },
  108210. closest: function (names) {
  108211. return formatter.closest(names);
  108212. },
  108213. apply: function (name, vars, _node) {
  108214. return formatter.apply(name, defaultVars(vars));
  108215. },
  108216. remove: function (name, vars, _node, _similar) {
  108217. return formatter.remove(name, defaultVars(vars));
  108218. },
  108219. toggle: function (name, vars, _node) {
  108220. return formatter.toggle(name, defaultVars(vars));
  108221. },
  108222. formatChanged: function (_rfl, formats, callback, similar, vars) {
  108223. return formatter.formatChanged(formats, callback, similar, vars);
  108224. }
  108225. },
  108226. editor: {
  108227. getContent: function (args, _format) {
  108228. return editor.getContent(args);
  108229. },
  108230. setContent: function (content, args) {
  108231. return editor.setContent(content, args);
  108232. },
  108233. insertContent: function (content, _details) {
  108234. return editor.insertContent(content);
  108235. },
  108236. addVisual: editor.addVisual
  108237. },
  108238. selection: {
  108239. getContent: function (_format, args) {
  108240. return selection.getContent(args);
  108241. }
  108242. },
  108243. raw: {
  108244. getModel: function () {
  108245. return Optional.some(raw.getRawModel());
  108246. }
  108247. }
  108248. };
  108249. };
  108250. var makeNoopAdaptor = function () {
  108251. var nul = constant(null);
  108252. var empty = constant('');
  108253. return {
  108254. undoManager: {
  108255. beforeChange: noop,
  108256. add: nul,
  108257. undo: nul,
  108258. redo: nul,
  108259. clear: noop,
  108260. reset: noop,
  108261. hasUndo: never,
  108262. hasRedo: never,
  108263. transact: nul,
  108264. ignore: noop,
  108265. extra: noop
  108266. },
  108267. formatter: {
  108268. match: never,
  108269. matchAll: constant([]),
  108270. matchNode: constant(undefined),
  108271. canApply: never,
  108272. closest: empty,
  108273. apply: noop,
  108274. remove: noop,
  108275. toggle: noop,
  108276. formatChanged: constant({ unbind: noop })
  108277. },
  108278. editor: {
  108279. getContent: empty,
  108280. setContent: empty,
  108281. insertContent: noop,
  108282. addVisual: noop
  108283. },
  108284. selection: { getContent: empty },
  108285. raw: { getModel: constant(Optional.none()) }
  108286. };
  108287. };
  108288. var isRtc = function (editor) {
  108289. return has$2(editor.plugins, 'rtc');
  108290. };
  108291. var getRtcSetup = function (editor) {
  108292. return get$9(editor.plugins, 'rtc').bind(function (rtcPlugin) {
  108293. return Optional.from(rtcPlugin.setup);
  108294. });
  108295. };
  108296. var setup$i = function (editor) {
  108297. var editorCast = editor;
  108298. return getRtcSetup(editor).fold(function () {
  108299. editorCast.rtcInstance = makePlainAdaptor(editor);
  108300. return Optional.none();
  108301. }, function (setup) {
  108302. editorCast.rtcInstance = makeNoopAdaptor();
  108303. return Optional.some(function () {
  108304. return setup().then(function (rtcEditor) {
  108305. editorCast.rtcInstance = makeRtcAdaptor(rtcEditor);
  108306. return rtcEditor.rtc.isRemote;
  108307. });
  108308. });
  108309. });
  108310. };
  108311. var getRtcInstanceWithFallback = function (editor) {
  108312. return editor.rtcInstance ? editor.rtcInstance : makePlainAdaptor(editor);
  108313. };
  108314. var getRtcInstanceWithError = function (editor) {
  108315. var rtcInstance = editor.rtcInstance;
  108316. if (!rtcInstance) {
  108317. throw new Error('Failed to get RTC instance not yet initialized.');
  108318. } else {
  108319. return rtcInstance;
  108320. }
  108321. };
  108322. var beforeChange = function (editor, locks, beforeBookmark) {
  108323. getRtcInstanceWithError(editor).undoManager.beforeChange(locks, beforeBookmark);
  108324. };
  108325. var addUndoLevel = function (editor, undoManager, index, locks, beforeBookmark, level, event) {
  108326. return getRtcInstanceWithError(editor).undoManager.add(undoManager, index, locks, beforeBookmark, level, event);
  108327. };
  108328. var undo = function (editor, undoManager, locks, index) {
  108329. return getRtcInstanceWithError(editor).undoManager.undo(undoManager, locks, index);
  108330. };
  108331. var redo = function (editor, index, data) {
  108332. return getRtcInstanceWithError(editor).undoManager.redo(index, data);
  108333. };
  108334. var clear = function (editor, undoManager, index) {
  108335. getRtcInstanceWithError(editor).undoManager.clear(undoManager, index);
  108336. };
  108337. var reset = function (editor, undoManager) {
  108338. getRtcInstanceWithError(editor).undoManager.reset(undoManager);
  108339. };
  108340. var hasUndo = function (editor, undoManager, index) {
  108341. return getRtcInstanceWithError(editor).undoManager.hasUndo(undoManager, index);
  108342. };
  108343. var hasRedo = function (editor, undoManager, index) {
  108344. return getRtcInstanceWithError(editor).undoManager.hasRedo(undoManager, index);
  108345. };
  108346. var transact = function (editor, undoManager, locks, callback) {
  108347. return getRtcInstanceWithError(editor).undoManager.transact(undoManager, locks, callback);
  108348. };
  108349. var ignore = function (editor, locks, callback) {
  108350. getRtcInstanceWithError(editor).undoManager.ignore(locks, callback);
  108351. };
  108352. var extra = function (editor, undoManager, index, callback1, callback2) {
  108353. getRtcInstanceWithError(editor).undoManager.extra(undoManager, index, callback1, callback2);
  108354. };
  108355. var matchFormat = function (editor, name, vars, node, similar) {
  108356. return getRtcInstanceWithError(editor).formatter.match(name, vars, node, similar);
  108357. };
  108358. var matchAllFormats = function (editor, names, vars) {
  108359. return getRtcInstanceWithError(editor).formatter.matchAll(names, vars);
  108360. };
  108361. var matchNodeFormat = function (editor, node, name, vars, similar) {
  108362. return getRtcInstanceWithError(editor).formatter.matchNode(node, name, vars, similar);
  108363. };
  108364. var canApplyFormat = function (editor, name) {
  108365. return getRtcInstanceWithError(editor).formatter.canApply(name);
  108366. };
  108367. var closestFormat = function (editor, names) {
  108368. return getRtcInstanceWithError(editor).formatter.closest(names);
  108369. };
  108370. var applyFormat = function (editor, name, vars, node) {
  108371. getRtcInstanceWithError(editor).formatter.apply(name, vars, node);
  108372. };
  108373. var removeFormat = function (editor, name, vars, node, similar) {
  108374. getRtcInstanceWithError(editor).formatter.remove(name, vars, node, similar);
  108375. };
  108376. var toggleFormat = function (editor, name, vars, node) {
  108377. getRtcInstanceWithError(editor).formatter.toggle(name, vars, node);
  108378. };
  108379. var formatChanged = function (editor, registeredFormatListeners, formats, callback, similar, vars) {
  108380. return getRtcInstanceWithError(editor).formatter.formatChanged(registeredFormatListeners, formats, callback, similar, vars);
  108381. };
  108382. var getContent$2 = function (editor, args, format) {
  108383. return getRtcInstanceWithFallback(editor).editor.getContent(args, format);
  108384. };
  108385. var setContent$2 = function (editor, content, args) {
  108386. return getRtcInstanceWithFallback(editor).editor.setContent(content, args);
  108387. };
  108388. var insertContent = function (editor, value, details) {
  108389. return getRtcInstanceWithFallback(editor).editor.insertContent(value, details);
  108390. };
  108391. var getSelectedContent = function (editor, format, args) {
  108392. return getRtcInstanceWithError(editor).selection.getContent(format, args);
  108393. };
  108394. var addVisual$1 = function (editor, elm) {
  108395. return getRtcInstanceWithError(editor).editor.addVisual(elm);
  108396. };
  108397. var getContent$1 = function (editor, args) {
  108398. if (args === void 0) {
  108399. args = {};
  108400. }
  108401. var format = args.format ? args.format : 'html';
  108402. return getSelectedContent(editor, format, args);
  108403. };
  108404. var removeEmpty = function (text) {
  108405. if (text.dom.length === 0) {
  108406. remove$7(text);
  108407. return Optional.none();
  108408. } else {
  108409. return Optional.some(text);
  108410. }
  108411. };
  108412. var walkPastBookmark = function (node, start) {
  108413. return node.filter(function (elm) {
  108414. return BookmarkManager.isBookmarkNode(elm.dom);
  108415. }).bind(start ? nextSibling : prevSibling);
  108416. };
  108417. var merge = function (outer, inner, rng, start) {
  108418. var outerElm = outer.dom;
  108419. var innerElm = inner.dom;
  108420. var oldLength = start ? outerElm.length : innerElm.length;
  108421. if (start) {
  108422. mergeTextNodes(outerElm, innerElm, false, !start);
  108423. rng.setStart(innerElm, oldLength);
  108424. } else {
  108425. mergeTextNodes(innerElm, outerElm, false, !start);
  108426. rng.setEnd(innerElm, oldLength);
  108427. }
  108428. };
  108429. var normalizeTextIfRequired = function (inner, start) {
  108430. parent(inner).each(function (root) {
  108431. var text = inner.dom;
  108432. if (start && needsToBeNbspLeft(root, CaretPosition(text, 0))) {
  108433. normalizeWhitespaceAfter(text, 0);
  108434. } else if (!start && needsToBeNbspRight(root, CaretPosition(text, text.length))) {
  108435. normalizeWhitespaceBefore(text, text.length);
  108436. }
  108437. });
  108438. };
  108439. var mergeAndNormalizeText = function (outerNode, innerNode, rng, start) {
  108440. outerNode.bind(function (outer) {
  108441. var normalizer = start ? normalizeWhitespaceBefore : normalizeWhitespaceAfter;
  108442. normalizer(outer.dom, start ? outer.dom.length : 0);
  108443. return innerNode.filter(isText$8).map(function (inner) {
  108444. return merge(outer, inner, rng, start);
  108445. });
  108446. }).orThunk(function () {
  108447. var innerTextNode = walkPastBookmark(innerNode, start).or(innerNode).filter(isText$8);
  108448. return innerTextNode.map(function (inner) {
  108449. return normalizeTextIfRequired(inner, start);
  108450. });
  108451. });
  108452. };
  108453. var rngSetContent = function (rng, fragment) {
  108454. var firstChild = Optional.from(fragment.firstChild).map(SugarElement.fromDom);
  108455. var lastChild = Optional.from(fragment.lastChild).map(SugarElement.fromDom);
  108456. rng.deleteContents();
  108457. rng.insertNode(fragment);
  108458. var prevText = firstChild.bind(prevSibling).filter(isText$8).bind(removeEmpty);
  108459. var nextText = lastChild.bind(nextSibling).filter(isText$8).bind(removeEmpty);
  108460. mergeAndNormalizeText(prevText, firstChild, rng, true);
  108461. mergeAndNormalizeText(nextText, lastChild, rng, false);
  108462. rng.collapse(false);
  108463. };
  108464. var setupArgs = function (args, content) {
  108465. return __assign(__assign({ format: 'html' }, args), {
  108466. set: true,
  108467. selection: true,
  108468. content: content
  108469. });
  108470. };
  108471. var cleanContent = function (editor, args) {
  108472. if (args.format !== 'raw') {
  108473. var rng = editor.selection.getRng();
  108474. var contextBlock = editor.dom.getParent(rng.commonAncestorContainer, editor.dom.isBlock);
  108475. var contextArgs = contextBlock ? { context: contextBlock.nodeName.toLowerCase() } : {};
  108476. var node = editor.parser.parse(args.content, __assign(__assign({
  108477. isRootContent: true,
  108478. forced_root_block: false
  108479. }, contextArgs), args));
  108480. return HtmlSerializer({ validate: editor.validate }, editor.schema).serialize(node);
  108481. } else {
  108482. return args.content;
  108483. }
  108484. };
  108485. var setContent$1 = function (editor, content, args) {
  108486. if (args === void 0) {
  108487. args = {};
  108488. }
  108489. var defaultedArgs = setupArgs(args, content);
  108490. var updatedArgs = defaultedArgs;
  108491. if (!defaultedArgs.no_events) {
  108492. var eventArgs = editor.fire('BeforeSetContent', defaultedArgs);
  108493. if (eventArgs.isDefaultPrevented()) {
  108494. editor.fire('SetContent', eventArgs);
  108495. return;
  108496. } else {
  108497. updatedArgs = eventArgs;
  108498. }
  108499. }
  108500. updatedArgs.content = cleanContent(editor, updatedArgs);
  108501. var rng = editor.selection.getRng();
  108502. rngSetContent(rng, rng.createContextualFragment(updatedArgs.content));
  108503. editor.selection.setRng(rng);
  108504. scrollRangeIntoView(editor, rng);
  108505. if (!updatedArgs.no_events) {
  108506. editor.fire('SetContent', updatedArgs);
  108507. }
  108508. };
  108509. var deleteFromCallbackMap = function (callbackMap, selector, callback) {
  108510. if (callbackMap && has$2(callbackMap, selector)) {
  108511. var newCallbacks = filter$4(callbackMap[selector], function (cb) {
  108512. return cb !== callback;
  108513. });
  108514. if (newCallbacks.length === 0) {
  108515. delete callbackMap[selector];
  108516. } else {
  108517. callbackMap[selector] = newCallbacks;
  108518. }
  108519. }
  108520. };
  108521. function SelectorChanged (dom, editor) {
  108522. var selectorChangedData;
  108523. var currentSelectors;
  108524. var findMatchingNode = function (selector, nodes) {
  108525. return find$3(nodes, function (node) {
  108526. return dom.is(node, selector);
  108527. });
  108528. };
  108529. var getParents = function (elem) {
  108530. return dom.getParents(elem, null, dom.getRoot());
  108531. };
  108532. return {
  108533. selectorChangedWithUnbind: function (selector, callback) {
  108534. if (!selectorChangedData) {
  108535. selectorChangedData = {};
  108536. currentSelectors = {};
  108537. editor.on('NodeChange', function (e) {
  108538. var node = e.element;
  108539. var parents = getParents(node);
  108540. var matchedSelectors = {};
  108541. Tools.each(selectorChangedData, function (callbacks, selector) {
  108542. findMatchingNode(selector, parents).each(function (node) {
  108543. if (!currentSelectors[selector]) {
  108544. each$k(callbacks, function (callback) {
  108545. callback(true, {
  108546. node: node,
  108547. selector: selector,
  108548. parents: parents
  108549. });
  108550. });
  108551. currentSelectors[selector] = callbacks;
  108552. }
  108553. matchedSelectors[selector] = callbacks;
  108554. });
  108555. });
  108556. Tools.each(currentSelectors, function (callbacks, selector) {
  108557. if (!matchedSelectors[selector]) {
  108558. delete currentSelectors[selector];
  108559. Tools.each(callbacks, function (callback) {
  108560. callback(false, {
  108561. node: node,
  108562. selector: selector,
  108563. parents: parents
  108564. });
  108565. });
  108566. }
  108567. });
  108568. });
  108569. }
  108570. if (!selectorChangedData[selector]) {
  108571. selectorChangedData[selector] = [];
  108572. }
  108573. selectorChangedData[selector].push(callback);
  108574. findMatchingNode(selector, getParents(editor.selection.getStart())).each(function () {
  108575. currentSelectors[selector] = selectorChangedData[selector];
  108576. });
  108577. return {
  108578. unbind: function () {
  108579. deleteFromCallbackMap(selectorChangedData, selector, callback);
  108580. deleteFromCallbackMap(currentSelectors, selector, callback);
  108581. }
  108582. };
  108583. }
  108584. };
  108585. }
  108586. var isNativeIeSelection = function (rng) {
  108587. return !!rng.select;
  108588. };
  108589. var isAttachedToDom = function (node) {
  108590. return !!(node && node.ownerDocument) && contains$1(SugarElement.fromDom(node.ownerDocument), SugarElement.fromDom(node));
  108591. };
  108592. var isValidRange = function (rng) {
  108593. if (!rng) {
  108594. return false;
  108595. } else if (isNativeIeSelection(rng)) {
  108596. return true;
  108597. } else {
  108598. return isAttachedToDom(rng.startContainer) && isAttachedToDom(rng.endContainer);
  108599. }
  108600. };
  108601. var EditorSelection = function (dom, win, serializer, editor) {
  108602. var selectedRange;
  108603. var explicitRange;
  108604. var selectorChangedWithUnbind = SelectorChanged(dom, editor).selectorChangedWithUnbind;
  108605. var setCursorLocation = function (node, offset) {
  108606. var rng = dom.createRng();
  108607. if (isNonNullable(node) && isNonNullable(offset)) {
  108608. rng.setStart(node, offset);
  108609. rng.setEnd(node, offset);
  108610. setRng(rng);
  108611. collapse(false);
  108612. } else {
  108613. moveEndPoint(dom, rng, editor.getBody(), true);
  108614. setRng(rng);
  108615. }
  108616. };
  108617. var getContent = function (args) {
  108618. return getContent$1(editor, args);
  108619. };
  108620. var setContent = function (content, args) {
  108621. return setContent$1(editor, content, args);
  108622. };
  108623. var getStart$1 = function (real) {
  108624. return getStart(editor.getBody(), getRng$1(), real);
  108625. };
  108626. var getEnd$1 = function (real) {
  108627. return getEnd(editor.getBody(), getRng$1(), real);
  108628. };
  108629. var getBookmark = function (type, normalized) {
  108630. return bookmarkManager.getBookmark(type, normalized);
  108631. };
  108632. var moveToBookmark = function (bookmark) {
  108633. return bookmarkManager.moveToBookmark(bookmark);
  108634. };
  108635. var select$1 = function (node, content) {
  108636. select(dom, node, content).each(setRng);
  108637. return node;
  108638. };
  108639. var isCollapsed = function () {
  108640. var rng = getRng$1(), sel = getSel();
  108641. if (!rng || rng.item) {
  108642. return false;
  108643. }
  108644. if (rng.compareEndPoints) {
  108645. return rng.compareEndPoints('StartToEnd', rng) === 0;
  108646. }
  108647. return !sel || rng.collapsed;
  108648. };
  108649. var collapse = function (toStart) {
  108650. var rng = getRng$1();
  108651. rng.collapse(!!toStart);
  108652. setRng(rng);
  108653. };
  108654. var getSel = function () {
  108655. return win.getSelection ? win.getSelection() : win.document.selection;
  108656. };
  108657. var getRng$1 = function () {
  108658. var selection, rng, elm;
  108659. var tryCompareBoundaryPoints = function (how, sourceRange, destinationRange) {
  108660. try {
  108661. return sourceRange.compareBoundaryPoints(how, destinationRange);
  108662. } catch (ex) {
  108663. return -1;
  108664. }
  108665. };
  108666. var doc = win.document;
  108667. if (editor.bookmark !== undefined && hasFocus(editor) === false) {
  108668. var bookmark = getRng(editor);
  108669. if (bookmark.isSome()) {
  108670. return bookmark.map(function (r) {
  108671. return processRanges(editor, [r])[0];
  108672. }).getOr(doc.createRange());
  108673. }
  108674. }
  108675. try {
  108676. if ((selection = getSel()) && !isRestrictedNode(selection.anchorNode)) {
  108677. if (selection.rangeCount > 0) {
  108678. rng = selection.getRangeAt(0);
  108679. } else {
  108680. rng = selection.createRange ? selection.createRange() : doc.createRange();
  108681. }
  108682. rng = processRanges(editor, [rng])[0];
  108683. }
  108684. } catch (ex) {
  108685. }
  108686. if (!rng) {
  108687. rng = doc.createRange ? doc.createRange() : doc.body.createTextRange();
  108688. }
  108689. if (rng.setStart && rng.startContainer.nodeType === 9 && rng.collapsed) {
  108690. elm = dom.getRoot();
  108691. rng.setStart(elm, 0);
  108692. rng.setEnd(elm, 0);
  108693. }
  108694. if (selectedRange && explicitRange) {
  108695. if (tryCompareBoundaryPoints(rng.START_TO_START, rng, selectedRange) === 0 && tryCompareBoundaryPoints(rng.END_TO_END, rng, selectedRange) === 0) {
  108696. rng = explicitRange;
  108697. } else {
  108698. selectedRange = null;
  108699. explicitRange = null;
  108700. }
  108701. }
  108702. return rng;
  108703. };
  108704. var setRng = function (rng, forward) {
  108705. var node;
  108706. if (!isValidRange(rng)) {
  108707. return;
  108708. }
  108709. var ieRange = isNativeIeSelection(rng) ? rng : null;
  108710. if (ieRange) {
  108711. explicitRange = null;
  108712. try {
  108713. ieRange.select();
  108714. } catch (ex) {
  108715. }
  108716. return;
  108717. }
  108718. var sel = getSel();
  108719. var evt = editor.fire('SetSelectionRange', {
  108720. range: rng,
  108721. forward: forward
  108722. });
  108723. rng = evt.range;
  108724. if (sel) {
  108725. explicitRange = rng;
  108726. try {
  108727. sel.removeAllRanges();
  108728. sel.addRange(rng);
  108729. } catch (ex) {
  108730. }
  108731. if (forward === false && sel.extend) {
  108732. sel.collapse(rng.endContainer, rng.endOffset);
  108733. sel.extend(rng.startContainer, rng.startOffset);
  108734. }
  108735. selectedRange = sel.rangeCount > 0 ? sel.getRangeAt(0) : null;
  108736. }
  108737. if (!rng.collapsed && rng.startContainer === rng.endContainer && sel.setBaseAndExtent && !Env.ie) {
  108738. if (rng.endOffset - rng.startOffset < 2) {
  108739. if (rng.startContainer.hasChildNodes()) {
  108740. node = rng.startContainer.childNodes[rng.startOffset];
  108741. if (node && node.tagName === 'IMG') {
  108742. sel.setBaseAndExtent(rng.startContainer, rng.startOffset, rng.endContainer, rng.endOffset);
  108743. if (sel.anchorNode !== rng.startContainer || sel.focusNode !== rng.endContainer) {
  108744. sel.setBaseAndExtent(node, 0, node, 1);
  108745. }
  108746. }
  108747. }
  108748. }
  108749. }
  108750. editor.fire('AfterSetSelectionRange', {
  108751. range: rng,
  108752. forward: forward
  108753. });
  108754. };
  108755. var setNode = function (elm) {
  108756. setContent(dom.getOuterHTML(elm));
  108757. return elm;
  108758. };
  108759. var getNode$1 = function () {
  108760. return getNode(editor.getBody(), getRng$1());
  108761. };
  108762. var getSelectedBlocks$1 = function (startElm, endElm) {
  108763. return getSelectedBlocks(dom, getRng$1(), startElm, endElm);
  108764. };
  108765. var isForward = function () {
  108766. var sel = getSel();
  108767. var anchorNode = sel === null || sel === void 0 ? void 0 : sel.anchorNode;
  108768. var focusNode = sel === null || sel === void 0 ? void 0 : sel.focusNode;
  108769. if (!sel || !anchorNode || !focusNode || isRestrictedNode(anchorNode) || isRestrictedNode(focusNode)) {
  108770. return true;
  108771. }
  108772. var anchorRange = dom.createRng();
  108773. anchorRange.setStart(anchorNode, sel.anchorOffset);
  108774. anchorRange.collapse(true);
  108775. var focusRange = dom.createRng();
  108776. focusRange.setStart(focusNode, sel.focusOffset);
  108777. focusRange.collapse(true);
  108778. return anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, focusRange) <= 0;
  108779. };
  108780. var normalize = function () {
  108781. var rng = getRng$1();
  108782. var sel = getSel();
  108783. if (!hasMultipleRanges(sel) && hasAnyRanges(editor)) {
  108784. var normRng = normalize$2(dom, rng);
  108785. normRng.each(function (normRng) {
  108786. setRng(normRng, isForward());
  108787. });
  108788. return normRng.getOr(rng);
  108789. }
  108790. return rng;
  108791. };
  108792. var selectorChanged = function (selector, callback) {
  108793. selectorChangedWithUnbind(selector, callback);
  108794. return exports;
  108795. };
  108796. var getScrollContainer = function () {
  108797. var scrollContainer;
  108798. var node = dom.getRoot();
  108799. while (node && node.nodeName !== 'BODY') {
  108800. if (node.scrollHeight > node.clientHeight) {
  108801. scrollContainer = node;
  108802. break;
  108803. }
  108804. node = node.parentNode;
  108805. }
  108806. return scrollContainer;
  108807. };
  108808. var scrollIntoView = function (elm, alignToTop) {
  108809. if (isNonNullable(elm)) {
  108810. scrollElementIntoView(editor, elm, alignToTop);
  108811. } else {
  108812. scrollRangeIntoView(editor, getRng$1(), alignToTop);
  108813. }
  108814. };
  108815. var placeCaretAt = function (clientX, clientY) {
  108816. return setRng(fromPoint(clientX, clientY, editor.getDoc()));
  108817. };
  108818. var getBoundingClientRect = function () {
  108819. var rng = getRng$1();
  108820. return rng.collapsed ? CaretPosition.fromRangeStart(rng).getClientRects()[0] : rng.getBoundingClientRect();
  108821. };
  108822. var destroy = function () {
  108823. win = selectedRange = explicitRange = null;
  108824. controlSelection.destroy();
  108825. };
  108826. var exports = {
  108827. bookmarkManager: null,
  108828. controlSelection: null,
  108829. dom: dom,
  108830. win: win,
  108831. serializer: serializer,
  108832. editor: editor,
  108833. collapse: collapse,
  108834. setCursorLocation: setCursorLocation,
  108835. getContent: getContent,
  108836. setContent: setContent,
  108837. getBookmark: getBookmark,
  108838. moveToBookmark: moveToBookmark,
  108839. select: select$1,
  108840. isCollapsed: isCollapsed,
  108841. isForward: isForward,
  108842. setNode: setNode,
  108843. getNode: getNode$1,
  108844. getSel: getSel,
  108845. setRng: setRng,
  108846. getRng: getRng$1,
  108847. getStart: getStart$1,
  108848. getEnd: getEnd$1,
  108849. getSelectedBlocks: getSelectedBlocks$1,
  108850. normalize: normalize,
  108851. selectorChanged: selectorChanged,
  108852. selectorChangedWithUnbind: selectorChangedWithUnbind,
  108853. getScrollContainer: getScrollContainer,
  108854. scrollIntoView: scrollIntoView,
  108855. placeCaretAt: placeCaretAt,
  108856. getBoundingClientRect: getBoundingClientRect,
  108857. destroy: destroy
  108858. };
  108859. var bookmarkManager = BookmarkManager(exports);
  108860. var controlSelection = ControlSelection(exports, editor);
  108861. exports.bookmarkManager = bookmarkManager;
  108862. exports.controlSelection = controlSelection;
  108863. return exports;
  108864. };
  108865. var removeAttrs = function (node, names) {
  108866. each$k(names, function (name) {
  108867. node.attr(name, null);
  108868. });
  108869. };
  108870. var addFontToSpansFilter = function (domParser, styles, fontSizes) {
  108871. domParser.addNodeFilter('font', function (nodes) {
  108872. each$k(nodes, function (node) {
  108873. var props = styles.parse(node.attr('style'));
  108874. var color = node.attr('color');
  108875. var face = node.attr('face');
  108876. var size = node.attr('size');
  108877. if (color) {
  108878. props.color = color;
  108879. }
  108880. if (face) {
  108881. props['font-family'] = face;
  108882. }
  108883. if (size) {
  108884. props['font-size'] = fontSizes[parseInt(node.attr('size'), 10) - 1];
  108885. }
  108886. node.name = 'span';
  108887. node.attr('style', styles.serialize(props));
  108888. removeAttrs(node, [
  108889. 'color',
  108890. 'face',
  108891. 'size'
  108892. ]);
  108893. });
  108894. });
  108895. };
  108896. var addStrikeToSpanFilter = function (domParser, styles) {
  108897. domParser.addNodeFilter('strike', function (nodes) {
  108898. each$k(nodes, function (node) {
  108899. var props = styles.parse(node.attr('style'));
  108900. props['text-decoration'] = 'line-through';
  108901. node.name = 'span';
  108902. node.attr('style', styles.serialize(props));
  108903. });
  108904. });
  108905. };
  108906. var addFilters = function (domParser, settings) {
  108907. var styles = Styles();
  108908. if (settings.convert_fonts_to_spans) {
  108909. addFontToSpansFilter(domParser, styles, Tools.explode(settings.font_size_legacy_values));
  108910. }
  108911. addStrikeToSpanFilter(domParser, styles);
  108912. };
  108913. var register$2 = function (domParser, settings) {
  108914. if (settings.inline_styles) {
  108915. addFilters(domParser, settings);
  108916. }
  108917. };
  108918. var blobUriToBlob = function (url) {
  108919. return new promiseObj(function (resolve, reject) {
  108920. var rejectWithError = function () {
  108921. reject('Cannot convert ' + url + ' to Blob. Resource might not exist or is inaccessible.');
  108922. };
  108923. try {
  108924. var xhr_1 = new XMLHttpRequest();
  108925. xhr_1.open('GET', url, true);
  108926. xhr_1.responseType = 'blob';
  108927. xhr_1.onload = function () {
  108928. if (xhr_1.status === 200) {
  108929. resolve(xhr_1.response);
  108930. } else {
  108931. rejectWithError();
  108932. }
  108933. };
  108934. xhr_1.onerror = rejectWithError;
  108935. xhr_1.send();
  108936. } catch (ex) {
  108937. rejectWithError();
  108938. }
  108939. });
  108940. };
  108941. var parseDataUri = function (uri) {
  108942. var type;
  108943. var uriParts = decodeURIComponent(uri).split(',');
  108944. var matches = /data:([^;]+)/.exec(uriParts[0]);
  108945. if (matches) {
  108946. type = matches[1];
  108947. }
  108948. return {
  108949. type: type,
  108950. data: uriParts[1]
  108951. };
  108952. };
  108953. var buildBlob = function (type, data) {
  108954. var str;
  108955. try {
  108956. str = atob(data);
  108957. } catch (e) {
  108958. return Optional.none();
  108959. }
  108960. var arr = new Uint8Array(str.length);
  108961. for (var i = 0; i < arr.length; i++) {
  108962. arr[i] = str.charCodeAt(i);
  108963. }
  108964. return Optional.some(new Blob([arr], { type: type }));
  108965. };
  108966. var dataUriToBlob = function (uri) {
  108967. return new promiseObj(function (resolve) {
  108968. var _a = parseDataUri(uri), type = _a.type, data = _a.data;
  108969. buildBlob(type, data).fold(function () {
  108970. return resolve(new Blob([]));
  108971. }, resolve);
  108972. });
  108973. };
  108974. var uriToBlob = function (url) {
  108975. if (url.indexOf('blob:') === 0) {
  108976. return blobUriToBlob(url);
  108977. }
  108978. if (url.indexOf('data:') === 0) {
  108979. return dataUriToBlob(url);
  108980. }
  108981. return null;
  108982. };
  108983. var blobToDataUri = function (blob) {
  108984. return new promiseObj(function (resolve) {
  108985. var reader = new FileReader();
  108986. reader.onloadend = function () {
  108987. resolve(reader.result);
  108988. };
  108989. reader.readAsDataURL(blob);
  108990. });
  108991. };
  108992. var count$1 = 0;
  108993. var uniqueId = function (prefix) {
  108994. return (prefix || 'blobid') + count$1++;
  108995. };
  108996. var imageToBlobInfo = function (blobCache, img, resolve, reject) {
  108997. var base64, blobInfo;
  108998. if (img.src.indexOf('blob:') === 0) {
  108999. blobInfo = blobCache.getByUri(img.src);
  109000. if (blobInfo) {
  109001. resolve({
  109002. image: img,
  109003. blobInfo: blobInfo
  109004. });
  109005. } else {
  109006. uriToBlob(img.src).then(function (blob) {
  109007. blobToDataUri(blob).then(function (dataUri) {
  109008. base64 = parseDataUri(dataUri).data;
  109009. blobInfo = blobCache.create(uniqueId(), blob, base64);
  109010. blobCache.add(blobInfo);
  109011. resolve({
  109012. image: img,
  109013. blobInfo: blobInfo
  109014. });
  109015. });
  109016. }, function (err) {
  109017. reject(err);
  109018. });
  109019. }
  109020. return;
  109021. }
  109022. var _a = parseDataUri(img.src), data = _a.data, type = _a.type;
  109023. base64 = data;
  109024. blobInfo = blobCache.getByData(base64, type);
  109025. if (blobInfo) {
  109026. resolve({
  109027. image: img,
  109028. blobInfo: blobInfo
  109029. });
  109030. } else {
  109031. uriToBlob(img.src).then(function (blob) {
  109032. blobInfo = blobCache.create(uniqueId(), blob, base64);
  109033. blobCache.add(blobInfo);
  109034. resolve({
  109035. image: img,
  109036. blobInfo: blobInfo
  109037. });
  109038. }, function (err) {
  109039. reject(err);
  109040. });
  109041. }
  109042. };
  109043. var getAllImages = function (elm) {
  109044. return elm ? from(elm.getElementsByTagName('img')) : [];
  109045. };
  109046. var ImageScanner = function (uploadStatus, blobCache) {
  109047. var cachedPromises = {};
  109048. var findAll = function (elm, predicate) {
  109049. if (!predicate) {
  109050. predicate = always;
  109051. }
  109052. var images = filter$4(getAllImages(elm), function (img) {
  109053. var src = img.src;
  109054. if (!Env.fileApi) {
  109055. return false;
  109056. }
  109057. if (img.hasAttribute('data-mce-bogus')) {
  109058. return false;
  109059. }
  109060. if (img.hasAttribute('data-mce-placeholder')) {
  109061. return false;
  109062. }
  109063. if (!src || src === Env.transparentSrc) {
  109064. return false;
  109065. }
  109066. if (src.indexOf('blob:') === 0) {
  109067. return !uploadStatus.isUploaded(src) && predicate(img);
  109068. }
  109069. if (src.indexOf('data:') === 0) {
  109070. return predicate(img);
  109071. }
  109072. return false;
  109073. });
  109074. var promises = map$3(images, function (img) {
  109075. if (cachedPromises[img.src] !== undefined) {
  109076. return new promiseObj(function (resolve) {
  109077. cachedPromises[img.src].then(function (imageInfo) {
  109078. if (typeof imageInfo === 'string') {
  109079. return imageInfo;
  109080. }
  109081. resolve({
  109082. image: img,
  109083. blobInfo: imageInfo.blobInfo
  109084. });
  109085. });
  109086. });
  109087. }
  109088. var newPromise = new promiseObj(function (resolve, reject) {
  109089. imageToBlobInfo(blobCache, img, resolve, reject);
  109090. }).then(function (result) {
  109091. delete cachedPromises[result.image.src];
  109092. return result;
  109093. }).catch(function (error) {
  109094. delete cachedPromises[img.src];
  109095. return error;
  109096. });
  109097. cachedPromises[img.src] = newPromise;
  109098. return newPromise;
  109099. });
  109100. return promiseObj.all(promises);
  109101. };
  109102. return { findAll: findAll };
  109103. };
  109104. var paddEmptyNode = function (settings, args, blockElements, node) {
  109105. var brPreferred = settings.padd_empty_with_br || args.insert;
  109106. if (brPreferred && blockElements[node.name]) {
  109107. node.empty().append(new AstNode('br', 1)).shortEnded = true;
  109108. } else {
  109109. node.empty().append(new AstNode('#text', 3)).value = nbsp;
  109110. }
  109111. };
  109112. var isPaddedWithNbsp = function (node) {
  109113. return hasOnlyChild(node, '#text') && node.firstChild.value === nbsp;
  109114. };
  109115. var hasOnlyChild = function (node, name) {
  109116. return node && node.firstChild && node.firstChild === node.lastChild && node.firstChild.name === name;
  109117. };
  109118. var isPadded = function (schema, node) {
  109119. var rule = schema.getElementRule(node.name);
  109120. return rule && rule.paddEmpty;
  109121. };
  109122. var isEmpty = function (schema, nonEmptyElements, whitespaceElements, node) {
  109123. return node.isEmpty(nonEmptyElements, whitespaceElements, function (node) {
  109124. return isPadded(schema, node);
  109125. });
  109126. };
  109127. var isLineBreakNode = function (node, blockElements) {
  109128. return node && (has$2(blockElements, node.name) || node.name === 'br');
  109129. };
  109130. var isBogusImage = function (img) {
  109131. return isNonNullable(img.attr('data-mce-bogus'));
  109132. };
  109133. var isInternalImageSource = function (img) {
  109134. return img.attr('src') === Env.transparentSrc || isNonNullable(img.attr('data-mce-placeholder'));
  109135. };
  109136. var isValidDataImg = function (img, settings) {
  109137. if (settings.images_dataimg_filter) {
  109138. var imgElem_1 = new Image();
  109139. imgElem_1.src = img.attr('src');
  109140. each$j(img.attributes.map, function (value, key) {
  109141. imgElem_1.setAttribute(key, value);
  109142. });
  109143. return settings.images_dataimg_filter(imgElem_1);
  109144. } else {
  109145. return true;
  109146. }
  109147. };
  109148. var registerBase64ImageFilter = function (parser, settings) {
  109149. var blobCache = settings.blob_cache;
  109150. var processImage = function (img) {
  109151. var inputSrc = img.attr('src');
  109152. if (isInternalImageSource(img) || isBogusImage(img)) {
  109153. return;
  109154. }
  109155. parseDataUri$1(inputSrc).filter(function () {
  109156. return isValidDataImg(img, settings);
  109157. }).bind(function (_a) {
  109158. var type = _a.type, data = _a.data;
  109159. return Optional.from(blobCache.getByData(data, type)).orThunk(function () {
  109160. return buildBlob(type, data).map(function (blob) {
  109161. var blobInfo = blobCache.create(uniqueId(), blob, data);
  109162. blobCache.add(blobInfo);
  109163. return blobInfo;
  109164. });
  109165. });
  109166. }).each(function (blobInfo) {
  109167. img.attr('src', blobInfo.blobUri());
  109168. });
  109169. };
  109170. if (blobCache) {
  109171. parser.addAttributeFilter('src', function (nodes) {
  109172. return each$k(nodes, processImage);
  109173. });
  109174. }
  109175. };
  109176. var register$1 = function (parser, settings) {
  109177. var schema = parser.schema;
  109178. if (settings.remove_trailing_brs) {
  109179. parser.addNodeFilter('br', function (nodes, _, args) {
  109180. var i;
  109181. var l = nodes.length;
  109182. var node;
  109183. var blockElements = Tools.extend({}, schema.getBlockElements());
  109184. var nonEmptyElements = schema.getNonEmptyElements();
  109185. var parent, lastParent, prev, prevName;
  109186. var whiteSpaceElements = schema.getWhiteSpaceElements();
  109187. var elementRule, textNode;
  109188. blockElements.body = 1;
  109189. for (i = 0; i < l; i++) {
  109190. node = nodes[i];
  109191. parent = node.parent;
  109192. if (blockElements[node.parent.name] && node === parent.lastChild) {
  109193. prev = node.prev;
  109194. while (prev) {
  109195. prevName = prev.name;
  109196. if (prevName !== 'span' || prev.attr('data-mce-type') !== 'bookmark') {
  109197. if (prevName === 'br') {
  109198. node = null;
  109199. }
  109200. break;
  109201. }
  109202. prev = prev.prev;
  109203. }
  109204. if (node) {
  109205. node.remove();
  109206. if (isEmpty(schema, nonEmptyElements, whiteSpaceElements, parent)) {
  109207. elementRule = schema.getElementRule(parent.name);
  109208. if (elementRule) {
  109209. if (elementRule.removeEmpty) {
  109210. parent.remove();
  109211. } else if (elementRule.paddEmpty) {
  109212. paddEmptyNode(settings, args, blockElements, parent);
  109213. }
  109214. }
  109215. }
  109216. }
  109217. } else {
  109218. lastParent = node;
  109219. while (parent && parent.firstChild === lastParent && parent.lastChild === lastParent) {
  109220. lastParent = parent;
  109221. if (blockElements[parent.name]) {
  109222. break;
  109223. }
  109224. parent = parent.parent;
  109225. }
  109226. if (lastParent === parent && settings.padd_empty_with_br !== true) {
  109227. textNode = new AstNode('#text', 3);
  109228. textNode.value = nbsp;
  109229. node.replace(textNode);
  109230. }
  109231. }
  109232. }
  109233. });
  109234. }
  109235. parser.addAttributeFilter('href', function (nodes) {
  109236. var i = nodes.length;
  109237. var appendRel = function (rel) {
  109238. var parts = rel.split(' ').filter(function (p) {
  109239. return p.length > 0;
  109240. });
  109241. return parts.concat(['noopener']).sort().join(' ');
  109242. };
  109243. var addNoOpener = function (rel) {
  109244. var newRel = rel ? Tools.trim(rel) : '';
  109245. if (!/\b(noopener)\b/g.test(newRel)) {
  109246. return appendRel(newRel);
  109247. } else {
  109248. return newRel;
  109249. }
  109250. };
  109251. if (!settings.allow_unsafe_link_target) {
  109252. while (i--) {
  109253. var node = nodes[i];
  109254. if (node.name === 'a' && node.attr('target') === '_blank') {
  109255. node.attr('rel', addNoOpener(node.attr('rel')));
  109256. }
  109257. }
  109258. }
  109259. });
  109260. if (!settings.allow_html_in_named_anchor) {
  109261. parser.addAttributeFilter('id,name', function (nodes) {
  109262. var i = nodes.length, sibling, prevSibling, parent, node;
  109263. while (i--) {
  109264. node = nodes[i];
  109265. if (node.name === 'a' && node.firstChild && !node.attr('href')) {
  109266. parent = node.parent;
  109267. sibling = node.lastChild;
  109268. do {
  109269. prevSibling = sibling.prev;
  109270. parent.insert(sibling, node);
  109271. sibling = prevSibling;
  109272. } while (sibling);
  109273. }
  109274. }
  109275. });
  109276. }
  109277. if (settings.fix_list_elements) {
  109278. parser.addNodeFilter('ul,ol', function (nodes) {
  109279. var i = nodes.length, node, parentNode;
  109280. while (i--) {
  109281. node = nodes[i];
  109282. parentNode = node.parent;
  109283. if (parentNode.name === 'ul' || parentNode.name === 'ol') {
  109284. if (node.prev && node.prev.name === 'li') {
  109285. node.prev.append(node);
  109286. } else {
  109287. var li = new AstNode('li', 1);
  109288. li.attr('style', 'list-style-type: none');
  109289. node.wrap(li);
  109290. }
  109291. }
  109292. }
  109293. });
  109294. }
  109295. if (settings.validate && schema.getValidClasses()) {
  109296. parser.addAttributeFilter('class', function (nodes) {
  109297. var validClasses = schema.getValidClasses();
  109298. var i = nodes.length;
  109299. while (i--) {
  109300. var node = nodes[i];
  109301. var classList = node.attr('class').split(' ');
  109302. var classValue = '';
  109303. for (var ci = 0; ci < classList.length; ci++) {
  109304. var className = classList[ci];
  109305. var valid = false;
  109306. var validClassesMap = validClasses['*'];
  109307. if (validClassesMap && validClassesMap[className]) {
  109308. valid = true;
  109309. }
  109310. validClassesMap = validClasses[node.name];
  109311. if (!valid && validClassesMap && validClassesMap[className]) {
  109312. valid = true;
  109313. }
  109314. if (valid) {
  109315. if (classValue) {
  109316. classValue += ' ';
  109317. }
  109318. classValue += className;
  109319. }
  109320. }
  109321. if (!classValue.length) {
  109322. classValue = null;
  109323. }
  109324. node.attr('class', classValue);
  109325. }
  109326. });
  109327. }
  109328. registerBase64ImageFilter(parser, settings);
  109329. };
  109330. var makeMap = Tools.makeMap, each$6 = Tools.each, explode$2 = Tools.explode, extend$4 = Tools.extend;
  109331. var DomParser = function (settings, schema) {
  109332. if (schema === void 0) {
  109333. schema = Schema();
  109334. }
  109335. var nodeFilters = {};
  109336. var attributeFilters = [];
  109337. var matchedNodes = {};
  109338. var matchedAttributes = {};
  109339. settings = settings || {};
  109340. settings.validate = 'validate' in settings ? settings.validate : true;
  109341. settings.root_name = settings.root_name || 'body';
  109342. var fixInvalidChildren = function (nodes) {
  109343. var nonSplitableElements = makeMap('tr,td,th,tbody,thead,tfoot,table');
  109344. var nonEmptyElements = schema.getNonEmptyElements();
  109345. var whitespaceElements = schema.getWhiteSpaceElements();
  109346. var textBlockElements = schema.getTextBlockElements();
  109347. var specialElements = schema.getSpecialElements();
  109348. var removeOrUnwrapInvalidNode = function (node, originalNodeParent) {
  109349. if (originalNodeParent === void 0) {
  109350. originalNodeParent = node.parent;
  109351. }
  109352. if (specialElements[node.name]) {
  109353. node.empty().remove();
  109354. } else {
  109355. var children = node.children();
  109356. for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
  109357. var childNode = children_1[_i];
  109358. if (!schema.isValidChild(originalNodeParent.name, childNode.name)) {
  109359. removeOrUnwrapInvalidNode(childNode, originalNodeParent);
  109360. }
  109361. }
  109362. node.unwrap();
  109363. }
  109364. };
  109365. for (var ni = 0; ni < nodes.length; ni++) {
  109366. var node = nodes[ni];
  109367. var parent_1 = void 0, newParent = void 0, tempNode = void 0;
  109368. if (!node.parent || node.fixed) {
  109369. continue;
  109370. }
  109371. if (textBlockElements[node.name] && node.parent.name === 'li') {
  109372. var sibling = node.next;
  109373. while (sibling) {
  109374. if (textBlockElements[sibling.name]) {
  109375. sibling.name = 'li';
  109376. sibling.fixed = true;
  109377. node.parent.insert(sibling, node.parent);
  109378. } else {
  109379. break;
  109380. }
  109381. sibling = sibling.next;
  109382. }
  109383. node.unwrap();
  109384. continue;
  109385. }
  109386. var parents = [node];
  109387. for (parent_1 = node.parent; parent_1 && !schema.isValidChild(parent_1.name, node.name) && !nonSplitableElements[parent_1.name]; parent_1 = parent_1.parent) {
  109388. parents.push(parent_1);
  109389. }
  109390. if (parent_1 && parents.length > 1) {
  109391. if (schema.isValidChild(parent_1.name, node.name)) {
  109392. parents.reverse();
  109393. newParent = filterNode(parents[0].clone());
  109394. var currentNode = newParent;
  109395. for (var i = 0; i < parents.length - 1; i++) {
  109396. if (schema.isValidChild(currentNode.name, parents[i].name)) {
  109397. tempNode = filterNode(parents[i].clone());
  109398. currentNode.append(tempNode);
  109399. } else {
  109400. tempNode = currentNode;
  109401. }
  109402. for (var childNode = parents[i].firstChild; childNode && childNode !== parents[i + 1];) {
  109403. var nextNode = childNode.next;
  109404. tempNode.append(childNode);
  109405. childNode = nextNode;
  109406. }
  109407. currentNode = tempNode;
  109408. }
  109409. if (!isEmpty(schema, nonEmptyElements, whitespaceElements, newParent)) {
  109410. parent_1.insert(newParent, parents[0], true);
  109411. parent_1.insert(node, newParent);
  109412. } else {
  109413. parent_1.insert(node, parents[0], true);
  109414. }
  109415. parent_1 = parents[0];
  109416. if (isEmpty(schema, nonEmptyElements, whitespaceElements, parent_1) || hasOnlyChild(parent_1, 'br')) {
  109417. parent_1.empty().remove();
  109418. }
  109419. } else {
  109420. removeOrUnwrapInvalidNode(node);
  109421. }
  109422. } else if (node.parent) {
  109423. if (node.name === 'li') {
  109424. var sibling = node.prev;
  109425. if (sibling && (sibling.name === 'ul' || sibling.name === 'ol')) {
  109426. sibling.append(node);
  109427. continue;
  109428. }
  109429. sibling = node.next;
  109430. if (sibling && (sibling.name === 'ul' || sibling.name === 'ol')) {
  109431. sibling.insert(node, sibling.firstChild, true);
  109432. continue;
  109433. }
  109434. node.wrap(filterNode(new AstNode('ul', 1)));
  109435. continue;
  109436. }
  109437. if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) {
  109438. node.wrap(filterNode(new AstNode('div', 1)));
  109439. } else {
  109440. removeOrUnwrapInvalidNode(node);
  109441. }
  109442. }
  109443. }
  109444. };
  109445. var filterNode = function (node) {
  109446. var name = node.name;
  109447. if (name in nodeFilters) {
  109448. var list = matchedNodes[name];
  109449. if (list) {
  109450. list.push(node);
  109451. } else {
  109452. matchedNodes[name] = [node];
  109453. }
  109454. }
  109455. var i = attributeFilters.length;
  109456. while (i--) {
  109457. var attrName = attributeFilters[i].name;
  109458. if (attrName in node.attributes.map) {
  109459. var list = matchedAttributes[attrName];
  109460. if (list) {
  109461. list.push(node);
  109462. } else {
  109463. matchedAttributes[attrName] = [node];
  109464. }
  109465. }
  109466. }
  109467. return node;
  109468. };
  109469. var addNodeFilter = function (name, callback) {
  109470. each$6(explode$2(name), function (name) {
  109471. var list = nodeFilters[name];
  109472. if (!list) {
  109473. nodeFilters[name] = list = [];
  109474. }
  109475. list.push(callback);
  109476. });
  109477. };
  109478. var getNodeFilters = function () {
  109479. var out = [];
  109480. for (var name_1 in nodeFilters) {
  109481. if (has$2(nodeFilters, name_1)) {
  109482. out.push({
  109483. name: name_1,
  109484. callbacks: nodeFilters[name_1]
  109485. });
  109486. }
  109487. }
  109488. return out;
  109489. };
  109490. var addAttributeFilter = function (name, callback) {
  109491. each$6(explode$2(name), function (name) {
  109492. var i;
  109493. for (i = 0; i < attributeFilters.length; i++) {
  109494. if (attributeFilters[i].name === name) {
  109495. attributeFilters[i].callbacks.push(callback);
  109496. return;
  109497. }
  109498. }
  109499. attributeFilters.push({
  109500. name: name,
  109501. callbacks: [callback]
  109502. });
  109503. });
  109504. };
  109505. var getAttributeFilters = function () {
  109506. return [].concat(attributeFilters);
  109507. };
  109508. var parse = function (html, args) {
  109509. var nodes, i, l, fi, fl, list, name;
  109510. var invalidChildren = [];
  109511. var node;
  109512. var getRootBlockName = function (name) {
  109513. if (name === false) {
  109514. return '';
  109515. } else if (name === true) {
  109516. return 'p';
  109517. } else {
  109518. return name;
  109519. }
  109520. };
  109521. args = args || {};
  109522. matchedNodes = {};
  109523. matchedAttributes = {};
  109524. var blockElements = extend$4(makeMap('script,style,head,html,body,title,meta,param'), schema.getBlockElements());
  109525. var textRootBlockElements = getTextRootBlockElements(schema);
  109526. var nonEmptyElements = schema.getNonEmptyElements();
  109527. var children = schema.children;
  109528. var validate = settings.validate;
  109529. var forcedRootBlockName = 'forced_root_block' in args ? args.forced_root_block : settings.forced_root_block;
  109530. var rootBlockName = getRootBlockName(forcedRootBlockName);
  109531. var whiteSpaceElements = schema.getWhiteSpaceElements();
  109532. var startWhiteSpaceRegExp = /^[ \t\r\n]+/;
  109533. var endWhiteSpaceRegExp = /[ \t\r\n]+$/;
  109534. var allWhiteSpaceRegExp = /[ \t\r\n]+/g;
  109535. var isAllWhiteSpaceRegExp = /^[ \t\r\n]+$/;
  109536. var isInWhiteSpacePreservedElement = has$2(whiteSpaceElements, args.context) || has$2(whiteSpaceElements, settings.root_name);
  109537. var addRootBlocks = function () {
  109538. var node = rootNode.firstChild, rootBlockNode = null;
  109539. var trim = function (rootBlock) {
  109540. if (rootBlock) {
  109541. node = rootBlock.firstChild;
  109542. if (node && node.type === 3) {
  109543. node.value = node.value.replace(startWhiteSpaceRegExp, '');
  109544. }
  109545. node = rootBlock.lastChild;
  109546. if (node && node.type === 3) {
  109547. node.value = node.value.replace(endWhiteSpaceRegExp, '');
  109548. }
  109549. }
  109550. };
  109551. if (!schema.isValidChild(rootNode.name, rootBlockName.toLowerCase())) {
  109552. return;
  109553. }
  109554. while (node) {
  109555. var next = node.next;
  109556. if (node.type === 3 || node.type === 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type')) {
  109557. if (!rootBlockNode) {
  109558. rootBlockNode = createNode(rootBlockName, 1);
  109559. rootBlockNode.attr(settings.forced_root_block_attrs);
  109560. rootNode.insert(rootBlockNode, node);
  109561. rootBlockNode.append(node);
  109562. } else {
  109563. rootBlockNode.append(node);
  109564. }
  109565. } else {
  109566. trim(rootBlockNode);
  109567. rootBlockNode = null;
  109568. }
  109569. node = next;
  109570. }
  109571. trim(rootBlockNode);
  109572. };
  109573. var createNode = function (name, type) {
  109574. var node = new AstNode(name, type);
  109575. var list;
  109576. if (name in nodeFilters) {
  109577. list = matchedNodes[name];
  109578. if (list) {
  109579. list.push(node);
  109580. } else {
  109581. matchedNodes[name] = [node];
  109582. }
  109583. }
  109584. return node;
  109585. };
  109586. var removeWhitespaceBefore = function (node) {
  109587. var blockElements = schema.getBlockElements();
  109588. for (var textNode = node.prev; textNode && textNode.type === 3;) {
  109589. var textVal = textNode.value.replace(endWhiteSpaceRegExp, '');
  109590. if (textVal.length > 0) {
  109591. textNode.value = textVal;
  109592. return;
  109593. }
  109594. var textNodeNext = textNode.next;
  109595. if (textNodeNext) {
  109596. if (textNodeNext.type === 3 && textNodeNext.value.length) {
  109597. textNode = textNode.prev;
  109598. continue;
  109599. }
  109600. if (!blockElements[textNodeNext.name] && textNodeNext.name !== 'script' && textNodeNext.name !== 'style') {
  109601. textNode = textNode.prev;
  109602. continue;
  109603. }
  109604. }
  109605. var sibling = textNode.prev;
  109606. textNode.remove();
  109607. textNode = sibling;
  109608. }
  109609. };
  109610. var cloneAndExcludeBlocks = function (input) {
  109611. var output = {};
  109612. for (var name_2 in input) {
  109613. if (name_2 !== 'li' && name_2 !== 'p') {
  109614. output[name_2] = input[name_2];
  109615. }
  109616. }
  109617. return output;
  109618. };
  109619. var isTextRootBlockEmpty = function (node) {
  109620. var tempNode = node;
  109621. while (isNonNullable(tempNode)) {
  109622. if (tempNode.name in textRootBlockElements) {
  109623. return isEmpty(schema, nonEmptyElements, whiteSpaceElements, tempNode);
  109624. } else {
  109625. tempNode = tempNode.parent;
  109626. }
  109627. }
  109628. return false;
  109629. };
  109630. var parser = SaxParser({
  109631. validate: validate,
  109632. document: settings.document,
  109633. allow_html_data_urls: settings.allow_html_data_urls,
  109634. allow_svg_data_urls: settings.allow_svg_data_urls,
  109635. allow_script_urls: settings.allow_script_urls,
  109636. allow_conditional_comments: settings.allow_conditional_comments,
  109637. preserve_cdata: settings.preserve_cdata,
  109638. self_closing_elements: cloneAndExcludeBlocks(schema.getSelfClosingElements()),
  109639. cdata: function (text) {
  109640. node.append(createNode('#cdata', 4)).value = text;
  109641. },
  109642. text: function (text, raw) {
  109643. var textNode;
  109644. if (!isInWhiteSpacePreservedElement) {
  109645. text = text.replace(allWhiteSpaceRegExp, ' ');
  109646. if (isLineBreakNode(node.lastChild, blockElements)) {
  109647. text = text.replace(startWhiteSpaceRegExp, '');
  109648. }
  109649. }
  109650. if (text.length !== 0) {
  109651. textNode = createNode('#text', 3);
  109652. textNode.raw = !!raw;
  109653. node.append(textNode).value = text;
  109654. }
  109655. },
  109656. comment: function (text) {
  109657. node.append(createNode('#comment', 8)).value = text;
  109658. },
  109659. pi: function (name, text) {
  109660. node.append(createNode(name, 7)).value = text;
  109661. removeWhitespaceBefore(node);
  109662. },
  109663. doctype: function (text) {
  109664. var newNode = node.append(createNode('#doctype', 10));
  109665. newNode.value = text;
  109666. removeWhitespaceBefore(node);
  109667. },
  109668. start: function (name, attrs, empty) {
  109669. var elementRule = validate ? schema.getElementRule(name) : {};
  109670. if (elementRule) {
  109671. var newNode = createNode(elementRule.outputName || name, 1);
  109672. newNode.attributes = attrs;
  109673. newNode.shortEnded = empty;
  109674. node.append(newNode);
  109675. var parent_2 = children[node.name];
  109676. if (parent_2 && children[newNode.name] && !parent_2[newNode.name]) {
  109677. invalidChildren.push(newNode);
  109678. }
  109679. var attrFiltersLen = attributeFilters.length;
  109680. while (attrFiltersLen--) {
  109681. var attrName = attributeFilters[attrFiltersLen].name;
  109682. if (attrName in attrs.map) {
  109683. list = matchedAttributes[attrName];
  109684. if (list) {
  109685. list.push(newNode);
  109686. } else {
  109687. matchedAttributes[attrName] = [newNode];
  109688. }
  109689. }
  109690. }
  109691. if (blockElements[name]) {
  109692. removeWhitespaceBefore(newNode);
  109693. }
  109694. if (!empty) {
  109695. node = newNode;
  109696. }
  109697. if (!isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
  109698. isInWhiteSpacePreservedElement = true;
  109699. }
  109700. }
  109701. },
  109702. end: function (name) {
  109703. var textNode, text, sibling;
  109704. var elementRule = validate ? schema.getElementRule(name) : {};
  109705. if (elementRule) {
  109706. if (blockElements[name]) {
  109707. if (!isInWhiteSpacePreservedElement) {
  109708. textNode = node.firstChild;
  109709. if (textNode && textNode.type === 3) {
  109710. text = textNode.value.replace(startWhiteSpaceRegExp, '');
  109711. if (text.length > 0) {
  109712. textNode.value = text;
  109713. textNode = textNode.next;
  109714. } else {
  109715. sibling = textNode.next;
  109716. textNode.remove();
  109717. textNode = sibling;
  109718. while (textNode && textNode.type === 3) {
  109719. text = textNode.value;
  109720. sibling = textNode.next;
  109721. if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
  109722. textNode.remove();
  109723. textNode = sibling;
  109724. }
  109725. textNode = sibling;
  109726. }
  109727. }
  109728. }
  109729. textNode = node.lastChild;
  109730. if (textNode && textNode.type === 3) {
  109731. text = textNode.value.replace(endWhiteSpaceRegExp, '');
  109732. if (text.length > 0) {
  109733. textNode.value = text;
  109734. textNode = textNode.prev;
  109735. } else {
  109736. sibling = textNode.prev;
  109737. textNode.remove();
  109738. textNode = sibling;
  109739. while (textNode && textNode.type === 3) {
  109740. text = textNode.value;
  109741. sibling = textNode.prev;
  109742. if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
  109743. textNode.remove();
  109744. textNode = sibling;
  109745. }
  109746. textNode = sibling;
  109747. }
  109748. }
  109749. }
  109750. }
  109751. }
  109752. if (isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
  109753. isInWhiteSpacePreservedElement = false;
  109754. }
  109755. var isNodeEmpty = isEmpty(schema, nonEmptyElements, whiteSpaceElements, node);
  109756. var parentNode = node.parent;
  109757. if (elementRule.paddInEmptyBlock && isNodeEmpty && isTextRootBlockEmpty(node)) {
  109758. paddEmptyNode(settings, args, blockElements, node);
  109759. } else if (elementRule.removeEmpty && isNodeEmpty) {
  109760. if (blockElements[node.name]) {
  109761. node.empty().remove();
  109762. } else {
  109763. node.unwrap();
  109764. }
  109765. } else if (elementRule.paddEmpty && (isPaddedWithNbsp(node) || isNodeEmpty)) {
  109766. paddEmptyNode(settings, args, blockElements, node);
  109767. }
  109768. node = parentNode;
  109769. }
  109770. }
  109771. }, schema);
  109772. var rootNode = node = new AstNode(args.context || settings.root_name, 11);
  109773. parser.parse(html, args.format);
  109774. if (validate && invalidChildren.length) {
  109775. if (!args.context) {
  109776. fixInvalidChildren(invalidChildren);
  109777. } else {
  109778. args.invalid = true;
  109779. }
  109780. }
  109781. if (rootBlockName && (rootNode.name === 'body' || args.isRootContent)) {
  109782. addRootBlocks();
  109783. }
  109784. if (!args.invalid) {
  109785. for (name in matchedNodes) {
  109786. if (!has$2(matchedNodes, name)) {
  109787. continue;
  109788. }
  109789. list = nodeFilters[name];
  109790. nodes = matchedNodes[name];
  109791. fi = nodes.length;
  109792. while (fi--) {
  109793. if (!nodes[fi].parent) {
  109794. nodes.splice(fi, 1);
  109795. }
  109796. }
  109797. for (i = 0, l = list.length; i < l; i++) {
  109798. list[i](nodes, name, args);
  109799. }
  109800. }
  109801. for (i = 0, l = attributeFilters.length; i < l; i++) {
  109802. list = attributeFilters[i];
  109803. if (list.name in matchedAttributes) {
  109804. nodes = matchedAttributes[list.name];
  109805. fi = nodes.length;
  109806. while (fi--) {
  109807. if (!nodes[fi].parent) {
  109808. nodes.splice(fi, 1);
  109809. }
  109810. }
  109811. for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) {
  109812. list.callbacks[fi](nodes, list.name, args);
  109813. }
  109814. }
  109815. }
  109816. }
  109817. return rootNode;
  109818. };
  109819. var exports = {
  109820. schema: schema,
  109821. addAttributeFilter: addAttributeFilter,
  109822. getAttributeFilters: getAttributeFilters,
  109823. addNodeFilter: addNodeFilter,
  109824. getNodeFilters: getNodeFilters,
  109825. filterNode: filterNode,
  109826. parse: parse
  109827. };
  109828. register$1(exports, settings);
  109829. register$2(exports, settings);
  109830. return exports;
  109831. };
  109832. var register = function (htmlParser, settings, dom) {
  109833. htmlParser.addAttributeFilter('data-mce-tabindex', function (nodes, name) {
  109834. var i = nodes.length;
  109835. while (i--) {
  109836. var node = nodes[i];
  109837. node.attr('tabindex', node.attr('data-mce-tabindex'));
  109838. node.attr(name, null);
  109839. }
  109840. });
  109841. htmlParser.addAttributeFilter('src,href,style', function (nodes, name) {
  109842. var internalName = 'data-mce-' + name;
  109843. var urlConverter = settings.url_converter;
  109844. var urlConverterScope = settings.url_converter_scope;
  109845. var i = nodes.length;
  109846. while (i--) {
  109847. var node = nodes[i];
  109848. var value = node.attr(internalName);
  109849. if (value !== undefined) {
  109850. node.attr(name, value.length > 0 ? value : null);
  109851. node.attr(internalName, null);
  109852. } else {
  109853. value = node.attr(name);
  109854. if (name === 'style') {
  109855. value = dom.serializeStyle(dom.parseStyle(value), node.name);
  109856. } else if (urlConverter) {
  109857. value = urlConverter.call(urlConverterScope, value, name, node.name);
  109858. }
  109859. node.attr(name, value.length > 0 ? value : null);
  109860. }
  109861. }
  109862. });
  109863. htmlParser.addAttributeFilter('class', function (nodes) {
  109864. var i = nodes.length;
  109865. while (i--) {
  109866. var node = nodes[i];
  109867. var value = node.attr('class');
  109868. if (value) {
  109869. value = node.attr('class').replace(/(?:^|\s)mce-item-\w+(?!\S)/g, '');
  109870. node.attr('class', value.length > 0 ? value : null);
  109871. }
  109872. }
  109873. });
  109874. htmlParser.addAttributeFilter('data-mce-type', function (nodes, name, args) {
  109875. var i = nodes.length;
  109876. while (i--) {
  109877. var node = nodes[i];
  109878. if (node.attr('data-mce-type') === 'bookmark' && !args.cleanup) {
  109879. var hasChildren = Optional.from(node.firstChild).exists(function (firstChild) {
  109880. return !isZwsp(firstChild.value);
  109881. });
  109882. if (hasChildren) {
  109883. node.unwrap();
  109884. } else {
  109885. node.remove();
  109886. }
  109887. }
  109888. }
  109889. });
  109890. htmlParser.addNodeFilter('noscript', function (nodes) {
  109891. var i = nodes.length;
  109892. while (i--) {
  109893. var node = nodes[i].firstChild;
  109894. if (node) {
  109895. node.value = Entities.decode(node.value);
  109896. }
  109897. }
  109898. });
  109899. htmlParser.addNodeFilter('script,style', function (nodes, name) {
  109900. var trim = function (value) {
  109901. return value.replace(/(<!--\[CDATA\[|\]\]-->)/g, '\n').replace(/^[\r\n]*|[\r\n]*$/g, '').replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi, '').replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, '');
  109902. };
  109903. var i = nodes.length;
  109904. while (i--) {
  109905. var node = nodes[i];
  109906. var value = node.firstChild ? node.firstChild.value : '';
  109907. if (name === 'script') {
  109908. var type = node.attr('type');
  109909. if (type) {
  109910. node.attr('type', type === 'mce-no/type' ? null : type.replace(/^mce\-/, ''));
  109911. }
  109912. if (settings.element_format === 'xhtml' && value.length > 0) {
  109913. node.firstChild.value = '// <![CDATA[\n' + trim(value) + '\n// ]]>';
  109914. }
  109915. } else {
  109916. if (settings.element_format === 'xhtml' && value.length > 0) {
  109917. node.firstChild.value = '<!--\n' + trim(value) + '\n-->';
  109918. }
  109919. }
  109920. }
  109921. });
  109922. htmlParser.addNodeFilter('#comment', function (nodes) {
  109923. var i = nodes.length;
  109924. while (i--) {
  109925. var node = nodes[i];
  109926. if (settings.preserve_cdata && node.value.indexOf('[CDATA[') === 0) {
  109927. node.name = '#cdata';
  109928. node.type = 4;
  109929. node.value = dom.decode(node.value.replace(/^\[CDATA\[|\]\]$/g, ''));
  109930. } else if (node.value.indexOf('mce:protected ') === 0) {
  109931. node.name = '#text';
  109932. node.type = 3;
  109933. node.raw = true;
  109934. node.value = unescape(node.value).substr(14);
  109935. }
  109936. }
  109937. });
  109938. htmlParser.addNodeFilter('xml:namespace,input', function (nodes, name) {
  109939. var i = nodes.length;
  109940. while (i--) {
  109941. var node = nodes[i];
  109942. if (node.type === 7) {
  109943. node.remove();
  109944. } else if (node.type === 1) {
  109945. if (name === 'input' && !node.attr('type')) {
  109946. node.attr('type', 'text');
  109947. }
  109948. }
  109949. }
  109950. });
  109951. htmlParser.addAttributeFilter('data-mce-type', function (nodes) {
  109952. each$k(nodes, function (node) {
  109953. if (node.attr('data-mce-type') === 'format-caret') {
  109954. if (node.isEmpty(htmlParser.schema.getNonEmptyElements())) {
  109955. node.remove();
  109956. } else {
  109957. node.unwrap();
  109958. }
  109959. }
  109960. });
  109961. });
  109962. htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style,' + 'data-mce-selected,data-mce-expando,' + 'data-mce-type,data-mce-resize,data-mce-placeholder', function (nodes, name) {
  109963. var i = nodes.length;
  109964. while (i--) {
  109965. nodes[i].attr(name, null);
  109966. }
  109967. });
  109968. };
  109969. var trimTrailingBr = function (rootNode) {
  109970. var isBr = function (node) {
  109971. return node && node.name === 'br';
  109972. };
  109973. var brNode1 = rootNode.lastChild;
  109974. if (isBr(brNode1)) {
  109975. var brNode2 = brNode1.prev;
  109976. if (isBr(brNode2)) {
  109977. brNode1.remove();
  109978. brNode2.remove();
  109979. }
  109980. }
  109981. };
  109982. var preProcess = function (editor, node, args) {
  109983. var oldDoc;
  109984. var dom = editor.dom;
  109985. var clonedNode = node.cloneNode(true);
  109986. var impl = document.implementation;
  109987. if (impl.createHTMLDocument) {
  109988. var doc_1 = impl.createHTMLDocument('');
  109989. Tools.each(clonedNode.nodeName === 'BODY' ? clonedNode.childNodes : [clonedNode], function (node) {
  109990. doc_1.body.appendChild(doc_1.importNode(node, true));
  109991. });
  109992. if (clonedNode.nodeName !== 'BODY') {
  109993. clonedNode = doc_1.body.firstChild;
  109994. } else {
  109995. clonedNode = doc_1.body;
  109996. }
  109997. oldDoc = dom.doc;
  109998. dom.doc = doc_1;
  109999. }
  110000. firePreProcess(editor, __assign(__assign({}, args), { node: clonedNode }));
  110001. if (oldDoc) {
  110002. dom.doc = oldDoc;
  110003. }
  110004. return clonedNode;
  110005. };
  110006. var shouldFireEvent = function (editor, args) {
  110007. return editor && editor.hasEventListeners('PreProcess') && !args.no_events;
  110008. };
  110009. var process = function (editor, node, args) {
  110010. return shouldFireEvent(editor, args) ? preProcess(editor, node, args) : node;
  110011. };
  110012. var addTempAttr = function (htmlParser, tempAttrs, name) {
  110013. if (Tools.inArray(tempAttrs, name) === -1) {
  110014. htmlParser.addAttributeFilter(name, function (nodes, name) {
  110015. var i = nodes.length;
  110016. while (i--) {
  110017. nodes[i].attr(name, null);
  110018. }
  110019. });
  110020. tempAttrs.push(name);
  110021. }
  110022. };
  110023. var postProcess = function (editor, args, content) {
  110024. if (!args.no_events && editor) {
  110025. var outArgs = firePostProcess(editor, __assign(__assign({}, args), { content: content }));
  110026. return outArgs.content;
  110027. } else {
  110028. return content;
  110029. }
  110030. };
  110031. var getHtmlFromNode = function (dom, node, args) {
  110032. var html = trim$2(args.getInner ? node.innerHTML : dom.getOuterHTML(node));
  110033. return args.selection || isWsPreserveElement(SugarElement.fromDom(node)) ? html : Tools.trim(html);
  110034. };
  110035. var parseHtml = function (htmlParser, html, args) {
  110036. var parserArgs = args.selection ? __assign({ forced_root_block: false }, args) : args;
  110037. var rootNode = htmlParser.parse(html, parserArgs);
  110038. trimTrailingBr(rootNode);
  110039. return rootNode;
  110040. };
  110041. var serializeNode = function (settings, schema, node) {
  110042. var htmlSerializer = HtmlSerializer(settings, schema);
  110043. return htmlSerializer.serialize(node);
  110044. };
  110045. var toHtml = function (editor, settings, schema, rootNode, args) {
  110046. var content = serializeNode(settings, schema, rootNode);
  110047. return postProcess(editor, args, content);
  110048. };
  110049. var DomSerializerImpl = function (settings, editor) {
  110050. var tempAttrs = ['data-mce-selected'];
  110051. var dom = editor && editor.dom ? editor.dom : DOMUtils.DOM;
  110052. var schema = editor && editor.schema ? editor.schema : Schema(settings);
  110053. settings.entity_encoding = settings.entity_encoding || 'named';
  110054. settings.remove_trailing_brs = 'remove_trailing_brs' in settings ? settings.remove_trailing_brs : true;
  110055. var htmlParser = DomParser(settings, schema);
  110056. register(htmlParser, settings, dom);
  110057. var serialize = function (node, parserArgs) {
  110058. if (parserArgs === void 0) {
  110059. parserArgs = {};
  110060. }
  110061. var args = __assign({ format: 'html' }, parserArgs);
  110062. var targetNode = process(editor, node, args);
  110063. var html = getHtmlFromNode(dom, targetNode, args);
  110064. var rootNode = parseHtml(htmlParser, html, args);
  110065. return args.format === 'tree' ? rootNode : toHtml(editor, settings, schema, rootNode, args);
  110066. };
  110067. return {
  110068. schema: schema,
  110069. addNodeFilter: htmlParser.addNodeFilter,
  110070. addAttributeFilter: htmlParser.addAttributeFilter,
  110071. serialize: serialize,
  110072. addRules: schema.addValidElements,
  110073. setRules: schema.setValidElements,
  110074. addTempAttr: curry(addTempAttr, htmlParser, tempAttrs),
  110075. getTempAttrs: constant(tempAttrs),
  110076. getNodeFilters: htmlParser.getNodeFilters,
  110077. getAttributeFilters: htmlParser.getAttributeFilters
  110078. };
  110079. };
  110080. var DomSerializer = function (settings, editor) {
  110081. var domSerializer = DomSerializerImpl(settings, editor);
  110082. return {
  110083. schema: domSerializer.schema,
  110084. addNodeFilter: domSerializer.addNodeFilter,
  110085. addAttributeFilter: domSerializer.addAttributeFilter,
  110086. serialize: domSerializer.serialize,
  110087. addRules: domSerializer.addRules,
  110088. setRules: domSerializer.setRules,
  110089. addTempAttr: domSerializer.addTempAttr,
  110090. getTempAttrs: domSerializer.getTempAttrs,
  110091. getNodeFilters: domSerializer.getNodeFilters,
  110092. getAttributeFilters: domSerializer.getAttributeFilters
  110093. };
  110094. };
  110095. var defaultFormat = 'html';
  110096. var getContent = function (editor, args) {
  110097. if (args === void 0) {
  110098. args = {};
  110099. }
  110100. var format = args.format ? args.format : defaultFormat;
  110101. return getContent$2(editor, args, format);
  110102. };
  110103. var setContent = function (editor, content, args) {
  110104. if (args === void 0) {
  110105. args = {};
  110106. }
  110107. return setContent$2(editor, content, args);
  110108. };
  110109. var DOM$7 = DOMUtils.DOM;
  110110. var restoreOriginalStyles = function (editor) {
  110111. DOM$7.setStyle(editor.id, 'display', editor.orgDisplay);
  110112. };
  110113. var safeDestroy = function (x) {
  110114. return Optional.from(x).each(function (x) {
  110115. return x.destroy();
  110116. });
  110117. };
  110118. var clearDomReferences = function (editor) {
  110119. editor.contentAreaContainer = editor.formElement = editor.container = editor.editorContainer = null;
  110120. editor.bodyElement = editor.contentDocument = editor.contentWindow = null;
  110121. editor.iframeElement = editor.targetElm = null;
  110122. if (editor.selection) {
  110123. editor.selection = editor.selection.win = editor.selection.dom = editor.selection.dom.doc = null;
  110124. }
  110125. };
  110126. var restoreForm = function (editor) {
  110127. var form = editor.formElement;
  110128. if (form) {
  110129. if (form._mceOldSubmit) {
  110130. form.submit = form._mceOldSubmit;
  110131. form._mceOldSubmit = null;
  110132. }
  110133. DOM$7.unbind(form, 'submit reset', editor.formEventDelegate);
  110134. }
  110135. };
  110136. var remove = function (editor) {
  110137. if (!editor.removed) {
  110138. var _selectionOverrides = editor._selectionOverrides, editorUpload = editor.editorUpload;
  110139. var body = editor.getBody();
  110140. var element = editor.getElement();
  110141. if (body) {
  110142. editor.save({ is_removing: true });
  110143. }
  110144. editor.removed = true;
  110145. editor.unbindAllNativeEvents();
  110146. if (editor.hasHiddenInput && element) {
  110147. DOM$7.remove(element.nextSibling);
  110148. }
  110149. fireRemove(editor);
  110150. editor.editorManager.remove(editor);
  110151. if (!editor.inline && body) {
  110152. restoreOriginalStyles(editor);
  110153. }
  110154. fireDetach(editor);
  110155. DOM$7.remove(editor.getContainer());
  110156. safeDestroy(_selectionOverrides);
  110157. safeDestroy(editorUpload);
  110158. editor.destroy();
  110159. }
  110160. };
  110161. var destroy = function (editor, automatic) {
  110162. var selection = editor.selection, dom = editor.dom;
  110163. if (editor.destroyed) {
  110164. return;
  110165. }
  110166. if (!automatic && !editor.removed) {
  110167. editor.remove();
  110168. return;
  110169. }
  110170. if (!automatic) {
  110171. editor.editorManager.off('beforeunload', editor._beforeUnload);
  110172. if (editor.theme && editor.theme.destroy) {
  110173. editor.theme.destroy();
  110174. }
  110175. safeDestroy(selection);
  110176. safeDestroy(dom);
  110177. }
  110178. restoreForm(editor);
  110179. clearDomReferences(editor);
  110180. editor.destroyed = true;
  110181. };
  110182. var deep = function (old, nu) {
  110183. var bothObjects = isObject(old) && isObject(nu);
  110184. return bothObjects ? deepMerge(old, nu) : nu;
  110185. };
  110186. var baseMerge = function (merger) {
  110187. return function () {
  110188. var objects = [];
  110189. for (var _i = 0; _i < arguments.length; _i++) {
  110190. objects[_i] = arguments[_i];
  110191. }
  110192. if (objects.length === 0) {
  110193. throw new Error('Can\'t merge zero objects');
  110194. }
  110195. var ret = {};
  110196. for (var j = 0; j < objects.length; j++) {
  110197. var curObject = objects[j];
  110198. for (var key in curObject) {
  110199. if (has$2(curObject, key)) {
  110200. ret[key] = merger(ret[key], curObject[key]);
  110201. }
  110202. }
  110203. }
  110204. return ret;
  110205. };
  110206. };
  110207. var deepMerge = baseMerge(deep);
  110208. var deprecatedSettings = ('autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,' + 'boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,' + 'force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,' + 'non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,' + 'tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,' + 'paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists').split(',');
  110209. var deprecatedPlugins = 'bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor'.split(',');
  110210. var movedToPremiumPlugins = 'imagetools,toc'.split(',');
  110211. var getDeprecatedSettings = function (settings) {
  110212. var settingNames = filter$4(deprecatedSettings, function (setting) {
  110213. return has$2(settings, setting);
  110214. });
  110215. var forcedRootBlock = settings.forced_root_block;
  110216. if (forcedRootBlock === false || forcedRootBlock === '') {
  110217. settingNames.push('forced_root_block (false only)');
  110218. }
  110219. return sort(settingNames);
  110220. };
  110221. var getDeprecatedPlugins = function (settings) {
  110222. var plugins = Tools.makeMap(settings.plugins, ' ');
  110223. var hasPlugin = function (plugin) {
  110224. return has$2(plugins, plugin);
  110225. };
  110226. var pluginNames = __spreadArray(__spreadArray([], filter$4(deprecatedPlugins, hasPlugin), true), bind(movedToPremiumPlugins, function (plugin) {
  110227. return hasPlugin(plugin) ? [plugin + ' (moving to premium)'] : [];
  110228. }), true);
  110229. return sort(pluginNames);
  110230. };
  110231. var logDeprecationsWarning = function (rawSettings, finalSettings) {
  110232. var deprecatedSettings = getDeprecatedSettings(rawSettings);
  110233. var deprecatedPlugins = getDeprecatedPlugins(finalSettings);
  110234. var hasDeprecatedPlugins = deprecatedPlugins.length > 0;
  110235. var hasDeprecatedSettings = deprecatedSettings.length > 0;
  110236. var isLegacyMobileTheme = finalSettings.theme === 'mobile';
  110237. if (hasDeprecatedPlugins || hasDeprecatedSettings || isLegacyMobileTheme) {
  110238. var listJoiner = '\n- ';
  110239. var themesMessage = isLegacyMobileTheme ? '\n\nThemes:' + listJoiner + 'mobile' : '';
  110240. var pluginsMessage = hasDeprecatedPlugins ? '\n\nPlugins:' + listJoiner + deprecatedPlugins.join(listJoiner) : '';
  110241. var settingsMessage = hasDeprecatedSettings ? '\n\nSettings:' + listJoiner + deprecatedSettings.join(listJoiner) : '';
  110242. console.warn('The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. ' + 'See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information.' + themesMessage + pluginsMessage + settingsMessage);
  110243. }
  110244. };
  110245. var sectionResult = function (sections, settings) {
  110246. return {
  110247. sections: constant(sections),
  110248. settings: constant(settings)
  110249. };
  110250. };
  110251. var deviceDetection = detect().deviceType;
  110252. var isTouch = deviceDetection.isTouch();
  110253. var isPhone = deviceDetection.isPhone();
  110254. var isTablet = deviceDetection.isTablet();
  110255. var legacyMobilePlugins = [
  110256. 'lists',
  110257. 'autolink',
  110258. 'autosave'
  110259. ];
  110260. var defaultTouchSettings = {
  110261. table_grid: false,
  110262. object_resizing: false,
  110263. resize: false
  110264. };
  110265. var normalizePlugins = function (plugins) {
  110266. var pluginNames = isArray$1(plugins) ? plugins.join(' ') : plugins;
  110267. var trimmedPlugins = map$3(isString$1(pluginNames) ? pluginNames.split(' ') : [], trim$4);
  110268. return filter$4(trimmedPlugins, function (item) {
  110269. return item.length > 0;
  110270. });
  110271. };
  110272. var filterLegacyMobilePlugins = function (plugins) {
  110273. return filter$4(plugins, curry(contains$3, legacyMobilePlugins));
  110274. };
  110275. var extractSections = function (keys, settings) {
  110276. var result = bifilter(settings, function (value, key) {
  110277. return contains$3(keys, key);
  110278. });
  110279. return sectionResult(result.t, result.f);
  110280. };
  110281. var getSection = function (sectionResult, name, defaults) {
  110282. if (defaults === void 0) {
  110283. defaults = {};
  110284. }
  110285. var sections = sectionResult.sections();
  110286. var sectionSettings = get$9(sections, name).getOr({});
  110287. return Tools.extend({}, defaults, sectionSettings);
  110288. };
  110289. var hasSection = function (sectionResult, name) {
  110290. return has$2(sectionResult.sections(), name);
  110291. };
  110292. var isSectionTheme = function (sectionResult, name, theme) {
  110293. var section = sectionResult.sections();
  110294. return hasSection(sectionResult, name) && section[name].theme === theme;
  110295. };
  110296. var getSectionConfig = function (sectionResult, name) {
  110297. return hasSection(sectionResult, name) ? sectionResult.sections()[name] : {};
  110298. };
  110299. var getToolbarMode = function (settings, defaultVal) {
  110300. return get$9(settings, 'toolbar_mode').orThunk(function () {
  110301. return get$9(settings, 'toolbar_drawer').map(function (val) {
  110302. return val === false ? 'wrap' : val;
  110303. });
  110304. }).getOr(defaultVal);
  110305. };
  110306. var getDefaultSettings = function (settings, id, documentBaseUrl, isTouch, editor) {
  110307. var baseDefaults = {
  110308. id: id,
  110309. theme: 'silver',
  110310. toolbar_mode: getToolbarMode(settings, 'floating'),
  110311. plugins: '',
  110312. document_base_url: documentBaseUrl,
  110313. add_form_submit_trigger: true,
  110314. submit_patch: true,
  110315. add_unload_trigger: true,
  110316. convert_urls: true,
  110317. relative_urls: true,
  110318. remove_script_host: true,
  110319. object_resizing: true,
  110320. doctype: '<!DOCTYPE html>',
  110321. visual: true,
  110322. font_size_legacy_values: 'xx-small,small,medium,large,x-large,xx-large,300%',
  110323. forced_root_block: 'p',
  110324. hidden_input: true,
  110325. inline_styles: true,
  110326. convert_fonts_to_spans: true,
  110327. indent: true,
  110328. indent_before: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' + 'tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist',
  110329. indent_after: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' + 'tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist',
  110330. entity_encoding: 'named',
  110331. url_converter: editor.convertURL,
  110332. url_converter_scope: editor
  110333. };
  110334. return __assign(__assign({}, baseDefaults), isTouch ? defaultTouchSettings : {});
  110335. };
  110336. var getDefaultMobileSettings = function (mobileSettings, isPhone) {
  110337. var defaultMobileSettings = {
  110338. resize: false,
  110339. toolbar_mode: getToolbarMode(mobileSettings, 'scrolling'),
  110340. toolbar_sticky: false
  110341. };
  110342. var defaultPhoneSettings = { menubar: false };
  110343. return __assign(__assign(__assign({}, defaultTouchSettings), defaultMobileSettings), isPhone ? defaultPhoneSettings : {});
  110344. };
  110345. var getExternalPlugins = function (overrideSettings, settings) {
  110346. var userDefinedExternalPlugins = settings.external_plugins ? settings.external_plugins : {};
  110347. if (overrideSettings && overrideSettings.external_plugins) {
  110348. return Tools.extend({}, overrideSettings.external_plugins, userDefinedExternalPlugins);
  110349. } else {
  110350. return userDefinedExternalPlugins;
  110351. }
  110352. };
  110353. var combinePlugins = function (forcedPlugins, plugins) {
  110354. return [].concat(normalizePlugins(forcedPlugins)).concat(normalizePlugins(plugins));
  110355. };
  110356. var getPlatformPlugins = function (isMobileDevice, sectionResult, desktopPlugins, mobilePlugins) {
  110357. if (isMobileDevice && isSectionTheme(sectionResult, 'mobile', 'mobile')) {
  110358. return filterLegacyMobilePlugins(mobilePlugins);
  110359. } else if (isMobileDevice && hasSection(sectionResult, 'mobile')) {
  110360. return mobilePlugins;
  110361. } else {
  110362. return desktopPlugins;
  110363. }
  110364. };
  110365. var processPlugins = function (isMobileDevice, sectionResult, defaultOverrideSettings, settings) {
  110366. var forcedPlugins = normalizePlugins(defaultOverrideSettings.forced_plugins);
  110367. var desktopPlugins = normalizePlugins(settings.plugins);
  110368. var mobileConfig = getSectionConfig(sectionResult, 'mobile');
  110369. var mobilePlugins = mobileConfig.plugins ? normalizePlugins(mobileConfig.plugins) : desktopPlugins;
  110370. var platformPlugins = getPlatformPlugins(isMobileDevice, sectionResult, desktopPlugins, mobilePlugins);
  110371. var combinedPlugins = combinePlugins(forcedPlugins, platformPlugins);
  110372. if (Env.browser.isIE() && contains$3(combinedPlugins, 'rtc')) {
  110373. throw new Error('RTC plugin is not supported on IE 11.');
  110374. }
  110375. return Tools.extend(settings, { plugins: combinedPlugins.join(' ') });
  110376. };
  110377. var isOnMobile = function (isMobileDevice, sectionResult) {
  110378. return isMobileDevice && hasSection(sectionResult, 'mobile');
  110379. };
  110380. var combineSettings = function (isMobileDevice, isPhone, defaultSettings, defaultOverrideSettings, settings) {
  110381. var defaultDeviceSettings = isMobileDevice ? { mobile: getDefaultMobileSettings(settings.mobile || {}, isPhone) } : {};
  110382. var sectionResult = extractSections(['mobile'], deepMerge(defaultDeviceSettings, settings));
  110383. var extendedSettings = Tools.extend(defaultSettings, defaultOverrideSettings, sectionResult.settings(), isOnMobile(isMobileDevice, sectionResult) ? getSection(sectionResult, 'mobile') : {}, {
  110384. validate: true,
  110385. external_plugins: getExternalPlugins(defaultOverrideSettings, sectionResult.settings())
  110386. });
  110387. return processPlugins(isMobileDevice, sectionResult, defaultOverrideSettings, extendedSettings);
  110388. };
  110389. var getEditorSettings = function (editor, id, documentBaseUrl, defaultOverrideSettings, settings) {
  110390. var defaultSettings = getDefaultSettings(settings, id, documentBaseUrl, isTouch, editor);
  110391. var finalSettings = combineSettings(isPhone || isTablet, isPhone, defaultSettings, defaultOverrideSettings, settings);
  110392. if (finalSettings.deprecation_warnings !== false) {
  110393. logDeprecationsWarning(settings, finalSettings);
  110394. }
  110395. return finalSettings;
  110396. };
  110397. var getFiltered = function (predicate, editor, name) {
  110398. return Optional.from(editor.settings[name]).filter(predicate);
  110399. };
  110400. var getParamObject = function (value) {
  110401. var output = {};
  110402. if (typeof value === 'string') {
  110403. each$k(value.indexOf('=') > 0 ? value.split(/[;,](?![^=;,]*(?:[;,]|$))/) : value.split(','), function (val) {
  110404. var arr = val.split('=');
  110405. if (arr.length > 1) {
  110406. output[Tools.trim(arr[0])] = Tools.trim(arr[1]);
  110407. } else {
  110408. output[Tools.trim(arr[0])] = Tools.trim(arr[0]);
  110409. }
  110410. });
  110411. } else {
  110412. output = value;
  110413. }
  110414. return output;
  110415. };
  110416. var isArrayOf = function (p) {
  110417. return function (a) {
  110418. return isArray$1(a) && forall(a, p);
  110419. };
  110420. };
  110421. var getParam = function (editor, name, defaultVal, type) {
  110422. var value = name in editor.settings ? editor.settings[name] : defaultVal;
  110423. if (type === 'hash') {
  110424. return getParamObject(value);
  110425. } else if (type === 'string') {
  110426. return getFiltered(isString$1, editor, name).getOr(defaultVal);
  110427. } else if (type === 'number') {
  110428. return getFiltered(isNumber, editor, name).getOr(defaultVal);
  110429. } else if (type === 'boolean') {
  110430. return getFiltered(isBoolean, editor, name).getOr(defaultVal);
  110431. } else if (type === 'object') {
  110432. return getFiltered(isObject, editor, name).getOr(defaultVal);
  110433. } else if (type === 'array') {
  110434. return getFiltered(isArray$1, editor, name).getOr(defaultVal);
  110435. } else if (type === 'string[]') {
  110436. return getFiltered(isArrayOf(isString$1), editor, name).getOr(defaultVal);
  110437. } else if (type === 'function') {
  110438. return getFiltered(isFunction, editor, name).getOr(defaultVal);
  110439. } else {
  110440. return value;
  110441. }
  110442. };
  110443. var CreateIconManager = function () {
  110444. var lookup = {};
  110445. var add = function (id, iconPack) {
  110446. lookup[id] = iconPack;
  110447. };
  110448. var get = function (id) {
  110449. if (lookup[id]) {
  110450. return lookup[id];
  110451. }
  110452. return { icons: {} };
  110453. };
  110454. var has = function (id) {
  110455. return has$2(lookup, id);
  110456. };
  110457. return {
  110458. add: add,
  110459. get: get,
  110460. has: has
  110461. };
  110462. };
  110463. var IconManager = CreateIconManager();
  110464. var getProp = function (propName, elm) {
  110465. var rawElm = elm.dom;
  110466. return rawElm[propName];
  110467. };
  110468. var getComputedSizeProp = function (propName, elm) {
  110469. return parseInt(get$5(elm, propName), 10);
  110470. };
  110471. var getClientWidth = curry(getProp, 'clientWidth');
  110472. var getClientHeight = curry(getProp, 'clientHeight');
  110473. var getMarginTop = curry(getComputedSizeProp, 'margin-top');
  110474. var getMarginLeft = curry(getComputedSizeProp, 'margin-left');
  110475. var getBoundingClientRect = function (elm) {
  110476. return elm.dom.getBoundingClientRect();
  110477. };
  110478. var isInsideElementContentArea = function (bodyElm, clientX, clientY) {
  110479. var clientWidth = getClientWidth(bodyElm);
  110480. var clientHeight = getClientHeight(bodyElm);
  110481. return clientX >= 0 && clientY >= 0 && clientX <= clientWidth && clientY <= clientHeight;
  110482. };
  110483. var transpose = function (inline, elm, clientX, clientY) {
  110484. var clientRect = getBoundingClientRect(elm);
  110485. var deltaX = inline ? clientRect.left + elm.dom.clientLeft + getMarginLeft(elm) : 0;
  110486. var deltaY = inline ? clientRect.top + elm.dom.clientTop + getMarginTop(elm) : 0;
  110487. var x = clientX - deltaX;
  110488. var y = clientY - deltaY;
  110489. return {
  110490. x: x,
  110491. y: y
  110492. };
  110493. };
  110494. var isXYInContentArea = function (editor, clientX, clientY) {
  110495. var bodyElm = SugarElement.fromDom(editor.getBody());
  110496. var targetElm = editor.inline ? bodyElm : documentElement(bodyElm);
  110497. var transposedPoint = transpose(editor.inline, targetElm, clientX, clientY);
  110498. return isInsideElementContentArea(targetElm, transposedPoint.x, transposedPoint.y);
  110499. };
  110500. var fromDomSafe = function (node) {
  110501. return Optional.from(node).map(SugarElement.fromDom);
  110502. };
  110503. var isEditorAttachedToDom = function (editor) {
  110504. var rawContainer = editor.inline ? editor.getBody() : editor.getContentAreaContainer();
  110505. return fromDomSafe(rawContainer).map(inBody).getOr(false);
  110506. };
  110507. var NotificationManagerImpl = function () {
  110508. var unimplemented = function () {
  110509. throw new Error('Theme did not provide a NotificationManager implementation.');
  110510. };
  110511. return {
  110512. open: unimplemented,
  110513. close: unimplemented,
  110514. reposition: unimplemented,
  110515. getArgs: unimplemented
  110516. };
  110517. };
  110518. var NotificationManager = function (editor) {
  110519. var notifications = [];
  110520. var getImplementation = function () {
  110521. var theme = editor.theme;
  110522. return theme && theme.getNotificationManagerImpl ? theme.getNotificationManagerImpl() : NotificationManagerImpl();
  110523. };
  110524. var getTopNotification = function () {
  110525. return Optional.from(notifications[0]);
  110526. };
  110527. var isEqual = function (a, b) {
  110528. return a.type === b.type && a.text === b.text && !a.progressBar && !a.timeout && !b.progressBar && !b.timeout;
  110529. };
  110530. var reposition = function () {
  110531. if (notifications.length > 0) {
  110532. getImplementation().reposition(notifications);
  110533. }
  110534. };
  110535. var addNotification = function (notification) {
  110536. notifications.push(notification);
  110537. };
  110538. var closeNotification = function (notification) {
  110539. findIndex$2(notifications, function (otherNotification) {
  110540. return otherNotification === notification;
  110541. }).each(function (index) {
  110542. notifications.splice(index, 1);
  110543. });
  110544. };
  110545. var open = function (spec, fireEvent) {
  110546. if (fireEvent === void 0) {
  110547. fireEvent = true;
  110548. }
  110549. if (editor.removed || !isEditorAttachedToDom(editor)) {
  110550. return;
  110551. }
  110552. if (fireEvent) {
  110553. editor.fire('BeforeOpenNotification', { notification: spec });
  110554. }
  110555. return find$3(notifications, function (notification) {
  110556. return isEqual(getImplementation().getArgs(notification), spec);
  110557. }).getOrThunk(function () {
  110558. editor.editorManager.setActive(editor);
  110559. var notification = getImplementation().open(spec, function () {
  110560. closeNotification(notification);
  110561. reposition();
  110562. getTopNotification().fold(function () {
  110563. return editor.focus();
  110564. }, function (top) {
  110565. return focus$1(SugarElement.fromDom(top.getEl()));
  110566. });
  110567. });
  110568. addNotification(notification);
  110569. reposition();
  110570. editor.fire('OpenNotification', { notification: __assign({}, notification) });
  110571. return notification;
  110572. });
  110573. };
  110574. var close = function () {
  110575. getTopNotification().each(function (notification) {
  110576. getImplementation().close(notification);
  110577. closeNotification(notification);
  110578. reposition();
  110579. });
  110580. };
  110581. var getNotifications = constant(notifications);
  110582. var registerEvents = function (editor) {
  110583. editor.on('SkinLoaded', function () {
  110584. var serviceMessage = getServiceMessage(editor);
  110585. if (serviceMessage) {
  110586. open({
  110587. text: serviceMessage,
  110588. type: 'warning',
  110589. timeout: 0
  110590. }, false);
  110591. }
  110592. reposition();
  110593. });
  110594. editor.on('show ResizeEditor ResizeWindow NodeChange', function () {
  110595. Delay.requestAnimationFrame(reposition);
  110596. });
  110597. editor.on('remove', function () {
  110598. each$k(notifications.slice(), function (notification) {
  110599. getImplementation().close(notification);
  110600. });
  110601. });
  110602. };
  110603. registerEvents(editor);
  110604. return {
  110605. open: open,
  110606. close: close,
  110607. getNotifications: getNotifications
  110608. };
  110609. };
  110610. var PluginManager = AddOnManager.PluginManager;
  110611. var ThemeManager = AddOnManager.ThemeManager;
  110612. function WindowManagerImpl () {
  110613. var unimplemented = function () {
  110614. throw new Error('Theme did not provide a WindowManager implementation.');
  110615. };
  110616. return {
  110617. open: unimplemented,
  110618. openUrl: unimplemented,
  110619. alert: unimplemented,
  110620. confirm: unimplemented,
  110621. close: unimplemented,
  110622. getParams: unimplemented,
  110623. setParams: unimplemented
  110624. };
  110625. }
  110626. var WindowManager = function (editor) {
  110627. var dialogs = [];
  110628. var getImplementation = function () {
  110629. var theme = editor.theme;
  110630. return theme && theme.getWindowManagerImpl ? theme.getWindowManagerImpl() : WindowManagerImpl();
  110631. };
  110632. var funcBind = function (scope, f) {
  110633. return function () {
  110634. var args = [];
  110635. for (var _i = 0; _i < arguments.length; _i++) {
  110636. args[_i] = arguments[_i];
  110637. }
  110638. return f ? f.apply(scope, args) : undefined;
  110639. };
  110640. };
  110641. var fireOpenEvent = function (dialog) {
  110642. editor.fire('OpenWindow', { dialog: dialog });
  110643. };
  110644. var fireCloseEvent = function (dialog) {
  110645. editor.fire('CloseWindow', { dialog: dialog });
  110646. };
  110647. var addDialog = function (dialog) {
  110648. dialogs.push(dialog);
  110649. fireOpenEvent(dialog);
  110650. };
  110651. var closeDialog = function (dialog) {
  110652. fireCloseEvent(dialog);
  110653. dialogs = filter$4(dialogs, function (otherDialog) {
  110654. return otherDialog !== dialog;
  110655. });
  110656. if (dialogs.length === 0) {
  110657. editor.focus();
  110658. }
  110659. };
  110660. var getTopDialog = function () {
  110661. return Optional.from(dialogs[dialogs.length - 1]);
  110662. };
  110663. var storeSelectionAndOpenDialog = function (openDialog) {
  110664. editor.editorManager.setActive(editor);
  110665. store(editor);
  110666. var dialog = openDialog();
  110667. addDialog(dialog);
  110668. return dialog;
  110669. };
  110670. var open = function (args, params) {
  110671. return storeSelectionAndOpenDialog(function () {
  110672. return getImplementation().open(args, params, closeDialog);
  110673. });
  110674. };
  110675. var openUrl = function (args) {
  110676. return storeSelectionAndOpenDialog(function () {
  110677. return getImplementation().openUrl(args, closeDialog);
  110678. });
  110679. };
  110680. var alert = function (message, callback, scope) {
  110681. var windowManagerImpl = getImplementation();
  110682. windowManagerImpl.alert(message, funcBind(scope ? scope : windowManagerImpl, callback));
  110683. };
  110684. var confirm = function (message, callback, scope) {
  110685. var windowManagerImpl = getImplementation();
  110686. windowManagerImpl.confirm(message, funcBind(scope ? scope : windowManagerImpl, callback));
  110687. };
  110688. var close = function () {
  110689. getTopDialog().each(function (dialog) {
  110690. getImplementation().close(dialog);
  110691. closeDialog(dialog);
  110692. });
  110693. };
  110694. editor.on('remove', function () {
  110695. each$k(dialogs, function (dialog) {
  110696. getImplementation().close(dialog);
  110697. });
  110698. });
  110699. return {
  110700. open: open,
  110701. openUrl: openUrl,
  110702. alert: alert,
  110703. confirm: confirm,
  110704. close: close
  110705. };
  110706. };
  110707. var displayNotification = function (editor, message) {
  110708. editor.notificationManager.open({
  110709. type: 'error',
  110710. text: message
  110711. });
  110712. };
  110713. var displayError = function (editor, message) {
  110714. if (editor._skinLoaded) {
  110715. displayNotification(editor, message);
  110716. } else {
  110717. editor.on('SkinLoaded', function () {
  110718. displayNotification(editor, message);
  110719. });
  110720. }
  110721. };
  110722. var uploadError = function (editor, message) {
  110723. displayError(editor, I18n.translate([
  110724. 'Failed to upload image: {0}',
  110725. message
  110726. ]));
  110727. };
  110728. var logError = function (editor, errorType, msg) {
  110729. fireError(editor, errorType, { message: msg });
  110730. console.error(msg);
  110731. };
  110732. var createLoadError = function (type, url, name) {
  110733. return name ? 'Failed to load ' + type + ': ' + name + ' from url ' + url : 'Failed to load ' + type + ' url: ' + url;
  110734. };
  110735. var pluginLoadError = function (editor, url, name) {
  110736. logError(editor, 'PluginLoadError', createLoadError('plugin', url, name));
  110737. };
  110738. var iconsLoadError = function (editor, url, name) {
  110739. logError(editor, 'IconsLoadError', createLoadError('icons', url, name));
  110740. };
  110741. var languageLoadError = function (editor, url, name) {
  110742. logError(editor, 'LanguageLoadError', createLoadError('language', url, name));
  110743. };
  110744. var pluginInitError = function (editor, name, err) {
  110745. var message = I18n.translate([
  110746. 'Failed to initialize plugin: {0}',
  110747. name
  110748. ]);
  110749. fireError(editor, 'PluginLoadError', { message: message });
  110750. initError(message, err);
  110751. displayError(editor, message);
  110752. };
  110753. var initError = function (message) {
  110754. var x = [];
  110755. for (var _i = 1; _i < arguments.length; _i++) {
  110756. x[_i - 1] = arguments[_i];
  110757. }
  110758. var console = window.console;
  110759. if (console) {
  110760. if (console.error) {
  110761. console.error.apply(console, __spreadArray([message], x, false));
  110762. } else {
  110763. console.log.apply(console, __spreadArray([message], x, false));
  110764. }
  110765. }
  110766. };
  110767. var isContentCssSkinName = function (url) {
  110768. return /^[a-z0-9\-]+$/i.test(url);
  110769. };
  110770. var getContentCssUrls = function (editor) {
  110771. return transformToUrls(editor, getContentCss(editor));
  110772. };
  110773. var getFontCssUrls = function (editor) {
  110774. return transformToUrls(editor, getFontCss(editor));
  110775. };
  110776. var transformToUrls = function (editor, cssLinks) {
  110777. var skinUrl = editor.editorManager.baseURL + '/skins/content';
  110778. var suffix = editor.editorManager.suffix;
  110779. var contentCssFile = 'content' + suffix + '.css';
  110780. var inline = editor.inline === true;
  110781. return map$3(cssLinks, function (url) {
  110782. if (isContentCssSkinName(url) && !inline) {
  110783. return skinUrl + '/' + url + '/' + contentCssFile;
  110784. } else {
  110785. return editor.documentBaseURI.toAbsolute(url);
  110786. }
  110787. });
  110788. };
  110789. var appendContentCssFromSettings = function (editor) {
  110790. editor.contentCSS = editor.contentCSS.concat(getContentCssUrls(editor), getFontCssUrls(editor));
  110791. };
  110792. var UploadStatus = function () {
  110793. var PENDING = 1, UPLOADED = 2;
  110794. var blobUriStatuses = {};
  110795. var createStatus = function (status, resultUri) {
  110796. return {
  110797. status: status,
  110798. resultUri: resultUri
  110799. };
  110800. };
  110801. var hasBlobUri = function (blobUri) {
  110802. return blobUri in blobUriStatuses;
  110803. };
  110804. var getResultUri = function (blobUri) {
  110805. var result = blobUriStatuses[blobUri];
  110806. return result ? result.resultUri : null;
  110807. };
  110808. var isPending = function (blobUri) {
  110809. return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === PENDING : false;
  110810. };
  110811. var isUploaded = function (blobUri) {
  110812. return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === UPLOADED : false;
  110813. };
  110814. var markPending = function (blobUri) {
  110815. blobUriStatuses[blobUri] = createStatus(PENDING, null);
  110816. };
  110817. var markUploaded = function (blobUri, resultUri) {
  110818. blobUriStatuses[blobUri] = createStatus(UPLOADED, resultUri);
  110819. };
  110820. var removeFailed = function (blobUri) {
  110821. delete blobUriStatuses[blobUri];
  110822. };
  110823. var destroy = function () {
  110824. blobUriStatuses = {};
  110825. };
  110826. return {
  110827. hasBlobUri: hasBlobUri,
  110828. getResultUri: getResultUri,
  110829. isPending: isPending,
  110830. isUploaded: isUploaded,
  110831. markPending: markPending,
  110832. markUploaded: markUploaded,
  110833. removeFailed: removeFailed,
  110834. destroy: destroy
  110835. };
  110836. };
  110837. var count = 0;
  110838. var seed = function () {
  110839. var rnd = function () {
  110840. return Math.round(Math.random() * 4294967295).toString(36);
  110841. };
  110842. var now = new Date().getTime();
  110843. return 's' + now.toString(36) + rnd() + rnd() + rnd();
  110844. };
  110845. var uuid = function (prefix) {
  110846. return prefix + count++ + seed();
  110847. };
  110848. var BlobCache = function () {
  110849. var cache = [];
  110850. var mimeToExt = function (mime) {
  110851. var mimes = {
  110852. 'image/jpeg': 'jpg',
  110853. 'image/jpg': 'jpg',
  110854. 'image/gif': 'gif',
  110855. 'image/png': 'png',
  110856. 'image/apng': 'apng',
  110857. 'image/avif': 'avif',
  110858. 'image/svg+xml': 'svg',
  110859. 'image/webp': 'webp',
  110860. 'image/bmp': 'bmp',
  110861. 'image/tiff': 'tiff'
  110862. };
  110863. return mimes[mime.toLowerCase()] || 'dat';
  110864. };
  110865. var create = function (o, blob, base64, name, filename) {
  110866. if (isString$1(o)) {
  110867. var id = o;
  110868. return toBlobInfo({
  110869. id: id,
  110870. name: name,
  110871. filename: filename,
  110872. blob: blob,
  110873. base64: base64
  110874. });
  110875. } else if (isObject(o)) {
  110876. return toBlobInfo(o);
  110877. } else {
  110878. throw new Error('Unknown input type');
  110879. }
  110880. };
  110881. var toBlobInfo = function (o) {
  110882. if (!o.blob || !o.base64) {
  110883. throw new Error('blob and base64 representations of the image are required for BlobInfo to be created');
  110884. }
  110885. var id = o.id || uuid('blobid');
  110886. var name = o.name || id;
  110887. var blob = o.blob;
  110888. return {
  110889. id: constant(id),
  110890. name: constant(name),
  110891. filename: constant(o.filename || name + '.' + mimeToExt(blob.type)),
  110892. blob: constant(blob),
  110893. base64: constant(o.base64),
  110894. blobUri: constant(o.blobUri || URL.createObjectURL(blob)),
  110895. uri: constant(o.uri)
  110896. };
  110897. };
  110898. var add = function (blobInfo) {
  110899. if (!get(blobInfo.id())) {
  110900. cache.push(blobInfo);
  110901. }
  110902. };
  110903. var findFirst = function (predicate) {
  110904. return find$3(cache, predicate).getOrUndefined();
  110905. };
  110906. var get = function (id) {
  110907. return findFirst(function (cachedBlobInfo) {
  110908. return cachedBlobInfo.id() === id;
  110909. });
  110910. };
  110911. var getByUri = function (blobUri) {
  110912. return findFirst(function (blobInfo) {
  110913. return blobInfo.blobUri() === blobUri;
  110914. });
  110915. };
  110916. var getByData = function (base64, type) {
  110917. return findFirst(function (blobInfo) {
  110918. return blobInfo.base64() === base64 && blobInfo.blob().type === type;
  110919. });
  110920. };
  110921. var removeByUri = function (blobUri) {
  110922. cache = filter$4(cache, function (blobInfo) {
  110923. if (blobInfo.blobUri() === blobUri) {
  110924. URL.revokeObjectURL(blobInfo.blobUri());
  110925. return false;
  110926. }
  110927. return true;
  110928. });
  110929. };
  110930. var destroy = function () {
  110931. each$k(cache, function (cachedBlobInfo) {
  110932. URL.revokeObjectURL(cachedBlobInfo.blobUri());
  110933. });
  110934. cache = [];
  110935. };
  110936. return {
  110937. create: create,
  110938. add: add,
  110939. get: get,
  110940. getByUri: getByUri,
  110941. getByData: getByData,
  110942. findFirst: findFirst,
  110943. removeByUri: removeByUri,
  110944. destroy: destroy
  110945. };
  110946. };
  110947. var Uploader = function (uploadStatus, settings) {
  110948. var pendingPromises = {};
  110949. var pathJoin = function (path1, path2) {
  110950. if (path1) {
  110951. return path1.replace(/\/$/, '') + '/' + path2.replace(/^\//, '');
  110952. }
  110953. return path2;
  110954. };
  110955. var defaultHandler = function (blobInfo, success, failure, progress) {
  110956. var xhr = new XMLHttpRequest();
  110957. xhr.open('POST', settings.url);
  110958. xhr.withCredentials = settings.credentials;
  110959. xhr.upload.onprogress = function (e) {
  110960. progress(e.loaded / e.total * 100);
  110961. };
  110962. xhr.onerror = function () {
  110963. failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status);
  110964. };
  110965. xhr.onload = function () {
  110966. if (xhr.status < 200 || xhr.status >= 300) {
  110967. failure('HTTP Error: ' + xhr.status);
  110968. return;
  110969. }
  110970. var json = JSON.parse(xhr.responseText);
  110971. if (!json || typeof json.location !== 'string') {
  110972. failure('Invalid JSON: ' + xhr.responseText);
  110973. return;
  110974. }
  110975. success(pathJoin(settings.basePath, json.location));
  110976. };
  110977. var formData = new FormData();
  110978. formData.append('file', blobInfo.blob(), blobInfo.filename());
  110979. xhr.send(formData);
  110980. };
  110981. var noUpload = function () {
  110982. return new promiseObj(function (resolve) {
  110983. resolve([]);
  110984. });
  110985. };
  110986. var handlerSuccess = function (blobInfo, url) {
  110987. return {
  110988. url: url,
  110989. blobInfo: blobInfo,
  110990. status: true
  110991. };
  110992. };
  110993. var handlerFailure = function (blobInfo, message, options) {
  110994. return {
  110995. url: '',
  110996. blobInfo: blobInfo,
  110997. status: false,
  110998. error: {
  110999. message: message,
  111000. options: options
  111001. }
  111002. };
  111003. };
  111004. var resolvePending = function (blobUri, result) {
  111005. Tools.each(pendingPromises[blobUri], function (resolve) {
  111006. resolve(result);
  111007. });
  111008. delete pendingPromises[blobUri];
  111009. };
  111010. var uploadBlobInfo = function (blobInfo, handler, openNotification) {
  111011. uploadStatus.markPending(blobInfo.blobUri());
  111012. return new promiseObj(function (resolve) {
  111013. var notification, progress;
  111014. try {
  111015. var closeNotification_1 = function () {
  111016. if (notification) {
  111017. notification.close();
  111018. progress = noop;
  111019. }
  111020. };
  111021. var success = function (url) {
  111022. closeNotification_1();
  111023. uploadStatus.markUploaded(blobInfo.blobUri(), url);
  111024. resolvePending(blobInfo.blobUri(), handlerSuccess(blobInfo, url));
  111025. resolve(handlerSuccess(blobInfo, url));
  111026. };
  111027. var failure = function (error, options) {
  111028. var failureOptions = options ? options : {};
  111029. closeNotification_1();
  111030. uploadStatus.removeFailed(blobInfo.blobUri());
  111031. resolvePending(blobInfo.blobUri(), handlerFailure(blobInfo, error, failureOptions));
  111032. resolve(handlerFailure(blobInfo, error, failureOptions));
  111033. };
  111034. progress = function (percent) {
  111035. if (percent < 0 || percent > 100) {
  111036. return;
  111037. }
  111038. Optional.from(notification).orThunk(function () {
  111039. return Optional.from(openNotification).map(apply);
  111040. }).each(function (n) {
  111041. notification = n;
  111042. n.progressBar.value(percent);
  111043. });
  111044. };
  111045. handler(blobInfo, success, failure, progress);
  111046. } catch (ex) {
  111047. resolve(handlerFailure(blobInfo, ex.message, {}));
  111048. }
  111049. });
  111050. };
  111051. var isDefaultHandler = function (handler) {
  111052. return handler === defaultHandler;
  111053. };
  111054. var pendingUploadBlobInfo = function (blobInfo) {
  111055. var blobUri = blobInfo.blobUri();
  111056. return new promiseObj(function (resolve) {
  111057. pendingPromises[blobUri] = pendingPromises[blobUri] || [];
  111058. pendingPromises[blobUri].push(resolve);
  111059. });
  111060. };
  111061. var uploadBlobs = function (blobInfos, openNotification) {
  111062. blobInfos = Tools.grep(blobInfos, function (blobInfo) {
  111063. return !uploadStatus.isUploaded(blobInfo.blobUri());
  111064. });
  111065. return promiseObj.all(Tools.map(blobInfos, function (blobInfo) {
  111066. return uploadStatus.isPending(blobInfo.blobUri()) ? pendingUploadBlobInfo(blobInfo) : uploadBlobInfo(blobInfo, settings.handler, openNotification);
  111067. }));
  111068. };
  111069. var upload = function (blobInfos, openNotification) {
  111070. return !settings.url && isDefaultHandler(settings.handler) ? noUpload() : uploadBlobs(blobInfos, openNotification);
  111071. };
  111072. if (isFunction(settings.handler) === false) {
  111073. settings.handler = defaultHandler;
  111074. }
  111075. return { upload: upload };
  111076. };
  111077. var openNotification = function (editor) {
  111078. return function () {
  111079. return editor.notificationManager.open({
  111080. text: editor.translate('Image uploading...'),
  111081. type: 'info',
  111082. timeout: -1,
  111083. progressBar: true
  111084. });
  111085. };
  111086. };
  111087. var createUploader = function (editor, uploadStatus) {
  111088. return Uploader(uploadStatus, {
  111089. url: getImageUploadUrl(editor),
  111090. basePath: getImageUploadBasePath(editor),
  111091. credentials: getImagesUploadCredentials(editor),
  111092. handler: getImagesUploadHandler(editor)
  111093. });
  111094. };
  111095. var ImageUploader = function (editor) {
  111096. var uploadStatus = UploadStatus();
  111097. var uploader = createUploader(editor, uploadStatus);
  111098. return {
  111099. upload: function (blobInfos, showNotification) {
  111100. if (showNotification === void 0) {
  111101. showNotification = true;
  111102. }
  111103. return uploader.upload(blobInfos, showNotification ? openNotification(editor) : undefined);
  111104. }
  111105. };
  111106. };
  111107. var UploadChangeHandler = function (editor) {
  111108. var lastChangedLevel = Cell(null);
  111109. editor.on('change AddUndo', function (e) {
  111110. lastChangedLevel.set(__assign({}, e.level));
  111111. });
  111112. var fireIfChanged = function () {
  111113. var data = editor.undoManager.data;
  111114. last$2(data).filter(function (level) {
  111115. return !isEq$1(lastChangedLevel.get(), level);
  111116. }).each(function (level) {
  111117. editor.setDirty(true);
  111118. editor.fire('change', {
  111119. level: level,
  111120. lastLevel: get$a(data, data.length - 2).getOrNull()
  111121. });
  111122. });
  111123. };
  111124. return { fireIfChanged: fireIfChanged };
  111125. };
  111126. var EditorUpload = function (editor) {
  111127. var blobCache = BlobCache();
  111128. var uploader, imageScanner;
  111129. var uploadStatus = UploadStatus();
  111130. var urlFilters = [];
  111131. var changeHandler = UploadChangeHandler(editor);
  111132. var aliveGuard = function (callback) {
  111133. return function (result) {
  111134. if (editor.selection) {
  111135. return callback(result);
  111136. }
  111137. return [];
  111138. };
  111139. };
  111140. var cacheInvalidator = function (url) {
  111141. return url + (url.indexOf('?') === -1 ? '?' : '&') + new Date().getTime();
  111142. };
  111143. var replaceString = function (content, search, replace) {
  111144. var index = 0;
  111145. do {
  111146. index = content.indexOf(search, index);
  111147. if (index !== -1) {
  111148. content = content.substring(0, index) + replace + content.substr(index + search.length);
  111149. index += replace.length - search.length + 1;
  111150. }
  111151. } while (index !== -1);
  111152. return content;
  111153. };
  111154. var replaceImageUrl = function (content, targetUrl, replacementUrl) {
  111155. var replacementString = 'src="' + replacementUrl + '"' + (replacementUrl === Env.transparentSrc ? ' data-mce-placeholder="1"' : '');
  111156. content = replaceString(content, 'src="' + targetUrl + '"', replacementString);
  111157. content = replaceString(content, 'data-mce-src="' + targetUrl + '"', 'data-mce-src="' + replacementUrl + '"');
  111158. return content;
  111159. };
  111160. var replaceUrlInUndoStack = function (targetUrl, replacementUrl) {
  111161. each$k(editor.undoManager.data, function (level) {
  111162. if (level.type === 'fragmented') {
  111163. level.fragments = map$3(level.fragments, function (fragment) {
  111164. return replaceImageUrl(fragment, targetUrl, replacementUrl);
  111165. });
  111166. } else {
  111167. level.content = replaceImageUrl(level.content, targetUrl, replacementUrl);
  111168. }
  111169. });
  111170. };
  111171. var replaceImageUriInView = function (image, resultUri) {
  111172. var src = editor.convertURL(resultUri, 'src');
  111173. replaceUrlInUndoStack(image.src, resultUri);
  111174. editor.$(image).attr({
  111175. 'src': shouldReuseFileName(editor) ? cacheInvalidator(resultUri) : resultUri,
  111176. 'data-mce-src': src
  111177. });
  111178. };
  111179. var uploadImages = function (callback) {
  111180. if (!uploader) {
  111181. uploader = createUploader(editor, uploadStatus);
  111182. }
  111183. return scanForImages().then(aliveGuard(function (imageInfos) {
  111184. var blobInfos = map$3(imageInfos, function (imageInfo) {
  111185. return imageInfo.blobInfo;
  111186. });
  111187. return uploader.upload(blobInfos, openNotification(editor)).then(aliveGuard(function (result) {
  111188. var imagesToRemove = [];
  111189. var filteredResult = map$3(result, function (uploadInfo, index) {
  111190. var blobInfo = imageInfos[index].blobInfo;
  111191. var image = imageInfos[index].image;
  111192. if (uploadInfo.status && shouldReplaceBlobUris(editor)) {
  111193. blobCache.removeByUri(image.src);
  111194. if (isRtc(editor)) ; else {
  111195. replaceImageUriInView(image, uploadInfo.url);
  111196. }
  111197. } else if (uploadInfo.error) {
  111198. if (uploadInfo.error.options.remove) {
  111199. replaceUrlInUndoStack(image.getAttribute('src'), Env.transparentSrc);
  111200. imagesToRemove.push(image);
  111201. }
  111202. uploadError(editor, uploadInfo.error.message);
  111203. }
  111204. return {
  111205. element: image,
  111206. status: uploadInfo.status,
  111207. uploadUri: uploadInfo.url,
  111208. blobInfo: blobInfo
  111209. };
  111210. });
  111211. if (filteredResult.length > 0) {
  111212. changeHandler.fireIfChanged();
  111213. }
  111214. if (imagesToRemove.length > 0) {
  111215. if (isRtc(editor)) {
  111216. console.error('Removing images on failed uploads is currently unsupported for RTC');
  111217. } else {
  111218. editor.undoManager.transact(function () {
  111219. each$k(imagesToRemove, function (element) {
  111220. editor.dom.remove(element);
  111221. blobCache.removeByUri(element.src);
  111222. });
  111223. });
  111224. }
  111225. }
  111226. if (callback) {
  111227. callback(filteredResult);
  111228. }
  111229. return filteredResult;
  111230. }));
  111231. }));
  111232. };
  111233. var uploadImagesAuto = function (callback) {
  111234. if (isAutomaticUploadsEnabled(editor)) {
  111235. return uploadImages(callback);
  111236. }
  111237. };
  111238. var isValidDataUriImage = function (imgElm) {
  111239. if (forall(urlFilters, function (filter) {
  111240. return filter(imgElm);
  111241. }) === false) {
  111242. return false;
  111243. }
  111244. if (imgElm.getAttribute('src').indexOf('data:') === 0) {
  111245. var dataImgFilter = getImagesDataImgFilter(editor);
  111246. return dataImgFilter(imgElm);
  111247. }
  111248. return true;
  111249. };
  111250. var addFilter = function (filter) {
  111251. urlFilters.push(filter);
  111252. };
  111253. var scanForImages = function () {
  111254. if (!imageScanner) {
  111255. imageScanner = ImageScanner(uploadStatus, blobCache);
  111256. }
  111257. return imageScanner.findAll(editor.getBody(), isValidDataUriImage).then(aliveGuard(function (result) {
  111258. result = filter$4(result, function (resultItem) {
  111259. if (typeof resultItem === 'string') {
  111260. displayError(editor, resultItem);
  111261. return false;
  111262. }
  111263. return true;
  111264. });
  111265. if (isRtc(editor)) ; else {
  111266. each$k(result, function (resultItem) {
  111267. replaceUrlInUndoStack(resultItem.image.src, resultItem.blobInfo.blobUri());
  111268. resultItem.image.src = resultItem.blobInfo.blobUri();
  111269. resultItem.image.removeAttribute('data-mce-src');
  111270. });
  111271. }
  111272. return result;
  111273. }));
  111274. };
  111275. var destroy = function () {
  111276. blobCache.destroy();
  111277. uploadStatus.destroy();
  111278. imageScanner = uploader = null;
  111279. };
  111280. var replaceBlobUris = function (content) {
  111281. return content.replace(/src="(blob:[^"]+)"/g, function (match, blobUri) {
  111282. var resultUri = uploadStatus.getResultUri(blobUri);
  111283. if (resultUri) {
  111284. return 'src="' + resultUri + '"';
  111285. }
  111286. var blobInfo = blobCache.getByUri(blobUri);
  111287. if (!blobInfo) {
  111288. blobInfo = foldl(editor.editorManager.get(), function (result, editor) {
  111289. return result || editor.editorUpload && editor.editorUpload.blobCache.getByUri(blobUri);
  111290. }, null);
  111291. }
  111292. if (blobInfo) {
  111293. var blob = blobInfo.blob();
  111294. return 'src="data:' + blob.type + ';base64,' + blobInfo.base64() + '"';
  111295. }
  111296. return match;
  111297. });
  111298. };
  111299. editor.on('SetContent', function () {
  111300. if (isAutomaticUploadsEnabled(editor)) {
  111301. uploadImagesAuto();
  111302. } else {
  111303. scanForImages();
  111304. }
  111305. });
  111306. editor.on('RawSaveContent', function (e) {
  111307. e.content = replaceBlobUris(e.content);
  111308. });
  111309. editor.on('GetContent', function (e) {
  111310. if (e.source_view || e.format === 'raw' || e.format === 'tree') {
  111311. return;
  111312. }
  111313. e.content = replaceBlobUris(e.content);
  111314. });
  111315. editor.on('PostRender', function () {
  111316. editor.parser.addNodeFilter('img', function (images) {
  111317. each$k(images, function (img) {
  111318. var src = img.attr('src');
  111319. if (blobCache.getByUri(src)) {
  111320. return;
  111321. }
  111322. var resultUri = uploadStatus.getResultUri(src);
  111323. if (resultUri) {
  111324. img.attr('src', resultUri);
  111325. }
  111326. });
  111327. });
  111328. });
  111329. return {
  111330. blobCache: blobCache,
  111331. addFilter: addFilter,
  111332. uploadImages: uploadImages,
  111333. uploadImagesAuto: uploadImagesAuto,
  111334. scanForImages: scanForImages,
  111335. destroy: destroy
  111336. };
  111337. };
  111338. var get = function (dom) {
  111339. var formats = {
  111340. valigntop: [{
  111341. selector: 'td,th',
  111342. styles: { verticalAlign: 'top' }
  111343. }],
  111344. valignmiddle: [{
  111345. selector: 'td,th',
  111346. styles: { verticalAlign: 'middle' }
  111347. }],
  111348. valignbottom: [{
  111349. selector: 'td,th',
  111350. styles: { verticalAlign: 'bottom' }
  111351. }],
  111352. alignleft: [
  111353. {
  111354. selector: 'figure.image',
  111355. collapsed: false,
  111356. classes: 'align-left',
  111357. ceFalseOverride: true,
  111358. preview: 'font-family font-size'
  111359. },
  111360. {
  111361. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  111362. styles: { textAlign: 'left' },
  111363. inherit: false,
  111364. preview: false,
  111365. defaultBlock: 'div'
  111366. },
  111367. {
  111368. selector: 'img,table,audio,video',
  111369. collapsed: false,
  111370. styles: { float: 'left' },
  111371. preview: 'font-family font-size'
  111372. }
  111373. ],
  111374. aligncenter: [
  111375. {
  111376. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  111377. styles: { textAlign: 'center' },
  111378. inherit: false,
  111379. preview: 'font-family font-size',
  111380. defaultBlock: 'div'
  111381. },
  111382. {
  111383. selector: 'figure.image',
  111384. collapsed: false,
  111385. classes: 'align-center',
  111386. ceFalseOverride: true,
  111387. preview: 'font-family font-size'
  111388. },
  111389. {
  111390. selector: 'img,audio,video',
  111391. collapsed: false,
  111392. styles: {
  111393. display: 'block',
  111394. marginLeft: 'auto',
  111395. marginRight: 'auto'
  111396. },
  111397. preview: false
  111398. },
  111399. {
  111400. selector: 'table',
  111401. collapsed: false,
  111402. styles: {
  111403. marginLeft: 'auto',
  111404. marginRight: 'auto'
  111405. },
  111406. preview: 'font-family font-size'
  111407. }
  111408. ],
  111409. alignright: [
  111410. {
  111411. selector: 'figure.image',
  111412. collapsed: false,
  111413. classes: 'align-right',
  111414. ceFalseOverride: true,
  111415. preview: 'font-family font-size'
  111416. },
  111417. {
  111418. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  111419. styles: { textAlign: 'right' },
  111420. inherit: false,
  111421. preview: 'font-family font-size',
  111422. defaultBlock: 'div'
  111423. },
  111424. {
  111425. selector: 'img,table,audio,video',
  111426. collapsed: false,
  111427. styles: { float: 'right' },
  111428. preview: 'font-family font-size'
  111429. }
  111430. ],
  111431. alignjustify: [{
  111432. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  111433. styles: { textAlign: 'justify' },
  111434. inherit: false,
  111435. defaultBlock: 'div',
  111436. preview: 'font-family font-size'
  111437. }],
  111438. bold: [
  111439. {
  111440. inline: 'strong',
  111441. remove: 'all',
  111442. preserve_attributes: [
  111443. 'class',
  111444. 'style'
  111445. ]
  111446. },
  111447. {
  111448. inline: 'span',
  111449. styles: { fontWeight: 'bold' }
  111450. },
  111451. {
  111452. inline: 'b',
  111453. remove: 'all',
  111454. preserve_attributes: [
  111455. 'class',
  111456. 'style'
  111457. ]
  111458. }
  111459. ],
  111460. italic: [
  111461. {
  111462. inline: 'em',
  111463. remove: 'all',
  111464. preserve_attributes: [
  111465. 'class',
  111466. 'style'
  111467. ]
  111468. },
  111469. {
  111470. inline: 'span',
  111471. styles: { fontStyle: 'italic' }
  111472. },
  111473. {
  111474. inline: 'i',
  111475. remove: 'all',
  111476. preserve_attributes: [
  111477. 'class',
  111478. 'style'
  111479. ]
  111480. }
  111481. ],
  111482. underline: [
  111483. {
  111484. inline: 'span',
  111485. styles: { textDecoration: 'underline' },
  111486. exact: true
  111487. },
  111488. {
  111489. inline: 'u',
  111490. remove: 'all',
  111491. preserve_attributes: [
  111492. 'class',
  111493. 'style'
  111494. ]
  111495. }
  111496. ],
  111497. strikethrough: [
  111498. {
  111499. inline: 'span',
  111500. styles: { textDecoration: 'line-through' },
  111501. exact: true
  111502. },
  111503. {
  111504. inline: 'strike',
  111505. remove: 'all',
  111506. preserve_attributes: [
  111507. 'class',
  111508. 'style'
  111509. ]
  111510. },
  111511. {
  111512. inline: 's',
  111513. remove: 'all',
  111514. preserve_attributes: [
  111515. 'class',
  111516. 'style'
  111517. ]
  111518. }
  111519. ],
  111520. forecolor: {
  111521. inline: 'span',
  111522. styles: { color: '%value' },
  111523. links: true,
  111524. remove_similar: true,
  111525. clear_child_styles: true
  111526. },
  111527. hilitecolor: {
  111528. inline: 'span',
  111529. styles: { backgroundColor: '%value' },
  111530. links: true,
  111531. remove_similar: true,
  111532. clear_child_styles: true
  111533. },
  111534. fontname: {
  111535. inline: 'span',
  111536. toggle: false,
  111537. styles: { fontFamily: '%value' },
  111538. clear_child_styles: true
  111539. },
  111540. fontsize: {
  111541. inline: 'span',
  111542. toggle: false,
  111543. styles: { fontSize: '%value' },
  111544. clear_child_styles: true
  111545. },
  111546. lineheight: {
  111547. selector: 'h1,h2,h3,h4,h5,h6,p,li,td,th,div',
  111548. defaultBlock: 'p',
  111549. styles: { lineHeight: '%value' }
  111550. },
  111551. fontsize_class: {
  111552. inline: 'span',
  111553. attributes: { class: '%value' }
  111554. },
  111555. blockquote: {
  111556. block: 'blockquote',
  111557. wrapper: true,
  111558. remove: 'all'
  111559. },
  111560. subscript: { inline: 'sub' },
  111561. superscript: { inline: 'sup' },
  111562. code: { inline: 'code' },
  111563. link: {
  111564. inline: 'a',
  111565. selector: 'a',
  111566. remove: 'all',
  111567. split: true,
  111568. deep: true,
  111569. onmatch: function (node, _fmt, _itemName) {
  111570. return isElement$5(node) && node.hasAttribute('href');
  111571. },
  111572. onformat: function (elm, _fmt, vars) {
  111573. Tools.each(vars, function (value, key) {
  111574. dom.setAttrib(elm, key, value);
  111575. });
  111576. }
  111577. },
  111578. lang: {
  111579. inline: 'span',
  111580. clear_child_styles: true,
  111581. remove_similar: true,
  111582. attributes: {
  111583. 'lang': '%value',
  111584. 'data-mce-lang': function (vars) {
  111585. var _a;
  111586. return (_a = vars === null || vars === void 0 ? void 0 : vars.customValue) !== null && _a !== void 0 ? _a : null;
  111587. }
  111588. }
  111589. },
  111590. removeformat: [
  111591. {
  111592. selector: 'b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small',
  111593. remove: 'all',
  111594. split: true,
  111595. expand: false,
  111596. block_expand: true,
  111597. deep: true
  111598. },
  111599. {
  111600. selector: 'span',
  111601. attributes: [
  111602. 'style',
  111603. 'class'
  111604. ],
  111605. remove: 'empty',
  111606. split: true,
  111607. expand: false,
  111608. deep: true
  111609. },
  111610. {
  111611. selector: '*',
  111612. attributes: [
  111613. 'style',
  111614. 'class'
  111615. ],
  111616. split: false,
  111617. expand: false,
  111618. deep: true
  111619. }
  111620. ]
  111621. };
  111622. Tools.each('p h1 h2 h3 h4 h5 h6 div address pre dt dd samp'.split(/\s/), function (name) {
  111623. formats[name] = {
  111624. block: name,
  111625. remove: 'all'
  111626. };
  111627. });
  111628. return formats;
  111629. };
  111630. var FormatRegistry = function (editor) {
  111631. var formats = {};
  111632. var get$1 = function (name) {
  111633. return isNonNullable(name) ? formats[name] : formats;
  111634. };
  111635. var has = function (name) {
  111636. return has$2(formats, name);
  111637. };
  111638. var register = function (name, format) {
  111639. if (name) {
  111640. if (!isString$1(name)) {
  111641. each$j(name, function (format, name) {
  111642. register(name, format);
  111643. });
  111644. } else {
  111645. if (!isArray$1(format)) {
  111646. format = [format];
  111647. }
  111648. each$k(format, function (format) {
  111649. if (isUndefined(format.deep)) {
  111650. format.deep = !isSelectorFormat(format);
  111651. }
  111652. if (isUndefined(format.split)) {
  111653. format.split = !isSelectorFormat(format) || isInlineFormat(format);
  111654. }
  111655. if (isUndefined(format.remove) && isSelectorFormat(format) && !isInlineFormat(format)) {
  111656. format.remove = 'none';
  111657. }
  111658. if (isSelectorFormat(format) && isInlineFormat(format)) {
  111659. format.mixed = true;
  111660. format.block_expand = true;
  111661. }
  111662. if (isString$1(format.classes)) {
  111663. format.classes = format.classes.split(/\s+/);
  111664. }
  111665. });
  111666. formats[name] = format;
  111667. }
  111668. }
  111669. };
  111670. var unregister = function (name) {
  111671. if (name && formats[name]) {
  111672. delete formats[name];
  111673. }
  111674. return formats;
  111675. };
  111676. register(get(editor.dom));
  111677. register(getFormats(editor));
  111678. return {
  111679. get: get$1,
  111680. has: has,
  111681. register: register,
  111682. unregister: unregister
  111683. };
  111684. };
  111685. var each$5 = Tools.each;
  111686. var dom = DOMUtils.DOM;
  111687. var parsedSelectorToHtml = function (ancestry, editor) {
  111688. var elm, item, fragment;
  111689. var schema = editor && editor.schema || Schema({});
  111690. var decorate = function (elm, item) {
  111691. if (item.classes.length) {
  111692. dom.addClass(elm, item.classes.join(' '));
  111693. }
  111694. dom.setAttribs(elm, item.attrs);
  111695. };
  111696. var createElement = function (sItem) {
  111697. item = typeof sItem === 'string' ? {
  111698. name: sItem,
  111699. classes: [],
  111700. attrs: {}
  111701. } : sItem;
  111702. var elm = dom.create(item.name);
  111703. decorate(elm, item);
  111704. return elm;
  111705. };
  111706. var getRequiredParent = function (elm, candidate) {
  111707. var name = typeof elm !== 'string' ? elm.nodeName.toLowerCase() : elm;
  111708. var elmRule = schema.getElementRule(name);
  111709. var parentsRequired = elmRule && elmRule.parentsRequired;
  111710. if (parentsRequired && parentsRequired.length) {
  111711. return candidate && Tools.inArray(parentsRequired, candidate) !== -1 ? candidate : parentsRequired[0];
  111712. } else {
  111713. return false;
  111714. }
  111715. };
  111716. var wrapInHtml = function (elm, ancestry, siblings) {
  111717. var parent, parentCandidate;
  111718. var ancestor = ancestry.length > 0 && ancestry[0];
  111719. var ancestorName = ancestor && ancestor.name;
  111720. var parentRequired = getRequiredParent(elm, ancestorName);
  111721. if (parentRequired) {
  111722. if (ancestorName === parentRequired) {
  111723. parentCandidate = ancestry[0];
  111724. ancestry = ancestry.slice(1);
  111725. } else {
  111726. parentCandidate = parentRequired;
  111727. }
  111728. } else if (ancestor) {
  111729. parentCandidate = ancestry[0];
  111730. ancestry = ancestry.slice(1);
  111731. } else if (!siblings) {
  111732. return elm;
  111733. }
  111734. if (parentCandidate) {
  111735. parent = createElement(parentCandidate);
  111736. parent.appendChild(elm);
  111737. }
  111738. if (siblings) {
  111739. if (!parent) {
  111740. parent = dom.create('div');
  111741. parent.appendChild(elm);
  111742. }
  111743. Tools.each(siblings, function (sibling) {
  111744. var siblingElm = createElement(sibling);
  111745. parent.insertBefore(siblingElm, elm);
  111746. });
  111747. }
  111748. return wrapInHtml(parent, ancestry, parentCandidate && parentCandidate.siblings);
  111749. };
  111750. if (ancestry && ancestry.length) {
  111751. item = ancestry[0];
  111752. elm = createElement(item);
  111753. fragment = dom.create('div');
  111754. fragment.appendChild(wrapInHtml(elm, ancestry.slice(1), item.siblings));
  111755. return fragment;
  111756. } else {
  111757. return '';
  111758. }
  111759. };
  111760. var parseSelectorItem = function (item) {
  111761. var tagName;
  111762. var obj = {
  111763. classes: [],
  111764. attrs: {}
  111765. };
  111766. item = obj.selector = Tools.trim(item);
  111767. if (item !== '*') {
  111768. tagName = item.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g, function ($0, $1, $2, $3, $4) {
  111769. switch ($1) {
  111770. case '#':
  111771. obj.attrs.id = $2;
  111772. break;
  111773. case '.':
  111774. obj.classes.push($2);
  111775. break;
  111776. case ':':
  111777. if (Tools.inArray('checked disabled enabled read-only required'.split(' '), $2) !== -1) {
  111778. obj.attrs[$2] = $2;
  111779. }
  111780. break;
  111781. }
  111782. if ($3 === '[') {
  111783. var m = $4.match(/([\w\-]+)(?:\=\"([^\"]+))?/);
  111784. if (m) {
  111785. obj.attrs[m[1]] = m[2];
  111786. }
  111787. }
  111788. return '';
  111789. });
  111790. }
  111791. obj.name = tagName || 'div';
  111792. return obj;
  111793. };
  111794. var parseSelector = function (selector) {
  111795. if (!selector || typeof selector !== 'string') {
  111796. return [];
  111797. }
  111798. selector = selector.split(/\s*,\s*/)[0];
  111799. selector = selector.replace(/\s*(~\+|~|\+|>)\s*/g, '$1');
  111800. return Tools.map(selector.split(/(?:>|\s+(?![^\[\]]+\]))/), function (item) {
  111801. var siblings = Tools.map(item.split(/(?:~\+|~|\+)/), parseSelectorItem);
  111802. var obj = siblings.pop();
  111803. if (siblings.length) {
  111804. obj.siblings = siblings;
  111805. }
  111806. return obj;
  111807. }).reverse();
  111808. };
  111809. var getCssText = function (editor, format) {
  111810. var name, previewFrag;
  111811. var previewCss = '', parentFontSize;
  111812. var previewStyles = getPreviewStyles(editor);
  111813. if (previewStyles === '') {
  111814. return '';
  111815. }
  111816. var removeVars = function (val) {
  111817. return val.replace(/%(\w+)/g, '');
  111818. };
  111819. if (typeof format === 'string') {
  111820. format = editor.formatter.get(format);
  111821. if (!format) {
  111822. return;
  111823. }
  111824. format = format[0];
  111825. }
  111826. if ('preview' in format) {
  111827. var previewOpt = get$9(format, 'preview');
  111828. if (is$1(previewOpt, false)) {
  111829. return '';
  111830. } else {
  111831. previewStyles = previewOpt.getOr(previewStyles);
  111832. }
  111833. }
  111834. name = format.block || format.inline || 'span';
  111835. var items = parseSelector(format.selector);
  111836. if (items.length) {
  111837. if (!items[0].name) {
  111838. items[0].name = name;
  111839. }
  111840. name = format.selector;
  111841. previewFrag = parsedSelectorToHtml(items, editor);
  111842. } else {
  111843. previewFrag = parsedSelectorToHtml([name], editor);
  111844. }
  111845. var previewElm = dom.select(name, previewFrag)[0] || previewFrag.firstChild;
  111846. each$5(format.styles, function (value, name) {
  111847. var newValue = removeVars(value);
  111848. if (newValue) {
  111849. dom.setStyle(previewElm, name, newValue);
  111850. }
  111851. });
  111852. each$5(format.attributes, function (value, name) {
  111853. var newValue = removeVars(value);
  111854. if (newValue) {
  111855. dom.setAttrib(previewElm, name, newValue);
  111856. }
  111857. });
  111858. each$5(format.classes, function (value) {
  111859. var newValue = removeVars(value);
  111860. if (!dom.hasClass(previewElm, newValue)) {
  111861. dom.addClass(previewElm, newValue);
  111862. }
  111863. });
  111864. editor.fire('PreviewFormats');
  111865. dom.setStyles(previewFrag, {
  111866. position: 'absolute',
  111867. left: -65535
  111868. });
  111869. editor.getBody().appendChild(previewFrag);
  111870. parentFontSize = dom.getStyle(editor.getBody(), 'fontSize', true);
  111871. parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
  111872. each$5(previewStyles.split(' '), function (name) {
  111873. var value = dom.getStyle(previewElm, name, true);
  111874. if (name === 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
  111875. value = dom.getStyle(editor.getBody(), name, true);
  111876. if (dom.toHex(value).toLowerCase() === '#ffffff') {
  111877. return;
  111878. }
  111879. }
  111880. if (name === 'color') {
  111881. if (dom.toHex(value).toLowerCase() === '#000000') {
  111882. return;
  111883. }
  111884. }
  111885. if (name === 'font-size') {
  111886. if (/em|%$/.test(value)) {
  111887. if (parentFontSize === 0) {
  111888. return;
  111889. }
  111890. var numValue = parseFloat(value) / (/%$/.test(value) ? 100 : 1);
  111891. value = numValue * parentFontSize + 'px';
  111892. }
  111893. }
  111894. if (name === 'border' && value) {
  111895. previewCss += 'padding:0 2px;';
  111896. }
  111897. previewCss += name + ':' + value + ';';
  111898. });
  111899. editor.fire('AfterPreviewFormats');
  111900. dom.remove(previewFrag);
  111901. return previewCss;
  111902. };
  111903. var setup$h = function (editor) {
  111904. editor.addShortcut('meta+b', '', 'Bold');
  111905. editor.addShortcut('meta+i', '', 'Italic');
  111906. editor.addShortcut('meta+u', '', 'Underline');
  111907. for (var i = 1; i <= 6; i++) {
  111908. editor.addShortcut('access+' + i, '', [
  111909. 'FormatBlock',
  111910. false,
  111911. 'h' + i
  111912. ]);
  111913. }
  111914. editor.addShortcut('access+7', '', [
  111915. 'FormatBlock',
  111916. false,
  111917. 'p'
  111918. ]);
  111919. editor.addShortcut('access+8', '', [
  111920. 'FormatBlock',
  111921. false,
  111922. 'div'
  111923. ]);
  111924. editor.addShortcut('access+9', '', [
  111925. 'FormatBlock',
  111926. false,
  111927. 'address'
  111928. ]);
  111929. };
  111930. var Formatter = function (editor) {
  111931. var formats = FormatRegistry(editor);
  111932. var formatChangeState = Cell(null);
  111933. setup$h(editor);
  111934. setup$k(editor);
  111935. return {
  111936. get: formats.get,
  111937. has: formats.has,
  111938. register: formats.register,
  111939. unregister: formats.unregister,
  111940. apply: function (name, vars, node) {
  111941. applyFormat(editor, name, vars, node);
  111942. },
  111943. remove: function (name, vars, node, similar) {
  111944. removeFormat(editor, name, vars, node, similar);
  111945. },
  111946. toggle: function (name, vars, node) {
  111947. toggleFormat(editor, name, vars, node);
  111948. },
  111949. match: function (name, vars, node, similar) {
  111950. return matchFormat(editor, name, vars, node, similar);
  111951. },
  111952. closest: function (names) {
  111953. return closestFormat(editor, names);
  111954. },
  111955. matchAll: function (names, vars) {
  111956. return matchAllFormats(editor, names, vars);
  111957. },
  111958. matchNode: function (node, name, vars, similar) {
  111959. return matchNodeFormat(editor, node, name, vars, similar);
  111960. },
  111961. canApply: function (name) {
  111962. return canApplyFormat(editor, name);
  111963. },
  111964. formatChanged: function (formats, callback, similar, vars) {
  111965. return formatChanged(editor, formatChangeState, formats, callback, similar, vars);
  111966. },
  111967. getCssText: curry(getCssText, editor)
  111968. };
  111969. };
  111970. var shouldIgnoreCommand = function (cmd) {
  111971. switch (cmd.toLowerCase()) {
  111972. case 'undo':
  111973. case 'redo':
  111974. case 'mcerepaint':
  111975. case 'mcefocus':
  111976. return true;
  111977. default:
  111978. return false;
  111979. }
  111980. };
  111981. var registerEvents = function (editor, undoManager, locks) {
  111982. var isFirstTypedCharacter = Cell(false);
  111983. var addNonTypingUndoLevel = function (e) {
  111984. setTyping(undoManager, false, locks);
  111985. undoManager.add({}, e);
  111986. };
  111987. editor.on('init', function () {
  111988. undoManager.add();
  111989. });
  111990. editor.on('BeforeExecCommand', function (e) {
  111991. var cmd = e.command;
  111992. if (!shouldIgnoreCommand(cmd)) {
  111993. endTyping(undoManager, locks);
  111994. undoManager.beforeChange();
  111995. }
  111996. });
  111997. editor.on('ExecCommand', function (e) {
  111998. var cmd = e.command;
  111999. if (!shouldIgnoreCommand(cmd)) {
  112000. addNonTypingUndoLevel(e);
  112001. }
  112002. });
  112003. editor.on('ObjectResizeStart cut', function () {
  112004. undoManager.beforeChange();
  112005. });
  112006. editor.on('SaveContent ObjectResized blur', addNonTypingUndoLevel);
  112007. editor.on('dragend', addNonTypingUndoLevel);
  112008. editor.on('keyup', function (e) {
  112009. var keyCode = e.keyCode;
  112010. if (e.isDefaultPrevented()) {
  112011. return;
  112012. }
  112013. if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45 || e.ctrlKey) {
  112014. addNonTypingUndoLevel();
  112015. editor.nodeChanged();
  112016. }
  112017. if (keyCode === 46 || keyCode === 8) {
  112018. editor.nodeChanged();
  112019. }
  112020. if (isFirstTypedCharacter.get() && undoManager.typing && isEq$1(createFromEditor(editor), undoManager.data[0]) === false) {
  112021. if (editor.isDirty() === false) {
  112022. editor.setDirty(true);
  112023. editor.fire('change', {
  112024. level: undoManager.data[0],
  112025. lastLevel: null
  112026. });
  112027. }
  112028. editor.fire('TypingUndo');
  112029. isFirstTypedCharacter.set(false);
  112030. editor.nodeChanged();
  112031. }
  112032. });
  112033. editor.on('keydown', function (e) {
  112034. var keyCode = e.keyCode;
  112035. if (e.isDefaultPrevented()) {
  112036. return;
  112037. }
  112038. if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45) {
  112039. if (undoManager.typing) {
  112040. addNonTypingUndoLevel(e);
  112041. }
  112042. return;
  112043. }
  112044. var modKey = e.ctrlKey && !e.altKey || e.metaKey;
  112045. if ((keyCode < 16 || keyCode > 20) && keyCode !== 224 && keyCode !== 91 && !undoManager.typing && !modKey) {
  112046. undoManager.beforeChange();
  112047. setTyping(undoManager, true, locks);
  112048. undoManager.add({}, e);
  112049. isFirstTypedCharacter.set(true);
  112050. }
  112051. });
  112052. editor.on('mousedown', function (e) {
  112053. if (undoManager.typing) {
  112054. addNonTypingUndoLevel(e);
  112055. }
  112056. });
  112057. var isInsertReplacementText = function (event) {
  112058. return event.inputType === 'insertReplacementText';
  112059. };
  112060. var isInsertTextDataNull = function (event) {
  112061. return event.inputType === 'insertText' && event.data === null;
  112062. };
  112063. var isInsertFromPasteOrDrop = function (event) {
  112064. return event.inputType === 'insertFromPaste' || event.inputType === 'insertFromDrop';
  112065. };
  112066. editor.on('input', function (e) {
  112067. if (e.inputType && (isInsertReplacementText(e) || isInsertTextDataNull(e) || isInsertFromPasteOrDrop(e))) {
  112068. addNonTypingUndoLevel(e);
  112069. }
  112070. });
  112071. editor.on('AddUndo Undo Redo ClearUndos', function (e) {
  112072. if (!e.isDefaultPrevented()) {
  112073. editor.nodeChanged();
  112074. }
  112075. });
  112076. };
  112077. var addKeyboardShortcuts = function (editor) {
  112078. editor.addShortcut('meta+z', '', 'Undo');
  112079. editor.addShortcut('meta+y,meta+shift+z', '', 'Redo');
  112080. };
  112081. var UndoManager = function (editor) {
  112082. var beforeBookmark = value();
  112083. var locks = Cell(0);
  112084. var index = Cell(0);
  112085. var undoManager = {
  112086. data: [],
  112087. typing: false,
  112088. beforeChange: function () {
  112089. beforeChange(editor, locks, beforeBookmark);
  112090. },
  112091. add: function (level, event) {
  112092. return addUndoLevel(editor, undoManager, index, locks, beforeBookmark, level, event);
  112093. },
  112094. undo: function () {
  112095. return undo(editor, undoManager, locks, index);
  112096. },
  112097. redo: function () {
  112098. return redo(editor, index, undoManager.data);
  112099. },
  112100. clear: function () {
  112101. clear(editor, undoManager, index);
  112102. },
  112103. reset: function () {
  112104. reset(editor, undoManager);
  112105. },
  112106. hasUndo: function () {
  112107. return hasUndo(editor, undoManager, index);
  112108. },
  112109. hasRedo: function () {
  112110. return hasRedo(editor, undoManager, index);
  112111. },
  112112. transact: function (callback) {
  112113. return transact(editor, undoManager, locks, callback);
  112114. },
  112115. ignore: function (callback) {
  112116. ignore(editor, locks, callback);
  112117. },
  112118. extra: function (callback1, callback2) {
  112119. extra(editor, undoManager, index, callback1, callback2);
  112120. }
  112121. };
  112122. if (!isRtc(editor)) {
  112123. registerEvents(editor, undoManager, locks);
  112124. }
  112125. addKeyboardShortcuts(editor);
  112126. return undoManager;
  112127. };
  112128. var nonTypingKeycodes = [
  112129. 9,
  112130. 27,
  112131. VK.HOME,
  112132. VK.END,
  112133. 19,
  112134. 20,
  112135. 44,
  112136. 144,
  112137. 145,
  112138. 33,
  112139. 34,
  112140. 45,
  112141. 16,
  112142. 17,
  112143. 18,
  112144. 91,
  112145. 92,
  112146. 93,
  112147. VK.DOWN,
  112148. VK.UP,
  112149. VK.LEFT,
  112150. VK.RIGHT
  112151. ].concat(Env.browser.isFirefox() ? [224] : []);
  112152. var placeholderAttr = 'data-mce-placeholder';
  112153. var isKeyboardEvent = function (e) {
  112154. return e.type === 'keydown' || e.type === 'keyup';
  112155. };
  112156. var isDeleteEvent = function (e) {
  112157. var keyCode = e.keyCode;
  112158. return keyCode === VK.BACKSPACE || keyCode === VK.DELETE;
  112159. };
  112160. var isNonTypingKeyboardEvent = function (e) {
  112161. if (isKeyboardEvent(e)) {
  112162. var keyCode = e.keyCode;
  112163. return !isDeleteEvent(e) && (VK.metaKeyPressed(e) || e.altKey || keyCode >= 112 && keyCode <= 123 || contains$3(nonTypingKeycodes, keyCode));
  112164. } else {
  112165. return false;
  112166. }
  112167. };
  112168. var isTypingKeyboardEvent = function (e) {
  112169. return isKeyboardEvent(e) && !(isDeleteEvent(e) || e.type === 'keyup' && e.keyCode === 229);
  112170. };
  112171. var isVisuallyEmpty = function (dom, rootElm, forcedRootBlock) {
  112172. if (isEmpty$2(SugarElement.fromDom(rootElm), false)) {
  112173. var isForcedRootBlockFalse = forcedRootBlock === '';
  112174. var firstElement = rootElm.firstElementChild;
  112175. if (!firstElement) {
  112176. return true;
  112177. } else if (dom.getStyle(rootElm.firstElementChild, 'padding-left') || dom.getStyle(rootElm.firstElementChild, 'padding-right')) {
  112178. return false;
  112179. } else {
  112180. return isForcedRootBlockFalse ? !dom.isBlock(firstElement) : forcedRootBlock === firstElement.nodeName.toLowerCase();
  112181. }
  112182. } else {
  112183. return false;
  112184. }
  112185. };
  112186. var setup$g = function (editor) {
  112187. var dom = editor.dom;
  112188. var rootBlock = getForcedRootBlock(editor);
  112189. var placeholder = getPlaceholder(editor);
  112190. var updatePlaceholder = function (e, initial) {
  112191. if (isNonTypingKeyboardEvent(e)) {
  112192. return;
  112193. }
  112194. var body = editor.getBody();
  112195. var showPlaceholder = isTypingKeyboardEvent(e) ? false : isVisuallyEmpty(dom, body, rootBlock);
  112196. var isPlaceholderShown = dom.getAttrib(body, placeholderAttr) !== '';
  112197. if (isPlaceholderShown !== showPlaceholder || initial) {
  112198. dom.setAttrib(body, placeholderAttr, showPlaceholder ? placeholder : null);
  112199. dom.setAttrib(body, 'aria-placeholder', showPlaceholder ? placeholder : null);
  112200. firePlaceholderToggle(editor, showPlaceholder);
  112201. editor.on(showPlaceholder ? 'keydown' : 'keyup', updatePlaceholder);
  112202. editor.off(showPlaceholder ? 'keyup' : 'keydown', updatePlaceholder);
  112203. }
  112204. };
  112205. if (placeholder) {
  112206. editor.on('init', function (e) {
  112207. updatePlaceholder(e, true);
  112208. editor.on('change SetContent ExecCommand', updatePlaceholder);
  112209. editor.on('paste', function (e) {
  112210. return Delay.setEditorTimeout(editor, function () {
  112211. return updatePlaceholder(e);
  112212. });
  112213. });
  112214. });
  112215. }
  112216. };
  112217. var strongRtl = /[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/;
  112218. var hasStrongRtl = function (text) {
  112219. return strongRtl.test(text);
  112220. };
  112221. var isInlineTarget = function (editor, elm) {
  112222. return is$2(SugarElement.fromDom(elm), getInlineBoundarySelector(editor));
  112223. };
  112224. var isRtl = function (element) {
  112225. return DOMUtils.DOM.getStyle(element, 'direction', true) === 'rtl' || hasStrongRtl(element.textContent);
  112226. };
  112227. var findInlineParents = function (isInlineTarget, rootNode, pos) {
  112228. return filter$4(DOMUtils.DOM.getParents(pos.container(), '*', rootNode), isInlineTarget);
  112229. };
  112230. var findRootInline = function (isInlineTarget, rootNode, pos) {
  112231. var parents = findInlineParents(isInlineTarget, rootNode, pos);
  112232. return Optional.from(parents[parents.length - 1]);
  112233. };
  112234. var hasSameParentBlock = function (rootNode, node1, node2) {
  112235. var block1 = getParentBlock$2(node1, rootNode);
  112236. var block2 = getParentBlock$2(node2, rootNode);
  112237. return block1 && block1 === block2;
  112238. };
  112239. var isAtZwsp = function (pos) {
  112240. return isBeforeInline(pos) || isAfterInline(pos);
  112241. };
  112242. var normalizePosition = function (forward, pos) {
  112243. if (!pos) {
  112244. return pos;
  112245. }
  112246. var container = pos.container(), offset = pos.offset();
  112247. if (forward) {
  112248. if (isCaretContainerInline(container)) {
  112249. if (isText$7(container.nextSibling)) {
  112250. return CaretPosition(container.nextSibling, 0);
  112251. } else {
  112252. return CaretPosition.after(container);
  112253. }
  112254. } else {
  112255. return isBeforeInline(pos) ? CaretPosition(container, offset + 1) : pos;
  112256. }
  112257. } else {
  112258. if (isCaretContainerInline(container)) {
  112259. if (isText$7(container.previousSibling)) {
  112260. return CaretPosition(container.previousSibling, container.previousSibling.data.length);
  112261. } else {
  112262. return CaretPosition.before(container);
  112263. }
  112264. } else {
  112265. return isAfterInline(pos) ? CaretPosition(container, offset - 1) : pos;
  112266. }
  112267. }
  112268. };
  112269. var normalizeForwards = curry(normalizePosition, true);
  112270. var normalizeBackwards = curry(normalizePosition, false);
  112271. var isBeforeRoot = function (rootNode) {
  112272. return function (elm) {
  112273. return eq(rootNode, SugarElement.fromDom(elm.dom.parentNode));
  112274. };
  112275. };
  112276. var isTextBlockOrListItem = function (element) {
  112277. return isTextBlock$2(element) || isListItem(element);
  112278. };
  112279. var getParentBlock$1 = function (rootNode, elm) {
  112280. if (contains$1(rootNode, elm)) {
  112281. return closest$3(elm, isTextBlockOrListItem, isBeforeRoot(rootNode));
  112282. } else {
  112283. return Optional.none();
  112284. }
  112285. };
  112286. var placeCaretInEmptyBody = function (editor) {
  112287. var body = editor.getBody();
  112288. var node = body.firstChild && editor.dom.isBlock(body.firstChild) ? body.firstChild : body;
  112289. editor.selection.setCursorLocation(node, 0);
  112290. };
  112291. var paddEmptyBody = function (editor) {
  112292. if (editor.dom.isEmpty(editor.getBody())) {
  112293. editor.setContent('');
  112294. placeCaretInEmptyBody(editor);
  112295. }
  112296. };
  112297. var willDeleteLastPositionInElement = function (forward, fromPos, elm) {
  112298. return lift2(firstPositionIn(elm), lastPositionIn(elm), function (firstPos, lastPos) {
  112299. var normalizedFirstPos = normalizePosition(true, firstPos);
  112300. var normalizedLastPos = normalizePosition(false, lastPos);
  112301. var normalizedFromPos = normalizePosition(false, fromPos);
  112302. if (forward) {
  112303. return nextPosition(elm, normalizedFromPos).exists(function (nextPos) {
  112304. return nextPos.isEqual(normalizedLastPos) && fromPos.isEqual(normalizedFirstPos);
  112305. });
  112306. } else {
  112307. return prevPosition(elm, normalizedFromPos).exists(function (prevPos) {
  112308. return prevPos.isEqual(normalizedFirstPos) && fromPos.isEqual(normalizedLastPos);
  112309. });
  112310. }
  112311. }).getOr(true);
  112312. };
  112313. var blockPosition = function (block, position) {
  112314. return {
  112315. block: block,
  112316. position: position
  112317. };
  112318. };
  112319. var blockBoundary = function (from, to) {
  112320. return {
  112321. from: from,
  112322. to: to
  112323. };
  112324. };
  112325. var getBlockPosition = function (rootNode, pos) {
  112326. var rootElm = SugarElement.fromDom(rootNode);
  112327. var containerElm = SugarElement.fromDom(pos.container());
  112328. return getParentBlock$1(rootElm, containerElm).map(function (block) {
  112329. return blockPosition(block, pos);
  112330. });
  112331. };
  112332. var isDifferentBlocks = function (blockBoundary) {
  112333. return eq(blockBoundary.from.block, blockBoundary.to.block) === false;
  112334. };
  112335. var hasSameParent = function (blockBoundary) {
  112336. return parent(blockBoundary.from.block).bind(function (parent1) {
  112337. return parent(blockBoundary.to.block).filter(function (parent2) {
  112338. return eq(parent1, parent2);
  112339. });
  112340. }).isSome();
  112341. };
  112342. var isEditable$1 = function (blockBoundary) {
  112343. return isContentEditableFalse$b(blockBoundary.from.block.dom) === false && isContentEditableFalse$b(blockBoundary.to.block.dom) === false;
  112344. };
  112345. var skipLastBr = function (rootNode, forward, blockPosition) {
  112346. if (isBr$5(blockPosition.position.getNode()) && isEmpty$2(blockPosition.block) === false) {
  112347. return positionIn(false, blockPosition.block.dom).bind(function (lastPositionInBlock) {
  112348. if (lastPositionInBlock.isEqual(blockPosition.position)) {
  112349. return fromPosition(forward, rootNode, lastPositionInBlock).bind(function (to) {
  112350. return getBlockPosition(rootNode, to);
  112351. });
  112352. } else {
  112353. return Optional.some(blockPosition);
  112354. }
  112355. }).getOr(blockPosition);
  112356. } else {
  112357. return blockPosition;
  112358. }
  112359. };
  112360. var readFromRange = function (rootNode, forward, rng) {
  112361. var fromBlockPos = getBlockPosition(rootNode, CaretPosition.fromRangeStart(rng));
  112362. var toBlockPos = fromBlockPos.bind(function (blockPos) {
  112363. return fromPosition(forward, rootNode, blockPos.position).bind(function (to) {
  112364. return getBlockPosition(rootNode, to).map(function (blockPos) {
  112365. return skipLastBr(rootNode, forward, blockPos);
  112366. });
  112367. });
  112368. });
  112369. return lift2(fromBlockPos, toBlockPos, blockBoundary).filter(function (blockBoundary) {
  112370. return isDifferentBlocks(blockBoundary) && hasSameParent(blockBoundary) && isEditable$1(blockBoundary);
  112371. });
  112372. };
  112373. var read$1 = function (rootNode, forward, rng) {
  112374. return rng.collapsed ? readFromRange(rootNode, forward, rng) : Optional.none();
  112375. };
  112376. var getChildrenUntilBlockBoundary = function (block) {
  112377. var children$1 = children(block);
  112378. return findIndex$2(children$1, isBlock$2).fold(constant(children$1), function (index) {
  112379. return children$1.slice(0, index);
  112380. });
  112381. };
  112382. var extractChildren = function (block) {
  112383. var children = getChildrenUntilBlockBoundary(block);
  112384. each$k(children, remove$7);
  112385. return children;
  112386. };
  112387. var removeEmptyRoot = function (rootNode, block) {
  112388. var parents = parentsAndSelf(block, rootNode);
  112389. return find$3(parents.reverse(), function (element) {
  112390. return isEmpty$2(element);
  112391. }).each(remove$7);
  112392. };
  112393. var isEmptyBefore = function (el) {
  112394. return filter$4(prevSiblings(el), function (el) {
  112395. return !isEmpty$2(el);
  112396. }).length === 0;
  112397. };
  112398. var nestedBlockMerge = function (rootNode, fromBlock, toBlock, insertionPoint) {
  112399. if (isEmpty$2(toBlock)) {
  112400. fillWithPaddingBr(toBlock);
  112401. return firstPositionIn(toBlock.dom);
  112402. }
  112403. if (isEmptyBefore(insertionPoint) && isEmpty$2(fromBlock)) {
  112404. before$4(insertionPoint, SugarElement.fromTag('br'));
  112405. }
  112406. var position = prevPosition(toBlock.dom, CaretPosition.before(insertionPoint.dom));
  112407. each$k(extractChildren(fromBlock), function (child) {
  112408. before$4(insertionPoint, child);
  112409. });
  112410. removeEmptyRoot(rootNode, fromBlock);
  112411. return position;
  112412. };
  112413. var sidelongBlockMerge = function (rootNode, fromBlock, toBlock) {
  112414. if (isEmpty$2(toBlock)) {
  112415. remove$7(toBlock);
  112416. if (isEmpty$2(fromBlock)) {
  112417. fillWithPaddingBr(fromBlock);
  112418. }
  112419. return firstPositionIn(fromBlock.dom);
  112420. }
  112421. var position = lastPositionIn(toBlock.dom);
  112422. each$k(extractChildren(fromBlock), function (child) {
  112423. append$1(toBlock, child);
  112424. });
  112425. removeEmptyRoot(rootNode, fromBlock);
  112426. return position;
  112427. };
  112428. var findInsertionPoint = function (toBlock, block) {
  112429. var parentsAndSelf$1 = parentsAndSelf(block, toBlock);
  112430. return Optional.from(parentsAndSelf$1[parentsAndSelf$1.length - 1]);
  112431. };
  112432. var getInsertionPoint = function (fromBlock, toBlock) {
  112433. return contains$1(toBlock, fromBlock) ? findInsertionPoint(toBlock, fromBlock) : Optional.none();
  112434. };
  112435. var trimBr = function (first, block) {
  112436. positionIn(first, block.dom).map(function (position) {
  112437. return position.getNode();
  112438. }).map(SugarElement.fromDom).filter(isBr$4).each(remove$7);
  112439. };
  112440. var mergeBlockInto = function (rootNode, fromBlock, toBlock) {
  112441. trimBr(true, fromBlock);
  112442. trimBr(false, toBlock);
  112443. return getInsertionPoint(fromBlock, toBlock).fold(curry(sidelongBlockMerge, rootNode, fromBlock, toBlock), curry(nestedBlockMerge, rootNode, fromBlock, toBlock));
  112444. };
  112445. var mergeBlocks = function (rootNode, forward, block1, block2) {
  112446. return forward ? mergeBlockInto(rootNode, block2, block1) : mergeBlockInto(rootNode, block1, block2);
  112447. };
  112448. var backspaceDelete$8 = function (editor, forward) {
  112449. var rootNode = SugarElement.fromDom(editor.getBody());
  112450. var position = read$1(rootNode.dom, forward, editor.selection.getRng()).bind(function (blockBoundary) {
  112451. return mergeBlocks(rootNode, forward, blockBoundary.from.block, blockBoundary.to.block);
  112452. });
  112453. position.each(function (pos) {
  112454. editor.selection.setRng(pos.toRange());
  112455. });
  112456. return position.isSome();
  112457. };
  112458. var deleteRangeMergeBlocks = function (rootNode, selection) {
  112459. var rng = selection.getRng();
  112460. return lift2(getParentBlock$1(rootNode, SugarElement.fromDom(rng.startContainer)), getParentBlock$1(rootNode, SugarElement.fromDom(rng.endContainer)), function (block1, block2) {
  112461. if (eq(block1, block2) === false) {
  112462. rng.deleteContents();
  112463. mergeBlocks(rootNode, true, block1, block2).each(function (pos) {
  112464. selection.setRng(pos.toRange());
  112465. });
  112466. return true;
  112467. } else {
  112468. return false;
  112469. }
  112470. }).getOr(false);
  112471. };
  112472. var isRawNodeInTable = function (root, rawNode) {
  112473. var node = SugarElement.fromDom(rawNode);
  112474. var isRoot = curry(eq, root);
  112475. return ancestor$3(node, isTableCell$4, isRoot).isSome();
  112476. };
  112477. var isSelectionInTable = function (root, rng) {
  112478. return isRawNodeInTable(root, rng.startContainer) || isRawNodeInTable(root, rng.endContainer);
  112479. };
  112480. var isEverythingSelected = function (root, rng) {
  112481. var noPrevious = prevPosition(root.dom, CaretPosition.fromRangeStart(rng)).isNone();
  112482. var noNext = nextPosition(root.dom, CaretPosition.fromRangeEnd(rng)).isNone();
  112483. return !isSelectionInTable(root, rng) && noPrevious && noNext;
  112484. };
  112485. var emptyEditor = function (editor) {
  112486. editor.setContent('');
  112487. editor.selection.setCursorLocation();
  112488. return true;
  112489. };
  112490. var deleteRange$1 = function (editor) {
  112491. var rootNode = SugarElement.fromDom(editor.getBody());
  112492. var rng = editor.selection.getRng();
  112493. return isEverythingSelected(rootNode, rng) ? emptyEditor(editor) : deleteRangeMergeBlocks(rootNode, editor.selection);
  112494. };
  112495. var backspaceDelete$7 = function (editor, _forward) {
  112496. return editor.selection.isCollapsed() ? false : deleteRange$1(editor);
  112497. };
  112498. var isContentEditableTrue$2 = isContentEditableTrue$4;
  112499. var isContentEditableFalse$4 = isContentEditableFalse$b;
  112500. var showCaret = function (direction, editor, node, before, scrollIntoView) {
  112501. return Optional.from(editor._selectionOverrides.showCaret(direction, node, before, scrollIntoView));
  112502. };
  112503. var getNodeRange = function (node) {
  112504. var rng = node.ownerDocument.createRange();
  112505. rng.selectNode(node);
  112506. return rng;
  112507. };
  112508. var selectNode = function (editor, node) {
  112509. var e = editor.fire('BeforeObjectSelected', { target: node });
  112510. if (e.isDefaultPrevented()) {
  112511. return Optional.none();
  112512. }
  112513. return Optional.some(getNodeRange(node));
  112514. };
  112515. var renderCaretAtRange = function (editor, range, scrollIntoView) {
  112516. var normalizedRange = normalizeRange(1, editor.getBody(), range);
  112517. var caretPosition = CaretPosition.fromRangeStart(normalizedRange);
  112518. var caretPositionNode = caretPosition.getNode();
  112519. if (isInlineFakeCaretTarget(caretPositionNode)) {
  112520. return showCaret(1, editor, caretPositionNode, !caretPosition.isAtEnd(), false);
  112521. }
  112522. var caretPositionBeforeNode = caretPosition.getNode(true);
  112523. if (isInlineFakeCaretTarget(caretPositionBeforeNode)) {
  112524. return showCaret(1, editor, caretPositionBeforeNode, false, false);
  112525. }
  112526. var ceRoot = editor.dom.getParent(caretPosition.getNode(), function (node) {
  112527. return isContentEditableFalse$4(node) || isContentEditableTrue$2(node);
  112528. });
  112529. if (isInlineFakeCaretTarget(ceRoot)) {
  112530. return showCaret(1, editor, ceRoot, false, scrollIntoView);
  112531. }
  112532. return Optional.none();
  112533. };
  112534. var renderRangeCaret = function (editor, range, scrollIntoView) {
  112535. return range.collapsed ? renderCaretAtRange(editor, range, scrollIntoView).getOr(range) : range;
  112536. };
  112537. var isBeforeBoundary = function (pos) {
  112538. return isBeforeContentEditableFalse(pos) || isBeforeMedia(pos);
  112539. };
  112540. var isAfterBoundary = function (pos) {
  112541. return isAfterContentEditableFalse(pos) || isAfterMedia(pos);
  112542. };
  112543. var trimEmptyTextNode = function (dom, node) {
  112544. if (isText$7(node) && node.data.length === 0) {
  112545. dom.remove(node);
  112546. }
  112547. };
  112548. var deleteContentAndShowCaret = function (editor, range, node, direction, forward, peekCaretPosition) {
  112549. showCaret(direction, editor, peekCaretPosition.getNode(!forward), forward, true).each(function (caretRange) {
  112550. if (range.collapsed) {
  112551. var deleteRange = range.cloneRange();
  112552. if (forward) {
  112553. deleteRange.setEnd(caretRange.startContainer, caretRange.startOffset);
  112554. } else {
  112555. deleteRange.setStart(caretRange.endContainer, caretRange.endOffset);
  112556. }
  112557. deleteRange.deleteContents();
  112558. } else {
  112559. range.deleteContents();
  112560. }
  112561. editor.selection.setRng(caretRange);
  112562. });
  112563. trimEmptyTextNode(editor.dom, node);
  112564. return true;
  112565. };
  112566. var deleteBoundaryText = function (editor, forward) {
  112567. var range = editor.selection.getRng();
  112568. if (!isText$7(range.commonAncestorContainer)) {
  112569. return false;
  112570. }
  112571. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  112572. var caretWalker = CaretWalker(editor.getBody());
  112573. var getNextPosFn = curry(getVisualCaretPosition, forward ? caretWalker.next : caretWalker.prev);
  112574. var isBeforeFn = forward ? isBeforeBoundary : isAfterBoundary;
  112575. var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
  112576. var nextCaretPosition = normalizePosition(forward, getNextPosFn(caretPosition));
  112577. if (!nextCaretPosition || !isMoveInsideSameBlock(caretPosition, nextCaretPosition)) {
  112578. return false;
  112579. } else if (isBeforeFn(nextCaretPosition)) {
  112580. return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, nextCaretPosition);
  112581. }
  112582. var peekCaretPosition = getNextPosFn(nextCaretPosition);
  112583. if (peekCaretPosition && isBeforeFn(peekCaretPosition)) {
  112584. if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) {
  112585. return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, peekCaretPosition);
  112586. }
  112587. }
  112588. return false;
  112589. };
  112590. var backspaceDelete$6 = function (editor, forward) {
  112591. return deleteBoundaryText(editor, forward);
  112592. };
  112593. var isCompoundElement = function (node) {
  112594. return isTableCell$4(SugarElement.fromDom(node)) || isListItem(SugarElement.fromDom(node));
  112595. };
  112596. var DeleteAction = Adt.generate([
  112597. { remove: ['element'] },
  112598. { moveToElement: ['element'] },
  112599. { moveToPosition: ['position'] }
  112600. ]);
  112601. var isAtContentEditableBlockCaret = function (forward, from) {
  112602. var elm = from.getNode(forward === false);
  112603. var caretLocation = forward ? 'after' : 'before';
  112604. return isElement$5(elm) && elm.getAttribute('data-mce-caret') === caretLocation;
  112605. };
  112606. var isDeleteFromCefDifferentBlocks = function (root, forward, from, to) {
  112607. var inSameBlock = function (elm) {
  112608. return isInline$1(SugarElement.fromDom(elm)) && !isInSameBlock(from, to, root);
  112609. };
  112610. return getRelativeCefElm(!forward, from).fold(function () {
  112611. return getRelativeCefElm(forward, to).fold(never, inSameBlock);
  112612. }, inSameBlock);
  112613. };
  112614. var deleteEmptyBlockOrMoveToCef = function (root, forward, from, to) {
  112615. var toCefElm = to.getNode(forward === false);
  112616. return getParentBlock$1(SugarElement.fromDom(root), SugarElement.fromDom(from.getNode())).map(function (blockElm) {
  112617. return isEmpty$2(blockElm) ? DeleteAction.remove(blockElm.dom) : DeleteAction.moveToElement(toCefElm);
  112618. }).orThunk(function () {
  112619. return Optional.some(DeleteAction.moveToElement(toCefElm));
  112620. });
  112621. };
  112622. var findCefPosition = function (root, forward, from) {
  112623. return fromPosition(forward, root, from).bind(function (to) {
  112624. if (isCompoundElement(to.getNode())) {
  112625. return Optional.none();
  112626. } else if (isDeleteFromCefDifferentBlocks(root, forward, from, to)) {
  112627. return Optional.none();
  112628. } else if (forward && isContentEditableFalse$b(to.getNode())) {
  112629. return deleteEmptyBlockOrMoveToCef(root, forward, from, to);
  112630. } else if (forward === false && isContentEditableFalse$b(to.getNode(true))) {
  112631. return deleteEmptyBlockOrMoveToCef(root, forward, from, to);
  112632. } else if (forward && isAfterContentEditableFalse(from)) {
  112633. return Optional.some(DeleteAction.moveToPosition(to));
  112634. } else if (forward === false && isBeforeContentEditableFalse(from)) {
  112635. return Optional.some(DeleteAction.moveToPosition(to));
  112636. } else {
  112637. return Optional.none();
  112638. }
  112639. });
  112640. };
  112641. var getContentEditableBlockAction = function (forward, elm) {
  112642. if (forward && isContentEditableFalse$b(elm.nextSibling)) {
  112643. return Optional.some(DeleteAction.moveToElement(elm.nextSibling));
  112644. } else if (forward === false && isContentEditableFalse$b(elm.previousSibling)) {
  112645. return Optional.some(DeleteAction.moveToElement(elm.previousSibling));
  112646. } else {
  112647. return Optional.none();
  112648. }
  112649. };
  112650. var skipMoveToActionFromInlineCefToContent = function (root, from, deleteAction) {
  112651. return deleteAction.fold(function (elm) {
  112652. return Optional.some(DeleteAction.remove(elm));
  112653. }, function (elm) {
  112654. return Optional.some(DeleteAction.moveToElement(elm));
  112655. }, function (to) {
  112656. if (isInSameBlock(from, to, root)) {
  112657. return Optional.none();
  112658. } else {
  112659. return Optional.some(DeleteAction.moveToPosition(to));
  112660. }
  112661. });
  112662. };
  112663. var getContentEditableAction = function (root, forward, from) {
  112664. if (isAtContentEditableBlockCaret(forward, from)) {
  112665. return getContentEditableBlockAction(forward, from.getNode(forward === false)).fold(function () {
  112666. return findCefPosition(root, forward, from);
  112667. }, Optional.some);
  112668. } else {
  112669. return findCefPosition(root, forward, from).bind(function (deleteAction) {
  112670. return skipMoveToActionFromInlineCefToContent(root, from, deleteAction);
  112671. });
  112672. }
  112673. };
  112674. var read = function (root, forward, rng) {
  112675. var normalizedRange = normalizeRange(forward ? 1 : -1, root, rng);
  112676. var from = CaretPosition.fromRangeStart(normalizedRange);
  112677. var rootElement = SugarElement.fromDom(root);
  112678. if (forward === false && isAfterContentEditableFalse(from)) {
  112679. return Optional.some(DeleteAction.remove(from.getNode(true)));
  112680. } else if (forward && isBeforeContentEditableFalse(from)) {
  112681. return Optional.some(DeleteAction.remove(from.getNode()));
  112682. } else if (forward === false && isBeforeContentEditableFalse(from) && isAfterBr(rootElement, from)) {
  112683. return findPreviousBr(rootElement, from).map(function (br) {
  112684. return DeleteAction.remove(br.getNode());
  112685. });
  112686. } else if (forward && isAfterContentEditableFalse(from) && isBeforeBr$1(rootElement, from)) {
  112687. return findNextBr(rootElement, from).map(function (br) {
  112688. return DeleteAction.remove(br.getNode());
  112689. });
  112690. } else {
  112691. return getContentEditableAction(root, forward, from);
  112692. }
  112693. };
  112694. var deleteElement$1 = function (editor, forward) {
  112695. return function (element) {
  112696. editor._selectionOverrides.hideFakeCaret();
  112697. deleteElement$2(editor, forward, SugarElement.fromDom(element));
  112698. return true;
  112699. };
  112700. };
  112701. var moveToElement = function (editor, forward) {
  112702. return function (element) {
  112703. var pos = forward ? CaretPosition.before(element) : CaretPosition.after(element);
  112704. editor.selection.setRng(pos.toRange());
  112705. return true;
  112706. };
  112707. };
  112708. var moveToPosition = function (editor) {
  112709. return function (pos) {
  112710. editor.selection.setRng(pos.toRange());
  112711. return true;
  112712. };
  112713. };
  112714. var getAncestorCe = function (editor, node) {
  112715. return Optional.from(getContentEditableRoot$1(editor.getBody(), node));
  112716. };
  112717. var backspaceDeleteCaret = function (editor, forward) {
  112718. var selectedNode = editor.selection.getNode();
  112719. return getAncestorCe(editor, selectedNode).filter(isContentEditableFalse$b).fold(function () {
  112720. return read(editor.getBody(), forward, editor.selection.getRng()).exists(function (deleteAction) {
  112721. return deleteAction.fold(deleteElement$1(editor, forward), moveToElement(editor, forward), moveToPosition(editor));
  112722. });
  112723. }, always);
  112724. };
  112725. var deleteOffscreenSelection = function (rootElement) {
  112726. each$k(descendants(rootElement, '.mce-offscreen-selection'), remove$7);
  112727. };
  112728. var backspaceDeleteRange = function (editor, forward) {
  112729. var selectedNode = editor.selection.getNode();
  112730. if (isContentEditableFalse$b(selectedNode) && !isTableCell$5(selectedNode)) {
  112731. var hasCefAncestor = getAncestorCe(editor, selectedNode.parentNode).filter(isContentEditableFalse$b);
  112732. return hasCefAncestor.fold(function () {
  112733. deleteOffscreenSelection(SugarElement.fromDom(editor.getBody()));
  112734. deleteElement$2(editor, forward, SugarElement.fromDom(editor.selection.getNode()));
  112735. paddEmptyBody(editor);
  112736. return true;
  112737. }, always);
  112738. }
  112739. return false;
  112740. };
  112741. var paddEmptyElement = function (editor) {
  112742. var dom = editor.dom, selection = editor.selection;
  112743. var ceRoot = getContentEditableRoot$1(editor.getBody(), selection.getNode());
  112744. if (isContentEditableTrue$4(ceRoot) && dom.isBlock(ceRoot) && dom.isEmpty(ceRoot)) {
  112745. var br = dom.create('br', { 'data-mce-bogus': '1' });
  112746. dom.setHTML(ceRoot, '');
  112747. ceRoot.appendChild(br);
  112748. selection.setRng(CaretPosition.before(br).toRange());
  112749. }
  112750. return true;
  112751. };
  112752. var backspaceDelete$5 = function (editor, forward) {
  112753. if (editor.selection.isCollapsed()) {
  112754. return backspaceDeleteCaret(editor, forward);
  112755. } else {
  112756. return backspaceDeleteRange(editor, forward);
  112757. }
  112758. };
  112759. var deleteCaret$2 = function (editor, forward) {
  112760. var fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());
  112761. return fromPosition(forward, editor.getBody(), fromPos).filter(function (pos) {
  112762. return forward ? isBeforeImageBlock(pos) : isAfterImageBlock(pos);
  112763. }).bind(function (pos) {
  112764. return Optional.from(getChildNodeAtRelativeOffset(forward ? 0 : -1, pos));
  112765. }).exists(function (elm) {
  112766. editor.selection.select(elm);
  112767. return true;
  112768. });
  112769. };
  112770. var backspaceDelete$4 = function (editor, forward) {
  112771. return editor.selection.isCollapsed() ? deleteCaret$2(editor, forward) : false;
  112772. };
  112773. var isText = isText$7;
  112774. var startsWithCaretContainer = function (node) {
  112775. return isText(node) && node.data[0] === ZWSP$1;
  112776. };
  112777. var endsWithCaretContainer = function (node) {
  112778. return isText(node) && node.data[node.data.length - 1] === ZWSP$1;
  112779. };
  112780. var createZwsp = function (node) {
  112781. return node.ownerDocument.createTextNode(ZWSP$1);
  112782. };
  112783. var insertBefore = function (node) {
  112784. if (isText(node.previousSibling)) {
  112785. if (endsWithCaretContainer(node.previousSibling)) {
  112786. return node.previousSibling;
  112787. } else {
  112788. node.previousSibling.appendData(ZWSP$1);
  112789. return node.previousSibling;
  112790. }
  112791. } else if (isText(node)) {
  112792. if (startsWithCaretContainer(node)) {
  112793. return node;
  112794. } else {
  112795. node.insertData(0, ZWSP$1);
  112796. return node;
  112797. }
  112798. } else {
  112799. var newNode = createZwsp(node);
  112800. node.parentNode.insertBefore(newNode, node);
  112801. return newNode;
  112802. }
  112803. };
  112804. var insertAfter = function (node) {
  112805. if (isText(node.nextSibling)) {
  112806. if (startsWithCaretContainer(node.nextSibling)) {
  112807. return node.nextSibling;
  112808. } else {
  112809. node.nextSibling.insertData(0, ZWSP$1);
  112810. return node.nextSibling;
  112811. }
  112812. } else if (isText(node)) {
  112813. if (endsWithCaretContainer(node)) {
  112814. return node;
  112815. } else {
  112816. node.appendData(ZWSP$1);
  112817. return node;
  112818. }
  112819. } else {
  112820. var newNode = createZwsp(node);
  112821. if (node.nextSibling) {
  112822. node.parentNode.insertBefore(newNode, node.nextSibling);
  112823. } else {
  112824. node.parentNode.appendChild(newNode);
  112825. }
  112826. return newNode;
  112827. }
  112828. };
  112829. var insertInline = function (before, node) {
  112830. return before ? insertBefore(node) : insertAfter(node);
  112831. };
  112832. var insertInlineBefore = curry(insertInline, true);
  112833. var insertInlineAfter = curry(insertInline, false);
  112834. var insertInlinePos = function (pos, before) {
  112835. if (isText$7(pos.container())) {
  112836. return insertInline(before, pos.container());
  112837. } else {
  112838. return insertInline(before, pos.getNode());
  112839. }
  112840. };
  112841. var isPosCaretContainer = function (pos, caret) {
  112842. var caretNode = caret.get();
  112843. return caretNode && pos.container() === caretNode && isCaretContainerInline(caretNode);
  112844. };
  112845. var renderCaret = function (caret, location) {
  112846. return location.fold(function (element) {
  112847. remove$2(caret.get());
  112848. var text = insertInlineBefore(element);
  112849. caret.set(text);
  112850. return Optional.some(CaretPosition(text, text.length - 1));
  112851. }, function (element) {
  112852. return firstPositionIn(element).map(function (pos) {
  112853. if (!isPosCaretContainer(pos, caret)) {
  112854. remove$2(caret.get());
  112855. var text = insertInlinePos(pos, true);
  112856. caret.set(text);
  112857. return CaretPosition(text, 1);
  112858. } else {
  112859. return CaretPosition(caret.get(), 1);
  112860. }
  112861. });
  112862. }, function (element) {
  112863. return lastPositionIn(element).map(function (pos) {
  112864. if (!isPosCaretContainer(pos, caret)) {
  112865. remove$2(caret.get());
  112866. var text = insertInlinePos(pos, false);
  112867. caret.set(text);
  112868. return CaretPosition(text, text.length - 1);
  112869. } else {
  112870. return CaretPosition(caret.get(), caret.get().length - 1);
  112871. }
  112872. });
  112873. }, function (element) {
  112874. remove$2(caret.get());
  112875. var text = insertInlineAfter(element);
  112876. caret.set(text);
  112877. return Optional.some(CaretPosition(text, 1));
  112878. });
  112879. };
  112880. var evaluateUntil = function (fns, args) {
  112881. for (var i = 0; i < fns.length; i++) {
  112882. var result = fns[i].apply(null, args);
  112883. if (result.isSome()) {
  112884. return result;
  112885. }
  112886. }
  112887. return Optional.none();
  112888. };
  112889. var Location = Adt.generate([
  112890. { before: ['element'] },
  112891. { start: ['element'] },
  112892. { end: ['element'] },
  112893. { after: ['element'] }
  112894. ]);
  112895. var rescope$1 = function (rootNode, node) {
  112896. var parentBlock = getParentBlock$2(node, rootNode);
  112897. return parentBlock ? parentBlock : rootNode;
  112898. };
  112899. var before = function (isInlineTarget, rootNode, pos) {
  112900. var nPos = normalizeForwards(pos);
  112901. var scope = rescope$1(rootNode, nPos.container());
  112902. return findRootInline(isInlineTarget, scope, nPos).fold(function () {
  112903. return nextPosition(scope, nPos).bind(curry(findRootInline, isInlineTarget, scope)).map(function (inline) {
  112904. return Location.before(inline);
  112905. });
  112906. }, Optional.none);
  112907. };
  112908. var isNotInsideFormatCaretContainer = function (rootNode, elm) {
  112909. return getParentCaretContainer(rootNode, elm) === null;
  112910. };
  112911. var findInsideRootInline = function (isInlineTarget, rootNode, pos) {
  112912. return findRootInline(isInlineTarget, rootNode, pos).filter(curry(isNotInsideFormatCaretContainer, rootNode));
  112913. };
  112914. var start$1 = function (isInlineTarget, rootNode, pos) {
  112915. var nPos = normalizeBackwards(pos);
  112916. return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) {
  112917. var prevPos = prevPosition(inline, nPos);
  112918. return prevPos.isNone() ? Optional.some(Location.start(inline)) : Optional.none();
  112919. });
  112920. };
  112921. var end = function (isInlineTarget, rootNode, pos) {
  112922. var nPos = normalizeForwards(pos);
  112923. return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) {
  112924. var nextPos = nextPosition(inline, nPos);
  112925. return nextPos.isNone() ? Optional.some(Location.end(inline)) : Optional.none();
  112926. });
  112927. };
  112928. var after = function (isInlineTarget, rootNode, pos) {
  112929. var nPos = normalizeBackwards(pos);
  112930. var scope = rescope$1(rootNode, nPos.container());
  112931. return findRootInline(isInlineTarget, scope, nPos).fold(function () {
  112932. return prevPosition(scope, nPos).bind(curry(findRootInline, isInlineTarget, scope)).map(function (inline) {
  112933. return Location.after(inline);
  112934. });
  112935. }, Optional.none);
  112936. };
  112937. var isValidLocation = function (location) {
  112938. return isRtl(getElement(location)) === false;
  112939. };
  112940. var readLocation = function (isInlineTarget, rootNode, pos) {
  112941. var location = evaluateUntil([
  112942. before,
  112943. start$1,
  112944. end,
  112945. after
  112946. ], [
  112947. isInlineTarget,
  112948. rootNode,
  112949. pos
  112950. ]);
  112951. return location.filter(isValidLocation);
  112952. };
  112953. var getElement = function (location) {
  112954. return location.fold(identity, identity, identity, identity);
  112955. };
  112956. var getName = function (location) {
  112957. return location.fold(constant('before'), constant('start'), constant('end'), constant('after'));
  112958. };
  112959. var outside = function (location) {
  112960. return location.fold(Location.before, Location.before, Location.after, Location.after);
  112961. };
  112962. var inside = function (location) {
  112963. return location.fold(Location.start, Location.start, Location.end, Location.end);
  112964. };
  112965. var isEq = function (location1, location2) {
  112966. return getName(location1) === getName(location2) && getElement(location1) === getElement(location2);
  112967. };
  112968. var betweenInlines = function (forward, isInlineTarget, rootNode, from, to, location) {
  112969. return lift2(findRootInline(isInlineTarget, rootNode, from), findRootInline(isInlineTarget, rootNode, to), function (fromInline, toInline) {
  112970. if (fromInline !== toInline && hasSameParentBlock(rootNode, fromInline, toInline)) {
  112971. return Location.after(forward ? fromInline : toInline);
  112972. } else {
  112973. return location;
  112974. }
  112975. }).getOr(location);
  112976. };
  112977. var skipNoMovement = function (fromLocation, toLocation) {
  112978. return fromLocation.fold(always, function (fromLocation) {
  112979. return !isEq(fromLocation, toLocation);
  112980. });
  112981. };
  112982. var findLocationTraverse = function (forward, isInlineTarget, rootNode, fromLocation, pos) {
  112983. var from = normalizePosition(forward, pos);
  112984. var to = fromPosition(forward, rootNode, from).map(curry(normalizePosition, forward));
  112985. var location = to.fold(function () {
  112986. return fromLocation.map(outside);
  112987. }, function (to) {
  112988. return readLocation(isInlineTarget, rootNode, to).map(curry(betweenInlines, forward, isInlineTarget, rootNode, from, to)).filter(curry(skipNoMovement, fromLocation));
  112989. });
  112990. return location.filter(isValidLocation);
  112991. };
  112992. var findLocationSimple = function (forward, location) {
  112993. if (forward) {
  112994. return location.fold(compose(Optional.some, Location.start), Optional.none, compose(Optional.some, Location.after), Optional.none);
  112995. } else {
  112996. return location.fold(Optional.none, compose(Optional.some, Location.before), Optional.none, compose(Optional.some, Location.end));
  112997. }
  112998. };
  112999. var findLocation$1 = function (forward, isInlineTarget, rootNode, pos) {
  113000. var from = normalizePosition(forward, pos);
  113001. var fromLocation = readLocation(isInlineTarget, rootNode, from);
  113002. return readLocation(isInlineTarget, rootNode, from).bind(curry(findLocationSimple, forward)).orThunk(function () {
  113003. return findLocationTraverse(forward, isInlineTarget, rootNode, fromLocation, pos);
  113004. });
  113005. };
  113006. curry(findLocation$1, false);
  113007. curry(findLocation$1, true);
  113008. var hasSelectionModifyApi = function (editor) {
  113009. return isFunction(editor.selection.getSel().modify);
  113010. };
  113011. var moveRel = function (forward, selection, pos) {
  113012. var delta = forward ? 1 : -1;
  113013. selection.setRng(CaretPosition(pos.container(), pos.offset() + delta).toRange());
  113014. selection.getSel().modify('move', forward ? 'forward' : 'backward', 'word');
  113015. return true;
  113016. };
  113017. var moveByWord = function (forward, editor) {
  113018. var rng = editor.selection.getRng();
  113019. var pos = forward ? CaretPosition.fromRangeEnd(rng) : CaretPosition.fromRangeStart(rng);
  113020. if (!hasSelectionModifyApi(editor)) {
  113021. return false;
  113022. } else if (forward && isBeforeInline(pos)) {
  113023. return moveRel(true, editor.selection, pos);
  113024. } else if (!forward && isAfterInline(pos)) {
  113025. return moveRel(false, editor.selection, pos);
  113026. } else {
  113027. return false;
  113028. }
  113029. };
  113030. var BreakType;
  113031. (function (BreakType) {
  113032. BreakType[BreakType['Br'] = 0] = 'Br';
  113033. BreakType[BreakType['Block'] = 1] = 'Block';
  113034. BreakType[BreakType['Wrap'] = 2] = 'Wrap';
  113035. BreakType[BreakType['Eol'] = 3] = 'Eol';
  113036. }(BreakType || (BreakType = {})));
  113037. var flip = function (direction, positions) {
  113038. return direction === HDirection.Backwards ? reverse(positions) : positions;
  113039. };
  113040. var walk = function (direction, caretWalker, pos) {
  113041. return direction === HDirection.Forwards ? caretWalker.next(pos) : caretWalker.prev(pos);
  113042. };
  113043. var getBreakType = function (scope, direction, currentPos, nextPos) {
  113044. if (isBr$5(nextPos.getNode(direction === HDirection.Forwards))) {
  113045. return BreakType.Br;
  113046. } else if (isInSameBlock(currentPos, nextPos) === false) {
  113047. return BreakType.Block;
  113048. } else {
  113049. return BreakType.Wrap;
  113050. }
  113051. };
  113052. var getPositionsUntil = function (predicate, direction, scope, start) {
  113053. var caretWalker = CaretWalker(scope);
  113054. var currentPos = start;
  113055. var positions = [];
  113056. while (currentPos) {
  113057. var nextPos = walk(direction, caretWalker, currentPos);
  113058. if (!nextPos) {
  113059. break;
  113060. }
  113061. if (isBr$5(nextPos.getNode(false))) {
  113062. if (direction === HDirection.Forwards) {
  113063. return {
  113064. positions: flip(direction, positions).concat([nextPos]),
  113065. breakType: BreakType.Br,
  113066. breakAt: Optional.some(nextPos)
  113067. };
  113068. } else {
  113069. return {
  113070. positions: flip(direction, positions),
  113071. breakType: BreakType.Br,
  113072. breakAt: Optional.some(nextPos)
  113073. };
  113074. }
  113075. }
  113076. if (!nextPos.isVisible()) {
  113077. currentPos = nextPos;
  113078. continue;
  113079. }
  113080. if (predicate(currentPos, nextPos)) {
  113081. var breakType = getBreakType(scope, direction, currentPos, nextPos);
  113082. return {
  113083. positions: flip(direction, positions),
  113084. breakType: breakType,
  113085. breakAt: Optional.some(nextPos)
  113086. };
  113087. }
  113088. positions.push(nextPos);
  113089. currentPos = nextPos;
  113090. }
  113091. return {
  113092. positions: flip(direction, positions),
  113093. breakType: BreakType.Eol,
  113094. breakAt: Optional.none()
  113095. };
  113096. };
  113097. var getAdjacentLinePositions = function (direction, getPositionsUntilBreak, scope, start) {
  113098. return getPositionsUntilBreak(scope, start).breakAt.map(function (pos) {
  113099. var positions = getPositionsUntilBreak(scope, pos).positions;
  113100. return direction === HDirection.Backwards ? positions.concat(pos) : [pos].concat(positions);
  113101. }).getOr([]);
  113102. };
  113103. var findClosestHorizontalPositionFromPoint = function (positions, x) {
  113104. return foldl(positions, function (acc, newPos) {
  113105. return acc.fold(function () {
  113106. return Optional.some(newPos);
  113107. }, function (lastPos) {
  113108. return lift2(head(lastPos.getClientRects()), head(newPos.getClientRects()), function (lastRect, newRect) {
  113109. var lastDist = Math.abs(x - lastRect.left);
  113110. var newDist = Math.abs(x - newRect.left);
  113111. return newDist <= lastDist ? newPos : lastPos;
  113112. }).or(acc);
  113113. });
  113114. }, Optional.none());
  113115. };
  113116. var findClosestHorizontalPosition = function (positions, pos) {
  113117. return head(pos.getClientRects()).bind(function (targetRect) {
  113118. return findClosestHorizontalPositionFromPoint(positions, targetRect.left);
  113119. });
  113120. };
  113121. var getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1);
  113122. var getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1);
  113123. var getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine);
  113124. var getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine);
  113125. var isAtFirstLine = function (scope, pos) {
  113126. return getPositionsUntilPreviousLine(scope, pos).breakAt.isNone();
  113127. };
  113128. var isAtLastLine = function (scope, pos) {
  113129. return getPositionsUntilNextLine(scope, pos).breakAt.isNone();
  113130. };
  113131. var getFirstLinePositions = function (scope) {
  113132. return firstPositionIn(scope).map(function (pos) {
  113133. return [pos].concat(getPositionsUntilNextLine(scope, pos).positions);
  113134. }).getOr([]);
  113135. };
  113136. var getLastLinePositions = function (scope) {
  113137. return lastPositionIn(scope).map(function (pos) {
  113138. return getPositionsUntilPreviousLine(scope, pos).positions.concat(pos);
  113139. }).getOr([]);
  113140. };
  113141. var getNodeClientRects = function (node) {
  113142. var toArrayWithNode = function (clientRects) {
  113143. return map$3(clientRects, function (rect) {
  113144. var clientRect = clone(rect);
  113145. clientRect.node = node;
  113146. return clientRect;
  113147. });
  113148. };
  113149. if (isElement$5(node)) {
  113150. return toArrayWithNode(node.getClientRects());
  113151. }
  113152. if (isText$7(node)) {
  113153. var rng = node.ownerDocument.createRange();
  113154. rng.setStart(node, 0);
  113155. rng.setEnd(node, node.data.length);
  113156. return toArrayWithNode(rng.getClientRects());
  113157. }
  113158. };
  113159. var getClientRects = function (nodes) {
  113160. return bind(nodes, getNodeClientRects);
  113161. };
  113162. var VDirection;
  113163. (function (VDirection) {
  113164. VDirection[VDirection['Up'] = -1] = 'Up';
  113165. VDirection[VDirection['Down'] = 1] = 'Down';
  113166. }(VDirection || (VDirection = {})));
  113167. var findUntil = function (direction, root, predicateFn, node) {
  113168. while (node = findNode$1(node, direction, isEditableCaretCandidate$1, root)) {
  113169. if (predicateFn(node)) {
  113170. return;
  113171. }
  113172. }
  113173. };
  113174. var walkUntil$1 = function (direction, isAboveFn, isBeflowFn, root, predicateFn, caretPosition) {
  113175. var line = 0;
  113176. var result = [];
  113177. var add = function (node) {
  113178. var clientRects = getClientRects([node]);
  113179. if (direction === -1) {
  113180. clientRects = clientRects.reverse();
  113181. }
  113182. for (var i = 0; i < clientRects.length; i++) {
  113183. var clientRect = clientRects[i];
  113184. if (isBeflowFn(clientRect, targetClientRect)) {
  113185. continue;
  113186. }
  113187. if (result.length > 0 && isAboveFn(clientRect, last$1(result))) {
  113188. line++;
  113189. }
  113190. clientRect.line = line;
  113191. if (predicateFn(clientRect)) {
  113192. return true;
  113193. }
  113194. result.push(clientRect);
  113195. }
  113196. };
  113197. var targetClientRect = last$1(caretPosition.getClientRects());
  113198. if (!targetClientRect) {
  113199. return result;
  113200. }
  113201. var node = caretPosition.getNode();
  113202. add(node);
  113203. findUntil(direction, root, add, node);
  113204. return result;
  113205. };
  113206. var aboveLineNumber = function (lineNumber, clientRect) {
  113207. return clientRect.line > lineNumber;
  113208. };
  113209. var isLineNumber = function (lineNumber, clientRect) {
  113210. return clientRect.line === lineNumber;
  113211. };
  113212. var upUntil = curry(walkUntil$1, VDirection.Up, isAbove$1, isBelow$1);
  113213. var downUntil = curry(walkUntil$1, VDirection.Down, isBelow$1, isAbove$1);
  113214. var positionsUntil = function (direction, root, predicateFn, node) {
  113215. var caretWalker = CaretWalker(root);
  113216. var walkFn;
  113217. var isBelowFn;
  113218. var isAboveFn;
  113219. var caretPosition;
  113220. var result = [];
  113221. var line = 0;
  113222. var getClientRect = function (caretPosition) {
  113223. if (direction === 1) {
  113224. return last$1(caretPosition.getClientRects());
  113225. }
  113226. return last$1(caretPosition.getClientRects());
  113227. };
  113228. if (direction === 1) {
  113229. walkFn = caretWalker.next;
  113230. isBelowFn = isBelow$1;
  113231. isAboveFn = isAbove$1;
  113232. caretPosition = CaretPosition.after(node);
  113233. } else {
  113234. walkFn = caretWalker.prev;
  113235. isBelowFn = isAbove$1;
  113236. isAboveFn = isBelow$1;
  113237. caretPosition = CaretPosition.before(node);
  113238. }
  113239. var targetClientRect = getClientRect(caretPosition);
  113240. do {
  113241. if (!caretPosition.isVisible()) {
  113242. continue;
  113243. }
  113244. var rect = getClientRect(caretPosition);
  113245. if (isAboveFn(rect, targetClientRect)) {
  113246. continue;
  113247. }
  113248. if (result.length > 0 && isBelowFn(rect, last$1(result))) {
  113249. line++;
  113250. }
  113251. var clientRect = clone(rect);
  113252. clientRect.position = caretPosition;
  113253. clientRect.line = line;
  113254. if (predicateFn(clientRect)) {
  113255. return result;
  113256. }
  113257. result.push(clientRect);
  113258. } while (caretPosition = walkFn(caretPosition));
  113259. return result;
  113260. };
  113261. var isAboveLine = function (lineNumber) {
  113262. return function (clientRect) {
  113263. return aboveLineNumber(lineNumber, clientRect);
  113264. };
  113265. };
  113266. var isLine = function (lineNumber) {
  113267. return function (clientRect) {
  113268. return isLineNumber(lineNumber, clientRect);
  113269. };
  113270. };
  113271. var isContentEditableFalse$3 = isContentEditableFalse$b;
  113272. var findNode = findNode$1;
  113273. var distanceToRectLeft = function (clientRect, clientX) {
  113274. return Math.abs(clientRect.left - clientX);
  113275. };
  113276. var distanceToRectRight = function (clientRect, clientX) {
  113277. return Math.abs(clientRect.right - clientX);
  113278. };
  113279. var isInsideX = function (clientX, clientRect) {
  113280. return clientX >= clientRect.left && clientX <= clientRect.right;
  113281. };
  113282. var isInsideY = function (clientY, clientRect) {
  113283. return clientY >= clientRect.top && clientY <= clientRect.bottom;
  113284. };
  113285. var isNodeClientRect = function (rect) {
  113286. return hasNonNullableKey(rect, 'node');
  113287. };
  113288. var findClosestClientRect = function (clientRects, clientX, allowInside) {
  113289. if (allowInside === void 0) {
  113290. allowInside = always;
  113291. }
  113292. return reduce(clientRects, function (oldClientRect, clientRect) {
  113293. if (isInsideX(clientX, clientRect)) {
  113294. return allowInside(clientRect) ? clientRect : oldClientRect;
  113295. }
  113296. if (isInsideX(clientX, oldClientRect)) {
  113297. return allowInside(oldClientRect) ? oldClientRect : clientRect;
  113298. }
  113299. var oldDistance = Math.min(distanceToRectLeft(oldClientRect, clientX), distanceToRectRight(oldClientRect, clientX));
  113300. var newDistance = Math.min(distanceToRectLeft(clientRect, clientX), distanceToRectRight(clientRect, clientX));
  113301. if (newDistance === oldDistance && isNodeClientRect(clientRect) && isContentEditableFalse$3(clientRect.node)) {
  113302. return clientRect;
  113303. }
  113304. if (newDistance < oldDistance) {
  113305. return clientRect;
  113306. }
  113307. return oldClientRect;
  113308. });
  113309. };
  113310. var walkUntil = function (direction, root, predicateFn, startNode, includeChildren) {
  113311. var node = findNode(startNode, direction, isEditableCaretCandidate$1, root, !includeChildren);
  113312. do {
  113313. if (!node || predicateFn(node)) {
  113314. return;
  113315. }
  113316. } while (node = findNode(node, direction, isEditableCaretCandidate$1, root));
  113317. };
  113318. var findLineNodeRects = function (root, targetNodeRect, includeChildren) {
  113319. if (includeChildren === void 0) {
  113320. includeChildren = true;
  113321. }
  113322. var clientRects = [];
  113323. var collect = function (checkPosFn, node) {
  113324. var lineRects = filter$4(getClientRects([node]), function (clientRect) {
  113325. return !checkPosFn(clientRect, targetNodeRect);
  113326. });
  113327. clientRects = clientRects.concat(lineRects);
  113328. return lineRects.length === 0;
  113329. };
  113330. clientRects.push(targetNodeRect);
  113331. walkUntil(VDirection.Up, root, curry(collect, isAbove$1), targetNodeRect.node, includeChildren);
  113332. walkUntil(VDirection.Down, root, curry(collect, isBelow$1), targetNodeRect.node, includeChildren);
  113333. return clientRects;
  113334. };
  113335. var getFakeCaretTargets = function (root) {
  113336. return filter$4(from(root.getElementsByTagName('*')), isFakeCaretTarget);
  113337. };
  113338. var caretInfo = function (clientRect, clientX) {
  113339. return {
  113340. node: clientRect.node,
  113341. before: distanceToRectLeft(clientRect, clientX) < distanceToRectRight(clientRect, clientX)
  113342. };
  113343. };
  113344. var closestFakeCaret = function (root, clientX, clientY) {
  113345. var fakeTargetNodeRects = getClientRects(getFakeCaretTargets(root));
  113346. var targetNodeRects = filter$4(fakeTargetNodeRects, curry(isInsideY, clientY));
  113347. var checkInside = function (clientRect) {
  113348. return !isTable$3(clientRect.node) && !isMedia$2(clientRect.node);
  113349. };
  113350. var closestNodeRect = findClosestClientRect(targetNodeRects, clientX, checkInside);
  113351. if (closestNodeRect) {
  113352. var includeChildren = checkInside(closestNodeRect);
  113353. closestNodeRect = findClosestClientRect(findLineNodeRects(root, closestNodeRect, includeChildren), clientX, checkInside);
  113354. if (closestNodeRect && isFakeCaretTarget(closestNodeRect.node)) {
  113355. return caretInfo(closestNodeRect, clientX);
  113356. }
  113357. }
  113358. return null;
  113359. };
  113360. var moveToRange = function (editor, rng) {
  113361. editor.selection.setRng(rng);
  113362. scrollRangeIntoView(editor, editor.selection.getRng());
  113363. };
  113364. var renderRangeCaretOpt = function (editor, range, scrollIntoView) {
  113365. return Optional.some(renderRangeCaret(editor, range, scrollIntoView));
  113366. };
  113367. var moveHorizontally = function (editor, direction, range, isBefore, isAfter, isElement) {
  113368. var forwards = direction === HDirection.Forwards;
  113369. var caretWalker = CaretWalker(editor.getBody());
  113370. var getNextPosFn = curry(getVisualCaretPosition, forwards ? caretWalker.next : caretWalker.prev);
  113371. var isBeforeFn = forwards ? isBefore : isAfter;
  113372. if (!range.collapsed) {
  113373. var node = getSelectedNode(range);
  113374. if (isElement(node)) {
  113375. return showCaret(direction, editor, node, direction === HDirection.Backwards, false);
  113376. }
  113377. }
  113378. var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
  113379. if (isBeforeFn(caretPosition)) {
  113380. return selectNode(editor, caretPosition.getNode(!forwards));
  113381. }
  113382. var nextCaretPosition = normalizePosition(forwards, getNextPosFn(caretPosition));
  113383. var rangeIsInContainerBlock = isRangeInCaretContainerBlock(range);
  113384. if (!nextCaretPosition) {
  113385. return rangeIsInContainerBlock ? Optional.some(range) : Optional.none();
  113386. }
  113387. if (isBeforeFn(nextCaretPosition)) {
  113388. return showCaret(direction, editor, nextCaretPosition.getNode(!forwards), forwards, false);
  113389. }
  113390. var peekCaretPosition = getNextPosFn(nextCaretPosition);
  113391. if (peekCaretPosition && isBeforeFn(peekCaretPosition)) {
  113392. if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) {
  113393. return showCaret(direction, editor, peekCaretPosition.getNode(!forwards), forwards, false);
  113394. }
  113395. }
  113396. if (rangeIsInContainerBlock) {
  113397. return renderRangeCaretOpt(editor, nextCaretPosition.toRange(), false);
  113398. }
  113399. return Optional.none();
  113400. };
  113401. var moveVertically = function (editor, direction, range, isBefore, isAfter, isElement) {
  113402. var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
  113403. var caretClientRect = last$1(caretPosition.getClientRects());
  113404. var forwards = direction === VDirection.Down;
  113405. if (!caretClientRect) {
  113406. return Optional.none();
  113407. }
  113408. var walkerFn = forwards ? downUntil : upUntil;
  113409. var linePositions = walkerFn(editor.getBody(), isAboveLine(1), caretPosition);
  113410. var nextLinePositions = filter$4(linePositions, isLine(1));
  113411. var clientX = caretClientRect.left;
  113412. var nextLineRect = findClosestClientRect(nextLinePositions, clientX);
  113413. if (nextLineRect && isElement(nextLineRect.node)) {
  113414. var dist1 = Math.abs(clientX - nextLineRect.left);
  113415. var dist2 = Math.abs(clientX - nextLineRect.right);
  113416. return showCaret(direction, editor, nextLineRect.node, dist1 < dist2, false);
  113417. }
  113418. var currentNode;
  113419. if (isBefore(caretPosition)) {
  113420. currentNode = caretPosition.getNode();
  113421. } else if (isAfter(caretPosition)) {
  113422. currentNode = caretPosition.getNode(true);
  113423. } else {
  113424. currentNode = getSelectedNode(range);
  113425. }
  113426. if (currentNode) {
  113427. var caretPositions = positionsUntil(direction, editor.getBody(), isAboveLine(1), currentNode);
  113428. var closestNextLineRect = findClosestClientRect(filter$4(caretPositions, isLine(1)), clientX);
  113429. if (closestNextLineRect) {
  113430. return renderRangeCaretOpt(editor, closestNextLineRect.position.toRange(), false);
  113431. }
  113432. closestNextLineRect = last$1(filter$4(caretPositions, isLine(0)));
  113433. if (closestNextLineRect) {
  113434. return renderRangeCaretOpt(editor, closestNextLineRect.position.toRange(), false);
  113435. }
  113436. }
  113437. if (nextLinePositions.length === 0) {
  113438. return getLineEndPoint(editor, forwards).filter(forwards ? isAfter : isBefore).map(function (pos) {
  113439. return renderRangeCaret(editor, pos.toRange(), false);
  113440. });
  113441. }
  113442. return Optional.none();
  113443. };
  113444. var getLineEndPoint = function (editor, forward) {
  113445. var rng = editor.selection.getRng();
  113446. var body = editor.getBody();
  113447. if (forward) {
  113448. var from = CaretPosition.fromRangeEnd(rng);
  113449. var result = getPositionsUntilNextLine(body, from);
  113450. return last$2(result.positions);
  113451. } else {
  113452. var from = CaretPosition.fromRangeStart(rng);
  113453. var result = getPositionsUntilPreviousLine(body, from);
  113454. return head(result.positions);
  113455. }
  113456. };
  113457. var moveToLineEndPoint$3 = function (editor, forward, isElementPosition) {
  113458. return getLineEndPoint(editor, forward).filter(isElementPosition).exists(function (pos) {
  113459. editor.selection.setRng(pos.toRange());
  113460. return true;
  113461. });
  113462. };
  113463. var setCaretPosition = function (editor, pos) {
  113464. var rng = editor.dom.createRng();
  113465. rng.setStart(pos.container(), pos.offset());
  113466. rng.setEnd(pos.container(), pos.offset());
  113467. editor.selection.setRng(rng);
  113468. };
  113469. var setSelected = function (state, elm) {
  113470. if (state) {
  113471. elm.setAttribute('data-mce-selected', 'inline-boundary');
  113472. } else {
  113473. elm.removeAttribute('data-mce-selected');
  113474. }
  113475. };
  113476. var renderCaretLocation = function (editor, caret, location) {
  113477. return renderCaret(caret, location).map(function (pos) {
  113478. setCaretPosition(editor, pos);
  113479. return location;
  113480. });
  113481. };
  113482. var findLocation = function (editor, caret, forward) {
  113483. var rootNode = editor.getBody();
  113484. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  113485. var isInlineTarget$1 = curry(isInlineTarget, editor);
  113486. var location = findLocation$1(forward, isInlineTarget$1, rootNode, from);
  113487. return location.bind(function (location) {
  113488. return renderCaretLocation(editor, caret, location);
  113489. });
  113490. };
  113491. var toggleInlines = function (isInlineTarget, dom, elms) {
  113492. var inlineBoundaries = map$3(descendants(SugarElement.fromDom(dom.getRoot()), '*[data-mce-selected="inline-boundary"]'), function (e) {
  113493. return e.dom;
  113494. });
  113495. var selectedInlines = filter$4(inlineBoundaries, isInlineTarget);
  113496. var targetInlines = filter$4(elms, isInlineTarget);
  113497. each$k(difference(selectedInlines, targetInlines), curry(setSelected, false));
  113498. each$k(difference(targetInlines, selectedInlines), curry(setSelected, true));
  113499. };
  113500. var safeRemoveCaretContainer = function (editor, caret) {
  113501. if (editor.selection.isCollapsed() && editor.composing !== true && caret.get()) {
  113502. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  113503. if (CaretPosition.isTextPosition(pos) && isAtZwsp(pos) === false) {
  113504. setCaretPosition(editor, removeAndReposition(caret.get(), pos));
  113505. caret.set(null);
  113506. }
  113507. }
  113508. };
  113509. var renderInsideInlineCaret = function (isInlineTarget, editor, caret, elms) {
  113510. if (editor.selection.isCollapsed()) {
  113511. var inlines = filter$4(elms, isInlineTarget);
  113512. each$k(inlines, function (_inline) {
  113513. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  113514. readLocation(isInlineTarget, editor.getBody(), pos).bind(function (location) {
  113515. return renderCaretLocation(editor, caret, location);
  113516. });
  113517. });
  113518. }
  113519. };
  113520. var move$2 = function (editor, caret, forward) {
  113521. return isInlineBoundariesEnabled(editor) ? findLocation(editor, caret, forward).isSome() : false;
  113522. };
  113523. var moveWord = function (forward, editor, _caret) {
  113524. return isInlineBoundariesEnabled(editor) ? moveByWord(forward, editor) : false;
  113525. };
  113526. var setupSelectedState = function (editor) {
  113527. var caret = Cell(null);
  113528. var isInlineTarget$1 = curry(isInlineTarget, editor);
  113529. editor.on('NodeChange', function (e) {
  113530. if (isInlineBoundariesEnabled(editor) && !(Env.browser.isIE() && e.initial)) {
  113531. toggleInlines(isInlineTarget$1, editor.dom, e.parents);
  113532. safeRemoveCaretContainer(editor, caret);
  113533. renderInsideInlineCaret(isInlineTarget$1, editor, caret, e.parents);
  113534. }
  113535. });
  113536. return caret;
  113537. };
  113538. var moveNextWord = curry(moveWord, true);
  113539. var movePrevWord = curry(moveWord, false);
  113540. var moveToLineEndPoint$2 = function (editor, forward, caret) {
  113541. if (isInlineBoundariesEnabled(editor)) {
  113542. var linePoint = getLineEndPoint(editor, forward).getOrThunk(function () {
  113543. var rng = editor.selection.getRng();
  113544. return forward ? CaretPosition.fromRangeEnd(rng) : CaretPosition.fromRangeStart(rng);
  113545. });
  113546. return readLocation(curry(isInlineTarget, editor), editor.getBody(), linePoint).exists(function (loc) {
  113547. var outsideLoc = outside(loc);
  113548. return renderCaret(caret, outsideLoc).exists(function (pos) {
  113549. setCaretPosition(editor, pos);
  113550. return true;
  113551. });
  113552. });
  113553. } else {
  113554. return false;
  113555. }
  113556. };
  113557. var rangeFromPositions = function (from, to) {
  113558. var range = document.createRange();
  113559. range.setStart(from.container(), from.offset());
  113560. range.setEnd(to.container(), to.offset());
  113561. return range;
  113562. };
  113563. var hasOnlyTwoOrLessPositionsLeft = function (elm) {
  113564. return lift2(firstPositionIn(elm), lastPositionIn(elm), function (firstPos, lastPos) {
  113565. var normalizedFirstPos = normalizePosition(true, firstPos);
  113566. var normalizedLastPos = normalizePosition(false, lastPos);
  113567. return nextPosition(elm, normalizedFirstPos).forall(function (pos) {
  113568. return pos.isEqual(normalizedLastPos);
  113569. });
  113570. }).getOr(true);
  113571. };
  113572. var setCaretLocation = function (editor, caret) {
  113573. return function (location) {
  113574. return renderCaret(caret, location).exists(function (pos) {
  113575. setCaretPosition(editor, pos);
  113576. return true;
  113577. });
  113578. };
  113579. };
  113580. var deleteFromTo = function (editor, caret, from, to) {
  113581. var rootNode = editor.getBody();
  113582. var isInlineTarget$1 = curry(isInlineTarget, editor);
  113583. editor.undoManager.ignore(function () {
  113584. editor.selection.setRng(rangeFromPositions(from, to));
  113585. editor.execCommand('Delete');
  113586. readLocation(isInlineTarget$1, rootNode, CaretPosition.fromRangeStart(editor.selection.getRng())).map(inside).map(setCaretLocation(editor, caret));
  113587. });
  113588. editor.nodeChanged();
  113589. };
  113590. var rescope = function (rootNode, node) {
  113591. var parentBlock = getParentBlock$2(node, rootNode);
  113592. return parentBlock ? parentBlock : rootNode;
  113593. };
  113594. var backspaceDeleteCollapsed = function (editor, caret, forward, from) {
  113595. var rootNode = rescope(editor.getBody(), from.container());
  113596. var isInlineTarget$1 = curry(isInlineTarget, editor);
  113597. var fromLocation = readLocation(isInlineTarget$1, rootNode, from);
  113598. return fromLocation.bind(function (location) {
  113599. if (forward) {
  113600. return location.fold(constant(Optional.some(inside(location))), Optional.none, constant(Optional.some(outside(location))), Optional.none);
  113601. } else {
  113602. return location.fold(Optional.none, constant(Optional.some(outside(location))), Optional.none, constant(Optional.some(inside(location))));
  113603. }
  113604. }).map(setCaretLocation(editor, caret)).getOrThunk(function () {
  113605. var toPosition = navigate(forward, rootNode, from);
  113606. var toLocation = toPosition.bind(function (pos) {
  113607. return readLocation(isInlineTarget$1, rootNode, pos);
  113608. });
  113609. return lift2(fromLocation, toLocation, function () {
  113610. return findRootInline(isInlineTarget$1, rootNode, from).exists(function (elm) {
  113611. if (hasOnlyTwoOrLessPositionsLeft(elm)) {
  113612. deleteElement$2(editor, forward, SugarElement.fromDom(elm));
  113613. return true;
  113614. } else {
  113615. return false;
  113616. }
  113617. });
  113618. }).orThunk(function () {
  113619. return toLocation.bind(function (_) {
  113620. return toPosition.map(function (to) {
  113621. if (forward) {
  113622. deleteFromTo(editor, caret, from, to);
  113623. } else {
  113624. deleteFromTo(editor, caret, to, from);
  113625. }
  113626. return true;
  113627. });
  113628. });
  113629. }).getOr(false);
  113630. });
  113631. };
  113632. var backspaceDelete$3 = function (editor, caret, forward) {
  113633. if (editor.selection.isCollapsed() && isInlineBoundariesEnabled(editor)) {
  113634. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  113635. return backspaceDeleteCollapsed(editor, caret, forward, from);
  113636. }
  113637. return false;
  113638. };
  113639. var getParentInlines = function (rootElm, startElm) {
  113640. var parents = parentsAndSelf(startElm, rootElm);
  113641. return findIndex$2(parents, isBlock$2).fold(constant(parents), function (index) {
  113642. return parents.slice(0, index);
  113643. });
  113644. };
  113645. var hasOnlyOneChild = function (elm) {
  113646. return childNodesCount(elm) === 1;
  113647. };
  113648. var deleteLastPosition = function (forward, editor, target, parentInlines) {
  113649. var isFormatElement$1 = curry(isFormatElement, editor);
  113650. var formatNodes = map$3(filter$4(parentInlines, isFormatElement$1), function (elm) {
  113651. return elm.dom;
  113652. });
  113653. if (formatNodes.length === 0) {
  113654. deleteElement$2(editor, forward, target);
  113655. } else {
  113656. var pos = replaceWithCaretFormat(target.dom, formatNodes);
  113657. editor.selection.setRng(pos.toRange());
  113658. }
  113659. };
  113660. var deleteCaret$1 = function (editor, forward) {
  113661. var rootElm = SugarElement.fromDom(editor.getBody());
  113662. var startElm = SugarElement.fromDom(editor.selection.getStart());
  113663. var parentInlines = filter$4(getParentInlines(rootElm, startElm), hasOnlyOneChild);
  113664. return last$2(parentInlines).exists(function (target) {
  113665. var fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());
  113666. if (willDeleteLastPositionInElement(forward, fromPos, target.dom) && !isEmptyCaretFormatElement(target)) {
  113667. deleteLastPosition(forward, editor, target, parentInlines);
  113668. return true;
  113669. } else {
  113670. return false;
  113671. }
  113672. });
  113673. };
  113674. var backspaceDelete$2 = function (editor, forward) {
  113675. return editor.selection.isCollapsed() ? deleteCaret$1(editor, forward) : false;
  113676. };
  113677. var deleteElement = function (editor, forward, element) {
  113678. editor._selectionOverrides.hideFakeCaret();
  113679. deleteElement$2(editor, forward, SugarElement.fromDom(element));
  113680. return true;
  113681. };
  113682. var deleteCaret = function (editor, forward) {
  113683. var isNearMedia = forward ? isBeforeMedia : isAfterMedia;
  113684. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  113685. var fromPos = getNormalizedRangeEndPoint(direction, editor.getBody(), editor.selection.getRng());
  113686. if (isNearMedia(fromPos)) {
  113687. return deleteElement(editor, forward, fromPos.getNode(!forward));
  113688. } else {
  113689. return Optional.from(normalizePosition(forward, fromPos)).filter(function (pos) {
  113690. return isNearMedia(pos) && isMoveInsideSameBlock(fromPos, pos);
  113691. }).exists(function (pos) {
  113692. return deleteElement(editor, forward, pos.getNode(!forward));
  113693. });
  113694. }
  113695. };
  113696. var deleteRange = function (editor, forward) {
  113697. var selectedNode = editor.selection.getNode();
  113698. return isMedia$2(selectedNode) ? deleteElement(editor, forward, selectedNode) : false;
  113699. };
  113700. var backspaceDelete$1 = function (editor, forward) {
  113701. return editor.selection.isCollapsed() ? deleteCaret(editor, forward) : deleteRange(editor, forward);
  113702. };
  113703. var isEditable = function (target) {
  113704. return closest$3(target, function (elm) {
  113705. return isContentEditableTrue$4(elm.dom) || isContentEditableFalse$b(elm.dom);
  113706. }).exists(function (elm) {
  113707. return isContentEditableTrue$4(elm.dom);
  113708. });
  113709. };
  113710. var parseIndentValue = function (value) {
  113711. var number = parseInt(value, 10);
  113712. return isNaN(number) ? 0 : number;
  113713. };
  113714. var getIndentStyleName = function (useMargin, element) {
  113715. var indentStyleName = useMargin || isTable$2(element) ? 'margin' : 'padding';
  113716. var suffix = get$5(element, 'direction') === 'rtl' ? '-right' : '-left';
  113717. return indentStyleName + suffix;
  113718. };
  113719. var indentElement = function (dom, command, useMargin, value, unit, element) {
  113720. var indentStyleName = getIndentStyleName(useMargin, SugarElement.fromDom(element));
  113721. if (command === 'outdent') {
  113722. var styleValue = Math.max(0, parseIndentValue(element.style[indentStyleName]) - value);
  113723. dom.setStyle(element, indentStyleName, styleValue ? styleValue + unit : '');
  113724. } else {
  113725. var styleValue = parseIndentValue(element.style[indentStyleName]) + value + unit;
  113726. dom.setStyle(element, indentStyleName, styleValue);
  113727. }
  113728. };
  113729. var validateBlocks = function (editor, blocks) {
  113730. return forall(blocks, function (block) {
  113731. var indentStyleName = getIndentStyleName(shouldIndentUseMargin(editor), block);
  113732. var intentValue = getRaw(block, indentStyleName).map(parseIndentValue).getOr(0);
  113733. var contentEditable = editor.dom.getContentEditable(block.dom);
  113734. return contentEditable !== 'false' && intentValue > 0;
  113735. });
  113736. };
  113737. var canOutdent = function (editor) {
  113738. var blocks = getBlocksToIndent(editor);
  113739. return !editor.mode.isReadOnly() && (blocks.length > 1 || validateBlocks(editor, blocks));
  113740. };
  113741. var isListComponent = function (el) {
  113742. return isList(el) || isListItem(el);
  113743. };
  113744. var parentIsListComponent = function (el) {
  113745. return parent(el).exists(isListComponent);
  113746. };
  113747. var getBlocksToIndent = function (editor) {
  113748. return filter$4(fromDom$1(editor.selection.getSelectedBlocks()), function (el) {
  113749. return !isListComponent(el) && !parentIsListComponent(el) && isEditable(el);
  113750. });
  113751. };
  113752. var handle = function (editor, command) {
  113753. var dom = editor.dom, selection = editor.selection, formatter = editor.formatter;
  113754. var indentation = getIndentation(editor);
  113755. var indentUnit = /[a-z%]+$/i.exec(indentation)[0];
  113756. var indentValue = parseInt(indentation, 10);
  113757. var useMargin = shouldIndentUseMargin(editor);
  113758. var forcedRootBlock = getForcedRootBlock(editor);
  113759. if (!editor.queryCommandState('InsertUnorderedList') && !editor.queryCommandState('InsertOrderedList')) {
  113760. if (forcedRootBlock === '' && !dom.getParent(selection.getNode(), dom.isBlock)) {
  113761. formatter.apply('div');
  113762. }
  113763. }
  113764. each$k(getBlocksToIndent(editor), function (block) {
  113765. indentElement(dom, command, useMargin, indentValue, indentUnit, block.dom);
  113766. });
  113767. };
  113768. var backspaceDelete = function (editor, _forward) {
  113769. if (editor.selection.isCollapsed() && canOutdent(editor)) {
  113770. var dom = editor.dom;
  113771. var rng = editor.selection.getRng();
  113772. var pos = CaretPosition.fromRangeStart(rng);
  113773. var block = dom.getParent(rng.startContainer, dom.isBlock);
  113774. if (block !== null && isAtStartOfBlock(SugarElement.fromDom(block), pos)) {
  113775. handle(editor, 'outdent');
  113776. return true;
  113777. }
  113778. }
  113779. return false;
  113780. };
  113781. var nativeCommand = function (editor, command) {
  113782. editor.getDoc().execCommand(command, false, null);
  113783. };
  113784. var deleteCommand = function (editor, caret) {
  113785. if (backspaceDelete(editor)) {
  113786. return;
  113787. } else if (backspaceDelete$5(editor, false)) {
  113788. return;
  113789. } else if (backspaceDelete$6(editor, false)) {
  113790. return;
  113791. } else if (backspaceDelete$3(editor, caret, false)) {
  113792. return;
  113793. } else if (backspaceDelete$8(editor, false)) {
  113794. return;
  113795. } else if (backspaceDelete$9(editor)) {
  113796. return;
  113797. } else if (backspaceDelete$4(editor, false)) {
  113798. return;
  113799. } else if (backspaceDelete$1(editor, false)) {
  113800. return;
  113801. } else if (backspaceDelete$7(editor)) {
  113802. return;
  113803. } else if (backspaceDelete$2(editor, false)) {
  113804. return;
  113805. } else {
  113806. nativeCommand(editor, 'Delete');
  113807. paddEmptyBody(editor);
  113808. }
  113809. };
  113810. var forwardDeleteCommand = function (editor, caret) {
  113811. if (backspaceDelete$5(editor, true)) {
  113812. return;
  113813. } else if (backspaceDelete$6(editor, true)) {
  113814. return;
  113815. } else if (backspaceDelete$3(editor, caret, true)) {
  113816. return;
  113817. } else if (backspaceDelete$8(editor, true)) {
  113818. return;
  113819. } else if (backspaceDelete$9(editor)) {
  113820. return;
  113821. } else if (backspaceDelete$4(editor, true)) {
  113822. return;
  113823. } else if (backspaceDelete$1(editor, true)) {
  113824. return;
  113825. } else if (backspaceDelete$7(editor)) {
  113826. return;
  113827. } else if (backspaceDelete$2(editor, true)) {
  113828. return;
  113829. } else {
  113830. nativeCommand(editor, 'ForwardDelete');
  113831. }
  113832. };
  113833. var setup$f = function (editor, caret) {
  113834. editor.addCommand('delete', function () {
  113835. deleteCommand(editor, caret);
  113836. });
  113837. editor.addCommand('forwardDelete', function () {
  113838. forwardDeleteCommand(editor, caret);
  113839. });
  113840. };
  113841. var SIGNIFICANT_MOVE = 5;
  113842. var LONGPRESS_DELAY = 400;
  113843. var getTouch = function (event) {
  113844. if (event.touches === undefined || event.touches.length !== 1) {
  113845. return Optional.none();
  113846. }
  113847. return Optional.some(event.touches[0]);
  113848. };
  113849. var isFarEnough = function (touch, data) {
  113850. var distX = Math.abs(touch.clientX - data.x);
  113851. var distY = Math.abs(touch.clientY - data.y);
  113852. return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;
  113853. };
  113854. var setup$e = function (editor) {
  113855. var startData = value();
  113856. var longpressFired = Cell(false);
  113857. var debounceLongpress = last(function (e) {
  113858. editor.fire('longpress', __assign(__assign({}, e), { type: 'longpress' }));
  113859. longpressFired.set(true);
  113860. }, LONGPRESS_DELAY);
  113861. editor.on('touchstart', function (e) {
  113862. getTouch(e).each(function (touch) {
  113863. debounceLongpress.cancel();
  113864. var data = {
  113865. x: touch.clientX,
  113866. y: touch.clientY,
  113867. target: e.target
  113868. };
  113869. debounceLongpress.throttle(e);
  113870. longpressFired.set(false);
  113871. startData.set(data);
  113872. });
  113873. }, true);
  113874. editor.on('touchmove', function (e) {
  113875. debounceLongpress.cancel();
  113876. getTouch(e).each(function (touch) {
  113877. startData.on(function (data) {
  113878. if (isFarEnough(touch, data)) {
  113879. startData.clear();
  113880. longpressFired.set(false);
  113881. editor.fire('longpresscancel');
  113882. }
  113883. });
  113884. });
  113885. }, true);
  113886. editor.on('touchend touchcancel', function (e) {
  113887. debounceLongpress.cancel();
  113888. if (e.type === 'touchcancel') {
  113889. return;
  113890. }
  113891. startData.get().filter(function (data) {
  113892. return data.target.isEqualNode(e.target);
  113893. }).each(function () {
  113894. if (longpressFired.get()) {
  113895. e.preventDefault();
  113896. } else {
  113897. editor.fire('tap', __assign(__assign({}, e), { type: 'tap' }));
  113898. }
  113899. });
  113900. }, true);
  113901. };
  113902. var isBlockElement = function (blockElements, node) {
  113903. return has$2(blockElements, node.nodeName);
  113904. };
  113905. var isValidTarget = function (blockElements, node) {
  113906. if (isText$7(node)) {
  113907. return true;
  113908. } else if (isElement$5(node)) {
  113909. return !isBlockElement(blockElements, node) && !isBookmarkNode$1(node);
  113910. } else {
  113911. return false;
  113912. }
  113913. };
  113914. var hasBlockParent = function (blockElements, root, node) {
  113915. return exists(parents(SugarElement.fromDom(node), SugarElement.fromDom(root)), function (elm) {
  113916. return isBlockElement(blockElements, elm.dom);
  113917. });
  113918. };
  113919. var shouldRemoveTextNode = function (blockElements, node) {
  113920. if (isText$7(node)) {
  113921. if (node.nodeValue.length === 0) {
  113922. return true;
  113923. } else if (/^\s+$/.test(node.nodeValue) && (!node.nextSibling || isBlockElement(blockElements, node.nextSibling))) {
  113924. return true;
  113925. }
  113926. }
  113927. return false;
  113928. };
  113929. var addRootBlocks = function (editor) {
  113930. var dom = editor.dom, selection = editor.selection;
  113931. var schema = editor.schema, blockElements = schema.getBlockElements();
  113932. var node = selection.getStart();
  113933. var rootNode = editor.getBody();
  113934. var rootBlockNode, tempNode, wrapped;
  113935. var forcedRootBlock = getForcedRootBlock(editor);
  113936. if (!node || !isElement$5(node) || !forcedRootBlock) {
  113937. return;
  113938. }
  113939. var rootNodeName = rootNode.nodeName.toLowerCase();
  113940. if (!schema.isValidChild(rootNodeName, forcedRootBlock.toLowerCase()) || hasBlockParent(blockElements, rootNode, node)) {
  113941. return;
  113942. }
  113943. var rng = selection.getRng();
  113944. var startContainer = rng.startContainer;
  113945. var startOffset = rng.startOffset;
  113946. var endContainer = rng.endContainer;
  113947. var endOffset = rng.endOffset;
  113948. var restoreSelection = hasFocus(editor);
  113949. node = rootNode.firstChild;
  113950. while (node) {
  113951. if (isValidTarget(blockElements, node)) {
  113952. if (shouldRemoveTextNode(blockElements, node)) {
  113953. tempNode = node;
  113954. node = node.nextSibling;
  113955. dom.remove(tempNode);
  113956. continue;
  113957. }
  113958. if (!rootBlockNode) {
  113959. rootBlockNode = dom.create(forcedRootBlock, getForcedRootBlockAttrs(editor));
  113960. node.parentNode.insertBefore(rootBlockNode, node);
  113961. wrapped = true;
  113962. }
  113963. tempNode = node;
  113964. node = node.nextSibling;
  113965. rootBlockNode.appendChild(tempNode);
  113966. } else {
  113967. rootBlockNode = null;
  113968. node = node.nextSibling;
  113969. }
  113970. }
  113971. if (wrapped && restoreSelection) {
  113972. rng.setStart(startContainer, startOffset);
  113973. rng.setEnd(endContainer, endOffset);
  113974. selection.setRng(rng);
  113975. editor.nodeChanged();
  113976. }
  113977. };
  113978. var setup$d = function (editor) {
  113979. if (getForcedRootBlock(editor)) {
  113980. editor.on('NodeChange', curry(addRootBlocks, editor));
  113981. }
  113982. };
  113983. var findBlockCaretContainer = function (editor) {
  113984. return descendant(SugarElement.fromDom(editor.getBody()), '*[data-mce-caret]').map(function (elm) {
  113985. return elm.dom;
  113986. }).getOrNull();
  113987. };
  113988. var removeIeControlRect = function (editor) {
  113989. editor.selection.setRng(editor.selection.getRng());
  113990. };
  113991. var showBlockCaretContainer = function (editor, blockCaretContainer) {
  113992. if (blockCaretContainer.hasAttribute('data-mce-caret')) {
  113993. showCaretContainerBlock(blockCaretContainer);
  113994. removeIeControlRect(editor);
  113995. editor.selection.scrollIntoView(blockCaretContainer);
  113996. }
  113997. };
  113998. var handleBlockContainer = function (editor, e) {
  113999. var blockCaretContainer = findBlockCaretContainer(editor);
  114000. if (!blockCaretContainer) {
  114001. return;
  114002. }
  114003. if (e.type === 'compositionstart') {
  114004. e.preventDefault();
  114005. e.stopPropagation();
  114006. showBlockCaretContainer(editor, blockCaretContainer);
  114007. return;
  114008. }
  114009. if (hasContent(blockCaretContainer)) {
  114010. showBlockCaretContainer(editor, blockCaretContainer);
  114011. editor.undoManager.add();
  114012. }
  114013. };
  114014. var setup$c = function (editor) {
  114015. editor.on('keyup compositionstart', curry(handleBlockContainer, editor));
  114016. };
  114017. var isContentEditableFalse$2 = isContentEditableFalse$b;
  114018. var moveToCeFalseHorizontally = function (direction, editor, range) {
  114019. return moveHorizontally(editor, direction, range, isBeforeContentEditableFalse, isAfterContentEditableFalse, isContentEditableFalse$2);
  114020. };
  114021. var moveToCeFalseVertically = function (direction, editor, range) {
  114022. var isBefore = function (caretPosition) {
  114023. return isBeforeContentEditableFalse(caretPosition) || isBeforeTable(caretPosition);
  114024. };
  114025. var isAfter = function (caretPosition) {
  114026. return isAfterContentEditableFalse(caretPosition) || isAfterTable(caretPosition);
  114027. };
  114028. return moveVertically(editor, direction, range, isBefore, isAfter, isContentEditableFalse$2);
  114029. };
  114030. var createTextBlock = function (editor) {
  114031. var textBlock = editor.dom.create(getForcedRootBlock(editor));
  114032. if (!Env.ie || Env.ie >= 11) {
  114033. textBlock.innerHTML = '<br data-mce-bogus="1">';
  114034. }
  114035. return textBlock;
  114036. };
  114037. var exitPreBlock = function (editor, direction, range) {
  114038. var caretWalker = CaretWalker(editor.getBody());
  114039. var getVisualCaretPosition$1 = curry(getVisualCaretPosition, direction === 1 ? caretWalker.next : caretWalker.prev);
  114040. if (range.collapsed && hasForcedRootBlock(editor)) {
  114041. var pre = editor.dom.getParent(range.startContainer, 'PRE');
  114042. if (!pre) {
  114043. return;
  114044. }
  114045. var caretPos = getVisualCaretPosition$1(CaretPosition.fromRangeStart(range));
  114046. if (!caretPos) {
  114047. var newBlock = createTextBlock(editor);
  114048. if (direction === 1) {
  114049. editor.$(pre).after(newBlock);
  114050. } else {
  114051. editor.$(pre).before(newBlock);
  114052. }
  114053. editor.selection.select(newBlock, true);
  114054. editor.selection.collapse();
  114055. }
  114056. }
  114057. };
  114058. var getHorizontalRange = function (editor, forward) {
  114059. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  114060. var range = editor.selection.getRng();
  114061. return moveToCeFalseHorizontally(direction, editor, range).orThunk(function () {
  114062. exitPreBlock(editor, direction, range);
  114063. return Optional.none();
  114064. });
  114065. };
  114066. var getVerticalRange = function (editor, down) {
  114067. var direction = down ? 1 : -1;
  114068. var range = editor.selection.getRng();
  114069. return moveToCeFalseVertically(direction, editor, range).orThunk(function () {
  114070. exitPreBlock(editor, direction, range);
  114071. return Optional.none();
  114072. });
  114073. };
  114074. var moveH$2 = function (editor, forward) {
  114075. return getHorizontalRange(editor, forward).exists(function (newRange) {
  114076. moveToRange(editor, newRange);
  114077. return true;
  114078. });
  114079. };
  114080. var moveV$3 = function (editor, down) {
  114081. return getVerticalRange(editor, down).exists(function (newRange) {
  114082. moveToRange(editor, newRange);
  114083. return true;
  114084. });
  114085. };
  114086. var moveToLineEndPoint$1 = function (editor, forward) {
  114087. var isCefPosition = forward ? isAfterContentEditableFalse : isBeforeContentEditableFalse;
  114088. return moveToLineEndPoint$3(editor, forward, isCefPosition);
  114089. };
  114090. var isTarget = function (node) {
  114091. return contains$3(['figcaption'], name(node));
  114092. };
  114093. var rangeBefore = function (target) {
  114094. var rng = document.createRange();
  114095. rng.setStartBefore(target.dom);
  114096. rng.setEndBefore(target.dom);
  114097. return rng;
  114098. };
  114099. var insertElement = function (root, elm, forward) {
  114100. if (forward) {
  114101. append$1(root, elm);
  114102. } else {
  114103. prepend(root, elm);
  114104. }
  114105. };
  114106. var insertBr = function (root, forward) {
  114107. var br = SugarElement.fromTag('br');
  114108. insertElement(root, br, forward);
  114109. return rangeBefore(br);
  114110. };
  114111. var insertBlock = function (root, forward, blockName, attrs) {
  114112. var block = SugarElement.fromTag(blockName);
  114113. var br = SugarElement.fromTag('br');
  114114. setAll$1(block, attrs);
  114115. append$1(block, br);
  114116. insertElement(root, block, forward);
  114117. return rangeBefore(br);
  114118. };
  114119. var insertEmptyLine = function (root, rootBlockName, attrs, forward) {
  114120. if (rootBlockName === '') {
  114121. return insertBr(root, forward);
  114122. } else {
  114123. return insertBlock(root, forward, rootBlockName, attrs);
  114124. }
  114125. };
  114126. var getClosestTargetBlock = function (pos, root) {
  114127. var isRoot = curry(eq, root);
  114128. return closest$3(SugarElement.fromDom(pos.container()), isBlock$2, isRoot).filter(isTarget);
  114129. };
  114130. var isAtFirstOrLastLine = function (root, forward, pos) {
  114131. return forward ? isAtLastLine(root.dom, pos) : isAtFirstLine(root.dom, pos);
  114132. };
  114133. var moveCaretToNewEmptyLine = function (editor, forward) {
  114134. var root = SugarElement.fromDom(editor.getBody());
  114135. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  114136. var rootBlock = getForcedRootBlock(editor);
  114137. var rootBlockAttrs = getForcedRootBlockAttrs(editor);
  114138. return getClosestTargetBlock(pos, root).exists(function () {
  114139. if (isAtFirstOrLastLine(root, forward, pos)) {
  114140. var rng = insertEmptyLine(root, rootBlock, rootBlockAttrs, forward);
  114141. editor.selection.setRng(rng);
  114142. return true;
  114143. } else {
  114144. return false;
  114145. }
  114146. });
  114147. };
  114148. var moveV$2 = function (editor, forward) {
  114149. if (editor.selection.isCollapsed()) {
  114150. return moveCaretToNewEmptyLine(editor, forward);
  114151. } else {
  114152. return false;
  114153. }
  114154. };
  114155. var defaultPatterns = function (patterns) {
  114156. return map$3(patterns, function (pattern) {
  114157. return __assign({
  114158. shiftKey: false,
  114159. altKey: false,
  114160. ctrlKey: false,
  114161. metaKey: false,
  114162. keyCode: 0,
  114163. action: noop
  114164. }, pattern);
  114165. });
  114166. };
  114167. var matchesEvent = function (pattern, evt) {
  114168. return evt.keyCode === pattern.keyCode && evt.shiftKey === pattern.shiftKey && evt.altKey === pattern.altKey && evt.ctrlKey === pattern.ctrlKey && evt.metaKey === pattern.metaKey;
  114169. };
  114170. var match$1 = function (patterns, evt) {
  114171. return bind(defaultPatterns(patterns), function (pattern) {
  114172. return matchesEvent(pattern, evt) ? [pattern] : [];
  114173. });
  114174. };
  114175. var action = function (f) {
  114176. var x = [];
  114177. for (var _i = 1; _i < arguments.length; _i++) {
  114178. x[_i - 1] = arguments[_i];
  114179. }
  114180. return function () {
  114181. return f.apply(null, x);
  114182. };
  114183. };
  114184. var execute = function (patterns, evt) {
  114185. return find$3(match$1(patterns, evt), function (pattern) {
  114186. return pattern.action();
  114187. });
  114188. };
  114189. var moveH$1 = function (editor, forward) {
  114190. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  114191. var range = editor.selection.getRng();
  114192. return moveHorizontally(editor, direction, range, isBeforeMedia, isAfterMedia, isMedia$2).exists(function (newRange) {
  114193. moveToRange(editor, newRange);
  114194. return true;
  114195. });
  114196. };
  114197. var moveV$1 = function (editor, down) {
  114198. var direction = down ? 1 : -1;
  114199. var range = editor.selection.getRng();
  114200. return moveVertically(editor, direction, range, isBeforeMedia, isAfterMedia, isMedia$2).exists(function (newRange) {
  114201. moveToRange(editor, newRange);
  114202. return true;
  114203. });
  114204. };
  114205. var moveToLineEndPoint = function (editor, forward) {
  114206. var isNearMedia = forward ? isAfterMedia : isBeforeMedia;
  114207. return moveToLineEndPoint$3(editor, forward, isNearMedia);
  114208. };
  114209. var deflate = function (rect, delta) {
  114210. return {
  114211. left: rect.left - delta,
  114212. top: rect.top - delta,
  114213. right: rect.right + delta * 2,
  114214. bottom: rect.bottom + delta * 2,
  114215. width: rect.width + delta,
  114216. height: rect.height + delta
  114217. };
  114218. };
  114219. var getCorners = function (getYAxisValue, tds) {
  114220. return bind(tds, function (td) {
  114221. var rect = deflate(clone(td.getBoundingClientRect()), -1);
  114222. return [
  114223. {
  114224. x: rect.left,
  114225. y: getYAxisValue(rect),
  114226. cell: td
  114227. },
  114228. {
  114229. x: rect.right,
  114230. y: getYAxisValue(rect),
  114231. cell: td
  114232. }
  114233. ];
  114234. });
  114235. };
  114236. var findClosestCorner = function (corners, x, y) {
  114237. return foldl(corners, function (acc, newCorner) {
  114238. return acc.fold(function () {
  114239. return Optional.some(newCorner);
  114240. }, function (oldCorner) {
  114241. var oldDist = Math.sqrt(Math.abs(oldCorner.x - x) + Math.abs(oldCorner.y - y));
  114242. var newDist = Math.sqrt(Math.abs(newCorner.x - x) + Math.abs(newCorner.y - y));
  114243. return Optional.some(newDist < oldDist ? newCorner : oldCorner);
  114244. });
  114245. }, Optional.none());
  114246. };
  114247. var getClosestCell = function (getYAxisValue, isTargetCorner, table, x, y) {
  114248. var cells = descendants(SugarElement.fromDom(table), 'td,th,caption').map(function (e) {
  114249. return e.dom;
  114250. });
  114251. var corners = filter$4(getCorners(getYAxisValue, cells), function (corner) {
  114252. return isTargetCorner(corner, y);
  114253. });
  114254. return findClosestCorner(corners, x, y).map(function (corner) {
  114255. return corner.cell;
  114256. });
  114257. };
  114258. var getBottomValue = function (rect) {
  114259. return rect.bottom;
  114260. };
  114261. var getTopValue = function (rect) {
  114262. return rect.top;
  114263. };
  114264. var isAbove = function (corner, y) {
  114265. return corner.y < y;
  114266. };
  114267. var isBelow = function (corner, y) {
  114268. return corner.y > y;
  114269. };
  114270. var getClosestCellAbove = curry(getClosestCell, getBottomValue, isAbove);
  114271. var getClosestCellBelow = curry(getClosestCell, getTopValue, isBelow);
  114272. var findClosestPositionInAboveCell = function (table, pos) {
  114273. return head(pos.getClientRects()).bind(function (rect) {
  114274. return getClosestCellAbove(table, rect.left, rect.top);
  114275. }).bind(function (cell) {
  114276. return findClosestHorizontalPosition(getLastLinePositions(cell), pos);
  114277. });
  114278. };
  114279. var findClosestPositionInBelowCell = function (table, pos) {
  114280. return last$2(pos.getClientRects()).bind(function (rect) {
  114281. return getClosestCellBelow(table, rect.left, rect.top);
  114282. }).bind(function (cell) {
  114283. return findClosestHorizontalPosition(getFirstLinePositions(cell), pos);
  114284. });
  114285. };
  114286. var hasNextBreak = function (getPositionsUntil, scope, lineInfo) {
  114287. return lineInfo.breakAt.exists(function (breakPos) {
  114288. return getPositionsUntil(scope, breakPos).breakAt.isSome();
  114289. });
  114290. };
  114291. var startsWithWrapBreak = function (lineInfo) {
  114292. return lineInfo.breakType === BreakType.Wrap && lineInfo.positions.length === 0;
  114293. };
  114294. var startsWithBrBreak = function (lineInfo) {
  114295. return lineInfo.breakType === BreakType.Br && lineInfo.positions.length === 1;
  114296. };
  114297. var isAtTableCellLine = function (getPositionsUntil, scope, pos) {
  114298. var lineInfo = getPositionsUntil(scope, pos);
  114299. if (startsWithWrapBreak(lineInfo) || !isBr$5(pos.getNode()) && startsWithBrBreak(lineInfo)) {
  114300. return !hasNextBreak(getPositionsUntil, scope, lineInfo);
  114301. } else {
  114302. return lineInfo.breakAt.isNone();
  114303. }
  114304. };
  114305. var isAtFirstTableCellLine = curry(isAtTableCellLine, getPositionsUntilPreviousLine);
  114306. var isAtLastTableCellLine = curry(isAtTableCellLine, getPositionsUntilNextLine);
  114307. var isCaretAtStartOrEndOfTable = function (forward, rng, table) {
  114308. var caretPos = CaretPosition.fromRangeStart(rng);
  114309. return positionIn(!forward, table).exists(function (pos) {
  114310. return pos.isEqual(caretPos);
  114311. });
  114312. };
  114313. var navigateHorizontally = function (editor, forward, table, _td) {
  114314. var rng = editor.selection.getRng();
  114315. var direction = forward ? 1 : -1;
  114316. if (isFakeCaretTableBrowser() && isCaretAtStartOrEndOfTable(forward, rng, table)) {
  114317. showCaret(direction, editor, table, !forward, false).each(function (newRng) {
  114318. moveToRange(editor, newRng);
  114319. });
  114320. return true;
  114321. }
  114322. return false;
  114323. };
  114324. var getClosestAbovePosition = function (root, table, start) {
  114325. return findClosestPositionInAboveCell(table, start).orThunk(function () {
  114326. return head(start.getClientRects()).bind(function (rect) {
  114327. return findClosestHorizontalPositionFromPoint(getPositionsAbove(root, CaretPosition.before(table)), rect.left);
  114328. });
  114329. }).getOr(CaretPosition.before(table));
  114330. };
  114331. var getClosestBelowPosition = function (root, table, start) {
  114332. return findClosestPositionInBelowCell(table, start).orThunk(function () {
  114333. return head(start.getClientRects()).bind(function (rect) {
  114334. return findClosestHorizontalPositionFromPoint(getPositionsBelow(root, CaretPosition.after(table)), rect.left);
  114335. });
  114336. }).getOr(CaretPosition.after(table));
  114337. };
  114338. var getTable = function (previous, pos) {
  114339. var node = pos.getNode(previous);
  114340. return isElement$5(node) && node.nodeName === 'TABLE' ? Optional.some(node) : Optional.none();
  114341. };
  114342. var renderBlock = function (down, editor, table, pos) {
  114343. var forcedRootBlock = getForcedRootBlock(editor);
  114344. if (forcedRootBlock) {
  114345. editor.undoManager.transact(function () {
  114346. var element = SugarElement.fromTag(forcedRootBlock);
  114347. setAll$1(element, getForcedRootBlockAttrs(editor));
  114348. append$1(element, SugarElement.fromTag('br'));
  114349. if (down) {
  114350. after$3(SugarElement.fromDom(table), element);
  114351. } else {
  114352. before$4(SugarElement.fromDom(table), element);
  114353. }
  114354. var rng = editor.dom.createRng();
  114355. rng.setStart(element.dom, 0);
  114356. rng.setEnd(element.dom, 0);
  114357. moveToRange(editor, rng);
  114358. });
  114359. } else {
  114360. moveToRange(editor, pos.toRange());
  114361. }
  114362. };
  114363. var moveCaret = function (editor, down, pos) {
  114364. var table = down ? getTable(true, pos) : getTable(false, pos);
  114365. var last = down === false;
  114366. table.fold(function () {
  114367. return moveToRange(editor, pos.toRange());
  114368. }, function (table) {
  114369. return positionIn(last, editor.getBody()).filter(function (lastPos) {
  114370. return lastPos.isEqual(pos);
  114371. }).fold(function () {
  114372. return moveToRange(editor, pos.toRange());
  114373. }, function (_) {
  114374. return renderBlock(down, editor, table, pos);
  114375. });
  114376. });
  114377. };
  114378. var navigateVertically = function (editor, down, table, td) {
  114379. var rng = editor.selection.getRng();
  114380. var pos = CaretPosition.fromRangeStart(rng);
  114381. var root = editor.getBody();
  114382. if (!down && isAtFirstTableCellLine(td, pos)) {
  114383. var newPos = getClosestAbovePosition(root, table, pos);
  114384. moveCaret(editor, down, newPos);
  114385. return true;
  114386. } else if (down && isAtLastTableCellLine(td, pos)) {
  114387. var newPos = getClosestBelowPosition(root, table, pos);
  114388. moveCaret(editor, down, newPos);
  114389. return true;
  114390. } else {
  114391. return false;
  114392. }
  114393. };
  114394. var move$1 = function (editor, forward, mover) {
  114395. return Optional.from(editor.dom.getParent(editor.selection.getNode(), 'td,th')).bind(function (td) {
  114396. return Optional.from(editor.dom.getParent(td, 'table')).map(function (table) {
  114397. return mover(editor, forward, table, td);
  114398. });
  114399. }).getOr(false);
  114400. };
  114401. var moveH = function (editor, forward) {
  114402. return move$1(editor, forward, navigateHorizontally);
  114403. };
  114404. var moveV = function (editor, forward) {
  114405. return move$1(editor, forward, navigateVertically);
  114406. };
  114407. var executeKeydownOverride$3 = function (editor, caret, evt) {
  114408. var os = detect().os;
  114409. execute([
  114410. {
  114411. keyCode: VK.RIGHT,
  114412. action: action(moveH$2, editor, true)
  114413. },
  114414. {
  114415. keyCode: VK.LEFT,
  114416. action: action(moveH$2, editor, false)
  114417. },
  114418. {
  114419. keyCode: VK.UP,
  114420. action: action(moveV$3, editor, false)
  114421. },
  114422. {
  114423. keyCode: VK.DOWN,
  114424. action: action(moveV$3, editor, true)
  114425. },
  114426. {
  114427. keyCode: VK.RIGHT,
  114428. action: action(moveH, editor, true)
  114429. },
  114430. {
  114431. keyCode: VK.LEFT,
  114432. action: action(moveH, editor, false)
  114433. },
  114434. {
  114435. keyCode: VK.UP,
  114436. action: action(moveV, editor, false)
  114437. },
  114438. {
  114439. keyCode: VK.DOWN,
  114440. action: action(moveV, editor, true)
  114441. },
  114442. {
  114443. keyCode: VK.RIGHT,
  114444. action: action(moveH$1, editor, true)
  114445. },
  114446. {
  114447. keyCode: VK.LEFT,
  114448. action: action(moveH$1, editor, false)
  114449. },
  114450. {
  114451. keyCode: VK.UP,
  114452. action: action(moveV$1, editor, false)
  114453. },
  114454. {
  114455. keyCode: VK.DOWN,
  114456. action: action(moveV$1, editor, true)
  114457. },
  114458. {
  114459. keyCode: VK.RIGHT,
  114460. action: action(move$2, editor, caret, true)
  114461. },
  114462. {
  114463. keyCode: VK.LEFT,
  114464. action: action(move$2, editor, caret, false)
  114465. },
  114466. {
  114467. keyCode: VK.RIGHT,
  114468. ctrlKey: !os.isOSX(),
  114469. altKey: os.isOSX(),
  114470. action: action(moveNextWord, editor, caret)
  114471. },
  114472. {
  114473. keyCode: VK.LEFT,
  114474. ctrlKey: !os.isOSX(),
  114475. altKey: os.isOSX(),
  114476. action: action(movePrevWord, editor, caret)
  114477. },
  114478. {
  114479. keyCode: VK.UP,
  114480. action: action(moveV$2, editor, false)
  114481. },
  114482. {
  114483. keyCode: VK.DOWN,
  114484. action: action(moveV$2, editor, true)
  114485. }
  114486. ], evt).each(function (_) {
  114487. evt.preventDefault();
  114488. });
  114489. };
  114490. var setup$b = function (editor, caret) {
  114491. editor.on('keydown', function (evt) {
  114492. if (evt.isDefaultPrevented() === false) {
  114493. executeKeydownOverride$3(editor, caret, evt);
  114494. }
  114495. });
  114496. };
  114497. var executeKeydownOverride$2 = function (editor, caret, evt) {
  114498. execute([
  114499. {
  114500. keyCode: VK.BACKSPACE,
  114501. action: action(backspaceDelete, editor, false)
  114502. },
  114503. {
  114504. keyCode: VK.BACKSPACE,
  114505. action: action(backspaceDelete$5, editor, false)
  114506. },
  114507. {
  114508. keyCode: VK.DELETE,
  114509. action: action(backspaceDelete$5, editor, true)
  114510. },
  114511. {
  114512. keyCode: VK.BACKSPACE,
  114513. action: action(backspaceDelete$6, editor, false)
  114514. },
  114515. {
  114516. keyCode: VK.DELETE,
  114517. action: action(backspaceDelete$6, editor, true)
  114518. },
  114519. {
  114520. keyCode: VK.BACKSPACE,
  114521. action: action(backspaceDelete$3, editor, caret, false)
  114522. },
  114523. {
  114524. keyCode: VK.DELETE,
  114525. action: action(backspaceDelete$3, editor, caret, true)
  114526. },
  114527. {
  114528. keyCode: VK.BACKSPACE,
  114529. action: action(backspaceDelete$9, editor, false)
  114530. },
  114531. {
  114532. keyCode: VK.DELETE,
  114533. action: action(backspaceDelete$9, editor, true)
  114534. },
  114535. {
  114536. keyCode: VK.BACKSPACE,
  114537. action: action(backspaceDelete$4, editor, false)
  114538. },
  114539. {
  114540. keyCode: VK.DELETE,
  114541. action: action(backspaceDelete$4, editor, true)
  114542. },
  114543. {
  114544. keyCode: VK.BACKSPACE,
  114545. action: action(backspaceDelete$1, editor, false)
  114546. },
  114547. {
  114548. keyCode: VK.DELETE,
  114549. action: action(backspaceDelete$1, editor, true)
  114550. },
  114551. {
  114552. keyCode: VK.BACKSPACE,
  114553. action: action(backspaceDelete$7, editor, false)
  114554. },
  114555. {
  114556. keyCode: VK.DELETE,
  114557. action: action(backspaceDelete$7, editor, true)
  114558. },
  114559. {
  114560. keyCode: VK.BACKSPACE,
  114561. action: action(backspaceDelete$8, editor, false)
  114562. },
  114563. {
  114564. keyCode: VK.DELETE,
  114565. action: action(backspaceDelete$8, editor, true)
  114566. },
  114567. {
  114568. keyCode: VK.BACKSPACE,
  114569. action: action(backspaceDelete$2, editor, false)
  114570. },
  114571. {
  114572. keyCode: VK.DELETE,
  114573. action: action(backspaceDelete$2, editor, true)
  114574. }
  114575. ], evt).each(function (_) {
  114576. evt.preventDefault();
  114577. });
  114578. };
  114579. var executeKeyupOverride = function (editor, evt) {
  114580. execute([
  114581. {
  114582. keyCode: VK.BACKSPACE,
  114583. action: action(paddEmptyElement, editor)
  114584. },
  114585. {
  114586. keyCode: VK.DELETE,
  114587. action: action(paddEmptyElement, editor)
  114588. }
  114589. ], evt);
  114590. };
  114591. var setup$a = function (editor, caret) {
  114592. editor.on('keydown', function (evt) {
  114593. if (evt.isDefaultPrevented() === false) {
  114594. executeKeydownOverride$2(editor, caret, evt);
  114595. }
  114596. });
  114597. editor.on('keyup', function (evt) {
  114598. if (evt.isDefaultPrevented() === false) {
  114599. executeKeyupOverride(editor, evt);
  114600. }
  114601. });
  114602. };
  114603. var firstNonWhiteSpaceNodeSibling = function (node) {
  114604. while (node) {
  114605. if (node.nodeType === 1 || node.nodeType === 3 && node.data && /[\r\n\s]/.test(node.data)) {
  114606. return node;
  114607. }
  114608. node = node.nextSibling;
  114609. }
  114610. };
  114611. var moveToCaretPosition = function (editor, root) {
  114612. var node, lastNode = root;
  114613. var dom = editor.dom;
  114614. var moveCaretBeforeOnEnterElementsMap = editor.schema.getMoveCaretBeforeOnEnterElements();
  114615. if (!root) {
  114616. return;
  114617. }
  114618. if (/^(LI|DT|DD)$/.test(root.nodeName)) {
  114619. var firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);
  114620. if (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {
  114621. root.insertBefore(dom.doc.createTextNode(nbsp), root.firstChild);
  114622. }
  114623. }
  114624. var rng = dom.createRng();
  114625. root.normalize();
  114626. if (root.hasChildNodes()) {
  114627. var walker = new DomTreeWalker(root, root);
  114628. while (node = walker.current()) {
  114629. if (isText$7(node)) {
  114630. rng.setStart(node, 0);
  114631. rng.setEnd(node, 0);
  114632. break;
  114633. }
  114634. if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {
  114635. rng.setStartBefore(node);
  114636. rng.setEndBefore(node);
  114637. break;
  114638. }
  114639. lastNode = node;
  114640. node = walker.next();
  114641. }
  114642. if (!node) {
  114643. rng.setStart(lastNode, 0);
  114644. rng.setEnd(lastNode, 0);
  114645. }
  114646. } else {
  114647. if (isBr$5(root)) {
  114648. if (root.nextSibling && dom.isBlock(root.nextSibling)) {
  114649. rng.setStartBefore(root);
  114650. rng.setEndBefore(root);
  114651. } else {
  114652. rng.setStartAfter(root);
  114653. rng.setEndAfter(root);
  114654. }
  114655. } else {
  114656. rng.setStart(root, 0);
  114657. rng.setEnd(root, 0);
  114658. }
  114659. }
  114660. editor.selection.setRng(rng);
  114661. scrollRangeIntoView(editor, rng);
  114662. };
  114663. var getEditableRoot$1 = function (dom, node) {
  114664. var root = dom.getRoot();
  114665. var parent, editableRoot;
  114666. parent = node;
  114667. while (parent !== root && dom.getContentEditable(parent) !== 'false') {
  114668. if (dom.getContentEditable(parent) === 'true') {
  114669. editableRoot = parent;
  114670. }
  114671. parent = parent.parentNode;
  114672. }
  114673. return parent !== root ? editableRoot : root;
  114674. };
  114675. var getParentBlock = function (editor) {
  114676. return Optional.from(editor.dom.getParent(editor.selection.getStart(true), editor.dom.isBlock));
  114677. };
  114678. var getParentBlockName = function (editor) {
  114679. return getParentBlock(editor).fold(constant(''), function (parentBlock) {
  114680. return parentBlock.nodeName.toUpperCase();
  114681. });
  114682. };
  114683. var isListItemParentBlock = function (editor) {
  114684. return getParentBlock(editor).filter(function (elm) {
  114685. return isListItem(SugarElement.fromDom(elm));
  114686. }).isSome();
  114687. };
  114688. var hasFirstChild = function (elm, name) {
  114689. return elm.firstChild && elm.firstChild.nodeName === name;
  114690. };
  114691. var isFirstChild = function (elm) {
  114692. var _a;
  114693. return ((_a = elm.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === elm;
  114694. };
  114695. var hasParent = function (elm, parentName) {
  114696. return elm && elm.parentNode && elm.parentNode.nodeName === parentName;
  114697. };
  114698. var isListBlock = function (elm) {
  114699. return elm && /^(OL|UL|LI)$/.test(elm.nodeName);
  114700. };
  114701. var isNestedList = function (elm) {
  114702. return isListBlock(elm) && isListBlock(elm.parentNode);
  114703. };
  114704. var getContainerBlock = function (containerBlock) {
  114705. var containerBlockParent = containerBlock.parentNode;
  114706. if (/^(LI|DT|DD)$/.test(containerBlockParent.nodeName)) {
  114707. return containerBlockParent;
  114708. }
  114709. return containerBlock;
  114710. };
  114711. var isFirstOrLastLi = function (containerBlock, parentBlock, first) {
  114712. var node = containerBlock[first ? 'firstChild' : 'lastChild'];
  114713. while (node) {
  114714. if (isElement$5(node)) {
  114715. break;
  114716. }
  114717. node = node[first ? 'nextSibling' : 'previousSibling'];
  114718. }
  114719. return node === parentBlock;
  114720. };
  114721. var insert$3 = function (editor, createNewBlock, containerBlock, parentBlock, newBlockName) {
  114722. var dom = editor.dom;
  114723. var rng = editor.selection.getRng();
  114724. if (containerBlock === editor.getBody()) {
  114725. return;
  114726. }
  114727. if (isNestedList(containerBlock)) {
  114728. newBlockName = 'LI';
  114729. }
  114730. var newBlock = newBlockName ? createNewBlock(newBlockName) : dom.create('BR');
  114731. if (isFirstOrLastLi(containerBlock, parentBlock, true) && isFirstOrLastLi(containerBlock, parentBlock, false)) {
  114732. if (hasParent(containerBlock, 'LI')) {
  114733. var containerBlockParent = getContainerBlock(containerBlock);
  114734. dom.insertAfter(newBlock, containerBlockParent);
  114735. if (isFirstChild(containerBlock)) {
  114736. dom.remove(containerBlockParent);
  114737. } else {
  114738. dom.remove(containerBlock);
  114739. }
  114740. } else {
  114741. dom.replace(newBlock, containerBlock);
  114742. }
  114743. } else if (isFirstOrLastLi(containerBlock, parentBlock, true)) {
  114744. if (hasParent(containerBlock, 'LI')) {
  114745. dom.insertAfter(newBlock, getContainerBlock(containerBlock));
  114746. newBlock.appendChild(dom.doc.createTextNode(' '));
  114747. newBlock.appendChild(containerBlock);
  114748. } else {
  114749. containerBlock.parentNode.insertBefore(newBlock, containerBlock);
  114750. }
  114751. dom.remove(parentBlock);
  114752. } else if (isFirstOrLastLi(containerBlock, parentBlock, false)) {
  114753. dom.insertAfter(newBlock, getContainerBlock(containerBlock));
  114754. dom.remove(parentBlock);
  114755. } else {
  114756. containerBlock = getContainerBlock(containerBlock);
  114757. var tmpRng = rng.cloneRange();
  114758. tmpRng.setStartAfter(parentBlock);
  114759. tmpRng.setEndAfter(containerBlock);
  114760. var fragment = tmpRng.extractContents();
  114761. if (newBlockName === 'LI' && hasFirstChild(fragment, 'LI')) {
  114762. newBlock = fragment.firstChild;
  114763. dom.insertAfter(fragment, containerBlock);
  114764. } else {
  114765. dom.insertAfter(fragment, containerBlock);
  114766. dom.insertAfter(newBlock, containerBlock);
  114767. }
  114768. dom.remove(parentBlock);
  114769. }
  114770. moveToCaretPosition(editor, newBlock);
  114771. };
  114772. var trimZwsp = function (fragment) {
  114773. each$k(descendants$1(SugarElement.fromDom(fragment), isText$8), function (text) {
  114774. var rawNode = text.dom;
  114775. rawNode.nodeValue = trim$2(rawNode.nodeValue);
  114776. });
  114777. };
  114778. var isEmptyAnchor = function (dom, elm) {
  114779. return elm && elm.nodeName === 'A' && dom.isEmpty(elm);
  114780. };
  114781. var isTableCell = function (node) {
  114782. return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
  114783. };
  114784. var emptyBlock = function (elm) {
  114785. elm.innerHTML = '<br data-mce-bogus="1">';
  114786. };
  114787. var containerAndSiblingName = function (container, nodeName) {
  114788. return container.nodeName === nodeName || container.previousSibling && container.previousSibling.nodeName === nodeName;
  114789. };
  114790. var canSplitBlock = function (dom, node) {
  114791. return node && dom.isBlock(node) && !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) && !/^(fixed|absolute)/i.test(node.style.position) && dom.getContentEditable(node) !== 'true';
  114792. };
  114793. var trimInlineElementsOnLeftSideOfBlock = function (dom, nonEmptyElementsMap, block) {
  114794. var node = block;
  114795. var firstChilds = [];
  114796. var i;
  114797. if (!node) {
  114798. return;
  114799. }
  114800. while (node = node.firstChild) {
  114801. if (dom.isBlock(node)) {
  114802. return;
  114803. }
  114804. if (isElement$5(node) && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
  114805. firstChilds.push(node);
  114806. }
  114807. }
  114808. i = firstChilds.length;
  114809. while (i--) {
  114810. node = firstChilds[i];
  114811. if (!node.hasChildNodes() || node.firstChild === node.lastChild && node.firstChild.nodeValue === '') {
  114812. dom.remove(node);
  114813. } else {
  114814. if (isEmptyAnchor(dom, node)) {
  114815. dom.remove(node);
  114816. }
  114817. }
  114818. }
  114819. };
  114820. var normalizeZwspOffset = function (start, container, offset) {
  114821. if (isText$7(container) === false) {
  114822. return offset;
  114823. } else if (start) {
  114824. return offset === 1 && container.data.charAt(offset - 1) === ZWSP$1 ? 0 : offset;
  114825. } else {
  114826. return offset === container.data.length - 1 && container.data.charAt(offset) === ZWSP$1 ? container.data.length : offset;
  114827. }
  114828. };
  114829. var includeZwspInRange = function (rng) {
  114830. var newRng = rng.cloneRange();
  114831. newRng.setStart(rng.startContainer, normalizeZwspOffset(true, rng.startContainer, rng.startOffset));
  114832. newRng.setEnd(rng.endContainer, normalizeZwspOffset(false, rng.endContainer, rng.endOffset));
  114833. return newRng;
  114834. };
  114835. var trimLeadingLineBreaks = function (node) {
  114836. do {
  114837. if (isText$7(node)) {
  114838. node.nodeValue = node.nodeValue.replace(/^[\r\n]+/, '');
  114839. }
  114840. node = node.firstChild;
  114841. } while (node);
  114842. };
  114843. var getEditableRoot = function (dom, node) {
  114844. var root = dom.getRoot();
  114845. var parent, editableRoot;
  114846. parent = node;
  114847. while (parent !== root && dom.getContentEditable(parent) !== 'false') {
  114848. if (dom.getContentEditable(parent) === 'true') {
  114849. editableRoot = parent;
  114850. }
  114851. parent = parent.parentNode;
  114852. }
  114853. return parent !== root ? editableRoot : root;
  114854. };
  114855. var applyAttributes = function (editor, node, forcedRootBlockAttrs) {
  114856. var dom = editor.dom;
  114857. Optional.from(forcedRootBlockAttrs.style).map(dom.parseStyle).each(function (attrStyles) {
  114858. var currentStyles = getAllRaw(SugarElement.fromDom(node));
  114859. var newStyles = __assign(__assign({}, currentStyles), attrStyles);
  114860. dom.setStyles(node, newStyles);
  114861. });
  114862. var attrClassesOpt = Optional.from(forcedRootBlockAttrs.class).map(function (attrClasses) {
  114863. return attrClasses.split(/\s+/);
  114864. });
  114865. var currentClassesOpt = Optional.from(node.className).map(function (currentClasses) {
  114866. return filter$4(currentClasses.split(/\s+/), function (clazz) {
  114867. return clazz !== '';
  114868. });
  114869. });
  114870. lift2(attrClassesOpt, currentClassesOpt, function (attrClasses, currentClasses) {
  114871. var filteredClasses = filter$4(currentClasses, function (clazz) {
  114872. return !contains$3(attrClasses, clazz);
  114873. });
  114874. var newClasses = __spreadArray(__spreadArray([], attrClasses, true), filteredClasses, true);
  114875. dom.setAttrib(node, 'class', newClasses.join(' '));
  114876. });
  114877. var appliedAttrs = [
  114878. 'style',
  114879. 'class'
  114880. ];
  114881. var remainingAttrs = filter$3(forcedRootBlockAttrs, function (_, attrs) {
  114882. return !contains$3(appliedAttrs, attrs);
  114883. });
  114884. dom.setAttribs(node, remainingAttrs);
  114885. };
  114886. var setForcedBlockAttrs = function (editor, node) {
  114887. var forcedRootBlockName = getForcedRootBlock(editor);
  114888. if (forcedRootBlockName && forcedRootBlockName.toLowerCase() === node.tagName.toLowerCase()) {
  114889. var forcedRootBlockAttrs = getForcedRootBlockAttrs(editor);
  114890. applyAttributes(editor, node, forcedRootBlockAttrs);
  114891. }
  114892. };
  114893. var wrapSelfAndSiblingsInDefaultBlock = function (editor, newBlockName, rng, container, offset) {
  114894. var newBlock, parentBlock, startNode, node, next, rootBlockName;
  114895. var blockName = newBlockName || 'P';
  114896. var dom = editor.dom, editableRoot = getEditableRoot(dom, container);
  114897. parentBlock = dom.getParent(container, dom.isBlock);
  114898. if (!parentBlock || !canSplitBlock(dom, parentBlock)) {
  114899. parentBlock = parentBlock || editableRoot;
  114900. if (parentBlock === editor.getBody() || isTableCell(parentBlock)) {
  114901. rootBlockName = parentBlock.nodeName.toLowerCase();
  114902. } else {
  114903. rootBlockName = parentBlock.parentNode.nodeName.toLowerCase();
  114904. }
  114905. if (!parentBlock.hasChildNodes()) {
  114906. newBlock = dom.create(blockName);
  114907. setForcedBlockAttrs(editor, newBlock);
  114908. parentBlock.appendChild(newBlock);
  114909. rng.setStart(newBlock, 0);
  114910. rng.setEnd(newBlock, 0);
  114911. return newBlock;
  114912. }
  114913. node = container;
  114914. while (node.parentNode !== parentBlock) {
  114915. node = node.parentNode;
  114916. }
  114917. while (node && !dom.isBlock(node)) {
  114918. startNode = node;
  114919. node = node.previousSibling;
  114920. }
  114921. if (startNode && editor.schema.isValidChild(rootBlockName, blockName.toLowerCase())) {
  114922. newBlock = dom.create(blockName);
  114923. setForcedBlockAttrs(editor, newBlock);
  114924. startNode.parentNode.insertBefore(newBlock, startNode);
  114925. node = startNode;
  114926. while (node && !dom.isBlock(node)) {
  114927. next = node.nextSibling;
  114928. newBlock.appendChild(node);
  114929. node = next;
  114930. }
  114931. rng.setStart(container, offset);
  114932. rng.setEnd(container, offset);
  114933. }
  114934. }
  114935. return container;
  114936. };
  114937. var addBrToBlockIfNeeded = function (dom, block) {
  114938. block.normalize();
  114939. var lastChild = block.lastChild;
  114940. if (!lastChild || /^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true))) {
  114941. dom.add(block, 'br');
  114942. }
  114943. };
  114944. var insert$2 = function (editor, evt) {
  114945. var tmpRng, container, offset, parentBlock;
  114946. var newBlock, fragment, containerBlock, parentBlockName, newBlockName, isAfterLastNodeInContainer;
  114947. var dom = editor.dom;
  114948. var schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements();
  114949. var rng = editor.selection.getRng();
  114950. var createNewBlock = function (name) {
  114951. var node = container, block, clonedNode, caretNode;
  114952. var textInlineElements = schema.getTextInlineElements();
  114953. if (name || parentBlockName === 'TABLE' || parentBlockName === 'HR') {
  114954. block = dom.create(name || newBlockName);
  114955. } else {
  114956. block = parentBlock.cloneNode(false);
  114957. }
  114958. caretNode = block;
  114959. if (shouldKeepStyles(editor) === false) {
  114960. dom.setAttrib(block, 'style', null);
  114961. dom.setAttrib(block, 'class', null);
  114962. } else {
  114963. do {
  114964. if (textInlineElements[node.nodeName]) {
  114965. if (isCaretNode(node) || isBookmarkNode$1(node)) {
  114966. continue;
  114967. }
  114968. clonedNode = node.cloneNode(false);
  114969. dom.setAttrib(clonedNode, 'id', '');
  114970. if (block.hasChildNodes()) {
  114971. clonedNode.appendChild(block.firstChild);
  114972. block.appendChild(clonedNode);
  114973. } else {
  114974. caretNode = clonedNode;
  114975. block.appendChild(clonedNode);
  114976. }
  114977. }
  114978. } while ((node = node.parentNode) && node !== editableRoot);
  114979. }
  114980. setForcedBlockAttrs(editor, block);
  114981. emptyBlock(caretNode);
  114982. return block;
  114983. };
  114984. var isCaretAtStartOrEndOfBlock = function (start) {
  114985. var node, name;
  114986. var normalizedOffset = normalizeZwspOffset(start, container, offset);
  114987. if (isText$7(container) && (start ? normalizedOffset > 0 : normalizedOffset < container.nodeValue.length)) {
  114988. return false;
  114989. }
  114990. if (container.parentNode === parentBlock && isAfterLastNodeInContainer && !start) {
  114991. return true;
  114992. }
  114993. if (start && isElement$5(container) && container === parentBlock.firstChild) {
  114994. return true;
  114995. }
  114996. if (containerAndSiblingName(container, 'TABLE') || containerAndSiblingName(container, 'HR')) {
  114997. return isAfterLastNodeInContainer && !start || !isAfterLastNodeInContainer && start;
  114998. }
  114999. var walker = new DomTreeWalker(container, parentBlock);
  115000. if (isText$7(container)) {
  115001. if (start && normalizedOffset === 0) {
  115002. walker.prev();
  115003. } else if (!start && normalizedOffset === container.nodeValue.length) {
  115004. walker.next();
  115005. }
  115006. }
  115007. while (node = walker.current()) {
  115008. if (isElement$5(node)) {
  115009. if (!node.getAttribute('data-mce-bogus')) {
  115010. name = node.nodeName.toLowerCase();
  115011. if (nonEmptyElementsMap[name] && name !== 'br') {
  115012. return false;
  115013. }
  115014. }
  115015. } else if (isText$7(node) && !isWhitespaceText(node.nodeValue)) {
  115016. return false;
  115017. }
  115018. if (start) {
  115019. walker.prev();
  115020. } else {
  115021. walker.next();
  115022. }
  115023. }
  115024. return true;
  115025. };
  115026. var insertNewBlockAfter = function () {
  115027. if (/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && containerBlockName !== 'HGROUP') {
  115028. newBlock = createNewBlock(newBlockName);
  115029. } else {
  115030. newBlock = createNewBlock();
  115031. }
  115032. if (shouldEndContainerOnEmptyBlock(editor) && canSplitBlock(dom, containerBlock) && dom.isEmpty(parentBlock)) {
  115033. newBlock = dom.split(containerBlock, parentBlock);
  115034. } else {
  115035. dom.insertAfter(newBlock, parentBlock);
  115036. }
  115037. moveToCaretPosition(editor, newBlock);
  115038. };
  115039. normalize$2(dom, rng).each(function (normRng) {
  115040. rng.setStart(normRng.startContainer, normRng.startOffset);
  115041. rng.setEnd(normRng.endContainer, normRng.endOffset);
  115042. });
  115043. container = rng.startContainer;
  115044. offset = rng.startOffset;
  115045. newBlockName = getForcedRootBlock(editor);
  115046. var shiftKey = !!(evt && evt.shiftKey);
  115047. var ctrlKey = !!(evt && evt.ctrlKey);
  115048. if (isElement$5(container) && container.hasChildNodes()) {
  115049. isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
  115050. container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
  115051. if (isAfterLastNodeInContainer && isText$7(container)) {
  115052. offset = container.nodeValue.length;
  115053. } else {
  115054. offset = 0;
  115055. }
  115056. }
  115057. var editableRoot = getEditableRoot(dom, container);
  115058. if (!editableRoot) {
  115059. return;
  115060. }
  115061. if (newBlockName && !shiftKey || !newBlockName && shiftKey) {
  115062. container = wrapSelfAndSiblingsInDefaultBlock(editor, newBlockName, rng, container, offset);
  115063. }
  115064. parentBlock = dom.getParent(container, dom.isBlock);
  115065. containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
  115066. parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : '';
  115067. var containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : '';
  115068. if (containerBlockName === 'LI' && !ctrlKey) {
  115069. parentBlock = containerBlock;
  115070. containerBlock = containerBlock.parentNode;
  115071. parentBlockName = containerBlockName;
  115072. }
  115073. if (/^(LI|DT|DD)$/.test(parentBlockName)) {
  115074. if (dom.isEmpty(parentBlock)) {
  115075. insert$3(editor, createNewBlock, containerBlock, parentBlock, newBlockName);
  115076. return;
  115077. }
  115078. }
  115079. if (newBlockName && parentBlock === editor.getBody()) {
  115080. return;
  115081. }
  115082. newBlockName = newBlockName || 'P';
  115083. if (isCaretContainerBlock$1(parentBlock)) {
  115084. newBlock = showCaretContainerBlock(parentBlock);
  115085. if (dom.isEmpty(parentBlock)) {
  115086. emptyBlock(parentBlock);
  115087. }
  115088. setForcedBlockAttrs(editor, newBlock);
  115089. moveToCaretPosition(editor, newBlock);
  115090. } else if (isCaretAtStartOrEndOfBlock()) {
  115091. insertNewBlockAfter();
  115092. } else if (isCaretAtStartOrEndOfBlock(true)) {
  115093. newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock);
  115094. moveToCaretPosition(editor, containerAndSiblingName(parentBlock, 'HR') ? newBlock : parentBlock);
  115095. } else {
  115096. tmpRng = includeZwspInRange(rng).cloneRange();
  115097. tmpRng.setEndAfter(parentBlock);
  115098. fragment = tmpRng.extractContents();
  115099. trimZwsp(fragment);
  115100. trimLeadingLineBreaks(fragment);
  115101. newBlock = fragment.firstChild;
  115102. dom.insertAfter(fragment, parentBlock);
  115103. trimInlineElementsOnLeftSideOfBlock(dom, nonEmptyElementsMap, newBlock);
  115104. addBrToBlockIfNeeded(dom, parentBlock);
  115105. if (dom.isEmpty(parentBlock)) {
  115106. emptyBlock(parentBlock);
  115107. }
  115108. newBlock.normalize();
  115109. if (dom.isEmpty(newBlock)) {
  115110. dom.remove(newBlock);
  115111. insertNewBlockAfter();
  115112. } else {
  115113. setForcedBlockAttrs(editor, newBlock);
  115114. moveToCaretPosition(editor, newBlock);
  115115. }
  115116. }
  115117. dom.setAttrib(newBlock, 'id', '');
  115118. editor.fire('NewBlock', { newBlock: newBlock });
  115119. };
  115120. var hasRightSideContent = function (schema, container, parentBlock) {
  115121. var walker = new DomTreeWalker(container, parentBlock);
  115122. var node;
  115123. var nonEmptyElementsMap = schema.getNonEmptyElements();
  115124. while (node = walker.next()) {
  115125. if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || node.length > 0) {
  115126. return true;
  115127. }
  115128. }
  115129. };
  115130. var moveSelectionToBr = function (editor, brElm, extraBr) {
  115131. var rng = editor.dom.createRng();
  115132. if (!extraBr) {
  115133. rng.setStartAfter(brElm);
  115134. rng.setEndAfter(brElm);
  115135. } else {
  115136. rng.setStartBefore(brElm);
  115137. rng.setEndBefore(brElm);
  115138. }
  115139. editor.selection.setRng(rng);
  115140. scrollRangeIntoView(editor, rng);
  115141. };
  115142. var insertBrAtCaret = function (editor, evt) {
  115143. var selection = editor.selection;
  115144. var dom = editor.dom;
  115145. var rng = selection.getRng();
  115146. var brElm;
  115147. var extraBr;
  115148. normalize$2(dom, rng).each(function (normRng) {
  115149. rng.setStart(normRng.startContainer, normRng.startOffset);
  115150. rng.setEnd(normRng.endContainer, normRng.endOffset);
  115151. });
  115152. var offset = rng.startOffset;
  115153. var container = rng.startContainer;
  115154. if (container.nodeType === 1 && container.hasChildNodes()) {
  115155. var isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
  115156. container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
  115157. if (isAfterLastNodeInContainer && container.nodeType === 3) {
  115158. offset = container.nodeValue.length;
  115159. } else {
  115160. offset = 0;
  115161. }
  115162. }
  115163. var parentBlock = dom.getParent(container, dom.isBlock);
  115164. var containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
  115165. var containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : '';
  115166. var isControlKey = !!(evt && evt.ctrlKey);
  115167. if (containerBlockName === 'LI' && !isControlKey) {
  115168. parentBlock = containerBlock;
  115169. }
  115170. if (container && container.nodeType === 3 && offset >= container.nodeValue.length) {
  115171. if (!hasRightSideContent(editor.schema, container, parentBlock)) {
  115172. brElm = dom.create('br');
  115173. rng.insertNode(brElm);
  115174. rng.setStartAfter(brElm);
  115175. rng.setEndAfter(brElm);
  115176. extraBr = true;
  115177. }
  115178. }
  115179. brElm = dom.create('br');
  115180. rangeInsertNode(dom, rng, brElm);
  115181. moveSelectionToBr(editor, brElm, extraBr);
  115182. editor.undoManager.add();
  115183. };
  115184. var insertBrBefore = function (editor, inline) {
  115185. var br = SugarElement.fromTag('br');
  115186. before$4(SugarElement.fromDom(inline), br);
  115187. editor.undoManager.add();
  115188. };
  115189. var insertBrAfter = function (editor, inline) {
  115190. if (!hasBrAfter(editor.getBody(), inline)) {
  115191. after$3(SugarElement.fromDom(inline), SugarElement.fromTag('br'));
  115192. }
  115193. var br = SugarElement.fromTag('br');
  115194. after$3(SugarElement.fromDom(inline), br);
  115195. moveSelectionToBr(editor, br.dom, false);
  115196. editor.undoManager.add();
  115197. };
  115198. var isBeforeBr = function (pos) {
  115199. return isBr$5(pos.getNode());
  115200. };
  115201. var hasBrAfter = function (rootNode, startNode) {
  115202. if (isBeforeBr(CaretPosition.after(startNode))) {
  115203. return true;
  115204. } else {
  115205. return nextPosition(rootNode, CaretPosition.after(startNode)).map(function (pos) {
  115206. return isBr$5(pos.getNode());
  115207. }).getOr(false);
  115208. }
  115209. };
  115210. var isAnchorLink = function (elm) {
  115211. return elm && elm.nodeName === 'A' && 'href' in elm;
  115212. };
  115213. var isInsideAnchor = function (location) {
  115214. return location.fold(never, isAnchorLink, isAnchorLink, never);
  115215. };
  115216. var readInlineAnchorLocation = function (editor) {
  115217. var isInlineTarget$1 = curry(isInlineTarget, editor);
  115218. var position = CaretPosition.fromRangeStart(editor.selection.getRng());
  115219. return readLocation(isInlineTarget$1, editor.getBody(), position).filter(isInsideAnchor);
  115220. };
  115221. var insertBrOutsideAnchor = function (editor, location) {
  115222. location.fold(noop, curry(insertBrBefore, editor), curry(insertBrAfter, editor), noop);
  115223. };
  115224. var insert$1 = function (editor, evt) {
  115225. var anchorLocation = readInlineAnchorLocation(editor);
  115226. if (anchorLocation.isSome()) {
  115227. anchorLocation.each(curry(insertBrOutsideAnchor, editor));
  115228. } else {
  115229. insertBrAtCaret(editor, evt);
  115230. }
  115231. };
  115232. var matchesSelector = function (editor, selector) {
  115233. return getParentBlock(editor).filter(function (parentBlock) {
  115234. return selector.length > 0 && is$2(SugarElement.fromDom(parentBlock), selector);
  115235. }).isSome();
  115236. };
  115237. var shouldInsertBr = function (editor) {
  115238. return matchesSelector(editor, getBrNewLineSelector(editor));
  115239. };
  115240. var shouldBlockNewLine$1 = function (editor) {
  115241. return matchesSelector(editor, getNoNewLineSelector(editor));
  115242. };
  115243. var newLineAction = Adt.generate([
  115244. { br: [] },
  115245. { block: [] },
  115246. { none: [] }
  115247. ]);
  115248. var shouldBlockNewLine = function (editor, _shiftKey) {
  115249. return shouldBlockNewLine$1(editor);
  115250. };
  115251. var isBrMode = function (requiredState) {
  115252. return function (editor, _shiftKey) {
  115253. var brMode = getForcedRootBlock(editor) === '';
  115254. return brMode === requiredState;
  115255. };
  115256. };
  115257. var inListBlock = function (requiredState) {
  115258. return function (editor, _shiftKey) {
  115259. return isListItemParentBlock(editor) === requiredState;
  115260. };
  115261. };
  115262. var inBlock = function (blockName, requiredState) {
  115263. return function (editor, _shiftKey) {
  115264. var state = getParentBlockName(editor) === blockName.toUpperCase();
  115265. return state === requiredState;
  115266. };
  115267. };
  115268. var inPreBlock = function (requiredState) {
  115269. return inBlock('pre', requiredState);
  115270. };
  115271. var inSummaryBlock = function () {
  115272. return inBlock('summary', true);
  115273. };
  115274. var shouldPutBrInPre = function (requiredState) {
  115275. return function (editor, _shiftKey) {
  115276. return shouldPutBrInPre$1(editor) === requiredState;
  115277. };
  115278. };
  115279. var inBrContext = function (editor, _shiftKey) {
  115280. return shouldInsertBr(editor);
  115281. };
  115282. var hasShiftKey = function (_editor, shiftKey) {
  115283. return shiftKey;
  115284. };
  115285. var canInsertIntoEditableRoot = function (editor) {
  115286. var forcedRootBlock = getForcedRootBlock(editor);
  115287. var rootEditable = getEditableRoot$1(editor.dom, editor.selection.getStart());
  115288. return rootEditable && editor.schema.isValidChild(rootEditable.nodeName, forcedRootBlock ? forcedRootBlock : 'P');
  115289. };
  115290. var match = function (predicates, action) {
  115291. return function (editor, shiftKey) {
  115292. var isMatch = foldl(predicates, function (res, p) {
  115293. return res && p(editor, shiftKey);
  115294. }, true);
  115295. return isMatch ? Optional.some(action) : Optional.none();
  115296. };
  115297. };
  115298. var getAction = function (editor, evt) {
  115299. return evaluateUntil([
  115300. match([shouldBlockNewLine], newLineAction.none()),
  115301. match([inSummaryBlock()], newLineAction.br()),
  115302. match([
  115303. inPreBlock(true),
  115304. shouldPutBrInPre(false),
  115305. hasShiftKey
  115306. ], newLineAction.br()),
  115307. match([
  115308. inPreBlock(true),
  115309. shouldPutBrInPre(false)
  115310. ], newLineAction.block()),
  115311. match([
  115312. inPreBlock(true),
  115313. shouldPutBrInPre(true),
  115314. hasShiftKey
  115315. ], newLineAction.block()),
  115316. match([
  115317. inPreBlock(true),
  115318. shouldPutBrInPre(true)
  115319. ], newLineAction.br()),
  115320. match([
  115321. inListBlock(true),
  115322. hasShiftKey
  115323. ], newLineAction.br()),
  115324. match([inListBlock(true)], newLineAction.block()),
  115325. match([
  115326. isBrMode(true),
  115327. hasShiftKey,
  115328. canInsertIntoEditableRoot
  115329. ], newLineAction.block()),
  115330. match([isBrMode(true)], newLineAction.br()),
  115331. match([inBrContext], newLineAction.br()),
  115332. match([
  115333. isBrMode(false),
  115334. hasShiftKey
  115335. ], newLineAction.br()),
  115336. match([canInsertIntoEditableRoot], newLineAction.block())
  115337. ], [
  115338. editor,
  115339. !!(evt && evt.shiftKey)
  115340. ]).getOr(newLineAction.none());
  115341. };
  115342. var insert = function (editor, evt) {
  115343. getAction(editor, evt).fold(function () {
  115344. insert$1(editor, evt);
  115345. }, function () {
  115346. insert$2(editor, evt);
  115347. }, noop);
  115348. };
  115349. var handleEnterKeyEvent = function (editor, event) {
  115350. if (event.isDefaultPrevented()) {
  115351. return;
  115352. }
  115353. event.preventDefault();
  115354. endTypingLevelIgnoreLocks(editor.undoManager);
  115355. editor.undoManager.transact(function () {
  115356. if (editor.selection.isCollapsed() === false) {
  115357. editor.execCommand('Delete');
  115358. }
  115359. insert(editor, event);
  115360. });
  115361. };
  115362. var setup$9 = function (editor) {
  115363. editor.on('keydown', function (event) {
  115364. if (event.keyCode === VK.ENTER) {
  115365. handleEnterKeyEvent(editor, event);
  115366. }
  115367. });
  115368. };
  115369. var executeKeydownOverride$1 = function (editor, caret, evt) {
  115370. execute([
  115371. {
  115372. keyCode: VK.END,
  115373. action: action(moveToLineEndPoint$1, editor, true)
  115374. },
  115375. {
  115376. keyCode: VK.HOME,
  115377. action: action(moveToLineEndPoint$1, editor, false)
  115378. },
  115379. {
  115380. keyCode: VK.END,
  115381. action: action(moveToLineEndPoint, editor, true)
  115382. },
  115383. {
  115384. keyCode: VK.HOME,
  115385. action: action(moveToLineEndPoint, editor, false)
  115386. },
  115387. {
  115388. keyCode: VK.END,
  115389. action: action(moveToLineEndPoint$2, editor, true, caret)
  115390. },
  115391. {
  115392. keyCode: VK.HOME,
  115393. action: action(moveToLineEndPoint$2, editor, false, caret)
  115394. }
  115395. ], evt).each(function (_) {
  115396. evt.preventDefault();
  115397. });
  115398. };
  115399. var setup$8 = function (editor, caret) {
  115400. editor.on('keydown', function (evt) {
  115401. if (evt.isDefaultPrevented() === false) {
  115402. executeKeydownOverride$1(editor, caret, evt);
  115403. }
  115404. });
  115405. };
  115406. var browser = detect().browser;
  115407. var setupIeInput = function (editor) {
  115408. var keypressThrotter = first(function () {
  115409. if (!editor.composing) {
  115410. normalizeNbspsInEditor(editor);
  115411. }
  115412. }, 0);
  115413. if (browser.isIE()) {
  115414. editor.on('keypress', function (_e) {
  115415. keypressThrotter.throttle();
  115416. });
  115417. editor.on('remove', function (_e) {
  115418. keypressThrotter.cancel();
  115419. });
  115420. }
  115421. };
  115422. var setup$7 = function (editor) {
  115423. setupIeInput(editor);
  115424. editor.on('input', function (e) {
  115425. if (e.isComposing === false) {
  115426. normalizeNbspsInEditor(editor);
  115427. }
  115428. });
  115429. };
  115430. var platform = detect();
  115431. var executeKeyupAction = function (editor, caret, evt) {
  115432. execute([
  115433. {
  115434. keyCode: VK.PAGE_UP,
  115435. action: action(moveToLineEndPoint$2, editor, false, caret)
  115436. },
  115437. {
  115438. keyCode: VK.PAGE_DOWN,
  115439. action: action(moveToLineEndPoint$2, editor, true, caret)
  115440. }
  115441. ], evt);
  115442. };
  115443. var stopImmediatePropagation = function (e) {
  115444. return e.stopImmediatePropagation();
  115445. };
  115446. var isPageUpDown = function (evt) {
  115447. return evt.keyCode === VK.PAGE_UP || evt.keyCode === VK.PAGE_DOWN;
  115448. };
  115449. var setNodeChangeBlocker = function (blocked, editor, block) {
  115450. if (block && !blocked.get()) {
  115451. editor.on('NodeChange', stopImmediatePropagation, true);
  115452. } else if (!block && blocked.get()) {
  115453. editor.off('NodeChange', stopImmediatePropagation);
  115454. }
  115455. blocked.set(block);
  115456. };
  115457. var setup$6 = function (editor, caret) {
  115458. if (platform.os.isOSX()) {
  115459. return;
  115460. }
  115461. var blocked = Cell(false);
  115462. editor.on('keydown', function (evt) {
  115463. if (isPageUpDown(evt)) {
  115464. setNodeChangeBlocker(blocked, editor, true);
  115465. }
  115466. });
  115467. editor.on('keyup', function (evt) {
  115468. if (evt.isDefaultPrevented() === false) {
  115469. executeKeyupAction(editor, caret, evt);
  115470. }
  115471. if (isPageUpDown(evt) && blocked.get()) {
  115472. setNodeChangeBlocker(blocked, editor, false);
  115473. editor.nodeChanged();
  115474. }
  115475. });
  115476. };
  115477. var insertTextAtPosition = function (text, pos) {
  115478. var container = pos.container();
  115479. var offset = pos.offset();
  115480. if (isText$7(container)) {
  115481. container.insertData(offset, text);
  115482. return Optional.some(CaretPosition(container, offset + text.length));
  115483. } else {
  115484. return getElementFromPosition(pos).map(function (elm) {
  115485. var textNode = SugarElement.fromText(text);
  115486. if (pos.isAtEnd()) {
  115487. after$3(elm, textNode);
  115488. } else {
  115489. before$4(elm, textNode);
  115490. }
  115491. return CaretPosition(textNode.dom, text.length);
  115492. });
  115493. }
  115494. };
  115495. var insertNbspAtPosition = curry(insertTextAtPosition, nbsp);
  115496. var insertSpaceAtPosition = curry(insertTextAtPosition, ' ');
  115497. var locationToCaretPosition = function (root) {
  115498. return function (location) {
  115499. return location.fold(function (element) {
  115500. return prevPosition(root.dom, CaretPosition.before(element));
  115501. }, function (element) {
  115502. return firstPositionIn(element);
  115503. }, function (element) {
  115504. return lastPositionIn(element);
  115505. }, function (element) {
  115506. return nextPosition(root.dom, CaretPosition.after(element));
  115507. });
  115508. };
  115509. };
  115510. var insertInlineBoundarySpaceOrNbsp = function (root, pos) {
  115511. return function (checkPos) {
  115512. return needsToHaveNbsp(root, checkPos) ? insertNbspAtPosition(pos) : insertSpaceAtPosition(pos);
  115513. };
  115514. };
  115515. var setSelection = function (editor) {
  115516. return function (pos) {
  115517. editor.selection.setRng(pos.toRange());
  115518. editor.nodeChanged();
  115519. return true;
  115520. };
  115521. };
  115522. var insertSpaceOrNbspAtSelection = function (editor) {
  115523. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  115524. var root = SugarElement.fromDom(editor.getBody());
  115525. if (editor.selection.isCollapsed()) {
  115526. var isInlineTarget$1 = curry(isInlineTarget, editor);
  115527. var caretPosition = CaretPosition.fromRangeStart(editor.selection.getRng());
  115528. return readLocation(isInlineTarget$1, editor.getBody(), caretPosition).bind(locationToCaretPosition(root)).bind(insertInlineBoundarySpaceOrNbsp(root, pos)).exists(setSelection(editor));
  115529. } else {
  115530. return false;
  115531. }
  115532. };
  115533. var executeKeydownOverride = function (editor, evt) {
  115534. execute([{
  115535. keyCode: VK.SPACEBAR,
  115536. action: action(insertSpaceOrNbspAtSelection, editor)
  115537. }], evt).each(function (_) {
  115538. evt.preventDefault();
  115539. });
  115540. };
  115541. var setup$5 = function (editor) {
  115542. editor.on('keydown', function (evt) {
  115543. if (evt.isDefaultPrevented() === false) {
  115544. executeKeydownOverride(editor, evt);
  115545. }
  115546. });
  115547. };
  115548. var registerKeyboardOverrides = function (editor) {
  115549. var caret = setupSelectedState(editor);
  115550. setup$c(editor);
  115551. setup$b(editor, caret);
  115552. setup$a(editor, caret);
  115553. setup$9(editor);
  115554. setup$5(editor);
  115555. setup$7(editor);
  115556. setup$8(editor, caret);
  115557. setup$6(editor, caret);
  115558. return caret;
  115559. };
  115560. var setup$4 = function (editor) {
  115561. if (!isRtc(editor)) {
  115562. return registerKeyboardOverrides(editor);
  115563. } else {
  115564. return Cell(null);
  115565. }
  115566. };
  115567. var NodeChange = function () {
  115568. function NodeChange(editor) {
  115569. this.lastPath = [];
  115570. this.editor = editor;
  115571. var lastRng;
  115572. var self = this;
  115573. if (!('onselectionchange' in editor.getDoc())) {
  115574. editor.on('NodeChange click mouseup keyup focus', function (e) {
  115575. var nativeRng = editor.selection.getRng();
  115576. var fakeRng = {
  115577. startContainer: nativeRng.startContainer,
  115578. startOffset: nativeRng.startOffset,
  115579. endContainer: nativeRng.endContainer,
  115580. endOffset: nativeRng.endOffset
  115581. };
  115582. if (e.type === 'nodechange' || !isEq$4(fakeRng, lastRng)) {
  115583. editor.fire('SelectionChange');
  115584. }
  115585. lastRng = fakeRng;
  115586. });
  115587. }
  115588. editor.on('contextmenu', function () {
  115589. editor.fire('SelectionChange');
  115590. });
  115591. editor.on('SelectionChange', function () {
  115592. var startElm = editor.selection.getStart(true);
  115593. if (!startElm || !Env.range && editor.selection.isCollapsed()) {
  115594. return;
  115595. }
  115596. if (hasAnyRanges(editor) && !self.isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
  115597. editor.nodeChanged({ selectionChange: true });
  115598. }
  115599. });
  115600. editor.on('mouseup', function (e) {
  115601. if (!e.isDefaultPrevented() && hasAnyRanges(editor)) {
  115602. if (editor.selection.getNode().nodeName === 'IMG') {
  115603. Delay.setEditorTimeout(editor, function () {
  115604. editor.nodeChanged();
  115605. });
  115606. } else {
  115607. editor.nodeChanged();
  115608. }
  115609. }
  115610. });
  115611. }
  115612. NodeChange.prototype.nodeChanged = function (args) {
  115613. var selection = this.editor.selection;
  115614. var node, parents, root;
  115615. if (this.editor.initialized && selection && !shouldDisableNodeChange(this.editor) && !this.editor.mode.isReadOnly()) {
  115616. root = this.editor.getBody();
  115617. node = selection.getStart(true) || root;
  115618. if (node.ownerDocument !== this.editor.getDoc() || !this.editor.dom.isChildOf(node, root)) {
  115619. node = root;
  115620. }
  115621. parents = [];
  115622. this.editor.dom.getParent(node, function (node) {
  115623. if (node === root) {
  115624. return true;
  115625. }
  115626. parents.push(node);
  115627. });
  115628. args = args || {};
  115629. args.element = node;
  115630. args.parents = parents;
  115631. this.editor.fire('NodeChange', args);
  115632. }
  115633. };
  115634. NodeChange.prototype.isSameElementPath = function (startElm) {
  115635. var i;
  115636. var currentPath = this.editor.$(startElm).parentsUntil(this.editor.getBody()).add(startElm);
  115637. if (currentPath.length === this.lastPath.length) {
  115638. for (i = currentPath.length; i >= 0; i--) {
  115639. if (currentPath[i] !== this.lastPath[i]) {
  115640. break;
  115641. }
  115642. }
  115643. if (i === -1) {
  115644. this.lastPath = currentPath;
  115645. return true;
  115646. }
  115647. }
  115648. this.lastPath = currentPath;
  115649. return false;
  115650. };
  115651. return NodeChange;
  115652. }();
  115653. var preventSummaryToggle = function (editor) {
  115654. editor.on('click', function (e) {
  115655. if (editor.dom.getParent(e.target, 'details')) {
  115656. e.preventDefault();
  115657. }
  115658. });
  115659. };
  115660. var filterDetails = function (editor) {
  115661. editor.parser.addNodeFilter('details', function (elms) {
  115662. each$k(elms, function (details) {
  115663. details.attr('data-mce-open', details.attr('open'));
  115664. details.attr('open', 'open');
  115665. });
  115666. });
  115667. editor.serializer.addNodeFilter('details', function (elms) {
  115668. each$k(elms, function (details) {
  115669. var open = details.attr('data-mce-open');
  115670. details.attr('open', isString$1(open) ? open : null);
  115671. details.attr('data-mce-open', null);
  115672. });
  115673. });
  115674. };
  115675. var setup$3 = function (editor) {
  115676. preventSummaryToggle(editor);
  115677. filterDetails(editor);
  115678. };
  115679. var isTextBlockNode = function (node) {
  115680. return isElement$5(node) && isTextBlock$2(SugarElement.fromDom(node));
  115681. };
  115682. var normalizeSelection = function (editor) {
  115683. var rng = editor.selection.getRng();
  115684. var startPos = CaretPosition.fromRangeStart(rng);
  115685. var endPos = CaretPosition.fromRangeEnd(rng);
  115686. if (CaretPosition.isElementPosition(startPos)) {
  115687. var container = startPos.container();
  115688. if (isTextBlockNode(container)) {
  115689. firstPositionIn(container).each(function (pos) {
  115690. return rng.setStart(pos.container(), pos.offset());
  115691. });
  115692. }
  115693. }
  115694. if (CaretPosition.isElementPosition(endPos)) {
  115695. var container = startPos.container();
  115696. if (isTextBlockNode(container)) {
  115697. lastPositionIn(container).each(function (pos) {
  115698. return rng.setEnd(pos.container(), pos.offset());
  115699. });
  115700. }
  115701. }
  115702. editor.selection.setRng(normalize(rng));
  115703. };
  115704. var setup$2 = function (editor) {
  115705. editor.on('click', function (e) {
  115706. if (e.detail >= 3) {
  115707. normalizeSelection(editor);
  115708. }
  115709. });
  115710. };
  115711. var getAbsolutePosition = function (elm) {
  115712. var clientRect = elm.getBoundingClientRect();
  115713. var doc = elm.ownerDocument;
  115714. var docElem = doc.documentElement;
  115715. var win = doc.defaultView;
  115716. return {
  115717. top: clientRect.top + win.pageYOffset - docElem.clientTop,
  115718. left: clientRect.left + win.pageXOffset - docElem.clientLeft
  115719. };
  115720. };
  115721. var getBodyPosition = function (editor) {
  115722. return editor.inline ? getAbsolutePosition(editor.getBody()) : {
  115723. left: 0,
  115724. top: 0
  115725. };
  115726. };
  115727. var getScrollPosition = function (editor) {
  115728. var body = editor.getBody();
  115729. return editor.inline ? {
  115730. left: body.scrollLeft,
  115731. top: body.scrollTop
  115732. } : {
  115733. left: 0,
  115734. top: 0
  115735. };
  115736. };
  115737. var getBodyScroll = function (editor) {
  115738. var body = editor.getBody(), docElm = editor.getDoc().documentElement;
  115739. var inlineScroll = {
  115740. left: body.scrollLeft,
  115741. top: body.scrollTop
  115742. };
  115743. var iframeScroll = {
  115744. left: body.scrollLeft || docElm.scrollLeft,
  115745. top: body.scrollTop || docElm.scrollTop
  115746. };
  115747. return editor.inline ? inlineScroll : iframeScroll;
  115748. };
  115749. var getMousePosition = function (editor, event) {
  115750. if (event.target.ownerDocument !== editor.getDoc()) {
  115751. var iframePosition = getAbsolutePosition(editor.getContentAreaContainer());
  115752. var scrollPosition = getBodyScroll(editor);
  115753. return {
  115754. left: event.pageX - iframePosition.left + scrollPosition.left,
  115755. top: event.pageY - iframePosition.top + scrollPosition.top
  115756. };
  115757. }
  115758. return {
  115759. left: event.pageX,
  115760. top: event.pageY
  115761. };
  115762. };
  115763. var calculatePosition = function (bodyPosition, scrollPosition, mousePosition) {
  115764. return {
  115765. pageX: mousePosition.left - bodyPosition.left + scrollPosition.left,
  115766. pageY: mousePosition.top - bodyPosition.top + scrollPosition.top
  115767. };
  115768. };
  115769. var calc = function (editor, event) {
  115770. return calculatePosition(getBodyPosition(editor), getScrollPosition(editor), getMousePosition(editor, event));
  115771. };
  115772. var isContentEditableFalse$1 = isContentEditableFalse$b, isContentEditableTrue$1 = isContentEditableTrue$4;
  115773. var isDraggable = function (rootElm, elm) {
  115774. return isContentEditableFalse$1(elm) && elm !== rootElm;
  115775. };
  115776. var isValidDropTarget = function (editor, targetElement, dragElement) {
  115777. if (targetElement === dragElement || editor.dom.isChildOf(targetElement, dragElement)) {
  115778. return false;
  115779. }
  115780. return !isContentEditableFalse$1(targetElement);
  115781. };
  115782. var cloneElement = function (elm) {
  115783. var cloneElm = elm.cloneNode(true);
  115784. cloneElm.removeAttribute('data-mce-selected');
  115785. return cloneElm;
  115786. };
  115787. var createGhost = function (editor, elm, width, height) {
  115788. var dom = editor.dom;
  115789. var clonedElm = elm.cloneNode(true);
  115790. dom.setStyles(clonedElm, {
  115791. width: width,
  115792. height: height
  115793. });
  115794. dom.setAttrib(clonedElm, 'data-mce-selected', null);
  115795. var ghostElm = dom.create('div', {
  115796. 'class': 'mce-drag-container',
  115797. 'data-mce-bogus': 'all',
  115798. 'unselectable': 'on',
  115799. 'contenteditable': 'false'
  115800. });
  115801. dom.setStyles(ghostElm, {
  115802. position: 'absolute',
  115803. opacity: 0.5,
  115804. overflow: 'hidden',
  115805. border: 0,
  115806. padding: 0,
  115807. margin: 0,
  115808. width: width,
  115809. height: height
  115810. });
  115811. dom.setStyles(clonedElm, {
  115812. margin: 0,
  115813. boxSizing: 'border-box'
  115814. });
  115815. ghostElm.appendChild(clonedElm);
  115816. return ghostElm;
  115817. };
  115818. var appendGhostToBody = function (ghostElm, bodyElm) {
  115819. if (ghostElm.parentNode !== bodyElm) {
  115820. bodyElm.appendChild(ghostElm);
  115821. }
  115822. };
  115823. var moveGhost = function (ghostElm, position, width, height, maxX, maxY) {
  115824. var overflowX = 0, overflowY = 0;
  115825. ghostElm.style.left = position.pageX + 'px';
  115826. ghostElm.style.top = position.pageY + 'px';
  115827. if (position.pageX + width > maxX) {
  115828. overflowX = position.pageX + width - maxX;
  115829. }
  115830. if (position.pageY + height > maxY) {
  115831. overflowY = position.pageY + height - maxY;
  115832. }
  115833. ghostElm.style.width = width - overflowX + 'px';
  115834. ghostElm.style.height = height - overflowY + 'px';
  115835. };
  115836. var removeElement = function (elm) {
  115837. if (elm && elm.parentNode) {
  115838. elm.parentNode.removeChild(elm);
  115839. }
  115840. };
  115841. var isLeftMouseButtonPressed = function (e) {
  115842. return e.button === 0;
  115843. };
  115844. var applyRelPos = function (state, position) {
  115845. return {
  115846. pageX: position.pageX - state.relX,
  115847. pageY: position.pageY + 5
  115848. };
  115849. };
  115850. var start = function (state, editor) {
  115851. return function (e) {
  115852. if (isLeftMouseButtonPressed(e)) {
  115853. var ceElm = find$3(editor.dom.getParents(e.target), or(isContentEditableFalse$1, isContentEditableTrue$1)).getOr(null);
  115854. if (isDraggable(editor.getBody(), ceElm)) {
  115855. var elmPos = editor.dom.getPos(ceElm);
  115856. var bodyElm = editor.getBody();
  115857. var docElm = editor.getDoc().documentElement;
  115858. state.set({
  115859. element: ceElm,
  115860. dragging: false,
  115861. screenX: e.screenX,
  115862. screenY: e.screenY,
  115863. maxX: (editor.inline ? bodyElm.scrollWidth : docElm.offsetWidth) - 2,
  115864. maxY: (editor.inline ? bodyElm.scrollHeight : docElm.offsetHeight) - 2,
  115865. relX: e.pageX - elmPos.x,
  115866. relY: e.pageY - elmPos.y,
  115867. width: ceElm.offsetWidth,
  115868. height: ceElm.offsetHeight,
  115869. ghost: createGhost(editor, ceElm, ceElm.offsetWidth, ceElm.offsetHeight)
  115870. });
  115871. }
  115872. }
  115873. };
  115874. };
  115875. var move = function (state, editor) {
  115876. var throttledPlaceCaretAt = Delay.throttle(function (clientX, clientY) {
  115877. editor._selectionOverrides.hideFakeCaret();
  115878. editor.selection.placeCaretAt(clientX, clientY);
  115879. }, 0);
  115880. editor.on('remove', throttledPlaceCaretAt.stop);
  115881. return function (e) {
  115882. return state.on(function (state) {
  115883. var movement = Math.max(Math.abs(e.screenX - state.screenX), Math.abs(e.screenY - state.screenY));
  115884. if (!state.dragging && movement > 10) {
  115885. var args = editor.fire('dragstart', { target: state.element });
  115886. if (args.isDefaultPrevented()) {
  115887. return;
  115888. }
  115889. state.dragging = true;
  115890. editor.focus();
  115891. }
  115892. if (state.dragging) {
  115893. var targetPos = applyRelPos(state, calc(editor, e));
  115894. appendGhostToBody(state.ghost, editor.getBody());
  115895. moveGhost(state.ghost, targetPos, state.width, state.height, state.maxX, state.maxY);
  115896. throttledPlaceCaretAt(e.clientX, e.clientY);
  115897. }
  115898. });
  115899. };
  115900. };
  115901. var getRawTarget = function (selection) {
  115902. var rng = selection.getSel().getRangeAt(0);
  115903. var startContainer = rng.startContainer;
  115904. return startContainer.nodeType === 3 ? startContainer.parentNode : startContainer;
  115905. };
  115906. var drop = function (state, editor) {
  115907. return function (e) {
  115908. state.on(function (state) {
  115909. if (state.dragging) {
  115910. if (isValidDropTarget(editor, getRawTarget(editor.selection), state.element)) {
  115911. var targetClone_1 = cloneElement(state.element);
  115912. var args = editor.fire('drop', {
  115913. clientX: e.clientX,
  115914. clientY: e.clientY
  115915. });
  115916. if (!args.isDefaultPrevented()) {
  115917. editor.undoManager.transact(function () {
  115918. removeElement(state.element);
  115919. editor.insertContent(editor.dom.getOuterHTML(targetClone_1));
  115920. editor._selectionOverrides.hideFakeCaret();
  115921. });
  115922. }
  115923. }
  115924. editor.fire('dragend');
  115925. }
  115926. });
  115927. removeDragState(state);
  115928. };
  115929. };
  115930. var stop = function (state, editor) {
  115931. return function () {
  115932. state.on(function (state) {
  115933. if (state.dragging) {
  115934. editor.fire('dragend');
  115935. }
  115936. });
  115937. removeDragState(state);
  115938. };
  115939. };
  115940. var removeDragState = function (state) {
  115941. state.on(function (state) {
  115942. removeElement(state.ghost);
  115943. });
  115944. state.clear();
  115945. };
  115946. var bindFakeDragEvents = function (editor) {
  115947. var state = value();
  115948. var pageDom = DOMUtils.DOM;
  115949. var rootDocument = document;
  115950. var dragStartHandler = start(state, editor);
  115951. var dragHandler = move(state, editor);
  115952. var dropHandler = drop(state, editor);
  115953. var dragEndHandler = stop(state, editor);
  115954. editor.on('mousedown', dragStartHandler);
  115955. editor.on('mousemove', dragHandler);
  115956. editor.on('mouseup', dropHandler);
  115957. pageDom.bind(rootDocument, 'mousemove', dragHandler);
  115958. pageDom.bind(rootDocument, 'mouseup', dragEndHandler);
  115959. editor.on('remove', function () {
  115960. pageDom.unbind(rootDocument, 'mousemove', dragHandler);
  115961. pageDom.unbind(rootDocument, 'mouseup', dragEndHandler);
  115962. });
  115963. editor.on('keydown', function (e) {
  115964. if (e.keyCode === VK.ESC) {
  115965. dragEndHandler();
  115966. }
  115967. });
  115968. };
  115969. var blockIeDrop = function (editor) {
  115970. editor.on('drop', function (e) {
  115971. var realTarget = typeof e.clientX !== 'undefined' ? editor.getDoc().elementFromPoint(e.clientX, e.clientY) : null;
  115972. if (isContentEditableFalse$1(realTarget) || editor.dom.getContentEditableParent(realTarget) === 'false') {
  115973. e.preventDefault();
  115974. }
  115975. });
  115976. };
  115977. var blockUnsupportedFileDrop = function (editor) {
  115978. var preventFileDrop = function (e) {
  115979. if (!e.isDefaultPrevented()) {
  115980. var dataTransfer = e.dataTransfer;
  115981. if (dataTransfer && (contains$3(dataTransfer.types, 'Files') || dataTransfer.files.length > 0)) {
  115982. e.preventDefault();
  115983. if (e.type === 'drop') {
  115984. displayError(editor, 'Dropped file type is not supported');
  115985. }
  115986. }
  115987. }
  115988. };
  115989. var preventFileDropIfUIElement = function (e) {
  115990. if (isUIElement(editor, e.target)) {
  115991. preventFileDrop(e);
  115992. }
  115993. };
  115994. var setup = function () {
  115995. var pageDom = DOMUtils.DOM;
  115996. var dom = editor.dom;
  115997. var doc = document;
  115998. var editorRoot = editor.inline ? editor.getBody() : editor.getDoc();
  115999. var eventNames = [
  116000. 'drop',
  116001. 'dragover'
  116002. ];
  116003. each$k(eventNames, function (name) {
  116004. pageDom.bind(doc, name, preventFileDropIfUIElement);
  116005. dom.bind(editorRoot, name, preventFileDrop);
  116006. });
  116007. editor.on('remove', function () {
  116008. each$k(eventNames, function (name) {
  116009. pageDom.unbind(doc, name, preventFileDropIfUIElement);
  116010. dom.unbind(editorRoot, name, preventFileDrop);
  116011. });
  116012. });
  116013. };
  116014. editor.on('init', function () {
  116015. Delay.setEditorTimeout(editor, setup, 0);
  116016. });
  116017. };
  116018. var init$2 = function (editor) {
  116019. bindFakeDragEvents(editor);
  116020. blockIeDrop(editor);
  116021. if (shouldBlockUnsupportedDrop(editor)) {
  116022. blockUnsupportedFileDrop(editor);
  116023. }
  116024. };
  116025. var setup$1 = function (editor) {
  116026. var renderFocusCaret = first(function () {
  116027. if (!editor.removed && editor.getBody().contains(document.activeElement)) {
  116028. var rng = editor.selection.getRng();
  116029. if (rng.collapsed) {
  116030. var caretRange = renderRangeCaret(editor, rng, false);
  116031. editor.selection.setRng(caretRange);
  116032. }
  116033. }
  116034. }, 0);
  116035. editor.on('focus', function () {
  116036. renderFocusCaret.throttle();
  116037. });
  116038. editor.on('blur', function () {
  116039. renderFocusCaret.cancel();
  116040. });
  116041. };
  116042. var setup = function (editor) {
  116043. editor.on('init', function () {
  116044. editor.on('focusin', function (e) {
  116045. var target = e.target;
  116046. if (isMedia$2(target)) {
  116047. var ceRoot = getContentEditableRoot$1(editor.getBody(), target);
  116048. var node = isContentEditableFalse$b(ceRoot) ? ceRoot : target;
  116049. if (editor.selection.getNode() !== node) {
  116050. selectNode(editor, node).each(function (rng) {
  116051. return editor.selection.setRng(rng);
  116052. });
  116053. }
  116054. }
  116055. });
  116056. });
  116057. };
  116058. var isContentEditableTrue = isContentEditableTrue$4;
  116059. var isContentEditableFalse = isContentEditableFalse$b;
  116060. var getContentEditableRoot = function (editor, node) {
  116061. return getContentEditableRoot$1(editor.getBody(), node);
  116062. };
  116063. var SelectionOverrides = function (editor) {
  116064. var selection = editor.selection, dom = editor.dom;
  116065. var isBlock = dom.isBlock;
  116066. var rootNode = editor.getBody();
  116067. var fakeCaret = FakeCaret(editor, rootNode, isBlock, function () {
  116068. return hasFocus(editor);
  116069. });
  116070. var realSelectionId = 'sel-' + dom.uniqueId();
  116071. var elementSelectionAttr = 'data-mce-selected';
  116072. var selectedElement;
  116073. var isFakeSelectionElement = function (node) {
  116074. return dom.hasClass(node, 'mce-offscreen-selection');
  116075. };
  116076. var isFakeSelectionTargetElement = function (node) {
  116077. return node !== rootNode && (isContentEditableFalse(node) || isMedia$2(node)) && dom.isChildOf(node, rootNode);
  116078. };
  116079. var isNearFakeSelectionElement = function (pos) {
  116080. return isBeforeContentEditableFalse(pos) || isAfterContentEditableFalse(pos) || isBeforeMedia(pos) || isAfterMedia(pos);
  116081. };
  116082. var getRealSelectionElement = function () {
  116083. var container = dom.get(realSelectionId);
  116084. return container ? container.getElementsByTagName('*')[0] : container;
  116085. };
  116086. var setRange = function (range) {
  116087. if (range) {
  116088. selection.setRng(range);
  116089. }
  116090. };
  116091. var getRange = selection.getRng;
  116092. var showCaret = function (direction, node, before, scrollIntoView) {
  116093. if (scrollIntoView === void 0) {
  116094. scrollIntoView = true;
  116095. }
  116096. var e = editor.fire('ShowCaret', {
  116097. target: node,
  116098. direction: direction,
  116099. before: before
  116100. });
  116101. if (e.isDefaultPrevented()) {
  116102. return null;
  116103. }
  116104. if (scrollIntoView) {
  116105. selection.scrollIntoView(node, direction === -1);
  116106. }
  116107. return fakeCaret.show(before, node);
  116108. };
  116109. var showBlockCaretContainer = function (blockCaretContainer) {
  116110. if (blockCaretContainer.hasAttribute('data-mce-caret')) {
  116111. showCaretContainerBlock(blockCaretContainer);
  116112. setRange(getRange());
  116113. selection.scrollIntoView(blockCaretContainer);
  116114. }
  116115. };
  116116. var registerEvents = function () {
  116117. editor.on('mouseup', function (e) {
  116118. var range = getRange();
  116119. if (range.collapsed && isXYInContentArea(editor, e.clientX, e.clientY)) {
  116120. renderCaretAtRange(editor, range, false).each(setRange);
  116121. }
  116122. });
  116123. editor.on('click', function (e) {
  116124. var contentEditableRoot = getContentEditableRoot(editor, e.target);
  116125. if (contentEditableRoot) {
  116126. if (isContentEditableFalse(contentEditableRoot)) {
  116127. e.preventDefault();
  116128. editor.focus();
  116129. }
  116130. if (isContentEditableTrue(contentEditableRoot)) {
  116131. if (dom.isChildOf(contentEditableRoot, selection.getNode())) {
  116132. removeElementSelection();
  116133. }
  116134. }
  116135. }
  116136. });
  116137. editor.on('blur NewBlock', removeElementSelection);
  116138. editor.on('ResizeWindow FullscreenStateChanged', fakeCaret.reposition);
  116139. var hasNormalCaretPosition = function (elm) {
  116140. var start = elm.firstChild;
  116141. if (isNullable(start)) {
  116142. return false;
  116143. }
  116144. var startPos = CaretPosition.before(start);
  116145. if (isBr$5(startPos.getNode()) && elm.childNodes.length === 1) {
  116146. return !isNearFakeSelectionElement(startPos);
  116147. } else {
  116148. var caretWalker = CaretWalker(elm);
  116149. var newPos = caretWalker.next(startPos);
  116150. return newPos && !isNearFakeSelectionElement(newPos);
  116151. }
  116152. };
  116153. var isInSameBlock = function (node1, node2) {
  116154. var block1 = dom.getParent(node1, isBlock);
  116155. var block2 = dom.getParent(node2, isBlock);
  116156. return block1 === block2;
  116157. };
  116158. var hasBetterMouseTarget = function (targetNode, caretNode) {
  116159. var targetBlock = dom.getParent(targetNode, isBlock);
  116160. var caretBlock = dom.getParent(caretNode, isBlock);
  116161. if (isNullable(targetBlock)) {
  116162. return false;
  116163. }
  116164. if (targetNode !== caretBlock && dom.isChildOf(targetBlock, caretBlock) && isContentEditableFalse(getContentEditableRoot(editor, targetBlock)) === false) {
  116165. return true;
  116166. }
  116167. return !dom.isChildOf(caretBlock, targetBlock) && !isInSameBlock(targetBlock, caretBlock) && hasNormalCaretPosition(targetBlock);
  116168. };
  116169. editor.on('tap', function (e) {
  116170. var targetElm = e.target;
  116171. var contentEditableRoot = getContentEditableRoot(editor, targetElm);
  116172. if (isContentEditableFalse(contentEditableRoot)) {
  116173. e.preventDefault();
  116174. selectNode(editor, contentEditableRoot).each(setElementSelection);
  116175. } else if (isFakeSelectionTargetElement(targetElm)) {
  116176. selectNode(editor, targetElm).each(setElementSelection);
  116177. }
  116178. }, true);
  116179. editor.on('mousedown', function (e) {
  116180. var targetElm = e.target;
  116181. if (targetElm !== rootNode && targetElm.nodeName !== 'HTML' && !dom.isChildOf(targetElm, rootNode)) {
  116182. return;
  116183. }
  116184. if (isXYInContentArea(editor, e.clientX, e.clientY) === false) {
  116185. return;
  116186. }
  116187. var contentEditableRoot = getContentEditableRoot(editor, targetElm);
  116188. if (contentEditableRoot) {
  116189. if (isContentEditableFalse(contentEditableRoot)) {
  116190. e.preventDefault();
  116191. selectNode(editor, contentEditableRoot).each(setElementSelection);
  116192. } else {
  116193. removeElementSelection();
  116194. if (!(isContentEditableTrue(contentEditableRoot) && e.shiftKey) && !isXYWithinRange(e.clientX, e.clientY, selection.getRng())) {
  116195. hideFakeCaret();
  116196. selection.placeCaretAt(e.clientX, e.clientY);
  116197. }
  116198. }
  116199. } else if (isFakeSelectionTargetElement(targetElm)) {
  116200. selectNode(editor, targetElm).each(setElementSelection);
  116201. } else if (isFakeCaretTarget(targetElm) === false) {
  116202. removeElementSelection();
  116203. hideFakeCaret();
  116204. var fakeCaretInfo = closestFakeCaret(rootNode, e.clientX, e.clientY);
  116205. if (fakeCaretInfo) {
  116206. if (!hasBetterMouseTarget(targetElm, fakeCaretInfo.node)) {
  116207. e.preventDefault();
  116208. var range = showCaret(1, fakeCaretInfo.node, fakeCaretInfo.before, false);
  116209. setRange(range);
  116210. editor.getBody().focus();
  116211. }
  116212. }
  116213. }
  116214. });
  116215. editor.on('keypress', function (e) {
  116216. if (VK.modifierPressed(e)) {
  116217. return;
  116218. }
  116219. if (isContentEditableFalse(selection.getNode())) {
  116220. e.preventDefault();
  116221. }
  116222. });
  116223. editor.on('GetSelectionRange', function (e) {
  116224. var rng = e.range;
  116225. if (selectedElement) {
  116226. if (!selectedElement.parentNode) {
  116227. selectedElement = null;
  116228. return;
  116229. }
  116230. rng = rng.cloneRange();
  116231. rng.selectNode(selectedElement);
  116232. e.range = rng;
  116233. }
  116234. });
  116235. editor.on('SetSelectionRange', function (e) {
  116236. e.range = normalizeShortEndedElementSelection(e.range);
  116237. var rng = setElementSelection(e.range, e.forward);
  116238. if (rng) {
  116239. e.range = rng;
  116240. }
  116241. });
  116242. var isPasteBin = function (node) {
  116243. return node.id === 'mcepastebin';
  116244. };
  116245. editor.on('AfterSetSelectionRange', function (e) {
  116246. var rng = e.range;
  116247. var parentNode = rng.startContainer.parentNode;
  116248. if (!isRangeInCaretContainer(rng) && !isPasteBin(parentNode)) {
  116249. hideFakeCaret();
  116250. }
  116251. if (!isFakeSelectionElement(parentNode)) {
  116252. removeElementSelection();
  116253. }
  116254. });
  116255. editor.on('copy', function (e) {
  116256. var clipboardData = e.clipboardData;
  116257. if (!e.isDefaultPrevented() && e.clipboardData && !Env.ie) {
  116258. var realSelectionElement = getRealSelectionElement();
  116259. if (realSelectionElement) {
  116260. e.preventDefault();
  116261. clipboardData.clearData();
  116262. clipboardData.setData('text/html', realSelectionElement.outerHTML);
  116263. clipboardData.setData('text/plain', realSelectionElement.outerText || realSelectionElement.innerText);
  116264. }
  116265. }
  116266. });
  116267. init$2(editor);
  116268. setup$1(editor);
  116269. setup(editor);
  116270. };
  116271. var isWithinCaretContainer = function (node) {
  116272. return isCaretContainer$2(node) || startsWithCaretContainer$1(node) || endsWithCaretContainer$1(node);
  116273. };
  116274. var isRangeInCaretContainer = function (rng) {
  116275. return isWithinCaretContainer(rng.startContainer) || isWithinCaretContainer(rng.endContainer);
  116276. };
  116277. var normalizeShortEndedElementSelection = function (rng) {
  116278. var shortEndedElements = editor.schema.getShortEndedElements();
  116279. var newRng = dom.createRng();
  116280. var startContainer = rng.startContainer;
  116281. var startOffset = rng.startOffset;
  116282. var endContainer = rng.endContainer;
  116283. var endOffset = rng.endOffset;
  116284. if (has$2(shortEndedElements, startContainer.nodeName.toLowerCase())) {
  116285. if (startOffset === 0) {
  116286. newRng.setStartBefore(startContainer);
  116287. } else {
  116288. newRng.setStartAfter(startContainer);
  116289. }
  116290. } else {
  116291. newRng.setStart(startContainer, startOffset);
  116292. }
  116293. if (has$2(shortEndedElements, endContainer.nodeName.toLowerCase())) {
  116294. if (endOffset === 0) {
  116295. newRng.setEndBefore(endContainer);
  116296. } else {
  116297. newRng.setEndAfter(endContainer);
  116298. }
  116299. } else {
  116300. newRng.setEnd(endContainer, endOffset);
  116301. }
  116302. return newRng;
  116303. };
  116304. var setupOffscreenSelection = function (node, targetClone, origTargetClone) {
  116305. var $ = editor.$;
  116306. var $realSelectionContainer = descendant(SugarElement.fromDom(editor.getBody()), '#' + realSelectionId).fold(function () {
  116307. return $([]);
  116308. }, function (elm) {
  116309. return $([elm.dom]);
  116310. });
  116311. if ($realSelectionContainer.length === 0) {
  116312. $realSelectionContainer = $('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr('id', realSelectionId);
  116313. $realSelectionContainer.appendTo(editor.getBody());
  116314. }
  116315. var newRange = dom.createRng();
  116316. if (targetClone === origTargetClone && Env.ie) {
  116317. $realSelectionContainer.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xA0</p>').append(targetClone);
  116318. newRange.setStartAfter($realSelectionContainer[0].firstChild.firstChild);
  116319. newRange.setEndAfter(targetClone);
  116320. } else {
  116321. $realSelectionContainer.empty().append(nbsp).append(targetClone).append(nbsp);
  116322. newRange.setStart($realSelectionContainer[0].firstChild, 1);
  116323. newRange.setEnd($realSelectionContainer[0].lastChild, 0);
  116324. }
  116325. $realSelectionContainer.css({ top: dom.getPos(node, editor.getBody()).y });
  116326. $realSelectionContainer[0].focus();
  116327. var sel = selection.getSel();
  116328. sel.removeAllRanges();
  116329. sel.addRange(newRange);
  116330. return newRange;
  116331. };
  116332. var selectElement = function (elm) {
  116333. var targetClone = elm.cloneNode(true);
  116334. var e = editor.fire('ObjectSelected', {
  116335. target: elm,
  116336. targetClone: targetClone
  116337. });
  116338. if (e.isDefaultPrevented()) {
  116339. return null;
  116340. }
  116341. var range = setupOffscreenSelection(elm, e.targetClone, targetClone);
  116342. var nodeElm = SugarElement.fromDom(elm);
  116343. each$k(descendants(SugarElement.fromDom(editor.getBody()), '*[data-mce-selected]'), function (elm) {
  116344. if (!eq(nodeElm, elm)) {
  116345. remove$6(elm, elementSelectionAttr);
  116346. }
  116347. });
  116348. if (!dom.getAttrib(elm, elementSelectionAttr)) {
  116349. elm.setAttribute(elementSelectionAttr, '1');
  116350. }
  116351. selectedElement = elm;
  116352. hideFakeCaret();
  116353. return range;
  116354. };
  116355. var setElementSelection = function (range, forward) {
  116356. if (!range) {
  116357. return null;
  116358. }
  116359. if (range.collapsed) {
  116360. if (!isRangeInCaretContainer(range)) {
  116361. var dir = forward ? 1 : -1;
  116362. var caretPosition = getNormalizedRangeEndPoint(dir, rootNode, range);
  116363. var beforeNode = caretPosition.getNode(!forward);
  116364. if (isFakeCaretTarget(beforeNode)) {
  116365. return showCaret(dir, beforeNode, forward ? !caretPosition.isAtEnd() : false, false);
  116366. }
  116367. var afterNode = caretPosition.getNode(forward);
  116368. if (isFakeCaretTarget(afterNode)) {
  116369. return showCaret(dir, afterNode, forward ? false : !caretPosition.isAtEnd(), false);
  116370. }
  116371. }
  116372. return null;
  116373. }
  116374. var startContainer = range.startContainer;
  116375. var startOffset = range.startOffset;
  116376. var endOffset = range.endOffset;
  116377. if (startContainer.nodeType === 3 && startOffset === 0 && isContentEditableFalse(startContainer.parentNode)) {
  116378. startContainer = startContainer.parentNode;
  116379. startOffset = dom.nodeIndex(startContainer);
  116380. startContainer = startContainer.parentNode;
  116381. }
  116382. if (startContainer.nodeType !== 1) {
  116383. return null;
  116384. }
  116385. if (endOffset === startOffset + 1 && startContainer === range.endContainer) {
  116386. var node = startContainer.childNodes[startOffset];
  116387. if (isFakeSelectionTargetElement(node)) {
  116388. return selectElement(node);
  116389. }
  116390. }
  116391. return null;
  116392. };
  116393. var removeElementSelection = function () {
  116394. if (selectedElement) {
  116395. selectedElement.removeAttribute(elementSelectionAttr);
  116396. }
  116397. descendant(SugarElement.fromDom(editor.getBody()), '#' + realSelectionId).each(remove$7);
  116398. selectedElement = null;
  116399. };
  116400. var destroy = function () {
  116401. fakeCaret.destroy();
  116402. selectedElement = null;
  116403. };
  116404. var hideFakeCaret = function () {
  116405. fakeCaret.hide();
  116406. };
  116407. if (Env.ceFalse && !isRtc(editor)) {
  116408. registerEvents();
  116409. }
  116410. return {
  116411. showCaret: showCaret,
  116412. showBlockCaretContainer: showBlockCaretContainer,
  116413. hideFakeCaret: hideFakeCaret,
  116414. destroy: destroy
  116415. };
  116416. };
  116417. var Quirks = function (editor) {
  116418. var each = Tools.each;
  116419. var BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection, parser = editor.parser;
  116420. var isGecko = Env.gecko, isIE = Env.ie, isWebKit = Env.webkit;
  116421. var mceInternalUrlPrefix = 'data:text/mce-internal,';
  116422. var mceInternalDataType = isIE ? 'Text' : 'URL';
  116423. var setEditorCommandState = function (cmd, state) {
  116424. try {
  116425. editor.getDoc().execCommand(cmd, false, state);
  116426. } catch (ex) {
  116427. }
  116428. };
  116429. var isDefaultPrevented = function (e) {
  116430. return e.isDefaultPrevented();
  116431. };
  116432. var setMceInternalContent = function (e) {
  116433. var selectionHtml, internalContent;
  116434. if (e.dataTransfer) {
  116435. if (editor.selection.isCollapsed() && e.target.tagName === 'IMG') {
  116436. selection.select(e.target);
  116437. }
  116438. selectionHtml = editor.selection.getContent();
  116439. if (selectionHtml.length > 0) {
  116440. internalContent = mceInternalUrlPrefix + escape(editor.id) + ',' + escape(selectionHtml);
  116441. e.dataTransfer.setData(mceInternalDataType, internalContent);
  116442. }
  116443. }
  116444. };
  116445. var getMceInternalContent = function (e) {
  116446. var internalContent;
  116447. if (e.dataTransfer) {
  116448. internalContent = e.dataTransfer.getData(mceInternalDataType);
  116449. if (internalContent && internalContent.indexOf(mceInternalUrlPrefix) >= 0) {
  116450. internalContent = internalContent.substr(mceInternalUrlPrefix.length).split(',');
  116451. return {
  116452. id: unescape(internalContent[0]),
  116453. html: unescape(internalContent[1])
  116454. };
  116455. }
  116456. }
  116457. return null;
  116458. };
  116459. var insertClipboardContents = function (content, internal) {
  116460. if (editor.queryCommandSupported('mceInsertClipboardContent')) {
  116461. editor.execCommand('mceInsertClipboardContent', false, {
  116462. content: content,
  116463. internal: internal
  116464. });
  116465. } else {
  116466. editor.execCommand('mceInsertContent', false, content);
  116467. }
  116468. };
  116469. var emptyEditorWhenDeleting = function () {
  116470. var serializeRng = function (rng) {
  116471. var body = dom.create('body');
  116472. var contents = rng.cloneContents();
  116473. body.appendChild(contents);
  116474. return selection.serializer.serialize(body, { format: 'html' });
  116475. };
  116476. var allContentsSelected = function (rng) {
  116477. var selection = serializeRng(rng);
  116478. var allRng = dom.createRng();
  116479. allRng.selectNode(editor.getBody());
  116480. var allSelection = serializeRng(allRng);
  116481. return selection === allSelection;
  116482. };
  116483. editor.on('keydown', function (e) {
  116484. var keyCode = e.keyCode;
  116485. var isCollapsed, body;
  116486. if (!isDefaultPrevented(e) && (keyCode === DELETE || keyCode === BACKSPACE)) {
  116487. isCollapsed = editor.selection.isCollapsed();
  116488. body = editor.getBody();
  116489. if (isCollapsed && !dom.isEmpty(body)) {
  116490. return;
  116491. }
  116492. if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {
  116493. return;
  116494. }
  116495. e.preventDefault();
  116496. editor.setContent('');
  116497. if (body.firstChild && dom.isBlock(body.firstChild)) {
  116498. editor.selection.setCursorLocation(body.firstChild, 0);
  116499. } else {
  116500. editor.selection.setCursorLocation(body, 0);
  116501. }
  116502. editor.nodeChanged();
  116503. }
  116504. });
  116505. };
  116506. var selectAll = function () {
  116507. editor.shortcuts.add('meta+a', null, 'SelectAll');
  116508. };
  116509. var documentElementEditingFocus = function () {
  116510. if (!editor.inline) {
  116511. dom.bind(editor.getDoc(), 'mousedown mouseup', function (e) {
  116512. var rng;
  116513. if (e.target === editor.getDoc().documentElement) {
  116514. rng = selection.getRng();
  116515. editor.getBody().focus();
  116516. if (e.type === 'mousedown') {
  116517. if (isCaretContainer$2(rng.startContainer)) {
  116518. return;
  116519. }
  116520. selection.placeCaretAt(e.clientX, e.clientY);
  116521. } else {
  116522. selection.setRng(rng);
  116523. }
  116524. }
  116525. });
  116526. }
  116527. };
  116528. var removeHrOnBackspace = function () {
  116529. editor.on('keydown', function (e) {
  116530. if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
  116531. if (!editor.getBody().getElementsByTagName('hr').length) {
  116532. return;
  116533. }
  116534. if (selection.isCollapsed() && selection.getRng().startOffset === 0) {
  116535. var node = selection.getNode();
  116536. var previousSibling = node.previousSibling;
  116537. if (node.nodeName === 'HR') {
  116538. dom.remove(node);
  116539. e.preventDefault();
  116540. return;
  116541. }
  116542. if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'hr') {
  116543. dom.remove(previousSibling);
  116544. e.preventDefault();
  116545. }
  116546. }
  116547. }
  116548. });
  116549. };
  116550. var focusBody = function () {
  116551. if (!Range.prototype.getClientRects) {
  116552. editor.on('mousedown', function (e) {
  116553. if (!isDefaultPrevented(e) && e.target.nodeName === 'HTML') {
  116554. var body_1 = editor.getBody();
  116555. body_1.blur();
  116556. Delay.setEditorTimeout(editor, function () {
  116557. body_1.focus();
  116558. });
  116559. }
  116560. });
  116561. }
  116562. };
  116563. var selectControlElements = function () {
  116564. editor.on('click', function (e) {
  116565. var target = e.target;
  116566. if (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== 'false') {
  116567. e.preventDefault();
  116568. editor.selection.select(target);
  116569. editor.nodeChanged();
  116570. }
  116571. if (target.nodeName === 'A' && dom.hasClass(target, 'mce-item-anchor')) {
  116572. e.preventDefault();
  116573. selection.select(target);
  116574. }
  116575. });
  116576. };
  116577. var removeStylesWhenDeletingAcrossBlockElements = function () {
  116578. var getAttributeApplyFunction = function () {
  116579. var template = dom.getAttribs(selection.getStart().cloneNode(false));
  116580. return function () {
  116581. var target = selection.getStart();
  116582. if (target !== editor.getBody()) {
  116583. dom.setAttrib(target, 'style', null);
  116584. each(template, function (attr) {
  116585. target.setAttributeNode(attr.cloneNode(true));
  116586. });
  116587. }
  116588. };
  116589. };
  116590. var isSelectionAcrossElements = function () {
  116591. return !selection.isCollapsed() && dom.getParent(selection.getStart(), dom.isBlock) !== dom.getParent(selection.getEnd(), dom.isBlock);
  116592. };
  116593. editor.on('keypress', function (e) {
  116594. var applyAttributes;
  116595. if (!isDefaultPrevented(e) && (e.keyCode === 8 || e.keyCode === 46) && isSelectionAcrossElements()) {
  116596. applyAttributes = getAttributeApplyFunction();
  116597. editor.getDoc().execCommand('delete', false, null);
  116598. applyAttributes();
  116599. e.preventDefault();
  116600. return false;
  116601. }
  116602. });
  116603. dom.bind(editor.getDoc(), 'cut', function (e) {
  116604. var applyAttributes;
  116605. if (!isDefaultPrevented(e) && isSelectionAcrossElements()) {
  116606. applyAttributes = getAttributeApplyFunction();
  116607. Delay.setEditorTimeout(editor, function () {
  116608. applyAttributes();
  116609. });
  116610. }
  116611. });
  116612. };
  116613. var disableBackspaceIntoATable = function () {
  116614. editor.on('keydown', function (e) {
  116615. if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
  116616. if (selection.isCollapsed() && selection.getRng().startOffset === 0) {
  116617. var previousSibling = selection.getNode().previousSibling;
  116618. if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'table') {
  116619. e.preventDefault();
  116620. return false;
  116621. }
  116622. }
  116623. }
  116624. });
  116625. };
  116626. var removeBlockQuoteOnBackSpace = function () {
  116627. editor.on('keydown', function (e) {
  116628. var rng, parent;
  116629. if (isDefaultPrevented(e) || e.keyCode !== VK.BACKSPACE) {
  116630. return;
  116631. }
  116632. rng = selection.getRng();
  116633. var container = rng.startContainer;
  116634. var offset = rng.startOffset;
  116635. var root = dom.getRoot();
  116636. parent = container;
  116637. if (!rng.collapsed || offset !== 0) {
  116638. return;
  116639. }
  116640. while (parent && parent.parentNode && parent.parentNode.firstChild === parent && parent.parentNode !== root) {
  116641. parent = parent.parentNode;
  116642. }
  116643. if (parent.tagName === 'BLOCKQUOTE') {
  116644. editor.formatter.toggle('blockquote', null, parent);
  116645. rng = dom.createRng();
  116646. rng.setStart(container, 0);
  116647. rng.setEnd(container, 0);
  116648. selection.setRng(rng);
  116649. }
  116650. });
  116651. };
  116652. var setGeckoEditingOptions = function () {
  116653. var setOpts = function () {
  116654. setEditorCommandState('StyleWithCSS', false);
  116655. setEditorCommandState('enableInlineTableEditing', false);
  116656. if (!getObjectResizing(editor)) {
  116657. setEditorCommandState('enableObjectResizing', false);
  116658. }
  116659. };
  116660. if (!isReadOnly$1(editor)) {
  116661. editor.on('BeforeExecCommand mousedown', setOpts);
  116662. }
  116663. };
  116664. var addBrAfterLastLinks = function () {
  116665. var fixLinks = function () {
  116666. each(dom.select('a'), function (node) {
  116667. var parentNode = node.parentNode;
  116668. var root = dom.getRoot();
  116669. if (parentNode.lastChild === node) {
  116670. while (parentNode && !dom.isBlock(parentNode)) {
  116671. if (parentNode.parentNode.lastChild !== parentNode || parentNode === root) {
  116672. return;
  116673. }
  116674. parentNode = parentNode.parentNode;
  116675. }
  116676. dom.add(parentNode, 'br', { 'data-mce-bogus': 1 });
  116677. }
  116678. });
  116679. };
  116680. editor.on('SetContent ExecCommand', function (e) {
  116681. if (e.type === 'setcontent' || e.command === 'mceInsertLink') {
  116682. fixLinks();
  116683. }
  116684. });
  116685. };
  116686. var setDefaultBlockType = function () {
  116687. if (getForcedRootBlock(editor)) {
  116688. editor.on('init', function () {
  116689. setEditorCommandState('DefaultParagraphSeparator', getForcedRootBlock(editor));
  116690. });
  116691. }
  116692. };
  116693. var normalizeSelection = function () {
  116694. editor.on('keyup focusin mouseup', function (e) {
  116695. if (!VK.modifierPressed(e)) {
  116696. selection.normalize();
  116697. }
  116698. }, true);
  116699. };
  116700. var showBrokenImageIcon = function () {
  116701. editor.contentStyles.push('img:-moz-broken {' + '-moz-force-broken-image-icon:1;' + 'min-width:24px;' + 'min-height:24px' + '}');
  116702. };
  116703. var restoreFocusOnKeyDown = function () {
  116704. if (!editor.inline) {
  116705. editor.on('keydown', function () {
  116706. if (document.activeElement === document.body) {
  116707. editor.getWin().focus();
  116708. }
  116709. });
  116710. }
  116711. };
  116712. var bodyHeight = function () {
  116713. if (!editor.inline) {
  116714. editor.contentStyles.push('body {min-height: 150px}');
  116715. editor.on('click', function (e) {
  116716. var rng;
  116717. if (e.target.nodeName === 'HTML') {
  116718. if (Env.ie > 11) {
  116719. editor.getBody().focus();
  116720. return;
  116721. }
  116722. rng = editor.selection.getRng();
  116723. editor.getBody().focus();
  116724. editor.selection.setRng(rng);
  116725. editor.selection.normalize();
  116726. editor.nodeChanged();
  116727. }
  116728. });
  116729. }
  116730. };
  116731. var blockCmdArrowNavigation = function () {
  116732. if (Env.mac) {
  116733. editor.on('keydown', function (e) {
  116734. if (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode === 37 || e.keyCode === 39)) {
  116735. e.preventDefault();
  116736. var selection_1 = editor.selection.getSel();
  116737. selection_1.modify('move', e.keyCode === 37 ? 'backward' : 'forward', 'lineboundary');
  116738. }
  116739. });
  116740. }
  116741. };
  116742. var disableAutoUrlDetect = function () {
  116743. setEditorCommandState('AutoUrlDetect', false);
  116744. };
  116745. var tapLinksAndImages = function () {
  116746. editor.on('click', function (e) {
  116747. var elm = e.target;
  116748. do {
  116749. if (elm.tagName === 'A') {
  116750. e.preventDefault();
  116751. return;
  116752. }
  116753. } while (elm = elm.parentNode);
  116754. });
  116755. editor.contentStyles.push('.mce-content-body {-webkit-touch-callout: none}');
  116756. };
  116757. var blockFormSubmitInsideEditor = function () {
  116758. editor.on('init', function () {
  116759. editor.dom.bind(editor.getBody(), 'submit', function (e) {
  116760. e.preventDefault();
  116761. });
  116762. });
  116763. };
  116764. var removeAppleInterchangeBrs = function () {
  116765. parser.addNodeFilter('br', function (nodes) {
  116766. var i = nodes.length;
  116767. while (i--) {
  116768. if (nodes[i].attr('class') === 'Apple-interchange-newline') {
  116769. nodes[i].remove();
  116770. }
  116771. }
  116772. });
  116773. };
  116774. var ieInternalDragAndDrop = function () {
  116775. editor.on('dragstart', function (e) {
  116776. setMceInternalContent(e);
  116777. });
  116778. editor.on('drop', function (e) {
  116779. if (!isDefaultPrevented(e)) {
  116780. var internalContent = getMceInternalContent(e);
  116781. if (internalContent && internalContent.id !== editor.id) {
  116782. e.preventDefault();
  116783. var rng = fromPoint(e.x, e.y, editor.getDoc());
  116784. selection.setRng(rng);
  116785. insertClipboardContents(internalContent.html, true);
  116786. }
  116787. }
  116788. });
  116789. };
  116790. var refreshContentEditable = noop;
  116791. var isHidden = function () {
  116792. if (!isGecko || editor.removed) {
  116793. return false;
  116794. }
  116795. var sel = editor.selection.getSel();
  116796. return !sel || !sel.rangeCount || sel.rangeCount === 0;
  116797. };
  116798. var setupRtc = function () {
  116799. if (isWebKit) {
  116800. documentElementEditingFocus();
  116801. selectControlElements();
  116802. blockFormSubmitInsideEditor();
  116803. selectAll();
  116804. if (Env.iOS) {
  116805. restoreFocusOnKeyDown();
  116806. bodyHeight();
  116807. tapLinksAndImages();
  116808. }
  116809. }
  116810. if (isGecko) {
  116811. focusBody();
  116812. setGeckoEditingOptions();
  116813. showBrokenImageIcon();
  116814. blockCmdArrowNavigation();
  116815. }
  116816. };
  116817. var setup = function () {
  116818. removeBlockQuoteOnBackSpace();
  116819. emptyEditorWhenDeleting();
  116820. if (!Env.windowsPhone) {
  116821. normalizeSelection();
  116822. }
  116823. if (isWebKit) {
  116824. documentElementEditingFocus();
  116825. selectControlElements();
  116826. setDefaultBlockType();
  116827. blockFormSubmitInsideEditor();
  116828. disableBackspaceIntoATable();
  116829. removeAppleInterchangeBrs();
  116830. if (Env.iOS) {
  116831. restoreFocusOnKeyDown();
  116832. bodyHeight();
  116833. tapLinksAndImages();
  116834. } else {
  116835. selectAll();
  116836. }
  116837. }
  116838. if (Env.ie >= 11) {
  116839. bodyHeight();
  116840. disableBackspaceIntoATable();
  116841. }
  116842. if (Env.ie) {
  116843. selectAll();
  116844. disableAutoUrlDetect();
  116845. ieInternalDragAndDrop();
  116846. }
  116847. if (isGecko) {
  116848. removeHrOnBackspace();
  116849. focusBody();
  116850. removeStylesWhenDeletingAcrossBlockElements();
  116851. setGeckoEditingOptions();
  116852. addBrAfterLastLinks();
  116853. showBrokenImageIcon();
  116854. blockCmdArrowNavigation();
  116855. disableBackspaceIntoATable();
  116856. }
  116857. };
  116858. if (isRtc(editor)) {
  116859. setupRtc();
  116860. } else {
  116861. setup();
  116862. }
  116863. return {
  116864. refreshContentEditable: refreshContentEditable,
  116865. isHidden: isHidden
  116866. };
  116867. };
  116868. var DOM$6 = DOMUtils.DOM;
  116869. var appendStyle = function (editor, text) {
  116870. var body = SugarElement.fromDom(editor.getBody());
  116871. var container = getStyleContainer(getRootNode(body));
  116872. var style = SugarElement.fromTag('style');
  116873. set$1(style, 'type', 'text/css');
  116874. append$1(style, SugarElement.fromText(text));
  116875. append$1(container, style);
  116876. editor.on('remove', function () {
  116877. remove$7(style);
  116878. });
  116879. };
  116880. var getRootName = function (editor) {
  116881. return editor.inline ? editor.getElement().nodeName.toLowerCase() : undefined;
  116882. };
  116883. var removeUndefined = function (obj) {
  116884. return filter$3(obj, function (v) {
  116885. return isUndefined(v) === false;
  116886. });
  116887. };
  116888. var mkSchemaSettings = function (editor) {
  116889. var settings = editor.settings;
  116890. return removeUndefined({
  116891. block_elements: settings.block_elements,
  116892. boolean_attributes: settings.boolean_attributes,
  116893. custom_elements: settings.custom_elements,
  116894. extended_valid_elements: settings.extended_valid_elements,
  116895. invalid_elements: settings.invalid_elements,
  116896. invalid_styles: settings.invalid_styles,
  116897. move_caret_before_on_enter_elements: settings.move_caret_before_on_enter_elements,
  116898. non_empty_elements: settings.non_empty_elements,
  116899. schema: settings.schema,
  116900. self_closing_elements: settings.self_closing_elements,
  116901. short_ended_elements: settings.short_ended_elements,
  116902. special: settings.special,
  116903. text_block_elements: settings.text_block_elements,
  116904. text_inline_elements: settings.text_inline_elements,
  116905. valid_children: settings.valid_children,
  116906. valid_classes: settings.valid_classes,
  116907. valid_elements: settings.valid_elements,
  116908. valid_styles: settings.valid_styles,
  116909. verify_html: settings.verify_html,
  116910. whitespace_elements: settings.whitespace_elements,
  116911. padd_empty_block_inline_children: settings.format_empty_lines
  116912. });
  116913. };
  116914. var mkParserSettings = function (editor) {
  116915. var settings = editor.settings;
  116916. var blobCache = editor.editorUpload.blobCache;
  116917. return removeUndefined({
  116918. allow_conditional_comments: settings.allow_conditional_comments,
  116919. allow_html_data_urls: settings.allow_html_data_urls,
  116920. allow_svg_data_urls: settings.allow_svg_data_urls,
  116921. allow_html_in_named_anchor: settings.allow_html_in_named_anchor,
  116922. allow_script_urls: settings.allow_script_urls,
  116923. allow_unsafe_link_target: settings.allow_unsafe_link_target,
  116924. convert_fonts_to_spans: settings.convert_fonts_to_spans,
  116925. fix_list_elements: settings.fix_list_elements,
  116926. font_size_legacy_values: settings.font_size_legacy_values,
  116927. forced_root_block: settings.forced_root_block,
  116928. forced_root_block_attrs: settings.forced_root_block_attrs,
  116929. padd_empty_with_br: settings.padd_empty_with_br,
  116930. preserve_cdata: settings.preserve_cdata,
  116931. remove_trailing_brs: settings.remove_trailing_brs,
  116932. inline_styles: settings.inline_styles,
  116933. root_name: getRootName(editor),
  116934. validate: true,
  116935. blob_cache: blobCache,
  116936. document: editor.getDoc(),
  116937. images_dataimg_filter: settings.images_dataimg_filter
  116938. });
  116939. };
  116940. var mkSerializerSettings = function (editor) {
  116941. var settings = editor.settings;
  116942. return __assign(__assign(__assign({}, mkParserSettings(editor)), mkSchemaSettings(editor)), removeUndefined({
  116943. url_converter: settings.url_converter,
  116944. url_converter_scope: settings.url_converter_scope,
  116945. element_format: settings.element_format,
  116946. entities: settings.entities,
  116947. entity_encoding: settings.entity_encoding,
  116948. indent: settings.indent,
  116949. indent_after: settings.indent_after,
  116950. indent_before: settings.indent_before
  116951. }));
  116952. };
  116953. var createParser = function (editor) {
  116954. var parser = DomParser(mkParserSettings(editor), editor.schema);
  116955. parser.addAttributeFilter('src,href,style,tabindex', function (nodes, name) {
  116956. var i = nodes.length, node, value;
  116957. var dom = editor.dom;
  116958. var internalName = 'data-mce-' + name;
  116959. while (i--) {
  116960. node = nodes[i];
  116961. value = node.attr(name);
  116962. if (value && !node.attr(internalName)) {
  116963. if (value.indexOf('data:') === 0 || value.indexOf('blob:') === 0) {
  116964. continue;
  116965. }
  116966. if (name === 'style') {
  116967. value = dom.serializeStyle(dom.parseStyle(value), node.name);
  116968. if (!value.length) {
  116969. value = null;
  116970. }
  116971. node.attr(internalName, value);
  116972. node.attr(name, value);
  116973. } else if (name === 'tabindex') {
  116974. node.attr(internalName, value);
  116975. node.attr(name, null);
  116976. } else {
  116977. node.attr(internalName, editor.convertURL(value, name, node.name));
  116978. }
  116979. }
  116980. }
  116981. });
  116982. parser.addNodeFilter('script', function (nodes) {
  116983. var i = nodes.length;
  116984. while (i--) {
  116985. var node = nodes[i];
  116986. var type = node.attr('type') || 'no/type';
  116987. if (type.indexOf('mce-') !== 0) {
  116988. node.attr('type', 'mce-' + type);
  116989. }
  116990. }
  116991. });
  116992. if (editor.settings.preserve_cdata) {
  116993. parser.addNodeFilter('#cdata', function (nodes) {
  116994. var i = nodes.length;
  116995. while (i--) {
  116996. var node = nodes[i];
  116997. node.type = 8;
  116998. node.name = '#comment';
  116999. node.value = '[CDATA[' + editor.dom.encode(node.value) + ']]';
  117000. }
  117001. });
  117002. }
  117003. parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function (nodes) {
  117004. var i = nodes.length;
  117005. var nonEmptyElements = editor.schema.getNonEmptyElements();
  117006. while (i--) {
  117007. var node = nodes[i];
  117008. if (node.isEmpty(nonEmptyElements) && node.getAll('br').length === 0) {
  117009. node.append(new AstNode('br', 1)).shortEnded = true;
  117010. }
  117011. }
  117012. });
  117013. return parser;
  117014. };
  117015. var autoFocus = function (editor) {
  117016. if (editor.settings.auto_focus) {
  117017. Delay.setEditorTimeout(editor, function () {
  117018. var focusEditor;
  117019. if (editor.settings.auto_focus === true) {
  117020. focusEditor = editor;
  117021. } else {
  117022. focusEditor = editor.editorManager.get(editor.settings.auto_focus);
  117023. }
  117024. if (!focusEditor.destroyed) {
  117025. focusEditor.focus();
  117026. }
  117027. }, 100);
  117028. }
  117029. };
  117030. var moveSelectionToFirstCaretPosition = function (editor) {
  117031. var root = editor.dom.getRoot();
  117032. if (!editor.inline && (!hasAnyRanges(editor) || editor.selection.getStart(true) === root)) {
  117033. firstPositionIn(root).each(function (pos) {
  117034. var node = pos.getNode();
  117035. var caretPos = isTable$3(node) ? firstPositionIn(node).getOr(pos) : pos;
  117036. if (Env.browser.isIE()) {
  117037. storeNative(editor, caretPos.toRange());
  117038. } else {
  117039. editor.selection.setRng(caretPos.toRange());
  117040. }
  117041. });
  117042. }
  117043. };
  117044. var initEditor = function (editor) {
  117045. editor.bindPendingEventDelegates();
  117046. editor.initialized = true;
  117047. fireInit(editor);
  117048. editor.focus(true);
  117049. moveSelectionToFirstCaretPosition(editor);
  117050. editor.nodeChanged({ initial: true });
  117051. editor.execCallback('init_instance_callback', editor);
  117052. autoFocus(editor);
  117053. };
  117054. var getStyleSheetLoader$1 = function (editor) {
  117055. return editor.inline ? editor.ui.styleSheetLoader : editor.dom.styleSheetLoader;
  117056. };
  117057. var makeStylesheetLoadingPromises = function (editor, css, framedFonts) {
  117058. var promises = [new promiseObj(function (resolve, reject) {
  117059. return getStyleSheetLoader$1(editor).loadAll(css, resolve, reject);
  117060. })];
  117061. if (editor.inline) {
  117062. return promises;
  117063. } else {
  117064. return promises.concat([new promiseObj(function (resolve, reject) {
  117065. return editor.ui.styleSheetLoader.loadAll(framedFonts, resolve, reject);
  117066. })]);
  117067. }
  117068. };
  117069. var loadContentCss = function (editor) {
  117070. var styleSheetLoader = getStyleSheetLoader$1(editor);
  117071. var fontCss = getFontCss(editor);
  117072. var css = editor.contentCSS;
  117073. var removeCss = function () {
  117074. styleSheetLoader.unloadAll(css);
  117075. if (!editor.inline) {
  117076. editor.ui.styleSheetLoader.unloadAll(fontCss);
  117077. }
  117078. };
  117079. var loaded = function () {
  117080. if (editor.removed) {
  117081. removeCss();
  117082. } else {
  117083. editor.on('remove', removeCss);
  117084. }
  117085. };
  117086. if (editor.contentStyles.length > 0) {
  117087. var contentCssText_1 = '';
  117088. Tools.each(editor.contentStyles, function (style) {
  117089. contentCssText_1 += style + '\r\n';
  117090. });
  117091. editor.dom.addStyle(contentCssText_1);
  117092. }
  117093. var allStylesheets = promiseObj.all(makeStylesheetLoadingPromises(editor, css, fontCss)).then(loaded).catch(loaded);
  117094. if (editor.settings.content_style) {
  117095. appendStyle(editor, editor.settings.content_style);
  117096. }
  117097. return allStylesheets;
  117098. };
  117099. var preInit = function (editor) {
  117100. var settings = editor.settings, doc = editor.getDoc(), body = editor.getBody();
  117101. firePreInit(editor);
  117102. if (!settings.browser_spellcheck && !settings.gecko_spellcheck) {
  117103. doc.body.spellcheck = false;
  117104. DOM$6.setAttrib(body, 'spellcheck', 'false');
  117105. }
  117106. editor.quirks = Quirks(editor);
  117107. firePostRender(editor);
  117108. var directionality = getDirectionality(editor);
  117109. if (directionality !== undefined) {
  117110. body.dir = directionality;
  117111. }
  117112. if (settings.protect) {
  117113. editor.on('BeforeSetContent', function (e) {
  117114. Tools.each(settings.protect, function (pattern) {
  117115. e.content = e.content.replace(pattern, function (str) {
  117116. return '<!--mce:protected ' + escape(str) + '-->';
  117117. });
  117118. });
  117119. });
  117120. }
  117121. editor.on('SetContent', function () {
  117122. editor.addVisual(editor.getBody());
  117123. });
  117124. editor.on('compositionstart compositionend', function (e) {
  117125. editor.composing = e.type === 'compositionstart';
  117126. });
  117127. };
  117128. var loadInitialContent = function (editor) {
  117129. if (!isRtc(editor)) {
  117130. editor.load({
  117131. initial: true,
  117132. format: 'html'
  117133. });
  117134. }
  117135. editor.startContent = editor.getContent({ format: 'raw' });
  117136. };
  117137. var initEditorWithInitialContent = function (editor) {
  117138. if (editor.removed !== true) {
  117139. loadInitialContent(editor);
  117140. initEditor(editor);
  117141. }
  117142. };
  117143. var initContentBody = function (editor, skipWrite) {
  117144. var settings = editor.settings;
  117145. var targetElm = editor.getElement();
  117146. var doc = editor.getDoc();
  117147. if (!settings.inline) {
  117148. editor.getElement().style.visibility = editor.orgVisibility;
  117149. }
  117150. if (!skipWrite && !editor.inline) {
  117151. doc.open();
  117152. doc.write(editor.iframeHTML);
  117153. doc.close();
  117154. }
  117155. if (editor.inline) {
  117156. DOM$6.addClass(targetElm, 'mce-content-body');
  117157. editor.contentDocument = doc = document;
  117158. editor.contentWindow = window;
  117159. editor.bodyElement = targetElm;
  117160. editor.contentAreaContainer = targetElm;
  117161. }
  117162. var body = editor.getBody();
  117163. body.disabled = true;
  117164. editor.readonly = !!settings.readonly;
  117165. if (!editor.readonly) {
  117166. if (editor.inline && DOM$6.getStyle(body, 'position', true) === 'static') {
  117167. body.style.position = 'relative';
  117168. }
  117169. body.contentEditable = editor.getParam('content_editable_state', true);
  117170. }
  117171. body.disabled = false;
  117172. editor.editorUpload = EditorUpload(editor);
  117173. editor.schema = Schema(mkSchemaSettings(editor));
  117174. editor.dom = DOMUtils(doc, {
  117175. keep_values: true,
  117176. url_converter: editor.convertURL,
  117177. url_converter_scope: editor,
  117178. hex_colors: settings.force_hex_style_colors,
  117179. update_styles: true,
  117180. root_element: editor.inline ? editor.getBody() : null,
  117181. collect: function () {
  117182. return editor.inline;
  117183. },
  117184. schema: editor.schema,
  117185. contentCssCors: shouldUseContentCssCors(editor),
  117186. referrerPolicy: getReferrerPolicy(editor),
  117187. onSetAttrib: function (e) {
  117188. editor.fire('SetAttrib', e);
  117189. }
  117190. });
  117191. editor.parser = createParser(editor);
  117192. editor.serializer = DomSerializer(mkSerializerSettings(editor), editor);
  117193. editor.selection = EditorSelection(editor.dom, editor.getWin(), editor.serializer, editor);
  117194. editor.annotator = Annotator(editor);
  117195. editor.formatter = Formatter(editor);
  117196. editor.undoManager = UndoManager(editor);
  117197. editor._nodeChangeDispatcher = new NodeChange(editor);
  117198. editor._selectionOverrides = SelectionOverrides(editor);
  117199. setup$e(editor);
  117200. setup$3(editor);
  117201. if (!isRtc(editor)) {
  117202. setup$2(editor);
  117203. }
  117204. var caret = setup$4(editor);
  117205. setup$f(editor, caret);
  117206. setup$d(editor);
  117207. setup$g(editor);
  117208. var setupRtcThunk = setup$i(editor);
  117209. preInit(editor);
  117210. setupRtcThunk.fold(function () {
  117211. loadContentCss(editor).then(function () {
  117212. return initEditorWithInitialContent(editor);
  117213. });
  117214. }, function (setupRtc) {
  117215. editor.setProgressState(true);
  117216. loadContentCss(editor).then(function () {
  117217. setupRtc().then(function (_rtcMode) {
  117218. editor.setProgressState(false);
  117219. initEditorWithInitialContent(editor);
  117220. }, function (err) {
  117221. editor.notificationManager.open({
  117222. type: 'error',
  117223. text: String(err)
  117224. });
  117225. initEditorWithInitialContent(editor);
  117226. });
  117227. });
  117228. });
  117229. };
  117230. var DOM$5 = DOMUtils.DOM;
  117231. var relaxDomain = function (editor, ifr) {
  117232. if (document.domain !== window.location.hostname && Env.browser.isIE()) {
  117233. var bodyUuid = uuid('mce');
  117234. editor[bodyUuid] = function () {
  117235. initContentBody(editor);
  117236. };
  117237. var domainRelaxUrl = 'javascript:(function(){' + 'document.open();document.domain="' + document.domain + '";' + 'var ed = window.parent.tinymce.get("' + editor.id + '");document.write(ed.iframeHTML);' + 'document.close();ed.' + bodyUuid + '(true);})()';
  117238. DOM$5.setAttrib(ifr, 'src', domainRelaxUrl);
  117239. return true;
  117240. }
  117241. return false;
  117242. };
  117243. var createIframeElement = function (id, title, height, customAttrs) {
  117244. var iframe = SugarElement.fromTag('iframe');
  117245. setAll$1(iframe, customAttrs);
  117246. setAll$1(iframe, {
  117247. id: id + '_ifr',
  117248. frameBorder: '0',
  117249. allowTransparency: 'true',
  117250. title: title
  117251. });
  117252. add$1(iframe, 'tox-edit-area__iframe');
  117253. return iframe;
  117254. };
  117255. var getIframeHtml = function (editor) {
  117256. var iframeHTML = getDocType(editor) + '<html><head>';
  117257. if (getDocumentBaseUrl(editor) !== editor.documentBaseUrl) {
  117258. iframeHTML += '<base href="' + editor.documentBaseURI.getURI() + '" />';
  117259. }
  117260. iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
  117261. var bodyId = getBodyId(editor);
  117262. var bodyClass = getBodyClass(editor);
  117263. var translatedAriaText = editor.translate(getIframeAriaText(editor));
  117264. if (getContentSecurityPolicy(editor)) {
  117265. iframeHTML += '<meta http-equiv="Content-Security-Policy" content="' + getContentSecurityPolicy(editor) + '" />';
  117266. }
  117267. iframeHTML += '</head>' + ('<body id="' + bodyId + '" class="mce-content-body ' + bodyClass + '" data-id="' + editor.id + '" aria-label="' + translatedAriaText + '">') + '<br>' + '</body></html>';
  117268. return iframeHTML;
  117269. };
  117270. var createIframe = function (editor, o) {
  117271. var iframeTitle = editor.translate('Rich Text Area');
  117272. var ifr = createIframeElement(editor.id, iframeTitle, o.height, getIframeAttrs(editor)).dom;
  117273. ifr.onload = function () {
  117274. ifr.onload = null;
  117275. editor.fire('load');
  117276. };
  117277. var isDomainRelaxed = relaxDomain(editor, ifr);
  117278. editor.contentAreaContainer = o.iframeContainer;
  117279. editor.iframeElement = ifr;
  117280. editor.iframeHTML = getIframeHtml(editor);
  117281. DOM$5.add(o.iframeContainer, ifr);
  117282. return isDomainRelaxed;
  117283. };
  117284. var init$1 = function (editor, boxInfo) {
  117285. var isDomainRelaxed = createIframe(editor, boxInfo);
  117286. if (boxInfo.editorContainer) {
  117287. DOM$5.get(boxInfo.editorContainer).style.display = editor.orgDisplay;
  117288. editor.hidden = DOM$5.isHidden(boxInfo.editorContainer);
  117289. }
  117290. editor.getElement().style.display = 'none';
  117291. DOM$5.setAttrib(editor.id, 'aria-hidden', 'true');
  117292. if (!isDomainRelaxed) {
  117293. initContentBody(editor);
  117294. }
  117295. };
  117296. var DOM$4 = DOMUtils.DOM;
  117297. var initPlugin = function (editor, initializedPlugins, plugin) {
  117298. var Plugin = PluginManager.get(plugin);
  117299. var pluginUrl = PluginManager.urls[plugin] || editor.documentBaseUrl.replace(/\/$/, '');
  117300. plugin = Tools.trim(plugin);
  117301. if (Plugin && Tools.inArray(initializedPlugins, plugin) === -1) {
  117302. Tools.each(PluginManager.dependencies(plugin), function (dep) {
  117303. initPlugin(editor, initializedPlugins, dep);
  117304. });
  117305. if (editor.plugins[plugin]) {
  117306. return;
  117307. }
  117308. try {
  117309. var pluginInstance = new Plugin(editor, pluginUrl, editor.$);
  117310. editor.plugins[plugin] = pluginInstance;
  117311. if (pluginInstance.init) {
  117312. pluginInstance.init(editor, pluginUrl);
  117313. initializedPlugins.push(plugin);
  117314. }
  117315. } catch (e) {
  117316. pluginInitError(editor, plugin, e);
  117317. }
  117318. }
  117319. };
  117320. var trimLegacyPrefix = function (name) {
  117321. return name.replace(/^\-/, '');
  117322. };
  117323. var initPlugins = function (editor) {
  117324. var initializedPlugins = [];
  117325. Tools.each(getPlugins(editor).split(/[ ,]/), function (name) {
  117326. initPlugin(editor, initializedPlugins, trimLegacyPrefix(name));
  117327. });
  117328. };
  117329. var initIcons = function (editor) {
  117330. var iconPackName = Tools.trim(getIconPackName(editor));
  117331. var currentIcons = editor.ui.registry.getAll().icons;
  117332. var loadIcons = __assign(__assign({}, IconManager.get('default').icons), IconManager.get(iconPackName).icons);
  117333. each$j(loadIcons, function (svgData, icon) {
  117334. if (!has$2(currentIcons, icon)) {
  117335. editor.ui.registry.addIcon(icon, svgData);
  117336. }
  117337. });
  117338. };
  117339. var initTheme = function (editor) {
  117340. var theme = getTheme(editor);
  117341. if (isString$1(theme)) {
  117342. editor.settings.theme = trimLegacyPrefix(theme);
  117343. var Theme = ThemeManager.get(theme);
  117344. editor.theme = new Theme(editor, ThemeManager.urls[theme]);
  117345. if (editor.theme.init) {
  117346. editor.theme.init(editor, ThemeManager.urls[theme] || editor.documentBaseUrl.replace(/\/$/, ''), editor.$);
  117347. }
  117348. } else {
  117349. editor.theme = {};
  117350. }
  117351. };
  117352. var renderFromLoadedTheme = function (editor) {
  117353. return editor.theme.renderUI();
  117354. };
  117355. var renderFromThemeFunc = function (editor) {
  117356. var elm = editor.getElement();
  117357. var theme = getTheme(editor);
  117358. var info = theme(editor, elm);
  117359. if (info.editorContainer.nodeType) {
  117360. info.editorContainer.id = info.editorContainer.id || editor.id + '_parent';
  117361. }
  117362. if (info.iframeContainer && info.iframeContainer.nodeType) {
  117363. info.iframeContainer.id = info.iframeContainer.id || editor.id + '_iframecontainer';
  117364. }
  117365. info.height = info.iframeHeight ? info.iframeHeight : elm.offsetHeight;
  117366. return info;
  117367. };
  117368. var createThemeFalseResult = function (element) {
  117369. return {
  117370. editorContainer: element,
  117371. iframeContainer: element,
  117372. api: {}
  117373. };
  117374. };
  117375. var renderThemeFalseIframe = function (targetElement) {
  117376. var iframeContainer = DOM$4.create('div');
  117377. DOM$4.insertAfter(iframeContainer, targetElement);
  117378. return createThemeFalseResult(iframeContainer);
  117379. };
  117380. var renderThemeFalse = function (editor) {
  117381. var targetElement = editor.getElement();
  117382. return editor.inline ? createThemeFalseResult(null) : renderThemeFalseIframe(targetElement);
  117383. };
  117384. var renderThemeUi = function (editor) {
  117385. var elm = editor.getElement();
  117386. editor.orgDisplay = elm.style.display;
  117387. if (isString$1(getTheme(editor))) {
  117388. return renderFromLoadedTheme(editor);
  117389. } else if (isFunction(getTheme(editor))) {
  117390. return renderFromThemeFunc(editor);
  117391. } else {
  117392. return renderThemeFalse(editor);
  117393. }
  117394. };
  117395. var augmentEditorUiApi = function (editor, api) {
  117396. var uiApiFacade = {
  117397. show: Optional.from(api.show).getOr(noop),
  117398. hide: Optional.from(api.hide).getOr(noop),
  117399. disable: Optional.from(api.disable).getOr(noop),
  117400. isDisabled: Optional.from(api.isDisabled).getOr(never),
  117401. enable: function () {
  117402. if (!editor.mode.isReadOnly()) {
  117403. Optional.from(api.enable).map(call);
  117404. }
  117405. }
  117406. };
  117407. editor.ui = __assign(__assign({}, editor.ui), uiApiFacade);
  117408. };
  117409. var init = function (editor) {
  117410. editor.fire('ScriptsLoaded');
  117411. initIcons(editor);
  117412. initTheme(editor);
  117413. initPlugins(editor);
  117414. var renderInfo = renderThemeUi(editor);
  117415. augmentEditorUiApi(editor, Optional.from(renderInfo.api).getOr({}));
  117416. var boxInfo = {
  117417. editorContainer: renderInfo.editorContainer,
  117418. iframeContainer: renderInfo.iframeContainer
  117419. };
  117420. editor.editorContainer = boxInfo.editorContainer ? boxInfo.editorContainer : null;
  117421. appendContentCssFromSettings(editor);
  117422. if (editor.inline) {
  117423. return initContentBody(editor);
  117424. } else {
  117425. return init$1(editor, boxInfo);
  117426. }
  117427. };
  117428. var DOM$3 = DOMUtils.DOM;
  117429. var hasSkipLoadPrefix = function (name) {
  117430. return name.charAt(0) === '-';
  117431. };
  117432. var loadLanguage = function (scriptLoader, editor) {
  117433. var languageCode = getLanguageCode(editor);
  117434. var languageUrl = getLanguageUrl(editor);
  117435. if (I18n.hasCode(languageCode) === false && languageCode !== 'en') {
  117436. var url_1 = languageUrl !== '' ? languageUrl : editor.editorManager.baseURL + '/langs/' + languageCode + '.js';
  117437. scriptLoader.add(url_1, noop, undefined, function () {
  117438. languageLoadError(editor, url_1, languageCode);
  117439. });
  117440. }
  117441. };
  117442. var loadTheme = function (scriptLoader, editor, suffix, callback) {
  117443. var theme = getTheme(editor);
  117444. if (isString$1(theme)) {
  117445. if (!hasSkipLoadPrefix(theme) && !has$2(ThemeManager.urls, theme)) {
  117446. var themeUrl = getThemeUrl(editor);
  117447. if (themeUrl) {
  117448. ThemeManager.load(theme, editor.documentBaseURI.toAbsolute(themeUrl));
  117449. } else {
  117450. ThemeManager.load(theme, 'themes/' + theme + '/theme' + suffix + '.js');
  117451. }
  117452. }
  117453. scriptLoader.loadQueue(function () {
  117454. ThemeManager.waitFor(theme, callback);
  117455. });
  117456. } else {
  117457. callback();
  117458. }
  117459. };
  117460. var getIconsUrlMetaFromUrl = function (editor) {
  117461. return Optional.from(getIconsUrl(editor)).filter(function (url) {
  117462. return url.length > 0;
  117463. }).map(function (url) {
  117464. return {
  117465. url: url,
  117466. name: Optional.none()
  117467. };
  117468. });
  117469. };
  117470. var getIconsUrlMetaFromName = function (editor, name, suffix) {
  117471. return Optional.from(name).filter(function (name) {
  117472. return name.length > 0 && !IconManager.has(name);
  117473. }).map(function (name) {
  117474. return {
  117475. url: editor.editorManager.baseURL + '/icons/' + name + '/icons' + suffix + '.js',
  117476. name: Optional.some(name)
  117477. };
  117478. });
  117479. };
  117480. var loadIcons = function (scriptLoader, editor, suffix) {
  117481. var defaultIconsUrl = getIconsUrlMetaFromName(editor, 'default', suffix);
  117482. var customIconsUrl = getIconsUrlMetaFromUrl(editor).orThunk(function () {
  117483. return getIconsUrlMetaFromName(editor, getIconPackName(editor), '');
  117484. });
  117485. each$k(cat([
  117486. defaultIconsUrl,
  117487. customIconsUrl
  117488. ]), function (urlMeta) {
  117489. scriptLoader.add(urlMeta.url, noop, undefined, function () {
  117490. iconsLoadError(editor, urlMeta.url, urlMeta.name.getOrUndefined());
  117491. });
  117492. });
  117493. };
  117494. var loadPlugins = function (editor, suffix) {
  117495. Tools.each(getExternalPlugins$1(editor), function (url, name) {
  117496. PluginManager.load(name, url, noop, undefined, function () {
  117497. pluginLoadError(editor, url, name);
  117498. });
  117499. editor.settings.plugins += ' ' + name;
  117500. });
  117501. Tools.each(getPlugins(editor).split(/[ ,]/), function (plugin) {
  117502. plugin = Tools.trim(plugin);
  117503. if (plugin && !PluginManager.urls[plugin]) {
  117504. if (hasSkipLoadPrefix(plugin)) {
  117505. plugin = plugin.substr(1, plugin.length);
  117506. var dependencies = PluginManager.dependencies(plugin);
  117507. Tools.each(dependencies, function (depPlugin) {
  117508. var defaultSettings = {
  117509. prefix: 'plugins/',
  117510. resource: depPlugin,
  117511. suffix: '/plugin' + suffix + '.js'
  117512. };
  117513. var dep = PluginManager.createUrl(defaultSettings, depPlugin);
  117514. PluginManager.load(dep.resource, dep, noop, undefined, function () {
  117515. pluginLoadError(editor, dep.prefix + dep.resource + dep.suffix, dep.resource);
  117516. });
  117517. });
  117518. } else {
  117519. var url_2 = {
  117520. prefix: 'plugins/',
  117521. resource: plugin,
  117522. suffix: '/plugin' + suffix + '.js'
  117523. };
  117524. PluginManager.load(plugin, url_2, noop, undefined, function () {
  117525. pluginLoadError(editor, url_2.prefix + url_2.resource + url_2.suffix, plugin);
  117526. });
  117527. }
  117528. }
  117529. });
  117530. };
  117531. var loadScripts = function (editor, suffix) {
  117532. var scriptLoader = ScriptLoader.ScriptLoader;
  117533. loadTheme(scriptLoader, editor, suffix, function () {
  117534. loadLanguage(scriptLoader, editor);
  117535. loadIcons(scriptLoader, editor, suffix);
  117536. loadPlugins(editor, suffix);
  117537. scriptLoader.loadQueue(function () {
  117538. if (!editor.removed) {
  117539. init(editor);
  117540. }
  117541. }, editor, function () {
  117542. if (!editor.removed) {
  117543. init(editor);
  117544. }
  117545. });
  117546. });
  117547. };
  117548. var getStyleSheetLoader = function (element, editor) {
  117549. return instance.forElement(element, {
  117550. contentCssCors: hasContentCssCors(editor),
  117551. referrerPolicy: getReferrerPolicy(editor)
  117552. });
  117553. };
  117554. var render = function (editor) {
  117555. var id = editor.id;
  117556. I18n.setCode(getLanguageCode(editor));
  117557. var readyHandler = function () {
  117558. DOM$3.unbind(window, 'ready', readyHandler);
  117559. editor.render();
  117560. };
  117561. if (!EventUtils.Event.domLoaded) {
  117562. DOM$3.bind(window, 'ready', readyHandler);
  117563. return;
  117564. }
  117565. if (!editor.getElement()) {
  117566. return;
  117567. }
  117568. if (!Env.contentEditable) {
  117569. return;
  117570. }
  117571. var element = SugarElement.fromDom(editor.getElement());
  117572. var snapshot = clone$3(element);
  117573. editor.on('remove', function () {
  117574. eachr(element.dom.attributes, function (attr) {
  117575. return remove$6(element, attr.name);
  117576. });
  117577. setAll$1(element, snapshot);
  117578. });
  117579. editor.ui.styleSheetLoader = getStyleSheetLoader(element, editor);
  117580. if (!isInline(editor)) {
  117581. editor.orgVisibility = editor.getElement().style.visibility;
  117582. editor.getElement().style.visibility = 'hidden';
  117583. } else {
  117584. editor.inline = true;
  117585. }
  117586. var form = editor.getElement().form || DOM$3.getParent(id, 'form');
  117587. if (form) {
  117588. editor.formElement = form;
  117589. if (hasHiddenInput(editor) && !isTextareaOrInput(editor.getElement())) {
  117590. DOM$3.insertAfter(DOM$3.create('input', {
  117591. type: 'hidden',
  117592. name: id
  117593. }), id);
  117594. editor.hasHiddenInput = true;
  117595. }
  117596. editor.formEventDelegate = function (e) {
  117597. editor.fire(e.type, e);
  117598. };
  117599. DOM$3.bind(form, 'submit reset', editor.formEventDelegate);
  117600. editor.on('reset', function () {
  117601. editor.resetContent();
  117602. });
  117603. if (shouldPatchSubmit(editor) && !form.submit.nodeType && !form.submit.length && !form._mceOldSubmit) {
  117604. form._mceOldSubmit = form.submit;
  117605. form.submit = function () {
  117606. editor.editorManager.triggerSave();
  117607. editor.setDirty(false);
  117608. return form._mceOldSubmit(form);
  117609. };
  117610. }
  117611. }
  117612. editor.windowManager = WindowManager(editor);
  117613. editor.notificationManager = NotificationManager(editor);
  117614. if (isEncodingXml(editor)) {
  117615. editor.on('GetContent', function (e) {
  117616. if (e.save) {
  117617. e.content = DOM$3.encode(e.content);
  117618. }
  117619. });
  117620. }
  117621. if (shouldAddFormSubmitTrigger(editor)) {
  117622. editor.on('submit', function () {
  117623. if (editor.initialized) {
  117624. editor.save();
  117625. }
  117626. });
  117627. }
  117628. if (shouldAddUnloadTrigger(editor)) {
  117629. editor._beforeUnload = function () {
  117630. if (editor.initialized && !editor.destroyed && !editor.isHidden()) {
  117631. editor.save({
  117632. format: 'raw',
  117633. no_events: true,
  117634. set_dirty: false
  117635. });
  117636. }
  117637. };
  117638. editor.editorManager.on('BeforeUnload', editor._beforeUnload);
  117639. }
  117640. editor.editorManager.add(editor);
  117641. loadScripts(editor, editor.suffix);
  117642. };
  117643. var addVisual = function (editor, elm) {
  117644. return addVisual$1(editor, elm);
  117645. };
  117646. var legacyPropNames = {
  117647. 'font-size': 'size',
  117648. 'font-family': 'face'
  117649. };
  117650. var getSpecifiedFontProp = function (propName, rootElm, elm) {
  117651. var getProperty = function (elm) {
  117652. return getRaw(elm, propName).orThunk(function () {
  117653. if (name(elm) === 'font') {
  117654. return get$9(legacyPropNames, propName).bind(function (legacyPropName) {
  117655. return getOpt(elm, legacyPropName);
  117656. });
  117657. } else {
  117658. return Optional.none();
  117659. }
  117660. });
  117661. };
  117662. var isRoot = function (elm) {
  117663. return eq(SugarElement.fromDom(rootElm), elm);
  117664. };
  117665. return closest$1(SugarElement.fromDom(elm), function (elm) {
  117666. return getProperty(elm);
  117667. }, isRoot);
  117668. };
  117669. var normalizeFontFamily = function (fontFamily) {
  117670. return fontFamily.replace(/[\'\"\\]/g, '').replace(/,\s+/g, ',');
  117671. };
  117672. var getComputedFontProp = function (propName, elm) {
  117673. return Optional.from(DOMUtils.DOM.getStyle(elm, propName, true));
  117674. };
  117675. var getFontProp = function (propName) {
  117676. return function (rootElm, elm) {
  117677. return Optional.from(elm).map(SugarElement.fromDom).filter(isElement$6).bind(function (element) {
  117678. return getSpecifiedFontProp(propName, rootElm, element.dom).or(getComputedFontProp(propName, element.dom));
  117679. }).getOr('');
  117680. };
  117681. };
  117682. var getFontSize = getFontProp('font-size');
  117683. var getFontFamily = compose(normalizeFontFamily, getFontProp('font-family'));
  117684. var findFirstCaretElement = function (editor) {
  117685. return firstPositionIn(editor.getBody()).map(function (caret) {
  117686. var container = caret.container();
  117687. return isText$7(container) ? container.parentNode : container;
  117688. });
  117689. };
  117690. var getCaretElement = function (editor) {
  117691. return Optional.from(editor.selection.getRng()).bind(function (rng) {
  117692. var root = editor.getBody();
  117693. var atStartOfNode = rng.startContainer === root && rng.startOffset === 0;
  117694. return atStartOfNode ? Optional.none() : Optional.from(editor.selection.getStart(true));
  117695. });
  117696. };
  117697. var bindRange = function (editor, binder) {
  117698. return getCaretElement(editor).orThunk(curry(findFirstCaretElement, editor)).map(SugarElement.fromDom).filter(isElement$6).bind(binder);
  117699. };
  117700. var mapRange = function (editor, mapper) {
  117701. return bindRange(editor, compose1(Optional.some, mapper));
  117702. };
  117703. var fromFontSizeNumber = function (editor, value) {
  117704. if (/^[0-9.]+$/.test(value)) {
  117705. var fontSizeNumber = parseInt(value, 10);
  117706. if (fontSizeNumber >= 1 && fontSizeNumber <= 7) {
  117707. var fontSizes = getFontStyleValues(editor);
  117708. var fontClasses = getFontSizeClasses(editor);
  117709. if (fontClasses) {
  117710. return fontClasses[fontSizeNumber - 1] || value;
  117711. } else {
  117712. return fontSizes[fontSizeNumber - 1] || value;
  117713. }
  117714. } else {
  117715. return value;
  117716. }
  117717. } else {
  117718. return value;
  117719. }
  117720. };
  117721. var normalizeFontNames = function (font) {
  117722. var fonts = font.split(/\s*,\s*/);
  117723. return map$3(fonts, function (font) {
  117724. if (font.indexOf(' ') !== -1 && !(startsWith(font, '"') || startsWith(font, '\''))) {
  117725. return '\'' + font + '\'';
  117726. } else {
  117727. return font;
  117728. }
  117729. }).join(',');
  117730. };
  117731. var fontNameAction = function (editor, value) {
  117732. var font = fromFontSizeNumber(editor, value);
  117733. editor.formatter.toggle('fontname', { value: normalizeFontNames(font) });
  117734. editor.nodeChanged();
  117735. };
  117736. var fontNameQuery = function (editor) {
  117737. return mapRange(editor, function (elm) {
  117738. return getFontFamily(editor.getBody(), elm.dom);
  117739. }).getOr('');
  117740. };
  117741. var fontSizeAction = function (editor, value) {
  117742. editor.formatter.toggle('fontsize', { value: fromFontSizeNumber(editor, value) });
  117743. editor.nodeChanged();
  117744. };
  117745. var fontSizeQuery = function (editor) {
  117746. return mapRange(editor, function (elm) {
  117747. return getFontSize(editor.getBody(), elm.dom);
  117748. }).getOr('');
  117749. };
  117750. var lineHeightQuery = function (editor) {
  117751. return mapRange(editor, function (elm) {
  117752. var root = SugarElement.fromDom(editor.getBody());
  117753. var specifiedStyle = closest$1(elm, function (elm) {
  117754. return getRaw(elm, 'line-height');
  117755. }, curry(eq, root));
  117756. var computedStyle = function () {
  117757. var lineHeight = parseFloat(get$5(elm, 'line-height'));
  117758. var fontSize = parseFloat(get$5(elm, 'font-size'));
  117759. return String(lineHeight / fontSize);
  117760. };
  117761. return specifiedStyle.getOrThunk(computedStyle);
  117762. }).getOr('');
  117763. };
  117764. var lineHeightAction = function (editor, lineHeight) {
  117765. editor.formatter.toggle('lineheight', { value: String(lineHeight) });
  117766. editor.nodeChanged();
  117767. };
  117768. var processValue = function (value) {
  117769. if (typeof value !== 'string') {
  117770. var details = Tools.extend({
  117771. paste: value.paste,
  117772. data: { paste: value.paste }
  117773. }, value);
  117774. return {
  117775. content: value.content,
  117776. details: details
  117777. };
  117778. }
  117779. return {
  117780. content: value,
  117781. details: {}
  117782. };
  117783. };
  117784. var insertAtCaret = function (editor, value) {
  117785. var result = processValue(value);
  117786. insertContent(editor, result.content, result.details);
  117787. };
  117788. var each$4 = Tools.each;
  117789. var map = Tools.map, inArray = Tools.inArray;
  117790. var EditorCommands = function () {
  117791. function EditorCommands(editor) {
  117792. this.commands = {
  117793. state: {},
  117794. exec: {},
  117795. value: {}
  117796. };
  117797. this.editor = editor;
  117798. this.setupCommands(editor);
  117799. }
  117800. EditorCommands.prototype.execCommand = function (command, ui, value, args) {
  117801. var func, state = false;
  117802. var self = this;
  117803. if (self.editor.removed) {
  117804. return;
  117805. }
  117806. if (command.toLowerCase() !== 'mcefocus') {
  117807. if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(command) && (!args || !args.skip_focus)) {
  117808. self.editor.focus();
  117809. } else {
  117810. restore(self.editor);
  117811. }
  117812. }
  117813. args = self.editor.fire('BeforeExecCommand', {
  117814. command: command,
  117815. ui: ui,
  117816. value: value
  117817. });
  117818. if (args.isDefaultPrevented()) {
  117819. return false;
  117820. }
  117821. var customCommand = command.toLowerCase();
  117822. if (func = self.commands.exec[customCommand]) {
  117823. func(customCommand, ui, value);
  117824. self.editor.fire('ExecCommand', {
  117825. command: command,
  117826. ui: ui,
  117827. value: value
  117828. });
  117829. return true;
  117830. }
  117831. each$4(this.editor.plugins, function (p) {
  117832. if (p.execCommand && p.execCommand(command, ui, value)) {
  117833. self.editor.fire('ExecCommand', {
  117834. command: command,
  117835. ui: ui,
  117836. value: value
  117837. });
  117838. state = true;
  117839. return false;
  117840. }
  117841. });
  117842. if (state) {
  117843. return state;
  117844. }
  117845. if (self.editor.theme && self.editor.theme.execCommand && self.editor.theme.execCommand(command, ui, value)) {
  117846. self.editor.fire('ExecCommand', {
  117847. command: command,
  117848. ui: ui,
  117849. value: value
  117850. });
  117851. return true;
  117852. }
  117853. try {
  117854. state = self.editor.getDoc().execCommand(command, ui, value);
  117855. } catch (ex) {
  117856. }
  117857. if (state) {
  117858. self.editor.fire('ExecCommand', {
  117859. command: command,
  117860. ui: ui,
  117861. value: value
  117862. });
  117863. return true;
  117864. }
  117865. return false;
  117866. };
  117867. EditorCommands.prototype.queryCommandState = function (command) {
  117868. var func;
  117869. if (this.editor.quirks.isHidden() || this.editor.removed) {
  117870. return;
  117871. }
  117872. command = command.toLowerCase();
  117873. if (func = this.commands.state[command]) {
  117874. return func(command);
  117875. }
  117876. try {
  117877. return this.editor.getDoc().queryCommandState(command);
  117878. } catch (ex) {
  117879. }
  117880. return false;
  117881. };
  117882. EditorCommands.prototype.queryCommandValue = function (command) {
  117883. var func;
  117884. if (this.editor.quirks.isHidden() || this.editor.removed) {
  117885. return;
  117886. }
  117887. command = command.toLowerCase();
  117888. if (func = this.commands.value[command]) {
  117889. return func(command);
  117890. }
  117891. try {
  117892. return this.editor.getDoc().queryCommandValue(command);
  117893. } catch (ex) {
  117894. }
  117895. };
  117896. EditorCommands.prototype.addCommands = function (commandList, type) {
  117897. if (type === void 0) {
  117898. type = 'exec';
  117899. }
  117900. var self = this;
  117901. each$4(commandList, function (callback, command) {
  117902. each$4(command.toLowerCase().split(','), function (command) {
  117903. self.commands[type][command] = callback;
  117904. });
  117905. });
  117906. };
  117907. EditorCommands.prototype.addCommand = function (command, callback, scope) {
  117908. var _this = this;
  117909. command = command.toLowerCase();
  117910. this.commands.exec[command] = function (command, ui, value, args) {
  117911. return callback.call(scope || _this.editor, ui, value, args);
  117912. };
  117913. };
  117914. EditorCommands.prototype.queryCommandSupported = function (command) {
  117915. command = command.toLowerCase();
  117916. if (this.commands.exec[command]) {
  117917. return true;
  117918. }
  117919. try {
  117920. return this.editor.getDoc().queryCommandSupported(command);
  117921. } catch (ex) {
  117922. }
  117923. return false;
  117924. };
  117925. EditorCommands.prototype.addQueryStateHandler = function (command, callback, scope) {
  117926. var _this = this;
  117927. command = command.toLowerCase();
  117928. this.commands.state[command] = function () {
  117929. return callback.call(scope || _this.editor);
  117930. };
  117931. };
  117932. EditorCommands.prototype.addQueryValueHandler = function (command, callback, scope) {
  117933. var _this = this;
  117934. command = command.toLowerCase();
  117935. this.commands.value[command] = function () {
  117936. return callback.call(scope || _this.editor);
  117937. };
  117938. };
  117939. EditorCommands.prototype.hasCustomCommand = function (command) {
  117940. command = command.toLowerCase();
  117941. return !!this.commands.exec[command];
  117942. };
  117943. EditorCommands.prototype.execNativeCommand = function (command, ui, value) {
  117944. if (ui === undefined) {
  117945. ui = false;
  117946. }
  117947. if (value === undefined) {
  117948. value = null;
  117949. }
  117950. return this.editor.getDoc().execCommand(command, ui, value);
  117951. };
  117952. EditorCommands.prototype.isFormatMatch = function (name) {
  117953. return this.editor.formatter.match(name);
  117954. };
  117955. EditorCommands.prototype.toggleFormat = function (name, value) {
  117956. this.editor.formatter.toggle(name, value);
  117957. this.editor.nodeChanged();
  117958. };
  117959. EditorCommands.prototype.storeSelection = function (type) {
  117960. this.selectionBookmark = this.editor.selection.getBookmark(type);
  117961. };
  117962. EditorCommands.prototype.restoreSelection = function () {
  117963. this.editor.selection.moveToBookmark(this.selectionBookmark);
  117964. };
  117965. EditorCommands.prototype.setupCommands = function (editor) {
  117966. var self = this;
  117967. this.addCommands({
  117968. 'mceResetDesignMode,mceBeginUndoLevel': noop,
  117969. 'mceEndUndoLevel,mceAddUndoLevel': function () {
  117970. editor.undoManager.add();
  117971. },
  117972. 'mceFocus': function (_command, _ui, value) {
  117973. focus(editor, value);
  117974. },
  117975. 'Cut,Copy,Paste': function (command) {
  117976. var doc = editor.getDoc();
  117977. var failed;
  117978. try {
  117979. self.execNativeCommand(command);
  117980. } catch (ex) {
  117981. failed = true;
  117982. }
  117983. if (command === 'paste' && !doc.queryCommandEnabled(command)) {
  117984. failed = true;
  117985. }
  117986. if (failed || !doc.queryCommandSupported(command)) {
  117987. var msg = editor.translate('Your browser doesn\'t support direct access to the clipboard. ' + 'Please use the Ctrl+X/C/V keyboard shortcuts instead.');
  117988. if (Env.mac) {
  117989. msg = msg.replace(/Ctrl\+/g, '\u2318+');
  117990. }
  117991. editor.notificationManager.open({
  117992. text: msg,
  117993. type: 'error'
  117994. });
  117995. }
  117996. },
  117997. 'unlink': function () {
  117998. if (editor.selection.isCollapsed()) {
  117999. var elm = editor.dom.getParent(editor.selection.getStart(), 'a');
  118000. if (elm) {
  118001. editor.dom.remove(elm, true);
  118002. }
  118003. return;
  118004. }
  118005. editor.formatter.remove('link');
  118006. },
  118007. 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone': function (command) {
  118008. var align = command.substring(7);
  118009. if (align === 'full') {
  118010. align = 'justify';
  118011. }
  118012. each$4('left,center,right,justify'.split(','), function (name) {
  118013. if (align !== name) {
  118014. editor.formatter.remove('align' + name);
  118015. }
  118016. });
  118017. if (align !== 'none') {
  118018. self.toggleFormat('align' + align);
  118019. }
  118020. },
  118021. 'InsertUnorderedList,InsertOrderedList': function (command) {
  118022. var listParent;
  118023. self.execNativeCommand(command);
  118024. var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
  118025. if (listElm) {
  118026. listParent = listElm.parentNode;
  118027. if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) {
  118028. self.storeSelection();
  118029. editor.dom.split(listParent, listElm);
  118030. self.restoreSelection();
  118031. }
  118032. }
  118033. },
  118034. 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) {
  118035. self.toggleFormat(command);
  118036. },
  118037. 'ForeColor,HiliteColor': function (command, ui, value) {
  118038. self.toggleFormat(command, { value: value });
  118039. },
  118040. 'FontName': function (command, ui, value) {
  118041. fontNameAction(editor, value);
  118042. },
  118043. 'FontSize': function (command, ui, value) {
  118044. fontSizeAction(editor, value);
  118045. },
  118046. 'LineHeight': function (command, ui, value) {
  118047. lineHeightAction(editor, value);
  118048. },
  118049. 'Lang': function (command, ui, lang) {
  118050. self.toggleFormat(command, {
  118051. value: lang.code,
  118052. customValue: lang.customCode
  118053. });
  118054. },
  118055. 'RemoveFormat': function (command) {
  118056. editor.formatter.remove(command);
  118057. },
  118058. 'mceBlockQuote': function () {
  118059. self.toggleFormat('blockquote');
  118060. },
  118061. 'FormatBlock': function (command, ui, value) {
  118062. return self.toggleFormat(value || 'p');
  118063. },
  118064. 'mceCleanup': function () {
  118065. var bookmark = editor.selection.getBookmark();
  118066. editor.setContent(editor.getContent());
  118067. editor.selection.moveToBookmark(bookmark);
  118068. },
  118069. 'mceRemoveNode': function (command, ui, value) {
  118070. var node = value || editor.selection.getNode();
  118071. if (node !== editor.getBody()) {
  118072. self.storeSelection();
  118073. editor.dom.remove(node, true);
  118074. self.restoreSelection();
  118075. }
  118076. },
  118077. 'mceSelectNodeDepth': function (command, ui, value) {
  118078. var counter = 0;
  118079. editor.dom.getParent(editor.selection.getNode(), function (node) {
  118080. if (node.nodeType === 1 && counter++ === value) {
  118081. editor.selection.select(node);
  118082. return false;
  118083. }
  118084. }, editor.getBody());
  118085. },
  118086. 'mceSelectNode': function (command, ui, value) {
  118087. editor.selection.select(value);
  118088. },
  118089. 'mceInsertContent': function (command, ui, value) {
  118090. insertAtCaret(editor, value);
  118091. },
  118092. 'mceInsertRawHTML': function (command, ui, value) {
  118093. editor.selection.setContent('tiny_mce_marker');
  118094. var content = editor.getContent();
  118095. editor.setContent(content.replace(/tiny_mce_marker/g, function () {
  118096. return value;
  118097. }));
  118098. },
  118099. 'mceInsertNewLine': function (command, ui, value) {
  118100. insert(editor, value);
  118101. },
  118102. 'mceToggleFormat': function (command, ui, value) {
  118103. self.toggleFormat(value);
  118104. },
  118105. 'mceSetContent': function (command, ui, value) {
  118106. editor.setContent(value);
  118107. },
  118108. 'Indent,Outdent': function (command) {
  118109. handle(editor, command);
  118110. },
  118111. 'mceRepaint': noop,
  118112. 'InsertHorizontalRule': function () {
  118113. editor.execCommand('mceInsertContent', false, '<hr />');
  118114. },
  118115. 'mceToggleVisualAid': function () {
  118116. editor.hasVisual = !editor.hasVisual;
  118117. editor.addVisual();
  118118. },
  118119. 'mceReplaceContent': function (command, ui, value) {
  118120. editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, editor.selection.getContent({ format: 'text' })));
  118121. },
  118122. 'mceInsertLink': function (command, ui, value) {
  118123. if (typeof value === 'string') {
  118124. value = { href: value };
  118125. }
  118126. var anchor = editor.dom.getParent(editor.selection.getNode(), 'a');
  118127. value.href = value.href.replace(/ /g, '%20');
  118128. if (!anchor || !value.href) {
  118129. editor.formatter.remove('link');
  118130. }
  118131. if (value.href) {
  118132. editor.formatter.apply('link', value, anchor);
  118133. }
  118134. },
  118135. 'selectAll': function () {
  118136. var editingHost = editor.dom.getParent(editor.selection.getStart(), isContentEditableTrue$4);
  118137. if (editingHost) {
  118138. var rng = editor.dom.createRng();
  118139. rng.selectNodeContents(editingHost);
  118140. editor.selection.setRng(rng);
  118141. }
  118142. },
  118143. 'mceNewDocument': function () {
  118144. editor.setContent('');
  118145. },
  118146. 'InsertLineBreak': function (command, ui, value) {
  118147. insert$1(editor, value);
  118148. return true;
  118149. }
  118150. });
  118151. var alignStates = function (name) {
  118152. return function () {
  118153. var selection = editor.selection;
  118154. var nodes = selection.isCollapsed() ? [editor.dom.getParent(selection.getNode(), editor.dom.isBlock)] : selection.getSelectedBlocks();
  118155. var matches = map(nodes, function (node) {
  118156. return !!editor.formatter.matchNode(node, name);
  118157. });
  118158. return inArray(matches, true) !== -1;
  118159. };
  118160. };
  118161. self.addCommands({
  118162. 'JustifyLeft': alignStates('alignleft'),
  118163. 'JustifyCenter': alignStates('aligncenter'),
  118164. 'JustifyRight': alignStates('alignright'),
  118165. 'JustifyFull': alignStates('alignjustify'),
  118166. 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) {
  118167. return self.isFormatMatch(command);
  118168. },
  118169. 'mceBlockQuote': function () {
  118170. return self.isFormatMatch('blockquote');
  118171. },
  118172. 'Outdent': function () {
  118173. return canOutdent(editor);
  118174. },
  118175. 'InsertUnorderedList,InsertOrderedList': function (command) {
  118176. var list = editor.dom.getParent(editor.selection.getNode(), 'ul,ol');
  118177. return list && (command === 'insertunorderedlist' && list.tagName === 'UL' || command === 'insertorderedlist' && list.tagName === 'OL');
  118178. }
  118179. }, 'state');
  118180. self.addCommands({
  118181. Undo: function () {
  118182. editor.undoManager.undo();
  118183. },
  118184. Redo: function () {
  118185. editor.undoManager.redo();
  118186. }
  118187. });
  118188. self.addQueryValueHandler('FontName', function () {
  118189. return fontNameQuery(editor);
  118190. }, this);
  118191. self.addQueryValueHandler('FontSize', function () {
  118192. return fontSizeQuery(editor);
  118193. }, this);
  118194. self.addQueryValueHandler('LineHeight', function () {
  118195. return lineHeightQuery(editor);
  118196. }, this);
  118197. };
  118198. return EditorCommands;
  118199. }();
  118200. var internalContentEditableAttr = 'data-mce-contenteditable';
  118201. var toggleClass = function (elm, cls, state) {
  118202. if (has(elm, cls) && state === false) {
  118203. remove$3(elm, cls);
  118204. } else if (state) {
  118205. add$1(elm, cls);
  118206. }
  118207. };
  118208. var setEditorCommandState = function (editor, cmd, state) {
  118209. try {
  118210. editor.getDoc().execCommand(cmd, false, String(state));
  118211. } catch (ex) {
  118212. }
  118213. };
  118214. var setContentEditable = function (elm, state) {
  118215. elm.dom.contentEditable = state ? 'true' : 'false';
  118216. };
  118217. var switchOffContentEditableTrue = function (elm) {
  118218. each$k(descendants(elm, '*[contenteditable="true"]'), function (elm) {
  118219. set$1(elm, internalContentEditableAttr, 'true');
  118220. setContentEditable(elm, false);
  118221. });
  118222. };
  118223. var switchOnContentEditableTrue = function (elm) {
  118224. each$k(descendants(elm, '*[' + internalContentEditableAttr + '="true"]'), function (elm) {
  118225. remove$6(elm, internalContentEditableAttr);
  118226. setContentEditable(elm, true);
  118227. });
  118228. };
  118229. var removeFakeSelection = function (editor) {
  118230. Optional.from(editor.selection.getNode()).each(function (elm) {
  118231. elm.removeAttribute('data-mce-selected');
  118232. });
  118233. };
  118234. var restoreFakeSelection = function (editor) {
  118235. editor.selection.setRng(editor.selection.getRng());
  118236. };
  118237. var toggleReadOnly = function (editor, state) {
  118238. var body = SugarElement.fromDom(editor.getBody());
  118239. toggleClass(body, 'mce-content-readonly', state);
  118240. if (state) {
  118241. editor.selection.controlSelection.hideResizeRect();
  118242. editor._selectionOverrides.hideFakeCaret();
  118243. removeFakeSelection(editor);
  118244. editor.readonly = true;
  118245. setContentEditable(body, false);
  118246. switchOffContentEditableTrue(body);
  118247. } else {
  118248. editor.readonly = false;
  118249. setContentEditable(body, true);
  118250. switchOnContentEditableTrue(body);
  118251. setEditorCommandState(editor, 'StyleWithCSS', false);
  118252. setEditorCommandState(editor, 'enableInlineTableEditing', false);
  118253. setEditorCommandState(editor, 'enableObjectResizing', false);
  118254. if (hasEditorOrUiFocus(editor)) {
  118255. editor.focus();
  118256. }
  118257. restoreFakeSelection(editor);
  118258. editor.nodeChanged();
  118259. }
  118260. };
  118261. var isReadOnly = function (editor) {
  118262. return editor.readonly;
  118263. };
  118264. var registerFilters = function (editor) {
  118265. editor.parser.addAttributeFilter('contenteditable', function (nodes) {
  118266. if (isReadOnly(editor)) {
  118267. each$k(nodes, function (node) {
  118268. node.attr(internalContentEditableAttr, node.attr('contenteditable'));
  118269. node.attr('contenteditable', 'false');
  118270. });
  118271. }
  118272. });
  118273. editor.serializer.addAttributeFilter(internalContentEditableAttr, function (nodes) {
  118274. if (isReadOnly(editor)) {
  118275. each$k(nodes, function (node) {
  118276. node.attr('contenteditable', node.attr(internalContentEditableAttr));
  118277. });
  118278. }
  118279. });
  118280. editor.serializer.addTempAttr(internalContentEditableAttr);
  118281. };
  118282. var registerReadOnlyContentFilters = function (editor) {
  118283. if (editor.serializer) {
  118284. registerFilters(editor);
  118285. } else {
  118286. editor.on('PreInit', function () {
  118287. registerFilters(editor);
  118288. });
  118289. }
  118290. };
  118291. var isClickEvent = function (e) {
  118292. return e.type === 'click';
  118293. };
  118294. var getAnchorHrefOpt = function (editor, elm) {
  118295. var isRoot = function (elm) {
  118296. return eq(elm, SugarElement.fromDom(editor.getBody()));
  118297. };
  118298. return closest$2(elm, 'a', isRoot).bind(function (a) {
  118299. return getOpt(a, 'href');
  118300. });
  118301. };
  118302. var processReadonlyEvents = function (editor, e) {
  118303. if (isClickEvent(e) && !VK.metaKeyPressed(e)) {
  118304. var elm = SugarElement.fromDom(e.target);
  118305. getAnchorHrefOpt(editor, elm).each(function (href) {
  118306. e.preventDefault();
  118307. if (/^#/.test(href)) {
  118308. var targetEl = editor.dom.select(href + ',[name="' + removeLeading(href, '#') + '"]');
  118309. if (targetEl.length) {
  118310. editor.selection.scrollIntoView(targetEl[0], true);
  118311. }
  118312. } else {
  118313. window.open(href, '_blank', 'rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes');
  118314. }
  118315. });
  118316. }
  118317. };
  118318. var registerReadOnlySelectionBlockers = function (editor) {
  118319. editor.on('ShowCaret', function (e) {
  118320. if (isReadOnly(editor)) {
  118321. e.preventDefault();
  118322. }
  118323. });
  118324. editor.on('ObjectSelected', function (e) {
  118325. if (isReadOnly(editor)) {
  118326. e.preventDefault();
  118327. }
  118328. });
  118329. };
  118330. var nativeEvents = Tools.makeMap('focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange ' + 'mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover ' + 'draggesture dragdrop drop drag submit ' + 'compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel', ' ');
  118331. var EventDispatcher = function () {
  118332. function EventDispatcher(settings) {
  118333. this.bindings = {};
  118334. this.settings = settings || {};
  118335. this.scope = this.settings.scope || this;
  118336. this.toggleEvent = this.settings.toggleEvent || never;
  118337. }
  118338. EventDispatcher.isNative = function (name) {
  118339. return !!nativeEvents[name.toLowerCase()];
  118340. };
  118341. EventDispatcher.prototype.fire = function (name, args) {
  118342. var lcName = name.toLowerCase();
  118343. var event = normalize$3(lcName, args || {}, this.scope);
  118344. if (this.settings.beforeFire) {
  118345. this.settings.beforeFire(event);
  118346. }
  118347. var handlers = this.bindings[lcName];
  118348. if (handlers) {
  118349. for (var i = 0, l = handlers.length; i < l; i++) {
  118350. var callback = handlers[i];
  118351. if (callback.removed) {
  118352. continue;
  118353. }
  118354. if (callback.once) {
  118355. this.off(lcName, callback.func);
  118356. }
  118357. if (event.isImmediatePropagationStopped()) {
  118358. return event;
  118359. }
  118360. if (callback.func.call(this.scope, event) === false) {
  118361. event.preventDefault();
  118362. return event;
  118363. }
  118364. }
  118365. }
  118366. return event;
  118367. };
  118368. EventDispatcher.prototype.on = function (name, callback, prepend, extra) {
  118369. if (callback === false) {
  118370. callback = never;
  118371. }
  118372. if (callback) {
  118373. var wrappedCallback = {
  118374. func: callback,
  118375. removed: false
  118376. };
  118377. if (extra) {
  118378. Tools.extend(wrappedCallback, extra);
  118379. }
  118380. var names = name.toLowerCase().split(' ');
  118381. var i = names.length;
  118382. while (i--) {
  118383. var currentName = names[i];
  118384. var handlers = this.bindings[currentName];
  118385. if (!handlers) {
  118386. handlers = [];
  118387. this.toggleEvent(currentName, true);
  118388. }
  118389. if (prepend) {
  118390. handlers = __spreadArray([wrappedCallback], handlers, true);
  118391. } else {
  118392. handlers = __spreadArray(__spreadArray([], handlers, true), [wrappedCallback], false);
  118393. }
  118394. this.bindings[currentName] = handlers;
  118395. }
  118396. }
  118397. return this;
  118398. };
  118399. EventDispatcher.prototype.off = function (name, callback) {
  118400. var _this = this;
  118401. if (name) {
  118402. var names = name.toLowerCase().split(' ');
  118403. var i = names.length;
  118404. while (i--) {
  118405. var currentName = names[i];
  118406. var handlers = this.bindings[currentName];
  118407. if (!currentName) {
  118408. each$j(this.bindings, function (_value, bindingName) {
  118409. _this.toggleEvent(bindingName, false);
  118410. delete _this.bindings[bindingName];
  118411. });
  118412. return this;
  118413. }
  118414. if (handlers) {
  118415. if (!callback) {
  118416. handlers.length = 0;
  118417. } else {
  118418. var filteredHandlers = partition(handlers, function (handler) {
  118419. return handler.func === callback;
  118420. });
  118421. handlers = filteredHandlers.fail;
  118422. this.bindings[currentName] = handlers;
  118423. each$k(filteredHandlers.pass, function (handler) {
  118424. handler.removed = true;
  118425. });
  118426. }
  118427. if (!handlers.length) {
  118428. this.toggleEvent(name, false);
  118429. delete this.bindings[currentName];
  118430. }
  118431. }
  118432. }
  118433. } else {
  118434. each$j(this.bindings, function (_value, name) {
  118435. _this.toggleEvent(name, false);
  118436. });
  118437. this.bindings = {};
  118438. }
  118439. return this;
  118440. };
  118441. EventDispatcher.prototype.once = function (name, callback, prepend) {
  118442. return this.on(name, callback, prepend, { once: true });
  118443. };
  118444. EventDispatcher.prototype.has = function (name) {
  118445. name = name.toLowerCase();
  118446. return !(!this.bindings[name] || this.bindings[name].length === 0);
  118447. };
  118448. return EventDispatcher;
  118449. }();
  118450. var getEventDispatcher = function (obj) {
  118451. if (!obj._eventDispatcher) {
  118452. obj._eventDispatcher = new EventDispatcher({
  118453. scope: obj,
  118454. toggleEvent: function (name, state) {
  118455. if (EventDispatcher.isNative(name) && obj.toggleNativeEvent) {
  118456. obj.toggleNativeEvent(name, state);
  118457. }
  118458. }
  118459. });
  118460. }
  118461. return obj._eventDispatcher;
  118462. };
  118463. var Observable = {
  118464. fire: function (name, args, bubble) {
  118465. var self = this;
  118466. if (self.removed && name !== 'remove' && name !== 'detach') {
  118467. return args;
  118468. }
  118469. var dispatcherArgs = getEventDispatcher(self).fire(name, args);
  118470. if (bubble !== false && self.parent) {
  118471. var parent_1 = self.parent();
  118472. while (parent_1 && !dispatcherArgs.isPropagationStopped()) {
  118473. parent_1.fire(name, dispatcherArgs, false);
  118474. parent_1 = parent_1.parent();
  118475. }
  118476. }
  118477. return dispatcherArgs;
  118478. },
  118479. on: function (name, callback, prepend) {
  118480. return getEventDispatcher(this).on(name, callback, prepend);
  118481. },
  118482. off: function (name, callback) {
  118483. return getEventDispatcher(this).off(name, callback);
  118484. },
  118485. once: function (name, callback) {
  118486. return getEventDispatcher(this).once(name, callback);
  118487. },
  118488. hasEventListeners: function (name) {
  118489. return getEventDispatcher(this).has(name);
  118490. }
  118491. };
  118492. var DOM$2 = DOMUtils.DOM;
  118493. var customEventRootDelegates;
  118494. var getEventTarget = function (editor, eventName) {
  118495. if (eventName === 'selectionchange') {
  118496. return editor.getDoc();
  118497. }
  118498. if (!editor.inline && /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(eventName)) {
  118499. return editor.getDoc().documentElement;
  118500. }
  118501. var eventRoot = getEventRoot(editor);
  118502. if (eventRoot) {
  118503. if (!editor.eventRoot) {
  118504. editor.eventRoot = DOM$2.select(eventRoot)[0];
  118505. }
  118506. return editor.eventRoot;
  118507. }
  118508. return editor.getBody();
  118509. };
  118510. var isListening = function (editor) {
  118511. return !editor.hidden && !isReadOnly(editor);
  118512. };
  118513. var fireEvent = function (editor, eventName, e) {
  118514. if (isListening(editor)) {
  118515. editor.fire(eventName, e);
  118516. } else if (isReadOnly(editor)) {
  118517. processReadonlyEvents(editor, e);
  118518. }
  118519. };
  118520. var bindEventDelegate = function (editor, eventName) {
  118521. var delegate;
  118522. if (!editor.delegates) {
  118523. editor.delegates = {};
  118524. }
  118525. if (editor.delegates[eventName] || editor.removed) {
  118526. return;
  118527. }
  118528. var eventRootElm = getEventTarget(editor, eventName);
  118529. if (getEventRoot(editor)) {
  118530. if (!customEventRootDelegates) {
  118531. customEventRootDelegates = {};
  118532. editor.editorManager.on('removeEditor', function () {
  118533. if (!editor.editorManager.activeEditor) {
  118534. if (customEventRootDelegates) {
  118535. each$j(customEventRootDelegates, function (_value, name) {
  118536. editor.dom.unbind(getEventTarget(editor, name));
  118537. });
  118538. customEventRootDelegates = null;
  118539. }
  118540. }
  118541. });
  118542. }
  118543. if (customEventRootDelegates[eventName]) {
  118544. return;
  118545. }
  118546. delegate = function (e) {
  118547. var target = e.target;
  118548. var editors = editor.editorManager.get();
  118549. var i = editors.length;
  118550. while (i--) {
  118551. var body = editors[i].getBody();
  118552. if (body === target || DOM$2.isChildOf(target, body)) {
  118553. fireEvent(editors[i], eventName, e);
  118554. }
  118555. }
  118556. };
  118557. customEventRootDelegates[eventName] = delegate;
  118558. DOM$2.bind(eventRootElm, eventName, delegate);
  118559. } else {
  118560. delegate = function (e) {
  118561. fireEvent(editor, eventName, e);
  118562. };
  118563. DOM$2.bind(eventRootElm, eventName, delegate);
  118564. editor.delegates[eventName] = delegate;
  118565. }
  118566. };
  118567. var EditorObservable = __assign(__assign({}, Observable), {
  118568. bindPendingEventDelegates: function () {
  118569. var self = this;
  118570. Tools.each(self._pendingNativeEvents, function (name) {
  118571. bindEventDelegate(self, name);
  118572. });
  118573. },
  118574. toggleNativeEvent: function (name, state) {
  118575. var self = this;
  118576. if (name === 'focus' || name === 'blur') {
  118577. return;
  118578. }
  118579. if (self.removed) {
  118580. return;
  118581. }
  118582. if (state) {
  118583. if (self.initialized) {
  118584. bindEventDelegate(self, name);
  118585. } else {
  118586. if (!self._pendingNativeEvents) {
  118587. self._pendingNativeEvents = [name];
  118588. } else {
  118589. self._pendingNativeEvents.push(name);
  118590. }
  118591. }
  118592. } else if (self.initialized) {
  118593. self.dom.unbind(getEventTarget(self, name), name, self.delegates[name]);
  118594. delete self.delegates[name];
  118595. }
  118596. },
  118597. unbindAllNativeEvents: function () {
  118598. var self = this;
  118599. var body = self.getBody();
  118600. var dom = self.dom;
  118601. if (self.delegates) {
  118602. each$j(self.delegates, function (value, name) {
  118603. self.dom.unbind(getEventTarget(self, name), name, value);
  118604. });
  118605. delete self.delegates;
  118606. }
  118607. if (!self.inline && body && dom) {
  118608. body.onload = null;
  118609. dom.unbind(self.getWin());
  118610. dom.unbind(self.getDoc());
  118611. }
  118612. if (dom) {
  118613. dom.unbind(body);
  118614. dom.unbind(self.getContainer());
  118615. }
  118616. }
  118617. });
  118618. var defaultModes = [
  118619. 'design',
  118620. 'readonly'
  118621. ];
  118622. var switchToMode = function (editor, activeMode, availableModes, mode) {
  118623. var oldMode = availableModes[activeMode.get()];
  118624. var newMode = availableModes[mode];
  118625. try {
  118626. newMode.activate();
  118627. } catch (e) {
  118628. console.error('problem while activating editor mode ' + mode + ':', e);
  118629. return;
  118630. }
  118631. oldMode.deactivate();
  118632. if (oldMode.editorReadOnly !== newMode.editorReadOnly) {
  118633. toggleReadOnly(editor, newMode.editorReadOnly);
  118634. }
  118635. activeMode.set(mode);
  118636. fireSwitchMode(editor, mode);
  118637. };
  118638. var setMode = function (editor, availableModes, activeMode, mode) {
  118639. if (mode === activeMode.get()) {
  118640. return;
  118641. } else if (!has$2(availableModes, mode)) {
  118642. throw new Error('Editor mode \'' + mode + '\' is invalid');
  118643. }
  118644. if (editor.initialized) {
  118645. switchToMode(editor, activeMode, availableModes, mode);
  118646. } else {
  118647. editor.on('init', function () {
  118648. return switchToMode(editor, activeMode, availableModes, mode);
  118649. });
  118650. }
  118651. };
  118652. var registerMode = function (availableModes, mode, api) {
  118653. var _a;
  118654. if (contains$3(defaultModes, mode)) {
  118655. throw new Error('Cannot override default mode ' + mode);
  118656. }
  118657. return __assign(__assign({}, availableModes), (_a = {}, _a[mode] = __assign(__assign({}, api), {
  118658. deactivate: function () {
  118659. try {
  118660. api.deactivate();
  118661. } catch (e) {
  118662. console.error('problem while deactivating editor mode ' + mode + ':', e);
  118663. }
  118664. }
  118665. }), _a));
  118666. };
  118667. var create$4 = function (editor) {
  118668. var activeMode = Cell('design');
  118669. var availableModes = Cell({
  118670. design: {
  118671. activate: noop,
  118672. deactivate: noop,
  118673. editorReadOnly: false
  118674. },
  118675. readonly: {
  118676. activate: noop,
  118677. deactivate: noop,
  118678. editorReadOnly: true
  118679. }
  118680. });
  118681. registerReadOnlyContentFilters(editor);
  118682. registerReadOnlySelectionBlockers(editor);
  118683. return {
  118684. isReadOnly: function () {
  118685. return isReadOnly(editor);
  118686. },
  118687. set: function (mode) {
  118688. return setMode(editor, availableModes.get(), activeMode, mode);
  118689. },
  118690. get: function () {
  118691. return activeMode.get();
  118692. },
  118693. register: function (mode, api) {
  118694. availableModes.set(registerMode(availableModes.get(), mode, api));
  118695. }
  118696. };
  118697. };
  118698. var each$3 = Tools.each, explode$1 = Tools.explode;
  118699. var keyCodeLookup = {
  118700. f1: 112,
  118701. f2: 113,
  118702. f3: 114,
  118703. f4: 115,
  118704. f5: 116,
  118705. f6: 117,
  118706. f7: 118,
  118707. f8: 119,
  118708. f9: 120,
  118709. f10: 121,
  118710. f11: 122,
  118711. f12: 123
  118712. };
  118713. var modifierNames = Tools.makeMap('alt,ctrl,shift,meta,access');
  118714. var parseShortcut = function (pattern) {
  118715. var key;
  118716. var shortcut = {};
  118717. each$3(explode$1(pattern.toLowerCase(), '+'), function (value) {
  118718. if (value in modifierNames) {
  118719. shortcut[value] = true;
  118720. } else {
  118721. if (/^[0-9]{2,}$/.test(value)) {
  118722. shortcut.keyCode = parseInt(value, 10);
  118723. } else {
  118724. shortcut.charCode = value.charCodeAt(0);
  118725. shortcut.keyCode = keyCodeLookup[value] || value.toUpperCase().charCodeAt(0);
  118726. }
  118727. }
  118728. });
  118729. var id = [shortcut.keyCode];
  118730. for (key in modifierNames) {
  118731. if (shortcut[key]) {
  118732. id.push(key);
  118733. } else {
  118734. shortcut[key] = false;
  118735. }
  118736. }
  118737. shortcut.id = id.join(',');
  118738. if (shortcut.access) {
  118739. shortcut.alt = true;
  118740. if (Env.mac) {
  118741. shortcut.ctrl = true;
  118742. } else {
  118743. shortcut.shift = true;
  118744. }
  118745. }
  118746. if (shortcut.meta) {
  118747. if (Env.mac) {
  118748. shortcut.meta = true;
  118749. } else {
  118750. shortcut.ctrl = true;
  118751. shortcut.meta = false;
  118752. }
  118753. }
  118754. return shortcut;
  118755. };
  118756. var Shortcuts = function () {
  118757. function Shortcuts(editor) {
  118758. this.shortcuts = {};
  118759. this.pendingPatterns = [];
  118760. this.editor = editor;
  118761. var self = this;
  118762. editor.on('keyup keypress keydown', function (e) {
  118763. if ((self.hasModifier(e) || self.isFunctionKey(e)) && !e.isDefaultPrevented()) {
  118764. each$3(self.shortcuts, function (shortcut) {
  118765. if (self.matchShortcut(e, shortcut)) {
  118766. self.pendingPatterns = shortcut.subpatterns.slice(0);
  118767. if (e.type === 'keydown') {
  118768. self.executeShortcutAction(shortcut);
  118769. }
  118770. return true;
  118771. }
  118772. });
  118773. if (self.matchShortcut(e, self.pendingPatterns[0])) {
  118774. if (self.pendingPatterns.length === 1) {
  118775. if (e.type === 'keydown') {
  118776. self.executeShortcutAction(self.pendingPatterns[0]);
  118777. }
  118778. }
  118779. self.pendingPatterns.shift();
  118780. }
  118781. }
  118782. });
  118783. }
  118784. Shortcuts.prototype.add = function (pattern, desc, cmdFunc, scope) {
  118785. var self = this;
  118786. var func = self.normalizeCommandFunc(cmdFunc);
  118787. each$3(explode$1(Tools.trim(pattern)), function (pattern) {
  118788. var shortcut = self.createShortcut(pattern, desc, func, scope);
  118789. self.shortcuts[shortcut.id] = shortcut;
  118790. });
  118791. return true;
  118792. };
  118793. Shortcuts.prototype.remove = function (pattern) {
  118794. var shortcut = this.createShortcut(pattern);
  118795. if (this.shortcuts[shortcut.id]) {
  118796. delete this.shortcuts[shortcut.id];
  118797. return true;
  118798. }
  118799. return false;
  118800. };
  118801. Shortcuts.prototype.normalizeCommandFunc = function (cmdFunc) {
  118802. var self = this;
  118803. var cmd = cmdFunc;
  118804. if (typeof cmd === 'string') {
  118805. return function () {
  118806. self.editor.execCommand(cmd, false, null);
  118807. };
  118808. } else if (Tools.isArray(cmd)) {
  118809. return function () {
  118810. self.editor.execCommand(cmd[0], cmd[1], cmd[2]);
  118811. };
  118812. } else {
  118813. return cmd;
  118814. }
  118815. };
  118816. Shortcuts.prototype.createShortcut = function (pattern, desc, cmdFunc, scope) {
  118817. var shortcuts = Tools.map(explode$1(pattern, '>'), parseShortcut);
  118818. shortcuts[shortcuts.length - 1] = Tools.extend(shortcuts[shortcuts.length - 1], {
  118819. func: cmdFunc,
  118820. scope: scope || this.editor
  118821. });
  118822. return Tools.extend(shortcuts[0], {
  118823. desc: this.editor.translate(desc),
  118824. subpatterns: shortcuts.slice(1)
  118825. });
  118826. };
  118827. Shortcuts.prototype.hasModifier = function (e) {
  118828. return e.altKey || e.ctrlKey || e.metaKey;
  118829. };
  118830. Shortcuts.prototype.isFunctionKey = function (e) {
  118831. return e.type === 'keydown' && e.keyCode >= 112 && e.keyCode <= 123;
  118832. };
  118833. Shortcuts.prototype.matchShortcut = function (e, shortcut) {
  118834. if (!shortcut) {
  118835. return false;
  118836. }
  118837. if (shortcut.ctrl !== e.ctrlKey || shortcut.meta !== e.metaKey) {
  118838. return false;
  118839. }
  118840. if (shortcut.alt !== e.altKey || shortcut.shift !== e.shiftKey) {
  118841. return false;
  118842. }
  118843. if (e.keyCode === shortcut.keyCode || e.charCode && e.charCode === shortcut.charCode) {
  118844. e.preventDefault();
  118845. return true;
  118846. }
  118847. return false;
  118848. };
  118849. Shortcuts.prototype.executeShortcutAction = function (shortcut) {
  118850. return shortcut.func ? shortcut.func.call(shortcut.scope) : null;
  118851. };
  118852. return Shortcuts;
  118853. }();
  118854. var create$3 = function () {
  118855. var buttons = {};
  118856. var menuItems = {};
  118857. var popups = {};
  118858. var icons = {};
  118859. var contextMenus = {};
  118860. var contextToolbars = {};
  118861. var sidebars = {};
  118862. var add = function (collection, type) {
  118863. return function (name, spec) {
  118864. return collection[name.toLowerCase()] = __assign(__assign({}, spec), { type: type });
  118865. };
  118866. };
  118867. var addIcon = function (name, svgData) {
  118868. return icons[name.toLowerCase()] = svgData;
  118869. };
  118870. return {
  118871. addButton: add(buttons, 'button'),
  118872. addGroupToolbarButton: add(buttons, 'grouptoolbarbutton'),
  118873. addToggleButton: add(buttons, 'togglebutton'),
  118874. addMenuButton: add(buttons, 'menubutton'),
  118875. addSplitButton: add(buttons, 'splitbutton'),
  118876. addMenuItem: add(menuItems, 'menuitem'),
  118877. addNestedMenuItem: add(menuItems, 'nestedmenuitem'),
  118878. addToggleMenuItem: add(menuItems, 'togglemenuitem'),
  118879. addAutocompleter: add(popups, 'autocompleter'),
  118880. addContextMenu: add(contextMenus, 'contextmenu'),
  118881. addContextToolbar: add(contextToolbars, 'contexttoolbar'),
  118882. addContextForm: add(contextToolbars, 'contextform'),
  118883. addSidebar: add(sidebars, 'sidebar'),
  118884. addIcon: addIcon,
  118885. getAll: function () {
  118886. return {
  118887. buttons: buttons,
  118888. menuItems: menuItems,
  118889. icons: icons,
  118890. popups: popups,
  118891. contextMenus: contextMenus,
  118892. contextToolbars: contextToolbars,
  118893. sidebars: sidebars
  118894. };
  118895. }
  118896. };
  118897. };
  118898. var registry = function () {
  118899. var bridge = create$3();
  118900. return {
  118901. addAutocompleter: bridge.addAutocompleter,
  118902. addButton: bridge.addButton,
  118903. addContextForm: bridge.addContextForm,
  118904. addContextMenu: bridge.addContextMenu,
  118905. addContextToolbar: bridge.addContextToolbar,
  118906. addIcon: bridge.addIcon,
  118907. addMenuButton: bridge.addMenuButton,
  118908. addMenuItem: bridge.addMenuItem,
  118909. addNestedMenuItem: bridge.addNestedMenuItem,
  118910. addSidebar: bridge.addSidebar,
  118911. addSplitButton: bridge.addSplitButton,
  118912. addToggleButton: bridge.addToggleButton,
  118913. addGroupToolbarButton: bridge.addGroupToolbarButton,
  118914. addToggleMenuItem: bridge.addToggleMenuItem,
  118915. getAll: bridge.getAll
  118916. };
  118917. };
  118918. var DOM$1 = DOMUtils.DOM;
  118919. var extend$3 = Tools.extend, each$2 = Tools.each;
  118920. var resolve = Tools.resolve;
  118921. var ie = Env.ie;
  118922. var Editor = function () {
  118923. function Editor(id, settings, editorManager) {
  118924. var _this = this;
  118925. this.plugins = {};
  118926. this.contentCSS = [];
  118927. this.contentStyles = [];
  118928. this.loadedCSS = {};
  118929. this.isNotDirty = false;
  118930. this.editorManager = editorManager;
  118931. this.documentBaseUrl = editorManager.documentBaseURL;
  118932. extend$3(this, EditorObservable);
  118933. this.settings = getEditorSettings(this, id, this.documentBaseUrl, editorManager.defaultSettings, settings);
  118934. if (this.settings.suffix) {
  118935. editorManager.suffix = this.settings.suffix;
  118936. }
  118937. this.suffix = editorManager.suffix;
  118938. if (this.settings.base_url) {
  118939. editorManager._setBaseUrl(this.settings.base_url);
  118940. }
  118941. this.baseUri = editorManager.baseURI;
  118942. if (this.settings.referrer_policy) {
  118943. ScriptLoader.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy);
  118944. DOMUtils.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy);
  118945. }
  118946. AddOnManager.languageLoad = this.settings.language_load;
  118947. AddOnManager.baseURL = editorManager.baseURL;
  118948. this.id = id;
  118949. this.setDirty(false);
  118950. this.documentBaseURI = new URI(this.settings.document_base_url, { base_uri: this.baseUri });
  118951. this.baseURI = this.baseUri;
  118952. this.inline = !!this.settings.inline;
  118953. this.shortcuts = new Shortcuts(this);
  118954. this.editorCommands = new EditorCommands(this);
  118955. if (this.settings.cache_suffix) {
  118956. Env.cacheSuffix = this.settings.cache_suffix.replace(/^[\?\&]+/, '');
  118957. }
  118958. this.ui = {
  118959. registry: registry(),
  118960. styleSheetLoader: undefined,
  118961. show: noop,
  118962. hide: noop,
  118963. enable: noop,
  118964. disable: noop,
  118965. isDisabled: never
  118966. };
  118967. var self = this;
  118968. var modeInstance = create$4(self);
  118969. this.mode = modeInstance;
  118970. this.setMode = modeInstance.set;
  118971. editorManager.fire('SetupEditor', { editor: this });
  118972. this.execCallback('setup', this);
  118973. this.$ = DomQuery.overrideDefaults(function () {
  118974. return {
  118975. context: _this.inline ? _this.getBody() : _this.getDoc(),
  118976. element: _this.getBody()
  118977. };
  118978. });
  118979. }
  118980. Editor.prototype.render = function () {
  118981. render(this);
  118982. };
  118983. Editor.prototype.focus = function (skipFocus) {
  118984. this.execCommand('mceFocus', false, skipFocus);
  118985. };
  118986. Editor.prototype.hasFocus = function () {
  118987. return hasFocus(this);
  118988. };
  118989. Editor.prototype.execCallback = function (name) {
  118990. var x = [];
  118991. for (var _i = 1; _i < arguments.length; _i++) {
  118992. x[_i - 1] = arguments[_i];
  118993. }
  118994. var self = this;
  118995. var callback = self.settings[name], scope;
  118996. if (!callback) {
  118997. return;
  118998. }
  118999. if (self.callbackLookup && (scope = self.callbackLookup[name])) {
  119000. callback = scope.func;
  119001. scope = scope.scope;
  119002. }
  119003. if (typeof callback === 'string') {
  119004. scope = callback.replace(/\.\w+$/, '');
  119005. scope = scope ? resolve(scope) : 0;
  119006. callback = resolve(callback);
  119007. self.callbackLookup = self.callbackLookup || {};
  119008. self.callbackLookup[name] = {
  119009. func: callback,
  119010. scope: scope
  119011. };
  119012. }
  119013. return callback.apply(scope || self, x);
  119014. };
  119015. Editor.prototype.translate = function (text) {
  119016. return I18n.translate(text);
  119017. };
  119018. Editor.prototype.getParam = function (name, defaultVal, type) {
  119019. return getParam(this, name, defaultVal, type);
  119020. };
  119021. Editor.prototype.hasPlugin = function (name, loaded) {
  119022. var hasPlugin = contains$3(getPlugins(this).split(/[ ,]/), name);
  119023. if (hasPlugin) {
  119024. return loaded ? PluginManager.get(name) !== undefined : true;
  119025. } else {
  119026. return false;
  119027. }
  119028. };
  119029. Editor.prototype.nodeChanged = function (args) {
  119030. this._nodeChangeDispatcher.nodeChanged(args);
  119031. };
  119032. Editor.prototype.addCommand = function (name, callback, scope) {
  119033. this.editorCommands.addCommand(name, callback, scope);
  119034. };
  119035. Editor.prototype.addQueryStateHandler = function (name, callback, scope) {
  119036. this.editorCommands.addQueryStateHandler(name, callback, scope);
  119037. };
  119038. Editor.prototype.addQueryValueHandler = function (name, callback, scope) {
  119039. this.editorCommands.addQueryValueHandler(name, callback, scope);
  119040. };
  119041. Editor.prototype.addShortcut = function (pattern, desc, cmdFunc, scope) {
  119042. this.shortcuts.add(pattern, desc, cmdFunc, scope);
  119043. };
  119044. Editor.prototype.execCommand = function (cmd, ui, value, args) {
  119045. return this.editorCommands.execCommand(cmd, ui, value, args);
  119046. };
  119047. Editor.prototype.queryCommandState = function (cmd) {
  119048. return this.editorCommands.queryCommandState(cmd);
  119049. };
  119050. Editor.prototype.queryCommandValue = function (cmd) {
  119051. return this.editorCommands.queryCommandValue(cmd);
  119052. };
  119053. Editor.prototype.queryCommandSupported = function (cmd) {
  119054. return this.editorCommands.queryCommandSupported(cmd);
  119055. };
  119056. Editor.prototype.show = function () {
  119057. var self = this;
  119058. if (self.hidden) {
  119059. self.hidden = false;
  119060. if (self.inline) {
  119061. self.getBody().contentEditable = 'true';
  119062. } else {
  119063. DOM$1.show(self.getContainer());
  119064. DOM$1.hide(self.id);
  119065. }
  119066. self.load();
  119067. self.fire('show');
  119068. }
  119069. };
  119070. Editor.prototype.hide = function () {
  119071. var self = this, doc = self.getDoc();
  119072. if (!self.hidden) {
  119073. if (ie && doc && !self.inline) {
  119074. doc.execCommand('SelectAll');
  119075. }
  119076. self.save();
  119077. if (self.inline) {
  119078. self.getBody().contentEditable = 'false';
  119079. if (self === self.editorManager.focusedEditor) {
  119080. self.editorManager.focusedEditor = null;
  119081. }
  119082. } else {
  119083. DOM$1.hide(self.getContainer());
  119084. DOM$1.setStyle(self.id, 'display', self.orgDisplay);
  119085. }
  119086. self.hidden = true;
  119087. self.fire('hide');
  119088. }
  119089. };
  119090. Editor.prototype.isHidden = function () {
  119091. return !!this.hidden;
  119092. };
  119093. Editor.prototype.setProgressState = function (state, time) {
  119094. this.fire('ProgressState', {
  119095. state: state,
  119096. time: time
  119097. });
  119098. };
  119099. Editor.prototype.load = function (args) {
  119100. var self = this;
  119101. var elm = self.getElement(), html;
  119102. if (self.removed) {
  119103. return '';
  119104. }
  119105. if (elm) {
  119106. args = args || {};
  119107. args.load = true;
  119108. var value = isTextareaOrInput(elm) ? elm.value : elm.innerHTML;
  119109. html = self.setContent(value, args);
  119110. args.element = elm;
  119111. if (!args.no_events) {
  119112. self.fire('LoadContent', args);
  119113. }
  119114. args.element = elm = null;
  119115. return html;
  119116. }
  119117. };
  119118. Editor.prototype.save = function (args) {
  119119. var self = this;
  119120. var elm = self.getElement(), html, form;
  119121. if (!elm || !self.initialized || self.removed) {
  119122. return;
  119123. }
  119124. args = args || {};
  119125. args.save = true;
  119126. args.element = elm;
  119127. html = args.content = self.getContent(args);
  119128. if (!args.no_events) {
  119129. self.fire('SaveContent', args);
  119130. }
  119131. if (args.format === 'raw') {
  119132. self.fire('RawSaveContent', args);
  119133. }
  119134. html = args.content;
  119135. if (!isTextareaOrInput(elm)) {
  119136. if (args.is_removing || !self.inline) {
  119137. elm.innerHTML = html;
  119138. }
  119139. if (form = DOM$1.getParent(self.id, 'form')) {
  119140. each$2(form.elements, function (elm) {
  119141. if (elm.name === self.id) {
  119142. elm.value = html;
  119143. return false;
  119144. }
  119145. });
  119146. }
  119147. } else {
  119148. elm.value = html;
  119149. }
  119150. args.element = elm = null;
  119151. if (args.set_dirty !== false) {
  119152. self.setDirty(false);
  119153. }
  119154. return html;
  119155. };
  119156. Editor.prototype.setContent = function (content, args) {
  119157. return setContent(this, content, args);
  119158. };
  119159. Editor.prototype.getContent = function (args) {
  119160. return getContent(this, args);
  119161. };
  119162. Editor.prototype.insertContent = function (content, args) {
  119163. if (args) {
  119164. content = extend$3({ content: content }, args);
  119165. }
  119166. this.execCommand('mceInsertContent', false, content);
  119167. };
  119168. Editor.prototype.resetContent = function (initialContent) {
  119169. if (initialContent === undefined) {
  119170. setContent(this, this.startContent, { format: 'raw' });
  119171. } else {
  119172. setContent(this, initialContent);
  119173. }
  119174. this.undoManager.reset();
  119175. this.setDirty(false);
  119176. this.nodeChanged();
  119177. };
  119178. Editor.prototype.isDirty = function () {
  119179. return !this.isNotDirty;
  119180. };
  119181. Editor.prototype.setDirty = function (state) {
  119182. var oldState = !this.isNotDirty;
  119183. this.isNotDirty = !state;
  119184. if (state && state !== oldState) {
  119185. this.fire('dirty');
  119186. }
  119187. };
  119188. Editor.prototype.getContainer = function () {
  119189. var self = this;
  119190. if (!self.container) {
  119191. self.container = DOM$1.get(self.editorContainer || self.id + '_parent');
  119192. }
  119193. return self.container;
  119194. };
  119195. Editor.prototype.getContentAreaContainer = function () {
  119196. return this.contentAreaContainer;
  119197. };
  119198. Editor.prototype.getElement = function () {
  119199. if (!this.targetElm) {
  119200. this.targetElm = DOM$1.get(this.id);
  119201. }
  119202. return this.targetElm;
  119203. };
  119204. Editor.prototype.getWin = function () {
  119205. var self = this;
  119206. var elm;
  119207. if (!self.contentWindow) {
  119208. elm = self.iframeElement;
  119209. if (elm) {
  119210. self.contentWindow = elm.contentWindow;
  119211. }
  119212. }
  119213. return self.contentWindow;
  119214. };
  119215. Editor.prototype.getDoc = function () {
  119216. var self = this;
  119217. var win;
  119218. if (!self.contentDocument) {
  119219. win = self.getWin();
  119220. if (win) {
  119221. self.contentDocument = win.document;
  119222. }
  119223. }
  119224. return self.contentDocument;
  119225. };
  119226. Editor.prototype.getBody = function () {
  119227. var doc = this.getDoc();
  119228. return this.bodyElement || (doc ? doc.body : null);
  119229. };
  119230. Editor.prototype.convertURL = function (url, name, elm) {
  119231. var self = this, settings = self.settings;
  119232. if (settings.urlconverter_callback) {
  119233. return self.execCallback('urlconverter_callback', url, elm, true, name);
  119234. }
  119235. if (!settings.convert_urls || elm && elm.nodeName === 'LINK' || url.indexOf('file:') === 0 || url.length === 0) {
  119236. return url;
  119237. }
  119238. if (settings.relative_urls) {
  119239. return self.documentBaseURI.toRelative(url);
  119240. }
  119241. url = self.documentBaseURI.toAbsolute(url, settings.remove_script_host);
  119242. return url;
  119243. };
  119244. Editor.prototype.addVisual = function (elm) {
  119245. addVisual(this, elm);
  119246. };
  119247. Editor.prototype.remove = function () {
  119248. remove(this);
  119249. };
  119250. Editor.prototype.destroy = function (automatic) {
  119251. destroy(this, automatic);
  119252. };
  119253. Editor.prototype.uploadImages = function (callback) {
  119254. return this.editorUpload.uploadImages(callback);
  119255. };
  119256. Editor.prototype._scanForImages = function () {
  119257. return this.editorUpload.scanForImages();
  119258. };
  119259. Editor.prototype.addButton = function () {
  119260. throw new Error('editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead');
  119261. };
  119262. Editor.prototype.addSidebar = function () {
  119263. throw new Error('editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead');
  119264. };
  119265. Editor.prototype.addMenuItem = function () {
  119266. throw new Error('editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead');
  119267. };
  119268. Editor.prototype.addContextToolbar = function () {
  119269. throw new Error('editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead');
  119270. };
  119271. return Editor;
  119272. }();
  119273. var DOM = DOMUtils.DOM;
  119274. var explode = Tools.explode, each$1 = Tools.each, extend$2 = Tools.extend;
  119275. var instanceCounter = 0, boundGlobalEvents = false;
  119276. var beforeUnloadDelegate;
  119277. var legacyEditors = [];
  119278. var editors = [];
  119279. var isValidLegacyKey = function (id) {
  119280. return id !== 'length';
  119281. };
  119282. var globalEventDelegate = function (e) {
  119283. var type = e.type;
  119284. each$1(EditorManager.get(), function (editor) {
  119285. switch (type) {
  119286. case 'scroll':
  119287. editor.fire('ScrollWindow', e);
  119288. break;
  119289. case 'resize':
  119290. editor.fire('ResizeWindow', e);
  119291. break;
  119292. }
  119293. });
  119294. };
  119295. var toggleGlobalEvents = function (state) {
  119296. if (state !== boundGlobalEvents) {
  119297. if (state) {
  119298. DomQuery(window).on('resize scroll', globalEventDelegate);
  119299. } else {
  119300. DomQuery(window).off('resize scroll', globalEventDelegate);
  119301. }
  119302. boundGlobalEvents = state;
  119303. }
  119304. };
  119305. var removeEditorFromList = function (targetEditor) {
  119306. var oldEditors = editors;
  119307. delete legacyEditors[targetEditor.id];
  119308. for (var i = 0; i < legacyEditors.length; i++) {
  119309. if (legacyEditors[i] === targetEditor) {
  119310. legacyEditors.splice(i, 1);
  119311. break;
  119312. }
  119313. }
  119314. editors = filter$4(editors, function (editor) {
  119315. return targetEditor !== editor;
  119316. });
  119317. if (EditorManager.activeEditor === targetEditor) {
  119318. EditorManager.activeEditor = editors.length > 0 ? editors[0] : null;
  119319. }
  119320. if (EditorManager.focusedEditor === targetEditor) {
  119321. EditorManager.focusedEditor = null;
  119322. }
  119323. return oldEditors.length !== editors.length;
  119324. };
  119325. var purgeDestroyedEditor = function (editor) {
  119326. if (editor && editor.initialized && !(editor.getContainer() || editor.getBody()).parentNode) {
  119327. removeEditorFromList(editor);
  119328. editor.unbindAllNativeEvents();
  119329. editor.destroy(true);
  119330. editor.removed = true;
  119331. editor = null;
  119332. }
  119333. return editor;
  119334. };
  119335. var isQuirksMode = document.compatMode !== 'CSS1Compat';
  119336. var EditorManager = __assign(__assign({}, Observable), {
  119337. baseURI: null,
  119338. baseURL: null,
  119339. defaultSettings: {},
  119340. documentBaseURL: null,
  119341. suffix: null,
  119342. $: DomQuery,
  119343. majorVersion: '5',
  119344. minorVersion: '10.5',
  119345. releaseDate: '2022-05-25',
  119346. editors: legacyEditors,
  119347. i18n: I18n,
  119348. activeEditor: null,
  119349. focusedEditor: null,
  119350. settings: {},
  119351. setup: function () {
  119352. var self = this;
  119353. var baseURL, documentBaseURL, suffix = '';
  119354. documentBaseURL = URI.getDocumentBaseUrl(document.location);
  119355. if (/^[^:]+:\/\/\/?[^\/]+\//.test(documentBaseURL)) {
  119356. documentBaseURL = documentBaseURL.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
  119357. if (!/[\/\\]$/.test(documentBaseURL)) {
  119358. documentBaseURL += '/';
  119359. }
  119360. }
  119361. var preInit = window.tinymce || window.tinyMCEPreInit;
  119362. if (preInit) {
  119363. baseURL = preInit.base || preInit.baseURL;
  119364. suffix = preInit.suffix;
  119365. } else {
  119366. var scripts = document.getElementsByTagName('script');
  119367. for (var i = 0; i < scripts.length; i++) {
  119368. var src = scripts[i].src || '';
  119369. if (src === '') {
  119370. continue;
  119371. }
  119372. var srcScript = src.substring(src.lastIndexOf('/'));
  119373. if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(src)) {
  119374. if (srcScript.indexOf('.min') !== -1) {
  119375. suffix = '.min';
  119376. }
  119377. baseURL = src.substring(0, src.lastIndexOf('/'));
  119378. break;
  119379. }
  119380. }
  119381. if (!baseURL && document.currentScript) {
  119382. var src = document.currentScript.src;
  119383. if (src.indexOf('.min') !== -1) {
  119384. suffix = '.min';
  119385. }
  119386. baseURL = src.substring(0, src.lastIndexOf('/'));
  119387. }
  119388. }
  119389. self.baseURL = new URI(documentBaseURL).toAbsolute(baseURL);
  119390. self.documentBaseURL = documentBaseURL;
  119391. self.baseURI = new URI(self.baseURL);
  119392. self.suffix = suffix;
  119393. setup$l(self);
  119394. },
  119395. overrideDefaults: function (defaultSettings) {
  119396. var baseUrl = defaultSettings.base_url;
  119397. if (baseUrl) {
  119398. this._setBaseUrl(baseUrl);
  119399. }
  119400. var suffix = defaultSettings.suffix;
  119401. if (defaultSettings.suffix) {
  119402. this.suffix = suffix;
  119403. }
  119404. this.defaultSettings = defaultSettings;
  119405. var pluginBaseUrls = defaultSettings.plugin_base_urls;
  119406. if (pluginBaseUrls !== undefined) {
  119407. each$j(pluginBaseUrls, function (pluginBaseUrl, pluginName) {
  119408. AddOnManager.PluginManager.urls[pluginName] = pluginBaseUrl;
  119409. });
  119410. }
  119411. },
  119412. init: function (settings) {
  119413. var self = this;
  119414. var result;
  119415. var invalidInlineTargets = Tools.makeMap('area base basefont br col frame hr img input isindex link meta param embed source wbr track ' + 'colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu', ' ');
  119416. var isInvalidInlineTarget = function (settings, elm) {
  119417. return settings.inline && elm.tagName.toLowerCase() in invalidInlineTargets;
  119418. };
  119419. var createId = function (elm) {
  119420. var id = elm.id;
  119421. if (!id) {
  119422. id = get$9(elm, 'name').filter(function (name) {
  119423. return !DOM.get(name);
  119424. }).getOrThunk(DOM.uniqueId);
  119425. elm.setAttribute('id', id);
  119426. }
  119427. return id;
  119428. };
  119429. var execCallback = function (name) {
  119430. var callback = settings[name];
  119431. if (!callback) {
  119432. return;
  119433. }
  119434. return callback.apply(self, []);
  119435. };
  119436. var hasClass = function (elm, className) {
  119437. return className.constructor === RegExp ? className.test(elm.className) : DOM.hasClass(elm, className);
  119438. };
  119439. var findTargets = function (settings) {
  119440. var targets = [];
  119441. if (Env.browser.isIE() && Env.browser.version.major < 11) {
  119442. initError('TinyMCE does not support the browser you are using. For a list of supported' + ' browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/');
  119443. return [];
  119444. } else if (isQuirksMode) {
  119445. initError('Failed to initialize the editor as the document is not in standards mode. ' + 'TinyMCE requires standards mode.');
  119446. return [];
  119447. }
  119448. if (settings.types) {
  119449. each$1(settings.types, function (type) {
  119450. targets = targets.concat(DOM.select(type.selector));
  119451. });
  119452. return targets;
  119453. } else if (settings.selector) {
  119454. return DOM.select(settings.selector);
  119455. } else if (settings.target) {
  119456. return [settings.target];
  119457. }
  119458. switch (settings.mode) {
  119459. case 'exact':
  119460. var l = settings.elements || '';
  119461. if (l.length > 0) {
  119462. each$1(explode(l), function (id) {
  119463. var elm = DOM.get(id);
  119464. if (elm) {
  119465. targets.push(elm);
  119466. } else {
  119467. each$1(document.forms, function (f) {
  119468. each$1(f.elements, function (e) {
  119469. if (e.name === id) {
  119470. id = 'mce_editor_' + instanceCounter++;
  119471. DOM.setAttrib(e, 'id', id);
  119472. targets.push(e);
  119473. }
  119474. });
  119475. });
  119476. }
  119477. });
  119478. }
  119479. break;
  119480. case 'textareas':
  119481. case 'specific_textareas':
  119482. each$1(DOM.select('textarea'), function (elm) {
  119483. if (settings.editor_deselector && hasClass(elm, settings.editor_deselector)) {
  119484. return;
  119485. }
  119486. if (!settings.editor_selector || hasClass(elm, settings.editor_selector)) {
  119487. targets.push(elm);
  119488. }
  119489. });
  119490. break;
  119491. }
  119492. return targets;
  119493. };
  119494. var provideResults = function (editors) {
  119495. result = editors;
  119496. };
  119497. var initEditors = function () {
  119498. var initCount = 0;
  119499. var editors = [];
  119500. var targets;
  119501. var createEditor = function (id, settings, targetElm) {
  119502. var editor = new Editor(id, settings, self);
  119503. editors.push(editor);
  119504. editor.on('init', function () {
  119505. if (++initCount === targets.length) {
  119506. provideResults(editors);
  119507. }
  119508. });
  119509. editor.targetElm = editor.targetElm || targetElm;
  119510. editor.render();
  119511. };
  119512. DOM.unbind(window, 'ready', initEditors);
  119513. execCallback('onpageload');
  119514. targets = DomQuery.unique(findTargets(settings));
  119515. if (settings.types) {
  119516. each$1(settings.types, function (type) {
  119517. Tools.each(targets, function (elm) {
  119518. if (DOM.is(elm, type.selector)) {
  119519. createEditor(createId(elm), extend$2({}, settings, type), elm);
  119520. return false;
  119521. }
  119522. return true;
  119523. });
  119524. });
  119525. return;
  119526. }
  119527. Tools.each(targets, function (elm) {
  119528. purgeDestroyedEditor(self.get(elm.id));
  119529. });
  119530. targets = Tools.grep(targets, function (elm) {
  119531. return !self.get(elm.id);
  119532. });
  119533. if (targets.length === 0) {
  119534. provideResults([]);
  119535. } else {
  119536. each$1(targets, function (elm) {
  119537. if (isInvalidInlineTarget(settings, elm)) {
  119538. initError('Could not initialize inline editor on invalid inline target element', elm);
  119539. } else {
  119540. createEditor(createId(elm), settings, elm);
  119541. }
  119542. });
  119543. }
  119544. };
  119545. self.settings = settings;
  119546. DOM.bind(window, 'ready', initEditors);
  119547. return new promiseObj(function (resolve) {
  119548. if (result) {
  119549. resolve(result);
  119550. } else {
  119551. provideResults = function (editors) {
  119552. resolve(editors);
  119553. };
  119554. }
  119555. });
  119556. },
  119557. get: function (id) {
  119558. if (arguments.length === 0) {
  119559. return editors.slice(0);
  119560. } else if (isString$1(id)) {
  119561. return find$3(editors, function (editor) {
  119562. return editor.id === id;
  119563. }).getOr(null);
  119564. } else if (isNumber(id)) {
  119565. return editors[id] ? editors[id] : null;
  119566. } else {
  119567. return null;
  119568. }
  119569. },
  119570. add: function (editor) {
  119571. var self = this;
  119572. var existingEditor = legacyEditors[editor.id];
  119573. if (existingEditor === editor) {
  119574. return editor;
  119575. }
  119576. if (self.get(editor.id) === null) {
  119577. if (isValidLegacyKey(editor.id)) {
  119578. legacyEditors[editor.id] = editor;
  119579. }
  119580. legacyEditors.push(editor);
  119581. editors.push(editor);
  119582. }
  119583. toggleGlobalEvents(true);
  119584. self.activeEditor = editor;
  119585. self.fire('AddEditor', { editor: editor });
  119586. if (!beforeUnloadDelegate) {
  119587. beforeUnloadDelegate = function (e) {
  119588. var event = self.fire('BeforeUnload');
  119589. if (event.returnValue) {
  119590. e.preventDefault();
  119591. e.returnValue = event.returnValue;
  119592. return event.returnValue;
  119593. }
  119594. };
  119595. window.addEventListener('beforeunload', beforeUnloadDelegate);
  119596. }
  119597. return editor;
  119598. },
  119599. createEditor: function (id, settings) {
  119600. return this.add(new Editor(id, settings, this));
  119601. },
  119602. remove: function (selector) {
  119603. var self = this;
  119604. var i, editor;
  119605. if (!selector) {
  119606. for (i = editors.length - 1; i >= 0; i--) {
  119607. self.remove(editors[i]);
  119608. }
  119609. return;
  119610. }
  119611. if (isString$1(selector)) {
  119612. each$1(DOM.select(selector), function (elm) {
  119613. editor = self.get(elm.id);
  119614. if (editor) {
  119615. self.remove(editor);
  119616. }
  119617. });
  119618. return;
  119619. }
  119620. editor = selector;
  119621. if (isNull(self.get(editor.id))) {
  119622. return null;
  119623. }
  119624. if (removeEditorFromList(editor)) {
  119625. self.fire('RemoveEditor', { editor: editor });
  119626. }
  119627. if (editors.length === 0) {
  119628. window.removeEventListener('beforeunload', beforeUnloadDelegate);
  119629. }
  119630. editor.remove();
  119631. toggleGlobalEvents(editors.length > 0);
  119632. return editor;
  119633. },
  119634. execCommand: function (cmd, ui, value) {
  119635. var self = this, editor = self.get(value);
  119636. switch (cmd) {
  119637. case 'mceAddEditor':
  119638. if (!self.get(value)) {
  119639. new Editor(value, self.settings, self).render();
  119640. }
  119641. return true;
  119642. case 'mceRemoveEditor':
  119643. if (editor) {
  119644. editor.remove();
  119645. }
  119646. return true;
  119647. case 'mceToggleEditor':
  119648. if (!editor) {
  119649. self.execCommand('mceAddEditor', false, value);
  119650. return true;
  119651. }
  119652. if (editor.isHidden()) {
  119653. editor.show();
  119654. } else {
  119655. editor.hide();
  119656. }
  119657. return true;
  119658. }
  119659. if (self.activeEditor) {
  119660. return self.activeEditor.execCommand(cmd, ui, value);
  119661. }
  119662. return false;
  119663. },
  119664. triggerSave: function () {
  119665. each$1(editors, function (editor) {
  119666. editor.save();
  119667. });
  119668. },
  119669. addI18n: function (code, items) {
  119670. I18n.add(code, items);
  119671. },
  119672. translate: function (text) {
  119673. return I18n.translate(text);
  119674. },
  119675. setActive: function (editor) {
  119676. var activeEditor = this.activeEditor;
  119677. if (this.activeEditor !== editor) {
  119678. if (activeEditor) {
  119679. activeEditor.fire('deactivate', { relatedTarget: editor });
  119680. }
  119681. editor.fire('activate', { relatedTarget: activeEditor });
  119682. }
  119683. this.activeEditor = editor;
  119684. },
  119685. _setBaseUrl: function (baseUrl) {
  119686. this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\/+$/, ''));
  119687. this.baseURI = new URI(this.baseURL);
  119688. }
  119689. });
  119690. EditorManager.setup();
  119691. var min$1 = Math.min, max$1 = Math.max, round$1 = Math.round;
  119692. var relativePosition = function (rect, targetRect, rel) {
  119693. var x = targetRect.x;
  119694. var y = targetRect.y;
  119695. var w = rect.w;
  119696. var h = rect.h;
  119697. var targetW = targetRect.w;
  119698. var targetH = targetRect.h;
  119699. var relChars = (rel || '').split('');
  119700. if (relChars[0] === 'b') {
  119701. y += targetH;
  119702. }
  119703. if (relChars[1] === 'r') {
  119704. x += targetW;
  119705. }
  119706. if (relChars[0] === 'c') {
  119707. y += round$1(targetH / 2);
  119708. }
  119709. if (relChars[1] === 'c') {
  119710. x += round$1(targetW / 2);
  119711. }
  119712. if (relChars[3] === 'b') {
  119713. y -= h;
  119714. }
  119715. if (relChars[4] === 'r') {
  119716. x -= w;
  119717. }
  119718. if (relChars[3] === 'c') {
  119719. y -= round$1(h / 2);
  119720. }
  119721. if (relChars[4] === 'c') {
  119722. x -= round$1(w / 2);
  119723. }
  119724. return create$2(x, y, w, h);
  119725. };
  119726. var findBestRelativePosition = function (rect, targetRect, constrainRect, rels) {
  119727. var pos, i;
  119728. for (i = 0; i < rels.length; i++) {
  119729. pos = relativePosition(rect, targetRect, rels[i]);
  119730. if (pos.x >= constrainRect.x && pos.x + pos.w <= constrainRect.w + constrainRect.x && pos.y >= constrainRect.y && pos.y + pos.h <= constrainRect.h + constrainRect.y) {
  119731. return rels[i];
  119732. }
  119733. }
  119734. return null;
  119735. };
  119736. var inflate = function (rect, w, h) {
  119737. return create$2(rect.x - w, rect.y - h, rect.w + w * 2, rect.h + h * 2);
  119738. };
  119739. var intersect = function (rect, cropRect) {
  119740. var x1 = max$1(rect.x, cropRect.x);
  119741. var y1 = max$1(rect.y, cropRect.y);
  119742. var x2 = min$1(rect.x + rect.w, cropRect.x + cropRect.w);
  119743. var y2 = min$1(rect.y + rect.h, cropRect.y + cropRect.h);
  119744. if (x2 - x1 < 0 || y2 - y1 < 0) {
  119745. return null;
  119746. }
  119747. return create$2(x1, y1, x2 - x1, y2 - y1);
  119748. };
  119749. var clamp = function (rect, clampRect, fixedSize) {
  119750. var x1 = rect.x;
  119751. var y1 = rect.y;
  119752. var x2 = rect.x + rect.w;
  119753. var y2 = rect.y + rect.h;
  119754. var cx2 = clampRect.x + clampRect.w;
  119755. var cy2 = clampRect.y + clampRect.h;
  119756. var underflowX1 = max$1(0, clampRect.x - x1);
  119757. var underflowY1 = max$1(0, clampRect.y - y1);
  119758. var overflowX2 = max$1(0, x2 - cx2);
  119759. var overflowY2 = max$1(0, y2 - cy2);
  119760. x1 += underflowX1;
  119761. y1 += underflowY1;
  119762. if (fixedSize) {
  119763. x2 += underflowX1;
  119764. y2 += underflowY1;
  119765. x1 -= overflowX2;
  119766. y1 -= overflowY2;
  119767. }
  119768. x2 -= overflowX2;
  119769. y2 -= overflowY2;
  119770. return create$2(x1, y1, x2 - x1, y2 - y1);
  119771. };
  119772. var create$2 = function (x, y, w, h) {
  119773. return {
  119774. x: x,
  119775. y: y,
  119776. w: w,
  119777. h: h
  119778. };
  119779. };
  119780. var fromClientRect = function (clientRect) {
  119781. return create$2(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
  119782. };
  119783. var Rect = {
  119784. inflate: inflate,
  119785. relativePosition: relativePosition,
  119786. findBestRelativePosition: findBestRelativePosition,
  119787. intersect: intersect,
  119788. clamp: clamp,
  119789. create: create$2,
  119790. fromClientRect: fromClientRect
  119791. };
  119792. var awaiter = function (resolveCb, rejectCb, timeout) {
  119793. if (timeout === void 0) {
  119794. timeout = 1000;
  119795. }
  119796. var done = false;
  119797. var timer = null;
  119798. var complete = function (completer) {
  119799. return function () {
  119800. var args = [];
  119801. for (var _i = 0; _i < arguments.length; _i++) {
  119802. args[_i] = arguments[_i];
  119803. }
  119804. if (!done) {
  119805. done = true;
  119806. if (timer !== null) {
  119807. clearTimeout(timer);
  119808. timer = null;
  119809. }
  119810. completer.apply(null, args);
  119811. }
  119812. };
  119813. };
  119814. var resolve = complete(resolveCb);
  119815. var reject = complete(rejectCb);
  119816. var start = function () {
  119817. var args = [];
  119818. for (var _i = 0; _i < arguments.length; _i++) {
  119819. args[_i] = arguments[_i];
  119820. }
  119821. if (!done && timer === null) {
  119822. timer = setTimeout(function () {
  119823. return reject.apply(null, args);
  119824. }, timeout);
  119825. }
  119826. };
  119827. return {
  119828. start: start,
  119829. resolve: resolve,
  119830. reject: reject
  119831. };
  119832. };
  119833. var create$1 = function () {
  119834. var tasks = {};
  119835. var resultFns = {};
  119836. var load = function (id, url) {
  119837. var loadErrMsg = 'Script at URL "' + url + '" failed to load';
  119838. var runErrMsg = 'Script at URL "' + url + '" did not call `tinymce.Resource.add(\'' + id + '\', data)` within 1 second';
  119839. if (tasks[id] !== undefined) {
  119840. return tasks[id];
  119841. } else {
  119842. var task = new promiseObj(function (resolve, reject) {
  119843. var waiter = awaiter(resolve, reject);
  119844. resultFns[id] = waiter.resolve;
  119845. ScriptLoader.ScriptLoader.loadScript(url, function () {
  119846. return waiter.start(runErrMsg);
  119847. }, function () {
  119848. return waiter.reject(loadErrMsg);
  119849. });
  119850. });
  119851. tasks[id] = task;
  119852. return task;
  119853. }
  119854. };
  119855. var add = function (id, data) {
  119856. if (resultFns[id] !== undefined) {
  119857. resultFns[id](data);
  119858. delete resultFns[id];
  119859. }
  119860. tasks[id] = promiseObj.resolve(data);
  119861. };
  119862. return {
  119863. load: load,
  119864. add: add
  119865. };
  119866. };
  119867. var Resource = create$1();
  119868. var each = Tools.each, extend$1 = Tools.extend;
  119869. var extendClass, initializing;
  119870. var Class = function () {
  119871. };
  119872. Class.extend = extendClass = function (props) {
  119873. var self = this;
  119874. var _super = self.prototype;
  119875. var Class = function () {
  119876. var i, mixins, mixin;
  119877. var self = this;
  119878. if (!initializing) {
  119879. if (self.init) {
  119880. self.init.apply(self, arguments);
  119881. }
  119882. mixins = self.Mixins;
  119883. if (mixins) {
  119884. i = mixins.length;
  119885. while (i--) {
  119886. mixin = mixins[i];
  119887. if (mixin.init) {
  119888. mixin.init.apply(self, arguments);
  119889. }
  119890. }
  119891. }
  119892. }
  119893. };
  119894. var dummy = function () {
  119895. return this;
  119896. };
  119897. var createMethod = function (name, fn) {
  119898. return function () {
  119899. var self = this;
  119900. var tmp = self._super;
  119901. self._super = _super[name];
  119902. var ret = fn.apply(self, arguments);
  119903. self._super = tmp;
  119904. return ret;
  119905. };
  119906. };
  119907. initializing = true;
  119908. var prototype = new self();
  119909. initializing = false;
  119910. if (props.Mixins) {
  119911. each(props.Mixins, function (mixin) {
  119912. for (var name_1 in mixin) {
  119913. if (name_1 !== 'init') {
  119914. props[name_1] = mixin[name_1];
  119915. }
  119916. }
  119917. });
  119918. if (_super.Mixins) {
  119919. props.Mixins = _super.Mixins.concat(props.Mixins);
  119920. }
  119921. }
  119922. if (props.Methods) {
  119923. each(props.Methods.split(','), function (name) {
  119924. props[name] = dummy;
  119925. });
  119926. }
  119927. if (props.Properties) {
  119928. each(props.Properties.split(','), function (name) {
  119929. var fieldName = '_' + name;
  119930. props[name] = function (value) {
  119931. var self = this;
  119932. if (value !== undefined) {
  119933. self[fieldName] = value;
  119934. return self;
  119935. }
  119936. return self[fieldName];
  119937. };
  119938. });
  119939. }
  119940. if (props.Statics) {
  119941. each(props.Statics, function (func, name) {
  119942. Class[name] = func;
  119943. });
  119944. }
  119945. if (props.Defaults && _super.Defaults) {
  119946. props.Defaults = extend$1({}, _super.Defaults, props.Defaults);
  119947. }
  119948. each$j(props, function (member, name) {
  119949. if (typeof member === 'function' && _super[name]) {
  119950. prototype[name] = createMethod(name, member);
  119951. } else {
  119952. prototype[name] = member;
  119953. }
  119954. });
  119955. Class.prototype = prototype;
  119956. Class.constructor = Class;
  119957. Class.extend = extendClass;
  119958. return Class;
  119959. };
  119960. var min = Math.min, max = Math.max, round = Math.round;
  119961. var Color = function (value) {
  119962. var self = {};
  119963. var r = 0, g = 0, b = 0;
  119964. var rgb2hsv = function (r, g, b) {
  119965. var h, s, v;
  119966. h = 0;
  119967. s = 0;
  119968. v = 0;
  119969. r = r / 255;
  119970. g = g / 255;
  119971. b = b / 255;
  119972. var minRGB = min(r, min(g, b));
  119973. var maxRGB = max(r, max(g, b));
  119974. if (minRGB === maxRGB) {
  119975. v = minRGB;
  119976. return {
  119977. h: 0,
  119978. s: 0,
  119979. v: v * 100
  119980. };
  119981. }
  119982. var d = r === minRGB ? g - b : b === minRGB ? r - g : b - r;
  119983. h = r === minRGB ? 3 : b === minRGB ? 1 : 5;
  119984. h = 60 * (h - d / (maxRGB - minRGB));
  119985. s = (maxRGB - minRGB) / maxRGB;
  119986. v = maxRGB;
  119987. return {
  119988. h: round(h),
  119989. s: round(s * 100),
  119990. v: round(v * 100)
  119991. };
  119992. };
  119993. var hsvToRgb = function (hue, saturation, brightness) {
  119994. hue = (parseInt(hue, 10) || 0) % 360;
  119995. saturation = parseInt(saturation, 10) / 100;
  119996. brightness = parseInt(brightness, 10) / 100;
  119997. saturation = max(0, min(saturation, 1));
  119998. brightness = max(0, min(brightness, 1));
  119999. if (saturation === 0) {
  120000. r = g = b = round(255 * brightness);
  120001. return;
  120002. }
  120003. var side = hue / 60;
  120004. var chroma = brightness * saturation;
  120005. var x = chroma * (1 - Math.abs(side % 2 - 1));
  120006. var match = brightness - chroma;
  120007. switch (Math.floor(side)) {
  120008. case 0:
  120009. r = chroma;
  120010. g = x;
  120011. b = 0;
  120012. break;
  120013. case 1:
  120014. r = x;
  120015. g = chroma;
  120016. b = 0;
  120017. break;
  120018. case 2:
  120019. r = 0;
  120020. g = chroma;
  120021. b = x;
  120022. break;
  120023. case 3:
  120024. r = 0;
  120025. g = x;
  120026. b = chroma;
  120027. break;
  120028. case 4:
  120029. r = x;
  120030. g = 0;
  120031. b = chroma;
  120032. break;
  120033. case 5:
  120034. r = chroma;
  120035. g = 0;
  120036. b = x;
  120037. break;
  120038. default:
  120039. r = g = b = 0;
  120040. }
  120041. r = round(255 * (r + match));
  120042. g = round(255 * (g + match));
  120043. b = round(255 * (b + match));
  120044. };
  120045. var toHex = function () {
  120046. var hex = function (val) {
  120047. val = parseInt(val, 10).toString(16);
  120048. return val.length > 1 ? val : '0' + val;
  120049. };
  120050. return '#' + hex(r) + hex(g) + hex(b);
  120051. };
  120052. var toRgb = function () {
  120053. return {
  120054. r: r,
  120055. g: g,
  120056. b: b
  120057. };
  120058. };
  120059. var toHsv = function () {
  120060. return rgb2hsv(r, g, b);
  120061. };
  120062. var parse = function (value) {
  120063. var matches;
  120064. if (typeof value === 'object') {
  120065. if ('r' in value) {
  120066. r = value.r;
  120067. g = value.g;
  120068. b = value.b;
  120069. } else if ('v' in value) {
  120070. hsvToRgb(value.h, value.s, value.v);
  120071. }
  120072. } else {
  120073. if (matches = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(value)) {
  120074. r = parseInt(matches[1], 10);
  120075. g = parseInt(matches[2], 10);
  120076. b = parseInt(matches[3], 10);
  120077. } else if (matches = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(value)) {
  120078. r = parseInt(matches[1], 16);
  120079. g = parseInt(matches[2], 16);
  120080. b = parseInt(matches[3], 16);
  120081. } else if (matches = /#([0-F])([0-F])([0-F])/gi.exec(value)) {
  120082. r = parseInt(matches[1] + matches[1], 16);
  120083. g = parseInt(matches[2] + matches[2], 16);
  120084. b = parseInt(matches[3] + matches[3], 16);
  120085. }
  120086. }
  120087. r = r < 0 ? 0 : r > 255 ? 255 : r;
  120088. g = g < 0 ? 0 : g > 255 ? 255 : g;
  120089. b = b < 0 ? 0 : b > 255 ? 255 : b;
  120090. return self;
  120091. };
  120092. if (value) {
  120093. parse(value);
  120094. }
  120095. self.toRgb = toRgb;
  120096. self.toHsv = toHsv;
  120097. self.toHex = toHex;
  120098. self.parse = parse;
  120099. return self;
  120100. };
  120101. var serialize = function (obj) {
  120102. var data = JSON.stringify(obj);
  120103. if (!isString$1(data)) {
  120104. return data;
  120105. }
  120106. return data.replace(/[\u0080-\uFFFF]/g, function (match) {
  120107. var hexCode = match.charCodeAt(0).toString(16);
  120108. return '\\u' + '0000'.substring(hexCode.length) + hexCode;
  120109. });
  120110. };
  120111. var JSONUtils = {
  120112. serialize: serialize,
  120113. parse: function (text) {
  120114. try {
  120115. return JSON.parse(text);
  120116. } catch (ex) {
  120117. }
  120118. }
  120119. };
  120120. var JSONP = {
  120121. callbacks: {},
  120122. count: 0,
  120123. send: function (settings) {
  120124. var self = this, dom = DOMUtils.DOM, count = settings.count !== undefined ? settings.count : self.count;
  120125. var id = 'tinymce_jsonp_' + count;
  120126. self.callbacks[count] = function (json) {
  120127. dom.remove(id);
  120128. delete self.callbacks[count];
  120129. settings.callback(json);
  120130. };
  120131. dom.add(dom.doc.body, 'script', {
  120132. id: id,
  120133. src: settings.url,
  120134. type: 'text/javascript'
  120135. });
  120136. self.count++;
  120137. }
  120138. };
  120139. var XHR = __assign(__assign({}, Observable), {
  120140. send: function (settings) {
  120141. var xhr, count = 0;
  120142. var ready = function () {
  120143. if (!settings.async || xhr.readyState === 4 || count++ > 10000) {
  120144. if (settings.success && count < 10000 && xhr.status === 200) {
  120145. settings.success.call(settings.success_scope, '' + xhr.responseText, xhr, settings);
  120146. } else if (settings.error) {
  120147. settings.error.call(settings.error_scope, count > 10000 ? 'TIMED_OUT' : 'GENERAL', xhr, settings);
  120148. }
  120149. xhr = null;
  120150. } else {
  120151. Delay.setTimeout(ready, 10);
  120152. }
  120153. };
  120154. settings.scope = settings.scope || this;
  120155. settings.success_scope = settings.success_scope || settings.scope;
  120156. settings.error_scope = settings.error_scope || settings.scope;
  120157. settings.async = settings.async !== false;
  120158. settings.data = settings.data || '';
  120159. XHR.fire('beforeInitialize', { settings: settings });
  120160. xhr = new XMLHttpRequest();
  120161. if (xhr.overrideMimeType) {
  120162. xhr.overrideMimeType(settings.content_type);
  120163. }
  120164. xhr.open(settings.type || (settings.data ? 'POST' : 'GET'), settings.url, settings.async);
  120165. if (settings.crossDomain) {
  120166. xhr.withCredentials = true;
  120167. }
  120168. if (settings.content_type) {
  120169. xhr.setRequestHeader('Content-Type', settings.content_type);
  120170. }
  120171. if (settings.requestheaders) {
  120172. Tools.each(settings.requestheaders, function (header) {
  120173. xhr.setRequestHeader(header.key, header.value);
  120174. });
  120175. }
  120176. xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
  120177. xhr = XHR.fire('beforeSend', {
  120178. xhr: xhr,
  120179. settings: settings
  120180. }).xhr;
  120181. xhr.send(settings.data);
  120182. if (!settings.async) {
  120183. return ready();
  120184. }
  120185. Delay.setTimeout(ready, 10);
  120186. }
  120187. });
  120188. var extend = Tools.extend;
  120189. var JSONRequest = function () {
  120190. function JSONRequest(settings) {
  120191. this.settings = extend({}, settings);
  120192. this.count = 0;
  120193. }
  120194. JSONRequest.sendRPC = function (o) {
  120195. return new JSONRequest().send(o);
  120196. };
  120197. JSONRequest.prototype.send = function (args) {
  120198. var ecb = args.error, scb = args.success;
  120199. var xhrArgs = extend(this.settings, args);
  120200. xhrArgs.success = function (c, x) {
  120201. c = JSONUtils.parse(c);
  120202. if (typeof c === 'undefined') {
  120203. c = { error: 'JSON Parse error.' };
  120204. }
  120205. if (c.error) {
  120206. ecb.call(xhrArgs.error_scope || xhrArgs.scope, c.error, x);
  120207. } else {
  120208. scb.call(xhrArgs.success_scope || xhrArgs.scope, c.result);
  120209. }
  120210. };
  120211. xhrArgs.error = function (ty, x) {
  120212. if (ecb) {
  120213. ecb.call(xhrArgs.error_scope || xhrArgs.scope, ty, x);
  120214. }
  120215. };
  120216. xhrArgs.data = JSONUtils.serialize({
  120217. id: args.id || 'c' + this.count++,
  120218. method: args.method,
  120219. params: args.params
  120220. });
  120221. xhrArgs.content_type = 'application/json';
  120222. XHR.send(xhrArgs);
  120223. };
  120224. return JSONRequest;
  120225. }();
  120226. var create = function () {
  120227. return function () {
  120228. var data = {};
  120229. var keys = [];
  120230. var storage = {
  120231. getItem: function (key) {
  120232. var item = data[key];
  120233. return item ? item : null;
  120234. },
  120235. setItem: function (key, value) {
  120236. keys.push(key);
  120237. data[key] = String(value);
  120238. },
  120239. key: function (index) {
  120240. return keys[index];
  120241. },
  120242. removeItem: function (key) {
  120243. keys = keys.filter(function (k) {
  120244. return k === key;
  120245. });
  120246. delete data[key];
  120247. },
  120248. clear: function () {
  120249. keys = [];
  120250. data = {};
  120251. },
  120252. length: 0
  120253. };
  120254. Object.defineProperty(storage, 'length', {
  120255. get: function () {
  120256. return keys.length;
  120257. },
  120258. configurable: false,
  120259. enumerable: false
  120260. });
  120261. return storage;
  120262. }();
  120263. };
  120264. var localStorage;
  120265. try {
  120266. var test = '__storage_test__';
  120267. localStorage = window.localStorage;
  120268. localStorage.setItem(test, test);
  120269. localStorage.removeItem(test);
  120270. } catch (e) {
  120271. localStorage = create();
  120272. }
  120273. var LocalStorage = localStorage;
  120274. var publicApi = {
  120275. geom: { Rect: Rect },
  120276. util: {
  120277. Promise: promiseObj,
  120278. Delay: Delay,
  120279. Tools: Tools,
  120280. VK: VK,
  120281. URI: URI,
  120282. Class: Class,
  120283. EventDispatcher: EventDispatcher,
  120284. Observable: Observable,
  120285. I18n: I18n,
  120286. XHR: XHR,
  120287. JSON: JSONUtils,
  120288. JSONRequest: JSONRequest,
  120289. JSONP: JSONP,
  120290. LocalStorage: LocalStorage,
  120291. Color: Color,
  120292. ImageUploader: ImageUploader
  120293. },
  120294. dom: {
  120295. EventUtils: EventUtils,
  120296. Sizzle: Sizzle,
  120297. DomQuery: DomQuery,
  120298. TreeWalker: DomTreeWalker,
  120299. TextSeeker: TextSeeker,
  120300. DOMUtils: DOMUtils,
  120301. ScriptLoader: ScriptLoader,
  120302. RangeUtils: RangeUtils,
  120303. Serializer: DomSerializer,
  120304. StyleSheetLoader: StyleSheetLoader,
  120305. ControlSelection: ControlSelection,
  120306. BookmarkManager: BookmarkManager,
  120307. Selection: EditorSelection,
  120308. Event: EventUtils.Event
  120309. },
  120310. html: {
  120311. Styles: Styles,
  120312. Entities: Entities,
  120313. Node: AstNode,
  120314. Schema: Schema,
  120315. SaxParser: SaxParser,
  120316. DomParser: DomParser,
  120317. Writer: Writer,
  120318. Serializer: HtmlSerializer
  120319. },
  120320. Env: Env,
  120321. AddOnManager: AddOnManager,
  120322. Annotator: Annotator,
  120323. Formatter: Formatter,
  120324. UndoManager: UndoManager,
  120325. EditorCommands: EditorCommands,
  120326. WindowManager: WindowManager,
  120327. NotificationManager: NotificationManager,
  120328. EditorObservable: EditorObservable,
  120329. Shortcuts: Shortcuts,
  120330. Editor: Editor,
  120331. FocusManager: FocusManager,
  120332. EditorManager: EditorManager,
  120333. DOM: DOMUtils.DOM,
  120334. ScriptLoader: ScriptLoader.ScriptLoader,
  120335. PluginManager: PluginManager,
  120336. ThemeManager: ThemeManager,
  120337. IconManager: IconManager,
  120338. Resource: Resource,
  120339. trim: Tools.trim,
  120340. isArray: Tools.isArray,
  120341. is: Tools.is,
  120342. toArray: Tools.toArray,
  120343. makeMap: Tools.makeMap,
  120344. each: Tools.each,
  120345. map: Tools.map,
  120346. grep: Tools.grep,
  120347. inArray: Tools.inArray,
  120348. extend: Tools.extend,
  120349. create: Tools.create,
  120350. walk: Tools.walk,
  120351. createNS: Tools.createNS,
  120352. resolve: Tools.resolve,
  120353. explode: Tools.explode,
  120354. _addCacheSuffix: Tools._addCacheSuffix,
  120355. isOpera: Env.opera,
  120356. isWebKit: Env.webkit,
  120357. isIE: Env.ie,
  120358. isGecko: Env.gecko,
  120359. isMac: Env.mac
  120360. };
  120361. var tinymce = Tools.extend(EditorManager, publicApi);
  120362. var exportToModuleLoaders = function (tinymce) {
  120363. if (true) {
  120364. try {
  120365. module.exports = tinymce;
  120366. } catch (_) {
  120367. }
  120368. }
  120369. };
  120370. var exportToWindowGlobal = function (tinymce) {
  120371. window.tinymce = tinymce;
  120372. window.tinyMCE = tinymce;
  120373. };
  120374. exportToWindowGlobal(tinymce);
  120375. exportToModuleLoaders(tinymce);
  120376. }());
  120377. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  120378. /***/ }),
  120379. /***/ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.31d28485.eot":
  120380. /*!***********************************************************************************!*\
  120381. !*** ./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.31d28485.eot ***!
  120382. \***********************************************************************************/
  120383. /*! no static exports found */
  120384. /***/ (function(module, exports, __webpack_require__) {
  120385. module.exports = __webpack_require__.p + "static/fonts/remixicon.31d28485.31d28485.eot";
  120386. /***/ }),
  120387. /***/ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.881fbc46.woff":
  120388. /*!************************************************************************************!*\
  120389. !*** ./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.881fbc46.woff ***!
  120390. \************************************************************************************/
  120391. /*! no static exports found */
  120392. /***/ (function(module, exports, __webpack_require__) {
  120393. module.exports = __webpack_require__.p + "static/fonts/remixicon.881fbc46.881fbc46.woff";
  120394. /***/ }),
  120395. /***/ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.888e61f0.ttf":
  120396. /*!***********************************************************************************!*\
  120397. !*** ./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.888e61f0.ttf ***!
  120398. \***********************************************************************************/
  120399. /*! no static exports found */
  120400. /***/ (function(module, exports, __webpack_require__) {
  120401. module.exports = __webpack_require__.p + "static/fonts/remixicon.888e61f0.888e61f0.ttf";
  120402. /***/ }),
  120403. /***/ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.9915fef9.woff2":
  120404. /*!*************************************************************************************!*\
  120405. !*** ./node_modules/_vab-icons@0.0.20@vab-icons/lib/fonts/remixicon.9915fef9.woff2 ***!
  120406. \*************************************************************************************/
  120407. /*! no static exports found */
  120408. /***/ (function(module, exports, __webpack_require__) {
  120409. module.exports = __webpack_require__.p + "static/fonts/remixicon.9915fef9.9915fef9.woff2";
  120410. /***/ }),
  120411. /***/ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/img/remixicon.95138f36.svg":
  120412. /*!*********************************************************************************!*\
  120413. !*** ./node_modules/_vab-icons@0.0.20@vab-icons/lib/img/remixicon.95138f36.svg ***!
  120414. \*********************************************************************************/
  120415. /*! no static exports found */
  120416. /***/ (function(module, exports, __webpack_require__) {
  120417. module.exports = __webpack_require__.p + "static/img/remixicon.95138f36.95138f36.svg";
  120418. /***/ }),
  120419. /***/ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/vab-icons.css":
  120420. /*!********************************************************************!*\
  120421. !*** ./node_modules/_vab-icons@0.0.20@vab-icons/lib/vab-icons.css ***!
  120422. \********************************************************************/
  120423. /*! no static exports found */
  120424. /***/ (function(module, exports, __webpack_require__) {
  120425. // style-loader: Adds some css to the DOM by adding a <style> tag
  120426. // load the styles
  120427. var content = __webpack_require__(/*! !../../_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-3-1!../../_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-3-2!./vab-icons.css */ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_vab-icons@0.0.20@vab-icons/lib/vab-icons.css");
  120428. if(content.__esModule) content = content.default;
  120429. if(typeof content === 'string') content = [[module.i, content, '']];
  120430. if(content.locals) module.exports = content.locals;
  120431. // add the styles to the DOM
  120432. var add = __webpack_require__(/*! ../../_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js */ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js").default
  120433. var update = add("4ea560ef", content, false, {"sourceMap":true,"shadowMode":false});
  120434. // Hot Module Replacement
  120435. if(false) {}
  120436. /***/ }),
  120437. /***/ "./node_modules/_vab-icons@0.0.20@vab-icons/lib/vab-icons.umd.min.js":
  120438. /*!***************************************************************************!*\
  120439. !*** ./node_modules/_vab-icons@0.0.20@vab-icons/lib/vab-icons.umd.min.js ***!
  120440. \***************************************************************************/
  120441. /*! no static exports found */
  120442. /***/ (function(module, exports, __webpack_require__) {
  120443. !(function(){if (false) {}else if (false){}})();(function(t,e){ true?module.exports=e():undefined})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"06af":function(t,e,n){},"1cdc":function(t,e,n){"use strict";n("06af")},"29a1":function(t,e,n){t.exports=n.p+"img/remixicon.symbol.f09b1c74.svg"},8875:function(t,e,n){var r,o,i;(function(n,c){o=[],r=c,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,c=/@([^@]*):(\d+):(\d+)\s*$/gi,s=i.exec(p.stack)||c.exec(p.stack),u=s&&s[1]||!1,a=s&&s[2]||!1,f=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");u===f&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var d=0;d<l.length;d++){if("interactive"===l[d].readyState)return l[d];if(l[d].src===u)return l[d];if(u===f&&l[d].innerHTML&&l[d].innerHTML.trim()===o)return l[d]}return null}}return t}))},ab05:function(t,e,n){},fb15:function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var c=function(){var t,e=this,n=e.$createElement,r=e._self._c||n;return e.isExternal?r("img",e._g({staticClass:"img-icon",attrs:{src:e.icon}},e.$listeners)):e.isCustomSvg?r("svg",e._g({class:e.svgClass,attrs:{"aria-hidden":"true"}},e.$listeners),[r("use",{attrs:{"xlink:href":"#vab-icon-"+e.icon}})]):e.isDefaultSvg?r("svg",e._g({staticClass:"vab-icon"},e.$listeners),[r("use",{attrs:{"xlink:href":e.remixIconPath+"#ri-"+e.icon}})]):r("i",e._g({class:(t={},t["ri-"+e.icon]=!0,t),attrs:{"aria-hidden":"true"}},e.$listeners))},s=[];n("ab05");function u(t){return/^(https?:|mailto:|tel:)/.test(t)}var a={name:"VabIcon",props:{icon:{type:String,required:!0},isCustomSvg:{type:Boolean,default:!1},isDefaultSvg:{type:Boolean,default:!1},className:{type:String,default:""}},data:function(){return{remixIconPath:n("29a1")}},computed:{isExternal:function(){return u(this.icon)},svgClass:function(){return this.className?"vab-icon ".concat(this.className):"vab-icon"}}},f=a;n("1cdc");function l(t,e,n,r,o,i,c,s){var u,a="function"===typeof t?t.options:t;if(e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),i&&(a._scopeId="data-v-"+i),c?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},a._ssrRegister=u):o&&(u=s?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(a.functional){a._injectStyles=u;var f=a.render;a.render=function(t,e){return u.call(e),f(t,e)}}else{var l=a.beforeCreate;a.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:a}}var d=l(f,c,s,!1,null,"79aac9d9",null),p=d.exports;e["default"]=p}})["default"]}));!(function(){if (false) {}else if (false){}})();
  120444. /***/ }),
  120445. /***/ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.js":
  120446. /*!**************************************************************!*\
  120447. !*** ./node_modules/_vue-esign@1.1.4@vue-esign/src/index.js ***!
  120448. \**************************************************************/
  120449. /*! exports provided: default */
  120450. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  120451. "use strict";
  120452. __webpack_require__.r(__webpack_exports__);
  120453. /* harmony import */ var _index_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue */ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue");
  120454. _index_vue__WEBPACK_IMPORTED_MODULE_0__["default"].install = function (Vue) {
  120455. if (this.installed) {
  120456. return
  120457. }
  120458. this.installed = true
  120459. Vue.component('vueEsign', _index_vue__WEBPACK_IMPORTED_MODULE_0__["default"])
  120460. }
  120461. /* harmony default export */ __webpack_exports__["default"] = (_index_vue__WEBPACK_IMPORTED_MODULE_0__["default"]);
  120462. // if (typeof window !== 'undefined' && window.Vue) {
  120463. // window.Vue.use(vueEsign)
  120464. // }
  120465. /***/ }),
  120466. /***/ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue":
  120467. /*!***************************************************************!*\
  120468. !*** ./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue ***!
  120469. \***************************************************************/
  120470. /*! exports provided: default */
  120471. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  120472. "use strict";
  120473. __webpack_require__.r(__webpack_exports__);
  120474. /* harmony import */ var _index_vue_vue_type_template_id_056888e0_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=056888e0&scoped=true& */ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=template&id=056888e0&scoped=true&");
  120475. /* harmony import */ var _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js& */ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=script&lang=js&");
  120476. /* empty/unused harmony star reexport *//* harmony import */ var _index_vue_vue_type_style_index_0_id_056888e0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css& */ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css&");
  120477. /* harmony import */ var _vue_loader_15_10_0_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../_vue-loader@15.10.0@vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/_vue-loader@15.10.0@vue-loader/lib/runtime/componentNormalizer.js");
  120478. /* normalize component */
  120479. var component = Object(_vue_loader_15_10_0_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
  120480. _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  120481. _index_vue_vue_type_template_id_056888e0_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
  120482. _index_vue_vue_type_template_id_056888e0_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  120483. false,
  120484. null,
  120485. "056888e0",
  120486. null
  120487. )
  120488. /* hot reload */
  120489. if (false) { var api; }
  120490. component.options.__file = "node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue"
  120491. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  120492. /***/ }),
  120493. /***/ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=script&lang=js&":
  120494. /*!****************************************************************************************!*\
  120495. !*** ./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=script&lang=js& ***!
  120496. \****************************************************************************************/
  120497. /*! exports provided: default */
  120498. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  120499. "use strict";
  120500. __webpack_require__.r(__webpack_exports__);
  120501. /* harmony import */ var _cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_13_0_babel_loader_8_2_5_babel_loader_lib_index_js_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!../../_babel-loader@8.2.5@babel-loader/lib!../../_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./index.vue?vue&type=script&lang=js& */ "./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_babel-loader@8.2.5@babel-loader/lib/index.js!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=script&lang=js&");
  120502. /* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_13_0_babel_loader_8_2_5_babel_loader_lib_index_js_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
  120503. /***/ }),
  120504. /***/ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css&":
  120505. /*!************************************************************************************************************************!*\
  120506. !*** ./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css& ***!
  120507. \************************************************************************************************************************/
  120508. /*! no static exports found */
  120509. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  120510. "use strict";
  120511. __webpack_require__.r(__webpack_exports__);
  120512. /* harmony import */ var _vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_vue_loader_15_10_0_vue_loader_lib_loaders_stylePostLoader_js_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_056888e0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../_vue-style-loader@4.1.3@vue-style-loader??ref--7-oneOf-1-0!../../_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!../../_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-1-2!../../_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css& */ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js?!./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css&");
  120513. /* harmony import */ var _vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_vue_loader_15_10_0_vue_loader_lib_loaders_stylePostLoader_js_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_056888e0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_vue_loader_15_10_0_vue_loader_lib_loaders_stylePostLoader_js_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_056888e0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  120514. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_vue_loader_15_10_0_vue_loader_lib_loaders_stylePostLoader_js_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_056888e0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _vue_style_loader_4_1_3_vue_style_loader_index_js_ref_7_oneOf_1_0_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_vue_loader_15_10_0_vue_loader_lib_loaders_stylePostLoader_js_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_056888e0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  120515. /***/ }),
  120516. /***/ "./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=template&id=056888e0&scoped=true&":
  120517. /*!**********************************************************************************************************!*\
  120518. !*** ./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=template&id=056888e0&scoped=true& ***!
  120519. \**********************************************************************************************************/
  120520. /*! exports provided: render, staticRenderFns */
  120521. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  120522. "use strict";
  120523. __webpack_require__.r(__webpack_exports__);
  120524. /* harmony import */ var _cache_loader_4_1_0_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_6e6053f2_vue_loader_template_vue_loader_15_10_0_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_056888e0_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6e6053f2-vue-loader-template"}!../../_vue-loader@15.10.0@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./index.vue?vue&type=template&id=056888e0&scoped=true& */ "./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"6e6053f2-vue-loader-template\"}!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/templateLoader.js?!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=template&id=056888e0&scoped=true&");
  120525. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _cache_loader_4_1_0_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_6e6053f2_vue_loader_template_vue_loader_15_10_0_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_056888e0_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
  120526. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _cache_loader_4_1_0_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_6e6053f2_vue_loader_template_vue_loader_15_10_0_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_vue_loader_15_10_0_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_056888e0_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
  120527. /***/ }),
  120528. /***/ "./node_modules/_vue-loader@15.10.0@vue-loader/lib/runtime/componentNormalizer.js":
  120529. /*!****************************************************************************************!*\
  120530. !*** ./node_modules/_vue-loader@15.10.0@vue-loader/lib/runtime/componentNormalizer.js ***!
  120531. \****************************************************************************************/
  120532. /*! exports provided: default */
  120533. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  120534. "use strict";
  120535. __webpack_require__.r(__webpack_exports__);
  120536. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  120537. /* globals __VUE_SSR_CONTEXT__ */
  120538. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  120539. // This module is a runtime utility for cleaner component module output and will
  120540. // be included in the final webpack user bundle.
  120541. function normalizeComponent(
  120542. scriptExports,
  120543. render,
  120544. staticRenderFns,
  120545. functionalTemplate,
  120546. injectStyles,
  120547. scopeId,
  120548. moduleIdentifier /* server only */,
  120549. shadowMode /* vue-cli only */
  120550. ) {
  120551. // Vue.extend constructor export interop
  120552. var options =
  120553. typeof scriptExports === 'function' ? scriptExports.options : scriptExports
  120554. // render functions
  120555. if (render) {
  120556. options.render = render
  120557. options.staticRenderFns = staticRenderFns
  120558. options._compiled = true
  120559. }
  120560. // functional template
  120561. if (functionalTemplate) {
  120562. options.functional = true
  120563. }
  120564. // scopedId
  120565. if (scopeId) {
  120566. options._scopeId = 'data-v-' + scopeId
  120567. }
  120568. var hook
  120569. if (moduleIdentifier) {
  120570. // server build
  120571. hook = function (context) {
  120572. // 2.3 injection
  120573. context =
  120574. context || // cached call
  120575. (this.$vnode && this.$vnode.ssrContext) || // stateful
  120576. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  120577. // 2.2 with runInNewContext: true
  120578. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  120579. context = __VUE_SSR_CONTEXT__
  120580. }
  120581. // inject component styles
  120582. if (injectStyles) {
  120583. injectStyles.call(this, context)
  120584. }
  120585. // register component module identifier for async chunk inferrence
  120586. if (context && context._registeredComponents) {
  120587. context._registeredComponents.add(moduleIdentifier)
  120588. }
  120589. }
  120590. // used by ssr in case component is cached and beforeCreate
  120591. // never gets called
  120592. options._ssrRegister = hook
  120593. } else if (injectStyles) {
  120594. hook = shadowMode
  120595. ? function () {
  120596. injectStyles.call(
  120597. this,
  120598. (options.functional ? this.parent : this).$root.$options.shadowRoot
  120599. )
  120600. }
  120601. : injectStyles
  120602. }
  120603. if (hook) {
  120604. if (options.functional) {
  120605. // for template-only hot-reload because in that case the render fn doesn't
  120606. // go through the normalizer
  120607. options._injectStyles = hook
  120608. // register for functional component in vue file
  120609. var originalRender = options.render
  120610. options.render = function renderWithStyleInjection(h, context) {
  120611. hook.call(context)
  120612. return originalRender(h, context)
  120613. }
  120614. } else {
  120615. // inject component registration as beforeCreate hook
  120616. var existing = options.beforeCreate
  120617. options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
  120618. }
  120619. }
  120620. return {
  120621. exports: scriptExports,
  120622. options: options
  120623. }
  120624. }
  120625. /***/ }),
  120626. /***/ "./node_modules/_vue-router@3.6.4@vue-router/dist/vue-router.esm.js":
  120627. /*!**************************************************************************!*\
  120628. !*** ./node_modules/_vue-router@3.6.4@vue-router/dist/vue-router.esm.js ***!
  120629. \**************************************************************************/
  120630. /*! exports provided: NavigationFailureType, RouterLink, RouterView, START_LOCATION, default, isNavigationFailure, version */
  120631. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  120632. "use strict";
  120633. __webpack_require__.r(__webpack_exports__);
  120634. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationFailureType", function() { return NavigationFailureType; });
  120635. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLink", function() { return Link; });
  120636. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterView", function() { return View; });
  120637. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "START_LOCATION", function() { return START; });
  120638. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return VueRouter$1; });
  120639. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNavigationFailure", function() { return isNavigationFailure; });
  120640. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
  120641. /*!
  120642. * vue-router v3.6.4
  120643. * (c) 2022 Evan You
  120644. * @license MIT
  120645. */
  120646. /* */
  120647. function assert (condition, message) {
  120648. if (!condition) {
  120649. throw new Error(("[vue-router] " + message))
  120650. }
  120651. }
  120652. function warn (condition, message) {
  120653. if (!condition) {
  120654. typeof console !== 'undefined' && console.warn(("[vue-router] " + message));
  120655. }
  120656. }
  120657. function extend (a, b) {
  120658. for (var key in b) {
  120659. a[key] = b[key];
  120660. }
  120661. return a
  120662. }
  120663. /* */
  120664. var encodeReserveRE = /[!'()*]/g;
  120665. var encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };
  120666. var commaRE = /%2C/g;
  120667. // fixed encodeURIComponent which is more conformant to RFC3986:
  120668. // - escapes [!'()*]
  120669. // - preserve commas
  120670. var encode = function (str) { return encodeURIComponent(str)
  120671. .replace(encodeReserveRE, encodeReserveReplacer)
  120672. .replace(commaRE, ','); };
  120673. function decode (str) {
  120674. try {
  120675. return decodeURIComponent(str)
  120676. } catch (err) {
  120677. if (true) {
  120678. warn(false, ("Error decoding \"" + str + "\". Leaving it intact."));
  120679. }
  120680. }
  120681. return str
  120682. }
  120683. function resolveQuery (
  120684. query,
  120685. extraQuery,
  120686. _parseQuery
  120687. ) {
  120688. if ( extraQuery === void 0 ) extraQuery = {};
  120689. var parse = _parseQuery || parseQuery;
  120690. var parsedQuery;
  120691. try {
  120692. parsedQuery = parse(query || '');
  120693. } catch (e) {
  120694. true && warn(false, e.message);
  120695. parsedQuery = {};
  120696. }
  120697. for (var key in extraQuery) {
  120698. var value = extraQuery[key];
  120699. parsedQuery[key] = Array.isArray(value)
  120700. ? value.map(castQueryParamValue)
  120701. : castQueryParamValue(value);
  120702. }
  120703. return parsedQuery
  120704. }
  120705. var castQueryParamValue = function (value) { return (value == null || typeof value === 'object' ? value : String(value)); };
  120706. function parseQuery (query) {
  120707. var res = {};
  120708. query = query.trim().replace(/^(\?|#|&)/, '');
  120709. if (!query) {
  120710. return res
  120711. }
  120712. query.split('&').forEach(function (param) {
  120713. var parts = param.replace(/\+/g, ' ').split('=');
  120714. var key = decode(parts.shift());
  120715. var val = parts.length > 0 ? decode(parts.join('=')) : null;
  120716. if (res[key] === undefined) {
  120717. res[key] = val;
  120718. } else if (Array.isArray(res[key])) {
  120719. res[key].push(val);
  120720. } else {
  120721. res[key] = [res[key], val];
  120722. }
  120723. });
  120724. return res
  120725. }
  120726. function stringifyQuery (obj) {
  120727. var res = obj
  120728. ? Object.keys(obj)
  120729. .map(function (key) {
  120730. var val = obj[key];
  120731. if (val === undefined) {
  120732. return ''
  120733. }
  120734. if (val === null) {
  120735. return encode(key)
  120736. }
  120737. if (Array.isArray(val)) {
  120738. var result = [];
  120739. val.forEach(function (val2) {
  120740. if (val2 === undefined) {
  120741. return
  120742. }
  120743. if (val2 === null) {
  120744. result.push(encode(key));
  120745. } else {
  120746. result.push(encode(key) + '=' + encode(val2));
  120747. }
  120748. });
  120749. return result.join('&')
  120750. }
  120751. return encode(key) + '=' + encode(val)
  120752. })
  120753. .filter(function (x) { return x.length > 0; })
  120754. .join('&')
  120755. : null;
  120756. return res ? ("?" + res) : ''
  120757. }
  120758. /* */
  120759. var trailingSlashRE = /\/?$/;
  120760. function createRoute (
  120761. record,
  120762. location,
  120763. redirectedFrom,
  120764. router
  120765. ) {
  120766. var stringifyQuery = router && router.options.stringifyQuery;
  120767. var query = location.query || {};
  120768. try {
  120769. query = clone(query);
  120770. } catch (e) {}
  120771. var route = {
  120772. name: location.name || (record && record.name),
  120773. meta: (record && record.meta) || {},
  120774. path: location.path || '/',
  120775. hash: location.hash || '',
  120776. query: query,
  120777. params: location.params || {},
  120778. fullPath: getFullPath(location, stringifyQuery),
  120779. matched: record ? formatMatch(record) : []
  120780. };
  120781. if (redirectedFrom) {
  120782. route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);
  120783. }
  120784. return Object.freeze(route)
  120785. }
  120786. function clone (value) {
  120787. if (Array.isArray(value)) {
  120788. return value.map(clone)
  120789. } else if (value && typeof value === 'object') {
  120790. var res = {};
  120791. for (var key in value) {
  120792. res[key] = clone(value[key]);
  120793. }
  120794. return res
  120795. } else {
  120796. return value
  120797. }
  120798. }
  120799. // the starting route that represents the initial state
  120800. var START = createRoute(null, {
  120801. path: '/'
  120802. });
  120803. function formatMatch (record) {
  120804. var res = [];
  120805. while (record) {
  120806. res.unshift(record);
  120807. record = record.parent;
  120808. }
  120809. return res
  120810. }
  120811. function getFullPath (
  120812. ref,
  120813. _stringifyQuery
  120814. ) {
  120815. var path = ref.path;
  120816. var query = ref.query; if ( query === void 0 ) query = {};
  120817. var hash = ref.hash; if ( hash === void 0 ) hash = '';
  120818. var stringify = _stringifyQuery || stringifyQuery;
  120819. return (path || '/') + stringify(query) + hash
  120820. }
  120821. function isSameRoute (a, b, onlyPath) {
  120822. if (b === START) {
  120823. return a === b
  120824. } else if (!b) {
  120825. return false
  120826. } else if (a.path && b.path) {
  120827. return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && (onlyPath ||
  120828. a.hash === b.hash &&
  120829. isObjectEqual(a.query, b.query))
  120830. } else if (a.name && b.name) {
  120831. return (
  120832. a.name === b.name &&
  120833. (onlyPath || (
  120834. a.hash === b.hash &&
  120835. isObjectEqual(a.query, b.query) &&
  120836. isObjectEqual(a.params, b.params))
  120837. )
  120838. )
  120839. } else {
  120840. return false
  120841. }
  120842. }
  120843. function isObjectEqual (a, b) {
  120844. if ( a === void 0 ) a = {};
  120845. if ( b === void 0 ) b = {};
  120846. // handle null value #1566
  120847. if (!a || !b) { return a === b }
  120848. var aKeys = Object.keys(a).sort();
  120849. var bKeys = Object.keys(b).sort();
  120850. if (aKeys.length !== bKeys.length) {
  120851. return false
  120852. }
  120853. return aKeys.every(function (key, i) {
  120854. var aVal = a[key];
  120855. var bKey = bKeys[i];
  120856. if (bKey !== key) { return false }
  120857. var bVal = b[key];
  120858. // query values can be null and undefined
  120859. if (aVal == null || bVal == null) { return aVal === bVal }
  120860. // check nested equality
  120861. if (typeof aVal === 'object' && typeof bVal === 'object') {
  120862. return isObjectEqual(aVal, bVal)
  120863. }
  120864. return String(aVal) === String(bVal)
  120865. })
  120866. }
  120867. function isIncludedRoute (current, target) {
  120868. return (
  120869. current.path.replace(trailingSlashRE, '/').indexOf(
  120870. target.path.replace(trailingSlashRE, '/')
  120871. ) === 0 &&
  120872. (!target.hash || current.hash === target.hash) &&
  120873. queryIncludes(current.query, target.query)
  120874. )
  120875. }
  120876. function queryIncludes (current, target) {
  120877. for (var key in target) {
  120878. if (!(key in current)) {
  120879. return false
  120880. }
  120881. }
  120882. return true
  120883. }
  120884. function handleRouteEntered (route) {
  120885. for (var i = 0; i < route.matched.length; i++) {
  120886. var record = route.matched[i];
  120887. for (var name in record.instances) {
  120888. var instance = record.instances[name];
  120889. var cbs = record.enteredCbs[name];
  120890. if (!instance || !cbs) { continue }
  120891. delete record.enteredCbs[name];
  120892. for (var i$1 = 0; i$1 < cbs.length; i$1++) {
  120893. if (!instance._isBeingDestroyed) { cbs[i$1](instance); }
  120894. }
  120895. }
  120896. }
  120897. }
  120898. var View = {
  120899. name: 'RouterView',
  120900. functional: true,
  120901. props: {
  120902. name: {
  120903. type: String,
  120904. default: 'default'
  120905. }
  120906. },
  120907. render: function render (_, ref) {
  120908. var props = ref.props;
  120909. var children = ref.children;
  120910. var parent = ref.parent;
  120911. var data = ref.data;
  120912. // used by devtools to display a router-view badge
  120913. data.routerView = true;
  120914. // directly use parent context's createElement() function
  120915. // so that components rendered by router-view can resolve named slots
  120916. var h = parent.$createElement;
  120917. var name = props.name;
  120918. var route = parent.$route;
  120919. var cache = parent._routerViewCache || (parent._routerViewCache = {});
  120920. // determine current view depth, also check to see if the tree
  120921. // has been toggled inactive but kept-alive.
  120922. var depth = 0;
  120923. var inactive = false;
  120924. while (parent && parent._routerRoot !== parent) {
  120925. var vnodeData = parent.$vnode ? parent.$vnode.data : {};
  120926. if (vnodeData.routerView) {
  120927. depth++;
  120928. }
  120929. if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {
  120930. inactive = true;
  120931. }
  120932. parent = parent.$parent;
  120933. }
  120934. data.routerViewDepth = depth;
  120935. // render previous view if the tree is inactive and kept-alive
  120936. if (inactive) {
  120937. var cachedData = cache[name];
  120938. var cachedComponent = cachedData && cachedData.component;
  120939. if (cachedComponent) {
  120940. // #2301
  120941. // pass props
  120942. if (cachedData.configProps) {
  120943. fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);
  120944. }
  120945. return h(cachedComponent, data, children)
  120946. } else {
  120947. // render previous empty view
  120948. return h()
  120949. }
  120950. }
  120951. var matched = route.matched[depth];
  120952. var component = matched && matched.components[name];
  120953. // render empty node if no matched route or no config component
  120954. if (!matched || !component) {
  120955. cache[name] = null;
  120956. return h()
  120957. }
  120958. // cache component
  120959. cache[name] = { component: component };
  120960. // attach instance registration hook
  120961. // this will be called in the instance's injected lifecycle hooks
  120962. data.registerRouteInstance = function (vm, val) {
  120963. // val could be undefined for unregistration
  120964. var current = matched.instances[name];
  120965. if (
  120966. (val && current !== vm) ||
  120967. (!val && current === vm)
  120968. ) {
  120969. matched.instances[name] = val;
  120970. }
  120971. }
  120972. // also register instance in prepatch hook
  120973. // in case the same component instance is reused across different routes
  120974. ;(data.hook || (data.hook = {})).prepatch = function (_, vnode) {
  120975. matched.instances[name] = vnode.componentInstance;
  120976. };
  120977. // register instance in init hook
  120978. // in case kept-alive component be actived when routes changed
  120979. data.hook.init = function (vnode) {
  120980. if (vnode.data.keepAlive &&
  120981. vnode.componentInstance &&
  120982. vnode.componentInstance !== matched.instances[name]
  120983. ) {
  120984. matched.instances[name] = vnode.componentInstance;
  120985. }
  120986. // if the route transition has already been confirmed then we weren't
  120987. // able to call the cbs during confirmation as the component was not
  120988. // registered yet, so we call it here.
  120989. handleRouteEntered(route);
  120990. };
  120991. var configProps = matched.props && matched.props[name];
  120992. // save route and configProps in cache
  120993. if (configProps) {
  120994. extend(cache[name], {
  120995. route: route,
  120996. configProps: configProps
  120997. });
  120998. fillPropsinData(component, data, route, configProps);
  120999. }
  121000. return h(component, data, children)
  121001. }
  121002. };
  121003. function fillPropsinData (component, data, route, configProps) {
  121004. // resolve props
  121005. var propsToPass = data.props = resolveProps(route, configProps);
  121006. if (propsToPass) {
  121007. // clone to prevent mutation
  121008. propsToPass = data.props = extend({}, propsToPass);
  121009. // pass non-declared props as attrs
  121010. var attrs = data.attrs = data.attrs || {};
  121011. for (var key in propsToPass) {
  121012. if (!component.props || !(key in component.props)) {
  121013. attrs[key] = propsToPass[key];
  121014. delete propsToPass[key];
  121015. }
  121016. }
  121017. }
  121018. }
  121019. function resolveProps (route, config) {
  121020. switch (typeof config) {
  121021. case 'undefined':
  121022. return
  121023. case 'object':
  121024. return config
  121025. case 'function':
  121026. return config(route)
  121027. case 'boolean':
  121028. return config ? route.params : undefined
  121029. default:
  121030. if (true) {
  121031. warn(
  121032. false,
  121033. "props in \"" + (route.path) + "\" is a " + (typeof config) + ", " +
  121034. "expecting an object, function or boolean."
  121035. );
  121036. }
  121037. }
  121038. }
  121039. /* */
  121040. function resolvePath (
  121041. relative,
  121042. base,
  121043. append
  121044. ) {
  121045. var firstChar = relative.charAt(0);
  121046. if (firstChar === '/') {
  121047. return relative
  121048. }
  121049. if (firstChar === '?' || firstChar === '#') {
  121050. return base + relative
  121051. }
  121052. var stack = base.split('/');
  121053. // remove trailing segment if:
  121054. // - not appending
  121055. // - appending to trailing slash (last segment is empty)
  121056. if (!append || !stack[stack.length - 1]) {
  121057. stack.pop();
  121058. }
  121059. // resolve relative path
  121060. var segments = relative.replace(/^\//, '').split('/');
  121061. for (var i = 0; i < segments.length; i++) {
  121062. var segment = segments[i];
  121063. if (segment === '..') {
  121064. stack.pop();
  121065. } else if (segment !== '.') {
  121066. stack.push(segment);
  121067. }
  121068. }
  121069. // ensure leading slash
  121070. if (stack[0] !== '') {
  121071. stack.unshift('');
  121072. }
  121073. return stack.join('/')
  121074. }
  121075. function parsePath (path) {
  121076. var hash = '';
  121077. var query = '';
  121078. var hashIndex = path.indexOf('#');
  121079. if (hashIndex >= 0) {
  121080. hash = path.slice(hashIndex);
  121081. path = path.slice(0, hashIndex);
  121082. }
  121083. var queryIndex = path.indexOf('?');
  121084. if (queryIndex >= 0) {
  121085. query = path.slice(queryIndex + 1);
  121086. path = path.slice(0, queryIndex);
  121087. }
  121088. return {
  121089. path: path,
  121090. query: query,
  121091. hash: hash
  121092. }
  121093. }
  121094. function cleanPath (path) {
  121095. return path.replace(/\/(?:\s*\/)+/g, '/')
  121096. }
  121097. var isarray = Array.isArray || function (arr) {
  121098. return Object.prototype.toString.call(arr) == '[object Array]';
  121099. };
  121100. /**
  121101. * Expose `pathToRegexp`.
  121102. */
  121103. var pathToRegexp_1 = pathToRegexp;
  121104. var parse_1 = parse;
  121105. var compile_1 = compile;
  121106. var tokensToFunction_1 = tokensToFunction;
  121107. var tokensToRegExp_1 = tokensToRegExp;
  121108. /**
  121109. * The main path matching regexp utility.
  121110. *
  121111. * @type {RegExp}
  121112. */
  121113. var PATH_REGEXP = new RegExp([
  121114. // Match escaped characters that would otherwise appear in future matches.
  121115. // This allows the user to escape special characters that won't transform.
  121116. '(\\\\.)',
  121117. // Match Express-style parameters and un-named parameters with a prefix
  121118. // and optional suffixes. Matches appear as:
  121119. //
  121120. // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
  121121. // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
  121122. // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
  121123. '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
  121124. ].join('|'), 'g');
  121125. /**
  121126. * Parse a string for the raw tokens.
  121127. *
  121128. * @param {string} str
  121129. * @param {Object=} options
  121130. * @return {!Array}
  121131. */
  121132. function parse (str, options) {
  121133. var tokens = [];
  121134. var key = 0;
  121135. var index = 0;
  121136. var path = '';
  121137. var defaultDelimiter = options && options.delimiter || '/';
  121138. var res;
  121139. while ((res = PATH_REGEXP.exec(str)) != null) {
  121140. var m = res[0];
  121141. var escaped = res[1];
  121142. var offset = res.index;
  121143. path += str.slice(index, offset);
  121144. index = offset + m.length;
  121145. // Ignore already escaped sequences.
  121146. if (escaped) {
  121147. path += escaped[1];
  121148. continue
  121149. }
  121150. var next = str[index];
  121151. var prefix = res[2];
  121152. var name = res[3];
  121153. var capture = res[4];
  121154. var group = res[5];
  121155. var modifier = res[6];
  121156. var asterisk = res[7];
  121157. // Push the current path onto the tokens.
  121158. if (path) {
  121159. tokens.push(path);
  121160. path = '';
  121161. }
  121162. var partial = prefix != null && next != null && next !== prefix;
  121163. var repeat = modifier === '+' || modifier === '*';
  121164. var optional = modifier === '?' || modifier === '*';
  121165. var delimiter = res[2] || defaultDelimiter;
  121166. var pattern = capture || group;
  121167. tokens.push({
  121168. name: name || key++,
  121169. prefix: prefix || '',
  121170. delimiter: delimiter,
  121171. optional: optional,
  121172. repeat: repeat,
  121173. partial: partial,
  121174. asterisk: !!asterisk,
  121175. pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
  121176. });
  121177. }
  121178. // Match any characters still remaining.
  121179. if (index < str.length) {
  121180. path += str.substr(index);
  121181. }
  121182. // If the path exists, push it onto the end.
  121183. if (path) {
  121184. tokens.push(path);
  121185. }
  121186. return tokens
  121187. }
  121188. /**
  121189. * Compile a string to a template function for the path.
  121190. *
  121191. * @param {string} str
  121192. * @param {Object=} options
  121193. * @return {!function(Object=, Object=)}
  121194. */
  121195. function compile (str, options) {
  121196. return tokensToFunction(parse(str, options), options)
  121197. }
  121198. /**
  121199. * Prettier encoding of URI path segments.
  121200. *
  121201. * @param {string}
  121202. * @return {string}
  121203. */
  121204. function encodeURIComponentPretty (str) {
  121205. return encodeURI(str).replace(/[\/?#]/g, function (c) {
  121206. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  121207. })
  121208. }
  121209. /**
  121210. * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
  121211. *
  121212. * @param {string}
  121213. * @return {string}
  121214. */
  121215. function encodeAsterisk (str) {
  121216. return encodeURI(str).replace(/[?#]/g, function (c) {
  121217. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  121218. })
  121219. }
  121220. /**
  121221. * Expose a method for transforming tokens into the path function.
  121222. */
  121223. function tokensToFunction (tokens, options) {
  121224. // Compile all the tokens into regexps.
  121225. var matches = new Array(tokens.length);
  121226. // Compile all the patterns before compilation.
  121227. for (var i = 0; i < tokens.length; i++) {
  121228. if (typeof tokens[i] === 'object') {
  121229. matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));
  121230. }
  121231. }
  121232. return function (obj, opts) {
  121233. var path = '';
  121234. var data = obj || {};
  121235. var options = opts || {};
  121236. var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;
  121237. for (var i = 0; i < tokens.length; i++) {
  121238. var token = tokens[i];
  121239. if (typeof token === 'string') {
  121240. path += token;
  121241. continue
  121242. }
  121243. var value = data[token.name];
  121244. var segment;
  121245. if (value == null) {
  121246. if (token.optional) {
  121247. // Prepend partial segment prefixes.
  121248. if (token.partial) {
  121249. path += token.prefix;
  121250. }
  121251. continue
  121252. } else {
  121253. throw new TypeError('Expected "' + token.name + '" to be defined')
  121254. }
  121255. }
  121256. if (isarray(value)) {
  121257. if (!token.repeat) {
  121258. throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
  121259. }
  121260. if (value.length === 0) {
  121261. if (token.optional) {
  121262. continue
  121263. } else {
  121264. throw new TypeError('Expected "' + token.name + '" to not be empty')
  121265. }
  121266. }
  121267. for (var j = 0; j < value.length; j++) {
  121268. segment = encode(value[j]);
  121269. if (!matches[i].test(segment)) {
  121270. throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
  121271. }
  121272. path += (j === 0 ? token.prefix : token.delimiter) + segment;
  121273. }
  121274. continue
  121275. }
  121276. segment = token.asterisk ? encodeAsterisk(value) : encode(value);
  121277. if (!matches[i].test(segment)) {
  121278. throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
  121279. }
  121280. path += token.prefix + segment;
  121281. }
  121282. return path
  121283. }
  121284. }
  121285. /**
  121286. * Escape a regular expression string.
  121287. *
  121288. * @param {string} str
  121289. * @return {string}
  121290. */
  121291. function escapeString (str) {
  121292. return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
  121293. }
  121294. /**
  121295. * Escape the capturing group by escaping special characters and meaning.
  121296. *
  121297. * @param {string} group
  121298. * @return {string}
  121299. */
  121300. function escapeGroup (group) {
  121301. return group.replace(/([=!:$\/()])/g, '\\$1')
  121302. }
  121303. /**
  121304. * Attach the keys as a property of the regexp.
  121305. *
  121306. * @param {!RegExp} re
  121307. * @param {Array} keys
  121308. * @return {!RegExp}
  121309. */
  121310. function attachKeys (re, keys) {
  121311. re.keys = keys;
  121312. return re
  121313. }
  121314. /**
  121315. * Get the flags for a regexp from the options.
  121316. *
  121317. * @param {Object} options
  121318. * @return {string}
  121319. */
  121320. function flags (options) {
  121321. return options && options.sensitive ? '' : 'i'
  121322. }
  121323. /**
  121324. * Pull out keys from a regexp.
  121325. *
  121326. * @param {!RegExp} path
  121327. * @param {!Array} keys
  121328. * @return {!RegExp}
  121329. */
  121330. function regexpToRegexp (path, keys) {
  121331. // Use a negative lookahead to match only capturing groups.
  121332. var groups = path.source.match(/\((?!\?)/g);
  121333. if (groups) {
  121334. for (var i = 0; i < groups.length; i++) {
  121335. keys.push({
  121336. name: i,
  121337. prefix: null,
  121338. delimiter: null,
  121339. optional: false,
  121340. repeat: false,
  121341. partial: false,
  121342. asterisk: false,
  121343. pattern: null
  121344. });
  121345. }
  121346. }
  121347. return attachKeys(path, keys)
  121348. }
  121349. /**
  121350. * Transform an array into a regexp.
  121351. *
  121352. * @param {!Array} path
  121353. * @param {Array} keys
  121354. * @param {!Object} options
  121355. * @return {!RegExp}
  121356. */
  121357. function arrayToRegexp (path, keys, options) {
  121358. var parts = [];
  121359. for (var i = 0; i < path.length; i++) {
  121360. parts.push(pathToRegexp(path[i], keys, options).source);
  121361. }
  121362. var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
  121363. return attachKeys(regexp, keys)
  121364. }
  121365. /**
  121366. * Create a path regexp from string input.
  121367. *
  121368. * @param {string} path
  121369. * @param {!Array} keys
  121370. * @param {!Object} options
  121371. * @return {!RegExp}
  121372. */
  121373. function stringToRegexp (path, keys, options) {
  121374. return tokensToRegExp(parse(path, options), keys, options)
  121375. }
  121376. /**
  121377. * Expose a function for taking tokens and returning a RegExp.
  121378. *
  121379. * @param {!Array} tokens
  121380. * @param {(Array|Object)=} keys
  121381. * @param {Object=} options
  121382. * @return {!RegExp}
  121383. */
  121384. function tokensToRegExp (tokens, keys, options) {
  121385. if (!isarray(keys)) {
  121386. options = /** @type {!Object} */ (keys || options);
  121387. keys = [];
  121388. }
  121389. options = options || {};
  121390. var strict = options.strict;
  121391. var end = options.end !== false;
  121392. var route = '';
  121393. // Iterate over the tokens and create our regexp string.
  121394. for (var i = 0; i < tokens.length; i++) {
  121395. var token = tokens[i];
  121396. if (typeof token === 'string') {
  121397. route += escapeString(token);
  121398. } else {
  121399. var prefix = escapeString(token.prefix);
  121400. var capture = '(?:' + token.pattern + ')';
  121401. keys.push(token);
  121402. if (token.repeat) {
  121403. capture += '(?:' + prefix + capture + ')*';
  121404. }
  121405. if (token.optional) {
  121406. if (!token.partial) {
  121407. capture = '(?:' + prefix + '(' + capture + '))?';
  121408. } else {
  121409. capture = prefix + '(' + capture + ')?';
  121410. }
  121411. } else {
  121412. capture = prefix + '(' + capture + ')';
  121413. }
  121414. route += capture;
  121415. }
  121416. }
  121417. var delimiter = escapeString(options.delimiter || '/');
  121418. var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
  121419. // In non-strict mode we allow a slash at the end of match. If the path to
  121420. // match already ends with a slash, we remove it for consistency. The slash
  121421. // is valid at the end of a path match, not in the middle. This is important
  121422. // in non-ending mode, where "/test/" shouldn't match "/test//route".
  121423. if (!strict) {
  121424. route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';
  121425. }
  121426. if (end) {
  121427. route += '$';
  121428. } else {
  121429. // In non-ending mode, we need the capturing groups to match as much as
  121430. // possible by using a positive lookahead to the end or next path segment.
  121431. route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';
  121432. }
  121433. return attachKeys(new RegExp('^' + route, flags(options)), keys)
  121434. }
  121435. /**
  121436. * Normalize the given path string, returning a regular expression.
  121437. *
  121438. * An empty array can be passed in for the keys, which will hold the
  121439. * placeholder key descriptions. For example, using `/user/:id`, `keys` will
  121440. * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
  121441. *
  121442. * @param {(string|RegExp|Array)} path
  121443. * @param {(Array|Object)=} keys
  121444. * @param {Object=} options
  121445. * @return {!RegExp}
  121446. */
  121447. function pathToRegexp (path, keys, options) {
  121448. if (!isarray(keys)) {
  121449. options = /** @type {!Object} */ (keys || options);
  121450. keys = [];
  121451. }
  121452. options = options || {};
  121453. if (path instanceof RegExp) {
  121454. return regexpToRegexp(path, /** @type {!Array} */ (keys))
  121455. }
  121456. if (isarray(path)) {
  121457. return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
  121458. }
  121459. return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
  121460. }
  121461. pathToRegexp_1.parse = parse_1;
  121462. pathToRegexp_1.compile = compile_1;
  121463. pathToRegexp_1.tokensToFunction = tokensToFunction_1;
  121464. pathToRegexp_1.tokensToRegExp = tokensToRegExp_1;
  121465. /* */
  121466. // $flow-disable-line
  121467. var regexpCompileCache = Object.create(null);
  121468. function fillParams (
  121469. path,
  121470. params,
  121471. routeMsg
  121472. ) {
  121473. params = params || {};
  121474. try {
  121475. var filler =
  121476. regexpCompileCache[path] ||
  121477. (regexpCompileCache[path] = pathToRegexp_1.compile(path));
  121478. // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
  121479. // and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string
  121480. if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }
  121481. return filler(params, { pretty: true })
  121482. } catch (e) {
  121483. if (true) {
  121484. // Fix #3072 no warn if `pathMatch` is string
  121485. warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
  121486. }
  121487. return ''
  121488. } finally {
  121489. // delete the 0 if it was added
  121490. delete params[0];
  121491. }
  121492. }
  121493. /* */
  121494. function normalizeLocation (
  121495. raw,
  121496. current,
  121497. append,
  121498. router
  121499. ) {
  121500. var next = typeof raw === 'string' ? { path: raw } : raw;
  121501. // named target
  121502. if (next._normalized) {
  121503. return next
  121504. } else if (next.name) {
  121505. next = extend({}, raw);
  121506. var params = next.params;
  121507. if (params && typeof params === 'object') {
  121508. next.params = extend({}, params);
  121509. }
  121510. return next
  121511. }
  121512. // relative params
  121513. if (!next.path && next.params && current) {
  121514. next = extend({}, next);
  121515. next._normalized = true;
  121516. var params$1 = extend(extend({}, current.params), next.params);
  121517. if (current.name) {
  121518. next.name = current.name;
  121519. next.params = params$1;
  121520. } else if (current.matched.length) {
  121521. var rawPath = current.matched[current.matched.length - 1].path;
  121522. next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
  121523. } else if (true) {
  121524. warn(false, "relative params navigation requires a current route.");
  121525. }
  121526. return next
  121527. }
  121528. var parsedPath = parsePath(next.path || '');
  121529. var basePath = (current && current.path) || '/';
  121530. var path = parsedPath.path
  121531. ? resolvePath(parsedPath.path, basePath, append || next.append)
  121532. : basePath;
  121533. var query = resolveQuery(
  121534. parsedPath.query,
  121535. next.query,
  121536. router && router.options.parseQuery
  121537. );
  121538. var hash = next.hash || parsedPath.hash;
  121539. if (hash && hash.charAt(0) !== '#') {
  121540. hash = "#" + hash;
  121541. }
  121542. return {
  121543. _normalized: true,
  121544. path: path,
  121545. query: query,
  121546. hash: hash
  121547. }
  121548. }
  121549. /* */
  121550. // work around weird flow bug
  121551. var toTypes = [String, Object];
  121552. var eventTypes = [String, Array];
  121553. var noop = function () {};
  121554. var warnedCustomSlot;
  121555. var warnedTagProp;
  121556. var warnedEventProp;
  121557. var Link = {
  121558. name: 'RouterLink',
  121559. props: {
  121560. to: {
  121561. type: toTypes,
  121562. required: true
  121563. },
  121564. tag: {
  121565. type: String,
  121566. default: 'a'
  121567. },
  121568. custom: Boolean,
  121569. exact: Boolean,
  121570. exactPath: Boolean,
  121571. append: Boolean,
  121572. replace: Boolean,
  121573. activeClass: String,
  121574. exactActiveClass: String,
  121575. ariaCurrentValue: {
  121576. type: String,
  121577. default: 'page'
  121578. },
  121579. event: {
  121580. type: eventTypes,
  121581. default: 'click'
  121582. }
  121583. },
  121584. render: function render (h) {
  121585. var this$1$1 = this;
  121586. var router = this.$router;
  121587. var current = this.$route;
  121588. var ref = router.resolve(
  121589. this.to,
  121590. current,
  121591. this.append
  121592. );
  121593. var location = ref.location;
  121594. var route = ref.route;
  121595. var href = ref.href;
  121596. var classes = {};
  121597. var globalActiveClass = router.options.linkActiveClass;
  121598. var globalExactActiveClass = router.options.linkExactActiveClass;
  121599. // Support global empty active class
  121600. var activeClassFallback =
  121601. globalActiveClass == null ? 'router-link-active' : globalActiveClass;
  121602. var exactActiveClassFallback =
  121603. globalExactActiveClass == null
  121604. ? 'router-link-exact-active'
  121605. : globalExactActiveClass;
  121606. var activeClass =
  121607. this.activeClass == null ? activeClassFallback : this.activeClass;
  121608. var exactActiveClass =
  121609. this.exactActiveClass == null
  121610. ? exactActiveClassFallback
  121611. : this.exactActiveClass;
  121612. var compareTarget = route.redirectedFrom
  121613. ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router)
  121614. : route;
  121615. classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);
  121616. classes[activeClass] = this.exact || this.exactPath
  121617. ? classes[exactActiveClass]
  121618. : isIncludedRoute(current, compareTarget);
  121619. var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;
  121620. var handler = function (e) {
  121621. if (guardEvent(e)) {
  121622. if (this$1$1.replace) {
  121623. router.replace(location, noop);
  121624. } else {
  121625. router.push(location, noop);
  121626. }
  121627. }
  121628. };
  121629. var on = { click: guardEvent };
  121630. if (Array.isArray(this.event)) {
  121631. this.event.forEach(function (e) {
  121632. on[e] = handler;
  121633. });
  121634. } else {
  121635. on[this.event] = handler;
  121636. }
  121637. var data = { class: classes };
  121638. var scopedSlot =
  121639. !this.$scopedSlots.$hasNormal &&
  121640. this.$scopedSlots.default &&
  121641. this.$scopedSlots.default({
  121642. href: href,
  121643. route: route,
  121644. navigate: handler,
  121645. isActive: classes[activeClass],
  121646. isExactActive: classes[exactActiveClass]
  121647. });
  121648. if (scopedSlot) {
  121649. if ( true && !this.custom) {
  121650. !warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an <a> element. Use the custom prop to remove this warning:\n<router-link v-slot="{ navigate, href }" custom></router-link>\n');
  121651. warnedCustomSlot = true;
  121652. }
  121653. if (scopedSlot.length === 1) {
  121654. return scopedSlot[0]
  121655. } else if (scopedSlot.length > 1 || !scopedSlot.length) {
  121656. if (true) {
  121657. warn(
  121658. false,
  121659. ("<router-link> with to=\"" + (this.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.")
  121660. );
  121661. }
  121662. return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
  121663. }
  121664. }
  121665. if (true) {
  121666. if ('tag' in this.$options.propsData && !warnedTagProp) {
  121667. warn(
  121668. false,
  121669. "<router-link>'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
  121670. );
  121671. warnedTagProp = true;
  121672. }
  121673. if ('event' in this.$options.propsData && !warnedEventProp) {
  121674. warn(
  121675. false,
  121676. "<router-link>'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
  121677. );
  121678. warnedEventProp = true;
  121679. }
  121680. }
  121681. if (this.tag === 'a') {
  121682. data.on = on;
  121683. data.attrs = { href: href, 'aria-current': ariaCurrentValue };
  121684. } else {
  121685. // find the first <a> child and apply listener and href
  121686. var a = findAnchor(this.$slots.default);
  121687. if (a) {
  121688. // in case the <a> is a static node
  121689. a.isStatic = false;
  121690. var aData = (a.data = extend({}, a.data));
  121691. aData.on = aData.on || {};
  121692. // transform existing events in both objects into arrays so we can push later
  121693. for (var event in aData.on) {
  121694. var handler$1 = aData.on[event];
  121695. if (event in on) {
  121696. aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];
  121697. }
  121698. }
  121699. // append new listeners for router-link
  121700. for (var event$1 in on) {
  121701. if (event$1 in aData.on) {
  121702. // on[event] is always a function
  121703. aData.on[event$1].push(on[event$1]);
  121704. } else {
  121705. aData.on[event$1] = handler;
  121706. }
  121707. }
  121708. var aAttrs = (a.data.attrs = extend({}, a.data.attrs));
  121709. aAttrs.href = href;
  121710. aAttrs['aria-current'] = ariaCurrentValue;
  121711. } else {
  121712. // doesn't have <a> child, apply listener to self
  121713. data.on = on;
  121714. }
  121715. }
  121716. return h(this.tag, data, this.$slots.default)
  121717. }
  121718. };
  121719. function guardEvent (e) {
  121720. // don't redirect with control keys
  121721. if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }
  121722. // don't redirect when preventDefault called
  121723. if (e.defaultPrevented) { return }
  121724. // don't redirect on right click
  121725. if (e.button !== undefined && e.button !== 0) { return }
  121726. // don't redirect if `target="_blank"`
  121727. if (e.currentTarget && e.currentTarget.getAttribute) {
  121728. var target = e.currentTarget.getAttribute('target');
  121729. if (/\b_blank\b/i.test(target)) { return }
  121730. }
  121731. // this may be a Weex event which doesn't have this method
  121732. if (e.preventDefault) {
  121733. e.preventDefault();
  121734. }
  121735. return true
  121736. }
  121737. function findAnchor (children) {
  121738. if (children) {
  121739. var child;
  121740. for (var i = 0; i < children.length; i++) {
  121741. child = children[i];
  121742. if (child.tag === 'a') {
  121743. return child
  121744. }
  121745. if (child.children && (child = findAnchor(child.children))) {
  121746. return child
  121747. }
  121748. }
  121749. }
  121750. }
  121751. var _Vue;
  121752. function install (Vue) {
  121753. if (install.installed && _Vue === Vue) { return }
  121754. install.installed = true;
  121755. _Vue = Vue;
  121756. var isDef = function (v) { return v !== undefined; };
  121757. var registerInstance = function (vm, callVal) {
  121758. var i = vm.$options._parentVnode;
  121759. if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {
  121760. i(vm, callVal);
  121761. }
  121762. };
  121763. Vue.mixin({
  121764. beforeCreate: function beforeCreate () {
  121765. if (isDef(this.$options.router)) {
  121766. this._routerRoot = this;
  121767. this._router = this.$options.router;
  121768. this._router.init(this);
  121769. Vue.util.defineReactive(this, '_route', this._router.history.current);
  121770. } else {
  121771. this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;
  121772. }
  121773. registerInstance(this, this);
  121774. },
  121775. destroyed: function destroyed () {
  121776. registerInstance(this);
  121777. }
  121778. });
  121779. Object.defineProperty(Vue.prototype, '$router', {
  121780. get: function get () { return this._routerRoot._router }
  121781. });
  121782. Object.defineProperty(Vue.prototype, '$route', {
  121783. get: function get () { return this._routerRoot._route }
  121784. });
  121785. Vue.component('RouterView', View);
  121786. Vue.component('RouterLink', Link);
  121787. var strats = Vue.config.optionMergeStrategies;
  121788. // use the same hook merging strategy for route hooks
  121789. strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;
  121790. }
  121791. /* */
  121792. var inBrowser = typeof window !== 'undefined';
  121793. /* */
  121794. function createRouteMap (
  121795. routes,
  121796. oldPathList,
  121797. oldPathMap,
  121798. oldNameMap,
  121799. parentRoute
  121800. ) {
  121801. // the path list is used to control path matching priority
  121802. var pathList = oldPathList || [];
  121803. // $flow-disable-line
  121804. var pathMap = oldPathMap || Object.create(null);
  121805. // $flow-disable-line
  121806. var nameMap = oldNameMap || Object.create(null);
  121807. routes.forEach(function (route) {
  121808. addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);
  121809. });
  121810. // ensure wildcard routes are always at the end
  121811. for (var i = 0, l = pathList.length; i < l; i++) {
  121812. if (pathList[i] === '*') {
  121813. pathList.push(pathList.splice(i, 1)[0]);
  121814. l--;
  121815. i--;
  121816. }
  121817. }
  121818. if (true) {
  121819. // warn if routes do not include leading slashes
  121820. var found = pathList
  121821. // check for missing leading slash
  121822. .filter(function (path) { return path && path.charAt(0) !== '*' && path.charAt(0) !== '/'; });
  121823. if (found.length > 0) {
  121824. var pathNames = found.map(function (path) { return ("- " + path); }).join('\n');
  121825. warn(false, ("Non-nested routes must include a leading slash character. Fix the following routes: \n" + pathNames));
  121826. }
  121827. }
  121828. return {
  121829. pathList: pathList,
  121830. pathMap: pathMap,
  121831. nameMap: nameMap
  121832. }
  121833. }
  121834. function addRouteRecord (
  121835. pathList,
  121836. pathMap,
  121837. nameMap,
  121838. route,
  121839. parent,
  121840. matchAs
  121841. ) {
  121842. var path = route.path;
  121843. var name = route.name;
  121844. if (true) {
  121845. assert(path != null, "\"path\" is required in a route configuration.");
  121846. assert(
  121847. typeof route.component !== 'string',
  121848. "route config \"component\" for path: " + (String(
  121849. path || name
  121850. )) + " cannot be a " + "string id. Use an actual component instead."
  121851. );
  121852. warn(
  121853. // eslint-disable-next-line no-control-regex
  121854. !/[^\u0000-\u007F]+/.test(path),
  121855. "Route with path \"" + path + "\" contains unencoded characters, make sure " +
  121856. "your path is correctly encoded before passing it to the router. Use " +
  121857. "encodeURI to encode static segments of your path."
  121858. );
  121859. }
  121860. var pathToRegexpOptions =
  121861. route.pathToRegexpOptions || {};
  121862. var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);
  121863. if (typeof route.caseSensitive === 'boolean') {
  121864. pathToRegexpOptions.sensitive = route.caseSensitive;
  121865. }
  121866. var record = {
  121867. path: normalizedPath,
  121868. regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
  121869. components: route.components || { default: route.component },
  121870. alias: route.alias
  121871. ? typeof route.alias === 'string'
  121872. ? [route.alias]
  121873. : route.alias
  121874. : [],
  121875. instances: {},
  121876. enteredCbs: {},
  121877. name: name,
  121878. parent: parent,
  121879. matchAs: matchAs,
  121880. redirect: route.redirect,
  121881. beforeEnter: route.beforeEnter,
  121882. meta: route.meta || {},
  121883. props:
  121884. route.props == null
  121885. ? {}
  121886. : route.components
  121887. ? route.props
  121888. : { default: route.props }
  121889. };
  121890. if (route.children) {
  121891. // Warn if route is named, does not redirect and has a default child route.
  121892. // If users navigate to this route by name, the default child will
  121893. // not be rendered (GH Issue #629)
  121894. if (true) {
  121895. if (
  121896. route.name &&
  121897. !route.redirect &&
  121898. route.children.some(function (child) { return /^\/?$/.test(child.path); })
  121899. ) {
  121900. warn(
  121901. false,
  121902. "Named Route '" + (route.name) + "' has a default child route. " +
  121903. "When navigating to this named route (:to=\"{name: '" + (route.name) + "'}\"), " +
  121904. "the default child route will not be rendered. Remove the name from " +
  121905. "this route and use the name of the default child route for named " +
  121906. "links instead."
  121907. );
  121908. }
  121909. }
  121910. route.children.forEach(function (child) {
  121911. var childMatchAs = matchAs
  121912. ? cleanPath((matchAs + "/" + (child.path)))
  121913. : undefined;
  121914. addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);
  121915. });
  121916. }
  121917. if (!pathMap[record.path]) {
  121918. pathList.push(record.path);
  121919. pathMap[record.path] = record;
  121920. }
  121921. if (route.alias !== undefined) {
  121922. var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];
  121923. for (var i = 0; i < aliases.length; ++i) {
  121924. var alias = aliases[i];
  121925. if ( true && alias === path) {
  121926. warn(
  121927. false,
  121928. ("Found an alias with the same value as the path: \"" + path + "\". You have to remove that alias. It will be ignored in development.")
  121929. );
  121930. // skip in dev to make it work
  121931. continue
  121932. }
  121933. var aliasRoute = {
  121934. path: alias,
  121935. children: route.children
  121936. };
  121937. addRouteRecord(
  121938. pathList,
  121939. pathMap,
  121940. nameMap,
  121941. aliasRoute,
  121942. parent,
  121943. record.path || '/' // matchAs
  121944. );
  121945. }
  121946. }
  121947. if (name) {
  121948. if (!nameMap[name]) {
  121949. nameMap[name] = record;
  121950. } else if ( true && !matchAs) {
  121951. warn(
  121952. false,
  121953. "Duplicate named routes definition: " +
  121954. "{ name: \"" + name + "\", path: \"" + (record.path) + "\" }"
  121955. );
  121956. }
  121957. }
  121958. }
  121959. function compileRouteRegex (
  121960. path,
  121961. pathToRegexpOptions
  121962. ) {
  121963. var regex = pathToRegexp_1(path, [], pathToRegexpOptions);
  121964. if (true) {
  121965. var keys = Object.create(null);
  121966. regex.keys.forEach(function (key) {
  121967. warn(
  121968. !keys[key.name],
  121969. ("Duplicate param keys in route with path: \"" + path + "\"")
  121970. );
  121971. keys[key.name] = true;
  121972. });
  121973. }
  121974. return regex
  121975. }
  121976. function normalizePath (
  121977. path,
  121978. parent,
  121979. strict
  121980. ) {
  121981. if (!strict) { path = path.replace(/\/$/, ''); }
  121982. if (path[0] === '/') { return path }
  121983. if (parent == null) { return path }
  121984. return cleanPath(((parent.path) + "/" + path))
  121985. }
  121986. /* */
  121987. function createMatcher (
  121988. routes,
  121989. router
  121990. ) {
  121991. var ref = createRouteMap(routes);
  121992. var pathList = ref.pathList;
  121993. var pathMap = ref.pathMap;
  121994. var nameMap = ref.nameMap;
  121995. function addRoutes (routes) {
  121996. createRouteMap(routes, pathList, pathMap, nameMap);
  121997. }
  121998. function addRoute (parentOrRoute, route) {
  121999. var parent = (typeof parentOrRoute !== 'object') ? nameMap[parentOrRoute] : undefined;
  122000. // $flow-disable-line
  122001. createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
  122002. // add aliases of parent
  122003. if (parent && parent.alias.length) {
  122004. createRouteMap(
  122005. // $flow-disable-line route is defined if parent is
  122006. parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),
  122007. pathList,
  122008. pathMap,
  122009. nameMap,
  122010. parent
  122011. );
  122012. }
  122013. }
  122014. function getRoutes () {
  122015. return pathList.map(function (path) { return pathMap[path]; })
  122016. }
  122017. function match (
  122018. raw,
  122019. currentRoute,
  122020. redirectedFrom
  122021. ) {
  122022. var location = normalizeLocation(raw, currentRoute, false, router);
  122023. var name = location.name;
  122024. if (name) {
  122025. var record = nameMap[name];
  122026. if (true) {
  122027. warn(record, ("Route with name '" + name + "' does not exist"));
  122028. }
  122029. if (!record) { return _createRoute(null, location) }
  122030. var paramNames = record.regex.keys
  122031. .filter(function (key) { return !key.optional; })
  122032. .map(function (key) { return key.name; });
  122033. if (typeof location.params !== 'object') {
  122034. location.params = {};
  122035. }
  122036. if (currentRoute && typeof currentRoute.params === 'object') {
  122037. for (var key in currentRoute.params) {
  122038. if (!(key in location.params) && paramNames.indexOf(key) > -1) {
  122039. location.params[key] = currentRoute.params[key];
  122040. }
  122041. }
  122042. }
  122043. location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
  122044. return _createRoute(record, location, redirectedFrom)
  122045. } else if (location.path) {
  122046. location.params = {};
  122047. for (var i = 0; i < pathList.length; i++) {
  122048. var path = pathList[i];
  122049. var record$1 = pathMap[path];
  122050. if (matchRoute(record$1.regex, location.path, location.params)) {
  122051. return _createRoute(record$1, location, redirectedFrom)
  122052. }
  122053. }
  122054. }
  122055. // no match
  122056. return _createRoute(null, location)
  122057. }
  122058. function redirect (
  122059. record,
  122060. location
  122061. ) {
  122062. var originalRedirect = record.redirect;
  122063. var redirect = typeof originalRedirect === 'function'
  122064. ? originalRedirect(createRoute(record, location, null, router))
  122065. : originalRedirect;
  122066. if (typeof redirect === 'string') {
  122067. redirect = { path: redirect };
  122068. }
  122069. if (!redirect || typeof redirect !== 'object') {
  122070. if (true) {
  122071. warn(
  122072. false, ("invalid redirect option: " + (JSON.stringify(redirect)))
  122073. );
  122074. }
  122075. return _createRoute(null, location)
  122076. }
  122077. var re = redirect;
  122078. var name = re.name;
  122079. var path = re.path;
  122080. var query = location.query;
  122081. var hash = location.hash;
  122082. var params = location.params;
  122083. query = re.hasOwnProperty('query') ? re.query : query;
  122084. hash = re.hasOwnProperty('hash') ? re.hash : hash;
  122085. params = re.hasOwnProperty('params') ? re.params : params;
  122086. if (name) {
  122087. // resolved named direct
  122088. var targetRecord = nameMap[name];
  122089. if (true) {
  122090. assert(targetRecord, ("redirect failed: named route \"" + name + "\" not found."));
  122091. }
  122092. return match({
  122093. _normalized: true,
  122094. name: name,
  122095. query: query,
  122096. hash: hash,
  122097. params: params
  122098. }, undefined, location)
  122099. } else if (path) {
  122100. // 1. resolve relative redirect
  122101. var rawPath = resolveRecordPath(path, record);
  122102. // 2. resolve params
  122103. var resolvedPath = fillParams(rawPath, params, ("redirect route with path \"" + rawPath + "\""));
  122104. // 3. rematch with existing query and hash
  122105. return match({
  122106. _normalized: true,
  122107. path: resolvedPath,
  122108. query: query,
  122109. hash: hash
  122110. }, undefined, location)
  122111. } else {
  122112. if (true) {
  122113. warn(false, ("invalid redirect option: " + (JSON.stringify(redirect))));
  122114. }
  122115. return _createRoute(null, location)
  122116. }
  122117. }
  122118. function alias (
  122119. record,
  122120. location,
  122121. matchAs
  122122. ) {
  122123. var aliasedPath = fillParams(matchAs, location.params, ("aliased route with path \"" + matchAs + "\""));
  122124. var aliasedMatch = match({
  122125. _normalized: true,
  122126. path: aliasedPath
  122127. });
  122128. if (aliasedMatch) {
  122129. var matched = aliasedMatch.matched;
  122130. var aliasedRecord = matched[matched.length - 1];
  122131. location.params = aliasedMatch.params;
  122132. return _createRoute(aliasedRecord, location)
  122133. }
  122134. return _createRoute(null, location)
  122135. }
  122136. function _createRoute (
  122137. record,
  122138. location,
  122139. redirectedFrom
  122140. ) {
  122141. if (record && record.redirect) {
  122142. return redirect(record, redirectedFrom || location)
  122143. }
  122144. if (record && record.matchAs) {
  122145. return alias(record, location, record.matchAs)
  122146. }
  122147. return createRoute(record, location, redirectedFrom, router)
  122148. }
  122149. return {
  122150. match: match,
  122151. addRoute: addRoute,
  122152. getRoutes: getRoutes,
  122153. addRoutes: addRoutes
  122154. }
  122155. }
  122156. function matchRoute (
  122157. regex,
  122158. path,
  122159. params
  122160. ) {
  122161. var m = path.match(regex);
  122162. if (!m) {
  122163. return false
  122164. } else if (!params) {
  122165. return true
  122166. }
  122167. for (var i = 1, len = m.length; i < len; ++i) {
  122168. var key = regex.keys[i - 1];
  122169. if (key) {
  122170. // Fix #1994: using * with props: true generates a param named 0
  122171. params[key.name || 'pathMatch'] = typeof m[i] === 'string' ? decode(m[i]) : m[i];
  122172. }
  122173. }
  122174. return true
  122175. }
  122176. function resolveRecordPath (path, record) {
  122177. return resolvePath(path, record.parent ? record.parent.path : '/', true)
  122178. }
  122179. /* */
  122180. // use User Timing api (if present) for more accurate key precision
  122181. var Time =
  122182. inBrowser && window.performance && window.performance.now
  122183. ? window.performance
  122184. : Date;
  122185. function genStateKey () {
  122186. return Time.now().toFixed(3)
  122187. }
  122188. var _key = genStateKey();
  122189. function getStateKey () {
  122190. return _key
  122191. }
  122192. function setStateKey (key) {
  122193. return (_key = key)
  122194. }
  122195. /* */
  122196. var positionStore = Object.create(null);
  122197. function setupScroll () {
  122198. // Prevent browser scroll behavior on History popstate
  122199. if ('scrollRestoration' in window.history) {
  122200. window.history.scrollRestoration = 'manual';
  122201. }
  122202. // Fix for #1585 for Firefox
  122203. // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678
  122204. // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with
  122205. // window.location.protocol + '//' + window.location.host
  122206. // location.host contains the port and location.hostname doesn't
  122207. var protocolAndPath = window.location.protocol + '//' + window.location.host;
  122208. var absolutePath = window.location.href.replace(protocolAndPath, '');
  122209. // preserve existing history state as it could be overriden by the user
  122210. var stateCopy = extend({}, window.history.state);
  122211. stateCopy.key = getStateKey();
  122212. window.history.replaceState(stateCopy, '', absolutePath);
  122213. window.addEventListener('popstate', handlePopState);
  122214. return function () {
  122215. window.removeEventListener('popstate', handlePopState);
  122216. }
  122217. }
  122218. function handleScroll (
  122219. router,
  122220. to,
  122221. from,
  122222. isPop
  122223. ) {
  122224. if (!router.app) {
  122225. return
  122226. }
  122227. var behavior = router.options.scrollBehavior;
  122228. if (!behavior) {
  122229. return
  122230. }
  122231. if (true) {
  122232. assert(typeof behavior === 'function', "scrollBehavior must be a function");
  122233. }
  122234. // wait until re-render finishes before scrolling
  122235. router.app.$nextTick(function () {
  122236. var position = getScrollPosition();
  122237. var shouldScroll = behavior.call(
  122238. router,
  122239. to,
  122240. from,
  122241. isPop ? position : null
  122242. );
  122243. if (!shouldScroll) {
  122244. return
  122245. }
  122246. if (typeof shouldScroll.then === 'function') {
  122247. shouldScroll
  122248. .then(function (shouldScroll) {
  122249. scrollToPosition((shouldScroll), position);
  122250. })
  122251. .catch(function (err) {
  122252. if (true) {
  122253. assert(false, err.toString());
  122254. }
  122255. });
  122256. } else {
  122257. scrollToPosition(shouldScroll, position);
  122258. }
  122259. });
  122260. }
  122261. function saveScrollPosition () {
  122262. var key = getStateKey();
  122263. if (key) {
  122264. positionStore[key] = {
  122265. x: window.pageXOffset,
  122266. y: window.pageYOffset
  122267. };
  122268. }
  122269. }
  122270. function handlePopState (e) {
  122271. saveScrollPosition();
  122272. if (e.state && e.state.key) {
  122273. setStateKey(e.state.key);
  122274. }
  122275. }
  122276. function getScrollPosition () {
  122277. var key = getStateKey();
  122278. if (key) {
  122279. return positionStore[key]
  122280. }
  122281. }
  122282. function getElementPosition (el, offset) {
  122283. var docEl = document.documentElement;
  122284. var docRect = docEl.getBoundingClientRect();
  122285. var elRect = el.getBoundingClientRect();
  122286. return {
  122287. x: elRect.left - docRect.left - offset.x,
  122288. y: elRect.top - docRect.top - offset.y
  122289. }
  122290. }
  122291. function isValidPosition (obj) {
  122292. return isNumber(obj.x) || isNumber(obj.y)
  122293. }
  122294. function normalizePosition (obj) {
  122295. return {
  122296. x: isNumber(obj.x) ? obj.x : window.pageXOffset,
  122297. y: isNumber(obj.y) ? obj.y : window.pageYOffset
  122298. }
  122299. }
  122300. function normalizeOffset (obj) {
  122301. return {
  122302. x: isNumber(obj.x) ? obj.x : 0,
  122303. y: isNumber(obj.y) ? obj.y : 0
  122304. }
  122305. }
  122306. function isNumber (v) {
  122307. return typeof v === 'number'
  122308. }
  122309. var hashStartsWithNumberRE = /^#\d/;
  122310. function scrollToPosition (shouldScroll, position) {
  122311. var isObject = typeof shouldScroll === 'object';
  122312. if (isObject && typeof shouldScroll.selector === 'string') {
  122313. // getElementById would still fail if the selector contains a more complicated query like #main[data-attr]
  122314. // but at the same time, it doesn't make much sense to select an element with an id and an extra selector
  122315. var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line
  122316. ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line
  122317. : document.querySelector(shouldScroll.selector);
  122318. if (el) {
  122319. var offset =
  122320. shouldScroll.offset && typeof shouldScroll.offset === 'object'
  122321. ? shouldScroll.offset
  122322. : {};
  122323. offset = normalizeOffset(offset);
  122324. position = getElementPosition(el, offset);
  122325. } else if (isValidPosition(shouldScroll)) {
  122326. position = normalizePosition(shouldScroll);
  122327. }
  122328. } else if (isObject && isValidPosition(shouldScroll)) {
  122329. position = normalizePosition(shouldScroll);
  122330. }
  122331. if (position) {
  122332. // $flow-disable-line
  122333. if ('scrollBehavior' in document.documentElement.style) {
  122334. window.scrollTo({
  122335. left: position.x,
  122336. top: position.y,
  122337. // $flow-disable-line
  122338. behavior: shouldScroll.behavior
  122339. });
  122340. } else {
  122341. window.scrollTo(position.x, position.y);
  122342. }
  122343. }
  122344. }
  122345. /* */
  122346. var supportsPushState =
  122347. inBrowser &&
  122348. (function () {
  122349. var ua = window.navigator.userAgent;
  122350. if (
  122351. (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&
  122352. ua.indexOf('Mobile Safari') !== -1 &&
  122353. ua.indexOf('Chrome') === -1 &&
  122354. ua.indexOf('Windows Phone') === -1
  122355. ) {
  122356. return false
  122357. }
  122358. return window.history && typeof window.history.pushState === 'function'
  122359. })();
  122360. function pushState (url, replace) {
  122361. saveScrollPosition();
  122362. // try...catch the pushState call to get around Safari
  122363. // DOM Exception 18 where it limits to 100 pushState calls
  122364. var history = window.history;
  122365. try {
  122366. if (replace) {
  122367. // preserve existing history state as it could be overriden by the user
  122368. var stateCopy = extend({}, history.state);
  122369. stateCopy.key = getStateKey();
  122370. history.replaceState(stateCopy, '', url);
  122371. } else {
  122372. history.pushState({ key: setStateKey(genStateKey()) }, '', url);
  122373. }
  122374. } catch (e) {
  122375. window.location[replace ? 'replace' : 'assign'](url);
  122376. }
  122377. }
  122378. function replaceState (url) {
  122379. pushState(url, true);
  122380. }
  122381. // When changing thing, also edit router.d.ts
  122382. var NavigationFailureType = {
  122383. redirected: 2,
  122384. aborted: 4,
  122385. cancelled: 8,
  122386. duplicated: 16
  122387. };
  122388. function createNavigationRedirectedError (from, to) {
  122389. return createRouterError(
  122390. from,
  122391. to,
  122392. NavigationFailureType.redirected,
  122393. ("Redirected when going from \"" + (from.fullPath) + "\" to \"" + (stringifyRoute(
  122394. to
  122395. )) + "\" via a navigation guard.")
  122396. )
  122397. }
  122398. function createNavigationDuplicatedError (from, to) {
  122399. var error = createRouterError(
  122400. from,
  122401. to,
  122402. NavigationFailureType.duplicated,
  122403. ("Avoided redundant navigation to current location: \"" + (from.fullPath) + "\".")
  122404. );
  122405. // backwards compatible with the first introduction of Errors
  122406. error.name = 'NavigationDuplicated';
  122407. return error
  122408. }
  122409. function createNavigationCancelledError (from, to) {
  122410. return createRouterError(
  122411. from,
  122412. to,
  122413. NavigationFailureType.cancelled,
  122414. ("Navigation cancelled from \"" + (from.fullPath) + "\" to \"" + (to.fullPath) + "\" with a new navigation.")
  122415. )
  122416. }
  122417. function createNavigationAbortedError (from, to) {
  122418. return createRouterError(
  122419. from,
  122420. to,
  122421. NavigationFailureType.aborted,
  122422. ("Navigation aborted from \"" + (from.fullPath) + "\" to \"" + (to.fullPath) + "\" via a navigation guard.")
  122423. )
  122424. }
  122425. function createRouterError (from, to, type, message) {
  122426. var error = new Error(message);
  122427. error._isRouter = true;
  122428. error.from = from;
  122429. error.to = to;
  122430. error.type = type;
  122431. return error
  122432. }
  122433. var propertiesToLog = ['params', 'query', 'hash'];
  122434. function stringifyRoute (to) {
  122435. if (typeof to === 'string') { return to }
  122436. if ('path' in to) { return to.path }
  122437. var location = {};
  122438. propertiesToLog.forEach(function (key) {
  122439. if (key in to) { location[key] = to[key]; }
  122440. });
  122441. return JSON.stringify(location, null, 2)
  122442. }
  122443. function isError (err) {
  122444. return Object.prototype.toString.call(err).indexOf('Error') > -1
  122445. }
  122446. function isNavigationFailure (err, errorType) {
  122447. return (
  122448. isError(err) &&
  122449. err._isRouter &&
  122450. (errorType == null || err.type === errorType)
  122451. )
  122452. }
  122453. /* */
  122454. function runQueue (queue, fn, cb) {
  122455. var step = function (index) {
  122456. if (index >= queue.length) {
  122457. cb();
  122458. } else {
  122459. if (queue[index]) {
  122460. fn(queue[index], function () {
  122461. step(index + 1);
  122462. });
  122463. } else {
  122464. step(index + 1);
  122465. }
  122466. }
  122467. };
  122468. step(0);
  122469. }
  122470. /* */
  122471. function resolveAsyncComponents (matched) {
  122472. return function (to, from, next) {
  122473. var hasAsync = false;
  122474. var pending = 0;
  122475. var error = null;
  122476. flatMapComponents(matched, function (def, _, match, key) {
  122477. // if it's a function and doesn't have cid attached,
  122478. // assume it's an async component resolve function.
  122479. // we are not using Vue's default async resolving mechanism because
  122480. // we want to halt the navigation until the incoming component has been
  122481. // resolved.
  122482. if (typeof def === 'function' && def.cid === undefined) {
  122483. hasAsync = true;
  122484. pending++;
  122485. var resolve = once(function (resolvedDef) {
  122486. if (isESModule(resolvedDef)) {
  122487. resolvedDef = resolvedDef.default;
  122488. }
  122489. // save resolved on async factory in case it's used elsewhere
  122490. def.resolved = typeof resolvedDef === 'function'
  122491. ? resolvedDef
  122492. : _Vue.extend(resolvedDef);
  122493. match.components[key] = resolvedDef;
  122494. pending--;
  122495. if (pending <= 0) {
  122496. next();
  122497. }
  122498. });
  122499. var reject = once(function (reason) {
  122500. var msg = "Failed to resolve async component " + key + ": " + reason;
  122501. true && warn(false, msg);
  122502. if (!error) {
  122503. error = isError(reason)
  122504. ? reason
  122505. : new Error(msg);
  122506. next(error);
  122507. }
  122508. });
  122509. var res;
  122510. try {
  122511. res = def(resolve, reject);
  122512. } catch (e) {
  122513. reject(e);
  122514. }
  122515. if (res) {
  122516. if (typeof res.then === 'function') {
  122517. res.then(resolve, reject);
  122518. } else {
  122519. // new syntax in Vue 2.3
  122520. var comp = res.component;
  122521. if (comp && typeof comp.then === 'function') {
  122522. comp.then(resolve, reject);
  122523. }
  122524. }
  122525. }
  122526. }
  122527. });
  122528. if (!hasAsync) { next(); }
  122529. }
  122530. }
  122531. function flatMapComponents (
  122532. matched,
  122533. fn
  122534. ) {
  122535. return flatten(matched.map(function (m) {
  122536. return Object.keys(m.components).map(function (key) { return fn(
  122537. m.components[key],
  122538. m.instances[key],
  122539. m, key
  122540. ); })
  122541. }))
  122542. }
  122543. function flatten (arr) {
  122544. return Array.prototype.concat.apply([], arr)
  122545. }
  122546. var hasSymbol =
  122547. typeof Symbol === 'function' &&
  122548. typeof Symbol.toStringTag === 'symbol';
  122549. function isESModule (obj) {
  122550. return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')
  122551. }
  122552. // in Webpack 2, require.ensure now also returns a Promise
  122553. // so the resolve/reject functions may get called an extra time
  122554. // if the user uses an arrow function shorthand that happens to
  122555. // return that Promise.
  122556. function once (fn) {
  122557. var called = false;
  122558. return function () {
  122559. var args = [], len = arguments.length;
  122560. while ( len-- ) args[ len ] = arguments[ len ];
  122561. if (called) { return }
  122562. called = true;
  122563. return fn.apply(this, args)
  122564. }
  122565. }
  122566. /* */
  122567. var History = function History (router, base) {
  122568. this.router = router;
  122569. this.base = normalizeBase(base);
  122570. // start with a route object that stands for "nowhere"
  122571. this.current = START;
  122572. this.pending = null;
  122573. this.ready = false;
  122574. this.readyCbs = [];
  122575. this.readyErrorCbs = [];
  122576. this.errorCbs = [];
  122577. this.listeners = [];
  122578. };
  122579. History.prototype.listen = function listen (cb) {
  122580. this.cb = cb;
  122581. };
  122582. History.prototype.onReady = function onReady (cb, errorCb) {
  122583. if (this.ready) {
  122584. cb();
  122585. } else {
  122586. this.readyCbs.push(cb);
  122587. if (errorCb) {
  122588. this.readyErrorCbs.push(errorCb);
  122589. }
  122590. }
  122591. };
  122592. History.prototype.onError = function onError (errorCb) {
  122593. this.errorCbs.push(errorCb);
  122594. };
  122595. History.prototype.transitionTo = function transitionTo (
  122596. location,
  122597. onComplete,
  122598. onAbort
  122599. ) {
  122600. var this$1$1 = this;
  122601. var route;
  122602. // catch redirect option https://github.com/vuejs/vue-router/issues/3201
  122603. try {
  122604. route = this.router.match(location, this.current);
  122605. } catch (e) {
  122606. this.errorCbs.forEach(function (cb) {
  122607. cb(e);
  122608. });
  122609. // Exception should still be thrown
  122610. throw e
  122611. }
  122612. var prev = this.current;
  122613. this.confirmTransition(
  122614. route,
  122615. function () {
  122616. this$1$1.updateRoute(route);
  122617. onComplete && onComplete(route);
  122618. this$1$1.ensureURL();
  122619. this$1$1.router.afterHooks.forEach(function (hook) {
  122620. hook && hook(route, prev);
  122621. });
  122622. // fire ready cbs once
  122623. if (!this$1$1.ready) {
  122624. this$1$1.ready = true;
  122625. this$1$1.readyCbs.forEach(function (cb) {
  122626. cb(route);
  122627. });
  122628. }
  122629. },
  122630. function (err) {
  122631. if (onAbort) {
  122632. onAbort(err);
  122633. }
  122634. if (err && !this$1$1.ready) {
  122635. // Initial redirection should not mark the history as ready yet
  122636. // because it's triggered by the redirection instead
  122637. // https://github.com/vuejs/vue-router/issues/3225
  122638. // https://github.com/vuejs/vue-router/issues/3331
  122639. if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {
  122640. this$1$1.ready = true;
  122641. this$1$1.readyErrorCbs.forEach(function (cb) {
  122642. cb(err);
  122643. });
  122644. }
  122645. }
  122646. }
  122647. );
  122648. };
  122649. History.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {
  122650. var this$1$1 = this;
  122651. var current = this.current;
  122652. this.pending = route;
  122653. var abort = function (err) {
  122654. // changed after adding errors with
  122655. // https://github.com/vuejs/vue-router/pull/3047 before that change,
  122656. // redirect and aborted navigation would produce an err == null
  122657. if (!isNavigationFailure(err) && isError(err)) {
  122658. if (this$1$1.errorCbs.length) {
  122659. this$1$1.errorCbs.forEach(function (cb) {
  122660. cb(err);
  122661. });
  122662. } else {
  122663. if (true) {
  122664. warn(false, 'uncaught error during route navigation:');
  122665. }
  122666. console.error(err);
  122667. }
  122668. }
  122669. onAbort && onAbort(err);
  122670. };
  122671. var lastRouteIndex = route.matched.length - 1;
  122672. var lastCurrentIndex = current.matched.length - 1;
  122673. if (
  122674. isSameRoute(route, current) &&
  122675. // in the case the route map has been dynamically appended to
  122676. lastRouteIndex === lastCurrentIndex &&
  122677. route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]
  122678. ) {
  122679. this.ensureURL();
  122680. if (route.hash) {
  122681. handleScroll(this.router, current, route, false);
  122682. }
  122683. return abort(createNavigationDuplicatedError(current, route))
  122684. }
  122685. var ref = resolveQueue(
  122686. this.current.matched,
  122687. route.matched
  122688. );
  122689. var updated = ref.updated;
  122690. var deactivated = ref.deactivated;
  122691. var activated = ref.activated;
  122692. var queue = [].concat(
  122693. // in-component leave guards
  122694. extractLeaveGuards(deactivated),
  122695. // global before hooks
  122696. this.router.beforeHooks,
  122697. // in-component update hooks
  122698. extractUpdateHooks(updated),
  122699. // in-config enter guards
  122700. activated.map(function (m) { return m.beforeEnter; }),
  122701. // async components
  122702. resolveAsyncComponents(activated)
  122703. );
  122704. var iterator = function (hook, next) {
  122705. if (this$1$1.pending !== route) {
  122706. return abort(createNavigationCancelledError(current, route))
  122707. }
  122708. try {
  122709. hook(route, current, function (to) {
  122710. if (to === false) {
  122711. // next(false) -> abort navigation, ensure current URL
  122712. this$1$1.ensureURL(true);
  122713. abort(createNavigationAbortedError(current, route));
  122714. } else if (isError(to)) {
  122715. this$1$1.ensureURL(true);
  122716. abort(to);
  122717. } else if (
  122718. typeof to === 'string' ||
  122719. (typeof to === 'object' &&
  122720. (typeof to.path === 'string' || typeof to.name === 'string'))
  122721. ) {
  122722. // next('/') or next({ path: '/' }) -> redirect
  122723. abort(createNavigationRedirectedError(current, route));
  122724. if (typeof to === 'object' && to.replace) {
  122725. this$1$1.replace(to);
  122726. } else {
  122727. this$1$1.push(to);
  122728. }
  122729. } else {
  122730. // confirm transition and pass on the value
  122731. next(to);
  122732. }
  122733. });
  122734. } catch (e) {
  122735. abort(e);
  122736. }
  122737. };
  122738. runQueue(queue, iterator, function () {
  122739. // wait until async components are resolved before
  122740. // extracting in-component enter guards
  122741. var enterGuards = extractEnterGuards(activated);
  122742. var queue = enterGuards.concat(this$1$1.router.resolveHooks);
  122743. runQueue(queue, iterator, function () {
  122744. if (this$1$1.pending !== route) {
  122745. return abort(createNavigationCancelledError(current, route))
  122746. }
  122747. this$1$1.pending = null;
  122748. onComplete(route);
  122749. if (this$1$1.router.app) {
  122750. this$1$1.router.app.$nextTick(function () {
  122751. handleRouteEntered(route);
  122752. });
  122753. }
  122754. });
  122755. });
  122756. };
  122757. History.prototype.updateRoute = function updateRoute (route) {
  122758. this.current = route;
  122759. this.cb && this.cb(route);
  122760. };
  122761. History.prototype.setupListeners = function setupListeners () {
  122762. // Default implementation is empty
  122763. };
  122764. History.prototype.teardown = function teardown () {
  122765. // clean up event listeners
  122766. // https://github.com/vuejs/vue-router/issues/2341
  122767. this.listeners.forEach(function (cleanupListener) {
  122768. cleanupListener();
  122769. });
  122770. this.listeners = [];
  122771. // reset current history route
  122772. // https://github.com/vuejs/vue-router/issues/3294
  122773. this.current = START;
  122774. this.pending = null;
  122775. };
  122776. function normalizeBase (base) {
  122777. if (!base) {
  122778. if (inBrowser) {
  122779. // respect <base> tag
  122780. var baseEl = document.querySelector('base');
  122781. base = (baseEl && baseEl.getAttribute('href')) || '/';
  122782. // strip full URL origin
  122783. base = base.replace(/^https?:\/\/[^\/]+/, '');
  122784. } else {
  122785. base = '/';
  122786. }
  122787. }
  122788. // make sure there's the starting slash
  122789. if (base.charAt(0) !== '/') {
  122790. base = '/' + base;
  122791. }
  122792. // remove trailing slash
  122793. return base.replace(/\/$/, '')
  122794. }
  122795. function resolveQueue (
  122796. current,
  122797. next
  122798. ) {
  122799. var i;
  122800. var max = Math.max(current.length, next.length);
  122801. for (i = 0; i < max; i++) {
  122802. if (current[i] !== next[i]) {
  122803. break
  122804. }
  122805. }
  122806. return {
  122807. updated: next.slice(0, i),
  122808. activated: next.slice(i),
  122809. deactivated: current.slice(i)
  122810. }
  122811. }
  122812. function extractGuards (
  122813. records,
  122814. name,
  122815. bind,
  122816. reverse
  122817. ) {
  122818. var guards = flatMapComponents(records, function (def, instance, match, key) {
  122819. var guard = extractGuard(def, name);
  122820. if (guard) {
  122821. return Array.isArray(guard)
  122822. ? guard.map(function (guard) { return bind(guard, instance, match, key); })
  122823. : bind(guard, instance, match, key)
  122824. }
  122825. });
  122826. return flatten(reverse ? guards.reverse() : guards)
  122827. }
  122828. function extractGuard (
  122829. def,
  122830. key
  122831. ) {
  122832. if (typeof def !== 'function') {
  122833. // extend now so that global mixins are applied.
  122834. def = _Vue.extend(def);
  122835. }
  122836. return def.options[key]
  122837. }
  122838. function extractLeaveGuards (deactivated) {
  122839. return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)
  122840. }
  122841. function extractUpdateHooks (updated) {
  122842. return extractGuards(updated, 'beforeRouteUpdate', bindGuard)
  122843. }
  122844. function bindGuard (guard, instance) {
  122845. if (instance) {
  122846. return function boundRouteGuard () {
  122847. return guard.apply(instance, arguments)
  122848. }
  122849. }
  122850. }
  122851. function extractEnterGuards (
  122852. activated
  122853. ) {
  122854. return extractGuards(
  122855. activated,
  122856. 'beforeRouteEnter',
  122857. function (guard, _, match, key) {
  122858. return bindEnterGuard(guard, match, key)
  122859. }
  122860. )
  122861. }
  122862. function bindEnterGuard (
  122863. guard,
  122864. match,
  122865. key
  122866. ) {
  122867. return function routeEnterGuard (to, from, next) {
  122868. return guard(to, from, function (cb) {
  122869. if (typeof cb === 'function') {
  122870. if (!match.enteredCbs[key]) {
  122871. match.enteredCbs[key] = [];
  122872. }
  122873. match.enteredCbs[key].push(cb);
  122874. }
  122875. next(cb);
  122876. })
  122877. }
  122878. }
  122879. /* */
  122880. var HTML5History = /*@__PURE__*/(function (History) {
  122881. function HTML5History (router, base) {
  122882. History.call(this, router, base);
  122883. this._startLocation = getLocation(this.base);
  122884. }
  122885. if ( History ) HTML5History.__proto__ = History;
  122886. HTML5History.prototype = Object.create( History && History.prototype );
  122887. HTML5History.prototype.constructor = HTML5History;
  122888. HTML5History.prototype.setupListeners = function setupListeners () {
  122889. var this$1$1 = this;
  122890. if (this.listeners.length > 0) {
  122891. return
  122892. }
  122893. var router = this.router;
  122894. var expectScroll = router.options.scrollBehavior;
  122895. var supportsScroll = supportsPushState && expectScroll;
  122896. if (supportsScroll) {
  122897. this.listeners.push(setupScroll());
  122898. }
  122899. var handleRoutingEvent = function () {
  122900. var current = this$1$1.current;
  122901. // Avoiding first `popstate` event dispatched in some browsers but first
  122902. // history route not updated since async guard at the same time.
  122903. var location = getLocation(this$1$1.base);
  122904. if (this$1$1.current === START && location === this$1$1._startLocation) {
  122905. return
  122906. }
  122907. this$1$1.transitionTo(location, function (route) {
  122908. if (supportsScroll) {
  122909. handleScroll(router, route, current, true);
  122910. }
  122911. });
  122912. };
  122913. window.addEventListener('popstate', handleRoutingEvent);
  122914. this.listeners.push(function () {
  122915. window.removeEventListener('popstate', handleRoutingEvent);
  122916. });
  122917. };
  122918. HTML5History.prototype.go = function go (n) {
  122919. window.history.go(n);
  122920. };
  122921. HTML5History.prototype.push = function push (location, onComplete, onAbort) {
  122922. var this$1$1 = this;
  122923. var ref = this;
  122924. var fromRoute = ref.current;
  122925. this.transitionTo(location, function (route) {
  122926. pushState(cleanPath(this$1$1.base + route.fullPath));
  122927. handleScroll(this$1$1.router, route, fromRoute, false);
  122928. onComplete && onComplete(route);
  122929. }, onAbort);
  122930. };
  122931. HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {
  122932. var this$1$1 = this;
  122933. var ref = this;
  122934. var fromRoute = ref.current;
  122935. this.transitionTo(location, function (route) {
  122936. replaceState(cleanPath(this$1$1.base + route.fullPath));
  122937. handleScroll(this$1$1.router, route, fromRoute, false);
  122938. onComplete && onComplete(route);
  122939. }, onAbort);
  122940. };
  122941. HTML5History.prototype.ensureURL = function ensureURL (push) {
  122942. if (getLocation(this.base) !== this.current.fullPath) {
  122943. var current = cleanPath(this.base + this.current.fullPath);
  122944. push ? pushState(current) : replaceState(current);
  122945. }
  122946. };
  122947. HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {
  122948. return getLocation(this.base)
  122949. };
  122950. return HTML5History;
  122951. }(History));
  122952. function getLocation (base) {
  122953. var path = window.location.pathname;
  122954. var pathLowerCase = path.toLowerCase();
  122955. var baseLowerCase = base.toLowerCase();
  122956. // base="/a" shouldn't turn path="/app" into "/a/pp"
  122957. // https://github.com/vuejs/vue-router/issues/3555
  122958. // so we ensure the trailing slash in the base
  122959. if (base && ((pathLowerCase === baseLowerCase) ||
  122960. (pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {
  122961. path = path.slice(base.length);
  122962. }
  122963. return (path || '/') + window.location.search + window.location.hash
  122964. }
  122965. /* */
  122966. var HashHistory = /*@__PURE__*/(function (History) {
  122967. function HashHistory (router, base, fallback) {
  122968. History.call(this, router, base);
  122969. // check history fallback deeplinking
  122970. if (fallback && checkFallback(this.base)) {
  122971. return
  122972. }
  122973. ensureSlash();
  122974. }
  122975. if ( History ) HashHistory.__proto__ = History;
  122976. HashHistory.prototype = Object.create( History && History.prototype );
  122977. HashHistory.prototype.constructor = HashHistory;
  122978. // this is delayed until the app mounts
  122979. // to avoid the hashchange listener being fired too early
  122980. HashHistory.prototype.setupListeners = function setupListeners () {
  122981. var this$1$1 = this;
  122982. if (this.listeners.length > 0) {
  122983. return
  122984. }
  122985. var router = this.router;
  122986. var expectScroll = router.options.scrollBehavior;
  122987. var supportsScroll = supportsPushState && expectScroll;
  122988. if (supportsScroll) {
  122989. this.listeners.push(setupScroll());
  122990. }
  122991. var handleRoutingEvent = function () {
  122992. var current = this$1$1.current;
  122993. if (!ensureSlash()) {
  122994. return
  122995. }
  122996. this$1$1.transitionTo(getHash(), function (route) {
  122997. if (supportsScroll) {
  122998. handleScroll(this$1$1.router, route, current, true);
  122999. }
  123000. if (!supportsPushState) {
  123001. replaceHash(route.fullPath);
  123002. }
  123003. });
  123004. };
  123005. var eventType = supportsPushState ? 'popstate' : 'hashchange';
  123006. window.addEventListener(
  123007. eventType,
  123008. handleRoutingEvent
  123009. );
  123010. this.listeners.push(function () {
  123011. window.removeEventListener(eventType, handleRoutingEvent);
  123012. });
  123013. };
  123014. HashHistory.prototype.push = function push (location, onComplete, onAbort) {
  123015. var this$1$1 = this;
  123016. var ref = this;
  123017. var fromRoute = ref.current;
  123018. this.transitionTo(
  123019. location,
  123020. function (route) {
  123021. pushHash(route.fullPath);
  123022. handleScroll(this$1$1.router, route, fromRoute, false);
  123023. onComplete && onComplete(route);
  123024. },
  123025. onAbort
  123026. );
  123027. };
  123028. HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {
  123029. var this$1$1 = this;
  123030. var ref = this;
  123031. var fromRoute = ref.current;
  123032. this.transitionTo(
  123033. location,
  123034. function (route) {
  123035. replaceHash(route.fullPath);
  123036. handleScroll(this$1$1.router, route, fromRoute, false);
  123037. onComplete && onComplete(route);
  123038. },
  123039. onAbort
  123040. );
  123041. };
  123042. HashHistory.prototype.go = function go (n) {
  123043. window.history.go(n);
  123044. };
  123045. HashHistory.prototype.ensureURL = function ensureURL (push) {
  123046. var current = this.current.fullPath;
  123047. if (getHash() !== current) {
  123048. push ? pushHash(current) : replaceHash(current);
  123049. }
  123050. };
  123051. HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {
  123052. return getHash()
  123053. };
  123054. return HashHistory;
  123055. }(History));
  123056. function checkFallback (base) {
  123057. var location = getLocation(base);
  123058. if (!/^\/#/.test(location)) {
  123059. window.location.replace(cleanPath(base + '/#' + location));
  123060. return true
  123061. }
  123062. }
  123063. function ensureSlash () {
  123064. var path = getHash();
  123065. if (path.charAt(0) === '/') {
  123066. return true
  123067. }
  123068. replaceHash('/' + path);
  123069. return false
  123070. }
  123071. function getHash () {
  123072. // We can't use window.location.hash here because it's not
  123073. // consistent across browsers - Firefox will pre-decode it!
  123074. var href = window.location.href;
  123075. var index = href.indexOf('#');
  123076. // empty path
  123077. if (index < 0) { return '' }
  123078. href = href.slice(index + 1);
  123079. return href
  123080. }
  123081. function getUrl (path) {
  123082. var href = window.location.href;
  123083. var i = href.indexOf('#');
  123084. var base = i >= 0 ? href.slice(0, i) : href;
  123085. return (base + "#" + path)
  123086. }
  123087. function pushHash (path) {
  123088. if (supportsPushState) {
  123089. pushState(getUrl(path));
  123090. } else {
  123091. window.location.hash = path;
  123092. }
  123093. }
  123094. function replaceHash (path) {
  123095. if (supportsPushState) {
  123096. replaceState(getUrl(path));
  123097. } else {
  123098. window.location.replace(getUrl(path));
  123099. }
  123100. }
  123101. /* */
  123102. var AbstractHistory = /*@__PURE__*/(function (History) {
  123103. function AbstractHistory (router, base) {
  123104. History.call(this, router, base);
  123105. this.stack = [];
  123106. this.index = -1;
  123107. }
  123108. if ( History ) AbstractHistory.__proto__ = History;
  123109. AbstractHistory.prototype = Object.create( History && History.prototype );
  123110. AbstractHistory.prototype.constructor = AbstractHistory;
  123111. AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {
  123112. var this$1$1 = this;
  123113. this.transitionTo(
  123114. location,
  123115. function (route) {
  123116. this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);
  123117. this$1$1.index++;
  123118. onComplete && onComplete(route);
  123119. },
  123120. onAbort
  123121. );
  123122. };
  123123. AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {
  123124. var this$1$1 = this;
  123125. this.transitionTo(
  123126. location,
  123127. function (route) {
  123128. this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);
  123129. onComplete && onComplete(route);
  123130. },
  123131. onAbort
  123132. );
  123133. };
  123134. AbstractHistory.prototype.go = function go (n) {
  123135. var this$1$1 = this;
  123136. var targetIndex = this.index + n;
  123137. if (targetIndex < 0 || targetIndex >= this.stack.length) {
  123138. return
  123139. }
  123140. var route = this.stack[targetIndex];
  123141. this.confirmTransition(
  123142. route,
  123143. function () {
  123144. var prev = this$1$1.current;
  123145. this$1$1.index = targetIndex;
  123146. this$1$1.updateRoute(route);
  123147. this$1$1.router.afterHooks.forEach(function (hook) {
  123148. hook && hook(route, prev);
  123149. });
  123150. },
  123151. function (err) {
  123152. if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
  123153. this$1$1.index = targetIndex;
  123154. }
  123155. }
  123156. );
  123157. };
  123158. AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {
  123159. var current = this.stack[this.stack.length - 1];
  123160. return current ? current.fullPath : '/'
  123161. };
  123162. AbstractHistory.prototype.ensureURL = function ensureURL () {
  123163. // noop
  123164. };
  123165. return AbstractHistory;
  123166. }(History));
  123167. /* */
  123168. var VueRouter = function VueRouter (options) {
  123169. if ( options === void 0 ) options = {};
  123170. if (true) {
  123171. warn(this instanceof VueRouter, "Router must be called with the new operator.");
  123172. }
  123173. this.app = null;
  123174. this.apps = [];
  123175. this.options = options;
  123176. this.beforeHooks = [];
  123177. this.resolveHooks = [];
  123178. this.afterHooks = [];
  123179. this.matcher = createMatcher(options.routes || [], this);
  123180. var mode = options.mode || 'hash';
  123181. this.fallback =
  123182. mode === 'history' && !supportsPushState && options.fallback !== false;
  123183. if (this.fallback) {
  123184. mode = 'hash';
  123185. }
  123186. if (!inBrowser) {
  123187. mode = 'abstract';
  123188. }
  123189. this.mode = mode;
  123190. switch (mode) {
  123191. case 'history':
  123192. this.history = new HTML5History(this, options.base);
  123193. break
  123194. case 'hash':
  123195. this.history = new HashHistory(this, options.base, this.fallback);
  123196. break
  123197. case 'abstract':
  123198. this.history = new AbstractHistory(this, options.base);
  123199. break
  123200. default:
  123201. if (true) {
  123202. assert(false, ("invalid mode: " + mode));
  123203. }
  123204. }
  123205. };
  123206. var prototypeAccessors = { currentRoute: { configurable: true } };
  123207. VueRouter.prototype.match = function match (raw, current, redirectedFrom) {
  123208. return this.matcher.match(raw, current, redirectedFrom)
  123209. };
  123210. prototypeAccessors.currentRoute.get = function () {
  123211. return this.history && this.history.current
  123212. };
  123213. VueRouter.prototype.init = function init (app /* Vue component instance */) {
  123214. var this$1$1 = this;
  123215. true &&
  123216. assert(
  123217. install.installed,
  123218. "not installed. Make sure to call `Vue.use(VueRouter)` " +
  123219. "before creating root instance."
  123220. );
  123221. this.apps.push(app);
  123222. // set up app destroyed handler
  123223. // https://github.com/vuejs/vue-router/issues/2639
  123224. app.$once('hook:destroyed', function () {
  123225. // clean out app from this.apps array once destroyed
  123226. var index = this$1$1.apps.indexOf(app);
  123227. if (index > -1) { this$1$1.apps.splice(index, 1); }
  123228. // ensure we still have a main app or null if no apps
  123229. // we do not release the router so it can be reused
  123230. if (this$1$1.app === app) { this$1$1.app = this$1$1.apps[0] || null; }
  123231. if (!this$1$1.app) { this$1$1.history.teardown(); }
  123232. });
  123233. // main app previously initialized
  123234. // return as we don't need to set up new history listener
  123235. if (this.app) {
  123236. return
  123237. }
  123238. this.app = app;
  123239. var history = this.history;
  123240. if (history instanceof HTML5History || history instanceof HashHistory) {
  123241. var handleInitialScroll = function (routeOrError) {
  123242. var from = history.current;
  123243. var expectScroll = this$1$1.options.scrollBehavior;
  123244. var supportsScroll = supportsPushState && expectScroll;
  123245. if (supportsScroll && 'fullPath' in routeOrError) {
  123246. handleScroll(this$1$1, routeOrError, from, false);
  123247. }
  123248. };
  123249. var setupListeners = function (routeOrError) {
  123250. history.setupListeners();
  123251. handleInitialScroll(routeOrError);
  123252. };
  123253. history.transitionTo(
  123254. history.getCurrentLocation(),
  123255. setupListeners,
  123256. setupListeners
  123257. );
  123258. }
  123259. history.listen(function (route) {
  123260. this$1$1.apps.forEach(function (app) {
  123261. app._route = route;
  123262. });
  123263. });
  123264. };
  123265. VueRouter.prototype.beforeEach = function beforeEach (fn) {
  123266. return registerHook(this.beforeHooks, fn)
  123267. };
  123268. VueRouter.prototype.beforeResolve = function beforeResolve (fn) {
  123269. return registerHook(this.resolveHooks, fn)
  123270. };
  123271. VueRouter.prototype.afterEach = function afterEach (fn) {
  123272. return registerHook(this.afterHooks, fn)
  123273. };
  123274. VueRouter.prototype.onReady = function onReady (cb, errorCb) {
  123275. this.history.onReady(cb, errorCb);
  123276. };
  123277. VueRouter.prototype.onError = function onError (errorCb) {
  123278. this.history.onError(errorCb);
  123279. };
  123280. VueRouter.prototype.push = function push (location, onComplete, onAbort) {
  123281. var this$1$1 = this;
  123282. // $flow-disable-line
  123283. if (!onComplete && !onAbort && typeof Promise !== 'undefined') {
  123284. return new Promise(function (resolve, reject) {
  123285. this$1$1.history.push(location, resolve, reject);
  123286. })
  123287. } else {
  123288. this.history.push(location, onComplete, onAbort);
  123289. }
  123290. };
  123291. VueRouter.prototype.replace = function replace (location, onComplete, onAbort) {
  123292. var this$1$1 = this;
  123293. // $flow-disable-line
  123294. if (!onComplete && !onAbort && typeof Promise !== 'undefined') {
  123295. return new Promise(function (resolve, reject) {
  123296. this$1$1.history.replace(location, resolve, reject);
  123297. })
  123298. } else {
  123299. this.history.replace(location, onComplete, onAbort);
  123300. }
  123301. };
  123302. VueRouter.prototype.go = function go (n) {
  123303. this.history.go(n);
  123304. };
  123305. VueRouter.prototype.back = function back () {
  123306. this.go(-1);
  123307. };
  123308. VueRouter.prototype.forward = function forward () {
  123309. this.go(1);
  123310. };
  123311. VueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {
  123312. var route = to
  123313. ? to.matched
  123314. ? to
  123315. : this.resolve(to).route
  123316. : this.currentRoute;
  123317. if (!route) {
  123318. return []
  123319. }
  123320. return [].concat.apply(
  123321. [],
  123322. route.matched.map(function (m) {
  123323. return Object.keys(m.components).map(function (key) {
  123324. return m.components[key]
  123325. })
  123326. })
  123327. )
  123328. };
  123329. VueRouter.prototype.resolve = function resolve (
  123330. to,
  123331. current,
  123332. append
  123333. ) {
  123334. current = current || this.history.current;
  123335. var location = normalizeLocation(to, current, append, this);
  123336. var route = this.match(location, current);
  123337. var fullPath = route.redirectedFrom || route.fullPath;
  123338. var base = this.history.base;
  123339. var href = createHref(base, fullPath, this.mode);
  123340. return {
  123341. location: location,
  123342. route: route,
  123343. href: href,
  123344. // for backwards compat
  123345. normalizedTo: location,
  123346. resolved: route
  123347. }
  123348. };
  123349. VueRouter.prototype.getRoutes = function getRoutes () {
  123350. return this.matcher.getRoutes()
  123351. };
  123352. VueRouter.prototype.addRoute = function addRoute (parentOrRoute, route) {
  123353. this.matcher.addRoute(parentOrRoute, route);
  123354. if (this.history.current !== START) {
  123355. this.history.transitionTo(this.history.getCurrentLocation());
  123356. }
  123357. };
  123358. VueRouter.prototype.addRoutes = function addRoutes (routes) {
  123359. if (true) {
  123360. warn(false, 'router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.');
  123361. }
  123362. this.matcher.addRoutes(routes);
  123363. if (this.history.current !== START) {
  123364. this.history.transitionTo(this.history.getCurrentLocation());
  123365. }
  123366. };
  123367. Object.defineProperties( VueRouter.prototype, prototypeAccessors );
  123368. var VueRouter$1 = VueRouter;
  123369. function registerHook (list, fn) {
  123370. list.push(fn);
  123371. return function () {
  123372. var i = list.indexOf(fn);
  123373. if (i > -1) { list.splice(i, 1); }
  123374. }
  123375. }
  123376. function createHref (base, fullPath, mode) {
  123377. var path = mode === 'hash' ? '#' + fullPath : fullPath;
  123378. return base ? cleanPath(base + '/' + path) : path
  123379. }
  123380. // We cannot remove this as it would be a breaking change
  123381. VueRouter.install = install;
  123382. VueRouter.version = '3.6.4';
  123383. VueRouter.isNavigationFailure = isNavigationFailure;
  123384. VueRouter.NavigationFailureType = NavigationFailureType;
  123385. VueRouter.START_LOCATION = START;
  123386. if (inBrowser && window.Vue) {
  123387. window.Vue.use(VueRouter);
  123388. }
  123389. var version = '3.6.4';
  123390. /***/ }),
  123391. /***/ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/index.js?!./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css&":
  123392. /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  123393. !*** ./node_modules/_vue-style-loader@4.1.3@vue-style-loader??ref--7-oneOf-1-0!./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-1-2!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css& ***!
  123394. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  123395. /*! no static exports found */
  123396. /***/ (function(module, exports, __webpack_require__) {
  123397. // style-loader: Adds some css to the DOM by adding a <style> tag
  123398. // load the styles
  123399. var content = __webpack_require__(/*! !../../_css-loader@3.6.0@css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!../../_postcss-loader@3.0.0@postcss-loader/src??ref--7-oneOf-1-2!../../_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../_vue-loader@15.10.0@vue-loader/lib??vue-loader-options!./index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css& */ "./node_modules/_css-loader@3.6.0@css-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js?!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?!./node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js?!./node_modules/_vue-esign@1.1.4@vue-esign/src/index.vue?vue&type=style&index=0&id=056888e0&scoped=true&lang=css&");
  123400. if(content.__esModule) content = content.default;
  123401. if(typeof content === 'string') content = [[module.i, content, '']];
  123402. if(content.locals) module.exports = content.locals;
  123403. // add the styles to the DOM
  123404. var add = __webpack_require__(/*! ../../_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js */ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js").default
  123405. var update = add("572059f4", content, false, {"sourceMap":true,"shadowMode":false});
  123406. // Hot Module Replacement
  123407. if(false) {}
  123408. /***/ }),
  123409. /***/ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js":
  123410. /*!**************************************************************************************!*\
  123411. !*** ./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/addStylesClient.js ***!
  123412. \**************************************************************************************/
  123413. /*! exports provided: default */
  123414. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  123415. "use strict";
  123416. __webpack_require__.r(__webpack_exports__);
  123417. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addStylesClient; });
  123418. /* harmony import */ var _listToStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./listToStyles */ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/listToStyles.js");
  123419. /*
  123420. MIT License http://www.opensource.org/licenses/mit-license.php
  123421. Author Tobias Koppers @sokra
  123422. Modified by Evan You @yyx990803
  123423. */
  123424. var hasDocument = typeof document !== 'undefined'
  123425. if (typeof DEBUG !== 'undefined' && DEBUG) {
  123426. if (!hasDocument) {
  123427. throw new Error(
  123428. 'vue-style-loader cannot be used in a non-browser environment. ' +
  123429. "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
  123430. ) }
  123431. }
  123432. /*
  123433. type StyleObject = {
  123434. id: number;
  123435. parts: Array<StyleObjectPart>
  123436. }
  123437. type StyleObjectPart = {
  123438. css: string;
  123439. media: string;
  123440. sourceMap: ?string
  123441. }
  123442. */
  123443. var stylesInDom = {/*
  123444. [id: number]: {
  123445. id: number,
  123446. refs: number,
  123447. parts: Array<(obj?: StyleObjectPart) => void>
  123448. }
  123449. */}
  123450. var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
  123451. var singletonElement = null
  123452. var singletonCounter = 0
  123453. var isProduction = false
  123454. var noop = function () {}
  123455. var options = null
  123456. var ssrIdKey = 'data-vue-ssr-id'
  123457. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  123458. // tags it will allow on a page
  123459. var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
  123460. function addStylesClient (parentId, list, _isProduction, _options) {
  123461. isProduction = _isProduction
  123462. options = _options || {}
  123463. var styles = Object(_listToStyles__WEBPACK_IMPORTED_MODULE_0__["default"])(parentId, list)
  123464. addStylesToDom(styles)
  123465. return function update (newList) {
  123466. var mayRemove = []
  123467. for (var i = 0; i < styles.length; i++) {
  123468. var item = styles[i]
  123469. var domStyle = stylesInDom[item.id]
  123470. domStyle.refs--
  123471. mayRemove.push(domStyle)
  123472. }
  123473. if (newList) {
  123474. styles = Object(_listToStyles__WEBPACK_IMPORTED_MODULE_0__["default"])(parentId, newList)
  123475. addStylesToDom(styles)
  123476. } else {
  123477. styles = []
  123478. }
  123479. for (var i = 0; i < mayRemove.length; i++) {
  123480. var domStyle = mayRemove[i]
  123481. if (domStyle.refs === 0) {
  123482. for (var j = 0; j < domStyle.parts.length; j++) {
  123483. domStyle.parts[j]()
  123484. }
  123485. delete stylesInDom[domStyle.id]
  123486. }
  123487. }
  123488. }
  123489. }
  123490. function addStylesToDom (styles /* Array<StyleObject> */) {
  123491. for (var i = 0; i < styles.length; i++) {
  123492. var item = styles[i]
  123493. var domStyle = stylesInDom[item.id]
  123494. if (domStyle) {
  123495. domStyle.refs++
  123496. for (var j = 0; j < domStyle.parts.length; j++) {
  123497. domStyle.parts[j](item.parts[j])
  123498. }
  123499. for (; j < item.parts.length; j++) {
  123500. domStyle.parts.push(addStyle(item.parts[j]))
  123501. }
  123502. if (domStyle.parts.length > item.parts.length) {
  123503. domStyle.parts.length = item.parts.length
  123504. }
  123505. } else {
  123506. var parts = []
  123507. for (var j = 0; j < item.parts.length; j++) {
  123508. parts.push(addStyle(item.parts[j]))
  123509. }
  123510. stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
  123511. }
  123512. }
  123513. }
  123514. function createStyleElement () {
  123515. var styleElement = document.createElement('style')
  123516. styleElement.type = 'text/css'
  123517. head.appendChild(styleElement)
  123518. return styleElement
  123519. }
  123520. function addStyle (obj /* StyleObjectPart */) {
  123521. var update, remove
  123522. var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
  123523. if (styleElement) {
  123524. if (isProduction) {
  123525. // has SSR styles and in production mode.
  123526. // simply do nothing.
  123527. return noop
  123528. } else {
  123529. // has SSR styles but in dev mode.
  123530. // for some reason Chrome can't handle source map in server-rendered
  123531. // style tags - source maps in <style> only works if the style tag is
  123532. // created and inserted dynamically. So we remove the server rendered
  123533. // styles and inject new ones.
  123534. styleElement.parentNode.removeChild(styleElement)
  123535. }
  123536. }
  123537. if (isOldIE) {
  123538. // use singleton mode for IE9.
  123539. var styleIndex = singletonCounter++
  123540. styleElement = singletonElement || (singletonElement = createStyleElement())
  123541. update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
  123542. remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
  123543. } else {
  123544. // use multi-style-tag mode in all other cases
  123545. styleElement = createStyleElement()
  123546. update = applyToTag.bind(null, styleElement)
  123547. remove = function () {
  123548. styleElement.parentNode.removeChild(styleElement)
  123549. }
  123550. }
  123551. update(obj)
  123552. return function updateStyle (newObj /* StyleObjectPart */) {
  123553. if (newObj) {
  123554. if (newObj.css === obj.css &&
  123555. newObj.media === obj.media &&
  123556. newObj.sourceMap === obj.sourceMap) {
  123557. return
  123558. }
  123559. update(obj = newObj)
  123560. } else {
  123561. remove()
  123562. }
  123563. }
  123564. }
  123565. var replaceText = (function () {
  123566. var textStore = []
  123567. return function (index, replacement) {
  123568. textStore[index] = replacement
  123569. return textStore.filter(Boolean).join('\n')
  123570. }
  123571. })()
  123572. function applyToSingletonTag (styleElement, index, remove, obj) {
  123573. var css = remove ? '' : obj.css
  123574. if (styleElement.styleSheet) {
  123575. styleElement.styleSheet.cssText = replaceText(index, css)
  123576. } else {
  123577. var cssNode = document.createTextNode(css)
  123578. var childNodes = styleElement.childNodes
  123579. if (childNodes[index]) styleElement.removeChild(childNodes[index])
  123580. if (childNodes.length) {
  123581. styleElement.insertBefore(cssNode, childNodes[index])
  123582. } else {
  123583. styleElement.appendChild(cssNode)
  123584. }
  123585. }
  123586. }
  123587. function applyToTag (styleElement, obj) {
  123588. var css = obj.css
  123589. var media = obj.media
  123590. var sourceMap = obj.sourceMap
  123591. if (media) {
  123592. styleElement.setAttribute('media', media)
  123593. }
  123594. if (options.ssrId) {
  123595. styleElement.setAttribute(ssrIdKey, obj.id)
  123596. }
  123597. if (sourceMap) {
  123598. // https://developer.chrome.com/devtools/docs/javascript-debugging
  123599. // this makes source maps inside style tags work properly in Chrome
  123600. css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
  123601. // http://stackoverflow.com/a/26603875
  123602. css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
  123603. }
  123604. if (styleElement.styleSheet) {
  123605. styleElement.styleSheet.cssText = css
  123606. } else {
  123607. while (styleElement.firstChild) {
  123608. styleElement.removeChild(styleElement.firstChild)
  123609. }
  123610. styleElement.appendChild(document.createTextNode(css))
  123611. }
  123612. }
  123613. /***/ }),
  123614. /***/ "./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/listToStyles.js":
  123615. /*!***********************************************************************************!*\
  123616. !*** ./node_modules/_vue-style-loader@4.1.3@vue-style-loader/lib/listToStyles.js ***!
  123617. \***********************************************************************************/
  123618. /*! exports provided: default */
  123619. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  123620. "use strict";
  123621. __webpack_require__.r(__webpack_exports__);
  123622. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return listToStyles; });
  123623. /**
  123624. * Translates the list format produced by css-loader into something
  123625. * easier to manipulate.
  123626. */
  123627. function listToStyles (parentId, list) {
  123628. var styles = []
  123629. var newStyles = {}
  123630. for (var i = 0; i < list.length; i++) {
  123631. var item = list[i]
  123632. var id = item[0]
  123633. var css = item[1]
  123634. var media = item[2]
  123635. var sourceMap = item[3]
  123636. var part = {
  123637. id: parentId + ':' + i,
  123638. css: css,
  123639. media: media,
  123640. sourceMap: sourceMap
  123641. }
  123642. if (!newStyles[id]) {
  123643. styles.push(newStyles[id] = { id: id, parts: [part] })
  123644. } else {
  123645. newStyles[id].parts.push(part)
  123646. }
  123647. }
  123648. return styles
  123649. }
  123650. /***/ }),
  123651. /***/ "./node_modules/_vue@2.6.12@vue/dist/vue.esm.js":
  123652. /*!******************************************************!*\
  123653. !*** ./node_modules/_vue@2.6.12@vue/dist/vue.esm.js ***!
  123654. \******************************************************/
  123655. /*! exports provided: default */
  123656. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  123657. "use strict";
  123658. __webpack_require__.r(__webpack_exports__);
  123659. /* WEBPACK VAR INJECTION */(function(global) {/*!
  123660. * Vue.js v2.6.12
  123661. * (c) 2014-2020 Evan You
  123662. * Released under the MIT License.
  123663. */
  123664. /* */
  123665. var emptyObject = Object.freeze({});
  123666. // These helpers produce better VM code in JS engines due to their
  123667. // explicitness and function inlining.
  123668. function isUndef (v) {
  123669. return v === undefined || v === null
  123670. }
  123671. function isDef (v) {
  123672. return v !== undefined && v !== null
  123673. }
  123674. function isTrue (v) {
  123675. return v === true
  123676. }
  123677. function isFalse (v) {
  123678. return v === false
  123679. }
  123680. /**
  123681. * Check if value is primitive.
  123682. */
  123683. function isPrimitive (value) {
  123684. return (
  123685. typeof value === 'string' ||
  123686. typeof value === 'number' ||
  123687. // $flow-disable-line
  123688. typeof value === 'symbol' ||
  123689. typeof value === 'boolean'
  123690. )
  123691. }
  123692. /**
  123693. * Quick object check - this is primarily used to tell
  123694. * Objects from primitive values when we know the value
  123695. * is a JSON-compliant type.
  123696. */
  123697. function isObject (obj) {
  123698. return obj !== null && typeof obj === 'object'
  123699. }
  123700. /**
  123701. * Get the raw type string of a value, e.g., [object Object].
  123702. */
  123703. var _toString = Object.prototype.toString;
  123704. function toRawType (value) {
  123705. return _toString.call(value).slice(8, -1)
  123706. }
  123707. /**
  123708. * Strict object type check. Only returns true
  123709. * for plain JavaScript objects.
  123710. */
  123711. function isPlainObject (obj) {
  123712. return _toString.call(obj) === '[object Object]'
  123713. }
  123714. function isRegExp (v) {
  123715. return _toString.call(v) === '[object RegExp]'
  123716. }
  123717. /**
  123718. * Check if val is a valid array index.
  123719. */
  123720. function isValidArrayIndex (val) {
  123721. var n = parseFloat(String(val));
  123722. return n >= 0 && Math.floor(n) === n && isFinite(val)
  123723. }
  123724. function isPromise (val) {
  123725. return (
  123726. isDef(val) &&
  123727. typeof val.then === 'function' &&
  123728. typeof val.catch === 'function'
  123729. )
  123730. }
  123731. /**
  123732. * Convert a value to a string that is actually rendered.
  123733. */
  123734. function toString (val) {
  123735. return val == null
  123736. ? ''
  123737. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  123738. ? JSON.stringify(val, null, 2)
  123739. : String(val)
  123740. }
  123741. /**
  123742. * Convert an input value to a number for persistence.
  123743. * If the conversion fails, return original string.
  123744. */
  123745. function toNumber (val) {
  123746. var n = parseFloat(val);
  123747. return isNaN(n) ? val : n
  123748. }
  123749. /**
  123750. * Make a map and return a function for checking if a key
  123751. * is in that map.
  123752. */
  123753. function makeMap (
  123754. str,
  123755. expectsLowerCase
  123756. ) {
  123757. var map = Object.create(null);
  123758. var list = str.split(',');
  123759. for (var i = 0; i < list.length; i++) {
  123760. map[list[i]] = true;
  123761. }
  123762. return expectsLowerCase
  123763. ? function (val) { return map[val.toLowerCase()]; }
  123764. : function (val) { return map[val]; }
  123765. }
  123766. /**
  123767. * Check if a tag is a built-in tag.
  123768. */
  123769. var isBuiltInTag = makeMap('slot,component', true);
  123770. /**
  123771. * Check if an attribute is a reserved attribute.
  123772. */
  123773. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  123774. /**
  123775. * Remove an item from an array.
  123776. */
  123777. function remove (arr, item) {
  123778. if (arr.length) {
  123779. var index = arr.indexOf(item);
  123780. if (index > -1) {
  123781. return arr.splice(index, 1)
  123782. }
  123783. }
  123784. }
  123785. /**
  123786. * Check whether an object has the property.
  123787. */
  123788. var hasOwnProperty = Object.prototype.hasOwnProperty;
  123789. function hasOwn (obj, key) {
  123790. return hasOwnProperty.call(obj, key)
  123791. }
  123792. /**
  123793. * Create a cached version of a pure function.
  123794. */
  123795. function cached (fn) {
  123796. var cache = Object.create(null);
  123797. return (function cachedFn (str) {
  123798. var hit = cache[str];
  123799. return hit || (cache[str] = fn(str))
  123800. })
  123801. }
  123802. /**
  123803. * Camelize a hyphen-delimited string.
  123804. */
  123805. var camelizeRE = /-(\w)/g;
  123806. var camelize = cached(function (str) {
  123807. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  123808. });
  123809. /**
  123810. * Capitalize a string.
  123811. */
  123812. var capitalize = cached(function (str) {
  123813. return str.charAt(0).toUpperCase() + str.slice(1)
  123814. });
  123815. /**
  123816. * Hyphenate a camelCase string.
  123817. */
  123818. var hyphenateRE = /\B([A-Z])/g;
  123819. var hyphenate = cached(function (str) {
  123820. return str.replace(hyphenateRE, '-$1').toLowerCase()
  123821. });
  123822. /**
  123823. * Simple bind polyfill for environments that do not support it,
  123824. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  123825. * since native bind is now performant enough in most browsers.
  123826. * But removing it would mean breaking code that was able to run in
  123827. * PhantomJS 1.x, so this must be kept for backward compatibility.
  123828. */
  123829. /* istanbul ignore next */
  123830. function polyfillBind (fn, ctx) {
  123831. function boundFn (a) {
  123832. var l = arguments.length;
  123833. return l
  123834. ? l > 1
  123835. ? fn.apply(ctx, arguments)
  123836. : fn.call(ctx, a)
  123837. : fn.call(ctx)
  123838. }
  123839. boundFn._length = fn.length;
  123840. return boundFn
  123841. }
  123842. function nativeBind (fn, ctx) {
  123843. return fn.bind(ctx)
  123844. }
  123845. var bind = Function.prototype.bind
  123846. ? nativeBind
  123847. : polyfillBind;
  123848. /**
  123849. * Convert an Array-like object to a real Array.
  123850. */
  123851. function toArray (list, start) {
  123852. start = start || 0;
  123853. var i = list.length - start;
  123854. var ret = new Array(i);
  123855. while (i--) {
  123856. ret[i] = list[i + start];
  123857. }
  123858. return ret
  123859. }
  123860. /**
  123861. * Mix properties into target object.
  123862. */
  123863. function extend (to, _from) {
  123864. for (var key in _from) {
  123865. to[key] = _from[key];
  123866. }
  123867. return to
  123868. }
  123869. /**
  123870. * Merge an Array of Objects into a single Object.
  123871. */
  123872. function toObject (arr) {
  123873. var res = {};
  123874. for (var i = 0; i < arr.length; i++) {
  123875. if (arr[i]) {
  123876. extend(res, arr[i]);
  123877. }
  123878. }
  123879. return res
  123880. }
  123881. /* eslint-disable no-unused-vars */
  123882. /**
  123883. * Perform no operation.
  123884. * Stubbing args to make Flow happy without leaving useless transpiled code
  123885. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  123886. */
  123887. function noop (a, b, c) {}
  123888. /**
  123889. * Always return false.
  123890. */
  123891. var no = function (a, b, c) { return false; };
  123892. /* eslint-enable no-unused-vars */
  123893. /**
  123894. * Return the same value.
  123895. */
  123896. var identity = function (_) { return _; };
  123897. /**
  123898. * Generate a string containing static keys from compiler modules.
  123899. */
  123900. function genStaticKeys (modules) {
  123901. return modules.reduce(function (keys, m) {
  123902. return keys.concat(m.staticKeys || [])
  123903. }, []).join(',')
  123904. }
  123905. /**
  123906. * Check if two values are loosely equal - that is,
  123907. * if they are plain objects, do they have the same shape?
  123908. */
  123909. function looseEqual (a, b) {
  123910. if (a === b) { return true }
  123911. var isObjectA = isObject(a);
  123912. var isObjectB = isObject(b);
  123913. if (isObjectA && isObjectB) {
  123914. try {
  123915. var isArrayA = Array.isArray(a);
  123916. var isArrayB = Array.isArray(b);
  123917. if (isArrayA && isArrayB) {
  123918. return a.length === b.length && a.every(function (e, i) {
  123919. return looseEqual(e, b[i])
  123920. })
  123921. } else if (a instanceof Date && b instanceof Date) {
  123922. return a.getTime() === b.getTime()
  123923. } else if (!isArrayA && !isArrayB) {
  123924. var keysA = Object.keys(a);
  123925. var keysB = Object.keys(b);
  123926. return keysA.length === keysB.length && keysA.every(function (key) {
  123927. return looseEqual(a[key], b[key])
  123928. })
  123929. } else {
  123930. /* istanbul ignore next */
  123931. return false
  123932. }
  123933. } catch (e) {
  123934. /* istanbul ignore next */
  123935. return false
  123936. }
  123937. } else if (!isObjectA && !isObjectB) {
  123938. return String(a) === String(b)
  123939. } else {
  123940. return false
  123941. }
  123942. }
  123943. /**
  123944. * Return the first index at which a loosely equal value can be
  123945. * found in the array (if value is a plain object, the array must
  123946. * contain an object of the same shape), or -1 if it is not present.
  123947. */
  123948. function looseIndexOf (arr, val) {
  123949. for (var i = 0; i < arr.length; i++) {
  123950. if (looseEqual(arr[i], val)) { return i }
  123951. }
  123952. return -1
  123953. }
  123954. /**
  123955. * Ensure a function is called only once.
  123956. */
  123957. function once (fn) {
  123958. var called = false;
  123959. return function () {
  123960. if (!called) {
  123961. called = true;
  123962. fn.apply(this, arguments);
  123963. }
  123964. }
  123965. }
  123966. var SSR_ATTR = 'data-server-rendered';
  123967. var ASSET_TYPES = [
  123968. 'component',
  123969. 'directive',
  123970. 'filter'
  123971. ];
  123972. var LIFECYCLE_HOOKS = [
  123973. 'beforeCreate',
  123974. 'created',
  123975. 'beforeMount',
  123976. 'mounted',
  123977. 'beforeUpdate',
  123978. 'updated',
  123979. 'beforeDestroy',
  123980. 'destroyed',
  123981. 'activated',
  123982. 'deactivated',
  123983. 'errorCaptured',
  123984. 'serverPrefetch'
  123985. ];
  123986. /* */
  123987. var config = ({
  123988. /**
  123989. * Option merge strategies (used in core/util/options)
  123990. */
  123991. // $flow-disable-line
  123992. optionMergeStrategies: Object.create(null),
  123993. /**
  123994. * Whether to suppress warnings.
  123995. */
  123996. silent: false,
  123997. /**
  123998. * Show production mode tip message on boot?
  123999. */
  124000. productionTip: "development" !== 'production',
  124001. /**
  124002. * Whether to enable devtools
  124003. */
  124004. devtools: "development" !== 'production',
  124005. /**
  124006. * Whether to record perf
  124007. */
  124008. performance: false,
  124009. /**
  124010. * Error handler for watcher errors
  124011. */
  124012. errorHandler: null,
  124013. /**
  124014. * Warn handler for watcher warns
  124015. */
  124016. warnHandler: null,
  124017. /**
  124018. * Ignore certain custom elements
  124019. */
  124020. ignoredElements: [],
  124021. /**
  124022. * Custom user key aliases for v-on
  124023. */
  124024. // $flow-disable-line
  124025. keyCodes: Object.create(null),
  124026. /**
  124027. * Check if a tag is reserved so that it cannot be registered as a
  124028. * component. This is platform-dependent and may be overwritten.
  124029. */
  124030. isReservedTag: no,
  124031. /**
  124032. * Check if an attribute is reserved so that it cannot be used as a component
  124033. * prop. This is platform-dependent and may be overwritten.
  124034. */
  124035. isReservedAttr: no,
  124036. /**
  124037. * Check if a tag is an unknown element.
  124038. * Platform-dependent.
  124039. */
  124040. isUnknownElement: no,
  124041. /**
  124042. * Get the namespace of an element
  124043. */
  124044. getTagNamespace: noop,
  124045. /**
  124046. * Parse the real tag name for the specific platform.
  124047. */
  124048. parsePlatformTagName: identity,
  124049. /**
  124050. * Check if an attribute must be bound using property, e.g. value
  124051. * Platform-dependent.
  124052. */
  124053. mustUseProp: no,
  124054. /**
  124055. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  124056. * This will significantly reduce performance if set to false.
  124057. */
  124058. async: true,
  124059. /**
  124060. * Exposed for legacy reasons
  124061. */
  124062. _lifecycleHooks: LIFECYCLE_HOOKS
  124063. });
  124064. /* */
  124065. /**
  124066. * unicode letters used for parsing html tags, component names and property paths.
  124067. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  124068. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  124069. */
  124070. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  124071. /**
  124072. * Check if a string starts with $ or _
  124073. */
  124074. function isReserved (str) {
  124075. var c = (str + '').charCodeAt(0);
  124076. return c === 0x24 || c === 0x5F
  124077. }
  124078. /**
  124079. * Define a property.
  124080. */
  124081. function def (obj, key, val, enumerable) {
  124082. Object.defineProperty(obj, key, {
  124083. value: val,
  124084. enumerable: !!enumerable,
  124085. writable: true,
  124086. configurable: true
  124087. });
  124088. }
  124089. /**
  124090. * Parse simple path.
  124091. */
  124092. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  124093. function parsePath (path) {
  124094. if (bailRE.test(path)) {
  124095. return
  124096. }
  124097. var segments = path.split('.');
  124098. return function (obj) {
  124099. for (var i = 0; i < segments.length; i++) {
  124100. if (!obj) { return }
  124101. obj = obj[segments[i]];
  124102. }
  124103. return obj
  124104. }
  124105. }
  124106. /* */
  124107. // can we use __proto__?
  124108. var hasProto = '__proto__' in {};
  124109. // Browser environment sniffing
  124110. var inBrowser = typeof window !== 'undefined';
  124111. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  124112. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  124113. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  124114. var isIE = UA && /msie|trident/.test(UA);
  124115. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  124116. var isEdge = UA && UA.indexOf('edge/') > 0;
  124117. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  124118. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  124119. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  124120. var isPhantomJS = UA && /phantomjs/.test(UA);
  124121. var isFF = UA && UA.match(/firefox\/(\d+)/);
  124122. // Firefox has a "watch" function on Object.prototype...
  124123. var nativeWatch = ({}).watch;
  124124. var supportsPassive = false;
  124125. if (inBrowser) {
  124126. try {
  124127. var opts = {};
  124128. Object.defineProperty(opts, 'passive', ({
  124129. get: function get () {
  124130. /* istanbul ignore next */
  124131. supportsPassive = true;
  124132. }
  124133. })); // https://github.com/facebook/flow/issues/285
  124134. window.addEventListener('test-passive', null, opts);
  124135. } catch (e) {}
  124136. }
  124137. // this needs to be lazy-evaled because vue may be required before
  124138. // vue-server-renderer can set VUE_ENV
  124139. var _isServer;
  124140. var isServerRendering = function () {
  124141. if (_isServer === undefined) {
  124142. /* istanbul ignore if */
  124143. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  124144. // detect presence of vue-server-renderer and avoid
  124145. // Webpack shimming the process
  124146. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  124147. } else {
  124148. _isServer = false;
  124149. }
  124150. }
  124151. return _isServer
  124152. };
  124153. // detect devtools
  124154. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  124155. /* istanbul ignore next */
  124156. function isNative (Ctor) {
  124157. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  124158. }
  124159. var hasSymbol =
  124160. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  124161. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  124162. var _Set;
  124163. /* istanbul ignore if */ // $flow-disable-line
  124164. if (typeof Set !== 'undefined' && isNative(Set)) {
  124165. // use native Set when available.
  124166. _Set = Set;
  124167. } else {
  124168. // a non-standard Set polyfill that only works with primitive keys.
  124169. _Set = /*@__PURE__*/(function () {
  124170. function Set () {
  124171. this.set = Object.create(null);
  124172. }
  124173. Set.prototype.has = function has (key) {
  124174. return this.set[key] === true
  124175. };
  124176. Set.prototype.add = function add (key) {
  124177. this.set[key] = true;
  124178. };
  124179. Set.prototype.clear = function clear () {
  124180. this.set = Object.create(null);
  124181. };
  124182. return Set;
  124183. }());
  124184. }
  124185. /* */
  124186. var warn = noop;
  124187. var tip = noop;
  124188. var generateComponentTrace = (noop); // work around flow check
  124189. var formatComponentName = (noop);
  124190. if (true) {
  124191. var hasConsole = typeof console !== 'undefined';
  124192. var classifyRE = /(?:^|[-_])(\w)/g;
  124193. var classify = function (str) { return str
  124194. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  124195. .replace(/[-_]/g, ''); };
  124196. warn = function (msg, vm) {
  124197. var trace = vm ? generateComponentTrace(vm) : '';
  124198. if (config.warnHandler) {
  124199. config.warnHandler.call(null, msg, vm, trace);
  124200. } else if (hasConsole && (!config.silent)) {
  124201. console.error(("[Vue warn]: " + msg + trace));
  124202. }
  124203. };
  124204. tip = function (msg, vm) {
  124205. if (hasConsole && (!config.silent)) {
  124206. console.warn("[Vue tip]: " + msg + (
  124207. vm ? generateComponentTrace(vm) : ''
  124208. ));
  124209. }
  124210. };
  124211. formatComponentName = function (vm, includeFile) {
  124212. if (vm.$root === vm) {
  124213. return '<Root>'
  124214. }
  124215. var options = typeof vm === 'function' && vm.cid != null
  124216. ? vm.options
  124217. : vm._isVue
  124218. ? vm.$options || vm.constructor.options
  124219. : vm;
  124220. var name = options.name || options._componentTag;
  124221. var file = options.__file;
  124222. if (!name && file) {
  124223. var match = file.match(/([^/\\]+)\.vue$/);
  124224. name = match && match[1];
  124225. }
  124226. return (
  124227. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  124228. (file && includeFile !== false ? (" at " + file) : '')
  124229. )
  124230. };
  124231. var repeat = function (str, n) {
  124232. var res = '';
  124233. while (n) {
  124234. if (n % 2 === 1) { res += str; }
  124235. if (n > 1) { str += str; }
  124236. n >>= 1;
  124237. }
  124238. return res
  124239. };
  124240. generateComponentTrace = function (vm) {
  124241. if (vm._isVue && vm.$parent) {
  124242. var tree = [];
  124243. var currentRecursiveSequence = 0;
  124244. while (vm) {
  124245. if (tree.length > 0) {
  124246. var last = tree[tree.length - 1];
  124247. if (last.constructor === vm.constructor) {
  124248. currentRecursiveSequence++;
  124249. vm = vm.$parent;
  124250. continue
  124251. } else if (currentRecursiveSequence > 0) {
  124252. tree[tree.length - 1] = [last, currentRecursiveSequence];
  124253. currentRecursiveSequence = 0;
  124254. }
  124255. }
  124256. tree.push(vm);
  124257. vm = vm.$parent;
  124258. }
  124259. return '\n\nfound in\n\n' + tree
  124260. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  124261. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  124262. : formatComponentName(vm))); })
  124263. .join('\n')
  124264. } else {
  124265. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  124266. }
  124267. };
  124268. }
  124269. /* */
  124270. var uid = 0;
  124271. /**
  124272. * A dep is an observable that can have multiple
  124273. * directives subscribing to it.
  124274. */
  124275. var Dep = function Dep () {
  124276. this.id = uid++;
  124277. this.subs = [];
  124278. };
  124279. Dep.prototype.addSub = function addSub (sub) {
  124280. this.subs.push(sub);
  124281. };
  124282. Dep.prototype.removeSub = function removeSub (sub) {
  124283. remove(this.subs, sub);
  124284. };
  124285. Dep.prototype.depend = function depend () {
  124286. if (Dep.target) {
  124287. Dep.target.addDep(this);
  124288. }
  124289. };
  124290. Dep.prototype.notify = function notify () {
  124291. // stabilize the subscriber list first
  124292. var subs = this.subs.slice();
  124293. if ( true && !config.async) {
  124294. // subs aren't sorted in scheduler if not running async
  124295. // we need to sort them now to make sure they fire in correct
  124296. // order
  124297. subs.sort(function (a, b) { return a.id - b.id; });
  124298. }
  124299. for (var i = 0, l = subs.length; i < l; i++) {
  124300. subs[i].update();
  124301. }
  124302. };
  124303. // The current target watcher being evaluated.
  124304. // This is globally unique because only one watcher
  124305. // can be evaluated at a time.
  124306. Dep.target = null;
  124307. var targetStack = [];
  124308. function pushTarget (target) {
  124309. targetStack.push(target);
  124310. Dep.target = target;
  124311. }
  124312. function popTarget () {
  124313. targetStack.pop();
  124314. Dep.target = targetStack[targetStack.length - 1];
  124315. }
  124316. /* */
  124317. var VNode = function VNode (
  124318. tag,
  124319. data,
  124320. children,
  124321. text,
  124322. elm,
  124323. context,
  124324. componentOptions,
  124325. asyncFactory
  124326. ) {
  124327. this.tag = tag;
  124328. this.data = data;
  124329. this.children = children;
  124330. this.text = text;
  124331. this.elm = elm;
  124332. this.ns = undefined;
  124333. this.context = context;
  124334. this.fnContext = undefined;
  124335. this.fnOptions = undefined;
  124336. this.fnScopeId = undefined;
  124337. this.key = data && data.key;
  124338. this.componentOptions = componentOptions;
  124339. this.componentInstance = undefined;
  124340. this.parent = undefined;
  124341. this.raw = false;
  124342. this.isStatic = false;
  124343. this.isRootInsert = true;
  124344. this.isComment = false;
  124345. this.isCloned = false;
  124346. this.isOnce = false;
  124347. this.asyncFactory = asyncFactory;
  124348. this.asyncMeta = undefined;
  124349. this.isAsyncPlaceholder = false;
  124350. };
  124351. var prototypeAccessors = { child: { configurable: true } };
  124352. // DEPRECATED: alias for componentInstance for backwards compat.
  124353. /* istanbul ignore next */
  124354. prototypeAccessors.child.get = function () {
  124355. return this.componentInstance
  124356. };
  124357. Object.defineProperties( VNode.prototype, prototypeAccessors );
  124358. var createEmptyVNode = function (text) {
  124359. if ( text === void 0 ) text = '';
  124360. var node = new VNode();
  124361. node.text = text;
  124362. node.isComment = true;
  124363. return node
  124364. };
  124365. function createTextVNode (val) {
  124366. return new VNode(undefined, undefined, undefined, String(val))
  124367. }
  124368. // optimized shallow clone
  124369. // used for static nodes and slot nodes because they may be reused across
  124370. // multiple renders, cloning them avoids errors when DOM manipulations rely
  124371. // on their elm reference.
  124372. function cloneVNode (vnode) {
  124373. var cloned = new VNode(
  124374. vnode.tag,
  124375. vnode.data,
  124376. // #7975
  124377. // clone children array to avoid mutating original in case of cloning
  124378. // a child.
  124379. vnode.children && vnode.children.slice(),
  124380. vnode.text,
  124381. vnode.elm,
  124382. vnode.context,
  124383. vnode.componentOptions,
  124384. vnode.asyncFactory
  124385. );
  124386. cloned.ns = vnode.ns;
  124387. cloned.isStatic = vnode.isStatic;
  124388. cloned.key = vnode.key;
  124389. cloned.isComment = vnode.isComment;
  124390. cloned.fnContext = vnode.fnContext;
  124391. cloned.fnOptions = vnode.fnOptions;
  124392. cloned.fnScopeId = vnode.fnScopeId;
  124393. cloned.asyncMeta = vnode.asyncMeta;
  124394. cloned.isCloned = true;
  124395. return cloned
  124396. }
  124397. /*
  124398. * not type checking this file because flow doesn't play well with
  124399. * dynamically accessing methods on Array prototype
  124400. */
  124401. var arrayProto = Array.prototype;
  124402. var arrayMethods = Object.create(arrayProto);
  124403. var methodsToPatch = [
  124404. 'push',
  124405. 'pop',
  124406. 'shift',
  124407. 'unshift',
  124408. 'splice',
  124409. 'sort',
  124410. 'reverse'
  124411. ];
  124412. /**
  124413. * Intercept mutating methods and emit events
  124414. */
  124415. methodsToPatch.forEach(function (method) {
  124416. // cache original method
  124417. var original = arrayProto[method];
  124418. def(arrayMethods, method, function mutator () {
  124419. var args = [], len = arguments.length;
  124420. while ( len-- ) args[ len ] = arguments[ len ];
  124421. var result = original.apply(this, args);
  124422. var ob = this.__ob__;
  124423. var inserted;
  124424. switch (method) {
  124425. case 'push':
  124426. case 'unshift':
  124427. inserted = args;
  124428. break
  124429. case 'splice':
  124430. inserted = args.slice(2);
  124431. break
  124432. }
  124433. if (inserted) { ob.observeArray(inserted); }
  124434. // notify change
  124435. ob.dep.notify();
  124436. return result
  124437. });
  124438. });
  124439. /* */
  124440. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  124441. /**
  124442. * In some cases we may want to disable observation inside a component's
  124443. * update computation.
  124444. */
  124445. var shouldObserve = true;
  124446. function toggleObserving (value) {
  124447. shouldObserve = value;
  124448. }
  124449. /**
  124450. * Observer class that is attached to each observed
  124451. * object. Once attached, the observer converts the target
  124452. * object's property keys into getter/setters that
  124453. * collect dependencies and dispatch updates.
  124454. */
  124455. var Observer = function Observer (value) {
  124456. this.value = value;
  124457. this.dep = new Dep();
  124458. this.vmCount = 0;
  124459. def(value, '__ob__', this);
  124460. if (Array.isArray(value)) {
  124461. if (hasProto) {
  124462. protoAugment(value, arrayMethods);
  124463. } else {
  124464. copyAugment(value, arrayMethods, arrayKeys);
  124465. }
  124466. this.observeArray(value);
  124467. } else {
  124468. this.walk(value);
  124469. }
  124470. };
  124471. /**
  124472. * Walk through all properties and convert them into
  124473. * getter/setters. This method should only be called when
  124474. * value type is Object.
  124475. */
  124476. Observer.prototype.walk = function walk (obj) {
  124477. var keys = Object.keys(obj);
  124478. for (var i = 0; i < keys.length; i++) {
  124479. defineReactive$$1(obj, keys[i]);
  124480. }
  124481. };
  124482. /**
  124483. * Observe a list of Array items.
  124484. */
  124485. Observer.prototype.observeArray = function observeArray (items) {
  124486. for (var i = 0, l = items.length; i < l; i++) {
  124487. observe(items[i]);
  124488. }
  124489. };
  124490. // helpers
  124491. /**
  124492. * Augment a target Object or Array by intercepting
  124493. * the prototype chain using __proto__
  124494. */
  124495. function protoAugment (target, src) {
  124496. /* eslint-disable no-proto */
  124497. target.__proto__ = src;
  124498. /* eslint-enable no-proto */
  124499. }
  124500. /**
  124501. * Augment a target Object or Array by defining
  124502. * hidden properties.
  124503. */
  124504. /* istanbul ignore next */
  124505. function copyAugment (target, src, keys) {
  124506. for (var i = 0, l = keys.length; i < l; i++) {
  124507. var key = keys[i];
  124508. def(target, key, src[key]);
  124509. }
  124510. }
  124511. /**
  124512. * Attempt to create an observer instance for a value,
  124513. * returns the new observer if successfully observed,
  124514. * or the existing observer if the value already has one.
  124515. */
  124516. function observe (value, asRootData) {
  124517. if (!isObject(value) || value instanceof VNode) {
  124518. return
  124519. }
  124520. var ob;
  124521. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  124522. ob = value.__ob__;
  124523. } else if (
  124524. shouldObserve &&
  124525. !isServerRendering() &&
  124526. (Array.isArray(value) || isPlainObject(value)) &&
  124527. Object.isExtensible(value) &&
  124528. !value._isVue
  124529. ) {
  124530. ob = new Observer(value);
  124531. }
  124532. if (asRootData && ob) {
  124533. ob.vmCount++;
  124534. }
  124535. return ob
  124536. }
  124537. /**
  124538. * Define a reactive property on an Object.
  124539. */
  124540. function defineReactive$$1 (
  124541. obj,
  124542. key,
  124543. val,
  124544. customSetter,
  124545. shallow
  124546. ) {
  124547. var dep = new Dep();
  124548. var property = Object.getOwnPropertyDescriptor(obj, key);
  124549. if (property && property.configurable === false) {
  124550. return
  124551. }
  124552. // cater for pre-defined getter/setters
  124553. var getter = property && property.get;
  124554. var setter = property && property.set;
  124555. if ((!getter || setter) && arguments.length === 2) {
  124556. val = obj[key];
  124557. }
  124558. var childOb = !shallow && observe(val);
  124559. Object.defineProperty(obj, key, {
  124560. enumerable: true,
  124561. configurable: true,
  124562. get: function reactiveGetter () {
  124563. var value = getter ? getter.call(obj) : val;
  124564. if (Dep.target) {
  124565. dep.depend();
  124566. if (childOb) {
  124567. childOb.dep.depend();
  124568. if (Array.isArray(value)) {
  124569. dependArray(value);
  124570. }
  124571. }
  124572. }
  124573. return value
  124574. },
  124575. set: function reactiveSetter (newVal) {
  124576. var value = getter ? getter.call(obj) : val;
  124577. /* eslint-disable no-self-compare */
  124578. if (newVal === value || (newVal !== newVal && value !== value)) {
  124579. return
  124580. }
  124581. /* eslint-enable no-self-compare */
  124582. if ( true && customSetter) {
  124583. customSetter();
  124584. }
  124585. // #7981: for accessor properties without setter
  124586. if (getter && !setter) { return }
  124587. if (setter) {
  124588. setter.call(obj, newVal);
  124589. } else {
  124590. val = newVal;
  124591. }
  124592. childOb = !shallow && observe(newVal);
  124593. dep.notify();
  124594. }
  124595. });
  124596. }
  124597. /**
  124598. * Set a property on an object. Adds the new property and
  124599. * triggers change notification if the property doesn't
  124600. * already exist.
  124601. */
  124602. function set (target, key, val) {
  124603. if ( true &&
  124604. (isUndef(target) || isPrimitive(target))
  124605. ) {
  124606. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  124607. }
  124608. if (Array.isArray(target) && isValidArrayIndex(key)) {
  124609. target.length = Math.max(target.length, key);
  124610. target.splice(key, 1, val);
  124611. return val
  124612. }
  124613. if (key in target && !(key in Object.prototype)) {
  124614. target[key] = val;
  124615. return val
  124616. }
  124617. var ob = (target).__ob__;
  124618. if (target._isVue || (ob && ob.vmCount)) {
  124619. true && warn(
  124620. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  124621. 'at runtime - declare it upfront in the data option.'
  124622. );
  124623. return val
  124624. }
  124625. if (!ob) {
  124626. target[key] = val;
  124627. return val
  124628. }
  124629. defineReactive$$1(ob.value, key, val);
  124630. ob.dep.notify();
  124631. return val
  124632. }
  124633. /**
  124634. * Delete a property and trigger change if necessary.
  124635. */
  124636. function del (target, key) {
  124637. if ( true &&
  124638. (isUndef(target) || isPrimitive(target))
  124639. ) {
  124640. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  124641. }
  124642. if (Array.isArray(target) && isValidArrayIndex(key)) {
  124643. target.splice(key, 1);
  124644. return
  124645. }
  124646. var ob = (target).__ob__;
  124647. if (target._isVue || (ob && ob.vmCount)) {
  124648. true && warn(
  124649. 'Avoid deleting properties on a Vue instance or its root $data ' +
  124650. '- just set it to null.'
  124651. );
  124652. return
  124653. }
  124654. if (!hasOwn(target, key)) {
  124655. return
  124656. }
  124657. delete target[key];
  124658. if (!ob) {
  124659. return
  124660. }
  124661. ob.dep.notify();
  124662. }
  124663. /**
  124664. * Collect dependencies on array elements when the array is touched, since
  124665. * we cannot intercept array element access like property getters.
  124666. */
  124667. function dependArray (value) {
  124668. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  124669. e = value[i];
  124670. e && e.__ob__ && e.__ob__.dep.depend();
  124671. if (Array.isArray(e)) {
  124672. dependArray(e);
  124673. }
  124674. }
  124675. }
  124676. /* */
  124677. /**
  124678. * Option overwriting strategies are functions that handle
  124679. * how to merge a parent option value and a child option
  124680. * value into the final value.
  124681. */
  124682. var strats = config.optionMergeStrategies;
  124683. /**
  124684. * Options with restrictions
  124685. */
  124686. if (true) {
  124687. strats.el = strats.propsData = function (parent, child, vm, key) {
  124688. if (!vm) {
  124689. warn(
  124690. "option \"" + key + "\" can only be used during instance " +
  124691. 'creation with the `new` keyword.'
  124692. );
  124693. }
  124694. return defaultStrat(parent, child)
  124695. };
  124696. }
  124697. /**
  124698. * Helper that recursively merges two data objects together.
  124699. */
  124700. function mergeData (to, from) {
  124701. if (!from) { return to }
  124702. var key, toVal, fromVal;
  124703. var keys = hasSymbol
  124704. ? Reflect.ownKeys(from)
  124705. : Object.keys(from);
  124706. for (var i = 0; i < keys.length; i++) {
  124707. key = keys[i];
  124708. // in case the object is already observed...
  124709. if (key === '__ob__') { continue }
  124710. toVal = to[key];
  124711. fromVal = from[key];
  124712. if (!hasOwn(to, key)) {
  124713. set(to, key, fromVal);
  124714. } else if (
  124715. toVal !== fromVal &&
  124716. isPlainObject(toVal) &&
  124717. isPlainObject(fromVal)
  124718. ) {
  124719. mergeData(toVal, fromVal);
  124720. }
  124721. }
  124722. return to
  124723. }
  124724. /**
  124725. * Data
  124726. */
  124727. function mergeDataOrFn (
  124728. parentVal,
  124729. childVal,
  124730. vm
  124731. ) {
  124732. if (!vm) {
  124733. // in a Vue.extend merge, both should be functions
  124734. if (!childVal) {
  124735. return parentVal
  124736. }
  124737. if (!parentVal) {
  124738. return childVal
  124739. }
  124740. // when parentVal & childVal are both present,
  124741. // we need to return a function that returns the
  124742. // merged result of both functions... no need to
  124743. // check if parentVal is a function here because
  124744. // it has to be a function to pass previous merges.
  124745. return function mergedDataFn () {
  124746. return mergeData(
  124747. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  124748. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  124749. )
  124750. }
  124751. } else {
  124752. return function mergedInstanceDataFn () {
  124753. // instance merge
  124754. var instanceData = typeof childVal === 'function'
  124755. ? childVal.call(vm, vm)
  124756. : childVal;
  124757. var defaultData = typeof parentVal === 'function'
  124758. ? parentVal.call(vm, vm)
  124759. : parentVal;
  124760. if (instanceData) {
  124761. return mergeData(instanceData, defaultData)
  124762. } else {
  124763. return defaultData
  124764. }
  124765. }
  124766. }
  124767. }
  124768. strats.data = function (
  124769. parentVal,
  124770. childVal,
  124771. vm
  124772. ) {
  124773. if (!vm) {
  124774. if (childVal && typeof childVal !== 'function') {
  124775. true && warn(
  124776. 'The "data" option should be a function ' +
  124777. 'that returns a per-instance value in component ' +
  124778. 'definitions.',
  124779. vm
  124780. );
  124781. return parentVal
  124782. }
  124783. return mergeDataOrFn(parentVal, childVal)
  124784. }
  124785. return mergeDataOrFn(parentVal, childVal, vm)
  124786. };
  124787. /**
  124788. * Hooks and props are merged as arrays.
  124789. */
  124790. function mergeHook (
  124791. parentVal,
  124792. childVal
  124793. ) {
  124794. var res = childVal
  124795. ? parentVal
  124796. ? parentVal.concat(childVal)
  124797. : Array.isArray(childVal)
  124798. ? childVal
  124799. : [childVal]
  124800. : parentVal;
  124801. return res
  124802. ? dedupeHooks(res)
  124803. : res
  124804. }
  124805. function dedupeHooks (hooks) {
  124806. var res = [];
  124807. for (var i = 0; i < hooks.length; i++) {
  124808. if (res.indexOf(hooks[i]) === -1) {
  124809. res.push(hooks[i]);
  124810. }
  124811. }
  124812. return res
  124813. }
  124814. LIFECYCLE_HOOKS.forEach(function (hook) {
  124815. strats[hook] = mergeHook;
  124816. });
  124817. /**
  124818. * Assets
  124819. *
  124820. * When a vm is present (instance creation), we need to do
  124821. * a three-way merge between constructor options, instance
  124822. * options and parent options.
  124823. */
  124824. function mergeAssets (
  124825. parentVal,
  124826. childVal,
  124827. vm,
  124828. key
  124829. ) {
  124830. var res = Object.create(parentVal || null);
  124831. if (childVal) {
  124832. true && assertObjectType(key, childVal, vm);
  124833. return extend(res, childVal)
  124834. } else {
  124835. return res
  124836. }
  124837. }
  124838. ASSET_TYPES.forEach(function (type) {
  124839. strats[type + 's'] = mergeAssets;
  124840. });
  124841. /**
  124842. * Watchers.
  124843. *
  124844. * Watchers hashes should not overwrite one
  124845. * another, so we merge them as arrays.
  124846. */
  124847. strats.watch = function (
  124848. parentVal,
  124849. childVal,
  124850. vm,
  124851. key
  124852. ) {
  124853. // work around Firefox's Object.prototype.watch...
  124854. if (parentVal === nativeWatch) { parentVal = undefined; }
  124855. if (childVal === nativeWatch) { childVal = undefined; }
  124856. /* istanbul ignore if */
  124857. if (!childVal) { return Object.create(parentVal || null) }
  124858. if (true) {
  124859. assertObjectType(key, childVal, vm);
  124860. }
  124861. if (!parentVal) { return childVal }
  124862. var ret = {};
  124863. extend(ret, parentVal);
  124864. for (var key$1 in childVal) {
  124865. var parent = ret[key$1];
  124866. var child = childVal[key$1];
  124867. if (parent && !Array.isArray(parent)) {
  124868. parent = [parent];
  124869. }
  124870. ret[key$1] = parent
  124871. ? parent.concat(child)
  124872. : Array.isArray(child) ? child : [child];
  124873. }
  124874. return ret
  124875. };
  124876. /**
  124877. * Other object hashes.
  124878. */
  124879. strats.props =
  124880. strats.methods =
  124881. strats.inject =
  124882. strats.computed = function (
  124883. parentVal,
  124884. childVal,
  124885. vm,
  124886. key
  124887. ) {
  124888. if (childVal && "development" !== 'production') {
  124889. assertObjectType(key, childVal, vm);
  124890. }
  124891. if (!parentVal) { return childVal }
  124892. var ret = Object.create(null);
  124893. extend(ret, parentVal);
  124894. if (childVal) { extend(ret, childVal); }
  124895. return ret
  124896. };
  124897. strats.provide = mergeDataOrFn;
  124898. /**
  124899. * Default strategy.
  124900. */
  124901. var defaultStrat = function (parentVal, childVal) {
  124902. return childVal === undefined
  124903. ? parentVal
  124904. : childVal
  124905. };
  124906. /**
  124907. * Validate component names
  124908. */
  124909. function checkComponents (options) {
  124910. for (var key in options.components) {
  124911. validateComponentName(key);
  124912. }
  124913. }
  124914. function validateComponentName (name) {
  124915. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  124916. warn(
  124917. 'Invalid component name: "' + name + '". Component names ' +
  124918. 'should conform to valid custom element name in html5 specification.'
  124919. );
  124920. }
  124921. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  124922. warn(
  124923. 'Do not use built-in or reserved HTML elements as component ' +
  124924. 'id: ' + name
  124925. );
  124926. }
  124927. }
  124928. /**
  124929. * Ensure all props option syntax are normalized into the
  124930. * Object-based format.
  124931. */
  124932. function normalizeProps (options, vm) {
  124933. var props = options.props;
  124934. if (!props) { return }
  124935. var res = {};
  124936. var i, val, name;
  124937. if (Array.isArray(props)) {
  124938. i = props.length;
  124939. while (i--) {
  124940. val = props[i];
  124941. if (typeof val === 'string') {
  124942. name = camelize(val);
  124943. res[name] = { type: null };
  124944. } else if (true) {
  124945. warn('props must be strings when using array syntax.');
  124946. }
  124947. }
  124948. } else if (isPlainObject(props)) {
  124949. for (var key in props) {
  124950. val = props[key];
  124951. name = camelize(key);
  124952. res[name] = isPlainObject(val)
  124953. ? val
  124954. : { type: val };
  124955. }
  124956. } else if (true) {
  124957. warn(
  124958. "Invalid value for option \"props\": expected an Array or an Object, " +
  124959. "but got " + (toRawType(props)) + ".",
  124960. vm
  124961. );
  124962. }
  124963. options.props = res;
  124964. }
  124965. /**
  124966. * Normalize all injections into Object-based format
  124967. */
  124968. function normalizeInject (options, vm) {
  124969. var inject = options.inject;
  124970. if (!inject) { return }
  124971. var normalized = options.inject = {};
  124972. if (Array.isArray(inject)) {
  124973. for (var i = 0; i < inject.length; i++) {
  124974. normalized[inject[i]] = { from: inject[i] };
  124975. }
  124976. } else if (isPlainObject(inject)) {
  124977. for (var key in inject) {
  124978. var val = inject[key];
  124979. normalized[key] = isPlainObject(val)
  124980. ? extend({ from: key }, val)
  124981. : { from: val };
  124982. }
  124983. } else if (true) {
  124984. warn(
  124985. "Invalid value for option \"inject\": expected an Array or an Object, " +
  124986. "but got " + (toRawType(inject)) + ".",
  124987. vm
  124988. );
  124989. }
  124990. }
  124991. /**
  124992. * Normalize raw function directives into object format.
  124993. */
  124994. function normalizeDirectives (options) {
  124995. var dirs = options.directives;
  124996. if (dirs) {
  124997. for (var key in dirs) {
  124998. var def$$1 = dirs[key];
  124999. if (typeof def$$1 === 'function') {
  125000. dirs[key] = { bind: def$$1, update: def$$1 };
  125001. }
  125002. }
  125003. }
  125004. }
  125005. function assertObjectType (name, value, vm) {
  125006. if (!isPlainObject(value)) {
  125007. warn(
  125008. "Invalid value for option \"" + name + "\": expected an Object, " +
  125009. "but got " + (toRawType(value)) + ".",
  125010. vm
  125011. );
  125012. }
  125013. }
  125014. /**
  125015. * Merge two option objects into a new one.
  125016. * Core utility used in both instantiation and inheritance.
  125017. */
  125018. function mergeOptions (
  125019. parent,
  125020. child,
  125021. vm
  125022. ) {
  125023. if (true) {
  125024. checkComponents(child);
  125025. }
  125026. if (typeof child === 'function') {
  125027. child = child.options;
  125028. }
  125029. normalizeProps(child, vm);
  125030. normalizeInject(child, vm);
  125031. normalizeDirectives(child);
  125032. // Apply extends and mixins on the child options,
  125033. // but only if it is a raw options object that isn't
  125034. // the result of another mergeOptions call.
  125035. // Only merged options has the _base property.
  125036. if (!child._base) {
  125037. if (child.extends) {
  125038. parent = mergeOptions(parent, child.extends, vm);
  125039. }
  125040. if (child.mixins) {
  125041. for (var i = 0, l = child.mixins.length; i < l; i++) {
  125042. parent = mergeOptions(parent, child.mixins[i], vm);
  125043. }
  125044. }
  125045. }
  125046. var options = {};
  125047. var key;
  125048. for (key in parent) {
  125049. mergeField(key);
  125050. }
  125051. for (key in child) {
  125052. if (!hasOwn(parent, key)) {
  125053. mergeField(key);
  125054. }
  125055. }
  125056. function mergeField (key) {
  125057. var strat = strats[key] || defaultStrat;
  125058. options[key] = strat(parent[key], child[key], vm, key);
  125059. }
  125060. return options
  125061. }
  125062. /**
  125063. * Resolve an asset.
  125064. * This function is used because child instances need access
  125065. * to assets defined in its ancestor chain.
  125066. */
  125067. function resolveAsset (
  125068. options,
  125069. type,
  125070. id,
  125071. warnMissing
  125072. ) {
  125073. /* istanbul ignore if */
  125074. if (typeof id !== 'string') {
  125075. return
  125076. }
  125077. var assets = options[type];
  125078. // check local registration variations first
  125079. if (hasOwn(assets, id)) { return assets[id] }
  125080. var camelizedId = camelize(id);
  125081. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  125082. var PascalCaseId = capitalize(camelizedId);
  125083. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  125084. // fallback to prototype chain
  125085. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  125086. if ( true && warnMissing && !res) {
  125087. warn(
  125088. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  125089. options
  125090. );
  125091. }
  125092. return res
  125093. }
  125094. /* */
  125095. function validateProp (
  125096. key,
  125097. propOptions,
  125098. propsData,
  125099. vm
  125100. ) {
  125101. var prop = propOptions[key];
  125102. var absent = !hasOwn(propsData, key);
  125103. var value = propsData[key];
  125104. // boolean casting
  125105. var booleanIndex = getTypeIndex(Boolean, prop.type);
  125106. if (booleanIndex > -1) {
  125107. if (absent && !hasOwn(prop, 'default')) {
  125108. value = false;
  125109. } else if (value === '' || value === hyphenate(key)) {
  125110. // only cast empty string / same name to boolean if
  125111. // boolean has higher priority
  125112. var stringIndex = getTypeIndex(String, prop.type);
  125113. if (stringIndex < 0 || booleanIndex < stringIndex) {
  125114. value = true;
  125115. }
  125116. }
  125117. }
  125118. // check default value
  125119. if (value === undefined) {
  125120. value = getPropDefaultValue(vm, prop, key);
  125121. // since the default value is a fresh copy,
  125122. // make sure to observe it.
  125123. var prevShouldObserve = shouldObserve;
  125124. toggleObserving(true);
  125125. observe(value);
  125126. toggleObserving(prevShouldObserve);
  125127. }
  125128. if (
  125129. true
  125130. ) {
  125131. assertProp(prop, key, value, vm, absent);
  125132. }
  125133. return value
  125134. }
  125135. /**
  125136. * Get the default value of a prop.
  125137. */
  125138. function getPropDefaultValue (vm, prop, key) {
  125139. // no default, return undefined
  125140. if (!hasOwn(prop, 'default')) {
  125141. return undefined
  125142. }
  125143. var def = prop.default;
  125144. // warn against non-factory defaults for Object & Array
  125145. if ( true && isObject(def)) {
  125146. warn(
  125147. 'Invalid default value for prop "' + key + '": ' +
  125148. 'Props with type Object/Array must use a factory function ' +
  125149. 'to return the default value.',
  125150. vm
  125151. );
  125152. }
  125153. // the raw prop value was also undefined from previous render,
  125154. // return previous default value to avoid unnecessary watcher trigger
  125155. if (vm && vm.$options.propsData &&
  125156. vm.$options.propsData[key] === undefined &&
  125157. vm._props[key] !== undefined
  125158. ) {
  125159. return vm._props[key]
  125160. }
  125161. // call factory function for non-Function types
  125162. // a value is Function if its prototype is function even across different execution context
  125163. return typeof def === 'function' && getType(prop.type) !== 'Function'
  125164. ? def.call(vm)
  125165. : def
  125166. }
  125167. /**
  125168. * Assert whether a prop is valid.
  125169. */
  125170. function assertProp (
  125171. prop,
  125172. name,
  125173. value,
  125174. vm,
  125175. absent
  125176. ) {
  125177. if (prop.required && absent) {
  125178. warn(
  125179. 'Missing required prop: "' + name + '"',
  125180. vm
  125181. );
  125182. return
  125183. }
  125184. if (value == null && !prop.required) {
  125185. return
  125186. }
  125187. var type = prop.type;
  125188. var valid = !type || type === true;
  125189. var expectedTypes = [];
  125190. if (type) {
  125191. if (!Array.isArray(type)) {
  125192. type = [type];
  125193. }
  125194. for (var i = 0; i < type.length && !valid; i++) {
  125195. var assertedType = assertType(value, type[i]);
  125196. expectedTypes.push(assertedType.expectedType || '');
  125197. valid = assertedType.valid;
  125198. }
  125199. }
  125200. if (!valid) {
  125201. warn(
  125202. getInvalidTypeMessage(name, value, expectedTypes),
  125203. vm
  125204. );
  125205. return
  125206. }
  125207. var validator = prop.validator;
  125208. if (validator) {
  125209. if (!validator(value)) {
  125210. warn(
  125211. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  125212. vm
  125213. );
  125214. }
  125215. }
  125216. }
  125217. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  125218. function assertType (value, type) {
  125219. var valid;
  125220. var expectedType = getType(type);
  125221. if (simpleCheckRE.test(expectedType)) {
  125222. var t = typeof value;
  125223. valid = t === expectedType.toLowerCase();
  125224. // for primitive wrapper objects
  125225. if (!valid && t === 'object') {
  125226. valid = value instanceof type;
  125227. }
  125228. } else if (expectedType === 'Object') {
  125229. valid = isPlainObject(value);
  125230. } else if (expectedType === 'Array') {
  125231. valid = Array.isArray(value);
  125232. } else {
  125233. valid = value instanceof type;
  125234. }
  125235. return {
  125236. valid: valid,
  125237. expectedType: expectedType
  125238. }
  125239. }
  125240. /**
  125241. * Use function string name to check built-in types,
  125242. * because a simple equality check will fail when running
  125243. * across different vms / iframes.
  125244. */
  125245. function getType (fn) {
  125246. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  125247. return match ? match[1] : ''
  125248. }
  125249. function isSameType (a, b) {
  125250. return getType(a) === getType(b)
  125251. }
  125252. function getTypeIndex (type, expectedTypes) {
  125253. if (!Array.isArray(expectedTypes)) {
  125254. return isSameType(expectedTypes, type) ? 0 : -1
  125255. }
  125256. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  125257. if (isSameType(expectedTypes[i], type)) {
  125258. return i
  125259. }
  125260. }
  125261. return -1
  125262. }
  125263. function getInvalidTypeMessage (name, value, expectedTypes) {
  125264. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  125265. " Expected " + (expectedTypes.map(capitalize).join(', '));
  125266. var expectedType = expectedTypes[0];
  125267. var receivedType = toRawType(value);
  125268. var expectedValue = styleValue(value, expectedType);
  125269. var receivedValue = styleValue(value, receivedType);
  125270. // check if we need to specify expected value
  125271. if (expectedTypes.length === 1 &&
  125272. isExplicable(expectedType) &&
  125273. !isBoolean(expectedType, receivedType)) {
  125274. message += " with value " + expectedValue;
  125275. }
  125276. message += ", got " + receivedType + " ";
  125277. // check if we need to specify received value
  125278. if (isExplicable(receivedType)) {
  125279. message += "with value " + receivedValue + ".";
  125280. }
  125281. return message
  125282. }
  125283. function styleValue (value, type) {
  125284. if (type === 'String') {
  125285. return ("\"" + value + "\"")
  125286. } else if (type === 'Number') {
  125287. return ("" + (Number(value)))
  125288. } else {
  125289. return ("" + value)
  125290. }
  125291. }
  125292. function isExplicable (value) {
  125293. var explicitTypes = ['string', 'number', 'boolean'];
  125294. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  125295. }
  125296. function isBoolean () {
  125297. var args = [], len = arguments.length;
  125298. while ( len-- ) args[ len ] = arguments[ len ];
  125299. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  125300. }
  125301. /* */
  125302. function handleError (err, vm, info) {
  125303. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  125304. // See: https://github.com/vuejs/vuex/issues/1505
  125305. pushTarget();
  125306. try {
  125307. if (vm) {
  125308. var cur = vm;
  125309. while ((cur = cur.$parent)) {
  125310. var hooks = cur.$options.errorCaptured;
  125311. if (hooks) {
  125312. for (var i = 0; i < hooks.length; i++) {
  125313. try {
  125314. var capture = hooks[i].call(cur, err, vm, info) === false;
  125315. if (capture) { return }
  125316. } catch (e) {
  125317. globalHandleError(e, cur, 'errorCaptured hook');
  125318. }
  125319. }
  125320. }
  125321. }
  125322. }
  125323. globalHandleError(err, vm, info);
  125324. } finally {
  125325. popTarget();
  125326. }
  125327. }
  125328. function invokeWithErrorHandling (
  125329. handler,
  125330. context,
  125331. args,
  125332. vm,
  125333. info
  125334. ) {
  125335. var res;
  125336. try {
  125337. res = args ? handler.apply(context, args) : handler.call(context);
  125338. if (res && !res._isVue && isPromise(res) && !res._handled) {
  125339. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  125340. // issue #9511
  125341. // avoid catch triggering multiple times when nested calls
  125342. res._handled = true;
  125343. }
  125344. } catch (e) {
  125345. handleError(e, vm, info);
  125346. }
  125347. return res
  125348. }
  125349. function globalHandleError (err, vm, info) {
  125350. if (config.errorHandler) {
  125351. try {
  125352. return config.errorHandler.call(null, err, vm, info)
  125353. } catch (e) {
  125354. // if the user intentionally throws the original error in the handler,
  125355. // do not log it twice
  125356. if (e !== err) {
  125357. logError(e, null, 'config.errorHandler');
  125358. }
  125359. }
  125360. }
  125361. logError(err, vm, info);
  125362. }
  125363. function logError (err, vm, info) {
  125364. if (true) {
  125365. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  125366. }
  125367. /* istanbul ignore else */
  125368. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  125369. console.error(err);
  125370. } else {
  125371. throw err
  125372. }
  125373. }
  125374. /* */
  125375. var isUsingMicroTask = false;
  125376. var callbacks = [];
  125377. var pending = false;
  125378. function flushCallbacks () {
  125379. pending = false;
  125380. var copies = callbacks.slice(0);
  125381. callbacks.length = 0;
  125382. for (var i = 0; i < copies.length; i++) {
  125383. copies[i]();
  125384. }
  125385. }
  125386. // Here we have async deferring wrappers using microtasks.
  125387. // In 2.5 we used (macro) tasks (in combination with microtasks).
  125388. // However, it has subtle problems when state is changed right before repaint
  125389. // (e.g. #6813, out-in transitions).
  125390. // Also, using (macro) tasks in event handler would cause some weird behaviors
  125391. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  125392. // So we now use microtasks everywhere, again.
  125393. // A major drawback of this tradeoff is that there are some scenarios
  125394. // where microtasks have too high a priority and fire in between supposedly
  125395. // sequential events (e.g. #4521, #6690, which have workarounds)
  125396. // or even between bubbling of the same event (#6566).
  125397. var timerFunc;
  125398. // The nextTick behavior leverages the microtask queue, which can be accessed
  125399. // via either native Promise.then or MutationObserver.
  125400. // MutationObserver has wider support, however it is seriously bugged in
  125401. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  125402. // completely stops working after triggering a few times... so, if native
  125403. // Promise is available, we will use it:
  125404. /* istanbul ignore next, $flow-disable-line */
  125405. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  125406. var p = Promise.resolve();
  125407. timerFunc = function () {
  125408. p.then(flushCallbacks);
  125409. // In problematic UIWebViews, Promise.then doesn't completely break, but
  125410. // it can get stuck in a weird state where callbacks are pushed into the
  125411. // microtask queue but the queue isn't being flushed, until the browser
  125412. // needs to do some other work, e.g. handle a timer. Therefore we can
  125413. // "force" the microtask queue to be flushed by adding an empty timer.
  125414. if (isIOS) { setTimeout(noop); }
  125415. };
  125416. isUsingMicroTask = true;
  125417. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  125418. isNative(MutationObserver) ||
  125419. // PhantomJS and iOS 7.x
  125420. MutationObserver.toString() === '[object MutationObserverConstructor]'
  125421. )) {
  125422. // Use MutationObserver where native Promise is not available,
  125423. // e.g. PhantomJS, iOS7, Android 4.4
  125424. // (#6466 MutationObserver is unreliable in IE11)
  125425. var counter = 1;
  125426. var observer = new MutationObserver(flushCallbacks);
  125427. var textNode = document.createTextNode(String(counter));
  125428. observer.observe(textNode, {
  125429. characterData: true
  125430. });
  125431. timerFunc = function () {
  125432. counter = (counter + 1) % 2;
  125433. textNode.data = String(counter);
  125434. };
  125435. isUsingMicroTask = true;
  125436. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  125437. // Fallback to setImmediate.
  125438. // Technically it leverages the (macro) task queue,
  125439. // but it is still a better choice than setTimeout.
  125440. timerFunc = function () {
  125441. setImmediate(flushCallbacks);
  125442. };
  125443. } else {
  125444. // Fallback to setTimeout.
  125445. timerFunc = function () {
  125446. setTimeout(flushCallbacks, 0);
  125447. };
  125448. }
  125449. function nextTick (cb, ctx) {
  125450. var _resolve;
  125451. callbacks.push(function () {
  125452. if (cb) {
  125453. try {
  125454. cb.call(ctx);
  125455. } catch (e) {
  125456. handleError(e, ctx, 'nextTick');
  125457. }
  125458. } else if (_resolve) {
  125459. _resolve(ctx);
  125460. }
  125461. });
  125462. if (!pending) {
  125463. pending = true;
  125464. timerFunc();
  125465. }
  125466. // $flow-disable-line
  125467. if (!cb && typeof Promise !== 'undefined') {
  125468. return new Promise(function (resolve) {
  125469. _resolve = resolve;
  125470. })
  125471. }
  125472. }
  125473. /* */
  125474. var mark;
  125475. var measure;
  125476. if (true) {
  125477. var perf = inBrowser && window.performance;
  125478. /* istanbul ignore if */
  125479. if (
  125480. perf &&
  125481. perf.mark &&
  125482. perf.measure &&
  125483. perf.clearMarks &&
  125484. perf.clearMeasures
  125485. ) {
  125486. mark = function (tag) { return perf.mark(tag); };
  125487. measure = function (name, startTag, endTag) {
  125488. perf.measure(name, startTag, endTag);
  125489. perf.clearMarks(startTag);
  125490. perf.clearMarks(endTag);
  125491. // perf.clearMeasures(name)
  125492. };
  125493. }
  125494. }
  125495. /* not type checking this file because flow doesn't play well with Proxy */
  125496. var initProxy;
  125497. if (true) {
  125498. var allowedGlobals = makeMap(
  125499. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  125500. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  125501. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  125502. 'require' // for Webpack/Browserify
  125503. );
  125504. var warnNonPresent = function (target, key) {
  125505. warn(
  125506. "Property or method \"" + key + "\" is not defined on the instance but " +
  125507. 'referenced during render. Make sure that this property is reactive, ' +
  125508. 'either in the data option, or for class-based components, by ' +
  125509. 'initializing the property. ' +
  125510. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  125511. target
  125512. );
  125513. };
  125514. var warnReservedPrefix = function (target, key) {
  125515. warn(
  125516. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  125517. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  125518. 'prevent conflicts with Vue internals. ' +
  125519. 'See: https://vuejs.org/v2/api/#data',
  125520. target
  125521. );
  125522. };
  125523. var hasProxy =
  125524. typeof Proxy !== 'undefined' && isNative(Proxy);
  125525. if (hasProxy) {
  125526. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  125527. config.keyCodes = new Proxy(config.keyCodes, {
  125528. set: function set (target, key, value) {
  125529. if (isBuiltInModifier(key)) {
  125530. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  125531. return false
  125532. } else {
  125533. target[key] = value;
  125534. return true
  125535. }
  125536. }
  125537. });
  125538. }
  125539. var hasHandler = {
  125540. has: function has (target, key) {
  125541. var has = key in target;
  125542. var isAllowed = allowedGlobals(key) ||
  125543. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  125544. if (!has && !isAllowed) {
  125545. if (key in target.$data) { warnReservedPrefix(target, key); }
  125546. else { warnNonPresent(target, key); }
  125547. }
  125548. return has || !isAllowed
  125549. }
  125550. };
  125551. var getHandler = {
  125552. get: function get (target, key) {
  125553. if (typeof key === 'string' && !(key in target)) {
  125554. if (key in target.$data) { warnReservedPrefix(target, key); }
  125555. else { warnNonPresent(target, key); }
  125556. }
  125557. return target[key]
  125558. }
  125559. };
  125560. initProxy = function initProxy (vm) {
  125561. if (hasProxy) {
  125562. // determine which proxy handler to use
  125563. var options = vm.$options;
  125564. var handlers = options.render && options.render._withStripped
  125565. ? getHandler
  125566. : hasHandler;
  125567. vm._renderProxy = new Proxy(vm, handlers);
  125568. } else {
  125569. vm._renderProxy = vm;
  125570. }
  125571. };
  125572. }
  125573. /* */
  125574. var seenObjects = new _Set();
  125575. /**
  125576. * Recursively traverse an object to evoke all converted
  125577. * getters, so that every nested property inside the object
  125578. * is collected as a "deep" dependency.
  125579. */
  125580. function traverse (val) {
  125581. _traverse(val, seenObjects);
  125582. seenObjects.clear();
  125583. }
  125584. function _traverse (val, seen) {
  125585. var i, keys;
  125586. var isA = Array.isArray(val);
  125587. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  125588. return
  125589. }
  125590. if (val.__ob__) {
  125591. var depId = val.__ob__.dep.id;
  125592. if (seen.has(depId)) {
  125593. return
  125594. }
  125595. seen.add(depId);
  125596. }
  125597. if (isA) {
  125598. i = val.length;
  125599. while (i--) { _traverse(val[i], seen); }
  125600. } else {
  125601. keys = Object.keys(val);
  125602. i = keys.length;
  125603. while (i--) { _traverse(val[keys[i]], seen); }
  125604. }
  125605. }
  125606. /* */
  125607. var normalizeEvent = cached(function (name) {
  125608. var passive = name.charAt(0) === '&';
  125609. name = passive ? name.slice(1) : name;
  125610. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  125611. name = once$$1 ? name.slice(1) : name;
  125612. var capture = name.charAt(0) === '!';
  125613. name = capture ? name.slice(1) : name;
  125614. return {
  125615. name: name,
  125616. once: once$$1,
  125617. capture: capture,
  125618. passive: passive
  125619. }
  125620. });
  125621. function createFnInvoker (fns, vm) {
  125622. function invoker () {
  125623. var arguments$1 = arguments;
  125624. var fns = invoker.fns;
  125625. if (Array.isArray(fns)) {
  125626. var cloned = fns.slice();
  125627. for (var i = 0; i < cloned.length; i++) {
  125628. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  125629. }
  125630. } else {
  125631. // return handler return value for single handlers
  125632. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  125633. }
  125634. }
  125635. invoker.fns = fns;
  125636. return invoker
  125637. }
  125638. function updateListeners (
  125639. on,
  125640. oldOn,
  125641. add,
  125642. remove$$1,
  125643. createOnceHandler,
  125644. vm
  125645. ) {
  125646. var name, def$$1, cur, old, event;
  125647. for (name in on) {
  125648. def$$1 = cur = on[name];
  125649. old = oldOn[name];
  125650. event = normalizeEvent(name);
  125651. if (isUndef(cur)) {
  125652. true && warn(
  125653. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  125654. vm
  125655. );
  125656. } else if (isUndef(old)) {
  125657. if (isUndef(cur.fns)) {
  125658. cur = on[name] = createFnInvoker(cur, vm);
  125659. }
  125660. if (isTrue(event.once)) {
  125661. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  125662. }
  125663. add(event.name, cur, event.capture, event.passive, event.params);
  125664. } else if (cur !== old) {
  125665. old.fns = cur;
  125666. on[name] = old;
  125667. }
  125668. }
  125669. for (name in oldOn) {
  125670. if (isUndef(on[name])) {
  125671. event = normalizeEvent(name);
  125672. remove$$1(event.name, oldOn[name], event.capture);
  125673. }
  125674. }
  125675. }
  125676. /* */
  125677. function mergeVNodeHook (def, hookKey, hook) {
  125678. if (def instanceof VNode) {
  125679. def = def.data.hook || (def.data.hook = {});
  125680. }
  125681. var invoker;
  125682. var oldHook = def[hookKey];
  125683. function wrappedHook () {
  125684. hook.apply(this, arguments);
  125685. // important: remove merged hook to ensure it's called only once
  125686. // and prevent memory leak
  125687. remove(invoker.fns, wrappedHook);
  125688. }
  125689. if (isUndef(oldHook)) {
  125690. // no existing hook
  125691. invoker = createFnInvoker([wrappedHook]);
  125692. } else {
  125693. /* istanbul ignore if */
  125694. if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
  125695. // already a merged invoker
  125696. invoker = oldHook;
  125697. invoker.fns.push(wrappedHook);
  125698. } else {
  125699. // existing plain hook
  125700. invoker = createFnInvoker([oldHook, wrappedHook]);
  125701. }
  125702. }
  125703. invoker.merged = true;
  125704. def[hookKey] = invoker;
  125705. }
  125706. /* */
  125707. function extractPropsFromVNodeData (
  125708. data,
  125709. Ctor,
  125710. tag
  125711. ) {
  125712. // we are only extracting raw values here.
  125713. // validation and default values are handled in the child
  125714. // component itself.
  125715. var propOptions = Ctor.options.props;
  125716. if (isUndef(propOptions)) {
  125717. return
  125718. }
  125719. var res = {};
  125720. var attrs = data.attrs;
  125721. var props = data.props;
  125722. if (isDef(attrs) || isDef(props)) {
  125723. for (var key in propOptions) {
  125724. var altKey = hyphenate(key);
  125725. if (true) {
  125726. var keyInLowerCase = key.toLowerCase();
  125727. if (
  125728. key !== keyInLowerCase &&
  125729. attrs && hasOwn(attrs, keyInLowerCase)
  125730. ) {
  125731. tip(
  125732. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  125733. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  125734. " \"" + key + "\". " +
  125735. "Note that HTML attributes are case-insensitive and camelCased " +
  125736. "props need to use their kebab-case equivalents when using in-DOM " +
  125737. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  125738. );
  125739. }
  125740. }
  125741. checkProp(res, props, key, altKey, true) ||
  125742. checkProp(res, attrs, key, altKey, false);
  125743. }
  125744. }
  125745. return res
  125746. }
  125747. function checkProp (
  125748. res,
  125749. hash,
  125750. key,
  125751. altKey,
  125752. preserve
  125753. ) {
  125754. if (isDef(hash)) {
  125755. if (hasOwn(hash, key)) {
  125756. res[key] = hash[key];
  125757. if (!preserve) {
  125758. delete hash[key];
  125759. }
  125760. return true
  125761. } else if (hasOwn(hash, altKey)) {
  125762. res[key] = hash[altKey];
  125763. if (!preserve) {
  125764. delete hash[altKey];
  125765. }
  125766. return true
  125767. }
  125768. }
  125769. return false
  125770. }
  125771. /* */
  125772. // The template compiler attempts to minimize the need for normalization by
  125773. // statically analyzing the template at compile time.
  125774. //
  125775. // For plain HTML markup, normalization can be completely skipped because the
  125776. // generated render function is guaranteed to return Array<VNode>. There are
  125777. // two cases where extra normalization is needed:
  125778. // 1. When the children contains components - because a functional component
  125779. // may return an Array instead of a single root. In this case, just a simple
  125780. // normalization is needed - if any child is an Array, we flatten the whole
  125781. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  125782. // because functional components already normalize their own children.
  125783. function simpleNormalizeChildren (children) {
  125784. for (var i = 0; i < children.length; i++) {
  125785. if (Array.isArray(children[i])) {
  125786. return Array.prototype.concat.apply([], children)
  125787. }
  125788. }
  125789. return children
  125790. }
  125791. // 2. When the children contains constructs that always generated nested Arrays,
  125792. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  125793. // with hand-written render functions / JSX. In such cases a full normalization
  125794. // is needed to cater to all possible types of children values.
  125795. function normalizeChildren (children) {
  125796. return isPrimitive(children)
  125797. ? [createTextVNode(children)]
  125798. : Array.isArray(children)
  125799. ? normalizeArrayChildren(children)
  125800. : undefined
  125801. }
  125802. function isTextNode (node) {
  125803. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  125804. }
  125805. function normalizeArrayChildren (children, nestedIndex) {
  125806. var res = [];
  125807. var i, c, lastIndex, last;
  125808. for (i = 0; i < children.length; i++) {
  125809. c = children[i];
  125810. if (isUndef(c) || typeof c === 'boolean') { continue }
  125811. lastIndex = res.length - 1;
  125812. last = res[lastIndex];
  125813. // nested
  125814. if (Array.isArray(c)) {
  125815. if (c.length > 0) {
  125816. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  125817. // merge adjacent text nodes
  125818. if (isTextNode(c[0]) && isTextNode(last)) {
  125819. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  125820. c.shift();
  125821. }
  125822. res.push.apply(res, c);
  125823. }
  125824. } else if (isPrimitive(c)) {
  125825. if (isTextNode(last)) {
  125826. // merge adjacent text nodes
  125827. // this is necessary for SSR hydration because text nodes are
  125828. // essentially merged when rendered to HTML strings
  125829. res[lastIndex] = createTextVNode(last.text + c);
  125830. } else if (c !== '') {
  125831. // convert primitive to vnode
  125832. res.push(createTextVNode(c));
  125833. }
  125834. } else {
  125835. if (isTextNode(c) && isTextNode(last)) {
  125836. // merge adjacent text nodes
  125837. res[lastIndex] = createTextVNode(last.text + c.text);
  125838. } else {
  125839. // default key for nested array children (likely generated by v-for)
  125840. if (isTrue(children._isVList) &&
  125841. isDef(c.tag) &&
  125842. isUndef(c.key) &&
  125843. isDef(nestedIndex)) {
  125844. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  125845. }
  125846. res.push(c);
  125847. }
  125848. }
  125849. }
  125850. return res
  125851. }
  125852. /* */
  125853. function initProvide (vm) {
  125854. var provide = vm.$options.provide;
  125855. if (provide) {
  125856. vm._provided = typeof provide === 'function'
  125857. ? provide.call(vm)
  125858. : provide;
  125859. }
  125860. }
  125861. function initInjections (vm) {
  125862. var result = resolveInject(vm.$options.inject, vm);
  125863. if (result) {
  125864. toggleObserving(false);
  125865. Object.keys(result).forEach(function (key) {
  125866. /* istanbul ignore else */
  125867. if (true) {
  125868. defineReactive$$1(vm, key, result[key], function () {
  125869. warn(
  125870. "Avoid mutating an injected value directly since the changes will be " +
  125871. "overwritten whenever the provided component re-renders. " +
  125872. "injection being mutated: \"" + key + "\"",
  125873. vm
  125874. );
  125875. });
  125876. } else {}
  125877. });
  125878. toggleObserving(true);
  125879. }
  125880. }
  125881. function resolveInject (inject, vm) {
  125882. if (inject) {
  125883. // inject is :any because flow is not smart enough to figure out cached
  125884. var result = Object.create(null);
  125885. var keys = hasSymbol
  125886. ? Reflect.ownKeys(inject)
  125887. : Object.keys(inject);
  125888. for (var i = 0; i < keys.length; i++) {
  125889. var key = keys[i];
  125890. // #6574 in case the inject object is observed...
  125891. if (key === '__ob__') { continue }
  125892. var provideKey = inject[key].from;
  125893. var source = vm;
  125894. while (source) {
  125895. if (source._provided && hasOwn(source._provided, provideKey)) {
  125896. result[key] = source._provided[provideKey];
  125897. break
  125898. }
  125899. source = source.$parent;
  125900. }
  125901. if (!source) {
  125902. if ('default' in inject[key]) {
  125903. var provideDefault = inject[key].default;
  125904. result[key] = typeof provideDefault === 'function'
  125905. ? provideDefault.call(vm)
  125906. : provideDefault;
  125907. } else if (true) {
  125908. warn(("Injection \"" + key + "\" not found"), vm);
  125909. }
  125910. }
  125911. }
  125912. return result
  125913. }
  125914. }
  125915. /* */
  125916. /**
  125917. * Runtime helper for resolving raw children VNodes into a slot object.
  125918. */
  125919. function resolveSlots (
  125920. children,
  125921. context
  125922. ) {
  125923. if (!children || !children.length) {
  125924. return {}
  125925. }
  125926. var slots = {};
  125927. for (var i = 0, l = children.length; i < l; i++) {
  125928. var child = children[i];
  125929. var data = child.data;
  125930. // remove slot attribute if the node is resolved as a Vue slot node
  125931. if (data && data.attrs && data.attrs.slot) {
  125932. delete data.attrs.slot;
  125933. }
  125934. // named slots should only be respected if the vnode was rendered in the
  125935. // same context.
  125936. if ((child.context === context || child.fnContext === context) &&
  125937. data && data.slot != null
  125938. ) {
  125939. var name = data.slot;
  125940. var slot = (slots[name] || (slots[name] = []));
  125941. if (child.tag === 'template') {
  125942. slot.push.apply(slot, child.children || []);
  125943. } else {
  125944. slot.push(child);
  125945. }
  125946. } else {
  125947. (slots.default || (slots.default = [])).push(child);
  125948. }
  125949. }
  125950. // ignore slots that contains only whitespace
  125951. for (var name$1 in slots) {
  125952. if (slots[name$1].every(isWhitespace)) {
  125953. delete slots[name$1];
  125954. }
  125955. }
  125956. return slots
  125957. }
  125958. function isWhitespace (node) {
  125959. return (node.isComment && !node.asyncFactory) || node.text === ' '
  125960. }
  125961. /* */
  125962. function normalizeScopedSlots (
  125963. slots,
  125964. normalSlots,
  125965. prevSlots
  125966. ) {
  125967. var res;
  125968. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  125969. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  125970. var key = slots && slots.$key;
  125971. if (!slots) {
  125972. res = {};
  125973. } else if (slots._normalized) {
  125974. // fast path 1: child component re-render only, parent did not change
  125975. return slots._normalized
  125976. } else if (
  125977. isStable &&
  125978. prevSlots &&
  125979. prevSlots !== emptyObject &&
  125980. key === prevSlots.$key &&
  125981. !hasNormalSlots &&
  125982. !prevSlots.$hasNormal
  125983. ) {
  125984. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  125985. // only need to normalize once
  125986. return prevSlots
  125987. } else {
  125988. res = {};
  125989. for (var key$1 in slots) {
  125990. if (slots[key$1] && key$1[0] !== '$') {
  125991. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  125992. }
  125993. }
  125994. }
  125995. // expose normal slots on scopedSlots
  125996. for (var key$2 in normalSlots) {
  125997. if (!(key$2 in res)) {
  125998. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  125999. }
  126000. }
  126001. // avoriaz seems to mock a non-extensible $scopedSlots object
  126002. // and when that is passed down this would cause an error
  126003. if (slots && Object.isExtensible(slots)) {
  126004. (slots)._normalized = res;
  126005. }
  126006. def(res, '$stable', isStable);
  126007. def(res, '$key', key);
  126008. def(res, '$hasNormal', hasNormalSlots);
  126009. return res
  126010. }
  126011. function normalizeScopedSlot(normalSlots, key, fn) {
  126012. var normalized = function () {
  126013. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  126014. res = res && typeof res === 'object' && !Array.isArray(res)
  126015. ? [res] // single vnode
  126016. : normalizeChildren(res);
  126017. return res && (
  126018. res.length === 0 ||
  126019. (res.length === 1 && res[0].isComment) // #9658
  126020. ) ? undefined
  126021. : res
  126022. };
  126023. // this is a slot using the new v-slot syntax without scope. although it is
  126024. // compiled as a scoped slot, render fn users would expect it to be present
  126025. // on this.$slots because the usage is semantically a normal slot.
  126026. if (fn.proxy) {
  126027. Object.defineProperty(normalSlots, key, {
  126028. get: normalized,
  126029. enumerable: true,
  126030. configurable: true
  126031. });
  126032. }
  126033. return normalized
  126034. }
  126035. function proxyNormalSlot(slots, key) {
  126036. return function () { return slots[key]; }
  126037. }
  126038. /* */
  126039. /**
  126040. * Runtime helper for rendering v-for lists.
  126041. */
  126042. function renderList (
  126043. val,
  126044. render
  126045. ) {
  126046. var ret, i, l, keys, key;
  126047. if (Array.isArray(val) || typeof val === 'string') {
  126048. ret = new Array(val.length);
  126049. for (i = 0, l = val.length; i < l; i++) {
  126050. ret[i] = render(val[i], i);
  126051. }
  126052. } else if (typeof val === 'number') {
  126053. ret = new Array(val);
  126054. for (i = 0; i < val; i++) {
  126055. ret[i] = render(i + 1, i);
  126056. }
  126057. } else if (isObject(val)) {
  126058. if (hasSymbol && val[Symbol.iterator]) {
  126059. ret = [];
  126060. var iterator = val[Symbol.iterator]();
  126061. var result = iterator.next();
  126062. while (!result.done) {
  126063. ret.push(render(result.value, ret.length));
  126064. result = iterator.next();
  126065. }
  126066. } else {
  126067. keys = Object.keys(val);
  126068. ret = new Array(keys.length);
  126069. for (i = 0, l = keys.length; i < l; i++) {
  126070. key = keys[i];
  126071. ret[i] = render(val[key], key, i);
  126072. }
  126073. }
  126074. }
  126075. if (!isDef(ret)) {
  126076. ret = [];
  126077. }
  126078. (ret)._isVList = true;
  126079. return ret
  126080. }
  126081. /* */
  126082. /**
  126083. * Runtime helper for rendering <slot>
  126084. */
  126085. function renderSlot (
  126086. name,
  126087. fallback,
  126088. props,
  126089. bindObject
  126090. ) {
  126091. var scopedSlotFn = this.$scopedSlots[name];
  126092. var nodes;
  126093. if (scopedSlotFn) { // scoped slot
  126094. props = props || {};
  126095. if (bindObject) {
  126096. if ( true && !isObject(bindObject)) {
  126097. warn(
  126098. 'slot v-bind without argument expects an Object',
  126099. this
  126100. );
  126101. }
  126102. props = extend(extend({}, bindObject), props);
  126103. }
  126104. nodes = scopedSlotFn(props) || fallback;
  126105. } else {
  126106. nodes = this.$slots[name] || fallback;
  126107. }
  126108. var target = props && props.slot;
  126109. if (target) {
  126110. return this.$createElement('template', { slot: target }, nodes)
  126111. } else {
  126112. return nodes
  126113. }
  126114. }
  126115. /* */
  126116. /**
  126117. * Runtime helper for resolving filters
  126118. */
  126119. function resolveFilter (id) {
  126120. return resolveAsset(this.$options, 'filters', id, true) || identity
  126121. }
  126122. /* */
  126123. function isKeyNotMatch (expect, actual) {
  126124. if (Array.isArray(expect)) {
  126125. return expect.indexOf(actual) === -1
  126126. } else {
  126127. return expect !== actual
  126128. }
  126129. }
  126130. /**
  126131. * Runtime helper for checking keyCodes from config.
  126132. * exposed as Vue.prototype._k
  126133. * passing in eventKeyName as last argument separately for backwards compat
  126134. */
  126135. function checkKeyCodes (
  126136. eventKeyCode,
  126137. key,
  126138. builtInKeyCode,
  126139. eventKeyName,
  126140. builtInKeyName
  126141. ) {
  126142. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  126143. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  126144. return isKeyNotMatch(builtInKeyName, eventKeyName)
  126145. } else if (mappedKeyCode) {
  126146. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  126147. } else if (eventKeyName) {
  126148. return hyphenate(eventKeyName) !== key
  126149. }
  126150. }
  126151. /* */
  126152. /**
  126153. * Runtime helper for merging v-bind="object" into a VNode's data.
  126154. */
  126155. function bindObjectProps (
  126156. data,
  126157. tag,
  126158. value,
  126159. asProp,
  126160. isSync
  126161. ) {
  126162. if (value) {
  126163. if (!isObject(value)) {
  126164. true && warn(
  126165. 'v-bind without argument expects an Object or Array value',
  126166. this
  126167. );
  126168. } else {
  126169. if (Array.isArray(value)) {
  126170. value = toObject(value);
  126171. }
  126172. var hash;
  126173. var loop = function ( key ) {
  126174. if (
  126175. key === 'class' ||
  126176. key === 'style' ||
  126177. isReservedAttribute(key)
  126178. ) {
  126179. hash = data;
  126180. } else {
  126181. var type = data.attrs && data.attrs.type;
  126182. hash = asProp || config.mustUseProp(tag, type, key)
  126183. ? data.domProps || (data.domProps = {})
  126184. : data.attrs || (data.attrs = {});
  126185. }
  126186. var camelizedKey = camelize(key);
  126187. var hyphenatedKey = hyphenate(key);
  126188. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  126189. hash[key] = value[key];
  126190. if (isSync) {
  126191. var on = data.on || (data.on = {});
  126192. on[("update:" + key)] = function ($event) {
  126193. value[key] = $event;
  126194. };
  126195. }
  126196. }
  126197. };
  126198. for (var key in value) loop( key );
  126199. }
  126200. }
  126201. return data
  126202. }
  126203. /* */
  126204. /**
  126205. * Runtime helper for rendering static trees.
  126206. */
  126207. function renderStatic (
  126208. index,
  126209. isInFor
  126210. ) {
  126211. var cached = this._staticTrees || (this._staticTrees = []);
  126212. var tree = cached[index];
  126213. // if has already-rendered static tree and not inside v-for,
  126214. // we can reuse the same tree.
  126215. if (tree && !isInFor) {
  126216. return tree
  126217. }
  126218. // otherwise, render a fresh tree.
  126219. tree = cached[index] = this.$options.staticRenderFns[index].call(
  126220. this._renderProxy,
  126221. null,
  126222. this // for render fns generated for functional component templates
  126223. );
  126224. markStatic(tree, ("__static__" + index), false);
  126225. return tree
  126226. }
  126227. /**
  126228. * Runtime helper for v-once.
  126229. * Effectively it means marking the node as static with a unique key.
  126230. */
  126231. function markOnce (
  126232. tree,
  126233. index,
  126234. key
  126235. ) {
  126236. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  126237. return tree
  126238. }
  126239. function markStatic (
  126240. tree,
  126241. key,
  126242. isOnce
  126243. ) {
  126244. if (Array.isArray(tree)) {
  126245. for (var i = 0; i < tree.length; i++) {
  126246. if (tree[i] && typeof tree[i] !== 'string') {
  126247. markStaticNode(tree[i], (key + "_" + i), isOnce);
  126248. }
  126249. }
  126250. } else {
  126251. markStaticNode(tree, key, isOnce);
  126252. }
  126253. }
  126254. function markStaticNode (node, key, isOnce) {
  126255. node.isStatic = true;
  126256. node.key = key;
  126257. node.isOnce = isOnce;
  126258. }
  126259. /* */
  126260. function bindObjectListeners (data, value) {
  126261. if (value) {
  126262. if (!isPlainObject(value)) {
  126263. true && warn(
  126264. 'v-on without argument expects an Object value',
  126265. this
  126266. );
  126267. } else {
  126268. var on = data.on = data.on ? extend({}, data.on) : {};
  126269. for (var key in value) {
  126270. var existing = on[key];
  126271. var ours = value[key];
  126272. on[key] = existing ? [].concat(existing, ours) : ours;
  126273. }
  126274. }
  126275. }
  126276. return data
  126277. }
  126278. /* */
  126279. function resolveScopedSlots (
  126280. fns, // see flow/vnode
  126281. res,
  126282. // the following are added in 2.6
  126283. hasDynamicKeys,
  126284. contentHashKey
  126285. ) {
  126286. res = res || { $stable: !hasDynamicKeys };
  126287. for (var i = 0; i < fns.length; i++) {
  126288. var slot = fns[i];
  126289. if (Array.isArray(slot)) {
  126290. resolveScopedSlots(slot, res, hasDynamicKeys);
  126291. } else if (slot) {
  126292. // marker for reverse proxying v-slot without scope on this.$slots
  126293. if (slot.proxy) {
  126294. slot.fn.proxy = true;
  126295. }
  126296. res[slot.key] = slot.fn;
  126297. }
  126298. }
  126299. if (contentHashKey) {
  126300. (res).$key = contentHashKey;
  126301. }
  126302. return res
  126303. }
  126304. /* */
  126305. function bindDynamicKeys (baseObj, values) {
  126306. for (var i = 0; i < values.length; i += 2) {
  126307. var key = values[i];
  126308. if (typeof key === 'string' && key) {
  126309. baseObj[values[i]] = values[i + 1];
  126310. } else if ( true && key !== '' && key !== null) {
  126311. // null is a special value for explicitly removing a binding
  126312. warn(
  126313. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  126314. this
  126315. );
  126316. }
  126317. }
  126318. return baseObj
  126319. }
  126320. // helper to dynamically append modifier runtime markers to event names.
  126321. // ensure only append when value is already string, otherwise it will be cast
  126322. // to string and cause the type check to miss.
  126323. function prependModifier (value, symbol) {
  126324. return typeof value === 'string' ? symbol + value : value
  126325. }
  126326. /* */
  126327. function installRenderHelpers (target) {
  126328. target._o = markOnce;
  126329. target._n = toNumber;
  126330. target._s = toString;
  126331. target._l = renderList;
  126332. target._t = renderSlot;
  126333. target._q = looseEqual;
  126334. target._i = looseIndexOf;
  126335. target._m = renderStatic;
  126336. target._f = resolveFilter;
  126337. target._k = checkKeyCodes;
  126338. target._b = bindObjectProps;
  126339. target._v = createTextVNode;
  126340. target._e = createEmptyVNode;
  126341. target._u = resolveScopedSlots;
  126342. target._g = bindObjectListeners;
  126343. target._d = bindDynamicKeys;
  126344. target._p = prependModifier;
  126345. }
  126346. /* */
  126347. function FunctionalRenderContext (
  126348. data,
  126349. props,
  126350. children,
  126351. parent,
  126352. Ctor
  126353. ) {
  126354. var this$1 = this;
  126355. var options = Ctor.options;
  126356. // ensure the createElement function in functional components
  126357. // gets a unique context - this is necessary for correct named slot check
  126358. var contextVm;
  126359. if (hasOwn(parent, '_uid')) {
  126360. contextVm = Object.create(parent);
  126361. // $flow-disable-line
  126362. contextVm._original = parent;
  126363. } else {
  126364. // the context vm passed in is a functional context as well.
  126365. // in this case we want to make sure we are able to get a hold to the
  126366. // real context instance.
  126367. contextVm = parent;
  126368. // $flow-disable-line
  126369. parent = parent._original;
  126370. }
  126371. var isCompiled = isTrue(options._compiled);
  126372. var needNormalization = !isCompiled;
  126373. this.data = data;
  126374. this.props = props;
  126375. this.children = children;
  126376. this.parent = parent;
  126377. this.listeners = data.on || emptyObject;
  126378. this.injections = resolveInject(options.inject, parent);
  126379. this.slots = function () {
  126380. if (!this$1.$slots) {
  126381. normalizeScopedSlots(
  126382. data.scopedSlots,
  126383. this$1.$slots = resolveSlots(children, parent)
  126384. );
  126385. }
  126386. return this$1.$slots
  126387. };
  126388. Object.defineProperty(this, 'scopedSlots', ({
  126389. enumerable: true,
  126390. get: function get () {
  126391. return normalizeScopedSlots(data.scopedSlots, this.slots())
  126392. }
  126393. }));
  126394. // support for compiled functional template
  126395. if (isCompiled) {
  126396. // exposing $options for renderStatic()
  126397. this.$options = options;
  126398. // pre-resolve slots for renderSlot()
  126399. this.$slots = this.slots();
  126400. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  126401. }
  126402. if (options._scopeId) {
  126403. this._c = function (a, b, c, d) {
  126404. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  126405. if (vnode && !Array.isArray(vnode)) {
  126406. vnode.fnScopeId = options._scopeId;
  126407. vnode.fnContext = parent;
  126408. }
  126409. return vnode
  126410. };
  126411. } else {
  126412. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  126413. }
  126414. }
  126415. installRenderHelpers(FunctionalRenderContext.prototype);
  126416. function createFunctionalComponent (
  126417. Ctor,
  126418. propsData,
  126419. data,
  126420. contextVm,
  126421. children
  126422. ) {
  126423. var options = Ctor.options;
  126424. var props = {};
  126425. var propOptions = options.props;
  126426. if (isDef(propOptions)) {
  126427. for (var key in propOptions) {
  126428. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  126429. }
  126430. } else {
  126431. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  126432. if (isDef(data.props)) { mergeProps(props, data.props); }
  126433. }
  126434. var renderContext = new FunctionalRenderContext(
  126435. data,
  126436. props,
  126437. children,
  126438. contextVm,
  126439. Ctor
  126440. );
  126441. var vnode = options.render.call(null, renderContext._c, renderContext);
  126442. if (vnode instanceof VNode) {
  126443. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  126444. } else if (Array.isArray(vnode)) {
  126445. var vnodes = normalizeChildren(vnode) || [];
  126446. var res = new Array(vnodes.length);
  126447. for (var i = 0; i < vnodes.length; i++) {
  126448. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  126449. }
  126450. return res
  126451. }
  126452. }
  126453. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  126454. // #7817 clone node before setting fnContext, otherwise if the node is reused
  126455. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  126456. // that should not be matched to match.
  126457. var clone = cloneVNode(vnode);
  126458. clone.fnContext = contextVm;
  126459. clone.fnOptions = options;
  126460. if (true) {
  126461. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  126462. }
  126463. if (data.slot) {
  126464. (clone.data || (clone.data = {})).slot = data.slot;
  126465. }
  126466. return clone
  126467. }
  126468. function mergeProps (to, from) {
  126469. for (var key in from) {
  126470. to[camelize(key)] = from[key];
  126471. }
  126472. }
  126473. /* */
  126474. /* */
  126475. /* */
  126476. /* */
  126477. // inline hooks to be invoked on component VNodes during patch
  126478. var componentVNodeHooks = {
  126479. init: function init (vnode, hydrating) {
  126480. if (
  126481. vnode.componentInstance &&
  126482. !vnode.componentInstance._isDestroyed &&
  126483. vnode.data.keepAlive
  126484. ) {
  126485. // kept-alive components, treat as a patch
  126486. var mountedNode = vnode; // work around flow
  126487. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  126488. } else {
  126489. var child = vnode.componentInstance = createComponentInstanceForVnode(
  126490. vnode,
  126491. activeInstance
  126492. );
  126493. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  126494. }
  126495. },
  126496. prepatch: function prepatch (oldVnode, vnode) {
  126497. var options = vnode.componentOptions;
  126498. var child = vnode.componentInstance = oldVnode.componentInstance;
  126499. updateChildComponent(
  126500. child,
  126501. options.propsData, // updated props
  126502. options.listeners, // updated listeners
  126503. vnode, // new parent vnode
  126504. options.children // new children
  126505. );
  126506. },
  126507. insert: function insert (vnode) {
  126508. var context = vnode.context;
  126509. var componentInstance = vnode.componentInstance;
  126510. if (!componentInstance._isMounted) {
  126511. componentInstance._isMounted = true;
  126512. callHook(componentInstance, 'mounted');
  126513. }
  126514. if (vnode.data.keepAlive) {
  126515. if (context._isMounted) {
  126516. // vue-router#1212
  126517. // During updates, a kept-alive component's child components may
  126518. // change, so directly walking the tree here may call activated hooks
  126519. // on incorrect children. Instead we push them into a queue which will
  126520. // be processed after the whole patch process ended.
  126521. queueActivatedComponent(componentInstance);
  126522. } else {
  126523. activateChildComponent(componentInstance, true /* direct */);
  126524. }
  126525. }
  126526. },
  126527. destroy: function destroy (vnode) {
  126528. var componentInstance = vnode.componentInstance;
  126529. if (!componentInstance._isDestroyed) {
  126530. if (!vnode.data.keepAlive) {
  126531. componentInstance.$destroy();
  126532. } else {
  126533. deactivateChildComponent(componentInstance, true /* direct */);
  126534. }
  126535. }
  126536. }
  126537. };
  126538. var hooksToMerge = Object.keys(componentVNodeHooks);
  126539. function createComponent (
  126540. Ctor,
  126541. data,
  126542. context,
  126543. children,
  126544. tag
  126545. ) {
  126546. if (isUndef(Ctor)) {
  126547. return
  126548. }
  126549. var baseCtor = context.$options._base;
  126550. // plain options object: turn it into a constructor
  126551. if (isObject(Ctor)) {
  126552. Ctor = baseCtor.extend(Ctor);
  126553. }
  126554. // if at this stage it's not a constructor or an async component factory,
  126555. // reject.
  126556. if (typeof Ctor !== 'function') {
  126557. if (true) {
  126558. warn(("Invalid Component definition: " + (String(Ctor))), context);
  126559. }
  126560. return
  126561. }
  126562. // async component
  126563. var asyncFactory;
  126564. if (isUndef(Ctor.cid)) {
  126565. asyncFactory = Ctor;
  126566. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  126567. if (Ctor === undefined) {
  126568. // return a placeholder node for async component, which is rendered
  126569. // as a comment node but preserves all the raw information for the node.
  126570. // the information will be used for async server-rendering and hydration.
  126571. return createAsyncPlaceholder(
  126572. asyncFactory,
  126573. data,
  126574. context,
  126575. children,
  126576. tag
  126577. )
  126578. }
  126579. }
  126580. data = data || {};
  126581. // resolve constructor options in case global mixins are applied after
  126582. // component constructor creation
  126583. resolveConstructorOptions(Ctor);
  126584. // transform component v-model data into props & events
  126585. if (isDef(data.model)) {
  126586. transformModel(Ctor.options, data);
  126587. }
  126588. // extract props
  126589. var propsData = extractPropsFromVNodeData(data, Ctor, tag);
  126590. // functional component
  126591. if (isTrue(Ctor.options.functional)) {
  126592. return createFunctionalComponent(Ctor, propsData, data, context, children)
  126593. }
  126594. // extract listeners, since these needs to be treated as
  126595. // child component listeners instead of DOM listeners
  126596. var listeners = data.on;
  126597. // replace with listeners with .native modifier
  126598. // so it gets processed during parent component patch.
  126599. data.on = data.nativeOn;
  126600. if (isTrue(Ctor.options.abstract)) {
  126601. // abstract components do not keep anything
  126602. // other than props & listeners & slot
  126603. // work around flow
  126604. var slot = data.slot;
  126605. data = {};
  126606. if (slot) {
  126607. data.slot = slot;
  126608. }
  126609. }
  126610. // install component management hooks onto the placeholder node
  126611. installComponentHooks(data);
  126612. // return a placeholder vnode
  126613. var name = Ctor.options.name || tag;
  126614. var vnode = new VNode(
  126615. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  126616. data, undefined, undefined, undefined, context,
  126617. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  126618. asyncFactory
  126619. );
  126620. return vnode
  126621. }
  126622. function createComponentInstanceForVnode (
  126623. vnode, // we know it's MountedComponentVNode but flow doesn't
  126624. parent // activeInstance in lifecycle state
  126625. ) {
  126626. var options = {
  126627. _isComponent: true,
  126628. _parentVnode: vnode,
  126629. parent: parent
  126630. };
  126631. // check inline-template render functions
  126632. var inlineTemplate = vnode.data.inlineTemplate;
  126633. if (isDef(inlineTemplate)) {
  126634. options.render = inlineTemplate.render;
  126635. options.staticRenderFns = inlineTemplate.staticRenderFns;
  126636. }
  126637. return new vnode.componentOptions.Ctor(options)
  126638. }
  126639. function installComponentHooks (data) {
  126640. var hooks = data.hook || (data.hook = {});
  126641. for (var i = 0; i < hooksToMerge.length; i++) {
  126642. var key = hooksToMerge[i];
  126643. var existing = hooks[key];
  126644. var toMerge = componentVNodeHooks[key];
  126645. if (existing !== toMerge && !(existing && existing._merged)) {
  126646. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  126647. }
  126648. }
  126649. }
  126650. function mergeHook$1 (f1, f2) {
  126651. var merged = function (a, b) {
  126652. // flow complains about extra args which is why we use any
  126653. f1(a, b);
  126654. f2(a, b);
  126655. };
  126656. merged._merged = true;
  126657. return merged
  126658. }
  126659. // transform component v-model info (value and callback) into
  126660. // prop and event handler respectively.
  126661. function transformModel (options, data) {
  126662. var prop = (options.model && options.model.prop) || 'value';
  126663. var event = (options.model && options.model.event) || 'input'
  126664. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  126665. var on = data.on || (data.on = {});
  126666. var existing = on[event];
  126667. var callback = data.model.callback;
  126668. if (isDef(existing)) {
  126669. if (
  126670. Array.isArray(existing)
  126671. ? existing.indexOf(callback) === -1
  126672. : existing !== callback
  126673. ) {
  126674. on[event] = [callback].concat(existing);
  126675. }
  126676. } else {
  126677. on[event] = callback;
  126678. }
  126679. }
  126680. /* */
  126681. var SIMPLE_NORMALIZE = 1;
  126682. var ALWAYS_NORMALIZE = 2;
  126683. // wrapper function for providing a more flexible interface
  126684. // without getting yelled at by flow
  126685. function createElement (
  126686. context,
  126687. tag,
  126688. data,
  126689. children,
  126690. normalizationType,
  126691. alwaysNormalize
  126692. ) {
  126693. if (Array.isArray(data) || isPrimitive(data)) {
  126694. normalizationType = children;
  126695. children = data;
  126696. data = undefined;
  126697. }
  126698. if (isTrue(alwaysNormalize)) {
  126699. normalizationType = ALWAYS_NORMALIZE;
  126700. }
  126701. return _createElement(context, tag, data, children, normalizationType)
  126702. }
  126703. function _createElement (
  126704. context,
  126705. tag,
  126706. data,
  126707. children,
  126708. normalizationType
  126709. ) {
  126710. if (isDef(data) && isDef((data).__ob__)) {
  126711. true && warn(
  126712. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  126713. 'Always create fresh vnode data objects in each render!',
  126714. context
  126715. );
  126716. return createEmptyVNode()
  126717. }
  126718. // object syntax in v-bind
  126719. if (isDef(data) && isDef(data.is)) {
  126720. tag = data.is;
  126721. }
  126722. if (!tag) {
  126723. // in case of component :is set to falsy value
  126724. return createEmptyVNode()
  126725. }
  126726. // warn against non-primitive key
  126727. if ( true &&
  126728. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  126729. ) {
  126730. {
  126731. warn(
  126732. 'Avoid using non-primitive value as key, ' +
  126733. 'use string/number value instead.',
  126734. context
  126735. );
  126736. }
  126737. }
  126738. // support single function children as default scoped slot
  126739. if (Array.isArray(children) &&
  126740. typeof children[0] === 'function'
  126741. ) {
  126742. data = data || {};
  126743. data.scopedSlots = { default: children[0] };
  126744. children.length = 0;
  126745. }
  126746. if (normalizationType === ALWAYS_NORMALIZE) {
  126747. children = normalizeChildren(children);
  126748. } else if (normalizationType === SIMPLE_NORMALIZE) {
  126749. children = simpleNormalizeChildren(children);
  126750. }
  126751. var vnode, ns;
  126752. if (typeof tag === 'string') {
  126753. var Ctor;
  126754. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  126755. if (config.isReservedTag(tag)) {
  126756. // platform built-in elements
  126757. if ( true && isDef(data) && isDef(data.nativeOn)) {
  126758. warn(
  126759. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  126760. context
  126761. );
  126762. }
  126763. vnode = new VNode(
  126764. config.parsePlatformTagName(tag), data, children,
  126765. undefined, undefined, context
  126766. );
  126767. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  126768. // component
  126769. vnode = createComponent(Ctor, data, context, children, tag);
  126770. } else {
  126771. // unknown or unlisted namespaced elements
  126772. // check at runtime because it may get assigned a namespace when its
  126773. // parent normalizes children
  126774. vnode = new VNode(
  126775. tag, data, children,
  126776. undefined, undefined, context
  126777. );
  126778. }
  126779. } else {
  126780. // direct component options / constructor
  126781. vnode = createComponent(tag, data, context, children);
  126782. }
  126783. if (Array.isArray(vnode)) {
  126784. return vnode
  126785. } else if (isDef(vnode)) {
  126786. if (isDef(ns)) { applyNS(vnode, ns); }
  126787. if (isDef(data)) { registerDeepBindings(data); }
  126788. return vnode
  126789. } else {
  126790. return createEmptyVNode()
  126791. }
  126792. }
  126793. function applyNS (vnode, ns, force) {
  126794. vnode.ns = ns;
  126795. if (vnode.tag === 'foreignObject') {
  126796. // use default namespace inside foreignObject
  126797. ns = undefined;
  126798. force = true;
  126799. }
  126800. if (isDef(vnode.children)) {
  126801. for (var i = 0, l = vnode.children.length; i < l; i++) {
  126802. var child = vnode.children[i];
  126803. if (isDef(child.tag) && (
  126804. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  126805. applyNS(child, ns, force);
  126806. }
  126807. }
  126808. }
  126809. }
  126810. // ref #5318
  126811. // necessary to ensure parent re-render when deep bindings like :style and
  126812. // :class are used on slot nodes
  126813. function registerDeepBindings (data) {
  126814. if (isObject(data.style)) {
  126815. traverse(data.style);
  126816. }
  126817. if (isObject(data.class)) {
  126818. traverse(data.class);
  126819. }
  126820. }
  126821. /* */
  126822. function initRender (vm) {
  126823. vm._vnode = null; // the root of the child tree
  126824. vm._staticTrees = null; // v-once cached trees
  126825. var options = vm.$options;
  126826. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  126827. var renderContext = parentVnode && parentVnode.context;
  126828. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  126829. vm.$scopedSlots = emptyObject;
  126830. // bind the createElement fn to this instance
  126831. // so that we get proper render context inside it.
  126832. // args order: tag, data, children, normalizationType, alwaysNormalize
  126833. // internal version is used by render functions compiled from templates
  126834. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  126835. // normalization is always applied for the public version, used in
  126836. // user-written render functions.
  126837. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  126838. // $attrs & $listeners are exposed for easier HOC creation.
  126839. // they need to be reactive so that HOCs using them are always updated
  126840. var parentData = parentVnode && parentVnode.data;
  126841. /* istanbul ignore else */
  126842. if (true) {
  126843. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  126844. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  126845. }, true);
  126846. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  126847. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  126848. }, true);
  126849. } else {}
  126850. }
  126851. var currentRenderingInstance = null;
  126852. function renderMixin (Vue) {
  126853. // install runtime convenience helpers
  126854. installRenderHelpers(Vue.prototype);
  126855. Vue.prototype.$nextTick = function (fn) {
  126856. return nextTick(fn, this)
  126857. };
  126858. Vue.prototype._render = function () {
  126859. var vm = this;
  126860. var ref = vm.$options;
  126861. var render = ref.render;
  126862. var _parentVnode = ref._parentVnode;
  126863. if (_parentVnode) {
  126864. vm.$scopedSlots = normalizeScopedSlots(
  126865. _parentVnode.data.scopedSlots,
  126866. vm.$slots,
  126867. vm.$scopedSlots
  126868. );
  126869. }
  126870. // set parent vnode. this allows render functions to have access
  126871. // to the data on the placeholder node.
  126872. vm.$vnode = _parentVnode;
  126873. // render self
  126874. var vnode;
  126875. try {
  126876. // There's no need to maintain a stack because all render fns are called
  126877. // separately from one another. Nested component's render fns are called
  126878. // when parent component is patched.
  126879. currentRenderingInstance = vm;
  126880. vnode = render.call(vm._renderProxy, vm.$createElement);
  126881. } catch (e) {
  126882. handleError(e, vm, "render");
  126883. // return error render result,
  126884. // or previous vnode to prevent render error causing blank component
  126885. /* istanbul ignore else */
  126886. if ( true && vm.$options.renderError) {
  126887. try {
  126888. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  126889. } catch (e) {
  126890. handleError(e, vm, "renderError");
  126891. vnode = vm._vnode;
  126892. }
  126893. } else {
  126894. vnode = vm._vnode;
  126895. }
  126896. } finally {
  126897. currentRenderingInstance = null;
  126898. }
  126899. // if the returned array contains only a single node, allow it
  126900. if (Array.isArray(vnode) && vnode.length === 1) {
  126901. vnode = vnode[0];
  126902. }
  126903. // return empty vnode in case the render function errored out
  126904. if (!(vnode instanceof VNode)) {
  126905. if ( true && Array.isArray(vnode)) {
  126906. warn(
  126907. 'Multiple root nodes returned from render function. Render function ' +
  126908. 'should return a single root node.',
  126909. vm
  126910. );
  126911. }
  126912. vnode = createEmptyVNode();
  126913. }
  126914. // set parent
  126915. vnode.parent = _parentVnode;
  126916. return vnode
  126917. };
  126918. }
  126919. /* */
  126920. function ensureCtor (comp, base) {
  126921. if (
  126922. comp.__esModule ||
  126923. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  126924. ) {
  126925. comp = comp.default;
  126926. }
  126927. return isObject(comp)
  126928. ? base.extend(comp)
  126929. : comp
  126930. }
  126931. function createAsyncPlaceholder (
  126932. factory,
  126933. data,
  126934. context,
  126935. children,
  126936. tag
  126937. ) {
  126938. var node = createEmptyVNode();
  126939. node.asyncFactory = factory;
  126940. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  126941. return node
  126942. }
  126943. function resolveAsyncComponent (
  126944. factory,
  126945. baseCtor
  126946. ) {
  126947. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  126948. return factory.errorComp
  126949. }
  126950. if (isDef(factory.resolved)) {
  126951. return factory.resolved
  126952. }
  126953. var owner = currentRenderingInstance;
  126954. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  126955. // already pending
  126956. factory.owners.push(owner);
  126957. }
  126958. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  126959. return factory.loadingComp
  126960. }
  126961. if (owner && !isDef(factory.owners)) {
  126962. var owners = factory.owners = [owner];
  126963. var sync = true;
  126964. var timerLoading = null;
  126965. var timerTimeout = null
  126966. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  126967. var forceRender = function (renderCompleted) {
  126968. for (var i = 0, l = owners.length; i < l; i++) {
  126969. (owners[i]).$forceUpdate();
  126970. }
  126971. if (renderCompleted) {
  126972. owners.length = 0;
  126973. if (timerLoading !== null) {
  126974. clearTimeout(timerLoading);
  126975. timerLoading = null;
  126976. }
  126977. if (timerTimeout !== null) {
  126978. clearTimeout(timerTimeout);
  126979. timerTimeout = null;
  126980. }
  126981. }
  126982. };
  126983. var resolve = once(function (res) {
  126984. // cache resolved
  126985. factory.resolved = ensureCtor(res, baseCtor);
  126986. // invoke callbacks only if this is not a synchronous resolve
  126987. // (async resolves are shimmed as synchronous during SSR)
  126988. if (!sync) {
  126989. forceRender(true);
  126990. } else {
  126991. owners.length = 0;
  126992. }
  126993. });
  126994. var reject = once(function (reason) {
  126995. true && warn(
  126996. "Failed to resolve async component: " + (String(factory)) +
  126997. (reason ? ("\nReason: " + reason) : '')
  126998. );
  126999. if (isDef(factory.errorComp)) {
  127000. factory.error = true;
  127001. forceRender(true);
  127002. }
  127003. });
  127004. var res = factory(resolve, reject);
  127005. if (isObject(res)) {
  127006. if (isPromise(res)) {
  127007. // () => Promise
  127008. if (isUndef(factory.resolved)) {
  127009. res.then(resolve, reject);
  127010. }
  127011. } else if (isPromise(res.component)) {
  127012. res.component.then(resolve, reject);
  127013. if (isDef(res.error)) {
  127014. factory.errorComp = ensureCtor(res.error, baseCtor);
  127015. }
  127016. if (isDef(res.loading)) {
  127017. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  127018. if (res.delay === 0) {
  127019. factory.loading = true;
  127020. } else {
  127021. timerLoading = setTimeout(function () {
  127022. timerLoading = null;
  127023. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  127024. factory.loading = true;
  127025. forceRender(false);
  127026. }
  127027. }, res.delay || 200);
  127028. }
  127029. }
  127030. if (isDef(res.timeout)) {
  127031. timerTimeout = setTimeout(function () {
  127032. timerTimeout = null;
  127033. if (isUndef(factory.resolved)) {
  127034. reject(
  127035. true
  127036. ? ("timeout (" + (res.timeout) + "ms)")
  127037. : undefined
  127038. );
  127039. }
  127040. }, res.timeout);
  127041. }
  127042. }
  127043. }
  127044. sync = false;
  127045. // return in case resolved synchronously
  127046. return factory.loading
  127047. ? factory.loadingComp
  127048. : factory.resolved
  127049. }
  127050. }
  127051. /* */
  127052. function isAsyncPlaceholder (node) {
  127053. return node.isComment && node.asyncFactory
  127054. }
  127055. /* */
  127056. function getFirstComponentChild (children) {
  127057. if (Array.isArray(children)) {
  127058. for (var i = 0; i < children.length; i++) {
  127059. var c = children[i];
  127060. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  127061. return c
  127062. }
  127063. }
  127064. }
  127065. }
  127066. /* */
  127067. /* */
  127068. function initEvents (vm) {
  127069. vm._events = Object.create(null);
  127070. vm._hasHookEvent = false;
  127071. // init parent attached events
  127072. var listeners = vm.$options._parentListeners;
  127073. if (listeners) {
  127074. updateComponentListeners(vm, listeners);
  127075. }
  127076. }
  127077. var target;
  127078. function add (event, fn) {
  127079. target.$on(event, fn);
  127080. }
  127081. function remove$1 (event, fn) {
  127082. target.$off(event, fn);
  127083. }
  127084. function createOnceHandler (event, fn) {
  127085. var _target = target;
  127086. return function onceHandler () {
  127087. var res = fn.apply(null, arguments);
  127088. if (res !== null) {
  127089. _target.$off(event, onceHandler);
  127090. }
  127091. }
  127092. }
  127093. function updateComponentListeners (
  127094. vm,
  127095. listeners,
  127096. oldListeners
  127097. ) {
  127098. target = vm;
  127099. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  127100. target = undefined;
  127101. }
  127102. function eventsMixin (Vue) {
  127103. var hookRE = /^hook:/;
  127104. Vue.prototype.$on = function (event, fn) {
  127105. var vm = this;
  127106. if (Array.isArray(event)) {
  127107. for (var i = 0, l = event.length; i < l; i++) {
  127108. vm.$on(event[i], fn);
  127109. }
  127110. } else {
  127111. (vm._events[event] || (vm._events[event] = [])).push(fn);
  127112. // optimize hook:event cost by using a boolean flag marked at registration
  127113. // instead of a hash lookup
  127114. if (hookRE.test(event)) {
  127115. vm._hasHookEvent = true;
  127116. }
  127117. }
  127118. return vm
  127119. };
  127120. Vue.prototype.$once = function (event, fn) {
  127121. var vm = this;
  127122. function on () {
  127123. vm.$off(event, on);
  127124. fn.apply(vm, arguments);
  127125. }
  127126. on.fn = fn;
  127127. vm.$on(event, on);
  127128. return vm
  127129. };
  127130. Vue.prototype.$off = function (event, fn) {
  127131. var vm = this;
  127132. // all
  127133. if (!arguments.length) {
  127134. vm._events = Object.create(null);
  127135. return vm
  127136. }
  127137. // array of events
  127138. if (Array.isArray(event)) {
  127139. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  127140. vm.$off(event[i$1], fn);
  127141. }
  127142. return vm
  127143. }
  127144. // specific event
  127145. var cbs = vm._events[event];
  127146. if (!cbs) {
  127147. return vm
  127148. }
  127149. if (!fn) {
  127150. vm._events[event] = null;
  127151. return vm
  127152. }
  127153. // specific handler
  127154. var cb;
  127155. var i = cbs.length;
  127156. while (i--) {
  127157. cb = cbs[i];
  127158. if (cb === fn || cb.fn === fn) {
  127159. cbs.splice(i, 1);
  127160. break
  127161. }
  127162. }
  127163. return vm
  127164. };
  127165. Vue.prototype.$emit = function (event) {
  127166. var vm = this;
  127167. if (true) {
  127168. var lowerCaseEvent = event.toLowerCase();
  127169. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  127170. tip(
  127171. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  127172. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  127173. "Note that HTML attributes are case-insensitive and you cannot use " +
  127174. "v-on to listen to camelCase events when using in-DOM templates. " +
  127175. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  127176. );
  127177. }
  127178. }
  127179. var cbs = vm._events[event];
  127180. if (cbs) {
  127181. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  127182. var args = toArray(arguments, 1);
  127183. var info = "event handler for \"" + event + "\"";
  127184. for (var i = 0, l = cbs.length; i < l; i++) {
  127185. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  127186. }
  127187. }
  127188. return vm
  127189. };
  127190. }
  127191. /* */
  127192. var activeInstance = null;
  127193. var isUpdatingChildComponent = false;
  127194. function setActiveInstance(vm) {
  127195. var prevActiveInstance = activeInstance;
  127196. activeInstance = vm;
  127197. return function () {
  127198. activeInstance = prevActiveInstance;
  127199. }
  127200. }
  127201. function initLifecycle (vm) {
  127202. var options = vm.$options;
  127203. // locate first non-abstract parent
  127204. var parent = options.parent;
  127205. if (parent && !options.abstract) {
  127206. while (parent.$options.abstract && parent.$parent) {
  127207. parent = parent.$parent;
  127208. }
  127209. parent.$children.push(vm);
  127210. }
  127211. vm.$parent = parent;
  127212. vm.$root = parent ? parent.$root : vm;
  127213. vm.$children = [];
  127214. vm.$refs = {};
  127215. vm._watcher = null;
  127216. vm._inactive = null;
  127217. vm._directInactive = false;
  127218. vm._isMounted = false;
  127219. vm._isDestroyed = false;
  127220. vm._isBeingDestroyed = false;
  127221. }
  127222. function lifecycleMixin (Vue) {
  127223. Vue.prototype._update = function (vnode, hydrating) {
  127224. var vm = this;
  127225. var prevEl = vm.$el;
  127226. var prevVnode = vm._vnode;
  127227. var restoreActiveInstance = setActiveInstance(vm);
  127228. vm._vnode = vnode;
  127229. // Vue.prototype.__patch__ is injected in entry points
  127230. // based on the rendering backend used.
  127231. if (!prevVnode) {
  127232. // initial render
  127233. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  127234. } else {
  127235. // updates
  127236. vm.$el = vm.__patch__(prevVnode, vnode);
  127237. }
  127238. restoreActiveInstance();
  127239. // update __vue__ reference
  127240. if (prevEl) {
  127241. prevEl.__vue__ = null;
  127242. }
  127243. if (vm.$el) {
  127244. vm.$el.__vue__ = vm;
  127245. }
  127246. // if parent is an HOC, update its $el as well
  127247. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  127248. vm.$parent.$el = vm.$el;
  127249. }
  127250. // updated hook is called by the scheduler to ensure that children are
  127251. // updated in a parent's updated hook.
  127252. };
  127253. Vue.prototype.$forceUpdate = function () {
  127254. var vm = this;
  127255. if (vm._watcher) {
  127256. vm._watcher.update();
  127257. }
  127258. };
  127259. Vue.prototype.$destroy = function () {
  127260. var vm = this;
  127261. if (vm._isBeingDestroyed) {
  127262. return
  127263. }
  127264. callHook(vm, 'beforeDestroy');
  127265. vm._isBeingDestroyed = true;
  127266. // remove self from parent
  127267. var parent = vm.$parent;
  127268. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  127269. remove(parent.$children, vm);
  127270. }
  127271. // teardown watchers
  127272. if (vm._watcher) {
  127273. vm._watcher.teardown();
  127274. }
  127275. var i = vm._watchers.length;
  127276. while (i--) {
  127277. vm._watchers[i].teardown();
  127278. }
  127279. // remove reference from data ob
  127280. // frozen object may not have observer.
  127281. if (vm._data.__ob__) {
  127282. vm._data.__ob__.vmCount--;
  127283. }
  127284. // call the last hook...
  127285. vm._isDestroyed = true;
  127286. // invoke destroy hooks on current rendered tree
  127287. vm.__patch__(vm._vnode, null);
  127288. // fire destroyed hook
  127289. callHook(vm, 'destroyed');
  127290. // turn off all instance listeners.
  127291. vm.$off();
  127292. // remove __vue__ reference
  127293. if (vm.$el) {
  127294. vm.$el.__vue__ = null;
  127295. }
  127296. // release circular reference (#6759)
  127297. if (vm.$vnode) {
  127298. vm.$vnode.parent = null;
  127299. }
  127300. };
  127301. }
  127302. function mountComponent (
  127303. vm,
  127304. el,
  127305. hydrating
  127306. ) {
  127307. vm.$el = el;
  127308. if (!vm.$options.render) {
  127309. vm.$options.render = createEmptyVNode;
  127310. if (true) {
  127311. /* istanbul ignore if */
  127312. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  127313. vm.$options.el || el) {
  127314. warn(
  127315. 'You are using the runtime-only build of Vue where the template ' +
  127316. 'compiler is not available. Either pre-compile the templates into ' +
  127317. 'render functions, or use the compiler-included build.',
  127318. vm
  127319. );
  127320. } else {
  127321. warn(
  127322. 'Failed to mount component: template or render function not defined.',
  127323. vm
  127324. );
  127325. }
  127326. }
  127327. }
  127328. callHook(vm, 'beforeMount');
  127329. var updateComponent;
  127330. /* istanbul ignore if */
  127331. if ( true && config.performance && mark) {
  127332. updateComponent = function () {
  127333. var name = vm._name;
  127334. var id = vm._uid;
  127335. var startTag = "vue-perf-start:" + id;
  127336. var endTag = "vue-perf-end:" + id;
  127337. mark(startTag);
  127338. var vnode = vm._render();
  127339. mark(endTag);
  127340. measure(("vue " + name + " render"), startTag, endTag);
  127341. mark(startTag);
  127342. vm._update(vnode, hydrating);
  127343. mark(endTag);
  127344. measure(("vue " + name + " patch"), startTag, endTag);
  127345. };
  127346. } else {
  127347. updateComponent = function () {
  127348. vm._update(vm._render(), hydrating);
  127349. };
  127350. }
  127351. // we set this to vm._watcher inside the watcher's constructor
  127352. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  127353. // component's mounted hook), which relies on vm._watcher being already defined
  127354. new Watcher(vm, updateComponent, noop, {
  127355. before: function before () {
  127356. if (vm._isMounted && !vm._isDestroyed) {
  127357. callHook(vm, 'beforeUpdate');
  127358. }
  127359. }
  127360. }, true /* isRenderWatcher */);
  127361. hydrating = false;
  127362. // manually mounted instance, call mounted on self
  127363. // mounted is called for render-created child components in its inserted hook
  127364. if (vm.$vnode == null) {
  127365. vm._isMounted = true;
  127366. callHook(vm, 'mounted');
  127367. }
  127368. return vm
  127369. }
  127370. function updateChildComponent (
  127371. vm,
  127372. propsData,
  127373. listeners,
  127374. parentVnode,
  127375. renderChildren
  127376. ) {
  127377. if (true) {
  127378. isUpdatingChildComponent = true;
  127379. }
  127380. // determine whether component has slot children
  127381. // we need to do this before overwriting $options._renderChildren.
  127382. // check if there are dynamic scopedSlots (hand-written or compiled but with
  127383. // dynamic slot names). Static scoped slots compiled from template has the
  127384. // "$stable" marker.
  127385. var newScopedSlots = parentVnode.data.scopedSlots;
  127386. var oldScopedSlots = vm.$scopedSlots;
  127387. var hasDynamicScopedSlot = !!(
  127388. (newScopedSlots && !newScopedSlots.$stable) ||
  127389. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  127390. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  127391. );
  127392. // Any static slot children from the parent may have changed during parent's
  127393. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  127394. // update is necessary to ensure correctness.
  127395. var needsForceUpdate = !!(
  127396. renderChildren || // has new static slots
  127397. vm.$options._renderChildren || // has old static slots
  127398. hasDynamicScopedSlot
  127399. );
  127400. vm.$options._parentVnode = parentVnode;
  127401. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  127402. if (vm._vnode) { // update child tree's parent
  127403. vm._vnode.parent = parentVnode;
  127404. }
  127405. vm.$options._renderChildren = renderChildren;
  127406. // update $attrs and $listeners hash
  127407. // these are also reactive so they may trigger child update if the child
  127408. // used them during render
  127409. vm.$attrs = parentVnode.data.attrs || emptyObject;
  127410. vm.$listeners = listeners || emptyObject;
  127411. // update props
  127412. if (propsData && vm.$options.props) {
  127413. toggleObserving(false);
  127414. var props = vm._props;
  127415. var propKeys = vm.$options._propKeys || [];
  127416. for (var i = 0; i < propKeys.length; i++) {
  127417. var key = propKeys[i];
  127418. var propOptions = vm.$options.props; // wtf flow?
  127419. props[key] = validateProp(key, propOptions, propsData, vm);
  127420. }
  127421. toggleObserving(true);
  127422. // keep a copy of raw propsData
  127423. vm.$options.propsData = propsData;
  127424. }
  127425. // update listeners
  127426. listeners = listeners || emptyObject;
  127427. var oldListeners = vm.$options._parentListeners;
  127428. vm.$options._parentListeners = listeners;
  127429. updateComponentListeners(vm, listeners, oldListeners);
  127430. // resolve slots + force update if has children
  127431. if (needsForceUpdate) {
  127432. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  127433. vm.$forceUpdate();
  127434. }
  127435. if (true) {
  127436. isUpdatingChildComponent = false;
  127437. }
  127438. }
  127439. function isInInactiveTree (vm) {
  127440. while (vm && (vm = vm.$parent)) {
  127441. if (vm._inactive) { return true }
  127442. }
  127443. return false
  127444. }
  127445. function activateChildComponent (vm, direct) {
  127446. if (direct) {
  127447. vm._directInactive = false;
  127448. if (isInInactiveTree(vm)) {
  127449. return
  127450. }
  127451. } else if (vm._directInactive) {
  127452. return
  127453. }
  127454. if (vm._inactive || vm._inactive === null) {
  127455. vm._inactive = false;
  127456. for (var i = 0; i < vm.$children.length; i++) {
  127457. activateChildComponent(vm.$children[i]);
  127458. }
  127459. callHook(vm, 'activated');
  127460. }
  127461. }
  127462. function deactivateChildComponent (vm, direct) {
  127463. if (direct) {
  127464. vm._directInactive = true;
  127465. if (isInInactiveTree(vm)) {
  127466. return
  127467. }
  127468. }
  127469. if (!vm._inactive) {
  127470. vm._inactive = true;
  127471. for (var i = 0; i < vm.$children.length; i++) {
  127472. deactivateChildComponent(vm.$children[i]);
  127473. }
  127474. callHook(vm, 'deactivated');
  127475. }
  127476. }
  127477. function callHook (vm, hook) {
  127478. // #7573 disable dep collection when invoking lifecycle hooks
  127479. pushTarget();
  127480. var handlers = vm.$options[hook];
  127481. var info = hook + " hook";
  127482. if (handlers) {
  127483. for (var i = 0, j = handlers.length; i < j; i++) {
  127484. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  127485. }
  127486. }
  127487. if (vm._hasHookEvent) {
  127488. vm.$emit('hook:' + hook);
  127489. }
  127490. popTarget();
  127491. }
  127492. /* */
  127493. var MAX_UPDATE_COUNT = 100;
  127494. var queue = [];
  127495. var activatedChildren = [];
  127496. var has = {};
  127497. var circular = {};
  127498. var waiting = false;
  127499. var flushing = false;
  127500. var index = 0;
  127501. /**
  127502. * Reset the scheduler's state.
  127503. */
  127504. function resetSchedulerState () {
  127505. index = queue.length = activatedChildren.length = 0;
  127506. has = {};
  127507. if (true) {
  127508. circular = {};
  127509. }
  127510. waiting = flushing = false;
  127511. }
  127512. // Async edge case #6566 requires saving the timestamp when event listeners are
  127513. // attached. However, calling performance.now() has a perf overhead especially
  127514. // if the page has thousands of event listeners. Instead, we take a timestamp
  127515. // every time the scheduler flushes and use that for all event listeners
  127516. // attached during that flush.
  127517. var currentFlushTimestamp = 0;
  127518. // Async edge case fix requires storing an event listener's attach timestamp.
  127519. var getNow = Date.now;
  127520. // Determine what event timestamp the browser is using. Annoyingly, the
  127521. // timestamp can either be hi-res (relative to page load) or low-res
  127522. // (relative to UNIX epoch), so in order to compare time we have to use the
  127523. // same timestamp type when saving the flush timestamp.
  127524. // All IE versions use low-res event timestamps, and have problematic clock
  127525. // implementations (#9632)
  127526. if (inBrowser && !isIE) {
  127527. var performance = window.performance;
  127528. if (
  127529. performance &&
  127530. typeof performance.now === 'function' &&
  127531. getNow() > document.createEvent('Event').timeStamp
  127532. ) {
  127533. // if the event timestamp, although evaluated AFTER the Date.now(), is
  127534. // smaller than it, it means the event is using a hi-res timestamp,
  127535. // and we need to use the hi-res version for event listener timestamps as
  127536. // well.
  127537. getNow = function () { return performance.now(); };
  127538. }
  127539. }
  127540. /**
  127541. * Flush both queues and run the watchers.
  127542. */
  127543. function flushSchedulerQueue () {
  127544. currentFlushTimestamp = getNow();
  127545. flushing = true;
  127546. var watcher, id;
  127547. // Sort queue before flush.
  127548. // This ensures that:
  127549. // 1. Components are updated from parent to child. (because parent is always
  127550. // created before the child)
  127551. // 2. A component's user watchers are run before its render watcher (because
  127552. // user watchers are created before the render watcher)
  127553. // 3. If a component is destroyed during a parent component's watcher run,
  127554. // its watchers can be skipped.
  127555. queue.sort(function (a, b) { return a.id - b.id; });
  127556. // do not cache length because more watchers might be pushed
  127557. // as we run existing watchers
  127558. for (index = 0; index < queue.length; index++) {
  127559. watcher = queue[index];
  127560. if (watcher.before) {
  127561. watcher.before();
  127562. }
  127563. id = watcher.id;
  127564. has[id] = null;
  127565. watcher.run();
  127566. // in dev build, check and stop circular updates.
  127567. if ( true && has[id] != null) {
  127568. circular[id] = (circular[id] || 0) + 1;
  127569. if (circular[id] > MAX_UPDATE_COUNT) {
  127570. warn(
  127571. 'You may have an infinite update loop ' + (
  127572. watcher.user
  127573. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  127574. : "in a component render function."
  127575. ),
  127576. watcher.vm
  127577. );
  127578. break
  127579. }
  127580. }
  127581. }
  127582. // keep copies of post queues before resetting state
  127583. var activatedQueue = activatedChildren.slice();
  127584. var updatedQueue = queue.slice();
  127585. resetSchedulerState();
  127586. // call component updated and activated hooks
  127587. callActivatedHooks(activatedQueue);
  127588. callUpdatedHooks(updatedQueue);
  127589. // devtool hook
  127590. /* istanbul ignore if */
  127591. if (devtools && config.devtools) {
  127592. devtools.emit('flush');
  127593. }
  127594. }
  127595. function callUpdatedHooks (queue) {
  127596. var i = queue.length;
  127597. while (i--) {
  127598. var watcher = queue[i];
  127599. var vm = watcher.vm;
  127600. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  127601. callHook(vm, 'updated');
  127602. }
  127603. }
  127604. }
  127605. /**
  127606. * Queue a kept-alive component that was activated during patch.
  127607. * The queue will be processed after the entire tree has been patched.
  127608. */
  127609. function queueActivatedComponent (vm) {
  127610. // setting _inactive to false here so that a render function can
  127611. // rely on checking whether it's in an inactive tree (e.g. router-view)
  127612. vm._inactive = false;
  127613. activatedChildren.push(vm);
  127614. }
  127615. function callActivatedHooks (queue) {
  127616. for (var i = 0; i < queue.length; i++) {
  127617. queue[i]._inactive = true;
  127618. activateChildComponent(queue[i], true /* true */);
  127619. }
  127620. }
  127621. /**
  127622. * Push a watcher into the watcher queue.
  127623. * Jobs with duplicate IDs will be skipped unless it's
  127624. * pushed when the queue is being flushed.
  127625. */
  127626. function queueWatcher (watcher) {
  127627. var id = watcher.id;
  127628. if (has[id] == null) {
  127629. has[id] = true;
  127630. if (!flushing) {
  127631. queue.push(watcher);
  127632. } else {
  127633. // if already flushing, splice the watcher based on its id
  127634. // if already past its id, it will be run next immediately.
  127635. var i = queue.length - 1;
  127636. while (i > index && queue[i].id > watcher.id) {
  127637. i--;
  127638. }
  127639. queue.splice(i + 1, 0, watcher);
  127640. }
  127641. // queue the flush
  127642. if (!waiting) {
  127643. waiting = true;
  127644. if ( true && !config.async) {
  127645. flushSchedulerQueue();
  127646. return
  127647. }
  127648. nextTick(flushSchedulerQueue);
  127649. }
  127650. }
  127651. }
  127652. /* */
  127653. var uid$2 = 0;
  127654. /**
  127655. * A watcher parses an expression, collects dependencies,
  127656. * and fires callback when the expression value changes.
  127657. * This is used for both the $watch() api and directives.
  127658. */
  127659. var Watcher = function Watcher (
  127660. vm,
  127661. expOrFn,
  127662. cb,
  127663. options,
  127664. isRenderWatcher
  127665. ) {
  127666. this.vm = vm;
  127667. if (isRenderWatcher) {
  127668. vm._watcher = this;
  127669. }
  127670. vm._watchers.push(this);
  127671. // options
  127672. if (options) {
  127673. this.deep = !!options.deep;
  127674. this.user = !!options.user;
  127675. this.lazy = !!options.lazy;
  127676. this.sync = !!options.sync;
  127677. this.before = options.before;
  127678. } else {
  127679. this.deep = this.user = this.lazy = this.sync = false;
  127680. }
  127681. this.cb = cb;
  127682. this.id = ++uid$2; // uid for batching
  127683. this.active = true;
  127684. this.dirty = this.lazy; // for lazy watchers
  127685. this.deps = [];
  127686. this.newDeps = [];
  127687. this.depIds = new _Set();
  127688. this.newDepIds = new _Set();
  127689. this.expression = true
  127690. ? expOrFn.toString()
  127691. : undefined;
  127692. // parse expression for getter
  127693. if (typeof expOrFn === 'function') {
  127694. this.getter = expOrFn;
  127695. } else {
  127696. this.getter = parsePath(expOrFn);
  127697. if (!this.getter) {
  127698. this.getter = noop;
  127699. true && warn(
  127700. "Failed watching path: \"" + expOrFn + "\" " +
  127701. 'Watcher only accepts simple dot-delimited paths. ' +
  127702. 'For full control, use a function instead.',
  127703. vm
  127704. );
  127705. }
  127706. }
  127707. this.value = this.lazy
  127708. ? undefined
  127709. : this.get();
  127710. };
  127711. /**
  127712. * Evaluate the getter, and re-collect dependencies.
  127713. */
  127714. Watcher.prototype.get = function get () {
  127715. pushTarget(this);
  127716. var value;
  127717. var vm = this.vm;
  127718. try {
  127719. value = this.getter.call(vm, vm);
  127720. } catch (e) {
  127721. if (this.user) {
  127722. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  127723. } else {
  127724. throw e
  127725. }
  127726. } finally {
  127727. // "touch" every property so they are all tracked as
  127728. // dependencies for deep watching
  127729. if (this.deep) {
  127730. traverse(value);
  127731. }
  127732. popTarget();
  127733. this.cleanupDeps();
  127734. }
  127735. return value
  127736. };
  127737. /**
  127738. * Add a dependency to this directive.
  127739. */
  127740. Watcher.prototype.addDep = function addDep (dep) {
  127741. var id = dep.id;
  127742. if (!this.newDepIds.has(id)) {
  127743. this.newDepIds.add(id);
  127744. this.newDeps.push(dep);
  127745. if (!this.depIds.has(id)) {
  127746. dep.addSub(this);
  127747. }
  127748. }
  127749. };
  127750. /**
  127751. * Clean up for dependency collection.
  127752. */
  127753. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  127754. var i = this.deps.length;
  127755. while (i--) {
  127756. var dep = this.deps[i];
  127757. if (!this.newDepIds.has(dep.id)) {
  127758. dep.removeSub(this);
  127759. }
  127760. }
  127761. var tmp = this.depIds;
  127762. this.depIds = this.newDepIds;
  127763. this.newDepIds = tmp;
  127764. this.newDepIds.clear();
  127765. tmp = this.deps;
  127766. this.deps = this.newDeps;
  127767. this.newDeps = tmp;
  127768. this.newDeps.length = 0;
  127769. };
  127770. /**
  127771. * Subscriber interface.
  127772. * Will be called when a dependency changes.
  127773. */
  127774. Watcher.prototype.update = function update () {
  127775. /* istanbul ignore else */
  127776. if (this.lazy) {
  127777. this.dirty = true;
  127778. } else if (this.sync) {
  127779. this.run();
  127780. } else {
  127781. queueWatcher(this);
  127782. }
  127783. };
  127784. /**
  127785. * Scheduler job interface.
  127786. * Will be called by the scheduler.
  127787. */
  127788. Watcher.prototype.run = function run () {
  127789. if (this.active) {
  127790. var value = this.get();
  127791. if (
  127792. value !== this.value ||
  127793. // Deep watchers and watchers on Object/Arrays should fire even
  127794. // when the value is the same, because the value may
  127795. // have mutated.
  127796. isObject(value) ||
  127797. this.deep
  127798. ) {
  127799. // set new value
  127800. var oldValue = this.value;
  127801. this.value = value;
  127802. if (this.user) {
  127803. try {
  127804. this.cb.call(this.vm, value, oldValue);
  127805. } catch (e) {
  127806. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  127807. }
  127808. } else {
  127809. this.cb.call(this.vm, value, oldValue);
  127810. }
  127811. }
  127812. }
  127813. };
  127814. /**
  127815. * Evaluate the value of the watcher.
  127816. * This only gets called for lazy watchers.
  127817. */
  127818. Watcher.prototype.evaluate = function evaluate () {
  127819. this.value = this.get();
  127820. this.dirty = false;
  127821. };
  127822. /**
  127823. * Depend on all deps collected by this watcher.
  127824. */
  127825. Watcher.prototype.depend = function depend () {
  127826. var i = this.deps.length;
  127827. while (i--) {
  127828. this.deps[i].depend();
  127829. }
  127830. };
  127831. /**
  127832. * Remove self from all dependencies' subscriber list.
  127833. */
  127834. Watcher.prototype.teardown = function teardown () {
  127835. if (this.active) {
  127836. // remove self from vm's watcher list
  127837. // this is a somewhat expensive operation so we skip it
  127838. // if the vm is being destroyed.
  127839. if (!this.vm._isBeingDestroyed) {
  127840. remove(this.vm._watchers, this);
  127841. }
  127842. var i = this.deps.length;
  127843. while (i--) {
  127844. this.deps[i].removeSub(this);
  127845. }
  127846. this.active = false;
  127847. }
  127848. };
  127849. /* */
  127850. var sharedPropertyDefinition = {
  127851. enumerable: true,
  127852. configurable: true,
  127853. get: noop,
  127854. set: noop
  127855. };
  127856. function proxy (target, sourceKey, key) {
  127857. sharedPropertyDefinition.get = function proxyGetter () {
  127858. return this[sourceKey][key]
  127859. };
  127860. sharedPropertyDefinition.set = function proxySetter (val) {
  127861. this[sourceKey][key] = val;
  127862. };
  127863. Object.defineProperty(target, key, sharedPropertyDefinition);
  127864. }
  127865. function initState (vm) {
  127866. vm._watchers = [];
  127867. var opts = vm.$options;
  127868. if (opts.props) { initProps(vm, opts.props); }
  127869. if (opts.methods) { initMethods(vm, opts.methods); }
  127870. if (opts.data) {
  127871. initData(vm);
  127872. } else {
  127873. observe(vm._data = {}, true /* asRootData */);
  127874. }
  127875. if (opts.computed) { initComputed(vm, opts.computed); }
  127876. if (opts.watch && opts.watch !== nativeWatch) {
  127877. initWatch(vm, opts.watch);
  127878. }
  127879. }
  127880. function initProps (vm, propsOptions) {
  127881. var propsData = vm.$options.propsData || {};
  127882. var props = vm._props = {};
  127883. // cache prop keys so that future props updates can iterate using Array
  127884. // instead of dynamic object key enumeration.
  127885. var keys = vm.$options._propKeys = [];
  127886. var isRoot = !vm.$parent;
  127887. // root instance props should be converted
  127888. if (!isRoot) {
  127889. toggleObserving(false);
  127890. }
  127891. var loop = function ( key ) {
  127892. keys.push(key);
  127893. var value = validateProp(key, propsOptions, propsData, vm);
  127894. /* istanbul ignore else */
  127895. if (true) {
  127896. var hyphenatedKey = hyphenate(key);
  127897. if (isReservedAttribute(hyphenatedKey) ||
  127898. config.isReservedAttr(hyphenatedKey)) {
  127899. warn(
  127900. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  127901. vm
  127902. );
  127903. }
  127904. defineReactive$$1(props, key, value, function () {
  127905. if (!isRoot && !isUpdatingChildComponent) {
  127906. warn(
  127907. "Avoid mutating a prop directly since the value will be " +
  127908. "overwritten whenever the parent component re-renders. " +
  127909. "Instead, use a data or computed property based on the prop's " +
  127910. "value. Prop being mutated: \"" + key + "\"",
  127911. vm
  127912. );
  127913. }
  127914. });
  127915. } else {}
  127916. // static props are already proxied on the component's prototype
  127917. // during Vue.extend(). We only need to proxy props defined at
  127918. // instantiation here.
  127919. if (!(key in vm)) {
  127920. proxy(vm, "_props", key);
  127921. }
  127922. };
  127923. for (var key in propsOptions) loop( key );
  127924. toggleObserving(true);
  127925. }
  127926. function initData (vm) {
  127927. var data = vm.$options.data;
  127928. data = vm._data = typeof data === 'function'
  127929. ? getData(data, vm)
  127930. : data || {};
  127931. if (!isPlainObject(data)) {
  127932. data = {};
  127933. true && warn(
  127934. 'data functions should return an object:\n' +
  127935. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  127936. vm
  127937. );
  127938. }
  127939. // proxy data on instance
  127940. var keys = Object.keys(data);
  127941. var props = vm.$options.props;
  127942. var methods = vm.$options.methods;
  127943. var i = keys.length;
  127944. while (i--) {
  127945. var key = keys[i];
  127946. if (true) {
  127947. if (methods && hasOwn(methods, key)) {
  127948. warn(
  127949. ("Method \"" + key + "\" has already been defined as a data property."),
  127950. vm
  127951. );
  127952. }
  127953. }
  127954. if (props && hasOwn(props, key)) {
  127955. true && warn(
  127956. "The data property \"" + key + "\" is already declared as a prop. " +
  127957. "Use prop default value instead.",
  127958. vm
  127959. );
  127960. } else if (!isReserved(key)) {
  127961. proxy(vm, "_data", key);
  127962. }
  127963. }
  127964. // observe data
  127965. observe(data, true /* asRootData */);
  127966. }
  127967. function getData (data, vm) {
  127968. // #7573 disable dep collection when invoking data getters
  127969. pushTarget();
  127970. try {
  127971. return data.call(vm, vm)
  127972. } catch (e) {
  127973. handleError(e, vm, "data()");
  127974. return {}
  127975. } finally {
  127976. popTarget();
  127977. }
  127978. }
  127979. var computedWatcherOptions = { lazy: true };
  127980. function initComputed (vm, computed) {
  127981. // $flow-disable-line
  127982. var watchers = vm._computedWatchers = Object.create(null);
  127983. // computed properties are just getters during SSR
  127984. var isSSR = isServerRendering();
  127985. for (var key in computed) {
  127986. var userDef = computed[key];
  127987. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  127988. if ( true && getter == null) {
  127989. warn(
  127990. ("Getter is missing for computed property \"" + key + "\"."),
  127991. vm
  127992. );
  127993. }
  127994. if (!isSSR) {
  127995. // create internal watcher for the computed property.
  127996. watchers[key] = new Watcher(
  127997. vm,
  127998. getter || noop,
  127999. noop,
  128000. computedWatcherOptions
  128001. );
  128002. }
  128003. // component-defined computed properties are already defined on the
  128004. // component prototype. We only need to define computed properties defined
  128005. // at instantiation here.
  128006. if (!(key in vm)) {
  128007. defineComputed(vm, key, userDef);
  128008. } else if (true) {
  128009. if (key in vm.$data) {
  128010. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  128011. } else if (vm.$options.props && key in vm.$options.props) {
  128012. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  128013. }
  128014. }
  128015. }
  128016. }
  128017. function defineComputed (
  128018. target,
  128019. key,
  128020. userDef
  128021. ) {
  128022. var shouldCache = !isServerRendering();
  128023. if (typeof userDef === 'function') {
  128024. sharedPropertyDefinition.get = shouldCache
  128025. ? createComputedGetter(key)
  128026. : createGetterInvoker(userDef);
  128027. sharedPropertyDefinition.set = noop;
  128028. } else {
  128029. sharedPropertyDefinition.get = userDef.get
  128030. ? shouldCache && userDef.cache !== false
  128031. ? createComputedGetter(key)
  128032. : createGetterInvoker(userDef.get)
  128033. : noop;
  128034. sharedPropertyDefinition.set = userDef.set || noop;
  128035. }
  128036. if ( true &&
  128037. sharedPropertyDefinition.set === noop) {
  128038. sharedPropertyDefinition.set = function () {
  128039. warn(
  128040. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  128041. this
  128042. );
  128043. };
  128044. }
  128045. Object.defineProperty(target, key, sharedPropertyDefinition);
  128046. }
  128047. function createComputedGetter (key) {
  128048. return function computedGetter () {
  128049. var watcher = this._computedWatchers && this._computedWatchers[key];
  128050. if (watcher) {
  128051. if (watcher.dirty) {
  128052. watcher.evaluate();
  128053. }
  128054. if (Dep.target) {
  128055. watcher.depend();
  128056. }
  128057. return watcher.value
  128058. }
  128059. }
  128060. }
  128061. function createGetterInvoker(fn) {
  128062. return function computedGetter () {
  128063. return fn.call(this, this)
  128064. }
  128065. }
  128066. function initMethods (vm, methods) {
  128067. var props = vm.$options.props;
  128068. for (var key in methods) {
  128069. if (true) {
  128070. if (typeof methods[key] !== 'function') {
  128071. warn(
  128072. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  128073. "Did you reference the function correctly?",
  128074. vm
  128075. );
  128076. }
  128077. if (props && hasOwn(props, key)) {
  128078. warn(
  128079. ("Method \"" + key + "\" has already been defined as a prop."),
  128080. vm
  128081. );
  128082. }
  128083. if ((key in vm) && isReserved(key)) {
  128084. warn(
  128085. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  128086. "Avoid defining component methods that start with _ or $."
  128087. );
  128088. }
  128089. }
  128090. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  128091. }
  128092. }
  128093. function initWatch (vm, watch) {
  128094. for (var key in watch) {
  128095. var handler = watch[key];
  128096. if (Array.isArray(handler)) {
  128097. for (var i = 0; i < handler.length; i++) {
  128098. createWatcher(vm, key, handler[i]);
  128099. }
  128100. } else {
  128101. createWatcher(vm, key, handler);
  128102. }
  128103. }
  128104. }
  128105. function createWatcher (
  128106. vm,
  128107. expOrFn,
  128108. handler,
  128109. options
  128110. ) {
  128111. if (isPlainObject(handler)) {
  128112. options = handler;
  128113. handler = handler.handler;
  128114. }
  128115. if (typeof handler === 'string') {
  128116. handler = vm[handler];
  128117. }
  128118. return vm.$watch(expOrFn, handler, options)
  128119. }
  128120. function stateMixin (Vue) {
  128121. // flow somehow has problems with directly declared definition object
  128122. // when using Object.defineProperty, so we have to procedurally build up
  128123. // the object here.
  128124. var dataDef = {};
  128125. dataDef.get = function () { return this._data };
  128126. var propsDef = {};
  128127. propsDef.get = function () { return this._props };
  128128. if (true) {
  128129. dataDef.set = function () {
  128130. warn(
  128131. 'Avoid replacing instance root $data. ' +
  128132. 'Use nested data properties instead.',
  128133. this
  128134. );
  128135. };
  128136. propsDef.set = function () {
  128137. warn("$props is readonly.", this);
  128138. };
  128139. }
  128140. Object.defineProperty(Vue.prototype, '$data', dataDef);
  128141. Object.defineProperty(Vue.prototype, '$props', propsDef);
  128142. Vue.prototype.$set = set;
  128143. Vue.prototype.$delete = del;
  128144. Vue.prototype.$watch = function (
  128145. expOrFn,
  128146. cb,
  128147. options
  128148. ) {
  128149. var vm = this;
  128150. if (isPlainObject(cb)) {
  128151. return createWatcher(vm, expOrFn, cb, options)
  128152. }
  128153. options = options || {};
  128154. options.user = true;
  128155. var watcher = new Watcher(vm, expOrFn, cb, options);
  128156. if (options.immediate) {
  128157. try {
  128158. cb.call(vm, watcher.value);
  128159. } catch (error) {
  128160. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  128161. }
  128162. }
  128163. return function unwatchFn () {
  128164. watcher.teardown();
  128165. }
  128166. };
  128167. }
  128168. /* */
  128169. var uid$3 = 0;
  128170. function initMixin (Vue) {
  128171. Vue.prototype._init = function (options) {
  128172. var vm = this;
  128173. // a uid
  128174. vm._uid = uid$3++;
  128175. var startTag, endTag;
  128176. /* istanbul ignore if */
  128177. if ( true && config.performance && mark) {
  128178. startTag = "vue-perf-start:" + (vm._uid);
  128179. endTag = "vue-perf-end:" + (vm._uid);
  128180. mark(startTag);
  128181. }
  128182. // a flag to avoid this being observed
  128183. vm._isVue = true;
  128184. // merge options
  128185. if (options && options._isComponent) {
  128186. // optimize internal component instantiation
  128187. // since dynamic options merging is pretty slow, and none of the
  128188. // internal component options needs special treatment.
  128189. initInternalComponent(vm, options);
  128190. } else {
  128191. vm.$options = mergeOptions(
  128192. resolveConstructorOptions(vm.constructor),
  128193. options || {},
  128194. vm
  128195. );
  128196. }
  128197. /* istanbul ignore else */
  128198. if (true) {
  128199. initProxy(vm);
  128200. } else {}
  128201. // expose real self
  128202. vm._self = vm;
  128203. initLifecycle(vm);
  128204. initEvents(vm);
  128205. initRender(vm);
  128206. callHook(vm, 'beforeCreate');
  128207. initInjections(vm); // resolve injections before data/props
  128208. initState(vm);
  128209. initProvide(vm); // resolve provide after data/props
  128210. callHook(vm, 'created');
  128211. /* istanbul ignore if */
  128212. if ( true && config.performance && mark) {
  128213. vm._name = formatComponentName(vm, false);
  128214. mark(endTag);
  128215. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  128216. }
  128217. if (vm.$options.el) {
  128218. vm.$mount(vm.$options.el);
  128219. }
  128220. };
  128221. }
  128222. function initInternalComponent (vm, options) {
  128223. var opts = vm.$options = Object.create(vm.constructor.options);
  128224. // doing this because it's faster than dynamic enumeration.
  128225. var parentVnode = options._parentVnode;
  128226. opts.parent = options.parent;
  128227. opts._parentVnode = parentVnode;
  128228. var vnodeComponentOptions = parentVnode.componentOptions;
  128229. opts.propsData = vnodeComponentOptions.propsData;
  128230. opts._parentListeners = vnodeComponentOptions.listeners;
  128231. opts._renderChildren = vnodeComponentOptions.children;
  128232. opts._componentTag = vnodeComponentOptions.tag;
  128233. if (options.render) {
  128234. opts.render = options.render;
  128235. opts.staticRenderFns = options.staticRenderFns;
  128236. }
  128237. }
  128238. function resolveConstructorOptions (Ctor) {
  128239. var options = Ctor.options;
  128240. if (Ctor.super) {
  128241. var superOptions = resolveConstructorOptions(Ctor.super);
  128242. var cachedSuperOptions = Ctor.superOptions;
  128243. if (superOptions !== cachedSuperOptions) {
  128244. // super option changed,
  128245. // need to resolve new options.
  128246. Ctor.superOptions = superOptions;
  128247. // check if there are any late-modified/attached options (#4976)
  128248. var modifiedOptions = resolveModifiedOptions(Ctor);
  128249. // update base extend options
  128250. if (modifiedOptions) {
  128251. extend(Ctor.extendOptions, modifiedOptions);
  128252. }
  128253. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  128254. if (options.name) {
  128255. options.components[options.name] = Ctor;
  128256. }
  128257. }
  128258. }
  128259. return options
  128260. }
  128261. function resolveModifiedOptions (Ctor) {
  128262. var modified;
  128263. var latest = Ctor.options;
  128264. var sealed = Ctor.sealedOptions;
  128265. for (var key in latest) {
  128266. if (latest[key] !== sealed[key]) {
  128267. if (!modified) { modified = {}; }
  128268. modified[key] = latest[key];
  128269. }
  128270. }
  128271. return modified
  128272. }
  128273. function Vue (options) {
  128274. if ( true &&
  128275. !(this instanceof Vue)
  128276. ) {
  128277. warn('Vue is a constructor and should be called with the `new` keyword');
  128278. }
  128279. this._init(options);
  128280. }
  128281. initMixin(Vue);
  128282. stateMixin(Vue);
  128283. eventsMixin(Vue);
  128284. lifecycleMixin(Vue);
  128285. renderMixin(Vue);
  128286. /* */
  128287. function initUse (Vue) {
  128288. Vue.use = function (plugin) {
  128289. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  128290. if (installedPlugins.indexOf(plugin) > -1) {
  128291. return this
  128292. }
  128293. // additional parameters
  128294. var args = toArray(arguments, 1);
  128295. args.unshift(this);
  128296. if (typeof plugin.install === 'function') {
  128297. plugin.install.apply(plugin, args);
  128298. } else if (typeof plugin === 'function') {
  128299. plugin.apply(null, args);
  128300. }
  128301. installedPlugins.push(plugin);
  128302. return this
  128303. };
  128304. }
  128305. /* */
  128306. function initMixin$1 (Vue) {
  128307. Vue.mixin = function (mixin) {
  128308. this.options = mergeOptions(this.options, mixin);
  128309. return this
  128310. };
  128311. }
  128312. /* */
  128313. function initExtend (Vue) {
  128314. /**
  128315. * Each instance constructor, including Vue, has a unique
  128316. * cid. This enables us to create wrapped "child
  128317. * constructors" for prototypal inheritance and cache them.
  128318. */
  128319. Vue.cid = 0;
  128320. var cid = 1;
  128321. /**
  128322. * Class inheritance
  128323. */
  128324. Vue.extend = function (extendOptions) {
  128325. extendOptions = extendOptions || {};
  128326. var Super = this;
  128327. var SuperId = Super.cid;
  128328. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  128329. if (cachedCtors[SuperId]) {
  128330. return cachedCtors[SuperId]
  128331. }
  128332. var name = extendOptions.name || Super.options.name;
  128333. if ( true && name) {
  128334. validateComponentName(name);
  128335. }
  128336. var Sub = function VueComponent (options) {
  128337. this._init(options);
  128338. };
  128339. Sub.prototype = Object.create(Super.prototype);
  128340. Sub.prototype.constructor = Sub;
  128341. Sub.cid = cid++;
  128342. Sub.options = mergeOptions(
  128343. Super.options,
  128344. extendOptions
  128345. );
  128346. Sub['super'] = Super;
  128347. // For props and computed properties, we define the proxy getters on
  128348. // the Vue instances at extension time, on the extended prototype. This
  128349. // avoids Object.defineProperty calls for each instance created.
  128350. if (Sub.options.props) {
  128351. initProps$1(Sub);
  128352. }
  128353. if (Sub.options.computed) {
  128354. initComputed$1(Sub);
  128355. }
  128356. // allow further extension/mixin/plugin usage
  128357. Sub.extend = Super.extend;
  128358. Sub.mixin = Super.mixin;
  128359. Sub.use = Super.use;
  128360. // create asset registers, so extended classes
  128361. // can have their private assets too.
  128362. ASSET_TYPES.forEach(function (type) {
  128363. Sub[type] = Super[type];
  128364. });
  128365. // enable recursive self-lookup
  128366. if (name) {
  128367. Sub.options.components[name] = Sub;
  128368. }
  128369. // keep a reference to the super options at extension time.
  128370. // later at instantiation we can check if Super's options have
  128371. // been updated.
  128372. Sub.superOptions = Super.options;
  128373. Sub.extendOptions = extendOptions;
  128374. Sub.sealedOptions = extend({}, Sub.options);
  128375. // cache constructor
  128376. cachedCtors[SuperId] = Sub;
  128377. return Sub
  128378. };
  128379. }
  128380. function initProps$1 (Comp) {
  128381. var props = Comp.options.props;
  128382. for (var key in props) {
  128383. proxy(Comp.prototype, "_props", key);
  128384. }
  128385. }
  128386. function initComputed$1 (Comp) {
  128387. var computed = Comp.options.computed;
  128388. for (var key in computed) {
  128389. defineComputed(Comp.prototype, key, computed[key]);
  128390. }
  128391. }
  128392. /* */
  128393. function initAssetRegisters (Vue) {
  128394. /**
  128395. * Create asset registration methods.
  128396. */
  128397. ASSET_TYPES.forEach(function (type) {
  128398. Vue[type] = function (
  128399. id,
  128400. definition
  128401. ) {
  128402. if (!definition) {
  128403. return this.options[type + 's'][id]
  128404. } else {
  128405. /* istanbul ignore if */
  128406. if ( true && type === 'component') {
  128407. validateComponentName(id);
  128408. }
  128409. if (type === 'component' && isPlainObject(definition)) {
  128410. definition.name = definition.name || id;
  128411. definition = this.options._base.extend(definition);
  128412. }
  128413. if (type === 'directive' && typeof definition === 'function') {
  128414. definition = { bind: definition, update: definition };
  128415. }
  128416. this.options[type + 's'][id] = definition;
  128417. return definition
  128418. }
  128419. };
  128420. });
  128421. }
  128422. /* */
  128423. function getComponentName (opts) {
  128424. return opts && (opts.Ctor.options.name || opts.tag)
  128425. }
  128426. function matches (pattern, name) {
  128427. if (Array.isArray(pattern)) {
  128428. return pattern.indexOf(name) > -1
  128429. } else if (typeof pattern === 'string') {
  128430. return pattern.split(',').indexOf(name) > -1
  128431. } else if (isRegExp(pattern)) {
  128432. return pattern.test(name)
  128433. }
  128434. /* istanbul ignore next */
  128435. return false
  128436. }
  128437. function pruneCache (keepAliveInstance, filter) {
  128438. var cache = keepAliveInstance.cache;
  128439. var keys = keepAliveInstance.keys;
  128440. var _vnode = keepAliveInstance._vnode;
  128441. for (var key in cache) {
  128442. var cachedNode = cache[key];
  128443. if (cachedNode) {
  128444. var name = getComponentName(cachedNode.componentOptions);
  128445. if (name && !filter(name)) {
  128446. pruneCacheEntry(cache, key, keys, _vnode);
  128447. }
  128448. }
  128449. }
  128450. }
  128451. function pruneCacheEntry (
  128452. cache,
  128453. key,
  128454. keys,
  128455. current
  128456. ) {
  128457. var cached$$1 = cache[key];
  128458. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  128459. cached$$1.componentInstance.$destroy();
  128460. }
  128461. cache[key] = null;
  128462. remove(keys, key);
  128463. }
  128464. var patternTypes = [String, RegExp, Array];
  128465. var KeepAlive = {
  128466. name: 'keep-alive',
  128467. abstract: true,
  128468. props: {
  128469. include: patternTypes,
  128470. exclude: patternTypes,
  128471. max: [String, Number]
  128472. },
  128473. created: function created () {
  128474. this.cache = Object.create(null);
  128475. this.keys = [];
  128476. },
  128477. destroyed: function destroyed () {
  128478. for (var key in this.cache) {
  128479. pruneCacheEntry(this.cache, key, this.keys);
  128480. }
  128481. },
  128482. mounted: function mounted () {
  128483. var this$1 = this;
  128484. this.$watch('include', function (val) {
  128485. pruneCache(this$1, function (name) { return matches(val, name); });
  128486. });
  128487. this.$watch('exclude', function (val) {
  128488. pruneCache(this$1, function (name) { return !matches(val, name); });
  128489. });
  128490. },
  128491. render: function render () {
  128492. var slot = this.$slots.default;
  128493. var vnode = getFirstComponentChild(slot);
  128494. var componentOptions = vnode && vnode.componentOptions;
  128495. if (componentOptions) {
  128496. // check pattern
  128497. var name = getComponentName(componentOptions);
  128498. var ref = this;
  128499. var include = ref.include;
  128500. var exclude = ref.exclude;
  128501. if (
  128502. // not included
  128503. (include && (!name || !matches(include, name))) ||
  128504. // excluded
  128505. (exclude && name && matches(exclude, name))
  128506. ) {
  128507. return vnode
  128508. }
  128509. var ref$1 = this;
  128510. var cache = ref$1.cache;
  128511. var keys = ref$1.keys;
  128512. var key = vnode.key == null
  128513. // same constructor may get registered as different local components
  128514. // so cid alone is not enough (#3269)
  128515. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  128516. : vnode.key;
  128517. if (cache[key]) {
  128518. vnode.componentInstance = cache[key].componentInstance;
  128519. // make current key freshest
  128520. remove(keys, key);
  128521. keys.push(key);
  128522. } else {
  128523. cache[key] = vnode;
  128524. keys.push(key);
  128525. // prune oldest entry
  128526. if (this.max && keys.length > parseInt(this.max)) {
  128527. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  128528. }
  128529. }
  128530. vnode.data.keepAlive = true;
  128531. }
  128532. return vnode || (slot && slot[0])
  128533. }
  128534. };
  128535. var builtInComponents = {
  128536. KeepAlive: KeepAlive
  128537. };
  128538. /* */
  128539. function initGlobalAPI (Vue) {
  128540. // config
  128541. var configDef = {};
  128542. configDef.get = function () { return config; };
  128543. if (true) {
  128544. configDef.set = function () {
  128545. warn(
  128546. 'Do not replace the Vue.config object, set individual fields instead.'
  128547. );
  128548. };
  128549. }
  128550. Object.defineProperty(Vue, 'config', configDef);
  128551. // exposed util methods.
  128552. // NOTE: these are not considered part of the public API - avoid relying on
  128553. // them unless you are aware of the risk.
  128554. Vue.util = {
  128555. warn: warn,
  128556. extend: extend,
  128557. mergeOptions: mergeOptions,
  128558. defineReactive: defineReactive$$1
  128559. };
  128560. Vue.set = set;
  128561. Vue.delete = del;
  128562. Vue.nextTick = nextTick;
  128563. // 2.6 explicit observable API
  128564. Vue.observable = function (obj) {
  128565. observe(obj);
  128566. return obj
  128567. };
  128568. Vue.options = Object.create(null);
  128569. ASSET_TYPES.forEach(function (type) {
  128570. Vue.options[type + 's'] = Object.create(null);
  128571. });
  128572. // this is used to identify the "base" constructor to extend all plain-object
  128573. // components with in Weex's multi-instance scenarios.
  128574. Vue.options._base = Vue;
  128575. extend(Vue.options.components, builtInComponents);
  128576. initUse(Vue);
  128577. initMixin$1(Vue);
  128578. initExtend(Vue);
  128579. initAssetRegisters(Vue);
  128580. }
  128581. initGlobalAPI(Vue);
  128582. Object.defineProperty(Vue.prototype, '$isServer', {
  128583. get: isServerRendering
  128584. });
  128585. Object.defineProperty(Vue.prototype, '$ssrContext', {
  128586. get: function get () {
  128587. /* istanbul ignore next */
  128588. return this.$vnode && this.$vnode.ssrContext
  128589. }
  128590. });
  128591. // expose FunctionalRenderContext for ssr runtime helper installation
  128592. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  128593. value: FunctionalRenderContext
  128594. });
  128595. Vue.version = '2.6.12';
  128596. /* */
  128597. // these are reserved for web because they are directly compiled away
  128598. // during template compilation
  128599. var isReservedAttr = makeMap('style,class');
  128600. // attributes that should be using props for binding
  128601. var acceptValue = makeMap('input,textarea,option,select,progress');
  128602. var mustUseProp = function (tag, type, attr) {
  128603. return (
  128604. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  128605. (attr === 'selected' && tag === 'option') ||
  128606. (attr === 'checked' && tag === 'input') ||
  128607. (attr === 'muted' && tag === 'video')
  128608. )
  128609. };
  128610. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  128611. var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
  128612. var convertEnumeratedValue = function (key, value) {
  128613. return isFalsyAttrValue(value) || value === 'false'
  128614. ? 'false'
  128615. // allow arbitrary string value for contenteditable
  128616. : key === 'contenteditable' && isValidContentEditableValue(value)
  128617. ? value
  128618. : 'true'
  128619. };
  128620. var isBooleanAttr = makeMap(
  128621. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  128622. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  128623. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  128624. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  128625. 'required,reversed,scoped,seamless,selected,sortable,translate,' +
  128626. 'truespeed,typemustmatch,visible'
  128627. );
  128628. var xlinkNS = 'http://www.w3.org/1999/xlink';
  128629. var isXlink = function (name) {
  128630. return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
  128631. };
  128632. var getXlinkProp = function (name) {
  128633. return isXlink(name) ? name.slice(6, name.length) : ''
  128634. };
  128635. var isFalsyAttrValue = function (val) {
  128636. return val == null || val === false
  128637. };
  128638. /* */
  128639. function genClassForVnode (vnode) {
  128640. var data = vnode.data;
  128641. var parentNode = vnode;
  128642. var childNode = vnode;
  128643. while (isDef(childNode.componentInstance)) {
  128644. childNode = childNode.componentInstance._vnode;
  128645. if (childNode && childNode.data) {
  128646. data = mergeClassData(childNode.data, data);
  128647. }
  128648. }
  128649. while (isDef(parentNode = parentNode.parent)) {
  128650. if (parentNode && parentNode.data) {
  128651. data = mergeClassData(data, parentNode.data);
  128652. }
  128653. }
  128654. return renderClass(data.staticClass, data.class)
  128655. }
  128656. function mergeClassData (child, parent) {
  128657. return {
  128658. staticClass: concat(child.staticClass, parent.staticClass),
  128659. class: isDef(child.class)
  128660. ? [child.class, parent.class]
  128661. : parent.class
  128662. }
  128663. }
  128664. function renderClass (
  128665. staticClass,
  128666. dynamicClass
  128667. ) {
  128668. if (isDef(staticClass) || isDef(dynamicClass)) {
  128669. return concat(staticClass, stringifyClass(dynamicClass))
  128670. }
  128671. /* istanbul ignore next */
  128672. return ''
  128673. }
  128674. function concat (a, b) {
  128675. return a ? b ? (a + ' ' + b) : a : (b || '')
  128676. }
  128677. function stringifyClass (value) {
  128678. if (Array.isArray(value)) {
  128679. return stringifyArray(value)
  128680. }
  128681. if (isObject(value)) {
  128682. return stringifyObject(value)
  128683. }
  128684. if (typeof value === 'string') {
  128685. return value
  128686. }
  128687. /* istanbul ignore next */
  128688. return ''
  128689. }
  128690. function stringifyArray (value) {
  128691. var res = '';
  128692. var stringified;
  128693. for (var i = 0, l = value.length; i < l; i++) {
  128694. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  128695. if (res) { res += ' '; }
  128696. res += stringified;
  128697. }
  128698. }
  128699. return res
  128700. }
  128701. function stringifyObject (value) {
  128702. var res = '';
  128703. for (var key in value) {
  128704. if (value[key]) {
  128705. if (res) { res += ' '; }
  128706. res += key;
  128707. }
  128708. }
  128709. return res
  128710. }
  128711. /* */
  128712. var namespaceMap = {
  128713. svg: 'http://www.w3.org/2000/svg',
  128714. math: 'http://www.w3.org/1998/Math/MathML'
  128715. };
  128716. var isHTMLTag = makeMap(
  128717. 'html,body,base,head,link,meta,style,title,' +
  128718. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  128719. 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
  128720. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  128721. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  128722. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  128723. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  128724. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  128725. 'output,progress,select,textarea,' +
  128726. 'details,dialog,menu,menuitem,summary,' +
  128727. 'content,element,shadow,template,blockquote,iframe,tfoot'
  128728. );
  128729. // this map is intentionally selective, only covering SVG elements that may
  128730. // contain child elements.
  128731. var isSVG = makeMap(
  128732. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  128733. 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  128734. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  128735. true
  128736. );
  128737. var isPreTag = function (tag) { return tag === 'pre'; };
  128738. var isReservedTag = function (tag) {
  128739. return isHTMLTag(tag) || isSVG(tag)
  128740. };
  128741. function getTagNamespace (tag) {
  128742. if (isSVG(tag)) {
  128743. return 'svg'
  128744. }
  128745. // basic support for MathML
  128746. // note it doesn't support other MathML elements being component roots
  128747. if (tag === 'math') {
  128748. return 'math'
  128749. }
  128750. }
  128751. var unknownElementCache = Object.create(null);
  128752. function isUnknownElement (tag) {
  128753. /* istanbul ignore if */
  128754. if (!inBrowser) {
  128755. return true
  128756. }
  128757. if (isReservedTag(tag)) {
  128758. return false
  128759. }
  128760. tag = tag.toLowerCase();
  128761. /* istanbul ignore if */
  128762. if (unknownElementCache[tag] != null) {
  128763. return unknownElementCache[tag]
  128764. }
  128765. var el = document.createElement(tag);
  128766. if (tag.indexOf('-') > -1) {
  128767. // http://stackoverflow.com/a/28210364/1070244
  128768. return (unknownElementCache[tag] = (
  128769. el.constructor === window.HTMLUnknownElement ||
  128770. el.constructor === window.HTMLElement
  128771. ))
  128772. } else {
  128773. return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
  128774. }
  128775. }
  128776. var isTextInputType = makeMap('text,number,password,search,email,tel,url');
  128777. /* */
  128778. /**
  128779. * Query an element selector if it's not an element already.
  128780. */
  128781. function query (el) {
  128782. if (typeof el === 'string') {
  128783. var selected = document.querySelector(el);
  128784. if (!selected) {
  128785. true && warn(
  128786. 'Cannot find element: ' + el
  128787. );
  128788. return document.createElement('div')
  128789. }
  128790. return selected
  128791. } else {
  128792. return el
  128793. }
  128794. }
  128795. /* */
  128796. function createElement$1 (tagName, vnode) {
  128797. var elm = document.createElement(tagName);
  128798. if (tagName !== 'select') {
  128799. return elm
  128800. }
  128801. // false or null will remove the attribute but undefined will not
  128802. if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
  128803. elm.setAttribute('multiple', 'multiple');
  128804. }
  128805. return elm
  128806. }
  128807. function createElementNS (namespace, tagName) {
  128808. return document.createElementNS(namespaceMap[namespace], tagName)
  128809. }
  128810. function createTextNode (text) {
  128811. return document.createTextNode(text)
  128812. }
  128813. function createComment (text) {
  128814. return document.createComment(text)
  128815. }
  128816. function insertBefore (parentNode, newNode, referenceNode) {
  128817. parentNode.insertBefore(newNode, referenceNode);
  128818. }
  128819. function removeChild (node, child) {
  128820. node.removeChild(child);
  128821. }
  128822. function appendChild (node, child) {
  128823. node.appendChild(child);
  128824. }
  128825. function parentNode (node) {
  128826. return node.parentNode
  128827. }
  128828. function nextSibling (node) {
  128829. return node.nextSibling
  128830. }
  128831. function tagName (node) {
  128832. return node.tagName
  128833. }
  128834. function setTextContent (node, text) {
  128835. node.textContent = text;
  128836. }
  128837. function setStyleScope (node, scopeId) {
  128838. node.setAttribute(scopeId, '');
  128839. }
  128840. var nodeOps = /*#__PURE__*/Object.freeze({
  128841. createElement: createElement$1,
  128842. createElementNS: createElementNS,
  128843. createTextNode: createTextNode,
  128844. createComment: createComment,
  128845. insertBefore: insertBefore,
  128846. removeChild: removeChild,
  128847. appendChild: appendChild,
  128848. parentNode: parentNode,
  128849. nextSibling: nextSibling,
  128850. tagName: tagName,
  128851. setTextContent: setTextContent,
  128852. setStyleScope: setStyleScope
  128853. });
  128854. /* */
  128855. var ref = {
  128856. create: function create (_, vnode) {
  128857. registerRef(vnode);
  128858. },
  128859. update: function update (oldVnode, vnode) {
  128860. if (oldVnode.data.ref !== vnode.data.ref) {
  128861. registerRef(oldVnode, true);
  128862. registerRef(vnode);
  128863. }
  128864. },
  128865. destroy: function destroy (vnode) {
  128866. registerRef(vnode, true);
  128867. }
  128868. };
  128869. function registerRef (vnode, isRemoval) {
  128870. var key = vnode.data.ref;
  128871. if (!isDef(key)) { return }
  128872. var vm = vnode.context;
  128873. var ref = vnode.componentInstance || vnode.elm;
  128874. var refs = vm.$refs;
  128875. if (isRemoval) {
  128876. if (Array.isArray(refs[key])) {
  128877. remove(refs[key], ref);
  128878. } else if (refs[key] === ref) {
  128879. refs[key] = undefined;
  128880. }
  128881. } else {
  128882. if (vnode.data.refInFor) {
  128883. if (!Array.isArray(refs[key])) {
  128884. refs[key] = [ref];
  128885. } else if (refs[key].indexOf(ref) < 0) {
  128886. // $flow-disable-line
  128887. refs[key].push(ref);
  128888. }
  128889. } else {
  128890. refs[key] = ref;
  128891. }
  128892. }
  128893. }
  128894. /**
  128895. * Virtual DOM patching algorithm based on Snabbdom by
  128896. * Simon Friis Vindum (@paldepind)
  128897. * Licensed under the MIT License
  128898. * https://github.com/paldepind/snabbdom/blob/master/LICENSE
  128899. *
  128900. * modified by Evan You (@yyx990803)
  128901. *
  128902. * Not type-checking this because this file is perf-critical and the cost
  128903. * of making flow understand it is not worth it.
  128904. */
  128905. var emptyNode = new VNode('', {}, []);
  128906. var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
  128907. function sameVnode (a, b) {
  128908. return (
  128909. a.key === b.key && (
  128910. (
  128911. a.tag === b.tag &&
  128912. a.isComment === b.isComment &&
  128913. isDef(a.data) === isDef(b.data) &&
  128914. sameInputType(a, b)
  128915. ) || (
  128916. isTrue(a.isAsyncPlaceholder) &&
  128917. a.asyncFactory === b.asyncFactory &&
  128918. isUndef(b.asyncFactory.error)
  128919. )
  128920. )
  128921. )
  128922. }
  128923. function sameInputType (a, b) {
  128924. if (a.tag !== 'input') { return true }
  128925. var i;
  128926. var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
  128927. var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
  128928. return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
  128929. }
  128930. function createKeyToOldIdx (children, beginIdx, endIdx) {
  128931. var i, key;
  128932. var map = {};
  128933. for (i = beginIdx; i <= endIdx; ++i) {
  128934. key = children[i].key;
  128935. if (isDef(key)) { map[key] = i; }
  128936. }
  128937. return map
  128938. }
  128939. function createPatchFunction (backend) {
  128940. var i, j;
  128941. var cbs = {};
  128942. var modules = backend.modules;
  128943. var nodeOps = backend.nodeOps;
  128944. for (i = 0; i < hooks.length; ++i) {
  128945. cbs[hooks[i]] = [];
  128946. for (j = 0; j < modules.length; ++j) {
  128947. if (isDef(modules[j][hooks[i]])) {
  128948. cbs[hooks[i]].push(modules[j][hooks[i]]);
  128949. }
  128950. }
  128951. }
  128952. function emptyNodeAt (elm) {
  128953. return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
  128954. }
  128955. function createRmCb (childElm, listeners) {
  128956. function remove$$1 () {
  128957. if (--remove$$1.listeners === 0) {
  128958. removeNode(childElm);
  128959. }
  128960. }
  128961. remove$$1.listeners = listeners;
  128962. return remove$$1
  128963. }
  128964. function removeNode (el) {
  128965. var parent = nodeOps.parentNode(el);
  128966. // element may have already been removed due to v-html / v-text
  128967. if (isDef(parent)) {
  128968. nodeOps.removeChild(parent, el);
  128969. }
  128970. }
  128971. function isUnknownElement$$1 (vnode, inVPre) {
  128972. return (
  128973. !inVPre &&
  128974. !vnode.ns &&
  128975. !(
  128976. config.ignoredElements.length &&
  128977. config.ignoredElements.some(function (ignore) {
  128978. return isRegExp(ignore)
  128979. ? ignore.test(vnode.tag)
  128980. : ignore === vnode.tag
  128981. })
  128982. ) &&
  128983. config.isUnknownElement(vnode.tag)
  128984. )
  128985. }
  128986. var creatingElmInVPre = 0;
  128987. function createElm (
  128988. vnode,
  128989. insertedVnodeQueue,
  128990. parentElm,
  128991. refElm,
  128992. nested,
  128993. ownerArray,
  128994. index
  128995. ) {
  128996. if (isDef(vnode.elm) && isDef(ownerArray)) {
  128997. // This vnode was used in a previous render!
  128998. // now it's used as a new node, overwriting its elm would cause
  128999. // potential patch errors down the road when it's used as an insertion
  129000. // reference node. Instead, we clone the node on-demand before creating
  129001. // associated DOM element for it.
  129002. vnode = ownerArray[index] = cloneVNode(vnode);
  129003. }
  129004. vnode.isRootInsert = !nested; // for transition enter check
  129005. if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
  129006. return
  129007. }
  129008. var data = vnode.data;
  129009. var children = vnode.children;
  129010. var tag = vnode.tag;
  129011. if (isDef(tag)) {
  129012. if (true) {
  129013. if (data && data.pre) {
  129014. creatingElmInVPre++;
  129015. }
  129016. if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
  129017. warn(
  129018. 'Unknown custom element: <' + tag + '> - did you ' +
  129019. 'register the component correctly? For recursive components, ' +
  129020. 'make sure to provide the "name" option.',
  129021. vnode.context
  129022. );
  129023. }
  129024. }
  129025. vnode.elm = vnode.ns
  129026. ? nodeOps.createElementNS(vnode.ns, tag)
  129027. : nodeOps.createElement(tag, vnode);
  129028. setScope(vnode);
  129029. /* istanbul ignore if */
  129030. {
  129031. createChildren(vnode, children, insertedVnodeQueue);
  129032. if (isDef(data)) {
  129033. invokeCreateHooks(vnode, insertedVnodeQueue);
  129034. }
  129035. insert(parentElm, vnode.elm, refElm);
  129036. }
  129037. if ( true && data && data.pre) {
  129038. creatingElmInVPre--;
  129039. }
  129040. } else if (isTrue(vnode.isComment)) {
  129041. vnode.elm = nodeOps.createComment(vnode.text);
  129042. insert(parentElm, vnode.elm, refElm);
  129043. } else {
  129044. vnode.elm = nodeOps.createTextNode(vnode.text);
  129045. insert(parentElm, vnode.elm, refElm);
  129046. }
  129047. }
  129048. function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  129049. var i = vnode.data;
  129050. if (isDef(i)) {
  129051. var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
  129052. if (isDef(i = i.hook) && isDef(i = i.init)) {
  129053. i(vnode, false /* hydrating */);
  129054. }
  129055. // after calling the init hook, if the vnode is a child component
  129056. // it should've created a child instance and mounted it. the child
  129057. // component also has set the placeholder vnode's elm.
  129058. // in that case we can just return the element and be done.
  129059. if (isDef(vnode.componentInstance)) {
  129060. initComponent(vnode, insertedVnodeQueue);
  129061. insert(parentElm, vnode.elm, refElm);
  129062. if (isTrue(isReactivated)) {
  129063. reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
  129064. }
  129065. return true
  129066. }
  129067. }
  129068. }
  129069. function initComponent (vnode, insertedVnodeQueue) {
  129070. if (isDef(vnode.data.pendingInsert)) {
  129071. insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
  129072. vnode.data.pendingInsert = null;
  129073. }
  129074. vnode.elm = vnode.componentInstance.$el;
  129075. if (isPatchable(vnode)) {
  129076. invokeCreateHooks(vnode, insertedVnodeQueue);
  129077. setScope(vnode);
  129078. } else {
  129079. // empty component root.
  129080. // skip all element-related modules except for ref (#3455)
  129081. registerRef(vnode);
  129082. // make sure to invoke the insert hook
  129083. insertedVnodeQueue.push(vnode);
  129084. }
  129085. }
  129086. function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  129087. var i;
  129088. // hack for #4339: a reactivated component with inner transition
  129089. // does not trigger because the inner node's created hooks are not called
  129090. // again. It's not ideal to involve module-specific logic in here but
  129091. // there doesn't seem to be a better way to do it.
  129092. var innerNode = vnode;
  129093. while (innerNode.componentInstance) {
  129094. innerNode = innerNode.componentInstance._vnode;
  129095. if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
  129096. for (i = 0; i < cbs.activate.length; ++i) {
  129097. cbs.activate[i](emptyNode, innerNode);
  129098. }
  129099. insertedVnodeQueue.push(innerNode);
  129100. break
  129101. }
  129102. }
  129103. // unlike a newly created component,
  129104. // a reactivated keep-alive component doesn't insert itself
  129105. insert(parentElm, vnode.elm, refElm);
  129106. }
  129107. function insert (parent, elm, ref$$1) {
  129108. if (isDef(parent)) {
  129109. if (isDef(ref$$1)) {
  129110. if (nodeOps.parentNode(ref$$1) === parent) {
  129111. nodeOps.insertBefore(parent, elm, ref$$1);
  129112. }
  129113. } else {
  129114. nodeOps.appendChild(parent, elm);
  129115. }
  129116. }
  129117. }
  129118. function createChildren (vnode, children, insertedVnodeQueue) {
  129119. if (Array.isArray(children)) {
  129120. if (true) {
  129121. checkDuplicateKeys(children);
  129122. }
  129123. for (var i = 0; i < children.length; ++i) {
  129124. createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);
  129125. }
  129126. } else if (isPrimitive(vnode.text)) {
  129127. nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
  129128. }
  129129. }
  129130. function isPatchable (vnode) {
  129131. while (vnode.componentInstance) {
  129132. vnode = vnode.componentInstance._vnode;
  129133. }
  129134. return isDef(vnode.tag)
  129135. }
  129136. function invokeCreateHooks (vnode, insertedVnodeQueue) {
  129137. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  129138. cbs.create[i$1](emptyNode, vnode);
  129139. }
  129140. i = vnode.data.hook; // Reuse variable
  129141. if (isDef(i)) {
  129142. if (isDef(i.create)) { i.create(emptyNode, vnode); }
  129143. if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
  129144. }
  129145. }
  129146. // set scope id attribute for scoped CSS.
  129147. // this is implemented as a special case to avoid the overhead
  129148. // of going through the normal attribute patching process.
  129149. function setScope (vnode) {
  129150. var i;
  129151. if (isDef(i = vnode.fnScopeId)) {
  129152. nodeOps.setStyleScope(vnode.elm, i);
  129153. } else {
  129154. var ancestor = vnode;
  129155. while (ancestor) {
  129156. if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
  129157. nodeOps.setStyleScope(vnode.elm, i);
  129158. }
  129159. ancestor = ancestor.parent;
  129160. }
  129161. }
  129162. // for slot content they should also get the scopeId from the host instance.
  129163. if (isDef(i = activeInstance) &&
  129164. i !== vnode.context &&
  129165. i !== vnode.fnContext &&
  129166. isDef(i = i.$options._scopeId)
  129167. ) {
  129168. nodeOps.setStyleScope(vnode.elm, i);
  129169. }
  129170. }
  129171. function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  129172. for (; startIdx <= endIdx; ++startIdx) {
  129173. createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
  129174. }
  129175. }
  129176. function invokeDestroyHook (vnode) {
  129177. var i, j;
  129178. var data = vnode.data;
  129179. if (isDef(data)) {
  129180. if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
  129181. for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
  129182. }
  129183. if (isDef(i = vnode.children)) {
  129184. for (j = 0; j < vnode.children.length; ++j) {
  129185. invokeDestroyHook(vnode.children[j]);
  129186. }
  129187. }
  129188. }
  129189. function removeVnodes (vnodes, startIdx, endIdx) {
  129190. for (; startIdx <= endIdx; ++startIdx) {
  129191. var ch = vnodes[startIdx];
  129192. if (isDef(ch)) {
  129193. if (isDef(ch.tag)) {
  129194. removeAndInvokeRemoveHook(ch);
  129195. invokeDestroyHook(ch);
  129196. } else { // Text node
  129197. removeNode(ch.elm);
  129198. }
  129199. }
  129200. }
  129201. }
  129202. function removeAndInvokeRemoveHook (vnode, rm) {
  129203. if (isDef(rm) || isDef(vnode.data)) {
  129204. var i;
  129205. var listeners = cbs.remove.length + 1;
  129206. if (isDef(rm)) {
  129207. // we have a recursively passed down rm callback
  129208. // increase the listeners count
  129209. rm.listeners += listeners;
  129210. } else {
  129211. // directly removing
  129212. rm = createRmCb(vnode.elm, listeners);
  129213. }
  129214. // recursively invoke hooks on child component root node
  129215. if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
  129216. removeAndInvokeRemoveHook(i, rm);
  129217. }
  129218. for (i = 0; i < cbs.remove.length; ++i) {
  129219. cbs.remove[i](vnode, rm);
  129220. }
  129221. if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
  129222. i(vnode, rm);
  129223. } else {
  129224. rm();
  129225. }
  129226. } else {
  129227. removeNode(vnode.elm);
  129228. }
  129229. }
  129230. function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
  129231. var oldStartIdx = 0;
  129232. var newStartIdx = 0;
  129233. var oldEndIdx = oldCh.length - 1;
  129234. var oldStartVnode = oldCh[0];
  129235. var oldEndVnode = oldCh[oldEndIdx];
  129236. var newEndIdx = newCh.length - 1;
  129237. var newStartVnode = newCh[0];
  129238. var newEndVnode = newCh[newEndIdx];
  129239. var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
  129240. // removeOnly is a special flag used only by <transition-group>
  129241. // to ensure removed elements stay in correct relative positions
  129242. // during leaving transitions
  129243. var canMove = !removeOnly;
  129244. if (true) {
  129245. checkDuplicateKeys(newCh);
  129246. }
  129247. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  129248. if (isUndef(oldStartVnode)) {
  129249. oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
  129250. } else if (isUndef(oldEndVnode)) {
  129251. oldEndVnode = oldCh[--oldEndIdx];
  129252. } else if (sameVnode(oldStartVnode, newStartVnode)) {
  129253. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  129254. oldStartVnode = oldCh[++oldStartIdx];
  129255. newStartVnode = newCh[++newStartIdx];
  129256. } else if (sameVnode(oldEndVnode, newEndVnode)) {
  129257. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  129258. oldEndVnode = oldCh[--oldEndIdx];
  129259. newEndVnode = newCh[--newEndIdx];
  129260. } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
  129261. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  129262. canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
  129263. oldStartVnode = oldCh[++oldStartIdx];
  129264. newEndVnode = newCh[--newEndIdx];
  129265. } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
  129266. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  129267. canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  129268. oldEndVnode = oldCh[--oldEndIdx];
  129269. newStartVnode = newCh[++newStartIdx];
  129270. } else {
  129271. if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
  129272. idxInOld = isDef(newStartVnode.key)
  129273. ? oldKeyToIdx[newStartVnode.key]
  129274. : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
  129275. if (isUndef(idxInOld)) { // New element
  129276. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  129277. } else {
  129278. vnodeToMove = oldCh[idxInOld];
  129279. if (sameVnode(vnodeToMove, newStartVnode)) {
  129280. patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  129281. oldCh[idxInOld] = undefined;
  129282. canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
  129283. } else {
  129284. // same key but different element. treat as new element
  129285. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  129286. }
  129287. }
  129288. newStartVnode = newCh[++newStartIdx];
  129289. }
  129290. }
  129291. if (oldStartIdx > oldEndIdx) {
  129292. refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
  129293. addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  129294. } else if (newStartIdx > newEndIdx) {
  129295. removeVnodes(oldCh, oldStartIdx, oldEndIdx);
  129296. }
  129297. }
  129298. function checkDuplicateKeys (children) {
  129299. var seenKeys = {};
  129300. for (var i = 0; i < children.length; i++) {
  129301. var vnode = children[i];
  129302. var key = vnode.key;
  129303. if (isDef(key)) {
  129304. if (seenKeys[key]) {
  129305. warn(
  129306. ("Duplicate keys detected: '" + key + "'. This may cause an update error."),
  129307. vnode.context
  129308. );
  129309. } else {
  129310. seenKeys[key] = true;
  129311. }
  129312. }
  129313. }
  129314. }
  129315. function findIdxInOld (node, oldCh, start, end) {
  129316. for (var i = start; i < end; i++) {
  129317. var c = oldCh[i];
  129318. if (isDef(c) && sameVnode(node, c)) { return i }
  129319. }
  129320. }
  129321. function patchVnode (
  129322. oldVnode,
  129323. vnode,
  129324. insertedVnodeQueue,
  129325. ownerArray,
  129326. index,
  129327. removeOnly
  129328. ) {
  129329. if (oldVnode === vnode) {
  129330. return
  129331. }
  129332. if (isDef(vnode.elm) && isDef(ownerArray)) {
  129333. // clone reused vnode
  129334. vnode = ownerArray[index] = cloneVNode(vnode);
  129335. }
  129336. var elm = vnode.elm = oldVnode.elm;
  129337. if (isTrue(oldVnode.isAsyncPlaceholder)) {
  129338. if (isDef(vnode.asyncFactory.resolved)) {
  129339. hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
  129340. } else {
  129341. vnode.isAsyncPlaceholder = true;
  129342. }
  129343. return
  129344. }
  129345. // reuse element for static trees.
  129346. // note we only do this if the vnode is cloned -
  129347. // if the new node is not cloned it means the render functions have been
  129348. // reset by the hot-reload-api and we need to do a proper re-render.
  129349. if (isTrue(vnode.isStatic) &&
  129350. isTrue(oldVnode.isStatic) &&
  129351. vnode.key === oldVnode.key &&
  129352. (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
  129353. ) {
  129354. vnode.componentInstance = oldVnode.componentInstance;
  129355. return
  129356. }
  129357. var i;
  129358. var data = vnode.data;
  129359. if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
  129360. i(oldVnode, vnode);
  129361. }
  129362. var oldCh = oldVnode.children;
  129363. var ch = vnode.children;
  129364. if (isDef(data) && isPatchable(vnode)) {
  129365. for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
  129366. if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
  129367. }
  129368. if (isUndef(vnode.text)) {
  129369. if (isDef(oldCh) && isDef(ch)) {
  129370. if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
  129371. } else if (isDef(ch)) {
  129372. if (true) {
  129373. checkDuplicateKeys(ch);
  129374. }
  129375. if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
  129376. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  129377. } else if (isDef(oldCh)) {
  129378. removeVnodes(oldCh, 0, oldCh.length - 1);
  129379. } else if (isDef(oldVnode.text)) {
  129380. nodeOps.setTextContent(elm, '');
  129381. }
  129382. } else if (oldVnode.text !== vnode.text) {
  129383. nodeOps.setTextContent(elm, vnode.text);
  129384. }
  129385. if (isDef(data)) {
  129386. if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
  129387. }
  129388. }
  129389. function invokeInsertHook (vnode, queue, initial) {
  129390. // delay insert hooks for component root nodes, invoke them after the
  129391. // element is really inserted
  129392. if (isTrue(initial) && isDef(vnode.parent)) {
  129393. vnode.parent.data.pendingInsert = queue;
  129394. } else {
  129395. for (var i = 0; i < queue.length; ++i) {
  129396. queue[i].data.hook.insert(queue[i]);
  129397. }
  129398. }
  129399. }
  129400. var hydrationBailed = false;
  129401. // list of modules that can skip create hook during hydration because they
  129402. // are already rendered on the client or has no need for initialization
  129403. // Note: style is excluded because it relies on initial clone for future
  129404. // deep updates (#7063).
  129405. var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
  129406. // Note: this is a browser-only function so we can assume elms are DOM nodes.
  129407. function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {
  129408. var i;
  129409. var tag = vnode.tag;
  129410. var data = vnode.data;
  129411. var children = vnode.children;
  129412. inVPre = inVPre || (data && data.pre);
  129413. vnode.elm = elm;
  129414. if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
  129415. vnode.isAsyncPlaceholder = true;
  129416. return true
  129417. }
  129418. // assert node match
  129419. if (true) {
  129420. if (!assertNodeMatch(elm, vnode, inVPre)) {
  129421. return false
  129422. }
  129423. }
  129424. if (isDef(data)) {
  129425. if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
  129426. if (isDef(i = vnode.componentInstance)) {
  129427. // child component. it should have hydrated its own tree.
  129428. initComponent(vnode, insertedVnodeQueue);
  129429. return true
  129430. }
  129431. }
  129432. if (isDef(tag)) {
  129433. if (isDef(children)) {
  129434. // empty element, allow client to pick up and populate children
  129435. if (!elm.hasChildNodes()) {
  129436. createChildren(vnode, children, insertedVnodeQueue);
  129437. } else {
  129438. // v-html and domProps: innerHTML
  129439. if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
  129440. if (i !== elm.innerHTML) {
  129441. /* istanbul ignore if */
  129442. if ( true &&
  129443. typeof console !== 'undefined' &&
  129444. !hydrationBailed
  129445. ) {
  129446. hydrationBailed = true;
  129447. console.warn('Parent: ', elm);
  129448. console.warn('server innerHTML: ', i);
  129449. console.warn('client innerHTML: ', elm.innerHTML);
  129450. }
  129451. return false
  129452. }
  129453. } else {
  129454. // iterate and compare children lists
  129455. var childrenMatch = true;
  129456. var childNode = elm.firstChild;
  129457. for (var i$1 = 0; i$1 < children.length; i$1++) {
  129458. if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
  129459. childrenMatch = false;
  129460. break
  129461. }
  129462. childNode = childNode.nextSibling;
  129463. }
  129464. // if childNode is not null, it means the actual childNodes list is
  129465. // longer than the virtual children list.
  129466. if (!childrenMatch || childNode) {
  129467. /* istanbul ignore if */
  129468. if ( true &&
  129469. typeof console !== 'undefined' &&
  129470. !hydrationBailed
  129471. ) {
  129472. hydrationBailed = true;
  129473. console.warn('Parent: ', elm);
  129474. console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
  129475. }
  129476. return false
  129477. }
  129478. }
  129479. }
  129480. }
  129481. if (isDef(data)) {
  129482. var fullInvoke = false;
  129483. for (var key in data) {
  129484. if (!isRenderedModule(key)) {
  129485. fullInvoke = true;
  129486. invokeCreateHooks(vnode, insertedVnodeQueue);
  129487. break
  129488. }
  129489. }
  129490. if (!fullInvoke && data['class']) {
  129491. // ensure collecting deps for deep class bindings for future updates
  129492. traverse(data['class']);
  129493. }
  129494. }
  129495. } else if (elm.data !== vnode.text) {
  129496. elm.data = vnode.text;
  129497. }
  129498. return true
  129499. }
  129500. function assertNodeMatch (node, vnode, inVPre) {
  129501. if (isDef(vnode.tag)) {
  129502. return vnode.tag.indexOf('vue-component') === 0 || (
  129503. !isUnknownElement$$1(vnode, inVPre) &&
  129504. vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
  129505. )
  129506. } else {
  129507. return node.nodeType === (vnode.isComment ? 8 : 3)
  129508. }
  129509. }
  129510. return function patch (oldVnode, vnode, hydrating, removeOnly) {
  129511. if (isUndef(vnode)) {
  129512. if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
  129513. return
  129514. }
  129515. var isInitialPatch = false;
  129516. var insertedVnodeQueue = [];
  129517. if (isUndef(oldVnode)) {
  129518. // empty mount (likely as component), create new root element
  129519. isInitialPatch = true;
  129520. createElm(vnode, insertedVnodeQueue);
  129521. } else {
  129522. var isRealElement = isDef(oldVnode.nodeType);
  129523. if (!isRealElement && sameVnode(oldVnode, vnode)) {
  129524. // patch existing root node
  129525. patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
  129526. } else {
  129527. if (isRealElement) {
  129528. // mounting to a real element
  129529. // check if this is server-rendered content and if we can perform
  129530. // a successful hydration.
  129531. if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
  129532. oldVnode.removeAttribute(SSR_ATTR);
  129533. hydrating = true;
  129534. }
  129535. if (isTrue(hydrating)) {
  129536. if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
  129537. invokeInsertHook(vnode, insertedVnodeQueue, true);
  129538. return oldVnode
  129539. } else if (true) {
  129540. warn(
  129541. 'The client-side rendered virtual DOM tree is not matching ' +
  129542. 'server-rendered content. This is likely caused by incorrect ' +
  129543. 'HTML markup, for example nesting block-level elements inside ' +
  129544. '<p>, or missing <tbody>. Bailing hydration and performing ' +
  129545. 'full client-side render.'
  129546. );
  129547. }
  129548. }
  129549. // either not server-rendered, or hydration failed.
  129550. // create an empty node and replace it
  129551. oldVnode = emptyNodeAt(oldVnode);
  129552. }
  129553. // replacing existing element
  129554. var oldElm = oldVnode.elm;
  129555. var parentElm = nodeOps.parentNode(oldElm);
  129556. // create new node
  129557. createElm(
  129558. vnode,
  129559. insertedVnodeQueue,
  129560. // extremely rare edge case: do not insert if old element is in a
  129561. // leaving transition. Only happens when combining transition +
  129562. // keep-alive + HOCs. (#4590)
  129563. oldElm._leaveCb ? null : parentElm,
  129564. nodeOps.nextSibling(oldElm)
  129565. );
  129566. // update parent placeholder node element, recursively
  129567. if (isDef(vnode.parent)) {
  129568. var ancestor = vnode.parent;
  129569. var patchable = isPatchable(vnode);
  129570. while (ancestor) {
  129571. for (var i = 0; i < cbs.destroy.length; ++i) {
  129572. cbs.destroy[i](ancestor);
  129573. }
  129574. ancestor.elm = vnode.elm;
  129575. if (patchable) {
  129576. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  129577. cbs.create[i$1](emptyNode, ancestor);
  129578. }
  129579. // #6513
  129580. // invoke insert hooks that may have been merged by create hooks.
  129581. // e.g. for directives that uses the "inserted" hook.
  129582. var insert = ancestor.data.hook.insert;
  129583. if (insert.merged) {
  129584. // start at index 1 to avoid re-invoking component mounted hook
  129585. for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
  129586. insert.fns[i$2]();
  129587. }
  129588. }
  129589. } else {
  129590. registerRef(ancestor);
  129591. }
  129592. ancestor = ancestor.parent;
  129593. }
  129594. }
  129595. // destroy old node
  129596. if (isDef(parentElm)) {
  129597. removeVnodes([oldVnode], 0, 0);
  129598. } else if (isDef(oldVnode.tag)) {
  129599. invokeDestroyHook(oldVnode);
  129600. }
  129601. }
  129602. }
  129603. invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
  129604. return vnode.elm
  129605. }
  129606. }
  129607. /* */
  129608. var directives = {
  129609. create: updateDirectives,
  129610. update: updateDirectives,
  129611. destroy: function unbindDirectives (vnode) {
  129612. updateDirectives(vnode, emptyNode);
  129613. }
  129614. };
  129615. function updateDirectives (oldVnode, vnode) {
  129616. if (oldVnode.data.directives || vnode.data.directives) {
  129617. _update(oldVnode, vnode);
  129618. }
  129619. }
  129620. function _update (oldVnode, vnode) {
  129621. var isCreate = oldVnode === emptyNode;
  129622. var isDestroy = vnode === emptyNode;
  129623. var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
  129624. var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
  129625. var dirsWithInsert = [];
  129626. var dirsWithPostpatch = [];
  129627. var key, oldDir, dir;
  129628. for (key in newDirs) {
  129629. oldDir = oldDirs[key];
  129630. dir = newDirs[key];
  129631. if (!oldDir) {
  129632. // new directive, bind
  129633. callHook$1(dir, 'bind', vnode, oldVnode);
  129634. if (dir.def && dir.def.inserted) {
  129635. dirsWithInsert.push(dir);
  129636. }
  129637. } else {
  129638. // existing directive, update
  129639. dir.oldValue = oldDir.value;
  129640. dir.oldArg = oldDir.arg;
  129641. callHook$1(dir, 'update', vnode, oldVnode);
  129642. if (dir.def && dir.def.componentUpdated) {
  129643. dirsWithPostpatch.push(dir);
  129644. }
  129645. }
  129646. }
  129647. if (dirsWithInsert.length) {
  129648. var callInsert = function () {
  129649. for (var i = 0; i < dirsWithInsert.length; i++) {
  129650. callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
  129651. }
  129652. };
  129653. if (isCreate) {
  129654. mergeVNodeHook(vnode, 'insert', callInsert);
  129655. } else {
  129656. callInsert();
  129657. }
  129658. }
  129659. if (dirsWithPostpatch.length) {
  129660. mergeVNodeHook(vnode, 'postpatch', function () {
  129661. for (var i = 0; i < dirsWithPostpatch.length; i++) {
  129662. callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
  129663. }
  129664. });
  129665. }
  129666. if (!isCreate) {
  129667. for (key in oldDirs) {
  129668. if (!newDirs[key]) {
  129669. // no longer present, unbind
  129670. callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
  129671. }
  129672. }
  129673. }
  129674. }
  129675. var emptyModifiers = Object.create(null);
  129676. function normalizeDirectives$1 (
  129677. dirs,
  129678. vm
  129679. ) {
  129680. var res = Object.create(null);
  129681. if (!dirs) {
  129682. // $flow-disable-line
  129683. return res
  129684. }
  129685. var i, dir;
  129686. for (i = 0; i < dirs.length; i++) {
  129687. dir = dirs[i];
  129688. if (!dir.modifiers) {
  129689. // $flow-disable-line
  129690. dir.modifiers = emptyModifiers;
  129691. }
  129692. res[getRawDirName(dir)] = dir;
  129693. dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
  129694. }
  129695. // $flow-disable-line
  129696. return res
  129697. }
  129698. function getRawDirName (dir) {
  129699. return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
  129700. }
  129701. function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
  129702. var fn = dir.def && dir.def[hook];
  129703. if (fn) {
  129704. try {
  129705. fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
  129706. } catch (e) {
  129707. handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
  129708. }
  129709. }
  129710. }
  129711. var baseModules = [
  129712. ref,
  129713. directives
  129714. ];
  129715. /* */
  129716. function updateAttrs (oldVnode, vnode) {
  129717. var opts = vnode.componentOptions;
  129718. if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
  129719. return
  129720. }
  129721. if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
  129722. return
  129723. }
  129724. var key, cur, old;
  129725. var elm = vnode.elm;
  129726. var oldAttrs = oldVnode.data.attrs || {};
  129727. var attrs = vnode.data.attrs || {};
  129728. // clone observed objects, as the user probably wants to mutate it
  129729. if (isDef(attrs.__ob__)) {
  129730. attrs = vnode.data.attrs = extend({}, attrs);
  129731. }
  129732. for (key in attrs) {
  129733. cur = attrs[key];
  129734. old = oldAttrs[key];
  129735. if (old !== cur) {
  129736. setAttr(elm, key, cur);
  129737. }
  129738. }
  129739. // #4391: in IE9, setting type can reset value for input[type=radio]
  129740. // #6666: IE/Edge forces progress value down to 1 before setting a max
  129741. /* istanbul ignore if */
  129742. if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
  129743. setAttr(elm, 'value', attrs.value);
  129744. }
  129745. for (key in oldAttrs) {
  129746. if (isUndef(attrs[key])) {
  129747. if (isXlink(key)) {
  129748. elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
  129749. } else if (!isEnumeratedAttr(key)) {
  129750. elm.removeAttribute(key);
  129751. }
  129752. }
  129753. }
  129754. }
  129755. function setAttr (el, key, value) {
  129756. if (el.tagName.indexOf('-') > -1) {
  129757. baseSetAttr(el, key, value);
  129758. } else if (isBooleanAttr(key)) {
  129759. // set attribute for blank value
  129760. // e.g. <option disabled>Select one</option>
  129761. if (isFalsyAttrValue(value)) {
  129762. el.removeAttribute(key);
  129763. } else {
  129764. // technically allowfullscreen is a boolean attribute for <iframe>,
  129765. // but Flash expects a value of "true" when used on <embed> tag
  129766. value = key === 'allowfullscreen' && el.tagName === 'EMBED'
  129767. ? 'true'
  129768. : key;
  129769. el.setAttribute(key, value);
  129770. }
  129771. } else if (isEnumeratedAttr(key)) {
  129772. el.setAttribute(key, convertEnumeratedValue(key, value));
  129773. } else if (isXlink(key)) {
  129774. if (isFalsyAttrValue(value)) {
  129775. el.removeAttributeNS(xlinkNS, getXlinkProp(key));
  129776. } else {
  129777. el.setAttributeNS(xlinkNS, key, value);
  129778. }
  129779. } else {
  129780. baseSetAttr(el, key, value);
  129781. }
  129782. }
  129783. function baseSetAttr (el, key, value) {
  129784. if (isFalsyAttrValue(value)) {
  129785. el.removeAttribute(key);
  129786. } else {
  129787. // #7138: IE10 & 11 fires input event when setting placeholder on
  129788. // <textarea>... block the first input event and remove the blocker
  129789. // immediately.
  129790. /* istanbul ignore if */
  129791. if (
  129792. isIE && !isIE9 &&
  129793. el.tagName === 'TEXTAREA' &&
  129794. key === 'placeholder' && value !== '' && !el.__ieph
  129795. ) {
  129796. var blocker = function (e) {
  129797. e.stopImmediatePropagation();
  129798. el.removeEventListener('input', blocker);
  129799. };
  129800. el.addEventListener('input', blocker);
  129801. // $flow-disable-line
  129802. el.__ieph = true; /* IE placeholder patched */
  129803. }
  129804. el.setAttribute(key, value);
  129805. }
  129806. }
  129807. var attrs = {
  129808. create: updateAttrs,
  129809. update: updateAttrs
  129810. };
  129811. /* */
  129812. function updateClass (oldVnode, vnode) {
  129813. var el = vnode.elm;
  129814. var data = vnode.data;
  129815. var oldData = oldVnode.data;
  129816. if (
  129817. isUndef(data.staticClass) &&
  129818. isUndef(data.class) && (
  129819. isUndef(oldData) || (
  129820. isUndef(oldData.staticClass) &&
  129821. isUndef(oldData.class)
  129822. )
  129823. )
  129824. ) {
  129825. return
  129826. }
  129827. var cls = genClassForVnode(vnode);
  129828. // handle transition classes
  129829. var transitionClass = el._transitionClasses;
  129830. if (isDef(transitionClass)) {
  129831. cls = concat(cls, stringifyClass(transitionClass));
  129832. }
  129833. // set the class
  129834. if (cls !== el._prevClass) {
  129835. el.setAttribute('class', cls);
  129836. el._prevClass = cls;
  129837. }
  129838. }
  129839. var klass = {
  129840. create: updateClass,
  129841. update: updateClass
  129842. };
  129843. /* */
  129844. var validDivisionCharRE = /[\w).+\-_$\]]/;
  129845. function parseFilters (exp) {
  129846. var inSingle = false;
  129847. var inDouble = false;
  129848. var inTemplateString = false;
  129849. var inRegex = false;
  129850. var curly = 0;
  129851. var square = 0;
  129852. var paren = 0;
  129853. var lastFilterIndex = 0;
  129854. var c, prev, i, expression, filters;
  129855. for (i = 0; i < exp.length; i++) {
  129856. prev = c;
  129857. c = exp.charCodeAt(i);
  129858. if (inSingle) {
  129859. if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
  129860. } else if (inDouble) {
  129861. if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
  129862. } else if (inTemplateString) {
  129863. if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
  129864. } else if (inRegex) {
  129865. if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
  129866. } else if (
  129867. c === 0x7C && // pipe
  129868. exp.charCodeAt(i + 1) !== 0x7C &&
  129869. exp.charCodeAt(i - 1) !== 0x7C &&
  129870. !curly && !square && !paren
  129871. ) {
  129872. if (expression === undefined) {
  129873. // first filter, end of expression
  129874. lastFilterIndex = i + 1;
  129875. expression = exp.slice(0, i).trim();
  129876. } else {
  129877. pushFilter();
  129878. }
  129879. } else {
  129880. switch (c) {
  129881. case 0x22: inDouble = true; break // "
  129882. case 0x27: inSingle = true; break // '
  129883. case 0x60: inTemplateString = true; break // `
  129884. case 0x28: paren++; break // (
  129885. case 0x29: paren--; break // )
  129886. case 0x5B: square++; break // [
  129887. case 0x5D: square--; break // ]
  129888. case 0x7B: curly++; break // {
  129889. case 0x7D: curly--; break // }
  129890. }
  129891. if (c === 0x2f) { // /
  129892. var j = i - 1;
  129893. var p = (void 0);
  129894. // find first non-whitespace prev char
  129895. for (; j >= 0; j--) {
  129896. p = exp.charAt(j);
  129897. if (p !== ' ') { break }
  129898. }
  129899. if (!p || !validDivisionCharRE.test(p)) {
  129900. inRegex = true;
  129901. }
  129902. }
  129903. }
  129904. }
  129905. if (expression === undefined) {
  129906. expression = exp.slice(0, i).trim();
  129907. } else if (lastFilterIndex !== 0) {
  129908. pushFilter();
  129909. }
  129910. function pushFilter () {
  129911. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  129912. lastFilterIndex = i + 1;
  129913. }
  129914. if (filters) {
  129915. for (i = 0; i < filters.length; i++) {
  129916. expression = wrapFilter(expression, filters[i]);
  129917. }
  129918. }
  129919. return expression
  129920. }
  129921. function wrapFilter (exp, filter) {
  129922. var i = filter.indexOf('(');
  129923. if (i < 0) {
  129924. // _f: resolveFilter
  129925. return ("_f(\"" + filter + "\")(" + exp + ")")
  129926. } else {
  129927. var name = filter.slice(0, i);
  129928. var args = filter.slice(i + 1);
  129929. return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
  129930. }
  129931. }
  129932. /* */
  129933. /* eslint-disable no-unused-vars */
  129934. function baseWarn (msg, range) {
  129935. console.error(("[Vue compiler]: " + msg));
  129936. }
  129937. /* eslint-enable no-unused-vars */
  129938. function pluckModuleFunction (
  129939. modules,
  129940. key
  129941. ) {
  129942. return modules
  129943. ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
  129944. : []
  129945. }
  129946. function addProp (el, name, value, range, dynamic) {
  129947. (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  129948. el.plain = false;
  129949. }
  129950. function addAttr (el, name, value, range, dynamic) {
  129951. var attrs = dynamic
  129952. ? (el.dynamicAttrs || (el.dynamicAttrs = []))
  129953. : (el.attrs || (el.attrs = []));
  129954. attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  129955. el.plain = false;
  129956. }
  129957. // add a raw attr (use this in preTransforms)
  129958. function addRawAttr (el, name, value, range) {
  129959. el.attrsMap[name] = value;
  129960. el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
  129961. }
  129962. function addDirective (
  129963. el,
  129964. name,
  129965. rawName,
  129966. value,
  129967. arg,
  129968. isDynamicArg,
  129969. modifiers,
  129970. range
  129971. ) {
  129972. (el.directives || (el.directives = [])).push(rangeSetItem({
  129973. name: name,
  129974. rawName: rawName,
  129975. value: value,
  129976. arg: arg,
  129977. isDynamicArg: isDynamicArg,
  129978. modifiers: modifiers
  129979. }, range));
  129980. el.plain = false;
  129981. }
  129982. function prependModifierMarker (symbol, name, dynamic) {
  129983. return dynamic
  129984. ? ("_p(" + name + ",\"" + symbol + "\")")
  129985. : symbol + name // mark the event as captured
  129986. }
  129987. function addHandler (
  129988. el,
  129989. name,
  129990. value,
  129991. modifiers,
  129992. important,
  129993. warn,
  129994. range,
  129995. dynamic
  129996. ) {
  129997. modifiers = modifiers || emptyObject;
  129998. // warn prevent and passive modifier
  129999. /* istanbul ignore if */
  130000. if (
  130001. true && warn &&
  130002. modifiers.prevent && modifiers.passive
  130003. ) {
  130004. warn(
  130005. 'passive and prevent can\'t be used together. ' +
  130006. 'Passive handler can\'t prevent default event.',
  130007. range
  130008. );
  130009. }
  130010. // normalize click.right and click.middle since they don't actually fire
  130011. // this is technically browser-specific, but at least for now browsers are
  130012. // the only target envs that have right/middle clicks.
  130013. if (modifiers.right) {
  130014. if (dynamic) {
  130015. name = "(" + name + ")==='click'?'contextmenu':(" + name + ")";
  130016. } else if (name === 'click') {
  130017. name = 'contextmenu';
  130018. delete modifiers.right;
  130019. }
  130020. } else if (modifiers.middle) {
  130021. if (dynamic) {
  130022. name = "(" + name + ")==='click'?'mouseup':(" + name + ")";
  130023. } else if (name === 'click') {
  130024. name = 'mouseup';
  130025. }
  130026. }
  130027. // check capture modifier
  130028. if (modifiers.capture) {
  130029. delete modifiers.capture;
  130030. name = prependModifierMarker('!', name, dynamic);
  130031. }
  130032. if (modifiers.once) {
  130033. delete modifiers.once;
  130034. name = prependModifierMarker('~', name, dynamic);
  130035. }
  130036. /* istanbul ignore if */
  130037. if (modifiers.passive) {
  130038. delete modifiers.passive;
  130039. name = prependModifierMarker('&', name, dynamic);
  130040. }
  130041. var events;
  130042. if (modifiers.native) {
  130043. delete modifiers.native;
  130044. events = el.nativeEvents || (el.nativeEvents = {});
  130045. } else {
  130046. events = el.events || (el.events = {});
  130047. }
  130048. var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);
  130049. if (modifiers !== emptyObject) {
  130050. newHandler.modifiers = modifiers;
  130051. }
  130052. var handlers = events[name];
  130053. /* istanbul ignore if */
  130054. if (Array.isArray(handlers)) {
  130055. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  130056. } else if (handlers) {
  130057. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  130058. } else {
  130059. events[name] = newHandler;
  130060. }
  130061. el.plain = false;
  130062. }
  130063. function getRawBindingAttr (
  130064. el,
  130065. name
  130066. ) {
  130067. return el.rawAttrsMap[':' + name] ||
  130068. el.rawAttrsMap['v-bind:' + name] ||
  130069. el.rawAttrsMap[name]
  130070. }
  130071. function getBindingAttr (
  130072. el,
  130073. name,
  130074. getStatic
  130075. ) {
  130076. var dynamicValue =
  130077. getAndRemoveAttr(el, ':' + name) ||
  130078. getAndRemoveAttr(el, 'v-bind:' + name);
  130079. if (dynamicValue != null) {
  130080. return parseFilters(dynamicValue)
  130081. } else if (getStatic !== false) {
  130082. var staticValue = getAndRemoveAttr(el, name);
  130083. if (staticValue != null) {
  130084. return JSON.stringify(staticValue)
  130085. }
  130086. }
  130087. }
  130088. // note: this only removes the attr from the Array (attrsList) so that it
  130089. // doesn't get processed by processAttrs.
  130090. // By default it does NOT remove it from the map (attrsMap) because the map is
  130091. // needed during codegen.
  130092. function getAndRemoveAttr (
  130093. el,
  130094. name,
  130095. removeFromMap
  130096. ) {
  130097. var val;
  130098. if ((val = el.attrsMap[name]) != null) {
  130099. var list = el.attrsList;
  130100. for (var i = 0, l = list.length; i < l; i++) {
  130101. if (list[i].name === name) {
  130102. list.splice(i, 1);
  130103. break
  130104. }
  130105. }
  130106. }
  130107. if (removeFromMap) {
  130108. delete el.attrsMap[name];
  130109. }
  130110. return val
  130111. }
  130112. function getAndRemoveAttrByRegex (
  130113. el,
  130114. name
  130115. ) {
  130116. var list = el.attrsList;
  130117. for (var i = 0, l = list.length; i < l; i++) {
  130118. var attr = list[i];
  130119. if (name.test(attr.name)) {
  130120. list.splice(i, 1);
  130121. return attr
  130122. }
  130123. }
  130124. }
  130125. function rangeSetItem (
  130126. item,
  130127. range
  130128. ) {
  130129. if (range) {
  130130. if (range.start != null) {
  130131. item.start = range.start;
  130132. }
  130133. if (range.end != null) {
  130134. item.end = range.end;
  130135. }
  130136. }
  130137. return item
  130138. }
  130139. /* */
  130140. /**
  130141. * Cross-platform code generation for component v-model
  130142. */
  130143. function genComponentModel (
  130144. el,
  130145. value,
  130146. modifiers
  130147. ) {
  130148. var ref = modifiers || {};
  130149. var number = ref.number;
  130150. var trim = ref.trim;
  130151. var baseValueExpression = '$$v';
  130152. var valueExpression = baseValueExpression;
  130153. if (trim) {
  130154. valueExpression =
  130155. "(typeof " + baseValueExpression + " === 'string'" +
  130156. "? " + baseValueExpression + ".trim()" +
  130157. ": " + baseValueExpression + ")";
  130158. }
  130159. if (number) {
  130160. valueExpression = "_n(" + valueExpression + ")";
  130161. }
  130162. var assignment = genAssignmentCode(value, valueExpression);
  130163. el.model = {
  130164. value: ("(" + value + ")"),
  130165. expression: JSON.stringify(value),
  130166. callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
  130167. };
  130168. }
  130169. /**
  130170. * Cross-platform codegen helper for generating v-model value assignment code.
  130171. */
  130172. function genAssignmentCode (
  130173. value,
  130174. assignment
  130175. ) {
  130176. var res = parseModel(value);
  130177. if (res.key === null) {
  130178. return (value + "=" + assignment)
  130179. } else {
  130180. return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
  130181. }
  130182. }
  130183. /**
  130184. * Parse a v-model expression into a base path and a final key segment.
  130185. * Handles both dot-path and possible square brackets.
  130186. *
  130187. * Possible cases:
  130188. *
  130189. * - test
  130190. * - test[key]
  130191. * - test[test1[key]]
  130192. * - test["a"][key]
  130193. * - xxx.test[a[a].test1[key]]
  130194. * - test.xxx.a["asa"][test1[key]]
  130195. *
  130196. */
  130197. var len, str, chr, index$1, expressionPos, expressionEndPos;
  130198. function parseModel (val) {
  130199. // Fix https://github.com/vuejs/vue/pull/7730
  130200. // allow v-model="obj.val " (trailing whitespace)
  130201. val = val.trim();
  130202. len = val.length;
  130203. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  130204. index$1 = val.lastIndexOf('.');
  130205. if (index$1 > -1) {
  130206. return {
  130207. exp: val.slice(0, index$1),
  130208. key: '"' + val.slice(index$1 + 1) + '"'
  130209. }
  130210. } else {
  130211. return {
  130212. exp: val,
  130213. key: null
  130214. }
  130215. }
  130216. }
  130217. str = val;
  130218. index$1 = expressionPos = expressionEndPos = 0;
  130219. while (!eof()) {
  130220. chr = next();
  130221. /* istanbul ignore if */
  130222. if (isStringStart(chr)) {
  130223. parseString(chr);
  130224. } else if (chr === 0x5B) {
  130225. parseBracket(chr);
  130226. }
  130227. }
  130228. return {
  130229. exp: val.slice(0, expressionPos),
  130230. key: val.slice(expressionPos + 1, expressionEndPos)
  130231. }
  130232. }
  130233. function next () {
  130234. return str.charCodeAt(++index$1)
  130235. }
  130236. function eof () {
  130237. return index$1 >= len
  130238. }
  130239. function isStringStart (chr) {
  130240. return chr === 0x22 || chr === 0x27
  130241. }
  130242. function parseBracket (chr) {
  130243. var inBracket = 1;
  130244. expressionPos = index$1;
  130245. while (!eof()) {
  130246. chr = next();
  130247. if (isStringStart(chr)) {
  130248. parseString(chr);
  130249. continue
  130250. }
  130251. if (chr === 0x5B) { inBracket++; }
  130252. if (chr === 0x5D) { inBracket--; }
  130253. if (inBracket === 0) {
  130254. expressionEndPos = index$1;
  130255. break
  130256. }
  130257. }
  130258. }
  130259. function parseString (chr) {
  130260. var stringQuote = chr;
  130261. while (!eof()) {
  130262. chr = next();
  130263. if (chr === stringQuote) {
  130264. break
  130265. }
  130266. }
  130267. }
  130268. /* */
  130269. var warn$1;
  130270. // in some cases, the event used has to be determined at runtime
  130271. // so we used some reserved tokens during compile.
  130272. var RANGE_TOKEN = '__r';
  130273. var CHECKBOX_RADIO_TOKEN = '__c';
  130274. function model (
  130275. el,
  130276. dir,
  130277. _warn
  130278. ) {
  130279. warn$1 = _warn;
  130280. var value = dir.value;
  130281. var modifiers = dir.modifiers;
  130282. var tag = el.tag;
  130283. var type = el.attrsMap.type;
  130284. if (true) {
  130285. // inputs with type="file" are read only and setting the input's
  130286. // value will throw an error.
  130287. if (tag === 'input' && type === 'file') {
  130288. warn$1(
  130289. "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
  130290. "File inputs are read only. Use a v-on:change listener instead.",
  130291. el.rawAttrsMap['v-model']
  130292. );
  130293. }
  130294. }
  130295. if (el.component) {
  130296. genComponentModel(el, value, modifiers);
  130297. // component v-model doesn't need extra runtime
  130298. return false
  130299. } else if (tag === 'select') {
  130300. genSelect(el, value, modifiers);
  130301. } else if (tag === 'input' && type === 'checkbox') {
  130302. genCheckboxModel(el, value, modifiers);
  130303. } else if (tag === 'input' && type === 'radio') {
  130304. genRadioModel(el, value, modifiers);
  130305. } else if (tag === 'input' || tag === 'textarea') {
  130306. genDefaultModel(el, value, modifiers);
  130307. } else if (!config.isReservedTag(tag)) {
  130308. genComponentModel(el, value, modifiers);
  130309. // component v-model doesn't need extra runtime
  130310. return false
  130311. } else if (true) {
  130312. warn$1(
  130313. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  130314. "v-model is not supported on this element type. " +
  130315. 'If you are working with contenteditable, it\'s recommended to ' +
  130316. 'wrap a library dedicated for that purpose inside a custom component.',
  130317. el.rawAttrsMap['v-model']
  130318. );
  130319. }
  130320. // ensure runtime directive metadata
  130321. return true
  130322. }
  130323. function genCheckboxModel (
  130324. el,
  130325. value,
  130326. modifiers
  130327. ) {
  130328. var number = modifiers && modifiers.number;
  130329. var valueBinding = getBindingAttr(el, 'value') || 'null';
  130330. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  130331. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  130332. addProp(el, 'checked',
  130333. "Array.isArray(" + value + ")" +
  130334. "?_i(" + value + "," + valueBinding + ")>-1" + (
  130335. trueValueBinding === 'true'
  130336. ? (":(" + value + ")")
  130337. : (":_q(" + value + "," + trueValueBinding + ")")
  130338. )
  130339. );
  130340. addHandler(el, 'change',
  130341. "var $$a=" + value + "," +
  130342. '$$el=$event.target,' +
  130343. "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
  130344. 'if(Array.isArray($$a)){' +
  130345. "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
  130346. '$$i=_i($$a,$$v);' +
  130347. "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
  130348. "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
  130349. "}else{" + (genAssignmentCode(value, '$$c')) + "}",
  130350. null, true
  130351. );
  130352. }
  130353. function genRadioModel (
  130354. el,
  130355. value,
  130356. modifiers
  130357. ) {
  130358. var number = modifiers && modifiers.number;
  130359. var valueBinding = getBindingAttr(el, 'value') || 'null';
  130360. valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
  130361. addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
  130362. addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
  130363. }
  130364. function genSelect (
  130365. el,
  130366. value,
  130367. modifiers
  130368. ) {
  130369. var number = modifiers && modifiers.number;
  130370. var selectedVal = "Array.prototype.filter" +
  130371. ".call($event.target.options,function(o){return o.selected})" +
  130372. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  130373. "return " + (number ? '_n(val)' : 'val') + "})";
  130374. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  130375. var code = "var $$selectedVal = " + selectedVal + ";";
  130376. code = code + " " + (genAssignmentCode(value, assignment));
  130377. addHandler(el, 'change', code, null, true);
  130378. }
  130379. function genDefaultModel (
  130380. el,
  130381. value,
  130382. modifiers
  130383. ) {
  130384. var type = el.attrsMap.type;
  130385. // warn if v-bind:value conflicts with v-model
  130386. // except for inputs with v-bind:type
  130387. if (true) {
  130388. var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
  130389. var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
  130390. if (value$1 && !typeBinding) {
  130391. var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
  130392. warn$1(
  130393. binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
  130394. 'because the latter already expands to a value binding internally',
  130395. el.rawAttrsMap[binding]
  130396. );
  130397. }
  130398. }
  130399. var ref = modifiers || {};
  130400. var lazy = ref.lazy;
  130401. var number = ref.number;
  130402. var trim = ref.trim;
  130403. var needCompositionGuard = !lazy && type !== 'range';
  130404. var event = lazy
  130405. ? 'change'
  130406. : type === 'range'
  130407. ? RANGE_TOKEN
  130408. : 'input';
  130409. var valueExpression = '$event.target.value';
  130410. if (trim) {
  130411. valueExpression = "$event.target.value.trim()";
  130412. }
  130413. if (number) {
  130414. valueExpression = "_n(" + valueExpression + ")";
  130415. }
  130416. var code = genAssignmentCode(value, valueExpression);
  130417. if (needCompositionGuard) {
  130418. code = "if($event.target.composing)return;" + code;
  130419. }
  130420. addProp(el, 'value', ("(" + value + ")"));
  130421. addHandler(el, event, code, null, true);
  130422. if (trim || number) {
  130423. addHandler(el, 'blur', '$forceUpdate()');
  130424. }
  130425. }
  130426. /* */
  130427. // normalize v-model event tokens that can only be determined at runtime.
  130428. // it's important to place the event as the first in the array because
  130429. // the whole point is ensuring the v-model callback gets called before
  130430. // user-attached handlers.
  130431. function normalizeEvents (on) {
  130432. /* istanbul ignore if */
  130433. if (isDef(on[RANGE_TOKEN])) {
  130434. // IE input[type=range] only supports `change` event
  130435. var event = isIE ? 'change' : 'input';
  130436. on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
  130437. delete on[RANGE_TOKEN];
  130438. }
  130439. // This was originally intended to fix #4521 but no longer necessary
  130440. // after 2.5. Keeping it for backwards compat with generated code from < 2.4
  130441. /* istanbul ignore if */
  130442. if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
  130443. on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
  130444. delete on[CHECKBOX_RADIO_TOKEN];
  130445. }
  130446. }
  130447. var target$1;
  130448. function createOnceHandler$1 (event, handler, capture) {
  130449. var _target = target$1; // save current target element in closure
  130450. return function onceHandler () {
  130451. var res = handler.apply(null, arguments);
  130452. if (res !== null) {
  130453. remove$2(event, onceHandler, capture, _target);
  130454. }
  130455. }
  130456. }
  130457. // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
  130458. // implementation and does not fire microtasks in between event propagation, so
  130459. // safe to exclude.
  130460. var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
  130461. function add$1 (
  130462. name,
  130463. handler,
  130464. capture,
  130465. passive
  130466. ) {
  130467. // async edge case #6566: inner click event triggers patch, event handler
  130468. // attached to outer element during patch, and triggered again. This
  130469. // happens because browsers fire microtask ticks between event propagation.
  130470. // the solution is simple: we save the timestamp when a handler is attached,
  130471. // and the handler would only fire if the event passed to it was fired
  130472. // AFTER it was attached.
  130473. if (useMicrotaskFix) {
  130474. var attachedTimestamp = currentFlushTimestamp;
  130475. var original = handler;
  130476. handler = original._wrapper = function (e) {
  130477. if (
  130478. // no bubbling, should always fire.
  130479. // this is just a safety net in case event.timeStamp is unreliable in
  130480. // certain weird environments...
  130481. e.target === e.currentTarget ||
  130482. // event is fired after handler attachment
  130483. e.timeStamp >= attachedTimestamp ||
  130484. // bail for environments that have buggy event.timeStamp implementations
  130485. // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
  130486. // #9681 QtWebEngine event.timeStamp is negative value
  130487. e.timeStamp <= 0 ||
  130488. // #9448 bail if event is fired in another document in a multi-page
  130489. // electron/nw.js app, since event.timeStamp will be using a different
  130490. // starting reference
  130491. e.target.ownerDocument !== document
  130492. ) {
  130493. return original.apply(this, arguments)
  130494. }
  130495. };
  130496. }
  130497. target$1.addEventListener(
  130498. name,
  130499. handler,
  130500. supportsPassive
  130501. ? { capture: capture, passive: passive }
  130502. : capture
  130503. );
  130504. }
  130505. function remove$2 (
  130506. name,
  130507. handler,
  130508. capture,
  130509. _target
  130510. ) {
  130511. (_target || target$1).removeEventListener(
  130512. name,
  130513. handler._wrapper || handler,
  130514. capture
  130515. );
  130516. }
  130517. function updateDOMListeners (oldVnode, vnode) {
  130518. if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
  130519. return
  130520. }
  130521. var on = vnode.data.on || {};
  130522. var oldOn = oldVnode.data.on || {};
  130523. target$1 = vnode.elm;
  130524. normalizeEvents(on);
  130525. updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);
  130526. target$1 = undefined;
  130527. }
  130528. var events = {
  130529. create: updateDOMListeners,
  130530. update: updateDOMListeners
  130531. };
  130532. /* */
  130533. var svgContainer;
  130534. function updateDOMProps (oldVnode, vnode) {
  130535. if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
  130536. return
  130537. }
  130538. var key, cur;
  130539. var elm = vnode.elm;
  130540. var oldProps = oldVnode.data.domProps || {};
  130541. var props = vnode.data.domProps || {};
  130542. // clone observed objects, as the user probably wants to mutate it
  130543. if (isDef(props.__ob__)) {
  130544. props = vnode.data.domProps = extend({}, props);
  130545. }
  130546. for (key in oldProps) {
  130547. if (!(key in props)) {
  130548. elm[key] = '';
  130549. }
  130550. }
  130551. for (key in props) {
  130552. cur = props[key];
  130553. // ignore children if the node has textContent or innerHTML,
  130554. // as these will throw away existing DOM nodes and cause removal errors
  130555. // on subsequent patches (#3360)
  130556. if (key === 'textContent' || key === 'innerHTML') {
  130557. if (vnode.children) { vnode.children.length = 0; }
  130558. if (cur === oldProps[key]) { continue }
  130559. // #6601 work around Chrome version <= 55 bug where single textNode
  130560. // replaced by innerHTML/textContent retains its parentNode property
  130561. if (elm.childNodes.length === 1) {
  130562. elm.removeChild(elm.childNodes[0]);
  130563. }
  130564. }
  130565. if (key === 'value' && elm.tagName !== 'PROGRESS') {
  130566. // store value as _value as well since
  130567. // non-string values will be stringified
  130568. elm._value = cur;
  130569. // avoid resetting cursor position when value is the same
  130570. var strCur = isUndef(cur) ? '' : String(cur);
  130571. if (shouldUpdateValue(elm, strCur)) {
  130572. elm.value = strCur;
  130573. }
  130574. } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {
  130575. // IE doesn't support innerHTML for SVG elements
  130576. svgContainer = svgContainer || document.createElement('div');
  130577. svgContainer.innerHTML = "<svg>" + cur + "</svg>";
  130578. var svg = svgContainer.firstChild;
  130579. while (elm.firstChild) {
  130580. elm.removeChild(elm.firstChild);
  130581. }
  130582. while (svg.firstChild) {
  130583. elm.appendChild(svg.firstChild);
  130584. }
  130585. } else if (
  130586. // skip the update if old and new VDOM state is the same.
  130587. // `value` is handled separately because the DOM value may be temporarily
  130588. // out of sync with VDOM state due to focus, composition and modifiers.
  130589. // This #4521 by skipping the unnecessary `checked` update.
  130590. cur !== oldProps[key]
  130591. ) {
  130592. // some property updates can throw
  130593. // e.g. `value` on <progress> w/ non-finite value
  130594. try {
  130595. elm[key] = cur;
  130596. } catch (e) {}
  130597. }
  130598. }
  130599. }
  130600. // check platforms/web/util/attrs.js acceptValue
  130601. function shouldUpdateValue (elm, checkVal) {
  130602. return (!elm.composing && (
  130603. elm.tagName === 'OPTION' ||
  130604. isNotInFocusAndDirty(elm, checkVal) ||
  130605. isDirtyWithModifiers(elm, checkVal)
  130606. ))
  130607. }
  130608. function isNotInFocusAndDirty (elm, checkVal) {
  130609. // return true when textbox (.number and .trim) loses focus and its value is
  130610. // not equal to the updated value
  130611. var notInFocus = true;
  130612. // #6157
  130613. // work around IE bug when accessing document.activeElement in an iframe
  130614. try { notInFocus = document.activeElement !== elm; } catch (e) {}
  130615. return notInFocus && elm.value !== checkVal
  130616. }
  130617. function isDirtyWithModifiers (elm, newVal) {
  130618. var value = elm.value;
  130619. var modifiers = elm._vModifiers; // injected by v-model runtime
  130620. if (isDef(modifiers)) {
  130621. if (modifiers.number) {
  130622. return toNumber(value) !== toNumber(newVal)
  130623. }
  130624. if (modifiers.trim) {
  130625. return value.trim() !== newVal.trim()
  130626. }
  130627. }
  130628. return value !== newVal
  130629. }
  130630. var domProps = {
  130631. create: updateDOMProps,
  130632. update: updateDOMProps
  130633. };
  130634. /* */
  130635. var parseStyleText = cached(function (cssText) {
  130636. var res = {};
  130637. var listDelimiter = /;(?![^(]*\))/g;
  130638. var propertyDelimiter = /:(.+)/;
  130639. cssText.split(listDelimiter).forEach(function (item) {
  130640. if (item) {
  130641. var tmp = item.split(propertyDelimiter);
  130642. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  130643. }
  130644. });
  130645. return res
  130646. });
  130647. // merge static and dynamic style data on the same vnode
  130648. function normalizeStyleData (data) {
  130649. var style = normalizeStyleBinding(data.style);
  130650. // static style is pre-processed into an object during compilation
  130651. // and is always a fresh object, so it's safe to merge into it
  130652. return data.staticStyle
  130653. ? extend(data.staticStyle, style)
  130654. : style
  130655. }
  130656. // normalize possible array / string values into Object
  130657. function normalizeStyleBinding (bindingStyle) {
  130658. if (Array.isArray(bindingStyle)) {
  130659. return toObject(bindingStyle)
  130660. }
  130661. if (typeof bindingStyle === 'string') {
  130662. return parseStyleText(bindingStyle)
  130663. }
  130664. return bindingStyle
  130665. }
  130666. /**
  130667. * parent component style should be after child's
  130668. * so that parent component's style could override it
  130669. */
  130670. function getStyle (vnode, checkChild) {
  130671. var res = {};
  130672. var styleData;
  130673. if (checkChild) {
  130674. var childNode = vnode;
  130675. while (childNode.componentInstance) {
  130676. childNode = childNode.componentInstance._vnode;
  130677. if (
  130678. childNode && childNode.data &&
  130679. (styleData = normalizeStyleData(childNode.data))
  130680. ) {
  130681. extend(res, styleData);
  130682. }
  130683. }
  130684. }
  130685. if ((styleData = normalizeStyleData(vnode.data))) {
  130686. extend(res, styleData);
  130687. }
  130688. var parentNode = vnode;
  130689. while ((parentNode = parentNode.parent)) {
  130690. if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
  130691. extend(res, styleData);
  130692. }
  130693. }
  130694. return res
  130695. }
  130696. /* */
  130697. var cssVarRE = /^--/;
  130698. var importantRE = /\s*!important$/;
  130699. var setProp = function (el, name, val) {
  130700. /* istanbul ignore if */
  130701. if (cssVarRE.test(name)) {
  130702. el.style.setProperty(name, val);
  130703. } else if (importantRE.test(val)) {
  130704. el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
  130705. } else {
  130706. var normalizedName = normalize(name);
  130707. if (Array.isArray(val)) {
  130708. // Support values array created by autoprefixer, e.g.
  130709. // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
  130710. // Set them one by one, and the browser will only set those it can recognize
  130711. for (var i = 0, len = val.length; i < len; i++) {
  130712. el.style[normalizedName] = val[i];
  130713. }
  130714. } else {
  130715. el.style[normalizedName] = val;
  130716. }
  130717. }
  130718. };
  130719. var vendorNames = ['Webkit', 'Moz', 'ms'];
  130720. var emptyStyle;
  130721. var normalize = cached(function (prop) {
  130722. emptyStyle = emptyStyle || document.createElement('div').style;
  130723. prop = camelize(prop);
  130724. if (prop !== 'filter' && (prop in emptyStyle)) {
  130725. return prop
  130726. }
  130727. var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
  130728. for (var i = 0; i < vendorNames.length; i++) {
  130729. var name = vendorNames[i] + capName;
  130730. if (name in emptyStyle) {
  130731. return name
  130732. }
  130733. }
  130734. });
  130735. function updateStyle (oldVnode, vnode) {
  130736. var data = vnode.data;
  130737. var oldData = oldVnode.data;
  130738. if (isUndef(data.staticStyle) && isUndef(data.style) &&
  130739. isUndef(oldData.staticStyle) && isUndef(oldData.style)
  130740. ) {
  130741. return
  130742. }
  130743. var cur, name;
  130744. var el = vnode.elm;
  130745. var oldStaticStyle = oldData.staticStyle;
  130746. var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
  130747. // if static style exists, stylebinding already merged into it when doing normalizeStyleData
  130748. var oldStyle = oldStaticStyle || oldStyleBinding;
  130749. var style = normalizeStyleBinding(vnode.data.style) || {};
  130750. // store normalized style under a different key for next diff
  130751. // make sure to clone it if it's reactive, since the user likely wants
  130752. // to mutate it.
  130753. vnode.data.normalizedStyle = isDef(style.__ob__)
  130754. ? extend({}, style)
  130755. : style;
  130756. var newStyle = getStyle(vnode, true);
  130757. for (name in oldStyle) {
  130758. if (isUndef(newStyle[name])) {
  130759. setProp(el, name, '');
  130760. }
  130761. }
  130762. for (name in newStyle) {
  130763. cur = newStyle[name];
  130764. if (cur !== oldStyle[name]) {
  130765. // ie9 setting to null has no effect, must use empty string
  130766. setProp(el, name, cur == null ? '' : cur);
  130767. }
  130768. }
  130769. }
  130770. var style = {
  130771. create: updateStyle,
  130772. update: updateStyle
  130773. };
  130774. /* */
  130775. var whitespaceRE = /\s+/;
  130776. /**
  130777. * Add class with compatibility for SVG since classList is not supported on
  130778. * SVG elements in IE
  130779. */
  130780. function addClass (el, cls) {
  130781. /* istanbul ignore if */
  130782. if (!cls || !(cls = cls.trim())) {
  130783. return
  130784. }
  130785. /* istanbul ignore else */
  130786. if (el.classList) {
  130787. if (cls.indexOf(' ') > -1) {
  130788. cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });
  130789. } else {
  130790. el.classList.add(cls);
  130791. }
  130792. } else {
  130793. var cur = " " + (el.getAttribute('class') || '') + " ";
  130794. if (cur.indexOf(' ' + cls + ' ') < 0) {
  130795. el.setAttribute('class', (cur + cls).trim());
  130796. }
  130797. }
  130798. }
  130799. /**
  130800. * Remove class with compatibility for SVG since classList is not supported on
  130801. * SVG elements in IE
  130802. */
  130803. function removeClass (el, cls) {
  130804. /* istanbul ignore if */
  130805. if (!cls || !(cls = cls.trim())) {
  130806. return
  130807. }
  130808. /* istanbul ignore else */
  130809. if (el.classList) {
  130810. if (cls.indexOf(' ') > -1) {
  130811. cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });
  130812. } else {
  130813. el.classList.remove(cls);
  130814. }
  130815. if (!el.classList.length) {
  130816. el.removeAttribute('class');
  130817. }
  130818. } else {
  130819. var cur = " " + (el.getAttribute('class') || '') + " ";
  130820. var tar = ' ' + cls + ' ';
  130821. while (cur.indexOf(tar) >= 0) {
  130822. cur = cur.replace(tar, ' ');
  130823. }
  130824. cur = cur.trim();
  130825. if (cur) {
  130826. el.setAttribute('class', cur);
  130827. } else {
  130828. el.removeAttribute('class');
  130829. }
  130830. }
  130831. }
  130832. /* */
  130833. function resolveTransition (def$$1) {
  130834. if (!def$$1) {
  130835. return
  130836. }
  130837. /* istanbul ignore else */
  130838. if (typeof def$$1 === 'object') {
  130839. var res = {};
  130840. if (def$$1.css !== false) {
  130841. extend(res, autoCssTransition(def$$1.name || 'v'));
  130842. }
  130843. extend(res, def$$1);
  130844. return res
  130845. } else if (typeof def$$1 === 'string') {
  130846. return autoCssTransition(def$$1)
  130847. }
  130848. }
  130849. var autoCssTransition = cached(function (name) {
  130850. return {
  130851. enterClass: (name + "-enter"),
  130852. enterToClass: (name + "-enter-to"),
  130853. enterActiveClass: (name + "-enter-active"),
  130854. leaveClass: (name + "-leave"),
  130855. leaveToClass: (name + "-leave-to"),
  130856. leaveActiveClass: (name + "-leave-active")
  130857. }
  130858. });
  130859. var hasTransition = inBrowser && !isIE9;
  130860. var TRANSITION = 'transition';
  130861. var ANIMATION = 'animation';
  130862. // Transition property/event sniffing
  130863. var transitionProp = 'transition';
  130864. var transitionEndEvent = 'transitionend';
  130865. var animationProp = 'animation';
  130866. var animationEndEvent = 'animationend';
  130867. if (hasTransition) {
  130868. /* istanbul ignore if */
  130869. if (window.ontransitionend === undefined &&
  130870. window.onwebkittransitionend !== undefined
  130871. ) {
  130872. transitionProp = 'WebkitTransition';
  130873. transitionEndEvent = 'webkitTransitionEnd';
  130874. }
  130875. if (window.onanimationend === undefined &&
  130876. window.onwebkitanimationend !== undefined
  130877. ) {
  130878. animationProp = 'WebkitAnimation';
  130879. animationEndEvent = 'webkitAnimationEnd';
  130880. }
  130881. }
  130882. // binding to window is necessary to make hot reload work in IE in strict mode
  130883. var raf = inBrowser
  130884. ? window.requestAnimationFrame
  130885. ? window.requestAnimationFrame.bind(window)
  130886. : setTimeout
  130887. : /* istanbul ignore next */ function (fn) { return fn(); };
  130888. function nextFrame (fn) {
  130889. raf(function () {
  130890. raf(fn);
  130891. });
  130892. }
  130893. function addTransitionClass (el, cls) {
  130894. var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
  130895. if (transitionClasses.indexOf(cls) < 0) {
  130896. transitionClasses.push(cls);
  130897. addClass(el, cls);
  130898. }
  130899. }
  130900. function removeTransitionClass (el, cls) {
  130901. if (el._transitionClasses) {
  130902. remove(el._transitionClasses, cls);
  130903. }
  130904. removeClass(el, cls);
  130905. }
  130906. function whenTransitionEnds (
  130907. el,
  130908. expectedType,
  130909. cb
  130910. ) {
  130911. var ref = getTransitionInfo(el, expectedType);
  130912. var type = ref.type;
  130913. var timeout = ref.timeout;
  130914. var propCount = ref.propCount;
  130915. if (!type) { return cb() }
  130916. var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
  130917. var ended = 0;
  130918. var end = function () {
  130919. el.removeEventListener(event, onEnd);
  130920. cb();
  130921. };
  130922. var onEnd = function (e) {
  130923. if (e.target === el) {
  130924. if (++ended >= propCount) {
  130925. end();
  130926. }
  130927. }
  130928. };
  130929. setTimeout(function () {
  130930. if (ended < propCount) {
  130931. end();
  130932. }
  130933. }, timeout + 1);
  130934. el.addEventListener(event, onEnd);
  130935. }
  130936. var transformRE = /\b(transform|all)(,|$)/;
  130937. function getTransitionInfo (el, expectedType) {
  130938. var styles = window.getComputedStyle(el);
  130939. // JSDOM may return undefined for transition properties
  130940. var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
  130941. var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
  130942. var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  130943. var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
  130944. var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
  130945. var animationTimeout = getTimeout(animationDelays, animationDurations);
  130946. var type;
  130947. var timeout = 0;
  130948. var propCount = 0;
  130949. /* istanbul ignore if */
  130950. if (expectedType === TRANSITION) {
  130951. if (transitionTimeout > 0) {
  130952. type = TRANSITION;
  130953. timeout = transitionTimeout;
  130954. propCount = transitionDurations.length;
  130955. }
  130956. } else if (expectedType === ANIMATION) {
  130957. if (animationTimeout > 0) {
  130958. type = ANIMATION;
  130959. timeout = animationTimeout;
  130960. propCount = animationDurations.length;
  130961. }
  130962. } else {
  130963. timeout = Math.max(transitionTimeout, animationTimeout);
  130964. type = timeout > 0
  130965. ? transitionTimeout > animationTimeout
  130966. ? TRANSITION
  130967. : ANIMATION
  130968. : null;
  130969. propCount = type
  130970. ? type === TRANSITION
  130971. ? transitionDurations.length
  130972. : animationDurations.length
  130973. : 0;
  130974. }
  130975. var hasTransform =
  130976. type === TRANSITION &&
  130977. transformRE.test(styles[transitionProp + 'Property']);
  130978. return {
  130979. type: type,
  130980. timeout: timeout,
  130981. propCount: propCount,
  130982. hasTransform: hasTransform
  130983. }
  130984. }
  130985. function getTimeout (delays, durations) {
  130986. /* istanbul ignore next */
  130987. while (delays.length < durations.length) {
  130988. delays = delays.concat(delays);
  130989. }
  130990. return Math.max.apply(null, durations.map(function (d, i) {
  130991. return toMs(d) + toMs(delays[i])
  130992. }))
  130993. }
  130994. // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
  130995. // in a locale-dependent way, using a comma instead of a dot.
  130996. // If comma is not replaced with a dot, the input will be rounded down (i.e. acting
  130997. // as a floor function) causing unexpected behaviors
  130998. function toMs (s) {
  130999. return Number(s.slice(0, -1).replace(',', '.')) * 1000
  131000. }
  131001. /* */
  131002. function enter (vnode, toggleDisplay) {
  131003. var el = vnode.elm;
  131004. // call leave callback now
  131005. if (isDef(el._leaveCb)) {
  131006. el._leaveCb.cancelled = true;
  131007. el._leaveCb();
  131008. }
  131009. var data = resolveTransition(vnode.data.transition);
  131010. if (isUndef(data)) {
  131011. return
  131012. }
  131013. /* istanbul ignore if */
  131014. if (isDef(el._enterCb) || el.nodeType !== 1) {
  131015. return
  131016. }
  131017. var css = data.css;
  131018. var type = data.type;
  131019. var enterClass = data.enterClass;
  131020. var enterToClass = data.enterToClass;
  131021. var enterActiveClass = data.enterActiveClass;
  131022. var appearClass = data.appearClass;
  131023. var appearToClass = data.appearToClass;
  131024. var appearActiveClass = data.appearActiveClass;
  131025. var beforeEnter = data.beforeEnter;
  131026. var enter = data.enter;
  131027. var afterEnter = data.afterEnter;
  131028. var enterCancelled = data.enterCancelled;
  131029. var beforeAppear = data.beforeAppear;
  131030. var appear = data.appear;
  131031. var afterAppear = data.afterAppear;
  131032. var appearCancelled = data.appearCancelled;
  131033. var duration = data.duration;
  131034. // activeInstance will always be the <transition> component managing this
  131035. // transition. One edge case to check is when the <transition> is placed
  131036. // as the root node of a child component. In that case we need to check
  131037. // <transition>'s parent for appear check.
  131038. var context = activeInstance;
  131039. var transitionNode = activeInstance.$vnode;
  131040. while (transitionNode && transitionNode.parent) {
  131041. context = transitionNode.context;
  131042. transitionNode = transitionNode.parent;
  131043. }
  131044. var isAppear = !context._isMounted || !vnode.isRootInsert;
  131045. if (isAppear && !appear && appear !== '') {
  131046. return
  131047. }
  131048. var startClass = isAppear && appearClass
  131049. ? appearClass
  131050. : enterClass;
  131051. var activeClass = isAppear && appearActiveClass
  131052. ? appearActiveClass
  131053. : enterActiveClass;
  131054. var toClass = isAppear && appearToClass
  131055. ? appearToClass
  131056. : enterToClass;
  131057. var beforeEnterHook = isAppear
  131058. ? (beforeAppear || beforeEnter)
  131059. : beforeEnter;
  131060. var enterHook = isAppear
  131061. ? (typeof appear === 'function' ? appear : enter)
  131062. : enter;
  131063. var afterEnterHook = isAppear
  131064. ? (afterAppear || afterEnter)
  131065. : afterEnter;
  131066. var enterCancelledHook = isAppear
  131067. ? (appearCancelled || enterCancelled)
  131068. : enterCancelled;
  131069. var explicitEnterDuration = toNumber(
  131070. isObject(duration)
  131071. ? duration.enter
  131072. : duration
  131073. );
  131074. if ( true && explicitEnterDuration != null) {
  131075. checkDuration(explicitEnterDuration, 'enter', vnode);
  131076. }
  131077. var expectsCSS = css !== false && !isIE9;
  131078. var userWantsControl = getHookArgumentsLength(enterHook);
  131079. var cb = el._enterCb = once(function () {
  131080. if (expectsCSS) {
  131081. removeTransitionClass(el, toClass);
  131082. removeTransitionClass(el, activeClass);
  131083. }
  131084. if (cb.cancelled) {
  131085. if (expectsCSS) {
  131086. removeTransitionClass(el, startClass);
  131087. }
  131088. enterCancelledHook && enterCancelledHook(el);
  131089. } else {
  131090. afterEnterHook && afterEnterHook(el);
  131091. }
  131092. el._enterCb = null;
  131093. });
  131094. if (!vnode.data.show) {
  131095. // remove pending leave element on enter by injecting an insert hook
  131096. mergeVNodeHook(vnode, 'insert', function () {
  131097. var parent = el.parentNode;
  131098. var pendingNode = parent && parent._pending && parent._pending[vnode.key];
  131099. if (pendingNode &&
  131100. pendingNode.tag === vnode.tag &&
  131101. pendingNode.elm._leaveCb
  131102. ) {
  131103. pendingNode.elm._leaveCb();
  131104. }
  131105. enterHook && enterHook(el, cb);
  131106. });
  131107. }
  131108. // start enter transition
  131109. beforeEnterHook && beforeEnterHook(el);
  131110. if (expectsCSS) {
  131111. addTransitionClass(el, startClass);
  131112. addTransitionClass(el, activeClass);
  131113. nextFrame(function () {
  131114. removeTransitionClass(el, startClass);
  131115. if (!cb.cancelled) {
  131116. addTransitionClass(el, toClass);
  131117. if (!userWantsControl) {
  131118. if (isValidDuration(explicitEnterDuration)) {
  131119. setTimeout(cb, explicitEnterDuration);
  131120. } else {
  131121. whenTransitionEnds(el, type, cb);
  131122. }
  131123. }
  131124. }
  131125. });
  131126. }
  131127. if (vnode.data.show) {
  131128. toggleDisplay && toggleDisplay();
  131129. enterHook && enterHook(el, cb);
  131130. }
  131131. if (!expectsCSS && !userWantsControl) {
  131132. cb();
  131133. }
  131134. }
  131135. function leave (vnode, rm) {
  131136. var el = vnode.elm;
  131137. // call enter callback now
  131138. if (isDef(el._enterCb)) {
  131139. el._enterCb.cancelled = true;
  131140. el._enterCb();
  131141. }
  131142. var data = resolveTransition(vnode.data.transition);
  131143. if (isUndef(data) || el.nodeType !== 1) {
  131144. return rm()
  131145. }
  131146. /* istanbul ignore if */
  131147. if (isDef(el._leaveCb)) {
  131148. return
  131149. }
  131150. var css = data.css;
  131151. var type = data.type;
  131152. var leaveClass = data.leaveClass;
  131153. var leaveToClass = data.leaveToClass;
  131154. var leaveActiveClass = data.leaveActiveClass;
  131155. var beforeLeave = data.beforeLeave;
  131156. var leave = data.leave;
  131157. var afterLeave = data.afterLeave;
  131158. var leaveCancelled = data.leaveCancelled;
  131159. var delayLeave = data.delayLeave;
  131160. var duration = data.duration;
  131161. var expectsCSS = css !== false && !isIE9;
  131162. var userWantsControl = getHookArgumentsLength(leave);
  131163. var explicitLeaveDuration = toNumber(
  131164. isObject(duration)
  131165. ? duration.leave
  131166. : duration
  131167. );
  131168. if ( true && isDef(explicitLeaveDuration)) {
  131169. checkDuration(explicitLeaveDuration, 'leave', vnode);
  131170. }
  131171. var cb = el._leaveCb = once(function () {
  131172. if (el.parentNode && el.parentNode._pending) {
  131173. el.parentNode._pending[vnode.key] = null;
  131174. }
  131175. if (expectsCSS) {
  131176. removeTransitionClass(el, leaveToClass);
  131177. removeTransitionClass(el, leaveActiveClass);
  131178. }
  131179. if (cb.cancelled) {
  131180. if (expectsCSS) {
  131181. removeTransitionClass(el, leaveClass);
  131182. }
  131183. leaveCancelled && leaveCancelled(el);
  131184. } else {
  131185. rm();
  131186. afterLeave && afterLeave(el);
  131187. }
  131188. el._leaveCb = null;
  131189. });
  131190. if (delayLeave) {
  131191. delayLeave(performLeave);
  131192. } else {
  131193. performLeave();
  131194. }
  131195. function performLeave () {
  131196. // the delayed leave may have already been cancelled
  131197. if (cb.cancelled) {
  131198. return
  131199. }
  131200. // record leaving element
  131201. if (!vnode.data.show && el.parentNode) {
  131202. (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
  131203. }
  131204. beforeLeave && beforeLeave(el);
  131205. if (expectsCSS) {
  131206. addTransitionClass(el, leaveClass);
  131207. addTransitionClass(el, leaveActiveClass);
  131208. nextFrame(function () {
  131209. removeTransitionClass(el, leaveClass);
  131210. if (!cb.cancelled) {
  131211. addTransitionClass(el, leaveToClass);
  131212. if (!userWantsControl) {
  131213. if (isValidDuration(explicitLeaveDuration)) {
  131214. setTimeout(cb, explicitLeaveDuration);
  131215. } else {
  131216. whenTransitionEnds(el, type, cb);
  131217. }
  131218. }
  131219. }
  131220. });
  131221. }
  131222. leave && leave(el, cb);
  131223. if (!expectsCSS && !userWantsControl) {
  131224. cb();
  131225. }
  131226. }
  131227. }
  131228. // only used in dev mode
  131229. function checkDuration (val, name, vnode) {
  131230. if (typeof val !== 'number') {
  131231. warn(
  131232. "<transition> explicit " + name + " duration is not a valid number - " +
  131233. "got " + (JSON.stringify(val)) + ".",
  131234. vnode.context
  131235. );
  131236. } else if (isNaN(val)) {
  131237. warn(
  131238. "<transition> explicit " + name + " duration is NaN - " +
  131239. 'the duration expression might be incorrect.',
  131240. vnode.context
  131241. );
  131242. }
  131243. }
  131244. function isValidDuration (val) {
  131245. return typeof val === 'number' && !isNaN(val)
  131246. }
  131247. /**
  131248. * Normalize a transition hook's argument length. The hook may be:
  131249. * - a merged hook (invoker) with the original in .fns
  131250. * - a wrapped component method (check ._length)
  131251. * - a plain function (.length)
  131252. */
  131253. function getHookArgumentsLength (fn) {
  131254. if (isUndef(fn)) {
  131255. return false
  131256. }
  131257. var invokerFns = fn.fns;
  131258. if (isDef(invokerFns)) {
  131259. // invoker
  131260. return getHookArgumentsLength(
  131261. Array.isArray(invokerFns)
  131262. ? invokerFns[0]
  131263. : invokerFns
  131264. )
  131265. } else {
  131266. return (fn._length || fn.length) > 1
  131267. }
  131268. }
  131269. function _enter (_, vnode) {
  131270. if (vnode.data.show !== true) {
  131271. enter(vnode);
  131272. }
  131273. }
  131274. var transition = inBrowser ? {
  131275. create: _enter,
  131276. activate: _enter,
  131277. remove: function remove$$1 (vnode, rm) {
  131278. /* istanbul ignore else */
  131279. if (vnode.data.show !== true) {
  131280. leave(vnode, rm);
  131281. } else {
  131282. rm();
  131283. }
  131284. }
  131285. } : {};
  131286. var platformModules = [
  131287. attrs,
  131288. klass,
  131289. events,
  131290. domProps,
  131291. style,
  131292. transition
  131293. ];
  131294. /* */
  131295. // the directive module should be applied last, after all
  131296. // built-in modules have been applied.
  131297. var modules = platformModules.concat(baseModules);
  131298. var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
  131299. /**
  131300. * Not type checking this file because flow doesn't like attaching
  131301. * properties to Elements.
  131302. */
  131303. /* istanbul ignore if */
  131304. if (isIE9) {
  131305. // http://www.matts411.com/post/internet-explorer-9-oninput/
  131306. document.addEventListener('selectionchange', function () {
  131307. var el = document.activeElement;
  131308. if (el && el.vmodel) {
  131309. trigger(el, 'input');
  131310. }
  131311. });
  131312. }
  131313. var directive = {
  131314. inserted: function inserted (el, binding, vnode, oldVnode) {
  131315. if (vnode.tag === 'select') {
  131316. // #6903
  131317. if (oldVnode.elm && !oldVnode.elm._vOptions) {
  131318. mergeVNodeHook(vnode, 'postpatch', function () {
  131319. directive.componentUpdated(el, binding, vnode);
  131320. });
  131321. } else {
  131322. setSelected(el, binding, vnode.context);
  131323. }
  131324. el._vOptions = [].map.call(el.options, getValue);
  131325. } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
  131326. el._vModifiers = binding.modifiers;
  131327. if (!binding.modifiers.lazy) {
  131328. el.addEventListener('compositionstart', onCompositionStart);
  131329. el.addEventListener('compositionend', onCompositionEnd);
  131330. // Safari < 10.2 & UIWebView doesn't fire compositionend when
  131331. // switching focus before confirming composition choice
  131332. // this also fixes the issue where some browsers e.g. iOS Chrome
  131333. // fires "change" instead of "input" on autocomplete.
  131334. el.addEventListener('change', onCompositionEnd);
  131335. /* istanbul ignore if */
  131336. if (isIE9) {
  131337. el.vmodel = true;
  131338. }
  131339. }
  131340. }
  131341. },
  131342. componentUpdated: function componentUpdated (el, binding, vnode) {
  131343. if (vnode.tag === 'select') {
  131344. setSelected(el, binding, vnode.context);
  131345. // in case the options rendered by v-for have changed,
  131346. // it's possible that the value is out-of-sync with the rendered options.
  131347. // detect such cases and filter out values that no longer has a matching
  131348. // option in the DOM.
  131349. var prevOptions = el._vOptions;
  131350. var curOptions = el._vOptions = [].map.call(el.options, getValue);
  131351. if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
  131352. // trigger change event if
  131353. // no matching option found for at least one value
  131354. var needReset = el.multiple
  131355. ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
  131356. : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
  131357. if (needReset) {
  131358. trigger(el, 'change');
  131359. }
  131360. }
  131361. }
  131362. }
  131363. };
  131364. function setSelected (el, binding, vm) {
  131365. actuallySetSelected(el, binding, vm);
  131366. /* istanbul ignore if */
  131367. if (isIE || isEdge) {
  131368. setTimeout(function () {
  131369. actuallySetSelected(el, binding, vm);
  131370. }, 0);
  131371. }
  131372. }
  131373. function actuallySetSelected (el, binding, vm) {
  131374. var value = binding.value;
  131375. var isMultiple = el.multiple;
  131376. if (isMultiple && !Array.isArray(value)) {
  131377. true && warn(
  131378. "<select multiple v-model=\"" + (binding.expression) + "\"> " +
  131379. "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
  131380. vm
  131381. );
  131382. return
  131383. }
  131384. var selected, option;
  131385. for (var i = 0, l = el.options.length; i < l; i++) {
  131386. option = el.options[i];
  131387. if (isMultiple) {
  131388. selected = looseIndexOf(value, getValue(option)) > -1;
  131389. if (option.selected !== selected) {
  131390. option.selected = selected;
  131391. }
  131392. } else {
  131393. if (looseEqual(getValue(option), value)) {
  131394. if (el.selectedIndex !== i) {
  131395. el.selectedIndex = i;
  131396. }
  131397. return
  131398. }
  131399. }
  131400. }
  131401. if (!isMultiple) {
  131402. el.selectedIndex = -1;
  131403. }
  131404. }
  131405. function hasNoMatchingOption (value, options) {
  131406. return options.every(function (o) { return !looseEqual(o, value); })
  131407. }
  131408. function getValue (option) {
  131409. return '_value' in option
  131410. ? option._value
  131411. : option.value
  131412. }
  131413. function onCompositionStart (e) {
  131414. e.target.composing = true;
  131415. }
  131416. function onCompositionEnd (e) {
  131417. // prevent triggering an input event for no reason
  131418. if (!e.target.composing) { return }
  131419. e.target.composing = false;
  131420. trigger(e.target, 'input');
  131421. }
  131422. function trigger (el, type) {
  131423. var e = document.createEvent('HTMLEvents');
  131424. e.initEvent(type, true, true);
  131425. el.dispatchEvent(e);
  131426. }
  131427. /* */
  131428. // recursively search for possible transition defined inside the component root
  131429. function locateNode (vnode) {
  131430. return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
  131431. ? locateNode(vnode.componentInstance._vnode)
  131432. : vnode
  131433. }
  131434. var show = {
  131435. bind: function bind (el, ref, vnode) {
  131436. var value = ref.value;
  131437. vnode = locateNode(vnode);
  131438. var transition$$1 = vnode.data && vnode.data.transition;
  131439. var originalDisplay = el.__vOriginalDisplay =
  131440. el.style.display === 'none' ? '' : el.style.display;
  131441. if (value && transition$$1) {
  131442. vnode.data.show = true;
  131443. enter(vnode, function () {
  131444. el.style.display = originalDisplay;
  131445. });
  131446. } else {
  131447. el.style.display = value ? originalDisplay : 'none';
  131448. }
  131449. },
  131450. update: function update (el, ref, vnode) {
  131451. var value = ref.value;
  131452. var oldValue = ref.oldValue;
  131453. /* istanbul ignore if */
  131454. if (!value === !oldValue) { return }
  131455. vnode = locateNode(vnode);
  131456. var transition$$1 = vnode.data && vnode.data.transition;
  131457. if (transition$$1) {
  131458. vnode.data.show = true;
  131459. if (value) {
  131460. enter(vnode, function () {
  131461. el.style.display = el.__vOriginalDisplay;
  131462. });
  131463. } else {
  131464. leave(vnode, function () {
  131465. el.style.display = 'none';
  131466. });
  131467. }
  131468. } else {
  131469. el.style.display = value ? el.__vOriginalDisplay : 'none';
  131470. }
  131471. },
  131472. unbind: function unbind (
  131473. el,
  131474. binding,
  131475. vnode,
  131476. oldVnode,
  131477. isDestroy
  131478. ) {
  131479. if (!isDestroy) {
  131480. el.style.display = el.__vOriginalDisplay;
  131481. }
  131482. }
  131483. };
  131484. var platformDirectives = {
  131485. model: directive,
  131486. show: show
  131487. };
  131488. /* */
  131489. var transitionProps = {
  131490. name: String,
  131491. appear: Boolean,
  131492. css: Boolean,
  131493. mode: String,
  131494. type: String,
  131495. enterClass: String,
  131496. leaveClass: String,
  131497. enterToClass: String,
  131498. leaveToClass: String,
  131499. enterActiveClass: String,
  131500. leaveActiveClass: String,
  131501. appearClass: String,
  131502. appearActiveClass: String,
  131503. appearToClass: String,
  131504. duration: [Number, String, Object]
  131505. };
  131506. // in case the child is also an abstract component, e.g. <keep-alive>
  131507. // we want to recursively retrieve the real component to be rendered
  131508. function getRealChild (vnode) {
  131509. var compOptions = vnode && vnode.componentOptions;
  131510. if (compOptions && compOptions.Ctor.options.abstract) {
  131511. return getRealChild(getFirstComponentChild(compOptions.children))
  131512. } else {
  131513. return vnode
  131514. }
  131515. }
  131516. function extractTransitionData (comp) {
  131517. var data = {};
  131518. var options = comp.$options;
  131519. // props
  131520. for (var key in options.propsData) {
  131521. data[key] = comp[key];
  131522. }
  131523. // events.
  131524. // extract listeners and pass them directly to the transition methods
  131525. var listeners = options._parentListeners;
  131526. for (var key$1 in listeners) {
  131527. data[camelize(key$1)] = listeners[key$1];
  131528. }
  131529. return data
  131530. }
  131531. function placeholder (h, rawChild) {
  131532. if (/\d-keep-alive$/.test(rawChild.tag)) {
  131533. return h('keep-alive', {
  131534. props: rawChild.componentOptions.propsData
  131535. })
  131536. }
  131537. }
  131538. function hasParentTransition (vnode) {
  131539. while ((vnode = vnode.parent)) {
  131540. if (vnode.data.transition) {
  131541. return true
  131542. }
  131543. }
  131544. }
  131545. function isSameChild (child, oldChild) {
  131546. return oldChild.key === child.key && oldChild.tag === child.tag
  131547. }
  131548. var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };
  131549. var isVShowDirective = function (d) { return d.name === 'show'; };
  131550. var Transition = {
  131551. name: 'transition',
  131552. props: transitionProps,
  131553. abstract: true,
  131554. render: function render (h) {
  131555. var this$1 = this;
  131556. var children = this.$slots.default;
  131557. if (!children) {
  131558. return
  131559. }
  131560. // filter out text nodes (possible whitespaces)
  131561. children = children.filter(isNotTextNode);
  131562. /* istanbul ignore if */
  131563. if (!children.length) {
  131564. return
  131565. }
  131566. // warn multiple elements
  131567. if ( true && children.length > 1) {
  131568. warn(
  131569. '<transition> can only be used on a single element. Use ' +
  131570. '<transition-group> for lists.',
  131571. this.$parent
  131572. );
  131573. }
  131574. var mode = this.mode;
  131575. // warn invalid mode
  131576. if ( true &&
  131577. mode && mode !== 'in-out' && mode !== 'out-in'
  131578. ) {
  131579. warn(
  131580. 'invalid <transition> mode: ' + mode,
  131581. this.$parent
  131582. );
  131583. }
  131584. var rawChild = children[0];
  131585. // if this is a component root node and the component's
  131586. // parent container node also has transition, skip.
  131587. if (hasParentTransition(this.$vnode)) {
  131588. return rawChild
  131589. }
  131590. // apply transition data to child
  131591. // use getRealChild() to ignore abstract components e.g. keep-alive
  131592. var child = getRealChild(rawChild);
  131593. /* istanbul ignore if */
  131594. if (!child) {
  131595. return rawChild
  131596. }
  131597. if (this._leaving) {
  131598. return placeholder(h, rawChild)
  131599. }
  131600. // ensure a key that is unique to the vnode type and to this transition
  131601. // component instance. This key will be used to remove pending leaving nodes
  131602. // during entering.
  131603. var id = "__transition-" + (this._uid) + "-";
  131604. child.key = child.key == null
  131605. ? child.isComment
  131606. ? id + 'comment'
  131607. : id + child.tag
  131608. : isPrimitive(child.key)
  131609. ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
  131610. : child.key;
  131611. var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
  131612. var oldRawChild = this._vnode;
  131613. var oldChild = getRealChild(oldRawChild);
  131614. // mark v-show
  131615. // so that the transition module can hand over the control to the directive
  131616. if (child.data.directives && child.data.directives.some(isVShowDirective)) {
  131617. child.data.show = true;
  131618. }
  131619. if (
  131620. oldChild &&
  131621. oldChild.data &&
  131622. !isSameChild(child, oldChild) &&
  131623. !isAsyncPlaceholder(oldChild) &&
  131624. // #6687 component root is a comment node
  131625. !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)
  131626. ) {
  131627. // replace old child transition data with fresh one
  131628. // important for dynamic transitions!
  131629. var oldData = oldChild.data.transition = extend({}, data);
  131630. // handle transition mode
  131631. if (mode === 'out-in') {
  131632. // return placeholder node and queue update when leave finishes
  131633. this._leaving = true;
  131634. mergeVNodeHook(oldData, 'afterLeave', function () {
  131635. this$1._leaving = false;
  131636. this$1.$forceUpdate();
  131637. });
  131638. return placeholder(h, rawChild)
  131639. } else if (mode === 'in-out') {
  131640. if (isAsyncPlaceholder(child)) {
  131641. return oldRawChild
  131642. }
  131643. var delayedLeave;
  131644. var performLeave = function () { delayedLeave(); };
  131645. mergeVNodeHook(data, 'afterEnter', performLeave);
  131646. mergeVNodeHook(data, 'enterCancelled', performLeave);
  131647. mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
  131648. }
  131649. }
  131650. return rawChild
  131651. }
  131652. };
  131653. /* */
  131654. var props = extend({
  131655. tag: String,
  131656. moveClass: String
  131657. }, transitionProps);
  131658. delete props.mode;
  131659. var TransitionGroup = {
  131660. props: props,
  131661. beforeMount: function beforeMount () {
  131662. var this$1 = this;
  131663. var update = this._update;
  131664. this._update = function (vnode, hydrating) {
  131665. var restoreActiveInstance = setActiveInstance(this$1);
  131666. // force removing pass
  131667. this$1.__patch__(
  131668. this$1._vnode,
  131669. this$1.kept,
  131670. false, // hydrating
  131671. true // removeOnly (!important, avoids unnecessary moves)
  131672. );
  131673. this$1._vnode = this$1.kept;
  131674. restoreActiveInstance();
  131675. update.call(this$1, vnode, hydrating);
  131676. };
  131677. },
  131678. render: function render (h) {
  131679. var tag = this.tag || this.$vnode.data.tag || 'span';
  131680. var map = Object.create(null);
  131681. var prevChildren = this.prevChildren = this.children;
  131682. var rawChildren = this.$slots.default || [];
  131683. var children = this.children = [];
  131684. var transitionData = extractTransitionData(this);
  131685. for (var i = 0; i < rawChildren.length; i++) {
  131686. var c = rawChildren[i];
  131687. if (c.tag) {
  131688. if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
  131689. children.push(c);
  131690. map[c.key] = c
  131691. ;(c.data || (c.data = {})).transition = transitionData;
  131692. } else if (true) {
  131693. var opts = c.componentOptions;
  131694. var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
  131695. warn(("<transition-group> children must be keyed: <" + name + ">"));
  131696. }
  131697. }
  131698. }
  131699. if (prevChildren) {
  131700. var kept = [];
  131701. var removed = [];
  131702. for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
  131703. var c$1 = prevChildren[i$1];
  131704. c$1.data.transition = transitionData;
  131705. c$1.data.pos = c$1.elm.getBoundingClientRect();
  131706. if (map[c$1.key]) {
  131707. kept.push(c$1);
  131708. } else {
  131709. removed.push(c$1);
  131710. }
  131711. }
  131712. this.kept = h(tag, null, kept);
  131713. this.removed = removed;
  131714. }
  131715. return h(tag, null, children)
  131716. },
  131717. updated: function updated () {
  131718. var children = this.prevChildren;
  131719. var moveClass = this.moveClass || ((this.name || 'v') + '-move');
  131720. if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
  131721. return
  131722. }
  131723. // we divide the work into three loops to avoid mixing DOM reads and writes
  131724. // in each iteration - which helps prevent layout thrashing.
  131725. children.forEach(callPendingCbs);
  131726. children.forEach(recordPosition);
  131727. children.forEach(applyTranslation);
  131728. // force reflow to put everything in position
  131729. // assign to this to avoid being removed in tree-shaking
  131730. // $flow-disable-line
  131731. this._reflow = document.body.offsetHeight;
  131732. children.forEach(function (c) {
  131733. if (c.data.moved) {
  131734. var el = c.elm;
  131735. var s = el.style;
  131736. addTransitionClass(el, moveClass);
  131737. s.transform = s.WebkitTransform = s.transitionDuration = '';
  131738. el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
  131739. if (e && e.target !== el) {
  131740. return
  131741. }
  131742. if (!e || /transform$/.test(e.propertyName)) {
  131743. el.removeEventListener(transitionEndEvent, cb);
  131744. el._moveCb = null;
  131745. removeTransitionClass(el, moveClass);
  131746. }
  131747. });
  131748. }
  131749. });
  131750. },
  131751. methods: {
  131752. hasMove: function hasMove (el, moveClass) {
  131753. /* istanbul ignore if */
  131754. if (!hasTransition) {
  131755. return false
  131756. }
  131757. /* istanbul ignore if */
  131758. if (this._hasMove) {
  131759. return this._hasMove
  131760. }
  131761. // Detect whether an element with the move class applied has
  131762. // CSS transitions. Since the element may be inside an entering
  131763. // transition at this very moment, we make a clone of it and remove
  131764. // all other transition classes applied to ensure only the move class
  131765. // is applied.
  131766. var clone = el.cloneNode();
  131767. if (el._transitionClasses) {
  131768. el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
  131769. }
  131770. addClass(clone, moveClass);
  131771. clone.style.display = 'none';
  131772. this.$el.appendChild(clone);
  131773. var info = getTransitionInfo(clone);
  131774. this.$el.removeChild(clone);
  131775. return (this._hasMove = info.hasTransform)
  131776. }
  131777. }
  131778. };
  131779. function callPendingCbs (c) {
  131780. /* istanbul ignore if */
  131781. if (c.elm._moveCb) {
  131782. c.elm._moveCb();
  131783. }
  131784. /* istanbul ignore if */
  131785. if (c.elm._enterCb) {
  131786. c.elm._enterCb();
  131787. }
  131788. }
  131789. function recordPosition (c) {
  131790. c.data.newPos = c.elm.getBoundingClientRect();
  131791. }
  131792. function applyTranslation (c) {
  131793. var oldPos = c.data.pos;
  131794. var newPos = c.data.newPos;
  131795. var dx = oldPos.left - newPos.left;
  131796. var dy = oldPos.top - newPos.top;
  131797. if (dx || dy) {
  131798. c.data.moved = true;
  131799. var s = c.elm.style;
  131800. s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
  131801. s.transitionDuration = '0s';
  131802. }
  131803. }
  131804. var platformComponents = {
  131805. Transition: Transition,
  131806. TransitionGroup: TransitionGroup
  131807. };
  131808. /* */
  131809. // install platform specific utils
  131810. Vue.config.mustUseProp = mustUseProp;
  131811. Vue.config.isReservedTag = isReservedTag;
  131812. Vue.config.isReservedAttr = isReservedAttr;
  131813. Vue.config.getTagNamespace = getTagNamespace;
  131814. Vue.config.isUnknownElement = isUnknownElement;
  131815. // install platform runtime directives & components
  131816. extend(Vue.options.directives, platformDirectives);
  131817. extend(Vue.options.components, platformComponents);
  131818. // install platform patch function
  131819. Vue.prototype.__patch__ = inBrowser ? patch : noop;
  131820. // public mount method
  131821. Vue.prototype.$mount = function (
  131822. el,
  131823. hydrating
  131824. ) {
  131825. el = el && inBrowser ? query(el) : undefined;
  131826. return mountComponent(this, el, hydrating)
  131827. };
  131828. // devtools global hook
  131829. /* istanbul ignore next */
  131830. if (inBrowser) {
  131831. setTimeout(function () {
  131832. if (config.devtools) {
  131833. if (devtools) {
  131834. devtools.emit('init', Vue);
  131835. } else if (
  131836. true
  131837. ) {
  131838. console[console.info ? 'info' : 'log'](
  131839. 'Download the Vue Devtools extension for a better development experience:\n' +
  131840. 'https://github.com/vuejs/vue-devtools'
  131841. );
  131842. }
  131843. }
  131844. if ( true &&
  131845. config.productionTip !== false &&
  131846. typeof console !== 'undefined'
  131847. ) {
  131848. console[console.info ? 'info' : 'log'](
  131849. "You are running Vue in development mode.\n" +
  131850. "Make sure to turn on production mode when deploying for production.\n" +
  131851. "See more tips at https://vuejs.org/guide/deployment.html"
  131852. );
  131853. }
  131854. }, 0);
  131855. }
  131856. /* */
  131857. var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
  131858. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  131859. var buildRegex = cached(function (delimiters) {
  131860. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  131861. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  131862. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
  131863. });
  131864. function parseText (
  131865. text,
  131866. delimiters
  131867. ) {
  131868. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  131869. if (!tagRE.test(text)) {
  131870. return
  131871. }
  131872. var tokens = [];
  131873. var rawTokens = [];
  131874. var lastIndex = tagRE.lastIndex = 0;
  131875. var match, index, tokenValue;
  131876. while ((match = tagRE.exec(text))) {
  131877. index = match.index;
  131878. // push text token
  131879. if (index > lastIndex) {
  131880. rawTokens.push(tokenValue = text.slice(lastIndex, index));
  131881. tokens.push(JSON.stringify(tokenValue));
  131882. }
  131883. // tag token
  131884. var exp = parseFilters(match[1].trim());
  131885. tokens.push(("_s(" + exp + ")"));
  131886. rawTokens.push({ '@binding': exp });
  131887. lastIndex = index + match[0].length;
  131888. }
  131889. if (lastIndex < text.length) {
  131890. rawTokens.push(tokenValue = text.slice(lastIndex));
  131891. tokens.push(JSON.stringify(tokenValue));
  131892. }
  131893. return {
  131894. expression: tokens.join('+'),
  131895. tokens: rawTokens
  131896. }
  131897. }
  131898. /* */
  131899. function transformNode (el, options) {
  131900. var warn = options.warn || baseWarn;
  131901. var staticClass = getAndRemoveAttr(el, 'class');
  131902. if ( true && staticClass) {
  131903. var res = parseText(staticClass, options.delimiters);
  131904. if (res) {
  131905. warn(
  131906. "class=\"" + staticClass + "\": " +
  131907. 'Interpolation inside attributes has been removed. ' +
  131908. 'Use v-bind or the colon shorthand instead. For example, ' +
  131909. 'instead of <div class="{{ val }}">, use <div :class="val">.',
  131910. el.rawAttrsMap['class']
  131911. );
  131912. }
  131913. }
  131914. if (staticClass) {
  131915. el.staticClass = JSON.stringify(staticClass);
  131916. }
  131917. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  131918. if (classBinding) {
  131919. el.classBinding = classBinding;
  131920. }
  131921. }
  131922. function genData (el) {
  131923. var data = '';
  131924. if (el.staticClass) {
  131925. data += "staticClass:" + (el.staticClass) + ",";
  131926. }
  131927. if (el.classBinding) {
  131928. data += "class:" + (el.classBinding) + ",";
  131929. }
  131930. return data
  131931. }
  131932. var klass$1 = {
  131933. staticKeys: ['staticClass'],
  131934. transformNode: transformNode,
  131935. genData: genData
  131936. };
  131937. /* */
  131938. function transformNode$1 (el, options) {
  131939. var warn = options.warn || baseWarn;
  131940. var staticStyle = getAndRemoveAttr(el, 'style');
  131941. if (staticStyle) {
  131942. /* istanbul ignore if */
  131943. if (true) {
  131944. var res = parseText(staticStyle, options.delimiters);
  131945. if (res) {
  131946. warn(
  131947. "style=\"" + staticStyle + "\": " +
  131948. 'Interpolation inside attributes has been removed. ' +
  131949. 'Use v-bind or the colon shorthand instead. For example, ' +
  131950. 'instead of <div style="{{ val }}">, use <div :style="val">.',
  131951. el.rawAttrsMap['style']
  131952. );
  131953. }
  131954. }
  131955. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  131956. }
  131957. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  131958. if (styleBinding) {
  131959. el.styleBinding = styleBinding;
  131960. }
  131961. }
  131962. function genData$1 (el) {
  131963. var data = '';
  131964. if (el.staticStyle) {
  131965. data += "staticStyle:" + (el.staticStyle) + ",";
  131966. }
  131967. if (el.styleBinding) {
  131968. data += "style:(" + (el.styleBinding) + "),";
  131969. }
  131970. return data
  131971. }
  131972. var style$1 = {
  131973. staticKeys: ['staticStyle'],
  131974. transformNode: transformNode$1,
  131975. genData: genData$1
  131976. };
  131977. /* */
  131978. var decoder;
  131979. var he = {
  131980. decode: function decode (html) {
  131981. decoder = decoder || document.createElement('div');
  131982. decoder.innerHTML = html;
  131983. return decoder.textContent
  131984. }
  131985. };
  131986. /* */
  131987. var isUnaryTag = makeMap(
  131988. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  131989. 'link,meta,param,source,track,wbr'
  131990. );
  131991. // Elements that you can, intentionally, leave open
  131992. // (and which close themselves)
  131993. var canBeLeftOpenTag = makeMap(
  131994. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  131995. );
  131996. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  131997. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  131998. var isNonPhrasingTag = makeMap(
  131999. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  132000. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  132001. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  132002. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  132003. 'title,tr,track'
  132004. );
  132005. /**
  132006. * Not type-checking this file because it's mostly vendor code.
  132007. */
  132008. // Regular Expressions for parsing tags and attributes
  132009. var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  132010. var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  132011. var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
  132012. var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
  132013. var startTagOpen = new RegExp(("^<" + qnameCapture));
  132014. var startTagClose = /^\s*(\/?)>/;
  132015. var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
  132016. var doctype = /^<!DOCTYPE [^>]+>/i;
  132017. // #7298: escape - to avoid being passed as HTML comment when inlined in page
  132018. var comment = /^<!\--/;
  132019. var conditionalComment = /^<!\[/;
  132020. // Special Elements (can contain anything)
  132021. var isPlainTextElement = makeMap('script,style,textarea', true);
  132022. var reCache = {};
  132023. var decodingMap = {
  132024. '&lt;': '<',
  132025. '&gt;': '>',
  132026. '&quot;': '"',
  132027. '&amp;': '&',
  132028. '&#10;': '\n',
  132029. '&#9;': '\t',
  132030. '&#39;': "'"
  132031. };
  132032. var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
  132033. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
  132034. // #5992
  132035. var isIgnoreNewlineTag = makeMap('pre,textarea', true);
  132036. var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
  132037. function decodeAttr (value, shouldDecodeNewlines) {
  132038. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  132039. return value.replace(re, function (match) { return decodingMap[match]; })
  132040. }
  132041. function parseHTML (html, options) {
  132042. var stack = [];
  132043. var expectHTML = options.expectHTML;
  132044. var isUnaryTag$$1 = options.isUnaryTag || no;
  132045. var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
  132046. var index = 0;
  132047. var last, lastTag;
  132048. while (html) {
  132049. last = html;
  132050. // Make sure we're not in a plaintext content element like script/style
  132051. if (!lastTag || !isPlainTextElement(lastTag)) {
  132052. var textEnd = html.indexOf('<');
  132053. if (textEnd === 0) {
  132054. // Comment:
  132055. if (comment.test(html)) {
  132056. var commentEnd = html.indexOf('-->');
  132057. if (commentEnd >= 0) {
  132058. if (options.shouldKeepComment) {
  132059. options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
  132060. }
  132061. advance(commentEnd + 3);
  132062. continue
  132063. }
  132064. }
  132065. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  132066. if (conditionalComment.test(html)) {
  132067. var conditionalEnd = html.indexOf(']>');
  132068. if (conditionalEnd >= 0) {
  132069. advance(conditionalEnd + 2);
  132070. continue
  132071. }
  132072. }
  132073. // Doctype:
  132074. var doctypeMatch = html.match(doctype);
  132075. if (doctypeMatch) {
  132076. advance(doctypeMatch[0].length);
  132077. continue
  132078. }
  132079. // End tag:
  132080. var endTagMatch = html.match(endTag);
  132081. if (endTagMatch) {
  132082. var curIndex = index;
  132083. advance(endTagMatch[0].length);
  132084. parseEndTag(endTagMatch[1], curIndex, index);
  132085. continue
  132086. }
  132087. // Start tag:
  132088. var startTagMatch = parseStartTag();
  132089. if (startTagMatch) {
  132090. handleStartTag(startTagMatch);
  132091. if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
  132092. advance(1);
  132093. }
  132094. continue
  132095. }
  132096. }
  132097. var text = (void 0), rest = (void 0), next = (void 0);
  132098. if (textEnd >= 0) {
  132099. rest = html.slice(textEnd);
  132100. while (
  132101. !endTag.test(rest) &&
  132102. !startTagOpen.test(rest) &&
  132103. !comment.test(rest) &&
  132104. !conditionalComment.test(rest)
  132105. ) {
  132106. // < in plain text, be forgiving and treat it as text
  132107. next = rest.indexOf('<', 1);
  132108. if (next < 0) { break }
  132109. textEnd += next;
  132110. rest = html.slice(textEnd);
  132111. }
  132112. text = html.substring(0, textEnd);
  132113. }
  132114. if (textEnd < 0) {
  132115. text = html;
  132116. }
  132117. if (text) {
  132118. advance(text.length);
  132119. }
  132120. if (options.chars && text) {
  132121. options.chars(text, index - text.length, index);
  132122. }
  132123. } else {
  132124. var endTagLength = 0;
  132125. var stackedTag = lastTag.toLowerCase();
  132126. var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
  132127. var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
  132128. endTagLength = endTag.length;
  132129. if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
  132130. text = text
  132131. .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
  132132. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  132133. }
  132134. if (shouldIgnoreFirstNewline(stackedTag, text)) {
  132135. text = text.slice(1);
  132136. }
  132137. if (options.chars) {
  132138. options.chars(text);
  132139. }
  132140. return ''
  132141. });
  132142. index += html.length - rest$1.length;
  132143. html = rest$1;
  132144. parseEndTag(stackedTag, index - endTagLength, index);
  132145. }
  132146. if (html === last) {
  132147. options.chars && options.chars(html);
  132148. if ( true && !stack.length && options.warn) {
  132149. options.warn(("Mal-formatted tag at end of template: \"" + html + "\""), { start: index + html.length });
  132150. }
  132151. break
  132152. }
  132153. }
  132154. // Clean up any remaining tags
  132155. parseEndTag();
  132156. function advance (n) {
  132157. index += n;
  132158. html = html.substring(n);
  132159. }
  132160. function parseStartTag () {
  132161. var start = html.match(startTagOpen);
  132162. if (start) {
  132163. var match = {
  132164. tagName: start[1],
  132165. attrs: [],
  132166. start: index
  132167. };
  132168. advance(start[0].length);
  132169. var end, attr;
  132170. while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
  132171. attr.start = index;
  132172. advance(attr[0].length);
  132173. attr.end = index;
  132174. match.attrs.push(attr);
  132175. }
  132176. if (end) {
  132177. match.unarySlash = end[1];
  132178. advance(end[0].length);
  132179. match.end = index;
  132180. return match
  132181. }
  132182. }
  132183. }
  132184. function handleStartTag (match) {
  132185. var tagName = match.tagName;
  132186. var unarySlash = match.unarySlash;
  132187. if (expectHTML) {
  132188. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  132189. parseEndTag(lastTag);
  132190. }
  132191. if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
  132192. parseEndTag(tagName);
  132193. }
  132194. }
  132195. var unary = isUnaryTag$$1(tagName) || !!unarySlash;
  132196. var l = match.attrs.length;
  132197. var attrs = new Array(l);
  132198. for (var i = 0; i < l; i++) {
  132199. var args = match.attrs[i];
  132200. var value = args[3] || args[4] || args[5] || '';
  132201. var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
  132202. ? options.shouldDecodeNewlinesForHref
  132203. : options.shouldDecodeNewlines;
  132204. attrs[i] = {
  132205. name: args[1],
  132206. value: decodeAttr(value, shouldDecodeNewlines)
  132207. };
  132208. if ( true && options.outputSourceRange) {
  132209. attrs[i].start = args.start + args[0].match(/^\s*/).length;
  132210. attrs[i].end = args.end;
  132211. }
  132212. }
  132213. if (!unary) {
  132214. stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs, start: match.start, end: match.end });
  132215. lastTag = tagName;
  132216. }
  132217. if (options.start) {
  132218. options.start(tagName, attrs, unary, match.start, match.end);
  132219. }
  132220. }
  132221. function parseEndTag (tagName, start, end) {
  132222. var pos, lowerCasedTagName;
  132223. if (start == null) { start = index; }
  132224. if (end == null) { end = index; }
  132225. // Find the closest opened tag of the same type
  132226. if (tagName) {
  132227. lowerCasedTagName = tagName.toLowerCase();
  132228. for (pos = stack.length - 1; pos >= 0; pos--) {
  132229. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  132230. break
  132231. }
  132232. }
  132233. } else {
  132234. // If no tag name is provided, clean shop
  132235. pos = 0;
  132236. }
  132237. if (pos >= 0) {
  132238. // Close all the open elements, up the stack
  132239. for (var i = stack.length - 1; i >= pos; i--) {
  132240. if ( true &&
  132241. (i > pos || !tagName) &&
  132242. options.warn
  132243. ) {
  132244. options.warn(
  132245. ("tag <" + (stack[i].tag) + "> has no matching end tag."),
  132246. { start: stack[i].start, end: stack[i].end }
  132247. );
  132248. }
  132249. if (options.end) {
  132250. options.end(stack[i].tag, start, end);
  132251. }
  132252. }
  132253. // Remove the open elements from the stack
  132254. stack.length = pos;
  132255. lastTag = pos && stack[pos - 1].tag;
  132256. } else if (lowerCasedTagName === 'br') {
  132257. if (options.start) {
  132258. options.start(tagName, [], true, start, end);
  132259. }
  132260. } else if (lowerCasedTagName === 'p') {
  132261. if (options.start) {
  132262. options.start(tagName, [], false, start, end);
  132263. }
  132264. if (options.end) {
  132265. options.end(tagName, start, end);
  132266. }
  132267. }
  132268. }
  132269. }
  132270. /* */
  132271. var onRE = /^@|^v-on:/;
  132272. var dirRE = /^v-|^@|^:|^#/;
  132273. var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
  132274. var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
  132275. var stripParensRE = /^\(|\)$/g;
  132276. var dynamicArgRE = /^\[.*\]$/;
  132277. var argRE = /:(.*)$/;
  132278. var bindRE = /^:|^\.|^v-bind:/;
  132279. var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
  132280. var slotRE = /^v-slot(:|$)|^#/;
  132281. var lineBreakRE = /[\r\n]/;
  132282. var whitespaceRE$1 = /\s+/g;
  132283. var invalidAttributeRE = /[\s"'<>\/=]/;
  132284. var decodeHTMLCached = cached(he.decode);
  132285. var emptySlotScopeToken = "_empty_";
  132286. // configurable state
  132287. var warn$2;
  132288. var delimiters;
  132289. var transforms;
  132290. var preTransforms;
  132291. var postTransforms;
  132292. var platformIsPreTag;
  132293. var platformMustUseProp;
  132294. var platformGetTagNamespace;
  132295. var maybeComponent;
  132296. function createASTElement (
  132297. tag,
  132298. attrs,
  132299. parent
  132300. ) {
  132301. return {
  132302. type: 1,
  132303. tag: tag,
  132304. attrsList: attrs,
  132305. attrsMap: makeAttrsMap(attrs),
  132306. rawAttrsMap: {},
  132307. parent: parent,
  132308. children: []
  132309. }
  132310. }
  132311. /**
  132312. * Convert HTML string to AST.
  132313. */
  132314. function parse (
  132315. template,
  132316. options
  132317. ) {
  132318. warn$2 = options.warn || baseWarn;
  132319. platformIsPreTag = options.isPreTag || no;
  132320. platformMustUseProp = options.mustUseProp || no;
  132321. platformGetTagNamespace = options.getTagNamespace || no;
  132322. var isReservedTag = options.isReservedTag || no;
  132323. maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };
  132324. transforms = pluckModuleFunction(options.modules, 'transformNode');
  132325. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  132326. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  132327. delimiters = options.delimiters;
  132328. var stack = [];
  132329. var preserveWhitespace = options.preserveWhitespace !== false;
  132330. var whitespaceOption = options.whitespace;
  132331. var root;
  132332. var currentParent;
  132333. var inVPre = false;
  132334. var inPre = false;
  132335. var warned = false;
  132336. function warnOnce (msg, range) {
  132337. if (!warned) {
  132338. warned = true;
  132339. warn$2(msg, range);
  132340. }
  132341. }
  132342. function closeElement (element) {
  132343. trimEndingWhitespace(element);
  132344. if (!inVPre && !element.processed) {
  132345. element = processElement(element, options);
  132346. }
  132347. // tree management
  132348. if (!stack.length && element !== root) {
  132349. // allow root elements with v-if, v-else-if and v-else
  132350. if (root.if && (element.elseif || element.else)) {
  132351. if (true) {
  132352. checkRootConstraints(element);
  132353. }
  132354. addIfCondition(root, {
  132355. exp: element.elseif,
  132356. block: element
  132357. });
  132358. } else if (true) {
  132359. warnOnce(
  132360. "Component template should contain exactly one root element. " +
  132361. "If you are using v-if on multiple elements, " +
  132362. "use v-else-if to chain them instead.",
  132363. { start: element.start }
  132364. );
  132365. }
  132366. }
  132367. if (currentParent && !element.forbidden) {
  132368. if (element.elseif || element.else) {
  132369. processIfConditions(element, currentParent);
  132370. } else {
  132371. if (element.slotScope) {
  132372. // scoped slot
  132373. // keep it in the children list so that v-else(-if) conditions can
  132374. // find it as the prev node.
  132375. var name = element.slotTarget || '"default"'
  132376. ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
  132377. }
  132378. currentParent.children.push(element);
  132379. element.parent = currentParent;
  132380. }
  132381. }
  132382. // final children cleanup
  132383. // filter out scoped slots
  132384. element.children = element.children.filter(function (c) { return !(c).slotScope; });
  132385. // remove trailing whitespace node again
  132386. trimEndingWhitespace(element);
  132387. // check pre state
  132388. if (element.pre) {
  132389. inVPre = false;
  132390. }
  132391. if (platformIsPreTag(element.tag)) {
  132392. inPre = false;
  132393. }
  132394. // apply post-transforms
  132395. for (var i = 0; i < postTransforms.length; i++) {
  132396. postTransforms[i](element, options);
  132397. }
  132398. }
  132399. function trimEndingWhitespace (el) {
  132400. // remove trailing whitespace node
  132401. if (!inPre) {
  132402. var lastNode;
  132403. while (
  132404. (lastNode = el.children[el.children.length - 1]) &&
  132405. lastNode.type === 3 &&
  132406. lastNode.text === ' '
  132407. ) {
  132408. el.children.pop();
  132409. }
  132410. }
  132411. }
  132412. function checkRootConstraints (el) {
  132413. if (el.tag === 'slot' || el.tag === 'template') {
  132414. warnOnce(
  132415. "Cannot use <" + (el.tag) + "> as component root element because it may " +
  132416. 'contain multiple nodes.',
  132417. { start: el.start }
  132418. );
  132419. }
  132420. if (el.attrsMap.hasOwnProperty('v-for')) {
  132421. warnOnce(
  132422. 'Cannot use v-for on stateful component root element because ' +
  132423. 'it renders multiple elements.',
  132424. el.rawAttrsMap['v-for']
  132425. );
  132426. }
  132427. }
  132428. parseHTML(template, {
  132429. warn: warn$2,
  132430. expectHTML: options.expectHTML,
  132431. isUnaryTag: options.isUnaryTag,
  132432. canBeLeftOpenTag: options.canBeLeftOpenTag,
  132433. shouldDecodeNewlines: options.shouldDecodeNewlines,
  132434. shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
  132435. shouldKeepComment: options.comments,
  132436. outputSourceRange: options.outputSourceRange,
  132437. start: function start (tag, attrs, unary, start$1, end) {
  132438. // check namespace.
  132439. // inherit parent ns if there is one
  132440. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  132441. // handle IE svg bug
  132442. /* istanbul ignore if */
  132443. if (isIE && ns === 'svg') {
  132444. attrs = guardIESVGBug(attrs);
  132445. }
  132446. var element = createASTElement(tag, attrs, currentParent);
  132447. if (ns) {
  132448. element.ns = ns;
  132449. }
  132450. if (true) {
  132451. if (options.outputSourceRange) {
  132452. element.start = start$1;
  132453. element.end = end;
  132454. element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
  132455. cumulated[attr.name] = attr;
  132456. return cumulated
  132457. }, {});
  132458. }
  132459. attrs.forEach(function (attr) {
  132460. if (invalidAttributeRE.test(attr.name)) {
  132461. warn$2(
  132462. "Invalid dynamic argument expression: attribute names cannot contain " +
  132463. "spaces, quotes, <, >, / or =.",
  132464. {
  132465. start: attr.start + attr.name.indexOf("["),
  132466. end: attr.start + attr.name.length
  132467. }
  132468. );
  132469. }
  132470. });
  132471. }
  132472. if (isForbiddenTag(element) && !isServerRendering()) {
  132473. element.forbidden = true;
  132474. true && warn$2(
  132475. 'Templates should only be responsible for mapping the state to the ' +
  132476. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  132477. "<" + tag + ">" + ', as they will not be parsed.',
  132478. { start: element.start }
  132479. );
  132480. }
  132481. // apply pre-transforms
  132482. for (var i = 0; i < preTransforms.length; i++) {
  132483. element = preTransforms[i](element, options) || element;
  132484. }
  132485. if (!inVPre) {
  132486. processPre(element);
  132487. if (element.pre) {
  132488. inVPre = true;
  132489. }
  132490. }
  132491. if (platformIsPreTag(element.tag)) {
  132492. inPre = true;
  132493. }
  132494. if (inVPre) {
  132495. processRawAttrs(element);
  132496. } else if (!element.processed) {
  132497. // structural directives
  132498. processFor(element);
  132499. processIf(element);
  132500. processOnce(element);
  132501. }
  132502. if (!root) {
  132503. root = element;
  132504. if (true) {
  132505. checkRootConstraints(root);
  132506. }
  132507. }
  132508. if (!unary) {
  132509. currentParent = element;
  132510. stack.push(element);
  132511. } else {
  132512. closeElement(element);
  132513. }
  132514. },
  132515. end: function end (tag, start, end$1) {
  132516. var element = stack[stack.length - 1];
  132517. // pop stack
  132518. stack.length -= 1;
  132519. currentParent = stack[stack.length - 1];
  132520. if ( true && options.outputSourceRange) {
  132521. element.end = end$1;
  132522. }
  132523. closeElement(element);
  132524. },
  132525. chars: function chars (text, start, end) {
  132526. if (!currentParent) {
  132527. if (true) {
  132528. if (text === template) {
  132529. warnOnce(
  132530. 'Component template requires a root element, rather than just text.',
  132531. { start: start }
  132532. );
  132533. } else if ((text = text.trim())) {
  132534. warnOnce(
  132535. ("text \"" + text + "\" outside root element will be ignored."),
  132536. { start: start }
  132537. );
  132538. }
  132539. }
  132540. return
  132541. }
  132542. // IE textarea placeholder bug
  132543. /* istanbul ignore if */
  132544. if (isIE &&
  132545. currentParent.tag === 'textarea' &&
  132546. currentParent.attrsMap.placeholder === text
  132547. ) {
  132548. return
  132549. }
  132550. var children = currentParent.children;
  132551. if (inPre || text.trim()) {
  132552. text = isTextTag(currentParent) ? text : decodeHTMLCached(text);
  132553. } else if (!children.length) {
  132554. // remove the whitespace-only node right after an opening tag
  132555. text = '';
  132556. } else if (whitespaceOption) {
  132557. if (whitespaceOption === 'condense') {
  132558. // in condense mode, remove the whitespace node if it contains
  132559. // line break, otherwise condense to a single space
  132560. text = lineBreakRE.test(text) ? '' : ' ';
  132561. } else {
  132562. text = ' ';
  132563. }
  132564. } else {
  132565. text = preserveWhitespace ? ' ' : '';
  132566. }
  132567. if (text) {
  132568. if (!inPre && whitespaceOption === 'condense') {
  132569. // condense consecutive whitespaces into single space
  132570. text = text.replace(whitespaceRE$1, ' ');
  132571. }
  132572. var res;
  132573. var child;
  132574. if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
  132575. child = {
  132576. type: 2,
  132577. expression: res.expression,
  132578. tokens: res.tokens,
  132579. text: text
  132580. };
  132581. } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
  132582. child = {
  132583. type: 3,
  132584. text: text
  132585. };
  132586. }
  132587. if (child) {
  132588. if ( true && options.outputSourceRange) {
  132589. child.start = start;
  132590. child.end = end;
  132591. }
  132592. children.push(child);
  132593. }
  132594. }
  132595. },
  132596. comment: function comment (text, start, end) {
  132597. // adding anything as a sibling to the root node is forbidden
  132598. // comments should still be allowed, but ignored
  132599. if (currentParent) {
  132600. var child = {
  132601. type: 3,
  132602. text: text,
  132603. isComment: true
  132604. };
  132605. if ( true && options.outputSourceRange) {
  132606. child.start = start;
  132607. child.end = end;
  132608. }
  132609. currentParent.children.push(child);
  132610. }
  132611. }
  132612. });
  132613. return root
  132614. }
  132615. function processPre (el) {
  132616. if (getAndRemoveAttr(el, 'v-pre') != null) {
  132617. el.pre = true;
  132618. }
  132619. }
  132620. function processRawAttrs (el) {
  132621. var list = el.attrsList;
  132622. var len = list.length;
  132623. if (len) {
  132624. var attrs = el.attrs = new Array(len);
  132625. for (var i = 0; i < len; i++) {
  132626. attrs[i] = {
  132627. name: list[i].name,
  132628. value: JSON.stringify(list[i].value)
  132629. };
  132630. if (list[i].start != null) {
  132631. attrs[i].start = list[i].start;
  132632. attrs[i].end = list[i].end;
  132633. }
  132634. }
  132635. } else if (!el.pre) {
  132636. // non root node in pre blocks with no attributes
  132637. el.plain = true;
  132638. }
  132639. }
  132640. function processElement (
  132641. element,
  132642. options
  132643. ) {
  132644. processKey(element);
  132645. // determine whether this is a plain element after
  132646. // removing structural attributes
  132647. element.plain = (
  132648. !element.key &&
  132649. !element.scopedSlots &&
  132650. !element.attrsList.length
  132651. );
  132652. processRef(element);
  132653. processSlotContent(element);
  132654. processSlotOutlet(element);
  132655. processComponent(element);
  132656. for (var i = 0; i < transforms.length; i++) {
  132657. element = transforms[i](element, options) || element;
  132658. }
  132659. processAttrs(element);
  132660. return element
  132661. }
  132662. function processKey (el) {
  132663. var exp = getBindingAttr(el, 'key');
  132664. if (exp) {
  132665. if (true) {
  132666. if (el.tag === 'template') {
  132667. warn$2(
  132668. "<template> cannot be keyed. Place the key on real elements instead.",
  132669. getRawBindingAttr(el, 'key')
  132670. );
  132671. }
  132672. if (el.for) {
  132673. var iterator = el.iterator2 || el.iterator1;
  132674. var parent = el.parent;
  132675. if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
  132676. warn$2(
  132677. "Do not use v-for index as key on <transition-group> children, " +
  132678. "this is the same as not using keys.",
  132679. getRawBindingAttr(el, 'key'),
  132680. true /* tip */
  132681. );
  132682. }
  132683. }
  132684. }
  132685. el.key = exp;
  132686. }
  132687. }
  132688. function processRef (el) {
  132689. var ref = getBindingAttr(el, 'ref');
  132690. if (ref) {
  132691. el.ref = ref;
  132692. el.refInFor = checkInFor(el);
  132693. }
  132694. }
  132695. function processFor (el) {
  132696. var exp;
  132697. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  132698. var res = parseFor(exp);
  132699. if (res) {
  132700. extend(el, res);
  132701. } else if (true) {
  132702. warn$2(
  132703. ("Invalid v-for expression: " + exp),
  132704. el.rawAttrsMap['v-for']
  132705. );
  132706. }
  132707. }
  132708. }
  132709. function parseFor (exp) {
  132710. var inMatch = exp.match(forAliasRE);
  132711. if (!inMatch) { return }
  132712. var res = {};
  132713. res.for = inMatch[2].trim();
  132714. var alias = inMatch[1].trim().replace(stripParensRE, '');
  132715. var iteratorMatch = alias.match(forIteratorRE);
  132716. if (iteratorMatch) {
  132717. res.alias = alias.replace(forIteratorRE, '').trim();
  132718. res.iterator1 = iteratorMatch[1].trim();
  132719. if (iteratorMatch[2]) {
  132720. res.iterator2 = iteratorMatch[2].trim();
  132721. }
  132722. } else {
  132723. res.alias = alias;
  132724. }
  132725. return res
  132726. }
  132727. function processIf (el) {
  132728. var exp = getAndRemoveAttr(el, 'v-if');
  132729. if (exp) {
  132730. el.if = exp;
  132731. addIfCondition(el, {
  132732. exp: exp,
  132733. block: el
  132734. });
  132735. } else {
  132736. if (getAndRemoveAttr(el, 'v-else') != null) {
  132737. el.else = true;
  132738. }
  132739. var elseif = getAndRemoveAttr(el, 'v-else-if');
  132740. if (elseif) {
  132741. el.elseif = elseif;
  132742. }
  132743. }
  132744. }
  132745. function processIfConditions (el, parent) {
  132746. var prev = findPrevElement(parent.children);
  132747. if (prev && prev.if) {
  132748. addIfCondition(prev, {
  132749. exp: el.elseif,
  132750. block: el
  132751. });
  132752. } else if (true) {
  132753. warn$2(
  132754. "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
  132755. "used on element <" + (el.tag) + "> without corresponding v-if.",
  132756. el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
  132757. );
  132758. }
  132759. }
  132760. function findPrevElement (children) {
  132761. var i = children.length;
  132762. while (i--) {
  132763. if (children[i].type === 1) {
  132764. return children[i]
  132765. } else {
  132766. if ( true && children[i].text !== ' ') {
  132767. warn$2(
  132768. "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
  132769. "will be ignored.",
  132770. children[i]
  132771. );
  132772. }
  132773. children.pop();
  132774. }
  132775. }
  132776. }
  132777. function addIfCondition (el, condition) {
  132778. if (!el.ifConditions) {
  132779. el.ifConditions = [];
  132780. }
  132781. el.ifConditions.push(condition);
  132782. }
  132783. function processOnce (el) {
  132784. var once$$1 = getAndRemoveAttr(el, 'v-once');
  132785. if (once$$1 != null) {
  132786. el.once = true;
  132787. }
  132788. }
  132789. // handle content being passed to a component as slot,
  132790. // e.g. <template slot="xxx">, <div slot-scope="xxx">
  132791. function processSlotContent (el) {
  132792. var slotScope;
  132793. if (el.tag === 'template') {
  132794. slotScope = getAndRemoveAttr(el, 'scope');
  132795. /* istanbul ignore if */
  132796. if ( true && slotScope) {
  132797. warn$2(
  132798. "the \"scope\" attribute for scoped slots have been deprecated and " +
  132799. "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
  132800. "can also be used on plain elements in addition to <template> to " +
  132801. "denote scoped slots.",
  132802. el.rawAttrsMap['scope'],
  132803. true
  132804. );
  132805. }
  132806. el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
  132807. } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
  132808. /* istanbul ignore if */
  132809. if ( true && el.attrsMap['v-for']) {
  132810. warn$2(
  132811. "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
  132812. "(v-for takes higher priority). Use a wrapper <template> for the " +
  132813. "scoped slot to make it clearer.",
  132814. el.rawAttrsMap['slot-scope'],
  132815. true
  132816. );
  132817. }
  132818. el.slotScope = slotScope;
  132819. }
  132820. // slot="xxx"
  132821. var slotTarget = getBindingAttr(el, 'slot');
  132822. if (slotTarget) {
  132823. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  132824. el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);
  132825. // preserve slot as an attribute for native shadow DOM compat
  132826. // only for non-scoped slots.
  132827. if (el.tag !== 'template' && !el.slotScope) {
  132828. addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));
  132829. }
  132830. }
  132831. // 2.6 v-slot syntax
  132832. {
  132833. if (el.tag === 'template') {
  132834. // v-slot on <template>
  132835. var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
  132836. if (slotBinding) {
  132837. if (true) {
  132838. if (el.slotTarget || el.slotScope) {
  132839. warn$2(
  132840. "Unexpected mixed usage of different slot syntaxes.",
  132841. el
  132842. );
  132843. }
  132844. if (el.parent && !maybeComponent(el.parent)) {
  132845. warn$2(
  132846. "<template v-slot> can only appear at the root level inside " +
  132847. "the receiving component",
  132848. el
  132849. );
  132850. }
  132851. }
  132852. var ref = getSlotName(slotBinding);
  132853. var name = ref.name;
  132854. var dynamic = ref.dynamic;
  132855. el.slotTarget = name;
  132856. el.slotTargetDynamic = dynamic;
  132857. el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
  132858. }
  132859. } else {
  132860. // v-slot on component, denotes default slot
  132861. var slotBinding$1 = getAndRemoveAttrByRegex(el, slotRE);
  132862. if (slotBinding$1) {
  132863. if (true) {
  132864. if (!maybeComponent(el)) {
  132865. warn$2(
  132866. "v-slot can only be used on components or <template>.",
  132867. slotBinding$1
  132868. );
  132869. }
  132870. if (el.slotScope || el.slotTarget) {
  132871. warn$2(
  132872. "Unexpected mixed usage of different slot syntaxes.",
  132873. el
  132874. );
  132875. }
  132876. if (el.scopedSlots) {
  132877. warn$2(
  132878. "To avoid scope ambiguity, the default slot should also use " +
  132879. "<template> syntax when there are other named slots.",
  132880. slotBinding$1
  132881. );
  132882. }
  132883. }
  132884. // add the component's children to its default slot
  132885. var slots = el.scopedSlots || (el.scopedSlots = {});
  132886. var ref$1 = getSlotName(slotBinding$1);
  132887. var name$1 = ref$1.name;
  132888. var dynamic$1 = ref$1.dynamic;
  132889. var slotContainer = slots[name$1] = createASTElement('template', [], el);
  132890. slotContainer.slotTarget = name$1;
  132891. slotContainer.slotTargetDynamic = dynamic$1;
  132892. slotContainer.children = el.children.filter(function (c) {
  132893. if (!c.slotScope) {
  132894. c.parent = slotContainer;
  132895. return true
  132896. }
  132897. });
  132898. slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken;
  132899. // remove children as they are returned from scopedSlots now
  132900. el.children = [];
  132901. // mark el non-plain so data gets generated
  132902. el.plain = false;
  132903. }
  132904. }
  132905. }
  132906. }
  132907. function getSlotName (binding) {
  132908. var name = binding.name.replace(slotRE, '');
  132909. if (!name) {
  132910. if (binding.name[0] !== '#') {
  132911. name = 'default';
  132912. } else if (true) {
  132913. warn$2(
  132914. "v-slot shorthand syntax requires a slot name.",
  132915. binding
  132916. );
  132917. }
  132918. }
  132919. return dynamicArgRE.test(name)
  132920. // dynamic [name]
  132921. ? { name: name.slice(1, -1), dynamic: true }
  132922. // static name
  132923. : { name: ("\"" + name + "\""), dynamic: false }
  132924. }
  132925. // handle <slot/> outlets
  132926. function processSlotOutlet (el) {
  132927. if (el.tag === 'slot') {
  132928. el.slotName = getBindingAttr(el, 'name');
  132929. if ( true && el.key) {
  132930. warn$2(
  132931. "`key` does not work on <slot> because slots are abstract outlets " +
  132932. "and can possibly expand into multiple elements. " +
  132933. "Use the key on a wrapping element instead.",
  132934. getRawBindingAttr(el, 'key')
  132935. );
  132936. }
  132937. }
  132938. }
  132939. function processComponent (el) {
  132940. var binding;
  132941. if ((binding = getBindingAttr(el, 'is'))) {
  132942. el.component = binding;
  132943. }
  132944. if (getAndRemoveAttr(el, 'inline-template') != null) {
  132945. el.inlineTemplate = true;
  132946. }
  132947. }
  132948. function processAttrs (el) {
  132949. var list = el.attrsList;
  132950. var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
  132951. for (i = 0, l = list.length; i < l; i++) {
  132952. name = rawName = list[i].name;
  132953. value = list[i].value;
  132954. if (dirRE.test(name)) {
  132955. // mark element as dynamic
  132956. el.hasBindings = true;
  132957. // modifiers
  132958. modifiers = parseModifiers(name.replace(dirRE, ''));
  132959. // support .foo shorthand syntax for the .prop modifier
  132960. if (modifiers) {
  132961. name = name.replace(modifierRE, '');
  132962. }
  132963. if (bindRE.test(name)) { // v-bind
  132964. name = name.replace(bindRE, '');
  132965. value = parseFilters(value);
  132966. isDynamic = dynamicArgRE.test(name);
  132967. if (isDynamic) {
  132968. name = name.slice(1, -1);
  132969. }
  132970. if (
  132971. true &&
  132972. value.trim().length === 0
  132973. ) {
  132974. warn$2(
  132975. ("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"")
  132976. );
  132977. }
  132978. if (modifiers) {
  132979. if (modifiers.prop && !isDynamic) {
  132980. name = camelize(name);
  132981. if (name === 'innerHtml') { name = 'innerHTML'; }
  132982. }
  132983. if (modifiers.camel && !isDynamic) {
  132984. name = camelize(name);
  132985. }
  132986. if (modifiers.sync) {
  132987. syncGen = genAssignmentCode(value, "$event");
  132988. if (!isDynamic) {
  132989. addHandler(
  132990. el,
  132991. ("update:" + (camelize(name))),
  132992. syncGen,
  132993. null,
  132994. false,
  132995. warn$2,
  132996. list[i]
  132997. );
  132998. if (hyphenate(name) !== camelize(name)) {
  132999. addHandler(
  133000. el,
  133001. ("update:" + (hyphenate(name))),
  133002. syncGen,
  133003. null,
  133004. false,
  133005. warn$2,
  133006. list[i]
  133007. );
  133008. }
  133009. } else {
  133010. // handler w/ dynamic event name
  133011. addHandler(
  133012. el,
  133013. ("\"update:\"+(" + name + ")"),
  133014. syncGen,
  133015. null,
  133016. false,
  133017. warn$2,
  133018. list[i],
  133019. true // dynamic
  133020. );
  133021. }
  133022. }
  133023. }
  133024. if ((modifiers && modifiers.prop) || (
  133025. !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
  133026. )) {
  133027. addProp(el, name, value, list[i], isDynamic);
  133028. } else {
  133029. addAttr(el, name, value, list[i], isDynamic);
  133030. }
  133031. } else if (onRE.test(name)) { // v-on
  133032. name = name.replace(onRE, '');
  133033. isDynamic = dynamicArgRE.test(name);
  133034. if (isDynamic) {
  133035. name = name.slice(1, -1);
  133036. }
  133037. addHandler(el, name, value, modifiers, false, warn$2, list[i], isDynamic);
  133038. } else { // normal directives
  133039. name = name.replace(dirRE, '');
  133040. // parse arg
  133041. var argMatch = name.match(argRE);
  133042. var arg = argMatch && argMatch[1];
  133043. isDynamic = false;
  133044. if (arg) {
  133045. name = name.slice(0, -(arg.length + 1));
  133046. if (dynamicArgRE.test(arg)) {
  133047. arg = arg.slice(1, -1);
  133048. isDynamic = true;
  133049. }
  133050. }
  133051. addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);
  133052. if ( true && name === 'model') {
  133053. checkForAliasModel(el, value);
  133054. }
  133055. }
  133056. } else {
  133057. // literal attribute
  133058. if (true) {
  133059. var res = parseText(value, delimiters);
  133060. if (res) {
  133061. warn$2(
  133062. name + "=\"" + value + "\": " +
  133063. 'Interpolation inside attributes has been removed. ' +
  133064. 'Use v-bind or the colon shorthand instead. For example, ' +
  133065. 'instead of <div id="{{ val }}">, use <div :id="val">.',
  133066. list[i]
  133067. );
  133068. }
  133069. }
  133070. addAttr(el, name, JSON.stringify(value), list[i]);
  133071. // #6887 firefox doesn't update muted state if set via attribute
  133072. // even immediately after element creation
  133073. if (!el.component &&
  133074. name === 'muted' &&
  133075. platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  133076. addProp(el, name, 'true', list[i]);
  133077. }
  133078. }
  133079. }
  133080. }
  133081. function checkInFor (el) {
  133082. var parent = el;
  133083. while (parent) {
  133084. if (parent.for !== undefined) {
  133085. return true
  133086. }
  133087. parent = parent.parent;
  133088. }
  133089. return false
  133090. }
  133091. function parseModifiers (name) {
  133092. var match = name.match(modifierRE);
  133093. if (match) {
  133094. var ret = {};
  133095. match.forEach(function (m) { ret[m.slice(1)] = true; });
  133096. return ret
  133097. }
  133098. }
  133099. function makeAttrsMap (attrs) {
  133100. var map = {};
  133101. for (var i = 0, l = attrs.length; i < l; i++) {
  133102. if (
  133103. true &&
  133104. map[attrs[i].name] && !isIE && !isEdge
  133105. ) {
  133106. warn$2('duplicate attribute: ' + attrs[i].name, attrs[i]);
  133107. }
  133108. map[attrs[i].name] = attrs[i].value;
  133109. }
  133110. return map
  133111. }
  133112. // for script (e.g. type="x/template") or style, do not decode content
  133113. function isTextTag (el) {
  133114. return el.tag === 'script' || el.tag === 'style'
  133115. }
  133116. function isForbiddenTag (el) {
  133117. return (
  133118. el.tag === 'style' ||
  133119. (el.tag === 'script' && (
  133120. !el.attrsMap.type ||
  133121. el.attrsMap.type === 'text/javascript'
  133122. ))
  133123. )
  133124. }
  133125. var ieNSBug = /^xmlns:NS\d+/;
  133126. var ieNSPrefix = /^NS\d+:/;
  133127. /* istanbul ignore next */
  133128. function guardIESVGBug (attrs) {
  133129. var res = [];
  133130. for (var i = 0; i < attrs.length; i++) {
  133131. var attr = attrs[i];
  133132. if (!ieNSBug.test(attr.name)) {
  133133. attr.name = attr.name.replace(ieNSPrefix, '');
  133134. res.push(attr);
  133135. }
  133136. }
  133137. return res
  133138. }
  133139. function checkForAliasModel (el, value) {
  133140. var _el = el;
  133141. while (_el) {
  133142. if (_el.for && _el.alias === value) {
  133143. warn$2(
  133144. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  133145. "You are binding v-model directly to a v-for iteration alias. " +
  133146. "This will not be able to modify the v-for source array because " +
  133147. "writing to the alias is like modifying a function local variable. " +
  133148. "Consider using an array of objects and use v-model on an object property instead.",
  133149. el.rawAttrsMap['v-model']
  133150. );
  133151. }
  133152. _el = _el.parent;
  133153. }
  133154. }
  133155. /* */
  133156. function preTransformNode (el, options) {
  133157. if (el.tag === 'input') {
  133158. var map = el.attrsMap;
  133159. if (!map['v-model']) {
  133160. return
  133161. }
  133162. var typeBinding;
  133163. if (map[':type'] || map['v-bind:type']) {
  133164. typeBinding = getBindingAttr(el, 'type');
  133165. }
  133166. if (!map.type && !typeBinding && map['v-bind']) {
  133167. typeBinding = "(" + (map['v-bind']) + ").type";
  133168. }
  133169. if (typeBinding) {
  133170. var ifCondition = getAndRemoveAttr(el, 'v-if', true);
  133171. var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
  133172. var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
  133173. var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
  133174. // 1. checkbox
  133175. var branch0 = cloneASTElement(el);
  133176. // process for on the main node
  133177. processFor(branch0);
  133178. addRawAttr(branch0, 'type', 'checkbox');
  133179. processElement(branch0, options);
  133180. branch0.processed = true; // prevent it from double-processed
  133181. branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
  133182. addIfCondition(branch0, {
  133183. exp: branch0.if,
  133184. block: branch0
  133185. });
  133186. // 2. add radio else-if condition
  133187. var branch1 = cloneASTElement(el);
  133188. getAndRemoveAttr(branch1, 'v-for', true);
  133189. addRawAttr(branch1, 'type', 'radio');
  133190. processElement(branch1, options);
  133191. addIfCondition(branch0, {
  133192. exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
  133193. block: branch1
  133194. });
  133195. // 3. other
  133196. var branch2 = cloneASTElement(el);
  133197. getAndRemoveAttr(branch2, 'v-for', true);
  133198. addRawAttr(branch2, ':type', typeBinding);
  133199. processElement(branch2, options);
  133200. addIfCondition(branch0, {
  133201. exp: ifCondition,
  133202. block: branch2
  133203. });
  133204. if (hasElse) {
  133205. branch0.else = true;
  133206. } else if (elseIfCondition) {
  133207. branch0.elseif = elseIfCondition;
  133208. }
  133209. return branch0
  133210. }
  133211. }
  133212. }
  133213. function cloneASTElement (el) {
  133214. return createASTElement(el.tag, el.attrsList.slice(), el.parent)
  133215. }
  133216. var model$1 = {
  133217. preTransformNode: preTransformNode
  133218. };
  133219. var modules$1 = [
  133220. klass$1,
  133221. style$1,
  133222. model$1
  133223. ];
  133224. /* */
  133225. function text (el, dir) {
  133226. if (dir.value) {
  133227. addProp(el, 'textContent', ("_s(" + (dir.value) + ")"), dir);
  133228. }
  133229. }
  133230. /* */
  133231. function html (el, dir) {
  133232. if (dir.value) {
  133233. addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"), dir);
  133234. }
  133235. }
  133236. var directives$1 = {
  133237. model: model,
  133238. text: text,
  133239. html: html
  133240. };
  133241. /* */
  133242. var baseOptions = {
  133243. expectHTML: true,
  133244. modules: modules$1,
  133245. directives: directives$1,
  133246. isPreTag: isPreTag,
  133247. isUnaryTag: isUnaryTag,
  133248. mustUseProp: mustUseProp,
  133249. canBeLeftOpenTag: canBeLeftOpenTag,
  133250. isReservedTag: isReservedTag,
  133251. getTagNamespace: getTagNamespace,
  133252. staticKeys: genStaticKeys(modules$1)
  133253. };
  133254. /* */
  133255. var isStaticKey;
  133256. var isPlatformReservedTag;
  133257. var genStaticKeysCached = cached(genStaticKeys$1);
  133258. /**
  133259. * Goal of the optimizer: walk the generated template AST tree
  133260. * and detect sub-trees that are purely static, i.e. parts of
  133261. * the DOM that never needs to change.
  133262. *
  133263. * Once we detect these sub-trees, we can:
  133264. *
  133265. * 1. Hoist them into constants, so that we no longer need to
  133266. * create fresh nodes for them on each re-render;
  133267. * 2. Completely skip them in the patching process.
  133268. */
  133269. function optimize (root, options) {
  133270. if (!root) { return }
  133271. isStaticKey = genStaticKeysCached(options.staticKeys || '');
  133272. isPlatformReservedTag = options.isReservedTag || no;
  133273. // first pass: mark all non-static nodes.
  133274. markStatic$1(root);
  133275. // second pass: mark static roots.
  133276. markStaticRoots(root, false);
  133277. }
  133278. function genStaticKeys$1 (keys) {
  133279. return makeMap(
  133280. 'type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +
  133281. (keys ? ',' + keys : '')
  133282. )
  133283. }
  133284. function markStatic$1 (node) {
  133285. node.static = isStatic(node);
  133286. if (node.type === 1) {
  133287. // do not make component slot content static. this avoids
  133288. // 1. components not able to mutate slot nodes
  133289. // 2. static slot content fails for hot-reloading
  133290. if (
  133291. !isPlatformReservedTag(node.tag) &&
  133292. node.tag !== 'slot' &&
  133293. node.attrsMap['inline-template'] == null
  133294. ) {
  133295. return
  133296. }
  133297. for (var i = 0, l = node.children.length; i < l; i++) {
  133298. var child = node.children[i];
  133299. markStatic$1(child);
  133300. if (!child.static) {
  133301. node.static = false;
  133302. }
  133303. }
  133304. if (node.ifConditions) {
  133305. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  133306. var block = node.ifConditions[i$1].block;
  133307. markStatic$1(block);
  133308. if (!block.static) {
  133309. node.static = false;
  133310. }
  133311. }
  133312. }
  133313. }
  133314. }
  133315. function markStaticRoots (node, isInFor) {
  133316. if (node.type === 1) {
  133317. if (node.static || node.once) {
  133318. node.staticInFor = isInFor;
  133319. }
  133320. // For a node to qualify as a static root, it should have children that
  133321. // are not just static text. Otherwise the cost of hoisting out will
  133322. // outweigh the benefits and it's better off to just always render it fresh.
  133323. if (node.static && node.children.length && !(
  133324. node.children.length === 1 &&
  133325. node.children[0].type === 3
  133326. )) {
  133327. node.staticRoot = true;
  133328. return
  133329. } else {
  133330. node.staticRoot = false;
  133331. }
  133332. if (node.children) {
  133333. for (var i = 0, l = node.children.length; i < l; i++) {
  133334. markStaticRoots(node.children[i], isInFor || !!node.for);
  133335. }
  133336. }
  133337. if (node.ifConditions) {
  133338. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  133339. markStaticRoots(node.ifConditions[i$1].block, isInFor);
  133340. }
  133341. }
  133342. }
  133343. }
  133344. function isStatic (node) {
  133345. if (node.type === 2) { // expression
  133346. return false
  133347. }
  133348. if (node.type === 3) { // text
  133349. return true
  133350. }
  133351. return !!(node.pre || (
  133352. !node.hasBindings && // no dynamic bindings
  133353. !node.if && !node.for && // not v-if or v-for or v-else
  133354. !isBuiltInTag(node.tag) && // not a built-in
  133355. isPlatformReservedTag(node.tag) && // not a component
  133356. !isDirectChildOfTemplateFor(node) &&
  133357. Object.keys(node).every(isStaticKey)
  133358. ))
  133359. }
  133360. function isDirectChildOfTemplateFor (node) {
  133361. while (node.parent) {
  133362. node = node.parent;
  133363. if (node.tag !== 'template') {
  133364. return false
  133365. }
  133366. if (node.for) {
  133367. return true
  133368. }
  133369. }
  133370. return false
  133371. }
  133372. /* */
  133373. var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
  133374. var fnInvokeRE = /\([^)]*?\);*$/;
  133375. var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
  133376. // KeyboardEvent.keyCode aliases
  133377. var keyCodes = {
  133378. esc: 27,
  133379. tab: 9,
  133380. enter: 13,
  133381. space: 32,
  133382. up: 38,
  133383. left: 37,
  133384. right: 39,
  133385. down: 40,
  133386. 'delete': [8, 46]
  133387. };
  133388. // KeyboardEvent.key aliases
  133389. var keyNames = {
  133390. // #7880: IE11 and Edge use `Esc` for Escape key name.
  133391. esc: ['Esc', 'Escape'],
  133392. tab: 'Tab',
  133393. enter: 'Enter',
  133394. // #9112: IE11 uses `Spacebar` for Space key name.
  133395. space: [' ', 'Spacebar'],
  133396. // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
  133397. up: ['Up', 'ArrowUp'],
  133398. left: ['Left', 'ArrowLeft'],
  133399. right: ['Right', 'ArrowRight'],
  133400. down: ['Down', 'ArrowDown'],
  133401. // #9112: IE11 uses `Del` for Delete key name.
  133402. 'delete': ['Backspace', 'Delete', 'Del']
  133403. };
  133404. // #4868: modifiers that prevent the execution of the listener
  133405. // need to explicitly return null so that we can determine whether to remove
  133406. // the listener for .once
  133407. var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
  133408. var modifierCode = {
  133409. stop: '$event.stopPropagation();',
  133410. prevent: '$event.preventDefault();',
  133411. self: genGuard("$event.target !== $event.currentTarget"),
  133412. ctrl: genGuard("!$event.ctrlKey"),
  133413. shift: genGuard("!$event.shiftKey"),
  133414. alt: genGuard("!$event.altKey"),
  133415. meta: genGuard("!$event.metaKey"),
  133416. left: genGuard("'button' in $event && $event.button !== 0"),
  133417. middle: genGuard("'button' in $event && $event.button !== 1"),
  133418. right: genGuard("'button' in $event && $event.button !== 2")
  133419. };
  133420. function genHandlers (
  133421. events,
  133422. isNative
  133423. ) {
  133424. var prefix = isNative ? 'nativeOn:' : 'on:';
  133425. var staticHandlers = "";
  133426. var dynamicHandlers = "";
  133427. for (var name in events) {
  133428. var handlerCode = genHandler(events[name]);
  133429. if (events[name] && events[name].dynamic) {
  133430. dynamicHandlers += name + "," + handlerCode + ",";
  133431. } else {
  133432. staticHandlers += "\"" + name + "\":" + handlerCode + ",";
  133433. }
  133434. }
  133435. staticHandlers = "{" + (staticHandlers.slice(0, -1)) + "}";
  133436. if (dynamicHandlers) {
  133437. return prefix + "_d(" + staticHandlers + ",[" + (dynamicHandlers.slice(0, -1)) + "])"
  133438. } else {
  133439. return prefix + staticHandlers
  133440. }
  133441. }
  133442. function genHandler (handler) {
  133443. if (!handler) {
  133444. return 'function(){}'
  133445. }
  133446. if (Array.isArray(handler)) {
  133447. return ("[" + (handler.map(function (handler) { return genHandler(handler); }).join(',')) + "]")
  133448. }
  133449. var isMethodPath = simplePathRE.test(handler.value);
  133450. var isFunctionExpression = fnExpRE.test(handler.value);
  133451. var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));
  133452. if (!handler.modifiers) {
  133453. if (isMethodPath || isFunctionExpression) {
  133454. return handler.value
  133455. }
  133456. return ("function($event){" + (isFunctionInvocation ? ("return " + (handler.value)) : handler.value) + "}") // inline statement
  133457. } else {
  133458. var code = '';
  133459. var genModifierCode = '';
  133460. var keys = [];
  133461. for (var key in handler.modifiers) {
  133462. if (modifierCode[key]) {
  133463. genModifierCode += modifierCode[key];
  133464. // left/right
  133465. if (keyCodes[key]) {
  133466. keys.push(key);
  133467. }
  133468. } else if (key === 'exact') {
  133469. var modifiers = (handler.modifiers);
  133470. genModifierCode += genGuard(
  133471. ['ctrl', 'shift', 'alt', 'meta']
  133472. .filter(function (keyModifier) { return !modifiers[keyModifier]; })
  133473. .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
  133474. .join('||')
  133475. );
  133476. } else {
  133477. keys.push(key);
  133478. }
  133479. }
  133480. if (keys.length) {
  133481. code += genKeyFilter(keys);
  133482. }
  133483. // Make sure modifiers like prevent and stop get executed after key filtering
  133484. if (genModifierCode) {
  133485. code += genModifierCode;
  133486. }
  133487. var handlerCode = isMethodPath
  133488. ? ("return " + (handler.value) + "($event)")
  133489. : isFunctionExpression
  133490. ? ("return (" + (handler.value) + ")($event)")
  133491. : isFunctionInvocation
  133492. ? ("return " + (handler.value))
  133493. : handler.value;
  133494. return ("function($event){" + code + handlerCode + "}")
  133495. }
  133496. }
  133497. function genKeyFilter (keys) {
  133498. return (
  133499. // make sure the key filters only apply to KeyboardEvents
  133500. // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
  133501. // key events that do not have keyCode property...
  133502. "if(!$event.type.indexOf('key')&&" +
  133503. (keys.map(genFilterCode).join('&&')) + ")return null;"
  133504. )
  133505. }
  133506. function genFilterCode (key) {
  133507. var keyVal = parseInt(key, 10);
  133508. if (keyVal) {
  133509. return ("$event.keyCode!==" + keyVal)
  133510. }
  133511. var keyCode = keyCodes[key];
  133512. var keyName = keyNames[key];
  133513. return (
  133514. "_k($event.keyCode," +
  133515. (JSON.stringify(key)) + "," +
  133516. (JSON.stringify(keyCode)) + "," +
  133517. "$event.key," +
  133518. "" + (JSON.stringify(keyName)) +
  133519. ")"
  133520. )
  133521. }
  133522. /* */
  133523. function on (el, dir) {
  133524. if ( true && dir.modifiers) {
  133525. warn("v-on without argument does not support modifiers.");
  133526. }
  133527. el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
  133528. }
  133529. /* */
  133530. function bind$1 (el, dir) {
  133531. el.wrapData = function (code) {
  133532. return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
  133533. };
  133534. }
  133535. /* */
  133536. var baseDirectives = {
  133537. on: on,
  133538. bind: bind$1,
  133539. cloak: noop
  133540. };
  133541. /* */
  133542. var CodegenState = function CodegenState (options) {
  133543. this.options = options;
  133544. this.warn = options.warn || baseWarn;
  133545. this.transforms = pluckModuleFunction(options.modules, 'transformCode');
  133546. this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
  133547. this.directives = extend(extend({}, baseDirectives), options.directives);
  133548. var isReservedTag = options.isReservedTag || no;
  133549. this.maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };
  133550. this.onceId = 0;
  133551. this.staticRenderFns = [];
  133552. this.pre = false;
  133553. };
  133554. function generate (
  133555. ast,
  133556. options
  133557. ) {
  133558. var state = new CodegenState(options);
  133559. var code = ast ? genElement(ast, state) : '_c("div")';
  133560. return {
  133561. render: ("with(this){return " + code + "}"),
  133562. staticRenderFns: state.staticRenderFns
  133563. }
  133564. }
  133565. function genElement (el, state) {
  133566. if (el.parent) {
  133567. el.pre = el.pre || el.parent.pre;
  133568. }
  133569. if (el.staticRoot && !el.staticProcessed) {
  133570. return genStatic(el, state)
  133571. } else if (el.once && !el.onceProcessed) {
  133572. return genOnce(el, state)
  133573. } else if (el.for && !el.forProcessed) {
  133574. return genFor(el, state)
  133575. } else if (el.if && !el.ifProcessed) {
  133576. return genIf(el, state)
  133577. } else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
  133578. return genChildren(el, state) || 'void 0'
  133579. } else if (el.tag === 'slot') {
  133580. return genSlot(el, state)
  133581. } else {
  133582. // component or element
  133583. var code;
  133584. if (el.component) {
  133585. code = genComponent(el.component, el, state);
  133586. } else {
  133587. var data;
  133588. if (!el.plain || (el.pre && state.maybeComponent(el))) {
  133589. data = genData$2(el, state);
  133590. }
  133591. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  133592. code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
  133593. }
  133594. // module transforms
  133595. for (var i = 0; i < state.transforms.length; i++) {
  133596. code = state.transforms[i](el, code);
  133597. }
  133598. return code
  133599. }
  133600. }
  133601. // hoist static sub-trees out
  133602. function genStatic (el, state) {
  133603. el.staticProcessed = true;
  133604. // Some elements (templates) need to behave differently inside of a v-pre
  133605. // node. All pre nodes are static roots, so we can use this as a location to
  133606. // wrap a state change and reset it upon exiting the pre node.
  133607. var originalPreState = state.pre;
  133608. if (el.pre) {
  133609. state.pre = el.pre;
  133610. }
  133611. state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
  133612. state.pre = originalPreState;
  133613. return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
  133614. }
  133615. // v-once
  133616. function genOnce (el, state) {
  133617. el.onceProcessed = true;
  133618. if (el.if && !el.ifProcessed) {
  133619. return genIf(el, state)
  133620. } else if (el.staticInFor) {
  133621. var key = '';
  133622. var parent = el.parent;
  133623. while (parent) {
  133624. if (parent.for) {
  133625. key = parent.key;
  133626. break
  133627. }
  133628. parent = parent.parent;
  133629. }
  133630. if (!key) {
  133631. true && state.warn(
  133632. "v-once can only be used inside v-for that is keyed. ",
  133633. el.rawAttrsMap['v-once']
  133634. );
  133635. return genElement(el, state)
  133636. }
  133637. return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
  133638. } else {
  133639. return genStatic(el, state)
  133640. }
  133641. }
  133642. function genIf (
  133643. el,
  133644. state,
  133645. altGen,
  133646. altEmpty
  133647. ) {
  133648. el.ifProcessed = true; // avoid recursion
  133649. return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
  133650. }
  133651. function genIfConditions (
  133652. conditions,
  133653. state,
  133654. altGen,
  133655. altEmpty
  133656. ) {
  133657. if (!conditions.length) {
  133658. return altEmpty || '_e()'
  133659. }
  133660. var condition = conditions.shift();
  133661. if (condition.exp) {
  133662. return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
  133663. } else {
  133664. return ("" + (genTernaryExp(condition.block)))
  133665. }
  133666. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  133667. function genTernaryExp (el) {
  133668. return altGen
  133669. ? altGen(el, state)
  133670. : el.once
  133671. ? genOnce(el, state)
  133672. : genElement(el, state)
  133673. }
  133674. }
  133675. function genFor (
  133676. el,
  133677. state,
  133678. altGen,
  133679. altHelper
  133680. ) {
  133681. var exp = el.for;
  133682. var alias = el.alias;
  133683. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  133684. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  133685. if ( true &&
  133686. state.maybeComponent(el) &&
  133687. el.tag !== 'slot' &&
  133688. el.tag !== 'template' &&
  133689. !el.key
  133690. ) {
  133691. state.warn(
  133692. "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
  133693. "v-for should have explicit keys. " +
  133694. "See https://vuejs.org/guide/list.html#key for more info.",
  133695. el.rawAttrsMap['v-for'],
  133696. true /* tip */
  133697. );
  133698. }
  133699. el.forProcessed = true; // avoid recursion
  133700. return (altHelper || '_l') + "((" + exp + ")," +
  133701. "function(" + alias + iterator1 + iterator2 + "){" +
  133702. "return " + ((altGen || genElement)(el, state)) +
  133703. '})'
  133704. }
  133705. function genData$2 (el, state) {
  133706. var data = '{';
  133707. // directives first.
  133708. // directives may mutate the el's other properties before they are generated.
  133709. var dirs = genDirectives(el, state);
  133710. if (dirs) { data += dirs + ','; }
  133711. // key
  133712. if (el.key) {
  133713. data += "key:" + (el.key) + ",";
  133714. }
  133715. // ref
  133716. if (el.ref) {
  133717. data += "ref:" + (el.ref) + ",";
  133718. }
  133719. if (el.refInFor) {
  133720. data += "refInFor:true,";
  133721. }
  133722. // pre
  133723. if (el.pre) {
  133724. data += "pre:true,";
  133725. }
  133726. // record original tag name for components using "is" attribute
  133727. if (el.component) {
  133728. data += "tag:\"" + (el.tag) + "\",";
  133729. }
  133730. // module data generation functions
  133731. for (var i = 0; i < state.dataGenFns.length; i++) {
  133732. data += state.dataGenFns[i](el);
  133733. }
  133734. // attributes
  133735. if (el.attrs) {
  133736. data += "attrs:" + (genProps(el.attrs)) + ",";
  133737. }
  133738. // DOM props
  133739. if (el.props) {
  133740. data += "domProps:" + (genProps(el.props)) + ",";
  133741. }
  133742. // event handlers
  133743. if (el.events) {
  133744. data += (genHandlers(el.events, false)) + ",";
  133745. }
  133746. if (el.nativeEvents) {
  133747. data += (genHandlers(el.nativeEvents, true)) + ",";
  133748. }
  133749. // slot target
  133750. // only for non-scoped slots
  133751. if (el.slotTarget && !el.slotScope) {
  133752. data += "slot:" + (el.slotTarget) + ",";
  133753. }
  133754. // scoped slots
  133755. if (el.scopedSlots) {
  133756. data += (genScopedSlots(el, el.scopedSlots, state)) + ",";
  133757. }
  133758. // component v-model
  133759. if (el.model) {
  133760. data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
  133761. }
  133762. // inline-template
  133763. if (el.inlineTemplate) {
  133764. var inlineTemplate = genInlineTemplate(el, state);
  133765. if (inlineTemplate) {
  133766. data += inlineTemplate + ",";
  133767. }
  133768. }
  133769. data = data.replace(/,$/, '') + '}';
  133770. // v-bind dynamic argument wrap
  133771. // v-bind with dynamic arguments must be applied using the same v-bind object
  133772. // merge helper so that class/style/mustUseProp attrs are handled correctly.
  133773. if (el.dynamicAttrs) {
  133774. data = "_b(" + data + ",\"" + (el.tag) + "\"," + (genProps(el.dynamicAttrs)) + ")";
  133775. }
  133776. // v-bind data wrap
  133777. if (el.wrapData) {
  133778. data = el.wrapData(data);
  133779. }
  133780. // v-on data wrap
  133781. if (el.wrapListeners) {
  133782. data = el.wrapListeners(data);
  133783. }
  133784. return data
  133785. }
  133786. function genDirectives (el, state) {
  133787. var dirs = el.directives;
  133788. if (!dirs) { return }
  133789. var res = 'directives:[';
  133790. var hasRuntime = false;
  133791. var i, l, dir, needRuntime;
  133792. for (i = 0, l = dirs.length; i < l; i++) {
  133793. dir = dirs[i];
  133794. needRuntime = true;
  133795. var gen = state.directives[dir.name];
  133796. if (gen) {
  133797. // compile-time directive that manipulates AST.
  133798. // returns true if it also needs a runtime counterpart.
  133799. needRuntime = !!gen(el, dir, state.warn);
  133800. }
  133801. if (needRuntime) {
  133802. hasRuntime = true;
  133803. res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:" + (dir.isDynamicArg ? dir.arg : ("\"" + (dir.arg) + "\""))) : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
  133804. }
  133805. }
  133806. if (hasRuntime) {
  133807. return res.slice(0, -1) + ']'
  133808. }
  133809. }
  133810. function genInlineTemplate (el, state) {
  133811. var ast = el.children[0];
  133812. if ( true && (
  133813. el.children.length !== 1 || ast.type !== 1
  133814. )) {
  133815. state.warn(
  133816. 'Inline-template components must have exactly one child element.',
  133817. { start: el.start }
  133818. );
  133819. }
  133820. if (ast && ast.type === 1) {
  133821. var inlineRenderFns = generate(ast, state.options);
  133822. return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
  133823. }
  133824. }
  133825. function genScopedSlots (
  133826. el,
  133827. slots,
  133828. state
  133829. ) {
  133830. // by default scoped slots are considered "stable", this allows child
  133831. // components with only scoped slots to skip forced updates from parent.
  133832. // but in some cases we have to bail-out of this optimization
  133833. // for example if the slot contains dynamic names, has v-if or v-for on them...
  133834. var needsForceUpdate = el.for || Object.keys(slots).some(function (key) {
  133835. var slot = slots[key];
  133836. return (
  133837. slot.slotTargetDynamic ||
  133838. slot.if ||
  133839. slot.for ||
  133840. containsSlotChild(slot) // is passing down slot from parent which may be dynamic
  133841. )
  133842. });
  133843. // #9534: if a component with scoped slots is inside a conditional branch,
  133844. // it's possible for the same component to be reused but with different
  133845. // compiled slot content. To avoid that, we generate a unique key based on
  133846. // the generated code of all the slot contents.
  133847. var needsKey = !!el.if;
  133848. // OR when it is inside another scoped slot or v-for (the reactivity may be
  133849. // disconnected due to the intermediate scope variable)
  133850. // #9438, #9506
  133851. // TODO: this can be further optimized by properly analyzing in-scope bindings
  133852. // and skip force updating ones that do not actually use scope variables.
  133853. if (!needsForceUpdate) {
  133854. var parent = el.parent;
  133855. while (parent) {
  133856. if (
  133857. (parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||
  133858. parent.for
  133859. ) {
  133860. needsForceUpdate = true;
  133861. break
  133862. }
  133863. if (parent.if) {
  133864. needsKey = true;
  133865. }
  133866. parent = parent.parent;
  133867. }
  133868. }
  133869. var generatedSlots = Object.keys(slots)
  133870. .map(function (key) { return genScopedSlot(slots[key], state); })
  133871. .join(',');
  133872. return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")")
  133873. }
  133874. function hash(str) {
  133875. var hash = 5381;
  133876. var i = str.length;
  133877. while(i) {
  133878. hash = (hash * 33) ^ str.charCodeAt(--i);
  133879. }
  133880. return hash >>> 0
  133881. }
  133882. function containsSlotChild (el) {
  133883. if (el.type === 1) {
  133884. if (el.tag === 'slot') {
  133885. return true
  133886. }
  133887. return el.children.some(containsSlotChild)
  133888. }
  133889. return false
  133890. }
  133891. function genScopedSlot (
  133892. el,
  133893. state
  133894. ) {
  133895. var isLegacySyntax = el.attrsMap['slot-scope'];
  133896. if (el.if && !el.ifProcessed && !isLegacySyntax) {
  133897. return genIf(el, state, genScopedSlot, "null")
  133898. }
  133899. if (el.for && !el.forProcessed) {
  133900. return genFor(el, state, genScopedSlot)
  133901. }
  133902. var slotScope = el.slotScope === emptySlotScopeToken
  133903. ? ""
  133904. : String(el.slotScope);
  133905. var fn = "function(" + slotScope + "){" +
  133906. "return " + (el.tag === 'template'
  133907. ? el.if && isLegacySyntax
  133908. ? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
  133909. : genChildren(el, state) || 'undefined'
  133910. : genElement(el, state)) + "}";
  133911. // reverse proxy v-slot without scope on this.$slots
  133912. var reverseProxy = slotScope ? "" : ",proxy:true";
  133913. return ("{key:" + (el.slotTarget || "\"default\"") + ",fn:" + fn + reverseProxy + "}")
  133914. }
  133915. function genChildren (
  133916. el,
  133917. state,
  133918. checkSkip,
  133919. altGenElement,
  133920. altGenNode
  133921. ) {
  133922. var children = el.children;
  133923. if (children.length) {
  133924. var el$1 = children[0];
  133925. // optimize single v-for
  133926. if (children.length === 1 &&
  133927. el$1.for &&
  133928. el$1.tag !== 'template' &&
  133929. el$1.tag !== 'slot'
  133930. ) {
  133931. var normalizationType = checkSkip
  133932. ? state.maybeComponent(el$1) ? ",1" : ",0"
  133933. : "";
  133934. return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType)
  133935. }
  133936. var normalizationType$1 = checkSkip
  133937. ? getNormalizationType(children, state.maybeComponent)
  133938. : 0;
  133939. var gen = altGenNode || genNode;
  133940. return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : ''))
  133941. }
  133942. }
  133943. // determine the normalization needed for the children array.
  133944. // 0: no normalization needed
  133945. // 1: simple normalization needed (possible 1-level deep nested array)
  133946. // 2: full normalization needed
  133947. function getNormalizationType (
  133948. children,
  133949. maybeComponent
  133950. ) {
  133951. var res = 0;
  133952. for (var i = 0; i < children.length; i++) {
  133953. var el = children[i];
  133954. if (el.type !== 1) {
  133955. continue
  133956. }
  133957. if (needsNormalization(el) ||
  133958. (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  133959. res = 2;
  133960. break
  133961. }
  133962. if (maybeComponent(el) ||
  133963. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  133964. res = 1;
  133965. }
  133966. }
  133967. return res
  133968. }
  133969. function needsNormalization (el) {
  133970. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
  133971. }
  133972. function genNode (node, state) {
  133973. if (node.type === 1) {
  133974. return genElement(node, state)
  133975. } else if (node.type === 3 && node.isComment) {
  133976. return genComment(node)
  133977. } else {
  133978. return genText(node)
  133979. }
  133980. }
  133981. function genText (text) {
  133982. return ("_v(" + (text.type === 2
  133983. ? text.expression // no need for () because already wrapped in _s()
  133984. : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
  133985. }
  133986. function genComment (comment) {
  133987. return ("_e(" + (JSON.stringify(comment.text)) + ")")
  133988. }
  133989. function genSlot (el, state) {
  133990. var slotName = el.slotName || '"default"';
  133991. var children = genChildren(el, state);
  133992. var res = "_t(" + slotName + (children ? ("," + children) : '');
  133993. var attrs = el.attrs || el.dynamicAttrs
  133994. ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
  133995. // slot props are camelized
  133996. name: camelize(attr.name),
  133997. value: attr.value,
  133998. dynamic: attr.dynamic
  133999. }); }))
  134000. : null;
  134001. var bind$$1 = el.attrsMap['v-bind'];
  134002. if ((attrs || bind$$1) && !children) {
  134003. res += ",null";
  134004. }
  134005. if (attrs) {
  134006. res += "," + attrs;
  134007. }
  134008. if (bind$$1) {
  134009. res += (attrs ? '' : ',null') + "," + bind$$1;
  134010. }
  134011. return res + ')'
  134012. }
  134013. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  134014. function genComponent (
  134015. componentName,
  134016. el,
  134017. state
  134018. ) {
  134019. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  134020. return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
  134021. }
  134022. function genProps (props) {
  134023. var staticProps = "";
  134024. var dynamicProps = "";
  134025. for (var i = 0; i < props.length; i++) {
  134026. var prop = props[i];
  134027. var value = transformSpecialNewlines(prop.value);
  134028. if (prop.dynamic) {
  134029. dynamicProps += (prop.name) + "," + value + ",";
  134030. } else {
  134031. staticProps += "\"" + (prop.name) + "\":" + value + ",";
  134032. }
  134033. }
  134034. staticProps = "{" + (staticProps.slice(0, -1)) + "}";
  134035. if (dynamicProps) {
  134036. return ("_d(" + staticProps + ",[" + (dynamicProps.slice(0, -1)) + "])")
  134037. } else {
  134038. return staticProps
  134039. }
  134040. }
  134041. // #3895, #4268
  134042. function transformSpecialNewlines (text) {
  134043. return text
  134044. .replace(/\u2028/g, '\\u2028')
  134045. .replace(/\u2029/g, '\\u2029')
  134046. }
  134047. /* */
  134048. // these keywords should not appear inside expressions, but operators like
  134049. // typeof, instanceof and in are allowed
  134050. var prohibitedKeywordRE = new RegExp('\\b' + (
  134051. 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  134052. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  134053. 'extends,finally,continue,debugger,function,arguments'
  134054. ).split(',').join('\\b|\\b') + '\\b');
  134055. // these unary operators should not be used as property/method names
  134056. var unaryOperatorsRE = new RegExp('\\b' + (
  134057. 'delete,typeof,void'
  134058. ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
  134059. // strip strings in expressions
  134060. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  134061. // detect problematic expressions in a template
  134062. function detectErrors (ast, warn) {
  134063. if (ast) {
  134064. checkNode(ast, warn);
  134065. }
  134066. }
  134067. function checkNode (node, warn) {
  134068. if (node.type === 1) {
  134069. for (var name in node.attrsMap) {
  134070. if (dirRE.test(name)) {
  134071. var value = node.attrsMap[name];
  134072. if (value) {
  134073. var range = node.rawAttrsMap[name];
  134074. if (name === 'v-for') {
  134075. checkFor(node, ("v-for=\"" + value + "\""), warn, range);
  134076. } else if (name === 'v-slot' || name[0] === '#') {
  134077. checkFunctionParameterExpression(value, (name + "=\"" + value + "\""), warn, range);
  134078. } else if (onRE.test(name)) {
  134079. checkEvent(value, (name + "=\"" + value + "\""), warn, range);
  134080. } else {
  134081. checkExpression(value, (name + "=\"" + value + "\""), warn, range);
  134082. }
  134083. }
  134084. }
  134085. }
  134086. if (node.children) {
  134087. for (var i = 0; i < node.children.length; i++) {
  134088. checkNode(node.children[i], warn);
  134089. }
  134090. }
  134091. } else if (node.type === 2) {
  134092. checkExpression(node.expression, node.text, warn, node);
  134093. }
  134094. }
  134095. function checkEvent (exp, text, warn, range) {
  134096. var stripped = exp.replace(stripStringRE, '');
  134097. var keywordMatch = stripped.match(unaryOperatorsRE);
  134098. if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
  134099. warn(
  134100. "avoid using JavaScript unary operator as property name: " +
  134101. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()),
  134102. range
  134103. );
  134104. }
  134105. checkExpression(exp, text, warn, range);
  134106. }
  134107. function checkFor (node, text, warn, range) {
  134108. checkExpression(node.for || '', text, warn, range);
  134109. checkIdentifier(node.alias, 'v-for alias', text, warn, range);
  134110. checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);
  134111. checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);
  134112. }
  134113. function checkIdentifier (
  134114. ident,
  134115. type,
  134116. text,
  134117. warn,
  134118. range
  134119. ) {
  134120. if (typeof ident === 'string') {
  134121. try {
  134122. new Function(("var " + ident + "=_"));
  134123. } catch (e) {
  134124. warn(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())), range);
  134125. }
  134126. }
  134127. }
  134128. function checkExpression (exp, text, warn, range) {
  134129. try {
  134130. new Function(("return " + exp));
  134131. } catch (e) {
  134132. var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
  134133. if (keywordMatch) {
  134134. warn(
  134135. "avoid using JavaScript keyword as property name: " +
  134136. "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()),
  134137. range
  134138. );
  134139. } else {
  134140. warn(
  134141. "invalid expression: " + (e.message) + " in\n\n" +
  134142. " " + exp + "\n\n" +
  134143. " Raw expression: " + (text.trim()) + "\n",
  134144. range
  134145. );
  134146. }
  134147. }
  134148. }
  134149. function checkFunctionParameterExpression (exp, text, warn, range) {
  134150. try {
  134151. new Function(exp, '');
  134152. } catch (e) {
  134153. warn(
  134154. "invalid function parameter expression: " + (e.message) + " in\n\n" +
  134155. " " + exp + "\n\n" +
  134156. " Raw expression: " + (text.trim()) + "\n",
  134157. range
  134158. );
  134159. }
  134160. }
  134161. /* */
  134162. var range = 2;
  134163. function generateCodeFrame (
  134164. source,
  134165. start,
  134166. end
  134167. ) {
  134168. if ( start === void 0 ) start = 0;
  134169. if ( end === void 0 ) end = source.length;
  134170. var lines = source.split(/\r?\n/);
  134171. var count = 0;
  134172. var res = [];
  134173. for (var i = 0; i < lines.length; i++) {
  134174. count += lines[i].length + 1;
  134175. if (count >= start) {
  134176. for (var j = i - range; j <= i + range || end > count; j++) {
  134177. if (j < 0 || j >= lines.length) { continue }
  134178. res.push(("" + (j + 1) + (repeat$1(" ", 3 - String(j + 1).length)) + "| " + (lines[j])));
  134179. var lineLength = lines[j].length;
  134180. if (j === i) {
  134181. // push underline
  134182. var pad = start - (count - lineLength) + 1;
  134183. var length = end > count ? lineLength - pad : end - start;
  134184. res.push(" | " + repeat$1(" ", pad) + repeat$1("^", length));
  134185. } else if (j > i) {
  134186. if (end > count) {
  134187. var length$1 = Math.min(end - count, lineLength);
  134188. res.push(" | " + repeat$1("^", length$1));
  134189. }
  134190. count += lineLength + 1;
  134191. }
  134192. }
  134193. break
  134194. }
  134195. }
  134196. return res.join('\n')
  134197. }
  134198. function repeat$1 (str, n) {
  134199. var result = '';
  134200. if (n > 0) {
  134201. while (true) { // eslint-disable-line
  134202. if (n & 1) { result += str; }
  134203. n >>>= 1;
  134204. if (n <= 0) { break }
  134205. str += str;
  134206. }
  134207. }
  134208. return result
  134209. }
  134210. /* */
  134211. function createFunction (code, errors) {
  134212. try {
  134213. return new Function(code)
  134214. } catch (err) {
  134215. errors.push({ err: err, code: code });
  134216. return noop
  134217. }
  134218. }
  134219. function createCompileToFunctionFn (compile) {
  134220. var cache = Object.create(null);
  134221. return function compileToFunctions (
  134222. template,
  134223. options,
  134224. vm
  134225. ) {
  134226. options = extend({}, options);
  134227. var warn$$1 = options.warn || warn;
  134228. delete options.warn;
  134229. /* istanbul ignore if */
  134230. if (true) {
  134231. // detect possible CSP restriction
  134232. try {
  134233. new Function('return 1');
  134234. } catch (e) {
  134235. if (e.toString().match(/unsafe-eval|CSP/)) {
  134236. warn$$1(
  134237. 'It seems you are using the standalone build of Vue.js in an ' +
  134238. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  134239. 'The template compiler cannot work in this environment. Consider ' +
  134240. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  134241. 'templates into render functions.'
  134242. );
  134243. }
  134244. }
  134245. }
  134246. // check cache
  134247. var key = options.delimiters
  134248. ? String(options.delimiters) + template
  134249. : template;
  134250. if (cache[key]) {
  134251. return cache[key]
  134252. }
  134253. // compile
  134254. var compiled = compile(template, options);
  134255. // check compilation errors/tips
  134256. if (true) {
  134257. if (compiled.errors && compiled.errors.length) {
  134258. if (options.outputSourceRange) {
  134259. compiled.errors.forEach(function (e) {
  134260. warn$$1(
  134261. "Error compiling template:\n\n" + (e.msg) + "\n\n" +
  134262. generateCodeFrame(template, e.start, e.end),
  134263. vm
  134264. );
  134265. });
  134266. } else {
  134267. warn$$1(
  134268. "Error compiling template:\n\n" + template + "\n\n" +
  134269. compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
  134270. vm
  134271. );
  134272. }
  134273. }
  134274. if (compiled.tips && compiled.tips.length) {
  134275. if (options.outputSourceRange) {
  134276. compiled.tips.forEach(function (e) { return tip(e.msg, vm); });
  134277. } else {
  134278. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  134279. }
  134280. }
  134281. }
  134282. // turn code into functions
  134283. var res = {};
  134284. var fnGenErrors = [];
  134285. res.render = createFunction(compiled.render, fnGenErrors);
  134286. res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
  134287. return createFunction(code, fnGenErrors)
  134288. });
  134289. // check function generation errors.
  134290. // this should only happen if there is a bug in the compiler itself.
  134291. // mostly for codegen development use
  134292. /* istanbul ignore if */
  134293. if (true) {
  134294. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  134295. warn$$1(
  134296. "Failed to generate render function:\n\n" +
  134297. fnGenErrors.map(function (ref) {
  134298. var err = ref.err;
  134299. var code = ref.code;
  134300. return ((err.toString()) + " in\n\n" + code + "\n");
  134301. }).join('\n'),
  134302. vm
  134303. );
  134304. }
  134305. }
  134306. return (cache[key] = res)
  134307. }
  134308. }
  134309. /* */
  134310. function createCompilerCreator (baseCompile) {
  134311. return function createCompiler (baseOptions) {
  134312. function compile (
  134313. template,
  134314. options
  134315. ) {
  134316. var finalOptions = Object.create(baseOptions);
  134317. var errors = [];
  134318. var tips = [];
  134319. var warn = function (msg, range, tip) {
  134320. (tip ? tips : errors).push(msg);
  134321. };
  134322. if (options) {
  134323. if ( true && options.outputSourceRange) {
  134324. // $flow-disable-line
  134325. var leadingSpaceLength = template.match(/^\s*/)[0].length;
  134326. warn = function (msg, range, tip) {
  134327. var data = { msg: msg };
  134328. if (range) {
  134329. if (range.start != null) {
  134330. data.start = range.start + leadingSpaceLength;
  134331. }
  134332. if (range.end != null) {
  134333. data.end = range.end + leadingSpaceLength;
  134334. }
  134335. }
  134336. (tip ? tips : errors).push(data);
  134337. };
  134338. }
  134339. // merge custom modules
  134340. if (options.modules) {
  134341. finalOptions.modules =
  134342. (baseOptions.modules || []).concat(options.modules);
  134343. }
  134344. // merge custom directives
  134345. if (options.directives) {
  134346. finalOptions.directives = extend(
  134347. Object.create(baseOptions.directives || null),
  134348. options.directives
  134349. );
  134350. }
  134351. // copy other options
  134352. for (var key in options) {
  134353. if (key !== 'modules' && key !== 'directives') {
  134354. finalOptions[key] = options[key];
  134355. }
  134356. }
  134357. }
  134358. finalOptions.warn = warn;
  134359. var compiled = baseCompile(template.trim(), finalOptions);
  134360. if (true) {
  134361. detectErrors(compiled.ast, warn);
  134362. }
  134363. compiled.errors = errors;
  134364. compiled.tips = tips;
  134365. return compiled
  134366. }
  134367. return {
  134368. compile: compile,
  134369. compileToFunctions: createCompileToFunctionFn(compile)
  134370. }
  134371. }
  134372. }
  134373. /* */
  134374. // `createCompilerCreator` allows creating compilers that use alternative
  134375. // parser/optimizer/codegen, e.g the SSR optimizing compiler.
  134376. // Here we just export a default compiler using the default parts.
  134377. var createCompiler = createCompilerCreator(function baseCompile (
  134378. template,
  134379. options
  134380. ) {
  134381. var ast = parse(template.trim(), options);
  134382. if (options.optimize !== false) {
  134383. optimize(ast, options);
  134384. }
  134385. var code = generate(ast, options);
  134386. return {
  134387. ast: ast,
  134388. render: code.render,
  134389. staticRenderFns: code.staticRenderFns
  134390. }
  134391. });
  134392. /* */
  134393. var ref$1 = createCompiler(baseOptions);
  134394. var compile = ref$1.compile;
  134395. var compileToFunctions = ref$1.compileToFunctions;
  134396. /* */
  134397. // check whether current browser encodes a char inside attribute values
  134398. var div;
  134399. function getShouldDecode (href) {
  134400. div = div || document.createElement('div');
  134401. div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
  134402. return div.innerHTML.indexOf('&#10;') > 0
  134403. }
  134404. // #3663: IE encodes newlines inside attribute values while other browsers don't
  134405. var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;
  134406. // #6828: chrome encodes content in a[href]
  134407. var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;
  134408. /* */
  134409. var idToTemplate = cached(function (id) {
  134410. var el = query(id);
  134411. return el && el.innerHTML
  134412. });
  134413. var mount = Vue.prototype.$mount;
  134414. Vue.prototype.$mount = function (
  134415. el,
  134416. hydrating
  134417. ) {
  134418. el = el && query(el);
  134419. /* istanbul ignore if */
  134420. if (el === document.body || el === document.documentElement) {
  134421. true && warn(
  134422. "Do not mount Vue to <html> or <body> - mount to normal elements instead."
  134423. );
  134424. return this
  134425. }
  134426. var options = this.$options;
  134427. // resolve template/el and convert to render function
  134428. if (!options.render) {
  134429. var template = options.template;
  134430. if (template) {
  134431. if (typeof template === 'string') {
  134432. if (template.charAt(0) === '#') {
  134433. template = idToTemplate(template);
  134434. /* istanbul ignore if */
  134435. if ( true && !template) {
  134436. warn(
  134437. ("Template element not found or is empty: " + (options.template)),
  134438. this
  134439. );
  134440. }
  134441. }
  134442. } else if (template.nodeType) {
  134443. template = template.innerHTML;
  134444. } else {
  134445. if (true) {
  134446. warn('invalid template option:' + template, this);
  134447. }
  134448. return this
  134449. }
  134450. } else if (el) {
  134451. template = getOuterHTML(el);
  134452. }
  134453. if (template) {
  134454. /* istanbul ignore if */
  134455. if ( true && config.performance && mark) {
  134456. mark('compile');
  134457. }
  134458. var ref = compileToFunctions(template, {
  134459. outputSourceRange: "development" !== 'production',
  134460. shouldDecodeNewlines: shouldDecodeNewlines,
  134461. shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,
  134462. delimiters: options.delimiters,
  134463. comments: options.comments
  134464. }, this);
  134465. var render = ref.render;
  134466. var staticRenderFns = ref.staticRenderFns;
  134467. options.render = render;
  134468. options.staticRenderFns = staticRenderFns;
  134469. /* istanbul ignore if */
  134470. if ( true && config.performance && mark) {
  134471. mark('compile end');
  134472. measure(("vue " + (this._name) + " compile"), 'compile', 'compile end');
  134473. }
  134474. }
  134475. }
  134476. return mount.call(this, el, hydrating)
  134477. };
  134478. /**
  134479. * Get outerHTML of elements, taking care
  134480. * of SVG elements in IE as well.
  134481. */
  134482. function getOuterHTML (el) {
  134483. if (el.outerHTML) {
  134484. return el.outerHTML
  134485. } else {
  134486. var container = document.createElement('div');
  134487. container.appendChild(el.cloneNode(true));
  134488. return container.innerHTML
  134489. }
  134490. }
  134491. Vue.compile = compileToFunctions;
  134492. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  134493. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  134494. /***/ }),
  134495. /***/ "./node_modules/_vuex@3.6.2@vuex/dist/vuex.esm.js":
  134496. /*!********************************************************!*\
  134497. !*** ./node_modules/_vuex@3.6.2@vuex/dist/vuex.esm.js ***!
  134498. \********************************************************/
  134499. /*! exports provided: default, Store, createLogger, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState */
  134500. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  134501. "use strict";
  134502. __webpack_require__.r(__webpack_exports__);
  134503. /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  134504. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLogger", function() { return createLogger; });
  134505. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  134506. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  134507. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  134508. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  134509. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  134510. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  134511. /*!
  134512. * vuex v3.6.2
  134513. * (c) 2021 Evan You
  134514. * @license MIT
  134515. */
  134516. function applyMixin (Vue) {
  134517. var version = Number(Vue.version.split('.')[0]);
  134518. if (version >= 2) {
  134519. Vue.mixin({ beforeCreate: vuexInit });
  134520. } else {
  134521. // override init and inject vuex init procedure
  134522. // for 1.x backwards compatibility.
  134523. var _init = Vue.prototype._init;
  134524. Vue.prototype._init = function (options) {
  134525. if ( options === void 0 ) options = {};
  134526. options.init = options.init
  134527. ? [vuexInit].concat(options.init)
  134528. : vuexInit;
  134529. _init.call(this, options);
  134530. };
  134531. }
  134532. /**
  134533. * Vuex init hook, injected into each instances init hooks list.
  134534. */
  134535. function vuexInit () {
  134536. var options = this.$options;
  134537. // store injection
  134538. if (options.store) {
  134539. this.$store = typeof options.store === 'function'
  134540. ? options.store()
  134541. : options.store;
  134542. } else if (options.parent && options.parent.$store) {
  134543. this.$store = options.parent.$store;
  134544. }
  134545. }
  134546. }
  134547. var target = typeof window !== 'undefined'
  134548. ? window
  134549. : typeof global !== 'undefined'
  134550. ? global
  134551. : {};
  134552. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  134553. function devtoolPlugin (store) {
  134554. if (!devtoolHook) { return }
  134555. store._devtoolHook = devtoolHook;
  134556. devtoolHook.emit('vuex:init', store);
  134557. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  134558. store.replaceState(targetState);
  134559. });
  134560. store.subscribe(function (mutation, state) {
  134561. devtoolHook.emit('vuex:mutation', mutation, state);
  134562. }, { prepend: true });
  134563. store.subscribeAction(function (action, state) {
  134564. devtoolHook.emit('vuex:action', action, state);
  134565. }, { prepend: true });
  134566. }
  134567. /**
  134568. * Get the first item that pass the test
  134569. * by second argument function
  134570. *
  134571. * @param {Array} list
  134572. * @param {Function} f
  134573. * @return {*}
  134574. */
  134575. function find (list, f) {
  134576. return list.filter(f)[0]
  134577. }
  134578. /**
  134579. * Deep copy the given object considering circular structure.
  134580. * This function caches all nested objects and its copies.
  134581. * If it detects circular structure, use cached copy to avoid infinite loop.
  134582. *
  134583. * @param {*} obj
  134584. * @param {Array<Object>} cache
  134585. * @return {*}
  134586. */
  134587. function deepCopy (obj, cache) {
  134588. if ( cache === void 0 ) cache = [];
  134589. // just return if obj is immutable value
  134590. if (obj === null || typeof obj !== 'object') {
  134591. return obj
  134592. }
  134593. // if obj is hit, it is in circular structure
  134594. var hit = find(cache, function (c) { return c.original === obj; });
  134595. if (hit) {
  134596. return hit.copy
  134597. }
  134598. var copy = Array.isArray(obj) ? [] : {};
  134599. // put the copy into cache at first
  134600. // because we want to refer it in recursive deepCopy
  134601. cache.push({
  134602. original: obj,
  134603. copy: copy
  134604. });
  134605. Object.keys(obj).forEach(function (key) {
  134606. copy[key] = deepCopy(obj[key], cache);
  134607. });
  134608. return copy
  134609. }
  134610. /**
  134611. * forEach for object
  134612. */
  134613. function forEachValue (obj, fn) {
  134614. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  134615. }
  134616. function isObject (obj) {
  134617. return obj !== null && typeof obj === 'object'
  134618. }
  134619. function isPromise (val) {
  134620. return val && typeof val.then === 'function'
  134621. }
  134622. function assert (condition, msg) {
  134623. if (!condition) { throw new Error(("[vuex] " + msg)) }
  134624. }
  134625. function partial (fn, arg) {
  134626. return function () {
  134627. return fn(arg)
  134628. }
  134629. }
  134630. // Base data struct for store's module, package with some attribute and method
  134631. var Module = function Module (rawModule, runtime) {
  134632. this.runtime = runtime;
  134633. // Store some children item
  134634. this._children = Object.create(null);
  134635. // Store the origin module object which passed by programmer
  134636. this._rawModule = rawModule;
  134637. var rawState = rawModule.state;
  134638. // Store the origin module's state
  134639. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  134640. };
  134641. var prototypeAccessors = { namespaced: { configurable: true } };
  134642. prototypeAccessors.namespaced.get = function () {
  134643. return !!this._rawModule.namespaced
  134644. };
  134645. Module.prototype.addChild = function addChild (key, module) {
  134646. this._children[key] = module;
  134647. };
  134648. Module.prototype.removeChild = function removeChild (key) {
  134649. delete this._children[key];
  134650. };
  134651. Module.prototype.getChild = function getChild (key) {
  134652. return this._children[key]
  134653. };
  134654. Module.prototype.hasChild = function hasChild (key) {
  134655. return key in this._children
  134656. };
  134657. Module.prototype.update = function update (rawModule) {
  134658. this._rawModule.namespaced = rawModule.namespaced;
  134659. if (rawModule.actions) {
  134660. this._rawModule.actions = rawModule.actions;
  134661. }
  134662. if (rawModule.mutations) {
  134663. this._rawModule.mutations = rawModule.mutations;
  134664. }
  134665. if (rawModule.getters) {
  134666. this._rawModule.getters = rawModule.getters;
  134667. }
  134668. };
  134669. Module.prototype.forEachChild = function forEachChild (fn) {
  134670. forEachValue(this._children, fn);
  134671. };
  134672. Module.prototype.forEachGetter = function forEachGetter (fn) {
  134673. if (this._rawModule.getters) {
  134674. forEachValue(this._rawModule.getters, fn);
  134675. }
  134676. };
  134677. Module.prototype.forEachAction = function forEachAction (fn) {
  134678. if (this._rawModule.actions) {
  134679. forEachValue(this._rawModule.actions, fn);
  134680. }
  134681. };
  134682. Module.prototype.forEachMutation = function forEachMutation (fn) {
  134683. if (this._rawModule.mutations) {
  134684. forEachValue(this._rawModule.mutations, fn);
  134685. }
  134686. };
  134687. Object.defineProperties( Module.prototype, prototypeAccessors );
  134688. var ModuleCollection = function ModuleCollection (rawRootModule) {
  134689. // register root module (Vuex.Store options)
  134690. this.register([], rawRootModule, false);
  134691. };
  134692. ModuleCollection.prototype.get = function get (path) {
  134693. return path.reduce(function (module, key) {
  134694. return module.getChild(key)
  134695. }, this.root)
  134696. };
  134697. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  134698. var module = this.root;
  134699. return path.reduce(function (namespace, key) {
  134700. module = module.getChild(key);
  134701. return namespace + (module.namespaced ? key + '/' : '')
  134702. }, '')
  134703. };
  134704. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  134705. update([], this.root, rawRootModule);
  134706. };
  134707. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  134708. var this$1 = this;
  134709. if ( runtime === void 0 ) runtime = true;
  134710. if ((true)) {
  134711. assertRawModule(path, rawModule);
  134712. }
  134713. var newModule = new Module(rawModule, runtime);
  134714. if (path.length === 0) {
  134715. this.root = newModule;
  134716. } else {
  134717. var parent = this.get(path.slice(0, -1));
  134718. parent.addChild(path[path.length - 1], newModule);
  134719. }
  134720. // register nested modules
  134721. if (rawModule.modules) {
  134722. forEachValue(rawModule.modules, function (rawChildModule, key) {
  134723. this$1.register(path.concat(key), rawChildModule, runtime);
  134724. });
  134725. }
  134726. };
  134727. ModuleCollection.prototype.unregister = function unregister (path) {
  134728. var parent = this.get(path.slice(0, -1));
  134729. var key = path[path.length - 1];
  134730. var child = parent.getChild(key);
  134731. if (!child) {
  134732. if ((true)) {
  134733. console.warn(
  134734. "[vuex] trying to unregister module '" + key + "', which is " +
  134735. "not registered"
  134736. );
  134737. }
  134738. return
  134739. }
  134740. if (!child.runtime) {
  134741. return
  134742. }
  134743. parent.removeChild(key);
  134744. };
  134745. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  134746. var parent = this.get(path.slice(0, -1));
  134747. var key = path[path.length - 1];
  134748. if (parent) {
  134749. return parent.hasChild(key)
  134750. }
  134751. return false
  134752. };
  134753. function update (path, targetModule, newModule) {
  134754. if ((true)) {
  134755. assertRawModule(path, newModule);
  134756. }
  134757. // update target module
  134758. targetModule.update(newModule);
  134759. // update nested modules
  134760. if (newModule.modules) {
  134761. for (var key in newModule.modules) {
  134762. if (!targetModule.getChild(key)) {
  134763. if ((true)) {
  134764. console.warn(
  134765. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  134766. 'manual reload is needed'
  134767. );
  134768. }
  134769. return
  134770. }
  134771. update(
  134772. path.concat(key),
  134773. targetModule.getChild(key),
  134774. newModule.modules[key]
  134775. );
  134776. }
  134777. }
  134778. }
  134779. var functionAssert = {
  134780. assert: function (value) { return typeof value === 'function'; },
  134781. expected: 'function'
  134782. };
  134783. var objectAssert = {
  134784. assert: function (value) { return typeof value === 'function' ||
  134785. (typeof value === 'object' && typeof value.handler === 'function'); },
  134786. expected: 'function or object with "handler" function'
  134787. };
  134788. var assertTypes = {
  134789. getters: functionAssert,
  134790. mutations: functionAssert,
  134791. actions: objectAssert
  134792. };
  134793. function assertRawModule (path, rawModule) {
  134794. Object.keys(assertTypes).forEach(function (key) {
  134795. if (!rawModule[key]) { return }
  134796. var assertOptions = assertTypes[key];
  134797. forEachValue(rawModule[key], function (value, type) {
  134798. assert(
  134799. assertOptions.assert(value),
  134800. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  134801. );
  134802. });
  134803. });
  134804. }
  134805. function makeAssertionMessage (path, key, type, value, expected) {
  134806. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  134807. if (path.length > 0) {
  134808. buf += " in module \"" + (path.join('.')) + "\"";
  134809. }
  134810. buf += " is " + (JSON.stringify(value)) + ".";
  134811. return buf
  134812. }
  134813. var Vue; // bind on install
  134814. var Store = function Store (options) {
  134815. var this$1 = this;
  134816. if ( options === void 0 ) options = {};
  134817. // Auto install if it is not done yet and `window` has `Vue`.
  134818. // To allow users to avoid auto-installation in some cases,
  134819. // this code should be placed here. See #731
  134820. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  134821. install(window.Vue);
  134822. }
  134823. if ((true)) {
  134824. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  134825. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  134826. assert(this instanceof Store, "store must be called with the new operator.");
  134827. }
  134828. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  134829. var strict = options.strict; if ( strict === void 0 ) strict = false;
  134830. // store internal state
  134831. this._committing = false;
  134832. this._actions = Object.create(null);
  134833. this._actionSubscribers = [];
  134834. this._mutations = Object.create(null);
  134835. this._wrappedGetters = Object.create(null);
  134836. this._modules = new ModuleCollection(options);
  134837. this._modulesNamespaceMap = Object.create(null);
  134838. this._subscribers = [];
  134839. this._watcherVM = new Vue();
  134840. this._makeLocalGettersCache = Object.create(null);
  134841. // bind commit and dispatch to self
  134842. var store = this;
  134843. var ref = this;
  134844. var dispatch = ref.dispatch;
  134845. var commit = ref.commit;
  134846. this.dispatch = function boundDispatch (type, payload) {
  134847. return dispatch.call(store, type, payload)
  134848. };
  134849. this.commit = function boundCommit (type, payload, options) {
  134850. return commit.call(store, type, payload, options)
  134851. };
  134852. // strict mode
  134853. this.strict = strict;
  134854. var state = this._modules.root.state;
  134855. // init root module.
  134856. // this also recursively registers all sub-modules
  134857. // and collects all module getters inside this._wrappedGetters
  134858. installModule(this, state, [], this._modules.root);
  134859. // initialize the store vm, which is responsible for the reactivity
  134860. // (also registers _wrappedGetters as computed properties)
  134861. resetStoreVM(this, state);
  134862. // apply plugins
  134863. plugins.forEach(function (plugin) { return plugin(this$1); });
  134864. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  134865. if (useDevtools) {
  134866. devtoolPlugin(this);
  134867. }
  134868. };
  134869. var prototypeAccessors$1 = { state: { configurable: true } };
  134870. prototypeAccessors$1.state.get = function () {
  134871. return this._vm._data.$$state
  134872. };
  134873. prototypeAccessors$1.state.set = function (v) {
  134874. if ((true)) {
  134875. assert(false, "use store.replaceState() to explicit replace store state.");
  134876. }
  134877. };
  134878. Store.prototype.commit = function commit (_type, _payload, _options) {
  134879. var this$1 = this;
  134880. // check object-style commit
  134881. var ref = unifyObjectStyle(_type, _payload, _options);
  134882. var type = ref.type;
  134883. var payload = ref.payload;
  134884. var options = ref.options;
  134885. var mutation = { type: type, payload: payload };
  134886. var entry = this._mutations[type];
  134887. if (!entry) {
  134888. if ((true)) {
  134889. console.error(("[vuex] unknown mutation type: " + type));
  134890. }
  134891. return
  134892. }
  134893. this._withCommit(function () {
  134894. entry.forEach(function commitIterator (handler) {
  134895. handler(payload);
  134896. });
  134897. });
  134898. this._subscribers
  134899. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  134900. .forEach(function (sub) { return sub(mutation, this$1.state); });
  134901. if (
  134902. ( true) &&
  134903. options && options.silent
  134904. ) {
  134905. console.warn(
  134906. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  134907. 'Use the filter functionality in the vue-devtools'
  134908. );
  134909. }
  134910. };
  134911. Store.prototype.dispatch = function dispatch (_type, _payload) {
  134912. var this$1 = this;
  134913. // check object-style dispatch
  134914. var ref = unifyObjectStyle(_type, _payload);
  134915. var type = ref.type;
  134916. var payload = ref.payload;
  134917. var action = { type: type, payload: payload };
  134918. var entry = this._actions[type];
  134919. if (!entry) {
  134920. if ((true)) {
  134921. console.error(("[vuex] unknown action type: " + type));
  134922. }
  134923. return
  134924. }
  134925. try {
  134926. this._actionSubscribers
  134927. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  134928. .filter(function (sub) { return sub.before; })
  134929. .forEach(function (sub) { return sub.before(action, this$1.state); });
  134930. } catch (e) {
  134931. if ((true)) {
  134932. console.warn("[vuex] error in before action subscribers: ");
  134933. console.error(e);
  134934. }
  134935. }
  134936. var result = entry.length > 1
  134937. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  134938. : entry[0](payload);
  134939. return new Promise(function (resolve, reject) {
  134940. result.then(function (res) {
  134941. try {
  134942. this$1._actionSubscribers
  134943. .filter(function (sub) { return sub.after; })
  134944. .forEach(function (sub) { return sub.after(action, this$1.state); });
  134945. } catch (e) {
  134946. if ((true)) {
  134947. console.warn("[vuex] error in after action subscribers: ");
  134948. console.error(e);
  134949. }
  134950. }
  134951. resolve(res);
  134952. }, function (error) {
  134953. try {
  134954. this$1._actionSubscribers
  134955. .filter(function (sub) { return sub.error; })
  134956. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  134957. } catch (e) {
  134958. if ((true)) {
  134959. console.warn("[vuex] error in error action subscribers: ");
  134960. console.error(e);
  134961. }
  134962. }
  134963. reject(error);
  134964. });
  134965. })
  134966. };
  134967. Store.prototype.subscribe = function subscribe (fn, options) {
  134968. return genericSubscribe(fn, this._subscribers, options)
  134969. };
  134970. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  134971. var subs = typeof fn === 'function' ? { before: fn } : fn;
  134972. return genericSubscribe(subs, this._actionSubscribers, options)
  134973. };
  134974. Store.prototype.watch = function watch (getter, cb, options) {
  134975. var this$1 = this;
  134976. if ((true)) {
  134977. assert(typeof getter === 'function', "store.watch only accepts a function.");
  134978. }
  134979. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  134980. };
  134981. Store.prototype.replaceState = function replaceState (state) {
  134982. var this$1 = this;
  134983. this._withCommit(function () {
  134984. this$1._vm._data.$$state = state;
  134985. });
  134986. };
  134987. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  134988. if ( options === void 0 ) options = {};
  134989. if (typeof path === 'string') { path = [path]; }
  134990. if ((true)) {
  134991. assert(Array.isArray(path), "module path must be a string or an Array.");
  134992. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  134993. }
  134994. this._modules.register(path, rawModule);
  134995. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  134996. // reset store to update getters...
  134997. resetStoreVM(this, this.state);
  134998. };
  134999. Store.prototype.unregisterModule = function unregisterModule (path) {
  135000. var this$1 = this;
  135001. if (typeof path === 'string') { path = [path]; }
  135002. if ((true)) {
  135003. assert(Array.isArray(path), "module path must be a string or an Array.");
  135004. }
  135005. this._modules.unregister(path);
  135006. this._withCommit(function () {
  135007. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  135008. Vue.delete(parentState, path[path.length - 1]);
  135009. });
  135010. resetStore(this);
  135011. };
  135012. Store.prototype.hasModule = function hasModule (path) {
  135013. if (typeof path === 'string') { path = [path]; }
  135014. if ((true)) {
  135015. assert(Array.isArray(path), "module path must be a string or an Array.");
  135016. }
  135017. return this._modules.isRegistered(path)
  135018. };
  135019. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  135020. this._modules.update(newOptions);
  135021. resetStore(this, true);
  135022. };
  135023. Store.prototype._withCommit = function _withCommit (fn) {
  135024. var committing = this._committing;
  135025. this._committing = true;
  135026. fn();
  135027. this._committing = committing;
  135028. };
  135029. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  135030. function genericSubscribe (fn, subs, options) {
  135031. if (subs.indexOf(fn) < 0) {
  135032. options && options.prepend
  135033. ? subs.unshift(fn)
  135034. : subs.push(fn);
  135035. }
  135036. return function () {
  135037. var i = subs.indexOf(fn);
  135038. if (i > -1) {
  135039. subs.splice(i, 1);
  135040. }
  135041. }
  135042. }
  135043. function resetStore (store, hot) {
  135044. store._actions = Object.create(null);
  135045. store._mutations = Object.create(null);
  135046. store._wrappedGetters = Object.create(null);
  135047. store._modulesNamespaceMap = Object.create(null);
  135048. var state = store.state;
  135049. // init all modules
  135050. installModule(store, state, [], store._modules.root, true);
  135051. // reset vm
  135052. resetStoreVM(store, state, hot);
  135053. }
  135054. function resetStoreVM (store, state, hot) {
  135055. var oldVm = store._vm;
  135056. // bind store public getters
  135057. store.getters = {};
  135058. // reset local getters cache
  135059. store._makeLocalGettersCache = Object.create(null);
  135060. var wrappedGetters = store._wrappedGetters;
  135061. var computed = {};
  135062. forEachValue(wrappedGetters, function (fn, key) {
  135063. // use computed to leverage its lazy-caching mechanism
  135064. // direct inline function use will lead to closure preserving oldVm.
  135065. // using partial to return function with only arguments preserved in closure environment.
  135066. computed[key] = partial(fn, store);
  135067. Object.defineProperty(store.getters, key, {
  135068. get: function () { return store._vm[key]; },
  135069. enumerable: true // for local getters
  135070. });
  135071. });
  135072. // use a Vue instance to store the state tree
  135073. // suppress warnings just in case the user has added
  135074. // some funky global mixins
  135075. var silent = Vue.config.silent;
  135076. Vue.config.silent = true;
  135077. store._vm = new Vue({
  135078. data: {
  135079. $$state: state
  135080. },
  135081. computed: computed
  135082. });
  135083. Vue.config.silent = silent;
  135084. // enable strict mode for new vm
  135085. if (store.strict) {
  135086. enableStrictMode(store);
  135087. }
  135088. if (oldVm) {
  135089. if (hot) {
  135090. // dispatch changes in all subscribed watchers
  135091. // to force getter re-evaluation for hot reloading.
  135092. store._withCommit(function () {
  135093. oldVm._data.$$state = null;
  135094. });
  135095. }
  135096. Vue.nextTick(function () { return oldVm.$destroy(); });
  135097. }
  135098. }
  135099. function installModule (store, rootState, path, module, hot) {
  135100. var isRoot = !path.length;
  135101. var namespace = store._modules.getNamespace(path);
  135102. // register in namespace map
  135103. if (module.namespaced) {
  135104. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  135105. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  135106. }
  135107. store._modulesNamespaceMap[namespace] = module;
  135108. }
  135109. // set state
  135110. if (!isRoot && !hot) {
  135111. var parentState = getNestedState(rootState, path.slice(0, -1));
  135112. var moduleName = path[path.length - 1];
  135113. store._withCommit(function () {
  135114. if ((true)) {
  135115. if (moduleName in parentState) {
  135116. console.warn(
  135117. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  135118. );
  135119. }
  135120. }
  135121. Vue.set(parentState, moduleName, module.state);
  135122. });
  135123. }
  135124. var local = module.context = makeLocalContext(store, namespace, path);
  135125. module.forEachMutation(function (mutation, key) {
  135126. var namespacedType = namespace + key;
  135127. registerMutation(store, namespacedType, mutation, local);
  135128. });
  135129. module.forEachAction(function (action, key) {
  135130. var type = action.root ? key : namespace + key;
  135131. var handler = action.handler || action;
  135132. registerAction(store, type, handler, local);
  135133. });
  135134. module.forEachGetter(function (getter, key) {
  135135. var namespacedType = namespace + key;
  135136. registerGetter(store, namespacedType, getter, local);
  135137. });
  135138. module.forEachChild(function (child, key) {
  135139. installModule(store, rootState, path.concat(key), child, hot);
  135140. });
  135141. }
  135142. /**
  135143. * make localized dispatch, commit, getters and state
  135144. * if there is no namespace, just use root ones
  135145. */
  135146. function makeLocalContext (store, namespace, path) {
  135147. var noNamespace = namespace === '';
  135148. var local = {
  135149. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  135150. var args = unifyObjectStyle(_type, _payload, _options);
  135151. var payload = args.payload;
  135152. var options = args.options;
  135153. var type = args.type;
  135154. if (!options || !options.root) {
  135155. type = namespace + type;
  135156. if (( true) && !store._actions[type]) {
  135157. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  135158. return
  135159. }
  135160. }
  135161. return store.dispatch(type, payload)
  135162. },
  135163. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  135164. var args = unifyObjectStyle(_type, _payload, _options);
  135165. var payload = args.payload;
  135166. var options = args.options;
  135167. var type = args.type;
  135168. if (!options || !options.root) {
  135169. type = namespace + type;
  135170. if (( true) && !store._mutations[type]) {
  135171. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  135172. return
  135173. }
  135174. }
  135175. store.commit(type, payload, options);
  135176. }
  135177. };
  135178. // getters and state object must be gotten lazily
  135179. // because they will be changed by vm update
  135180. Object.defineProperties(local, {
  135181. getters: {
  135182. get: noNamespace
  135183. ? function () { return store.getters; }
  135184. : function () { return makeLocalGetters(store, namespace); }
  135185. },
  135186. state: {
  135187. get: function () { return getNestedState(store.state, path); }
  135188. }
  135189. });
  135190. return local
  135191. }
  135192. function makeLocalGetters (store, namespace) {
  135193. if (!store._makeLocalGettersCache[namespace]) {
  135194. var gettersProxy = {};
  135195. var splitPos = namespace.length;
  135196. Object.keys(store.getters).forEach(function (type) {
  135197. // skip if the target getter is not match this namespace
  135198. if (type.slice(0, splitPos) !== namespace) { return }
  135199. // extract local getter type
  135200. var localType = type.slice(splitPos);
  135201. // Add a port to the getters proxy.
  135202. // Define as getter property because
  135203. // we do not want to evaluate the getters in this time.
  135204. Object.defineProperty(gettersProxy, localType, {
  135205. get: function () { return store.getters[type]; },
  135206. enumerable: true
  135207. });
  135208. });
  135209. store._makeLocalGettersCache[namespace] = gettersProxy;
  135210. }
  135211. return store._makeLocalGettersCache[namespace]
  135212. }
  135213. function registerMutation (store, type, handler, local) {
  135214. var entry = store._mutations[type] || (store._mutations[type] = []);
  135215. entry.push(function wrappedMutationHandler (payload) {
  135216. handler.call(store, local.state, payload);
  135217. });
  135218. }
  135219. function registerAction (store, type, handler, local) {
  135220. var entry = store._actions[type] || (store._actions[type] = []);
  135221. entry.push(function wrappedActionHandler (payload) {
  135222. var res = handler.call(store, {
  135223. dispatch: local.dispatch,
  135224. commit: local.commit,
  135225. getters: local.getters,
  135226. state: local.state,
  135227. rootGetters: store.getters,
  135228. rootState: store.state
  135229. }, payload);
  135230. if (!isPromise(res)) {
  135231. res = Promise.resolve(res);
  135232. }
  135233. if (store._devtoolHook) {
  135234. return res.catch(function (err) {
  135235. store._devtoolHook.emit('vuex:error', err);
  135236. throw err
  135237. })
  135238. } else {
  135239. return res
  135240. }
  135241. });
  135242. }
  135243. function registerGetter (store, type, rawGetter, local) {
  135244. if (store._wrappedGetters[type]) {
  135245. if ((true)) {
  135246. console.error(("[vuex] duplicate getter key: " + type));
  135247. }
  135248. return
  135249. }
  135250. store._wrappedGetters[type] = function wrappedGetter (store) {
  135251. return rawGetter(
  135252. local.state, // local state
  135253. local.getters, // local getters
  135254. store.state, // root state
  135255. store.getters // root getters
  135256. )
  135257. };
  135258. }
  135259. function enableStrictMode (store) {
  135260. store._vm.$watch(function () { return this._data.$$state }, function () {
  135261. if ((true)) {
  135262. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  135263. }
  135264. }, { deep: true, sync: true });
  135265. }
  135266. function getNestedState (state, path) {
  135267. return path.reduce(function (state, key) { return state[key]; }, state)
  135268. }
  135269. function unifyObjectStyle (type, payload, options) {
  135270. if (isObject(type) && type.type) {
  135271. options = payload;
  135272. payload = type;
  135273. type = type.type;
  135274. }
  135275. if ((true)) {
  135276. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  135277. }
  135278. return { type: type, payload: payload, options: options }
  135279. }
  135280. function install (_Vue) {
  135281. if (Vue && _Vue === Vue) {
  135282. if ((true)) {
  135283. console.error(
  135284. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  135285. );
  135286. }
  135287. return
  135288. }
  135289. Vue = _Vue;
  135290. applyMixin(Vue);
  135291. }
  135292. /**
  135293. * Reduce the code which written in Vue.js for getting the state.
  135294. * @param {String} [namespace] - Module's namespace
  135295. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  135296. * @param {Object}
  135297. */
  135298. var mapState = normalizeNamespace(function (namespace, states) {
  135299. var res = {};
  135300. if (( true) && !isValidMap(states)) {
  135301. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  135302. }
  135303. normalizeMap(states).forEach(function (ref) {
  135304. var key = ref.key;
  135305. var val = ref.val;
  135306. res[key] = function mappedState () {
  135307. var state = this.$store.state;
  135308. var getters = this.$store.getters;
  135309. if (namespace) {
  135310. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  135311. if (!module) {
  135312. return
  135313. }
  135314. state = module.context.state;
  135315. getters = module.context.getters;
  135316. }
  135317. return typeof val === 'function'
  135318. ? val.call(this, state, getters)
  135319. : state[val]
  135320. };
  135321. // mark vuex getter for devtools
  135322. res[key].vuex = true;
  135323. });
  135324. return res
  135325. });
  135326. /**
  135327. * Reduce the code which written in Vue.js for committing the mutation
  135328. * @param {String} [namespace] - Module's namespace
  135329. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  135330. * @return {Object}
  135331. */
  135332. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  135333. var res = {};
  135334. if (( true) && !isValidMap(mutations)) {
  135335. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  135336. }
  135337. normalizeMap(mutations).forEach(function (ref) {
  135338. var key = ref.key;
  135339. var val = ref.val;
  135340. res[key] = function mappedMutation () {
  135341. var args = [], len = arguments.length;
  135342. while ( len-- ) args[ len ] = arguments[ len ];
  135343. // Get the commit method from store
  135344. var commit = this.$store.commit;
  135345. if (namespace) {
  135346. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  135347. if (!module) {
  135348. return
  135349. }
  135350. commit = module.context.commit;
  135351. }
  135352. return typeof val === 'function'
  135353. ? val.apply(this, [commit].concat(args))
  135354. : commit.apply(this.$store, [val].concat(args))
  135355. };
  135356. });
  135357. return res
  135358. });
  135359. /**
  135360. * Reduce the code which written in Vue.js for getting the getters
  135361. * @param {String} [namespace] - Module's namespace
  135362. * @param {Object|Array} getters
  135363. * @return {Object}
  135364. */
  135365. var mapGetters = normalizeNamespace(function (namespace, getters) {
  135366. var res = {};
  135367. if (( true) && !isValidMap(getters)) {
  135368. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  135369. }
  135370. normalizeMap(getters).forEach(function (ref) {
  135371. var key = ref.key;
  135372. var val = ref.val;
  135373. // The namespace has been mutated by normalizeNamespace
  135374. val = namespace + val;
  135375. res[key] = function mappedGetter () {
  135376. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  135377. return
  135378. }
  135379. if (( true) && !(val in this.$store.getters)) {
  135380. console.error(("[vuex] unknown getter: " + val));
  135381. return
  135382. }
  135383. return this.$store.getters[val]
  135384. };
  135385. // mark vuex getter for devtools
  135386. res[key].vuex = true;
  135387. });
  135388. return res
  135389. });
  135390. /**
  135391. * Reduce the code which written in Vue.js for dispatch the action
  135392. * @param {String} [namespace] - Module's namespace
  135393. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  135394. * @return {Object}
  135395. */
  135396. var mapActions = normalizeNamespace(function (namespace, actions) {
  135397. var res = {};
  135398. if (( true) && !isValidMap(actions)) {
  135399. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  135400. }
  135401. normalizeMap(actions).forEach(function (ref) {
  135402. var key = ref.key;
  135403. var val = ref.val;
  135404. res[key] = function mappedAction () {
  135405. var args = [], len = arguments.length;
  135406. while ( len-- ) args[ len ] = arguments[ len ];
  135407. // get dispatch function from store
  135408. var dispatch = this.$store.dispatch;
  135409. if (namespace) {
  135410. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  135411. if (!module) {
  135412. return
  135413. }
  135414. dispatch = module.context.dispatch;
  135415. }
  135416. return typeof val === 'function'
  135417. ? val.apply(this, [dispatch].concat(args))
  135418. : dispatch.apply(this.$store, [val].concat(args))
  135419. };
  135420. });
  135421. return res
  135422. });
  135423. /**
  135424. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  135425. * @param {String} namespace
  135426. * @return {Object}
  135427. */
  135428. var createNamespacedHelpers = function (namespace) { return ({
  135429. mapState: mapState.bind(null, namespace),
  135430. mapGetters: mapGetters.bind(null, namespace),
  135431. mapMutations: mapMutations.bind(null, namespace),
  135432. mapActions: mapActions.bind(null, namespace)
  135433. }); };
  135434. /**
  135435. * Normalize the map
  135436. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  135437. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  135438. * @param {Array|Object} map
  135439. * @return {Object}
  135440. */
  135441. function normalizeMap (map) {
  135442. if (!isValidMap(map)) {
  135443. return []
  135444. }
  135445. return Array.isArray(map)
  135446. ? map.map(function (key) { return ({ key: key, val: key }); })
  135447. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  135448. }
  135449. /**
  135450. * Validate whether given map is valid or not
  135451. * @param {*} map
  135452. * @return {Boolean}
  135453. */
  135454. function isValidMap (map) {
  135455. return Array.isArray(map) || isObject(map)
  135456. }
  135457. /**
  135458. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  135459. * @param {Function} fn
  135460. * @return {Function}
  135461. */
  135462. function normalizeNamespace (fn) {
  135463. return function (namespace, map) {
  135464. if (typeof namespace !== 'string') {
  135465. map = namespace;
  135466. namespace = '';
  135467. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  135468. namespace += '/';
  135469. }
  135470. return fn(namespace, map)
  135471. }
  135472. }
  135473. /**
  135474. * Search a special module from store by namespace. if module not exist, print error message.
  135475. * @param {Object} store
  135476. * @param {String} helper
  135477. * @param {String} namespace
  135478. * @return {Object}
  135479. */
  135480. function getModuleByNamespace (store, helper, namespace) {
  135481. var module = store._modulesNamespaceMap[namespace];
  135482. if (( true) && !module) {
  135483. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  135484. }
  135485. return module
  135486. }
  135487. // Credits: borrowed code from fcomb/redux-logger
  135488. function createLogger (ref) {
  135489. if ( ref === void 0 ) ref = {};
  135490. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  135491. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  135492. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  135493. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  135494. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  135495. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  135496. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  135497. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  135498. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  135499. return function (store) {
  135500. var prevState = deepCopy(store.state);
  135501. if (typeof logger === 'undefined') {
  135502. return
  135503. }
  135504. if (logMutations) {
  135505. store.subscribe(function (mutation, state) {
  135506. var nextState = deepCopy(state);
  135507. if (filter(mutation, prevState, nextState)) {
  135508. var formattedTime = getFormattedTime();
  135509. var formattedMutation = mutationTransformer(mutation);
  135510. var message = "mutation " + (mutation.type) + formattedTime;
  135511. startMessage(logger, message, collapsed);
  135512. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  135513. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  135514. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  135515. endMessage(logger);
  135516. }
  135517. prevState = nextState;
  135518. });
  135519. }
  135520. if (logActions) {
  135521. store.subscribeAction(function (action, state) {
  135522. if (actionFilter(action, state)) {
  135523. var formattedTime = getFormattedTime();
  135524. var formattedAction = actionTransformer(action);
  135525. var message = "action " + (action.type) + formattedTime;
  135526. startMessage(logger, message, collapsed);
  135527. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  135528. endMessage(logger);
  135529. }
  135530. });
  135531. }
  135532. }
  135533. }
  135534. function startMessage (logger, message, collapsed) {
  135535. var startMessage = collapsed
  135536. ? logger.groupCollapsed
  135537. : logger.group;
  135538. // render
  135539. try {
  135540. startMessage.call(logger, message);
  135541. } catch (e) {
  135542. logger.log(message);
  135543. }
  135544. }
  135545. function endMessage (logger) {
  135546. try {
  135547. logger.groupEnd();
  135548. } catch (e) {
  135549. logger.log('—— log end ——');
  135550. }
  135551. }
  135552. function getFormattedTime () {
  135553. var time = new Date();
  135554. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  135555. }
  135556. function repeat (str, times) {
  135557. return (new Array(times + 1)).join(str)
  135558. }
  135559. function pad (num, maxLength) {
  135560. return repeat('0', maxLength - num.toString().length) + num
  135561. }
  135562. var index = {
  135563. Store: Store,
  135564. install: install,
  135565. version: '3.6.2',
  135566. mapState: mapState,
  135567. mapMutations: mapMutations,
  135568. mapGetters: mapGetters,
  135569. mapActions: mapActions,
  135570. createNamespacedHelpers: createNamespacedHelpers,
  135571. createLogger: createLogger
  135572. };
  135573. /* harmony default export */ __webpack_exports__["default"] = (index);
  135574. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../_webpack@4.46.0@webpack/buildin/global.js */ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js")))
  135575. /***/ }),
  135576. /***/ "./node_modules/_webpack@4.46.0@webpack/buildin/global.js":
  135577. /*!***********************************!*\
  135578. !*** (webpack)/buildin/global.js ***!
  135579. \***********************************/
  135580. /*! no static exports found */
  135581. /***/ (function(module, exports) {
  135582. var g;
  135583. // This works in non-strict mode
  135584. g = (function() {
  135585. return this;
  135586. })();
  135587. try {
  135588. // This works if eval is allowed (see CSP)
  135589. g = g || new Function("return this")();
  135590. } catch (e) {
  135591. // This works if the window reference is available
  135592. if (typeof window === "object") g = window;
  135593. }
  135594. // g can still be undefined, but nothing to do about it...
  135595. // We return undefined, instead of nothing here, so it's
  135596. // easier to handle this case. if(!global) { ...}
  135597. module.exports = g;
  135598. /***/ }),
  135599. /***/ "./node_modules/_webpack@4.46.0@webpack/buildin/module.js":
  135600. /*!***********************************!*\
  135601. !*** (webpack)/buildin/module.js ***!
  135602. \***********************************/
  135603. /*! no static exports found */
  135604. /***/ (function(module, exports) {
  135605. module.exports = function(module) {
  135606. if (!module.webpackPolyfill) {
  135607. module.deprecate = function() {};
  135608. module.paths = [];
  135609. // module.parent = undefined by default
  135610. if (!module.children) module.children = [];
  135611. Object.defineProperty(module, "loaded", {
  135612. enumerable: true,
  135613. get: function() {
  135614. return module.l;
  135615. }
  135616. });
  135617. Object.defineProperty(module, "id", {
  135618. enumerable: true,
  135619. get: function() {
  135620. return module.i;
  135621. }
  135622. });
  135623. module.webpackPolyfill = 1;
  135624. }
  135625. return module;
  135626. };
  135627. /***/ })
  135628. }]);
  135629. //# sourceMappingURL=chunk-vendors.js.map